author | zecke <zecke> | 2003-04-13 16:57:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-04-13 16:57:28 (UTC) |
commit | 0b311079ff19798866291034663757103c6ba935 (patch) (side-by-side diff) | |
tree | 70ddccf3a3147475050fa06cc2d807a71ab1d5ee /libopie/orecurrancewidget.cpp | |
parent | 1537ccb435ca725c793db6e94e0b9e83484b57e7 (diff) | |
download | opie-0b311079ff19798866291034663757103c6ba935.zip opie-0b311079ff19798866291034663757103c6ba935.tar.gz opie-0b311079ff19798866291034663757103c6ba935.tar.bz2 |
Jumbo API documentation update
and some API fixed
ColorDialog is now OColorDialog!!! keep the namespace tidy!
ColorPopupMenu is now OColorPopupMenu!!! keep the namespace tidy
ColorDialog TT couldn't break bc we can so make it const QColor&
OTimePicker add some convience methods
more I might have forgot
Diffstat (limited to 'libopie/orecurrancewidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/orecurrancewidget.cpp | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index db86184..471249d 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp @@ -25,9 +25,17 @@ const QString dayLabel[] = { QObject::tr("Monday"), static QString numberPlacing( int x ); // return the proper word format for // x (1st, 2nd, etc) static int week( const QDate &dt ); // what week in the month is dt? - +/** + * Constructs the Widget + * @param startOnMonday Does the week start on monday + * @param newStart The start date of the recurrence + * @param parent The parent widget + * @param name the name of object + * @param modal if the dialog should be modal + * @param fl Additional window flags + */ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, const QDate& newStart, QWidget* parent, const char* name, @@ -42,8 +50,19 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, fraType->setButton( currInterval ); chkNoEnd->setChecked( TRUE ); setupNone(); } + +/** + * Different constructor + * @param startOnMonday Does the week start on monday? + * @param rp Already set ORecur object + * @param startDate The start date + * @param parent The parent widget + * @param name The name of the object + * @param modal + * @param fl The flags for window + */ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, const ORecur& rp, const QDate& startDate, QWidget* parent, const char* name, bool modal, WFlags fl) @@ -58,15 +77,30 @@ ORecurranceWidget::ORecurranceWidget( bool startOnMonday, } ORecurranceWidget::~ORecurranceWidget() { } + +/** + * set the start date + * @param date the new start date + */ void ORecurranceWidget::setStartDate( const QDate& date ) { qWarning("ORecurranceWidget::setStartDate"); setRecurrence( recurrence(), date ); } +/** + * set the recurrence + * @param rp The ORecur object with the new recurrence rules + */ void ORecurranceWidget::setRecurrence( const ORecur& rp ) { setRecurrence( rp, start ); } + +/** + * overloaded method taking ORecur and a new start date + * @param rp Recurrence rule + * @param date The new start date + */ void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { start = date; end = rp.endDate(); switch ( rp.type() ) { @@ -122,8 +156,13 @@ void ORecurranceWidget::setRecurrence( const ORecur& rp, const QDate& date ) { chkNoEnd->setChecked( TRUE ); } else cmdEnd->setText( TimeString::shortDate( end ) ); } + +/** + * the user selected recurrence rule. + * @return The recurrence rule. + */ ORecur ORecurranceWidget::recurrence()const { QListIterator<QToolButton> it( listRTypeButtons ); QListIterator<QToolButton> itExtra( listExtra ); ORecur rpTmp; @@ -179,8 +218,13 @@ ORecur ORecurranceWidget::recurrence()const { // timestamp it... // rpTmp.setCreateTime( ); current DateTime is already set -zecke return rpTmp; } + +/** + * Return the end date of the recurrence. This is only + * valid if the recurrence rule does contain an enddate + */ QDate ORecurranceWidget::endDate()const { return end; } void ORecurranceWidget::slotSetRType(int rtype) { |