-rw-r--r-- | libopie/libopie.pro | 6 | ||||
-rw-r--r-- | libopie/orecurrancewidget.cpp | 20 | ||||
-rw-r--r-- | libopie/orecurrancewidget.h | 6 |
3 files changed, 27 insertions, 5 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro index b7537cc..2e76cb1 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro @@ -31,8 +31,11 @@ HEADERS = ofontmenu.h \ pim/opimxrefpartner.h \ pim/opimxref.h \ pim/opimxrefmanager.h \ pim/opimmaintainer.h \ + pim/opimnotify.h \ + pim/opimnotifymanager.h \ + pim/opimmainwindow.h \ orecurrancewidget.h \ oticker.h # pim/otodoaccesssql.h \ @@ -62,8 +65,11 @@ SOURCES = ofontmenu.cc \ pim/opimxrefpartner.cpp \ pim/opimxref.cpp \ pim/opimxrefmanager.cpp \ pim/opimmaintainer.cpp \ + pim/opimnotify.cpp \ + pim/opimnotifymanager.cpp \ + pim/opimmainwindow.cpp \ orecurrancewidget.cpp \ oticker.cpp # pim/otodoaccesssql.cpp \ diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index 53cee65..0484ab9 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp @@ -53,8 +53,23 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, startWeekOnMonday( startOnMonday ) { // do some stuff with the repeat pattern init(); + setRecurrence( rp ); +} + +ORecurranceWidget::~ORecurranceWidget() { +} +void ORecurranceWidget::setStartDate( const QDate& date ) { + qWarning("ORecurranceWidget::setStartDate"); + setRecurrence( recurrence(), date ); +} +void ORecurranceWidget::setRecurrence( const ORecur& rp ) { + setRecurrence( rp, start ); +} +void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { + start = date; + end = rp.endDate(); switch ( rp.type() ) { default: case ORecur::NoRepeat: currInterval = None; @@ -107,12 +122,9 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, chkNoEnd->setChecked( TRUE ); } else cmdEnd->setText( TimeString::shortDate( end ) ); } -ORecurranceWidget::~ORecurranceWidget() { - -} -ORecur ORecurranceWidget::recurrance()const { +ORecur ORecurranceWidget::recurrence()const { QListIterator<QToolButton> it( listRTypeButtons ); QListIterator<QToolButton> itExtra( listExtra ); ORecur rpTmp; int i; diff --git a/libopie/orecurrancewidget.h b/libopie/orecurrancewidget.h index f2d7f87..4a8dd08 100644 --- a/libopie/orecurrancewidget.h +++ b/libopie/orecurrancewidget.h @@ -15,8 +15,9 @@ #include "orecurrancebase.h" #include <opie/orecur.h> +// FIXME spelling!!!! -zecke class ORecurranceWidget : public ORecurranceBase { Q_OBJECT public: ORecurranceWidget( bool startOnMonday, @@ -27,15 +28,18 @@ public: const ORecur& rp, const QDate& start, QWidget* parent = 0, const char* name =0, bool modal = TRUE, WFlags = 0 ); ~ORecurranceWidget(); - ORecur recurrance()const; + ORecur recurrence()const; QDate endDate()const; public slots: void slotSetRType( int ); void endDateChanged( int, int, int ); void slotNoEnd( bool unused ); + void setStartDate( const QDate& ); + void setRecurrence( const ORecur& recur, const QDate& start ); + void setRecurrence( const ORecur& recur ); private slots: void setupRepeatLabel( const QString& ); void setupRepeatLabel( int ); |