Skip to content
Snippets Groups Projects
Commit 2b378a91 authored by Oliver Bock's avatar Oliver Bock
Browse files

Added persistent preset selection

parent 82d46602
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,8 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
// restore source presets
m_presets = new PresetModel();
ui.cmbSource->setModel(m_presets);
ui.cmbSource->setCurrentIndex(settings.value("currentPreset", 0).toInt());
// For Bruce: set initial values for iota and psi
ui.sliderSourceIota->setValue(146);
......@@ -138,10 +140,19 @@ void PulsatingScience::closeEvent(QCloseEvent *event)
settings.setValue("windowState", saveState());
settings.setValue("splitterSizes", ui.splitter->saveState());
settings.setValue("currentPreset", ui.cmbSource->currentIndex());
event->accept();
}
}
void PulsatingScience::on_cmbSource_currentIndexChanged(int index)
{
ui.lblSource->setText(m_presets->preset(index).getDescription());
// TODO: change source
}
void PulsatingScience::on_chkLHO_clicked(bool checked)
{
ui.pulsarGlWidget->setLHOState(checked);
......
......@@ -39,6 +39,7 @@ public:
void closeEvent(QCloseEvent *event);
public slots:
void on_cmbSource_currentIndexChanged(int index);
void on_chkLHO_clicked(bool checked);
void on_chkLLO_clicked(bool checked);
void on_chkVirgo_clicked(bool checked);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment