diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/gui/widgets/optional_date.h	Mon Sep 25 00:43:38 2023 -0400
@@ -0,0 +1,24 @@
+#ifndef __gui__widgets__optional_date_h
+#define __gui__widgets__optional_date_h
+#include <QWidget>
+
+class QCheckBox;
+class QDateEdit;
+class QDate;
+
+class OptionalDate : public QWidget {
+	public:
+		OptionalDate(QWidget* parent = nullptr);
+		OptionalDate(bool enabled, QWidget* parent = nullptr);
+		QDateEdit* GetDateEdit();
+		QCheckBox* GetCheckBox();
+		void SetDate(QDate date);
+		void SetEnabled(bool enabled);
+		bool IsEnabled();
+
+	private:
+		QDateEdit* _dateedit;
+		QCheckBox* _checkbox;
+};
+
+#endif // __gui__widgets__optional_date_h