int ExploreSession::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: cmbLocationName_indexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: cmbRoomName_indexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: cmbSearchCategory_indexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: txtSearch_textChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 4: eventDetails_cellClicked((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 5: tblEventDetails_cellChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 6: btnStartEvent_clicked(); break; case 7: btnCloseEvent_clicked(); break; case 8: btnReopenEvent_clicked(); break; case 9: btnResumeEvent_clicked(); break; case 10: btnViewNotes_clicked(); break; case 11: btnAutoFill_clicked(); break; case 12: validateDescription(); break; default: ; } _id -= 13; } return _id; }
bool ARehabMainWindow::validateGuiState1(void) { bool validate = (validateARehabFileURL() && validateExerciseName() && validateDescription() && validateJointSelection() && validateNumExercises()); if (validate) { this->arehabFileMetadata.exerciseName = ui.txNombreEjercicio->text(); this->arehabFileMetadata.metadataFileURL = ui.txARehabFile->text(); this->arehabFileMetadata.arehabFileURL = ui.txARehabFile->text() + ".data"; this->arehabFileMetadata.description = ui.txDescription->toPlainText(); this->arehabFileMetadata.jointsInvolved = this->jointSelectorWidget->getJointSelectorModel(); QPushButton * btChecked = reinterpret_cast<QPushButton *>(ui.btGroupRepeats->checkedButton()); if (btChecked) this->arehabFileMetadata.numRepetitions = btChecked->text().toUInt(); this->arehabFileMetadata.save(this->arehabFileMetadata.metadataFileURL); //this->glwidget->updateBodyBuffer(this->arehabFileMetadata.jointsInvolved); //this->glwidget2->updateBodyBuffer(this->arehabFileMetadata.jointsInvolved); this->guistatewidget->setStateValidation(QGUIStateWidget::Definition, QSVGTristateItem::ItemState::Valid); } else{ this->arehabFileMetadata.clear(); this->guistatewidget->setStateValidation(QGUIStateWidget::Definition, QSVGTristateItem::ItemState::NotValid); } return validate; }
/* * Parse Event Information Table */ static void parseEIT(u_char *data, size_t len) { struct eit *e = (struct eit *) data; u_char *p; struct tm dvb_time; const char *xmltvid; char date_strbuf[256]; len -= 4; //remove CRC // For each event listing for (p = (u_char *) (&e->data); p < (u_char *) (data + len); p += EIT_EVENT_LEN + GetEITDescriptorsLoopLength(p)) { struct eit_event *evt = (struct eit_event *) p; struct chninfo *c; // find existing information? for (c = channels; c != NULL; c = c->next) { // found it if (c->sid == HILO(e->service_id) && (c->eid == HILO(evt->event_id))) { if (c->ver <= e->version_number) // seen it before or its older FIXME: wrap-around to 0 return; else { c->ver = e->version_number; // update outputted version update_count++; if (ignore_updates) return; break; } } } // its a new program if (c == NULL) { chninfo_t *nc = (chninfo_t *) malloc(sizeof(struct chninfo)); nc->sid = HILO(e->service_id); nc->eid = HILO(evt->event_id); nc->ver = e->version_number; nc->sname = strdup("not-yet-known"); nc->next = channels; channels = nc; } /* we have more data, refresh alarm */ if (timeout) { setTimeoutDeadline(); //alarm(timeout); } // No program info at end! Just skip it if (GetEITDescriptorsLoopLength(evt) == 0) return; parseMJD(HILO(evt->mjd), &dvb_time); dvb_time.tm_sec = BcdCharToInt(evt->start_time_s); dvb_time.tm_min = BcdCharToInt(evt->start_time_m); dvb_time.tm_hour = BcdCharToInt(evt->start_time_h) + time_offset; time_t start_time = timegm(&dvb_time); dvb_time.tm_sec += BcdCharToInt(evt->duration_s); dvb_time.tm_min += BcdCharToInt(evt->duration_m); dvb_time.tm_hour += BcdCharToInt(evt->duration_h); time_t stop_time = timegm(&dvb_time); time_t now; time(&now); // basic bad date check. if the program ends before this time yesterday, or two weeks from today, forget it. if ((difftime(stop_time, now) < -24 * 60 * 60) || (difftime(now, stop_time) > 14 * 24 * 60 * 60)) { invalid_date_count++; if (ignore_bad_dates) return; } // a program must have a title that isn't empty if (!validateDescription((u_char *) (&evt->data), GetEITDescriptorsLoopLength(evt))) { return; } programme_count++; if ((start_time >= start_of_period) && (start_time < end_of_period)) { xmltvid = dvbxmltvid(GetServiceId(e)); if (xmltvid != NULL) { printf("<programme channel=\"%s\" ", xmltvid); strftime(date_strbuf, sizeof(date_strbuf), "start=\"%Y%m%d%H%M%S %z\"", localtime(&start_time)); printf("%s ", date_strbuf); strftime(date_strbuf, sizeof(date_strbuf), "stop=\"%Y%m%d%H%M%S %z\"", localtime(&stop_time)); printf("%s>\n ", date_strbuf); //printf("\t<EventID>%i</EventID>\n", HILO(evt->event_id)); //printf("\t<RunningStatus>%i</RunningStatus>\n", evt->running_status); //1 Airing, 2 Starts in a few seconds, 3 Pausing, 4 About to air parseDescription((u_char *) (&evt->data), GetEITDescriptorsLoopLength(evt)); printf("</programme>\n"); } } } }
TextureOgl::TextureOgl( const Description &description ) : _description( description ), _texelDescription( selectTexelDescription(description.format) ), _target( selectTarget(description.layout) ) { validateDescription(); ScopeTextureBinding scopeTextureBinding( _target, _texture ); const unsigned int levelsMaximum = getMipLevelsMaximum( _description ); const unsigned int levels = _description.mipLevels == CompleteMipMap ? levelsMaximum : _description.mipLevels; storm_assert( levels <= levelsMaximum ); if( _description.mipLevels == CompleteMipMap ) _description.mipLevels = levels; switch( _description.layout ) { case Layout::Separate1d: ::glTexStorage1D( _target, levels, _texelDescription.internalFormat, description.width ); checkResult( "::glTexStorage1D" ); break; case Layout::Separate2d: case Layout::CubeMap: ::glTexStorage2D( _target, levels, _texelDescription.internalFormat, description.width, description.height ); checkResult( "::glTexStorage2D" ); break; case Layout::Separate3d: ::glTexStorage3D( _target, levels, _texelDescription.internalFormat, description.width, description.height, description.depth ); checkResult( "::glTexStorage3D" ); break; case Layout::Layered1d: ::glTexStorage2D( _target, levels, _texelDescription.internalFormat, description.width, description.layers ); checkResult( "::glTexStorage2D" ); break; case Layout::Layered2d: ::glTexStorage3D( _target, levels, _texelDescription.internalFormat, description.width, description.height, description.layers ); checkResult( "::glTexStorage3D" ); break; case Layout::Separate2dMsaa: ::glTexStorage2DMultisample( _target, description.texelSamples, _texelDescription.internalFormat, description.width, description.height, GL_TRUE ); checkResult( "::glTexStorage2DMultisample" ); break; case Layout::Layered2dMsaa: ::glTexStorage3DMultisample( _target, description.texelSamples, _texelDescription.internalFormat, description.width, description.height, description.layers, GL_TRUE ); checkResult( "::glTexStorage3DMultisample" ); break; default: throwNotImplemented(); } }
void Validate::description() { validateDescription(); }
Piece::Piece(byte description) : description(description) { validateDescription(description); }