summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2004-09-13 21:35:12 (UTC)
committer zautrix <zautrix>2004-09-13 21:35:12 (UTC)
commitbd6b4acb39498ffea3beea7d9b5f7620b60c14db (patch) (side-by-side diff)
treee2d7425b7bb49fbcb7acb5ced497ac1fed06dfaf /libkdepim
parent06eabf6e82c0390699d11fd12580d91261829431 (diff)
downloadkdepimpi-bd6b4acb39498ffea3beea7d9b5f7620b60c14db.zip
kdepimpi-bd6b4acb39498ffea3beea7d9b5f7620b60c14db.tar.gz
kdepimpi-bd6b4acb39498ffea3beea7d9b5f7620b60c14db.tar.bz2
Many bugfixes
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/addresseeview.cpp10
-rw-r--r--libkdepim/kdateedit.cpp17
-rw-r--r--libkdepim/kdateedit.h3
3 files changed, 24 insertions, 6 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp
index d710541..5c69010 100644
--- a/libkdepim/addresseeview.cpp
+++ b/libkdepim/addresseeview.cpp
@@ -67,3 +67,3 @@ void AddresseeView::setSource(const QString& n)
{
- qDebug("********AddresseeView::setSource %s", n.latin1());
+ //qDebug("********AddresseeView::setSource %s", n.latin1());
@@ -126,3 +126,9 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
}
-
+ if ( mAddressee.birthday().date().isValid() ) {
+ dynamicPart += QString(
+ "<tr><td align=\"right\"><b>%1</b></td>"
+ "<td align=\"left\">%2</td></tr>" )
+ .arg( i18n ("Birthday") )
+ .arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) );
+ }
KABC::PhoneNumber::List phones = mAddressee.phoneNumbers();
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index 5fb948a..c4c0081 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -126,3 +126,9 @@ KDateEdit::~KDateEdit()
}
-
+void KDateEdit::clear()
+{
+ bool b = mDateEdit->signalsBlocked();
+ mDateEdit->blockSignals(true);
+ mDateEdit->setText("");
+ mDateEdit->blockSignals(b);
+}
void KDateEdit::setDate(QDate newDate)
@@ -465,4 +471,3 @@ bool KDateEdit::eventFilter(QObject *, QEvent *e)
{
- dateFormShort = dateFormShort?false:true;
- mDateEdit->setText(KGlobal::locale()->formatDate(readDate(),dateFormShort));
+ toggleDateFormat();
}
@@ -475,2 +480,8 @@ bool KDateEdit::eventFilter(QObject *, QEvent *e)
}
+void KDateEdit::toggleDateFormat()
+{
+ dateFormShort = ! dateFormShort;
+ mDateEdit->setText(KGlobal::locale()->formatDate(readDate(),dateFormShort));
+
+}
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 742d843..cf3b90a 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -80,3 +80,4 @@ class KDateEdit : public QHBox
virtual bool eventFilter(QObject *o, QEvent *e);
-
+ void toggleDateFormat();
+ void clear();
signals: