diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/settings/StudySettingsDialog.h |
Diffstat (limited to 'src/settings/StudySettingsDialog.h')
-rw-r--r-- | src/settings/StudySettingsDialog.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/settings/StudySettingsDialog.h b/src/settings/StudySettingsDialog.h new file mode 100644 index 0000000..121767b --- /dev/null +++ b/src/settings/StudySettingsDialog.h @@ -0,0 +1,45 @@ +#ifndef STUDYSETTINGSDIALOG_H +#define STUDYSETTINGSDIALOG_H + +#include "../study/StudySettings.h" + +#include <QtWidgets> + +class StudySettingsDialog : public QDialog +{ + Q_OBJECT + +public: + StudySettingsDialog(QWidget *parent = 0); + const StudySettings getSettings(); + +private: + void initData(); + void createUi(); + void updateControls(); + void addUpperGridLine(QGridLayout* layout, int row, const QString& label, QWidget* widget, + const QString& unitLabel = ""); + void addLimitsGridLine(QGridLayout* layout, int row, const QString& label, QWidget* widget); + QSpinBox* createSpinBox(int min, int max); + void createButtonBox(); + void createControls(); + QBoxLayout* createMainLayout(); + QGridLayout*createUpperLayout(); + QGroupBox* createLimitsGroup(); + +private slots: + void dialogButtonClicked( QAbstractButton* aButton ); + +private: + StudySettings settings; + QSpinBox* dayShiftBox; + QCheckBox* showRandomlyCB; + QSpinBox* newCardsShareBox; + QSpinBox* randomnessBox; + QSpinBox* cardsDayLimitBox; + QSpinBox* newCardsDayLimitBox; + QSpinBox* limitForAddingNewCardsBox; + QDialogButtonBox* buttonBox; +}; + +#endif |