diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-06-19 15:42:05 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-20 15:41:50 -0700 |
commit | 70c8bbcc915c31e850bdaf350bf913c4508e5a6a (patch) | |
tree | 175973b986fc0cf952effffa35a78cfde1b529d0 /qt-ui/simplewidgets.h | |
parent | 1fc22c665310bb37258aacb3d5e6863f52f5662d (diff) | |
download | subsurface-70c8bbcc915c31e850bdaf350bf913c4508e5a6a.tar.gz |
Added the calendar widget to change the calendar date.
Added a popup widget to change the calendar date, just like
the old QDateTimeEdit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.h')
-rw-r--r-- | qt-ui/simplewidgets.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h index ba8a23360..3600f59b7 100644 --- a/qt-ui/simplewidgets.h +++ b/qt-ui/simplewidgets.h @@ -88,18 +88,23 @@ private: time_t dcImageEpoch; }; +class QCalendarWidget; + class DateWidget : public QWidget { Q_OBJECT public: DateWidget(QWidget *parent = 0); - void setDate(const QDate& date); QDate date() const; +public slots: + void setDate(const QDate& date); protected: void paintEvent(QPaintEvent *event); - + void mousePressEvent(QMouseEvent *event); +signals: + void dateChanged(const QDate& date); private: QDate mDate; - + QCalendarWidget *calendarWidget; }; bool isGnome3Session(); |