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>
This commit is contained in:
Tomaz Canabrava 2014-06-19 15:42:05 -03:00 committed by Dirk Hohndel
parent 1fc22c6653
commit 70c8bbcc91
2 changed files with 25 additions and 5 deletions

View file

@ -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();