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

OPimRecurrenceWidget Class Reference

Widget of selecting Recurrance. More...

#include </home/clem/local/src/opie/libopie2/opiepim/ui/opimrecurrencewidget.h>

Collaboration diagram for OPimRecurrenceWidget:

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 Opie::OPimRecurrence &recur, const QDate &start)
void setRecurrence (const Opie::OPimRecurrence &recur)

Public Member Functions

 OPimRecurrenceWidget (bool startOnMonday, const QDate &start, QWidget *parent=0, const char *name=0, bool modal=TRUE, WFlags fl=0)
 OPimRecurrenceWidget (bool startOnMonday, const Opie::OPimRecurrence &rp, const QDate &start, QWidget *parent=0, const char *name=0, bool modal=TRUE, WFlags=0)
 ~OPimRecurrenceWidget ()
Opie::OPimRecurrence 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 30 of file opimrecurrencewidget.h.


Member Enumeration Documentation

enum OPimRecurrenceWidget::repeatButtons [private]
 

Enumeration values:
None 
Day 
Week 
Month 
Year 

Definition at line 73 of file opimrecurrencewidget.h.


Constructor & Destructor Documentation

OPimRecurrenceWidget::OPimRecurrenceWidget 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 57 of file opimrecurrencewidget.cpp.

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

OPimRecurrenceWidget::OPimRecurrenceWidget bool  startOnMonday,
const Opie::OPimRecurrence 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 OPimRecurrence object
startDate The start date
parent The parent widget
name The name of the object
modal 
fl The flags for window

Definition at line 87 of file opimrecurrencewidget.cpp.

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

OPimRecurrenceWidget::~OPimRecurrenceWidget  ) 
 

Definition at line 103 of file opimrecurrencewidget.cpp.


Member Function Documentation

QDate OPimRecurrenceWidget::endDate  )  const
 

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

Definition at line 250 of file opimrecurrencewidget.cpp.

References end.

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

set the new end date

Definition at line 277 of file opimrecurrencewidget.cpp.

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

Referenced by init().

void OPimRecurrenceWidget::hideExtras  )  [private]
 

Definition at line 578 of file opimrecurrencewidget.cpp.

References FALSE, and listExtra.

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

void OPimRecurrenceWidget::init  )  [private]
 

Definition at line 550 of file opimrecurrencewidget.cpp.

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

Referenced by OPimRecurrenceWidget().

OPimRecurrence OPimRecurrenceWidget::recurrence  )  const
 

the user selected recurrence rule.

Returns:
The recurrence rule.

Definition at line 188 of file opimrecurrencewidget.cpp.

References Day, Opie::OPimRecurrence::hasEndDate(), i, listExtra, listRTypeButtons, Month, None, Opie::OPimRecurrence::setDays(), Opie::OPimRecurrence::setEndDate(), Opie::OPimRecurrence::setFrequency(), Opie::OPimRecurrence::setHasEndDate(), Opie::OPimRecurrence::setPosition(), Opie::OPimRecurrence::setType(), start, startWeekOnMonday, Event::SUN, week(), Week, and Year.

Referenced by setStartDate(), and OTaskEditor::todo().

void OPimRecurrenceWidget::setRecurrence const Opie::OPimRecurrence rp  )  [slot]
 

set the recurrence

Parameters:
rp The OPimRecurrence object with the new recurrence rules

Definition at line 117 of file opimrecurrencewidget.cpp.

References setRecurrence(), and start.

void OPimRecurrenceWidget::setRecurrence const Opie::OPimRecurrence rp,
const QDate date
[slot]
 

overloaded method taking OPimRecurrence and a new start date

Parameters:
rp Recurrence rule
date The new start date

Definition at line 126 of file opimrecurrencewidget.cpp.

References currInterval, Day, Opie::OPimRecurrence::days(), end, Opie::OPimRecurrence::endDate(), Opie::OPimRecurrence::frequency(), Opie::OPimRecurrence::hasEndDate(), Month, None, setupDaily(), setupMonthly(), setupNone(), setupWeekly(), setupYearly(), TimeString::shortDate(), slotMonthLabel(), slotWeekLabel(), start, startWeekOnMonday, tr, TRUE, Opie::OPimRecurrence::type(), Week, and Year.

Referenced by OTaskEditor::load(), OPimRecurrenceWidget(), setRecurrence(), and setStartDate().

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

set the start date

Parameters:
date the new start date

Definition at line 110 of file opimrecurrencewidget.cpp.

References recurrence(), and setRecurrence().

void OPimRecurrenceWidget::setupDaily  )  [private]
 

Definition at line 458 of file opimrecurrencewidget.cpp.

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

Referenced by setRecurrence(), and slotSetRType().

void OPimRecurrenceWidget::setupMonthly  )  [private]
 

Definition at line 520 of file opimrecurrencewidget.cpp.

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

Referenced by setRecurrence(), and slotSetRType().

void OPimRecurrenceWidget::setupNone  )  [private]
 

Definition at line 445 of file opimrecurrencewidget.cpp.

References hideExtras(), and tr.

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

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

Definition at line 297 of file opimrecurrencewidget.cpp.

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

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

Definition at line 294 of file opimrecurrencewidget.cpp.

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

void OPimRecurrenceWidget::setupWeekly  )  [private]
 

Definition at line 468 of file opimrecurrencewidget.cpp.

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

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

void OPimRecurrenceWidget::setupYearly  )  [private]
 

Definition at line 536 of file opimrecurrencewidget.cpp.

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

Referenced by setRecurrence(), and slotSetRType().

void OPimRecurrenceWidget::showRepeatStuff  )  [private]
 

Definition at line 588 of file opimrecurrencewidget.cpp.

References tr.

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

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

Definition at line 408 of file opimrecurrencewidget.cpp.

References listExtra, setupWeekly(), slotWeekLabel(), and startWeekOnMonday.

Referenced by init().

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

Definition at line 397 of file opimrecurrencewidget.cpp.

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

Referenced by setRecurrence(), and slotSetRType().

void OPimRecurrenceWidget::slotNoEnd bool  unused  )  [slot]
 

enable/disable end date

Definition at line 284 of file opimrecurrencewidget.cpp.

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

void OPimRecurrenceWidget::slotSetRType int   )  [slot]
 

Definition at line 253 of file opimrecurrencewidget.cpp.

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

void OPimRecurrenceWidget::slotWeekLabel  )  [private, slot]
 

Definition at line 337 of file opimrecurrencewidget.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 OPimRecurrenceWidget::currInterval [private]
 

Definition at line 82 of file opimrecurrencewidget.h.

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

Private* OPimRecurrenceWidget::d [private]
 

Definition at line 86 of file opimrecurrencewidget.h.

QDate OPimRecurrenceWidget::end [private]
 

Definition at line 81 of file opimrecurrencewidget.h.

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

QList<QToolButton> OPimRecurrenceWidget::listExtra [private]
 

Definition at line 79 of file opimrecurrencewidget.h.

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

QList<QToolButton> OPimRecurrenceWidget::listRTypeButtons [private]
 

Definition at line 78 of file opimrecurrencewidget.h.

Referenced by init(), and recurrence().

DateBookMonth* OPimRecurrenceWidget::repeatPicker [private]
 

Definition at line 84 of file opimrecurrencewidget.h.

Referenced by endDateChanged(), and init().

QDate OPimRecurrenceWidget::start [private]
 

Definition at line 80 of file opimrecurrencewidget.h.

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

bool OPimRecurrenceWidget::startWeekOnMonday [private]
 

Definition at line 83 of file opimrecurrencewidget.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:16 2005 for OPIE by  doxygen 1.4.2