void TTMpeg2MainWnd::resetProject() { lvStreamInfo->clear(); if ( ttAssigned(video_type) ) delete video_type; setInitialValues(); }
void MediaRendererDevice::start() { m_Thread.start(); m_RootDevice.ControlActionRequested.connect(std::bind(&MediaRendererDevice::onControlActionRequest, this, _1), this); m_RootDevice.EventSubscriptionRequested.connect(std::bind(&MediaRendererDevice::onEventSubscriptionRequest, this, _1), this); m_RootDevice.initialize(); setInitialValues(); }
void editFieldForm::getCustomType() { addFieldTypeForm * addForm = new addFieldTypeForm( this, "addfieldtype", TRUE ); if (addForm->exec()) { //QString nospaces = addForm->typeNameEdit->text().remove(" "); QString nospaces = addForm->typeNameEdit->text(); setInitialValues(nameLineEdit->text(),nospaces ); enableSave(); } }
dialog_delftParams::dialog_delftParams(XMLReadWrite &XmlObj, QWidget *parent) : QDialog(parent), ui(new Ui::dialog_delftParams) { ui->setupUi(this); XmlDoc = XmlObj; closeOk = true; setInitialValues(); readXml(); }
// Sets the strings of the subwidgets using the current language void TTMpeg2MainWnd::languageChange() { setCaption( tr( "TTMpeg2 - 0.10" ) ); gbStreamName->setTitle( tr( "Video stream" ) ); pbOpenStream->setText( QString::null ); gbBufferStatistics->setTitle( tr( "Buffer statistics" ) ); slFileLength->setText( tr( "File length (bytes):" ) ); slReadOps->setText( tr( "Read operations:" ) ); slFillOps->setText( tr( "Fill operations:" ) ); slReadTime->setText( tr( "Read time:" ) ); gbStreamStatistics->setTitle( tr( "Stream statistics" ) ); slTotalFrames->setText( tr( "Frames total:" ) ); slIFrames->setText( tr( "I-Frames:" ) ); slPFrames->setText( tr( "P-Frames:" ) ); slBFrames->setText( tr( "B-Frames:" ) ); slSeqHeader->setText( tr( "Sequence header:" ) ); slGOPHeader->setText( tr( "GOP header:" ) ); slPicHeader->setText( tr( "Picture header:" ) ); slSeqEndHeader->setText( tr( "Sequence end header:" ) ); gbStreamInfo->setTitle( tr( "Stream info" ) ); lvStreamInfo->header()->setLabel( 0, tr( "Header" ) ); lvStreamInfo->header()->setLabel( 1, tr( "Offset" ) ); lvStreamInfo->header()->setLabel( 2, tr( "Type" ) ); lvStreamInfo->header()->setLabel( 3, tr( "Temp Ref." ) ); lvStreamInfo->header()->setLabel( 4, tr( "S-Order" ) ); lvStreamInfo->header()->setLabel( 5, tr( "D-Order" ) ); lvStreamInfo->header()->setLabel( 6, tr( "Time-code" ) ); lvStreamInfo->clear(); gbSequenceInfo->setTitle( tr( "Sequence Info" ) ); slBitrate->setText( tr( "Bitrate:" ) ); slFramerate->setText( tr( "Framerate:" ) ); slWidth->setText( tr( "Picture width:" ) ); slHeight->setText( tr( "Picture height:" ) ); //if (MenuBar->findItem(1)) //MenuBar->findItem(1)->setText( tr( "File" ) ); fileOpenAction->setText( tr( "Open..." ) ); fileSettingsAction->setText( tr( "Settings..." ) ); fileAnalyzeAction->setText( tr( "Analyze" ) ); fileExitAction->setText( tr( "Exit" ) ); setInitialValues(); }
LocalTrackView::LocalTrackView(Controller::MainController *mainController, int channelIndex) : BaseTrackView(mainController, channelIndex), inputNode(nullptr) { Q_ASSERT(mainController); // insert a input node in controller inputNode = new Audio::LocalInputAudioNode(channelIndex); trackID = mainController->addInputTrackNode(this->inputNode); bindThisViewWithTrackNodeSignals();// now is secure bind this LocalTrackView with the respective TrackNode model setInitialValues(1.0f, BaseTrackView::Boost::ZERO, 0.0f, false); setUnlightStatus(false); peakMetersOnly = false; }
int addFieldForm::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: setInitialValues((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break; case 1: confirmAddField(); break; case 2: getCustomType(); break; case 3: languageChange(); break; default: ; } _id -= 4; } return _id; }
void MainWindow::resetDatabase() { // confirm the choice QMessageBox::StandardButton ret = QMessageBox::warning(this, "Reset Database", "This operation will DELETE ALL DATA entered to this point.\n" "This is NOT REVERSABLE. Are you sure you want to do this?", QMessageBox::Yes | QMessageBox::No, QMessageBox::No); if( ret != QMessageBox::Yes ) return; QFile file("mileage.sql"); if(file.exists()) { db.close(); file.rename("mileage.sql.old"); ui->txtHistory->setPlainText(""); validateDatabase(); setInitialValues(); emit dataUpdated(); } }
Solver::Solver(double* ainitialValues, double* aparameters, ChildModel* mmodel, int inbOfIterations, vector<double> vtimepoints, string sfilename) { initialValues = ainitialValues; initialParameters = aparameters; concentrations = new double[mmodel->NSPECIES]; model = mmodel; nbOfIterations = inbOfIterations; timepoints = vtimepoints; //out.open(sfilename.c_str(), ios::out); output = new double**[nbOfIterations]; for (int i = 0; i < nbOfIterations; i++) { output[i] = new double*[timepoints.size()]; for (unsigned int j = 0; j < timepoints.size(); j++) { output[i][j] = new double[model->NSPECIES + 1]; } } setInitialValues(); }
LocalTrackView::LocalTrackView(Controller::MainController *mainController, int channelIndex) : BaseTrackView(mainController, channelIndex), inputNode(nullptr), usingSmallSpacing(false), peakMetersOnly(false), buttonStereoInversion(createStereoInversionButton()) { Q_ASSERT(mainController); // insert a input node in controller inputNode = new Audio::LocalInputNode(mainController, channelIndex); trackID = mainController->addInputTrackNode(this->inputNode); bindThisViewWithTrackNodeSignals();// now is secure bind this LocalTrackView with the respective TrackNode model setInitialValues(1.0f, BaseTrackView::Boost::ZERO, 0.0f, false, false); setUnlightStatus(false); secondaryChildsLayout->addWidget(buttonStereoInversion); }
int main() { VisionCam * gCam = NULL; entryIndex index = 0; module_t handle = NULL; status_e ret = STATUS_SUCCESS; #if defined(SOSAL_RUNTIME_DEBUG) debug_get_zone_mask("SOSAL_ZONE_MASK", &sosal_zone_mask); #endif #if defined(DVP_RUNTIME_DEBUG) debug_get_zone_mask("DVP_ZONE_MASK", &dvp_zone_mask); #endif handle = initModule( &gCam ); #ifdef VCAM_AS_SHARED if( handle == NULL ) return -1; #endif if( gCam ) { setInitialValues( gCam ); ret = startServices( gCam ); } else { ret = STATUS_CATASTROPHIC; } if( ret != STATUS_SUCCESS ) { ret = deinitModule( handle, &gCam ); } else { while( 1 ) { index = Menu( menu ); if( index == -1 ) { continue; } /// 'q' button (quit) is pressed if( menu[ index ]->ID == VCAM_CMD_QUIT ) { index = getEntryIndex( menu , KEY_PREVIEW_STOP ); ret = executeEntry( menu[ index ], gCam ); break; } ret = executeEntry( menu[ index ] , gCam ); } ret = stopServices( gCam ); ret = deinitModule( handle, &gCam ); } printf("\tvcam_test exiting with %d.\n", ret); if( STATUS_SUCCESS != ret ) puts("\tTerminating application."); return ret; }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), dtFormat("MMM dd | hh:mm"), ui(new Ui::MainWindow) { ui->setupUi(this); QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates)); abbrevs << "AK" << "AL" << "AR" << "AZ" << "CA" << "CO" << "CT" << "DE" << "FL" << "GA" << "HI" << "IA" << "ID" << "IL" << "IN" << "KS" << "KY" << "LA" << "MA" << "MD" << "ME" << "MI" << "MN" << "MO" << "MS" << "MT" << "NC" << "ND" << "NE" << "NH" << "NJ" << "NM" << "NV" << "NY" << "OH" << "OK" << "OR" << "PA" << "RI" << "SC" << "SD" << "TN" << "TX" << "UT" << "VA" << "VT" << "WA" << "WI" << "WV" << "WY"; names << "Alaska" << "Alabama" << "Arkansas" << "Arizona" << "California" << "Colorado" << "Connecticut" << "Delaware" << "Florida" << "Georgia" << "Hawaii" << "Iowa" << "Idaho" << "Illinois" << "Indiana" << "Kansas" << "Kentucky" << "Louisiana" << "Massachusetts" << "Maryland" << "Maine" << "Michigan" << "Minnesota" << "Missouri" << "Mississippi" << "Montana" << "North Carolina" << "North Dakota" << "Nebraska" << "New Hampshire" << "New Jersey" << "New Mexico" << "Nevada" << "New York" << "Ohio" << "Oklahoma" << "Oregon" << "Pennsylvania" << "Rhode Island" << "South Carolina" << "South Dakota" << "Tennessee" << "Texas" << "Utah" << "Virginia" << "Vermont" << "Washington" << "Wisconsin" << "West Virginia" << "Wyoming"; // open the database for use QString e; e = validateDatabase(); if( !e.isEmpty() ){ QMessageBox::critical(this, "Critical Error", QString("Error %1") .arg(e) ); db.close(); this->deleteLater(); } // set up the table model to pass the sql data through model = new QSqlTableModel(this,db); model->setTable("States"); model->setEditStrategy(QSqlTableModel::OnManualSubmit); model->setFilter("Mileage<>0 OR GasAmt<>0"); model->setHeaderData(0, Qt::Horizontal, "Name"); model->setHeaderData(1, Qt::Horizontal, ""); model->setHeaderData(2, Qt::Horizontal, "Mileage"); model->setHeaderData(3, Qt::Horizontal, "Fuel\nPurchased"); model->setHeaderData(4, Qt::Horizontal, "Fuel\nVolume"); model->setHeaderData(5, Qt::Horizontal, "Refuel\nCount"); model->setHeaderData(6, Qt::Horizontal, "Visit\nCount"); // set up the table view ui->tableView->setModel( model ); ui->tableView->setItemDelegateForColumn(2, new FormatDelegate(0, FormatDelegate::TSeparator)); ui->tableView->setItemDelegateForColumn(3, new FormatDelegate(0, FormatDelegate::Currency)); ui->tableView->setItemDelegateForColumn(4, new FormatDelegate(0, FormatDelegate::FixedFloat)); ui->tableView->setItemDelegateForColumn(5, new FormatDelegate(0)); ui->tableView->setItemDelegateForColumn(6, new FormatDelegate(0)); ui->tableView->setColumnWidth(0, 125); ui->tableView->setColumnWidth(1, 50); ui->tableView->sortByColumn(2); // set the widgets updateCombos(); updateStatistics(); setInitialValues(); connect(ui->pushAddCrossing, SIGNAL(clicked()), this, SLOT(addCrossing()) ); connect(ui->pushAddFillup, SIGNAL(clicked()), this, SLOT(addRefuel()) ); connect(ui->action_Reset_Statistics, SIGNAL(triggered()), this, SLOT(resetDatabase()) ); connect(this, SIGNAL(dataUpdated()), this, SLOT(updateStatistics()) ); connect(ui->actionBugReport, SIGNAL(triggered()), this, SLOT(bugReport()) ); connect(ui->actionAbout_MileStat, SIGNAL(triggered()), this, SLOT(aboutMileStat()) ); connect(ui->actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()) ); connect(ui->action_Undo, SIGNAL(triggered()), this, SLOT(undoLastCommand()) ); connect(ui->action_Hide_Unvisited_States, SIGNAL(toggled(bool)), this, SLOT(hideUnvisited(bool)) ); }