Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ORecurranceWidget Class Reference

Widget of selecting Recurrance. More...

#include </home/clem/local/src/opie/noncore/unsupported/libopie/orecurrancewidget.h>

Collaboration diagram for ORecurranceWidget:

Collaboration graph
[legend]
List of all members.

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)

Public Member Functions

 ORecurranceWidget (bool startOnMonday, const QDate &start, QWidget *parent=0, const char *name=0, bool modal=TRUE, WFlags fl=0)
 ORecurranceWidget (bool startOnMonday, const ORecur &rp, const QDate &start, QWidget *parent=0, const char *name=0, bool modal=TRUE, WFlags=0)
 ~ORecurranceWidget ()
ORecur recurrence () const
QDate endDate () const

Private Types

enum  repeatButtons {
  None, Day, Week, Month,
  Year
}

Private Slots

void setupRepeatLabel (const QString &)
void setupRepeatLabel (int)
void slotWeekLabel ()
void slotMonthLabel (int)
void slotChangeStartOfWeek (bool onMonday)

Private Member Functions

void setupNone ()
void setupDaily ()
void setupWeekly ()
void setupMonthly ()
void setupYearly ()
void init ()
void hideExtras ()
void showRepeatStuff ()

Private Attributes

QList< QToolButton > listRTypeButtons
QList< QToolButton > listExtra
QDate start
QDate end
repeatButtons currInterval
bool startWeekOnMonday: 1
DateBookMonthrepeatPicker
Private * d

Detailed Description

Widget of selecting Recurrance.

A widget to let the user select rules for recurrences. This widget can take care of weekly, monthly, daily and yearly recurrence It is used inside todolist and datebook.

Author:
Trolltech, Holger Freyther
Version:
0.9

Definition at line 32 of file orecurrancewidget.h.


Member Enumeration Documentation

enum ORecurranceWidget::repeatButtons [private]
 

Enumeration values:
None 
Day 
Week 
Month 
Year 

Definition at line 75 of file orecurrancewidget.h.


Constructor & Destructor Documentation

ORecurranceWidget::ORecurranceWidget bool  startOnMonday,
const QDate newStart,
QWidget *  parent = 0,
const char *  name = 0,
bool  modal = TRUE,
WFlags  fl = 0
 

Constructs the Widget

Parameters:
startOnMonday Does the week start on monday
newStart The start date of the recurrence
parent The parent widget
name the name of object
modal if the dialog should be modal
fl Additional window flags

Definition at line 53 of file orecurrancewidget.cpp.

References currInterval, fillStrings(), init(), QString::isEmpty(), setupNone(), strDayTemplate, and TRUE.

ORecurranceWidget::ORecurranceWidget bool  startOnMonday,
const ORecur rp,
const QDate startDate,
QWidget *  parent = 0,
const char *  name = 0,
bool  modal = TRUE,
WFlags  fl = 0
 

Different constructor

Parameters:
startOnMonday Does the week start on monday?
rp Already set ORecur object
startDate The start date
parent The parent widget
name The name of the object
modal 
fl The flags for window

Definition at line 83 of file orecurrancewidget.cpp.

References fillStrings(), init(), QString::isEmpty(), setRecurrence(), and strDayTemplate.

ORecurranceWidget::~ORecurranceWidget  ) 
 

Definition at line 99 of file orecurrancewidget.cpp.


Member Function Documentation

QDate ORecurranceWidget::endDate  )  const
 

Return the end date of the recurrence. This is only valid if the recurrence rule does contain an enddate

Definition at line 246 of file orecurrancewidget.cpp.

References end.

void ORecurranceWidget::endDateChanged int  ,
int  ,
int 
[slot]
 

set the new end date

Definition at line 273 of file orecurrancewidget.cpp.

References end, repeatPicker, DateBookMonth::setDate(), QDate::setYMD(), TimeString::shortDate(), and start.

Referenced by init().

void ORecurranceWidget::hideExtras  )  [private]
 

Definition at line 574 of file orecurrancewidget.cpp.

References FALSE, and listExtra.

Referenced by setupDaily(), setupMonthly(), setupNone(), and setupYearly().

void ORecurranceWidget::init  )  [private]
 

Definition at line 546 of file orecurrancewidget.cpp.

References endDateChanged(), listExtra, listRTypeButtons, qApp, repeatPicker, slotChangeStartOfWeek(), and TRUE.

Referenced by ORecurranceWidget().

ORecur ORecurranceWidget::recurrence  )  const
 

the user selected recurrence rule.

Returns:
The recurrence rule.

Definition at line 184 of file orecurrancewidget.cpp.

References ORecur::Daily, Day, ORecur::hasEndDate(), i, listExtra, listRTypeButtons, Month, ORecur::MonthlyDate, ORecur::MonthlyDay, None, ORecur::NoRepeat, ORecur::setDays(), ORecur::setEndDate(), ORecur::setFrequency(), ORecur::setHasEndDate(), ORecur::setPosition(), ORecur::setType(), start, startWeekOnMonday, Event::SUN, week(), Week, ORecur::Weekly, Year, and ORecur::Yearly.

Referenced by setStartDate().

void ORecurranceWidget::setRecurrence const ORecur rp  )  [slot]
 

set the recurrence

Parameters:
rp The ORecur object with the new recurrence rules

Definition at line 113 of file orecurrancewidget.cpp.

References setRecurrence(), and start.

void ORecurranceWidget::setRecurrence const ORecur rp,
const QDate date
[slot]
 

overloaded method taking ORecur and a new start date

Parameters:
rp Recurrence rule
date The new start date

Definition at line 122 of file orecurrancewidget.cpp.

References currInterval, ORecur::Daily, Day, ORecur::days(), end, ORecur::endDate(), ORecur::frequency(), ORecur::hasEndDate(), Month, ORecur::MonthlyDate, ORecur::MonthlyDay, None, ORecur::NoRepeat, setupDaily(), setupMonthly(), setupNone(), setupWeekly(), setupYearly(), TimeString::shortDate(), slotMonthLabel(), slotWeekLabel(), start, startWeekOnMonday, tr, TRUE, ORecur::type(), Week, ORecur::Weekly, Year, and ORecur::Yearly.

Referenced by ORecurranceWidget(), setRecurrence(), and setStartDate().

void ORecurranceWidget::setStartDate const QDate date  )  [slot]
 

set the start date

Parameters:
date the new start date

Definition at line 106 of file orecurrancewidget.cpp.

References recurrence(), and setRecurrence().

void ORecurranceWidget::setupDaily  )  [private]
 

Definition at line 454 of file orecurrancewidget.cpp.

References hideExtras(), setupRepeatLabel(), showRepeatStuff(), strDayTemplate, and tr.

Referenced by setRecurrence(), and slotSetRType().

void ORecurranceWidget::setupMonthly  )  [private]
 

Definition at line 516 of file orecurrancewidget.cpp.

References hideExtras(), setupRepeatLabel(), showRepeatStuff(), tr, and TRUE.

Referenced by setRecurrence(), and slotSetRType().

void ORecurranceWidget::setupNone  )  [private]
 

Definition at line 441 of file orecurrancewidget.cpp.

References hideExtras(), and tr.

Referenced by ORecurranceWidget(), setRecurrence(), and slotSetRType().

void ORecurranceWidget::setupRepeatLabel int   )  [private, slot]
 

Definition at line 293 of file orecurrancewidget.cpp.

References currInterval, Day, QString::isNull(), Month, None, tr, Week, and Year.

void ORecurranceWidget::setupRepeatLabel const QString  )  [private, slot]
 

Definition at line 290 of file orecurrancewidget.cpp.

Referenced by setupDaily(), setupMonthly(), setupWeekly(), and setupYearly().

void ORecurranceWidget::setupWeekly  )  [private]
 

Definition at line 464 of file orecurrancewidget.cpp.

References QDate::dayOfWeek(), FALSE, setupRepeatLabel(), showRepeatStuff(), start, startWeekOnMonday, and tr.

Referenced by setRecurrence(), slotChangeStartOfWeek(), and slotSetRType().

void ORecurranceWidget::setupYearly  )  [private]
 

Definition at line 532 of file orecurrancewidget.cpp.

References QString::arg(), QDate::day(), hideExtras(), QDate::month(), QDate::monthName(), numberPlacing(), setupRepeatLabel(), showRepeatStuff(), start, strYearTemplate, and tr.

Referenced by setRecurrence(), and slotSetRType().

void ORecurranceWidget::showRepeatStuff  )  [private]
 

Definition at line 584 of file orecurrancewidget.cpp.

References tr.

Referenced by setupDaily(), setupMonthly(), setupWeekly(), and setupYearly().

void ORecurranceWidget::slotChangeStartOfWeek bool  onMonday  )  [private, slot]
 

Definition at line 404 of file orecurrancewidget.cpp.

References listExtra, setupWeekly(), slotWeekLabel(), startWeekOnMonday, and ORecur::SUN.

Referenced by init().

void ORecurranceWidget::slotMonthLabel int   )  [private, slot]
 

Definition at line 393 of file orecurrancewidget.cpp.

References QString::arg(), currInterval, QDate::day(), dayLabel, QDate::dayOfWeek(), Month, numberPlacing(), start, str, strMonthDateTemplate, strMonthDayTemplate, and week().

Referenced by setRecurrence(), and slotSetRType().

void ORecurranceWidget::slotNoEnd bool  unused  )  [slot]
 

enable/disable end date

Definition at line 280 of file orecurrancewidget.cpp.

References end, QDate::setYMD(), TimeString::shortDate(), start, and tr.

void ORecurranceWidget::slotSetRType int   )  [slot]
 

Definition at line 249 of file orecurrancewidget.cpp.

References currInterval, Day, Month, None, setupDaily(), setupMonthly(), setupNone(), setupWeekly(), setupYearly(), slotMonthLabel(), slotWeekLabel(), TRUE, Week, and Year.

void ORecurranceWidget::slotWeekLabel  )  [private, slot]
 

Definition at line 333 of file orecurrancewidget.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::count(), currInterval, dayLabel, QDate::dayOfWeek(), QValueList< T >::end(), FALSE, i, QString::isNull(), list, listExtra, QString::prepend(), start, startWeekOnMonday, str, tr, TRUE, and Week.

Referenced by setRecurrence(), slotChangeStartOfWeek(), and slotSetRType().


Member Data Documentation

repeatButtons ORecurranceWidget::currInterval [private]
 

Definition at line 84 of file orecurrancewidget.h.

Referenced by ORecurranceWidget(), setRecurrence(), setupRepeatLabel(), slotMonthLabel(), slotSetRType(), and slotWeekLabel().

Private* ORecurranceWidget::d [private]
 

Definition at line 88 of file orecurrancewidget.h.

QDate ORecurranceWidget::end [private]
 

Definition at line 83 of file orecurrancewidget.h.

Referenced by endDate(), endDateChanged(), setRecurrence(), and slotNoEnd().

QList<QToolButton> ORecurranceWidget::listExtra [private]
 

Definition at line 81 of file orecurrancewidget.h.

Referenced by hideExtras(), init(), recurrence(), slotChangeStartOfWeek(), and slotWeekLabel().

QList<QToolButton> ORecurranceWidget::listRTypeButtons [private]
 

Definition at line 80 of file orecurrancewidget.h.

Referenced by init(), and recurrence().

DateBookMonth* ORecurranceWidget::repeatPicker [private]
 

Definition at line 86 of file orecurrancewidget.h.

Referenced by endDateChanged(), and init().

QDate ORecurranceWidget::start [private]
 

Definition at line 82 of file orecurrancewidget.h.

Referenced by endDateChanged(), recurrence(), setRecurrence(), setupWeekly(), setupYearly(), slotMonthLabel(), slotNoEnd(), and slotWeekLabel().

bool ORecurranceWidget::startWeekOnMonday [private]
 

Definition at line 85 of file orecurrancewidget.h.

Referenced by recurrence(), setRecurrence(), setupWeekly(), slotChangeStartOfWeek(), and slotWeekLabel().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:43:32 2005 for OPIE by  doxygen 1.4.2