Mercurial > minori
annotate include/gui/widgets/optional_date.h @ 83:d02fdf1d6708
*: huuuge update
1. make the now playing page function correctly
2. de-constructorfy many of our custom widgets,
allowing them to be changed on-the-fly from
the Now Playing page
3. ... :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 24 Oct 2023 22:01:02 -0400 |
parents | 3d2decf093bb |
children | c69230dc2b5d |
rev | line source |
---|---|
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
1 #ifndef __gui__widgets__optional_date_h |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
2 #define __gui__widgets__optional_date_h |
63 | 3 #include "core/date.h" |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
4 #include <QWidget> |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
5 |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
6 class QCheckBox; |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
7 class QDateEdit; |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
8 class QDate; |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
9 |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
10 class OptionalDate : public QWidget { |
63 | 11 Q_OBJECT |
51 | 12 |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
13 public: |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
14 OptionalDate(QWidget* parent = nullptr); |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
15 OptionalDate(bool enabled, QWidget* parent = nullptr); |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
16 QDateEdit* GetDateEdit(); |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
17 QCheckBox* GetCheckBox(); |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
18 void SetDate(QDate date); |
51 | 19 void SetDate(Date date); |
20 Date GetDate(); | |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
21 void SetEnabled(bool enabled); |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
22 bool IsEnabled(); |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
23 |
51 | 24 signals: |
25 void DataChanged(bool checked, Date date); | |
26 | |
47
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
27 private: |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
28 QDateEdit* _dateedit; |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
29 QCheckBox* _checkbox; |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
30 }; |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
31 |
d8eb763e6661
information.cpp: add widgets to the list tab, and add an
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
32 #endif // __gui__widgets__optional_date_h |