void Options::accept() { QSettings settings; settings.setValue(SETTINGS_INVERSE_X, ui->chkInvX->isChecked()); settings.setValue(SETTINGS_INVERSE_Y, ui->chkInvY->isChecked()); settings.setValue(SETTINGS_INVERSE_Z, ui->chkInvZ->isChecked()); settings.setValue(SETTINGS_ENABLE_DEBUG_LOG, ui->checkBoxEnableDebugLog->isChecked()); settings.setValue(SETTINGS_USE_AGGRESSIVE_PRELOAD, ui->chkAggressivePreload->isChecked()); settings.setValue(SETTINGS_USE_MM_FOR_MANUAL_CMDS, ui->checkBoxUseMmManualCmds->isChecked()); settings.setValue(SETTINGS_RESPONSE_WAIT_TIME, ui->spinResponseWaitSec->value()); settings.setValue(SETTINGS_Z_JOG_RATE, ui->doubleSpinZJogRate->value()); settings.setValue(SETTINGS_Z_RATE_LIMIT, ui->chkLimitZRate->isChecked()); settings.setValue(SETTINGS_Z_RATE_LIMIT_AMOUNT, ui->doubleSpinZRateLimit->value()); settings.setValue(SETTINGS_XY_RATE_AMOUNT, ui->doubleSpinXYRate->value()); settings.setValue(SETTINGS_FILTER_FILE_COMMANDS, ui->chkFilterFileCommands->isChecked()); settings.setValue(SETTINGS_REDUCE_PREC_FOR_LONG_LINES, ui->checkBoxReducePrecForLongLines->isChecked()); settings.setValue(SETTINGS_GRBL_LINE_BUFFER_LEN, ui->spinBoxGrblLineBufferSize->value()); connect(this, SIGNAL(setSettings()), parentWidget(), SLOT(setSettings())); emit setSettings(); this->close(); }
void CaptureDialog::loadSettings(QString filename) { QFile f(filename); if(f.open(QIODevice::ReadOnly | QIODevice::Text)) { QVariantMap values; bool success = LoadFromJSON(values, f, JSON_ID, JSON_VER); if(success) { CaptureSettings settings; settings.fromJSON(values["settings"].value<QVariantMap>()); setSettings(settings); } else { RDDialog::critical(this, "Error loading config", tr("Couldn't interpret settings in %1.").arg(filename)); } } else { RDDialog::critical(this, "Error loading config", tr("Couldn't open path %1.").arg(filename)); } }
void MainApplication::loadSettings(const BoostPath& SettingsFile) { ApplicationSettings LoadedSettings; if(!boost::filesystem::exists(SettingsFile)) { SWARNING << "Could not load Settings from: \"" << SettingsFile.string() << "\" because that file does not exist." << std::endl; } else { BoostPath SettingsFullPath(SettingsFile); if(!SettingsFile.is_complete() && !SettingsFile.has_root_directory()) { SettingsFullPath = boost::filesystem::complete(SettingsFile); } SettingsFullPath.normalize(); SLOG << "Loading Settings from: " << SettingsFullPath.string() << std::endl; LoadedSettings.readXML(SettingsFile); } //Apply default settings to any settings that are not defined in loaded settings files applyDefaultSettings(LoadedSettings, false); setSettings(LoadedSettings); }
QFEvaluationPropertyEditor::QFEvaluationPropertyEditor(QFPluginServices* services, ProgramOptions* set, QFEvaluationItem* current, int id, QWidget* parent, Qt::WindowFlags f): QWidget(parent, f) { p=new QFEvaluationPropertyEditorPrivate(this); setAttribute(Qt::WA_DeleteOnClose, true); //std::cout<<"creating QFEvaluationPropertyEditor ... \n"; p->id=id; this->current=NULL; p->services=services; p->layWidgets=NULL; resultsModel=new QFEvaluationResultsModel(this); resultsModel->init(NULL, "*"); rdrModel=new QFProjectRawDataModel(this, NULL); rdrProxy=new QFEvaluationRawDataModelProxy(rdrModel); rdrProxy->setSourceModel(rdrModel); p->lstRawData=NULL; p->splitMain=NULL; p->filesListFiltered=true; resize(400,300); move(5,5); setSettings(set); //std::cout<<"creating QFEvaluationPropertyEditor ... creating widgets ...\n"; p->createWidgets(); resize(400,300); move(5,5); //std::cout<<"creating QFEvaluationPropertyEditor ... setting current ...\n"; setCurrent(current); //std::cout<<"creating QFEvaluationPropertyEditor ... DONE!\n"; readSettings(); }
/*! \brief \param parent */ SettingsDialog::SettingsDialog(QWidget* parent) : QDialog(parent) { setupUi(this); // this sets up GUI ShowTagLibDebug->hide(); //done differently for now, option to log cerr/cout instead #ifndef HAVE_TAGLIB_APEFILE_H apeItemKeysButton->hide(); #endif settings = Global::guiSettings(); // signals/slots mechanism in action connect(ID3v2FramesButton, SIGNAL(clicked()), this, SLOT(editFrameFields())); connect(apeItemKeysButton, SIGNAL(clicked()), this, SLOT(editFrameFields())); connect(mp4KeysButton, SIGNAL(clicked()), this, SLOT(editFrameFields())); connect(asfKeysButton, SIGNAL(clicked()), this, SLOT(editFrameFields())); connect(xiphKeysButton, SIGNAL(clicked()), this, SLOT(editFrameFields())); connect(okButton, SIGNAL(clicked()), this, SLOT(accept())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(fileDialog, SIGNAL(clicked()), this, SLOT(setOutPutDir())); connect(ReplaceFileNameDialogButton, SIGNAL(clicked()), this, SLOT(showRelaceFileNameDialog())); connect(this, SIGNAL(finished(int)), this, SLOT(onFinish(int))); setSettings(); //UseScript->setChecked(false); //UseScript->hide(); }
void ElogConfigurationI::initialize() { fillConfigurations( ); loadSettings( ); setSettings( ); connect( pushButtonSave, SIGNAL( clicked() ), this, SLOT( save() ) ); connect( pushButtonLoad, SIGNAL( clicked() ), this, SLOT( load() ) ); connect( pushButtonClose, SIGNAL( clicked() ), this, SLOT( close() ) ); connect( pushButtonUpdate, SIGNAL( clicked() ), this, SLOT( update() ) ); connect( pushButtonApply, SIGNAL( clicked() ), this, SLOT( apply() ) ); connect( lineEditIPAddress, SIGNAL( textChanged(const QString&) ), this, SLOT( change() ) ); connect( spinBoxPortNumber, SIGNAL( valueChanged(const QString&) ), this, SLOT( change() ) ); connect( lineEditLogbook, SIGNAL( textChanged(const QString&) ), this, SLOT( change() ) ); connect( lineEditUserName, SIGNAL( textChanged(const QString&) ), this, SLOT( change() ) ); connect( lineEditUserPassword, SIGNAL( textChanged(const QString&) ), this, SLOT( change() ) ); connect( lineEditWritePassword, SIGNAL( textChanged(const QString&) ), this, SLOT( change() ) ); connect( checkBoxSubmitAsHTML, SIGNAL( clicked() ), this, SLOT( change() ) ); connect( checkBoxSuppressEmail, SIGNAL( clicked() ), this, SLOT( change() ) ); connect( comboBoxCaptureSize, SIGNAL( activated(int) ), this, SLOT( change() ) ); pushButtonApply->setEnabled(false); if( !_strIPAddress.isEmpty() ) { ElogThreadAttrs* thread = new ElogThreadAttrs(_elog); _elog->entry()->setEnabled(FALSE); thread->doTransmit(); } }
void ElogConfigurationI::load() { QString strConfiguration; QString strGroup; KConfig cfg("kstrc", false, false); int iIndex; strConfiguration = comboBoxConfiguration->currentText( ); iIndex = strConfiguration.find( ' ' ); if( iIndex != -1 ) { strConfiguration = strConfiguration.left( iIndex ); } iIndex = strConfiguration.toInt(); strGroup.sprintf("ELOG%d", iIndex); cfg.setGroup(strGroup); _strIPAddress = cfg.readEntry("IPAddress", ""); _iPortNumber = cfg.readNumEntry("Port", 8080); _strName = cfg.readEntry("Name", ""); _strUserName = cfg.readEntry("UserName", ""); _strUserPassword = cfg.readEntry("UserPassword", ""); _strWritePassword = cfg.readEntry("WritePassword", ""); setSettings(); apply(); }
KstSettingsDlgI::KstSettingsDlgI(QWidget* parent, const char *name, WFlags fl) : KstSettingsDlg(parent, name, fl) { fillAxesSettings(); updateCurveColorSettings(); setSettings(KstSettings::globalSettings()); setClean(); updateAxesButtons(); updateAxesSettings(); updateEMailSettings(); _source->insertStringList(KstDataSource::pluginList()); if (_source->count() > 0) { sourceChanged(_source->text(0)); } else { _configureSource->setEnabled(false); } QString hours = i18n(" hours"); QLineEdit* edit = dynamic_cast<QLineEdit*>(_valueOffset->child("qt_spinbox_edit")); if (edit) { edit->setMaxLength(5 + hours.length()); } _valueOffset->setRange(-24.0, 24.0, 0.50, false); _valueOffset->setSuffix(i18n(" hours")); _colorPalette->_label->setText(i18n("Curve color sequence: ")); connect(_spinBoxLineWidth, SIGNAL(valueChanged(int)), this, SLOT(setDirty())); connect(_spinBoxLineWidth->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty())); connect(_valueOffset->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(updateTimezone(const QString&))); connect(_timer->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty())); connect(_kIntSpinBoxEMailPort->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty())); connect(_colorPalette->_palette, SIGNAL(activated(int)), this, SLOT(setDirty())); connect(_fontSize->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty())); connect(_fontMinSize->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(setDirty())); }
TAnalysisOfAlignment::TAnalysisOfAlignment(TSettings *settings) { cout<<"\n\n\n\n**********************************************************"<<endl; cout<<"**********************************************************"<<endl; cout<<"*********TAnalysisOfClustering::TAnalysisOfAlignment*****"<<endl; cout<<"**********************************************************"<<endl; cout<<"**********************************************************\n\n\n"<<endl; setSettings(settings); UInt_t runNumber=settings->getRunNumber(); sys = gSystem; settings->goToAlignmentRootDir(); eventReader=new TTracking(settings->getSelectionTreeFilePath(),settings->getAlignmentFilePath(),settings->getEtaDistributionPath(),settings); histSaver=new HistogrammSaver(settings); settings->goToAlignmentAnalysisDir(); htmlAlignment=new THTMLAlignment(settings); htmlAlignment->setAlignment(eventReader->getAlignment()); htmlAlignment->setFileGeneratingPath(settings->getAlignmentAnalysisFilePath()); htmlAlignment->createContent(); htmlAlignment->generateHTMLFile(); settings->goToAlignmentAnalysisDir(); sys->cd("anaAlignmnet"); histSaver->SetPlotsPath(settings->getAlignmentAnalysisFilePath()); histSaver->SetRunNumber(runNumber); settings->goToAlignmentRootDir(); initialiseHistos(); cout<<"end initialise"<<endl; settings=0; verbosity=0; }
void FormSetup::setSettings() { QLibrary QInternet_lib; QInternet_lib.setFileName( QMPInternetf+libExt ); if ( QInternet_lib.load() ) { if ( chkQMPInternet( &QInternet_lib ) ) { typedef void (*_setSettings)(const char *,bool,int,int,int); typedef void (*_setQMPConf)(QString); _setSettings setSettings; _setQMPConf setQMPConf; setSettings = (_setSettings) QInternet_lib.resolve( "setSettings" ); setQMPConf = (_setQMPConf) QInternet_lib.resolve( "setQMPConf" ); if ( setSettings && setQMPConf ) { setQMPConf( QMPConf ); setSettings( ui.proxyE->text().toAscii(), ui.proxyB->isChecked(), ui.maxSpdDwnB->value(), ui.maxSpdUplB->value(), ui.buffSizeB->value() ); } } else if ( ui.tabWidget->currentIndex() == 0 && ui.tabWidget_2->currentIndex() == 2 ) QMessageBox::warning( this, "QMPlay", Texts[108] /* Nie mozna zaladowac biblioteki */+ QMPInternetf+libExt + ", " + Texts[29] /**"plik nie jest poprawnym plikiem QMP!"*/); QInternet_lib.unload(); } else if ( ui.tabWidget->currentIndex() == 0 && ui.tabWidget_2->currentIndex() == 2 ) QMessageBox::warning( this, "QMPlay", Texts[108] /* Nie mozna zaladowac biblioteki */+ QMPInternetf+libExt + "\n" + QInternet_lib.errorString() ); }
PreferencesDialog::PreferencesDialog(QWidget *parent) : QDialog(parent), ui(new Ui::PreferencesDialog) { ui->setupUi(this); setSettings( &g_workflow_settings ); }
void FilmGrainSettings::readSettings(KConfigGroup& group) { FilmGrainContainer prm; FilmGrainContainer defaultPrm = defaultSettings(); prm.grainSize = group.readEntry(d->configGrainSizeEntry, defaultPrm.grainSize); prm.photoDistribution = group.readEntry(d->configPhotoDistributionEntry, defaultPrm.photoDistribution); prm.addLuminanceNoise = group.readEntry(d->configAddLumNoiseEntry, defaultPrm.addLuminanceNoise); prm.lumaIntensity = group.readEntry(d->configIntensityLumAdjustmentEntry, defaultPrm.lumaIntensity); prm.lumaShadows = group.readEntry(d->configShadowsLumAdjustmentEntry, defaultPrm.lumaShadows); prm.lumaMidtones = group.readEntry(d->configMidtonesLumAdjustmentEntry, defaultPrm.lumaMidtones); prm.lumaHighlights = group.readEntry(d->configHighlightsLumAdjustmentEntry, defaultPrm.lumaHighlights); prm.addChrominanceBlueNoise = group.readEntry(d->configAddChromaBlueNoiseEntry, defaultPrm.addChrominanceBlueNoise); prm.chromaBlueIntensity = group.readEntry(d->configIntensityChromaBlueAdjustmentEntry, defaultPrm.chromaBlueIntensity); prm.chromaBlueShadows = group.readEntry(d->configShadowsChromaBlueAdjustmentEntry, defaultPrm.chromaBlueShadows); prm.chromaBlueMidtones = group.readEntry(d->configMidtonesChromaBlueAdjustmentEntry, defaultPrm.chromaBlueMidtones); prm.chromaBlueHighlights = group.readEntry(d->configHighlightsChromaBlueAdjustmentEntry, defaultPrm.chromaBlueHighlights); prm.addChrominanceRedNoise = group.readEntry(d->configAddChromaRedNoiseEntry, defaultPrm.addChrominanceRedNoise); prm.chromaRedIntensity = group.readEntry(d->configIntensityChromaRedAdjustmentEntry, defaultPrm.chromaRedIntensity); prm.chromaRedShadows = group.readEntry(d->configShadowsChromaRedAdjustmentEntry, defaultPrm.chromaRedShadows); prm.chromaRedMidtones = group.readEntry(d->configMidtonesChromaRedAdjustmentEntry, defaultPrm.chromaRedMidtones); prm.chromaRedHighlights = group.readEntry(d->configHighlightsChromaRedAdjustmentEntry, defaultPrm.chromaRedHighlights); setSettings(prm); }
void Application::showSettings() { SettingsWizard wizard(activeWindow()); wizard.setSettings(settings()); if (wizard.exec()) setSettings(wizard.settings()); }
TableVisualization::TableVisualization(QWidget *parent) : AbstractTableVisualization(parent) { setSettings(settings); itemSearchedIndex = 0; }
void OsmAnd::RasterizerEnvironment_P::setSettings(const QHash< QString, QString >& newSettings) { QHash< std::shared_ptr<const MapStyleValueDefinition>, MapStyleValue > resolvedSettings; resolvedSettings.reserve(newSettings.size()); for(const auto& itSetting : rangeOf(newSettings)) { const auto& name = itSetting.key(); const auto& value = itSetting.value(); // Resolve input-value definition by name std::shared_ptr<const MapStyleValueDefinition> inputValueDef; if(!owner->style->resolveValueDefinition(name, inputValueDef)) { LogPrintf(LogSeverityLevel::Warning, "Setting of '%s' to '%s' impossible: failed to resolve input value definition failed with such name"); continue; } // Parse value MapStyleValue parsedValue; if(!owner->style->_p->parseValue(inputValueDef, value, parsedValue)) { LogPrintf(LogSeverityLevel::Warning, "Setting of '%s' to '%s' impossible: failed to parse value"); continue; } resolvedSettings.insert(inputValueDef, parsedValue); } setSettings(resolvedSettings); }
/*! \fn OptionsDialog::reset() */ void OptionsDialog::reset() { if(QMessageBox::question(this, tr("Reset"), tr("Are you sure to reset Juicer?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QSettings lokalSettings; lokalSettings.clear(); setSettings(); } }
Panel::Panel(QWidget *parent): QTabWidget(parent) { setTabPosition(QTabWidget::West); addTab(createPlotTab(this), "Plot"); addTab(createCanvasTab(this), "Canvas"); addTab(createCurveTab(this), "Curve"); setSettings(Settings()); connect(d_numPoints, SIGNAL(valueChanged(int)), SLOT(edited()) ); connect(d_updateInterval, SIGNAL(valueChanged(int)), SLOT(edited()) ); connect(d_curveWidth, SIGNAL(valueChanged(int)), SLOT(edited()) ); connect(d_paintCache, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_paintOnScreen, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_immediatePaint, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_curveAntialiasing, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_curveClipping, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_lineSplitting, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_curveFilled, SIGNAL(stateChanged(int)), SLOT(edited()) ); connect(d_updateType, SIGNAL(currentIndexChanged(int)), SLOT(edited()) ); connect(d_gridStyle, SIGNAL(currentIndexChanged(int)), SLOT(edited()) ); connect(d_curveType, SIGNAL(currentIndexChanged(int)), SLOT(edited()) ); connect(d_curvePen, SIGNAL(currentIndexChanged(int)), SLOT(edited()) ); }
Plot::Plot( QWidget *parent ): QwtPlot( parent ), d_interval( 10.0 ), // seconds d_timerId( -1 ) { // Assign a title setTitle( "Testing Refresh Rates" ); setCanvasBackground( Qt::white ); alignScales(); // Insert grid d_grid = new QwtPlotGrid(); d_grid->attach( this ); // Insert curve d_curve = new QwtPlotCurve( "Data Moving Right" ); d_curve->setPen( QPen( Qt::black ) ); d_curve->setData( new CircularBuffer( d_interval, 10 ) ); d_curve->attach( this ); // Axis setAxisTitle( QwtPlot::xBottom, "Seconds" ); setAxisScale( QwtPlot::xBottom, -d_interval, 0.0 ); setAxisTitle( QwtPlot::yLeft, "Values" ); setAxisScale( QwtPlot::yLeft, -1.0, 1.0 ); d_clock.start(); setSettings( d_settings ); }
NaoCamera::NaoCamera(const char* device, CameraInfo::Camera camera, int width, int height, bool flip, const CameraSettings::CameraSettingsCollection& settings, const Matrix5uc& autoExposureWeightTable) : camera(camera), WIDTH(width), HEIGHT(height) { VERIFY((fd = open(device, O_RDWR | O_NONBLOCK)) != -1); mapBuffers(); queueBuffers(); setImageFormat(); setFrameRate(1, 30); checkSettingsAvailability(); specialSettings.horizontalFlip.value = flip ? 1 : 0; setControlSetting(specialSettings.horizontalFlip); specialSettings.verticalFlip.value = flip ? 1 : 0; setControlSetting(specialSettings.verticalFlip); setSettings(settings, autoExposureWeightTable); writeCameraSettings(); readCameraSettings(); startCapturing(); }
void SimpleCodeStylePreferencesWidget::setPreferences(ICodeStylePreferences *preferences) { if (m_preferences == preferences) return; // nothing changes // cleanup old if (m_preferences) { disconnect(m_preferences, SIGNAL(currentSettingsChanged(TextEditor::TabSettings)), m_tabSettingsWidget, SLOT(setSettings(TextEditor::TabSettings))); disconnect(m_preferences, SIGNAL(currentPreferencesChanged(TextEditor::ICodeStylePreferences*)), this, SLOT(slotCurrentPreferencesChanged(TextEditor::ICodeStylePreferences*))); disconnect(m_tabSettingsWidget, SIGNAL(settingsChanged(TextEditor::TabSettings)), this, SLOT(slotTabSettingsChanged(TextEditor::TabSettings))); } m_preferences = preferences; // fillup new if (m_preferences) { slotCurrentPreferencesChanged(m_preferences->currentPreferences()); m_tabSettingsWidget->setTabSettings(m_preferences->currentTabSettings()); connect(m_preferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)), m_tabSettingsWidget, SLOT(setTabSettings(TextEditor::TabSettings))); connect(m_preferences, SIGNAL(currentPreferencesChanged(TextEditor::ICodeStylePreferences*)), this, SLOT(slotCurrentPreferencesChanged(TextEditor::ICodeStylePreferences*))); connect(m_tabSettingsWidget, SIGNAL(settingsChanged(TextEditor::TabSettings)), this, SLOT(slotTabSettingsChanged(TextEditor::TabSettings))); } m_tabSettingsWidget->setEnabled(m_preferences); }
void MixerSettings::readSettings(KConfigGroup& group) { MixerContainer prm; MixerContainer defaultPrm = defaultSettings(); prm.bMonochrome = group.readEntry(d->configMonochromeEntry, defaultPrm.bMonochrome); prm.bPreserveLum = group.readEntry(d->configPreserveLuminosityEntry, defaultPrm.bPreserveLum); prm.redRedGain = group.readEntry(d->configRedRedGainEntry, defaultPrm.redRedGain); prm.redGreenGain = group.readEntry(d->configRedGreenGainEntry, defaultPrm.redGreenGain); prm.redBlueGain = group.readEntry(d->configRedBlueGainEntry, defaultPrm.redBlueGain); prm.greenRedGain = group.readEntry(d->configGreenRedGainEntry, defaultPrm.greenRedGain); prm.greenGreenGain = group.readEntry(d->configGreenGreenGainEntry, defaultPrm.greenGreenGain); prm.greenBlueGain = group.readEntry(d->configGreenBlueGainEntry, defaultPrm.greenBlueGain); prm.blueRedGain = group.readEntry(d->configBlueRedGainEntry, defaultPrm.blueRedGain); prm.blueGreenGain = group.readEntry(d->configBlueGreenGainEntry, defaultPrm.blueGreenGain); prm.blueBlueGain = group.readEntry(d->configBlueBlueGainEntry, defaultPrm.blueBlueGain); prm.blackRedGain = group.readEntry(d->configBlackRedGainEntry, defaultPrm.blackRedGain); prm.blackGreenGain = group.readEntry(d->configBlackGreenGainEntry, defaultPrm.blackGreenGain); prm.blackBlueGain = group.readEntry(d->configBlackBlueGainEntry, defaultPrm.blackBlueGain); setSettings(prm); }
void KstSettingsDlgI::defaults() { KstSettings s; setSettings(&s); setDirty(); }
void DatapickerImage::initSceneParameters() { setRotationAngle(0.0); setminSegmentLength(30); setPointSeparation(30); ReferencePoints axisPoints = d->axisPoints; axisPoints.ternaryScale = 1; axisPoints.type = DatapickerImage::Cartesian; setAxisPoints(axisPoints); EditorSettings settings; settings.foregroundThresholdHigh = 90; settings.foregroundThresholdLow = 30; settings.hueThresholdHigh = 360; settings.hueThresholdLow = 0; settings.intensityThresholdHigh = 100; settings.intensityThresholdLow = 20; settings.saturationThresholdHigh = 100; settings.saturationThresholdLow = 30; settings.valueThresholdHigh = 90; settings.valueThresholdLow = 30; setSettings(settings); DatapickerImage::PointsType plotPointsType = DatapickerImage::AxisPoints; setPlotPointsType(plotPointsType); }
void KisPaintOpPreset::fromXML(const QDomElement& presetElt) { setName(presetElt.attribute("name")); QString paintopid = presetElt.attribute("paintopid"); if (paintopid.isEmpty()) { dbgImage << "No paintopid attribute"; setValid(false); return; } if (KisPaintOpRegistry::instance()->get(paintopid) == 0) { dbgImage << "No paintop " << paintopid; setValid(false); return; } KoID id(paintopid); KisPaintOpSettingsSP settings = KisPaintOpRegistry::instance()->settings(id, 0); if (!settings) { setValid(false); qWarning() << "Could not load settings for preset" << paintopid; return; } settings->fromXML(presetElt); setSettings(settings); }
QDacTypeDialog::QDacTypeDialog(QWidget *parent) : QDialog(parent) { ui.setupUi(this); DacAnalyzerSettings settings; setSettings(settings.dacTypeSettings()); }
RawProcessingFilter::RawProcessingFilter(DImg* orgImage, QObject* parent, const DRawDecoding& settings, const QString& name) : DImgThreadedFilter(orgImage, parent, name), m_observer(0) { setSettings(settings); initFilter(); }
FrameGdk::FrameGdk(Page* page, RenderPart* renderPart, FrameGdkClient* client) : Frame(page, renderPart) { d->m_extension = new BrowserExtensionGdk(this); Settings* settings = new Settings; settings->setAutoLoadImages(true); setSettings(settings); }
RawProcessingFilter::RawProcessingFilter(const DRawDecoding& settings, DImgThreadedFilter* master, const DImg& orgImage, const DImg& destImage, int progressBegin, int progressEnd, const QString& name) : DImgThreadedFilter(master, orgImage, destImage, progressBegin, progressEnd, name), m_observer(0) { setSettings(settings); filterImage(); }
//Detector::Detector(Mat &frame, int camnum, float exposure, int f_height, int f_width) Detector::Detector(int camnum, float exposure, int f_height, int f_width) { this->f_height = f_height; this->f_width = f_width; this->exposure = exposure; this->frame = Mat::zeros(f_height, f_width, CV_8SC3); mask = Mat::zeros(f_height, f_width, CV_8UC1); double color_dist_th = 15; int blocksize = f_width / VISION_NUM_RAYS; int offset = 1 * blocksize; m_rangeFinder = new RangeFinder(f_height, f_width, blocksize, color_dist_th, offset); /* // -------------- Background segmentation using k-means -------------- k_blur = Size(3,3); // morphology cross3 = getStructuringElement(MORPH_CROSS, Size(3,3)); normalize = false; // initialize background patterns if (normalize) { double dist_th = 0.03; bg_tile = new BGPattern(n_color_tiles[0], n_color_tiles[1], n_color_tiles[2], dist_th, f_height, f_width); bg_grass = new BGPattern(n_color_grass[0], n_color_grass[1], n_color_grass[2], dist_th, f_height, f_width); bg_wood = new BGPattern(n_color_wood[0], n_color_wood[1], n_color_wood[2], dist_th, f_height, f_width); bg_obstacle = new BGPattern(n_color_obstacle[0], n_color_obstacle[1], n_color_obstacle[2], dist_th, f_height, f_width); } else { double dist_th = 30; bg_tile = new BGPattern(color_tiles[0], color_tiles[1], color_tiles[2], dist_th, f_height, f_width); bg_grass = new BGPattern(color_grass[0], color_grass[1], color_grass[2], dist_th, f_height, f_width); bg_wood = new BGPattern(color_wood[0], color_wood[1], color_wood[2], dist_th, f_height, f_width); bg_obstacle = new BGPattern(color_obstacle[0], color_obstacle[1], color_obstacle[2], dist_th, f_height, f_width); } // cout << *bg_tile << endl; // patterns.push_back(bg_tile); // patterns.push_back(bg_grass); // patterns.push_back(bg_wood); // patterns.push_back(bg_obstacle); */ cap = VideoCapture(camnum); // open the default camera if (!cap.isOpened()) // check if we succeeded { cout << "no camera" << endl; } else { setSettings(); //printSettings(); } }
CaptureDialog::CaptureDialog(CaptureContext *ctx, OnCaptureMethod captureCallback, OnInjectMethod injectCallback, QWidget *parent) : QFrame(parent), ui(new Ui::CaptureDialog), m_Ctx(ctx) { ui->setupUi(this); // setup FlowLayout for options group { QLayout *oldLayout = ui->optionsGroup->layout(); QObjectList options = ui->optionsGroup->children(); options.removeOne((QObject *)oldLayout); delete oldLayout; FlowLayout *optionsFlow = new FlowLayout(ui->optionsGroup, -1, 3, 3); optionsFlow->setFixedGrid(true); for(QObject *o : options) optionsFlow->addWidget(qobject_cast<QWidget *>(o)); ui->optionsGroup->setLayout(optionsFlow); } ui->envVar->setEnabled(false); m_ProcessModel = new QStandardItemModel(0, 3, this); m_ProcessModel->setHeaderData(0, Qt::Horizontal, tr("Name")); m_ProcessModel->setHeaderData(1, Qt::Horizontal, tr("PID")); m_ProcessModel->setHeaderData(2, Qt::Horizontal, tr("Window Title")); QSortFilterProxyModel *proxy = new QSortFilterProxyModel(this); proxy->setSourceModel(m_ProcessModel); // filter on all columns proxy->setFilterKeyColumn(-1); // allow updating the underlying model proxy->setDynamicSortFilter(true); ui->processList->setModel(proxy); ui->processList->setAlternatingRowColors(true); // sort by PID by default ui->processList->sortByColumn(1, Qt::AscendingOrder); // TODO Vulkan Layer ui->vulkanLayerWarn->setVisible(false); m_CaptureCallback = captureCallback; m_InjectCallback = injectCallback; setSettings(CaptureSettings()); updateGlobalHook(); }