Skip to content

Commit

Permalink
Refs #7853. Move more auto-saving to auto-saver.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Feb 13, 2014
1 parent a7e27b7 commit a4040bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 39 deletions.
Expand Up @@ -119,12 +119,6 @@ public slots:
WidgetAutoSaver m_autoSaver;

private slots:
/// Save the settings for rebin steps and validate the entry.
void runOptionStepSizeText();

/// Save the settings for rebin variables and validate the entry.
void runBinBoundaries();

/// Open the Muon Analysis Settings help (Wiki).
void muonAnalysisHelpSettingsClicked();

Expand Down
Expand Up @@ -56,6 +56,11 @@ MuonAnalysisOptionTab::MuonAnalysisOptionTab(Ui::MuonAnalysis &uiForm, const QSt
m_autoSaver.registerWidget(m_uiForm.yAxisMaximumInput, "yAxisFinish", "");
m_autoSaver.registerWidget(m_uiForm.showErrorBars, "errorBars", 0);
m_autoSaver.endGroup();
m_autoSaver.beginGroup("BinningOptions");
m_autoSaver.registerWidget(m_uiForm.optionStepSizeText, "rebinFixed", "1");
m_autoSaver.registerWidget(m_uiForm.binBoundaries, "rebinVariable", "1");
m_autoSaver.endGroup();

m_autoSaver.beginGroup("SettingOptions");
m_autoSaver.registerWidget(m_uiForm.plotCreation, "plotCreation", 0);
m_autoSaver.registerWidget(m_uiForm.hideToolbars, "toolbars", 1);
Expand Down Expand Up @@ -83,11 +88,6 @@ void MuonAnalysisOptionTab::initLayout()
connect(m_uiForm.yAxisAutoscale, SIGNAL(toggled(bool)), this,
SLOT(runyAxisAutoscale(bool)));

////////////// Data Binning slots ///////////////
connect(m_uiForm.rebinComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(runRebinComboBox(int)));
connect(m_uiForm.optionStepSizeText, SIGNAL(returnPressed()), this, SLOT(runOptionStepSizeText()));
connect(m_uiForm.binBoundaries, SIGNAL(returnPressed()), this, SLOT(runBinBoundaries()));

////////////// Auto-update plot style //////////////
connect(m_uiForm.connectPlotType, SIGNAL(currentIndexChanged(int)), this, SIGNAL(plotStyleChanged()));
connect(m_uiForm.showErrorBars, SIGNAL(clicked()), this, SIGNAL(plotStyleChanged()));
Expand All @@ -99,7 +99,10 @@ void MuonAnalysisOptionTab::initLayout()
connect(m_uiForm.timeComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.timeAxisStartAtInput, SIGNAL(returnPressed ()), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.timeAxisFinishAtInput, SIGNAL(returnPressed ()), this, SIGNAL(settingsTabUpdatePlot()));

connect(m_uiForm.rebinComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.optionStepSizeText, SIGNAL(returnPressed()), this, SIGNAL(settingsTabUpdatePlot()));
connect(m_uiForm.binBoundaries, SIGNAL(returnPressed()), this, SIGNAL(settingsTabUpdatePlot()));

// Manage User Directories
connect(m_uiForm.manageDirectoriesBtn, SIGNAL(clicked()), this, SLOT(openDirectoryDialog() ) );
}
Expand Down Expand Up @@ -141,33 +144,6 @@ void MuonAnalysisOptionTab::runRebinComboBox(int index)
emit settingsTabUpdatePlot();
}


/**
* When clicking Rebin step size text box (slot)
*/
void MuonAnalysisOptionTab::runOptionStepSizeText()
{
QSettings group;
group.beginGroup(m_settingsGroup + "BinningOptions");
group.setValue("constStepSize", m_uiForm.optionStepSizeText->text());

emit settingsTabUpdatePlot();
}


/**
*
*/
void MuonAnalysisOptionTab::runBinBoundaries()
{
QSettings group;
group.beginGroup(m_settingsGroup + "BinningOptions");
group.setValue("rebinVariable", m_uiForm.binBoundaries->text());

emit settingsTabUpdatePlot();
}


////////////// Default Plot Style slots ///////////////

/**
Expand Down

0 comments on commit a4040bd

Please sign in to comment.