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) (unidiff)
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
@@ -66,5 +66,5 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name )
66void AddresseeView::setSource(const QString& n) 66void AddresseeView::setSource(const QString& n)
67{ 67{
68 qDebug("********AddresseeView::setSource %s", n.latin1()); 68 //qDebug("********AddresseeView::setSource %s", n.latin1());
69 69
70 if ( n.left( 6 ) == "mailto" ) 70 if ( n.left( 6 ) == "mailto" )
@@ -125,5 +125,11 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
125 } 125 }
126 } 126 }
127 127 if ( mAddressee.birthday().date().isValid() ) {
128 dynamicPart += QString(
129 "<tr><td align=\"right\"><b>%1</b></td>"
130 "<td align=\"left\">%2</td></tr>" )
131 .arg( i18n ("Birthday") )
132 .arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) );
133 }
128 KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); 134 KABC::PhoneNumber::List phones = mAddressee.phoneNumbers();
129 KABC::PhoneNumber::List::ConstIterator phoneIt; 135 KABC::PhoneNumber::List::ConstIterator phoneIt;
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index 5fb948a..c4c0081 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -125,5 +125,11 @@ KDateEdit::~KDateEdit()
125 delete mDateFrame; 125 delete mDateFrame;
126} 126}
127 127void KDateEdit::clear()
128{
129 bool b = mDateEdit->signalsBlocked();
130 mDateEdit->blockSignals(true);
131 mDateEdit->setText("");
132 mDateEdit->blockSignals(b);
133}
128void KDateEdit::setDate(QDate newDate) 134void KDateEdit::setDate(QDate newDate)
129{ 135{
@@ -464,6 +470,5 @@ bool KDateEdit::eventFilter(QObject *, QEvent *e)
464 else if (e->type() == QEvent::MouseButtonDblClick) 470 else if (e->type() == QEvent::MouseButtonDblClick)
465 { 471 {
466 dateFormShort = dateFormShort?false:true; 472 toggleDateFormat();
467 mDateEdit->setText(KGlobal::locale()->formatDate(readDate(),dateFormShort));
468 } 473 }
469 else if (e->type() == QEvent::FocusIn) 474 else if (e->type() == QEvent::FocusIn)
@@ -474,4 +479,10 @@ bool KDateEdit::eventFilter(QObject *, QEvent *e)
474 return false; 479 return false;
475} 480}
481void KDateEdit::toggleDateFormat()
482{
483 dateFormShort = ! dateFormShort;
484 mDateEdit->setText(KGlobal::locale()->formatDate(readDate(),dateFormShort));
485
486}
476 487
477void KDateEdit::textChanged(const QString &) 488void KDateEdit::textChanged(const QString &)
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 742d843..cf3b90a 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -79,5 +79,6 @@ class KDateEdit : public QHBox
79 */ 79 */
80 virtual bool eventFilter(QObject *o, QEvent *e); 80 virtual bool eventFilter(QObject *o, QEvent *e);
81 81 void toggleDateFormat();
82 void clear();
82 signals: 83 signals:
83 /** This signal is emitted whenever the user modifies the date. This 84 /** This signal is emitted whenever the user modifies the date. This