本文整理汇总了C++中setSettings函数的典型用法代码示例。如果您正苦于以下问题:C++ setSettings函数的具体用法?C++ setSettings怎么用?C++ setSettings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setSettings函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
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();
}
示例2: f
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));
}
}
示例3: SettingsFullPath
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);
}
示例4: QWidget
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();
}
示例5: QDialog
/*!
\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();
}
示例6: fillConfigurations
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();
}
}
示例7: cfg
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();
}
示例8: KstSettingsDlg
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()));
}
示例9: setSettings
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;
}
示例10: void
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() );
}
示例11: QDialog
PreferencesDialog::PreferencesDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::PreferencesDialog)
{
ui->setupUi(this);
setSettings( &g_workflow_settings );
}
示例12: defaultSettings
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);
}
示例13: wizard
void Application::showSettings()
{
SettingsWizard wizard(activeWindow());
wizard.setSettings(settings());
if (wizard.exec())
setSettings(wizard.settings());
}
示例14: AbstractTableVisualization
TableVisualization::TableVisualization(QWidget *parent)
: AbstractTableVisualization(parent)
{
setSettings(settings);
itemSearchedIndex = 0;
}
示例15: LogPrintf
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);
}