summaryrefslogtreecommitdiffabout
path: root/libkdepim/kdateedit.cpp
authorzautrix <zautrix>2005-04-14 17:48:58 (UTC)
committer zautrix <zautrix>2005-04-14 17:48:58 (UTC)
commitbbdca90c599aaea557d31552c6bc33fc15e397cd (patch) (side-by-side diff)
treee41b5eb16239664d2217e5436db61610099b60ef /libkdepim/kdateedit.cpp
parent5ea16ef9058a21016402dd5affc0a7f82857e606 (diff)
downloadkdepimpi-bbdca90c599aaea557d31552c6bc33fc15e397cd.zip
kdepimpi-bbdca90c599aaea557d31552c6bc33fc15e397cd.tar.gz
kdepimpi-bbdca90c599aaea557d31552c6bc33fc15e397cd.tar.bz2
today added
Diffstat (limited to 'libkdepim/kdateedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kdateedit.cpp9
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 )
mDateButton->setPixmap(pixmap);
+ QPixmap pixmap2 = SmallIcon("today_small");
+ QPushButton* nowButton = new QPushButton(this);
+ nowButton->setPixmap(pixmap2);
@@ -84,2 +87,3 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
+ connect(nowButton,SIGNAL(clicked()),SLOT(goToNow()));
mDateButton->setFocusPolicy( QWidget::NoFocus );
@@ -134,2 +138,7 @@ void KDateEdit::clear()
}
+void KDateEdit::goToNow()
+{
+ setDate(QDate::currentDate() );
+ emit setTimeTo( QTime::currentTime() );
+}
void KDateEdit::setDate(QDate newDate)