Mercurial > minori
diff include/gui/widgets/optional_date.h @ 51:75c804f713b2
window: add about window,
*: use tr() when applicable (useful for i18n)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 25 Sep 2023 20:29:26 -0400 |
parents | d8eb763e6661 |
children | 3d2decf093bb |
line wrap: on
line diff
--- a/include/gui/widgets/optional_date.h Mon Sep 25 13:50:56 2023 -0400 +++ b/include/gui/widgets/optional_date.h Mon Sep 25 20:29:26 2023 -0400 @@ -1,21 +1,29 @@ #ifndef __gui__widgets__optional_date_h #define __gui__widgets__optional_date_h #include <QWidget> +#include "core/date.h" class QCheckBox; class QDateEdit; class QDate; class OptionalDate : public QWidget { + Q_OBJECT + public: OptionalDate(QWidget* parent = nullptr); OptionalDate(bool enabled, QWidget* parent = nullptr); QDateEdit* GetDateEdit(); QCheckBox* GetCheckBox(); void SetDate(QDate date); + void SetDate(Date date); + Date GetDate(); void SetEnabled(bool enabled); bool IsEnabled(); + signals: + void DataChanged(bool checked, Date date); + private: QDateEdit* _dateedit; QCheckBox* _checkbox;