-rw-r--r-- | libkdepim/kdateedit.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index 3d9e690..bf38479 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp | |||
@@ -70,2 +70,5 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) | |||
70 | mDateButton->setPixmap(pixmap); | 70 | mDateButton->setPixmap(pixmap); |
71 | QPixmap pixmap2 = SmallIcon("today_small"); | ||
72 | QPushButton* nowButton = new QPushButton(this); | ||
73 | nowButton->setPixmap(pixmap2); | ||
71 | 74 | ||
@@ -84,2 +87,3 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) | |||
84 | connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); | 87 | connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); |
88 | connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); | ||
85 | mDateButton->setFocusPolicy( QWidget::NoFocus ); | 89 | mDateButton->setFocusPolicy( QWidget::NoFocus ); |
@@ -134,2 +138,7 @@ void KDateEdit::clear() | |||
134 | } | 138 | } |
139 | void KDateEdit::goToNow() | ||
140 | { | ||
141 | setDate(QDate::currentDate() ); | ||
142 | emit setTimeTo( QTime::currentTime() ); | ||
143 | } | ||
135 | void KDateEdit::setDate(QDate newDate) | 144 | void KDateEdit::setDate(QDate newDate) |