From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- src/settings/StudySettingsDialog.h | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/settings/StudySettingsDialog.h (limited to 'src/settings/StudySettingsDialog.h') 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 + +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 -- cgit