Mercurial > minori
comparison include/gui/widgets/optional_date.h @ 47:d8eb763e6661
information.cpp: add widgets to the list tab, and add an
"optional date" widget like taiga has so users can specify whether to
set the date or not
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Mon, 25 Sep 2023 00:43:38 -0400 |
| parents | |
| children | 75c804f713b2 |
comparison
equal
deleted
inserted
replaced
| 46:d0adc4aedfc8 | 47:d8eb763e6661 |
|---|---|
| 1 #ifndef __gui__widgets__optional_date_h | |
| 2 #define __gui__widgets__optional_date_h | |
| 3 #include <QWidget> | |
| 4 | |
| 5 class QCheckBox; | |
| 6 class QDateEdit; | |
| 7 class QDate; | |
| 8 | |
| 9 class OptionalDate : public QWidget { | |
| 10 public: | |
| 11 OptionalDate(QWidget* parent = nullptr); | |
| 12 OptionalDate(bool enabled, QWidget* parent = nullptr); | |
| 13 QDateEdit* GetDateEdit(); | |
| 14 QCheckBox* GetCheckBox(); | |
| 15 void SetDate(QDate date); | |
| 16 void SetEnabled(bool enabled); | |
| 17 bool IsEnabled(); | |
| 18 | |
| 19 private: | |
| 20 QDateEdit* _dateedit; | |
| 21 QCheckBox* _checkbox; | |
| 22 }; | |
| 23 | |
| 24 #endif // __gui__widgets__optional_date_h |
