/* void NCPreview::contextMenuEvent(QContextMenuEvent *event) { QMenu menu(this); menu.addAction(cutAct); menu.addAction(copyAct); menu.addAction(pasteAct); menu.exec(event->globalPos()); } */ void NCPreview::closeEvent( QCloseEvent *ev ) { writeSettings(); //qDebug( "Closing and writing settings" ); ev->accept(); }
MainWindow::~MainWindow() { writeSettings(); }
void QFEvaluationPropertyEditor::closeEvent ( QCloseEvent * event ) { //std::cout<<"QFEvaluationPropertyEditor::closeEvent\n"; writeSettings(); event->accept(); //std::cout<<"QFEvaluationPropertyEditor::closeEvent ... OK\n"; }
MultiClientWindow::~MultiClientWindow() { writeSettings(); this->on_pushButton_DisconnectALL_clicked(); delete ui; }
void ConfigDialog::accept() { writeSettings(); QDialog::accept(); }
void handleConsoleInput() { uint8_t retval; uint8_t index=0; uint8_t ch='0'; SdFile finger; switch (console.keyValue()) { case _DIR_: console.printf("SOD:\r\n"); root.ls(LS_DATE | LS_SIZE); console.printf("EOD:\r\n"); break; case _LSV_: console.printf("LSV:" BOM_VERSION "\r\n"); break; case _TYP_: typeFile(console.arguments()); break; case _NSC_: console.printf("SOD:\r\n"); retval=networkScan(); console.printf("EOD:\r\n"); console.printf("\nDBG: found=%d\r\n",retval); break; case _NJN_: //console.printf("SOD:\r\n"); retval=networkJoin(console.arguments()); //console.printf("EOD:\r\n"); console.printf("\nDBG: joined=%s\r\n",retval?"TRUE":"FALSE"); break; case _NPW_: //console.printf("SOD:\r\n"); retval=networkSetPassword(console.arguments()); //console.printf("EOD:\r\n"); console.printf("\nDBG: pwd set=%s\r\n",retval?"TRUE":"FALSE"); break; case _NST_: retval=networkStatus(); console.printf("NST: %s\r\n",retval?"CONNECTED":"NOT CONNECTED"); break; case _FMT_: // there really should be some REALLY do you mean this here but..... root.openRoot(&volume); if (finger.open(&root, ".", O_WRITE|O_READ)) { console.printf("\nDBG: Opened / \r\n"); finger.rmRfStar(); } else { console.printf("\nDBG: FAIL \r\n"); } break; case _TPT_: toPachube(1, console.arguments()); break; case _TX2_: radio.printf("%s",console.arguments()); index=0; // delay(1000); while (radio.available()) { inBuffer[index++]=ch=radio.read(); if( index>= 99 || ((ch== '\n') || ch !='\r')) { inBuffer[index]='\0'; console.puts(inBuffer); index=0; delay(100); } } inBuffer[index]='\0'; console.puts(inBuffer); console.puts((char *) "\r\n"); break; // set to one to test output for. #if 1 case _TS1_: toPachube(0, console.arguments()); break; case _TS2_: toPachube(1, console.arguments()); break; case _TS3_: toPachube(2, console.arguments()); break; case _TS4_: toPachube(3, console.arguments()); break; case _TS5_: toPachube(4, console.arguments()); break; case _FAN_: toPachube(5, console.arguments()); break; case _CHL_: toPachube(6, console.arguments()); break; case _STC_: toPachube(7, console.arguments()); break; #endif case _PKY_: strncpy(pachubeKey, console.arguments(), MAX_PATCHUBE_KEY_LENGHT-1); stripcrlf(pachubeKey); break; case _PFD_: strncpy(pachubeFeed, console.arguments(), MAX_PATCHUBE_FEED_LENGHT-1); stripcrlf(pachubeFeed); break; case _SGT_ : readSettings(); break; case _SSV_ : writeSettings(); break; default: console.printf("DBG: forwarding (%s) to device\r\n",console.key()); device.puts(console.line()); //device.puts("\r\n"); break; } }
void MainWindow::closeEvent(QCloseEvent *event) { writeSettings(); event->accept(); }
void MainWindow::closeEvent(QCloseEvent *event) { player_.stop(); writeSettings(); QWidget::closeEvent(event); }
ConfigDialog::~ConfigDialog() { writeSettings(); }
BracketedWindow::~BracketedWindow() { writeSettings(); }
void mailclient::closeEvent(QCloseEvent *event) { writeSettings(); event->accept(); }
void NoteWindow::closeEvent(QCloseEvent *event) { writeSettings(); }
void QNetsoul::saveStateBeforeQuiting(void) { this->tree->saveContacts(); writeSettings(); qApp->quit(); }
void ConfigDialog::accept() { m_accepted = true; config.video.windowedWidth = ui->windowWidthSpinBox->value(); config.video.windowedHeight = ui->windowHeightSpinBox->value(); getFullscreenResolutions(ui->fullScreenResolutionComboBox->currentIndex(), config.video.fullscreenWidth, config.video.fullscreenHeight); getFullscreenRefreshRate(ui->fullScreenRefreshRateComboBox->currentIndex(), config.video.fullscreenRefresh); config.video.multisampling = ui->aliasingSlider->value(); config.texture.maxAnisotropy = ui->anisotropicSlider->value(); config.texture.maxBytes = ui->cacheSizeSpinBox->value() * gc_uMegabyte; if (ui->blnrStandardRadioButton->isChecked()) config.texture.bilinearMode = BILINEAR_STANDARD; else if (ui->blnr3PointRadioButton->isChecked()) config.texture.bilinearMode = BILINEAR_3POINT; if (ui->bmpRadioButton->isChecked()) config.texture.screenShotFormat = 0; else if (ui->jpegRadioButton->isChecked()) config.texture.screenShotFormat = 1; const int lanuageIndex = ui->translationsComboBox->currentIndex(); if (lanuageIndex == 0) // English config.translationFile.clear(); else { QStringList translationFiles; _getTranslations(translationFiles); config.translationFile = translationFiles[lanuageIndex-1].toLocal8Bit().constData(); } // Emulation settings config.generalEmulation.enableLOD = ui->emulateLodCheckBox->isChecked() ? 1 : 0; config.generalEmulation.enableNoise = ui->emulateNoiseCheckBox->isChecked() ? 1 : 0; config.generalEmulation.enableFog = ui->emulateFogCheckBox->isChecked() ? 1 : 0; config.generalEmulation.enableHWLighting = ui->enableHWLightingCheckBox->isChecked() ? 1 : 0; config.generalEmulation.enableShadersStorage = ui->enableShadersStorageCheckBox->isChecked() ? 1 : 0; config.generalEmulation.enableCustomSettings = ui->customSettingsCheckBox->isChecked() ? 1 : 0; config.frameBufferEmulation.bufferSwapMode = ui->bufferSwapComboBox->currentIndex(); config.frameBufferEmulation.enable = ui->frameBufferGroupBox->isChecked() ? 1 : 0; if (ui->copyBufferDisableRadioButton->isChecked()) config.frameBufferEmulation.copyToRDRAM = Config::ctDisable; else if (ui->copyBufferSyncRadioButton->isChecked()) config.frameBufferEmulation.copyToRDRAM = Config::ctSync; else if (ui->copyBufferAsyncRadioButton->isChecked()) config.frameBufferEmulation.copyToRDRAM = Config::ctAsync; config.frameBufferEmulation.copyFromRDRAM = ui->RenderFBCheckBox->isChecked() ? 1 : 0; config.frameBufferEmulation.copyDepthToRDRAM = ui->CopyDepthCheckBox->isChecked() ? 1 : 0; config.frameBufferEmulation.N64DepthCompare = ui->n64DepthCompareCheckBox->isChecked() ? 1 : 0; if (ui->aspectStretchRadioButton->isChecked()) config.frameBufferEmulation.aspect = Config::aStretch; else if (ui->aspect43RadioButton->isChecked()) config.frameBufferEmulation.aspect = Config::a43; else if (ui->aspect169RadioButton->isChecked()) config.frameBufferEmulation.aspect = Config::a169; else if (ui->aspectAdjustRadioButton->isChecked()) config.frameBufferEmulation.aspect = Config::aAdjust; config.frameBufferEmulation.nativeResFactor = ui->resolutionFactorSlider->value(); config.frameBufferEmulation.copyAuxToRDRAM = ui->copyAuxBuffersCheckBox->isChecked() ? 1 : 0; config.frameBufferEmulation.fbInfoDisabled = ui->fbInfoDisableCheckBox->isChecked() ? 1: 0; config.frameBufferEmulation.fbInfoReadColorChunk = ui->readColorChunkCheckBox->isChecked() ? 1 : 0; config.frameBufferEmulation.fbInfoReadDepthChunk = ui->readDepthChunkCheckBox->isChecked() ? 1 : 0; // Texture filter settings config.textureFilter.txFilterMode = ui->filterComboBox->currentIndex(); config.textureFilter.txEnhancementMode = ui->enhancementComboBox->currentIndex(); config.textureFilter.txCacheSize = ui->textureFilterCacheSpinBox->value() * gc_uMegabyte; config.textureFilter.txFilterIgnoreBG = ui->ignoreBackgroundsCheckBox->isChecked() ? 1 : 0; config.textureFilter.txHiresEnable = ui->texturePackGroupBox->isChecked() ? 1 : 0; config.textureFilter.txHiresFullAlphaChannel = ui->alphaChannelCheckBox->isChecked() ? 1 : 0; config.textureFilter.txHresAltCRC = ui->alternativeCRCCheckBox->isChecked() ? 1 : 0; config.textureFilter.txDump = ui->textureDumpCheckBox->isChecked() ? 1 : 0; config.textureFilter.txCacheCompression = ui->compressCacheCheckBox->isChecked() ? 1 : 0; config.textureFilter.txForce16bpp = ui->force16bppCheckBox->isChecked() ? 1 : 0; config.textureFilter.txSaveCache = ui->saveTextureCacheCheckBox->isChecked() ? 1 : 0; QString txPath = ui->txPathLabel->text(); if (!txPath.isEmpty()) config.textureFilter.txPath[txPath.toWCharArray(config.textureFilter.txPath)] = L'\0'; config.font.size = m_font.pointSize(); QString fontName = m_font.family() + ".ttf"; #ifdef OS_WINDOWS config.font.name = fontName.toLocal8Bit().constData(); #else config.font.name = fontName.toStdString(); #endif config.font.color[0] = m_color.red(); config.font.color[1] = m_color.green(); config.font.color[2] = m_color.blue(); config.font.color[3] = m_color.alpha(); config.font.colorf[0] = m_color.redF(); config.font.colorf[1] = m_color.greenF(); config.font.colorf[2] = m_color.blueF(); config.font.colorf[3] = m_color.alphaF(); // Post filter settings config.bloomFilter.enable = ui->bloomGroupBox->isChecked() ? 1 : 0; if (ui->bloomStrongRadioButton->isChecked()) config.bloomFilter.blendMode = 0; else if (ui->bloomMildRadioButton->isChecked()) config.bloomFilter.blendMode = 1; else if (ui->bloomLightRadioButton->isChecked()) config.bloomFilter.blendMode = 2; config.bloomFilter.thresholdLevel = ui->bloomThresholdSlider->value(); config.bloomFilter.blurAmount = ui->blurAmountSlider->value(); config.bloomFilter.blurStrength = ui->blurStrengthSlider->value(); config.gammaCorrection.force = ui->forceGammaCorrectionCheckBox->isChecked() ? 1 : 0; config.gammaCorrection.level = ui->gammaLevelSpinBox->value(); writeSettings(m_strIniPath); QDialog::accept(); }
void Settings::closeEvent(QCloseEvent *e) { writeSettings(); }
Settings_Lawicel::~Settings_Lawicel() { writeSettings(); }
void SizPostForm::done(int result) { writeSettings(); QDialog::done(result); }
Sword25FileProxy::~Sword25FileProxy() { if (!_settings.empty()) writeSettings(); }
AudioPlayer::~AudioPlayer() { writeSettings(); }
void MainWindow::closeEvent(QCloseEvent *e) { writeSettings(); hide(); e->ignore(); }
int main(int argc, char* argv[]) { reactivision_settings config; sprintf(config.file,"none"); const char *app_name = "reacTIVision"; const char *version_no = "1.5.1"; bool headless = false; std::cout << app_name << " " << version_no << " (" << __DATE__ << ")" << std::endl << std::endl; if (argc>1) { if (strcmp( argv[1], "-h" ) == 0 ) { printUsage(); return 0; } else if( strcmp( argv[1], "-c" ) == 0 ) { if (argc==3) sprintf(config.file,"%s",argv[2]); else { printUsage(); return 0; } } else if( strcmp( argv[1], "-n" ) == 0 ) { headless = true; } else if( strcmp( argv[1], "-l" ) == 0 ) { CameraTool::listDevices(); MidiServer::listDevices(); return 0; } else if ( (std::string(argv[1]).find("-NSDocumentRevisionsDebugMode")==0 ) || (std::string(argv[1]).find("-psn_")==0) ){ // ignore mac specific arguments } else { printUsage(); } } #ifndef WIN32 signal(SIGINT,terminate); signal(SIGHUP,terminate); signal(SIGQUIT,terminate); signal(SIGTERM,terminate); #endif readSettings(&config); config.headless = headless; CameraEngine *camera = setupCamera(config.camera_config); engine = new SDLinterface(app_name, camera, &config); if (!headless) { switch (config.display_mode) { case 0: engine->setDisplayMode(engine->NO_DISPLAY); break; case 1: engine->setDisplayMode(engine->SOURCE_DISPLAY); break; case 2: engine->setDisplayMode(engine->DEST_DISPLAY); break; } } else engine->setDisplayMode(engine->NO_DISPLAY); MessageServer *server = NULL; FrameProcessor *fiducialfinder = NULL; FrameProcessor *thresholder = NULL; FrameProcessor *equalizer = NULL; FrameProcessor *calibrator = NULL; if(config.midi) server = new MidiServer(config.midi_config); else server = new TuioServer(config.host,config.port); server->setInversion(config.invert_x, config.invert_y, config.invert_a); equalizer = new FrameEqualizer(); engine->addFrameProcessor(equalizer); if (config.background) equalizer->toggleFlag(' '); thresholder = new FrameThresholder(config.gradient_gate, config.tile_size, config.thread_count); engine->addFrameProcessor(thresholder); if (config.amoeba) fiducialfinder = new FidtrackFinder(server, config.tree_config, config.grid_config, config.finger_size, config.finger_sensitivity); else if (config.classic) fiducialfinder = new FidtrackFinderClassic(server, config.grid_config); engine->addFrameProcessor(fiducialfinder); calibrator = new CalibrationEngine(config.grid_config); engine->addFrameProcessor(calibrator); engine->run(); teardownCamera(camera); config.display_mode = engine->getDisplayMode(); engine->removeFrameProcessor(calibrator); delete calibrator; if (config.amoeba) { config.finger_size = ((FidtrackFinder*)fiducialfinder)->getFingerSize(); config.finger_sensitivity = ((FidtrackFinder*)fiducialfinder)->getFingerSensitivity(); } engine->removeFrameProcessor(fiducialfinder); config.gradient_gate = ((FrameThresholder*)thresholder)->getGradientGate(); config.tile_size = ((FrameThresholder*)thresholder)->getTileSize(); engine->removeFrameProcessor(thresholder); delete thresholder; config.background = ((FrameEqualizer*)equalizer)->getState(); engine->removeFrameProcessor(equalizer); delete equalizer; config.invert_x = server->getInvertX(); config.invert_y = server->getInvertY(); config.invert_a = server->getInvertA(); delete fiducialfinder; delete engine; delete server; writeSettings(&config); return 0; }
//-------------------------------------------------------------------------- void MainWindow::closeEvent(QCloseEvent* event) { writeSettings(); QMainWindow::closeEvent(event); }
bool ShortcutList::save() const { return writeSettings(QString::null, 0, false, true); }
void lc_Sampledlg::closeEvent(QCloseEvent *event) { writeSettings(); QWidget::closeEvent(event); }
void SettingsDialog::accept() { writeSettings(); this->close(); }
FormClock::~FormClock() { _positionWidget = mapToGlobal(QPoint(0, 0)); writeSettings(); }
void QtCalculator::closeEvent( QCloseEvent*e ) { writeSettings(); e->accept(); }
void TypeDocForm::done(int result) { writeSettings(); QDialog::done(result); }
void GaussianBeamWindow::closeEvent(QCloseEvent* event) { Q_UNUSED(event); writeSettings(); }
V4LSelectDeviceDialog::~V4LSelectDeviceDialog() { writeSettings(this); delete ui; }