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

DateBook Class Reference

#include </home/clem/local/src/opie/core/pim/datebook/datebook.h>

Collaboration diagram for DateBook:

Collaboration graph
[legend]
List of all members.

Public Slots

void flush ()
void reload ()

Signals

void newEvent ()
void signalNotFound ()
void signalWrapAround ()

Public Member Functions

 DateBook (QWidget *parent=0, const char *name=0, WFlags f=0)
 ~DateBook ()

Static Public Member Functions

static QString appName ()

Protected Member Functions

QDate currentDate ()
void timerEvent (QTimerEvent *e)
void closeEvent (QCloseEvent *e)
void view (int v, const QDate &d)

Private Slots

void fileNew ()
void slotNewEntry (const QDateTime &start, const QDateTime &end, const QString &str, const QString &location=0)
void slotSettings ()
void slotToday ()
void changeClock (bool newClock)
void changeWeek (bool newDay)
void appMessage (const QCString &msg, const QByteArray &data)
void slotNewEventFromKey (const QString &str)
void slotFind ()
void slotDoFind (const QString &, const QDate &, bool, bool, int)
void viewDefault (const QDate &d)
void viewDay ()
void viewWeek ()
void viewWeekLst ()
void viewMonth ()
void showDay (int y, int m, int d)
void insertEvent (const Event &e)
void editEvent (const Event &e)
void duplicateEvent (const Event &e)
void removeEvent (const Event &e)
void receive (const QCString &msg, const QByteArray &data)
void setDocument (const QString &)
void beamEvent (const Event &e)
void beamDone (Ir *ir)

Private Member Functions

void addEvent (const Event &e)
void initDay ()
void initWeek ()
void initWeekLst ()
void initMonth ()
void loadSettings ()
void saveSettings ()
QString checkEvent (const Event &)

Private Attributes

DateBookDBHolidaydb
DateBookHolidaydb_holiday
QWidgetStack * views
DateBookDaydayView
DateBookWeekweekView
ODateBookMonthmonthView
DateBookWeekLstweekLstView
QAction * dayAction
QAction * weekAction
QAction * weekLstAction
QAction * monthAction
int weeklistviewconfig
bool aPreset
int presetTime
int startTime
int rowStyle
int defaultView
QArray< int > defaultCategories
QString defaultLocation
bool bJumpToCurTime
bool ampm
bool onMonday
bool syncing
bool inSearch
int alarmCounter

Constructor & Destructor Documentation

DateBook::DateBook QWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0
 

Definition at line 76 of file datebook.cpp.

References appMessage(), changeClock(), changeWeek(), channel, DAY, dayAction, dayView, db, DateBookDBHoliday::db_holiday, db_holiday, defaultView, QTime::elapsed(), FALSE, fileNew(), flush(), g, Opie::Core::OResource::loadPixmap(), loadSettings(), MONTH, monthAction, monthView, QString::null, odebug, oendl, qApp, receive(), reload(), slotFind(), slotSettings(), slotToday(), Opie::Core::OResource::SmallIcon, QTime::start(), t, tr, TRUE, viewDay(), viewMonth(), views, viewWeek(), viewWeekLst(), WEEK, weekAction, WEEKLST, weekLstAction, weekLstView, and weekView.

DateBook::~DateBook  ) 
 

Definition at line 253 of file datebook.cpp.

References db_holiday.


Member Function Documentation

void DateBook::addEvent const Event e  )  [private]
 

Definition at line 532 of file datebook.cpp.

References d, dayView, initDay(), and DateBookDay::setDate().

Referenced by initWeekLst().

void DateBook::appMessage const QCString msg,
const QByteArray data
[private, slot]
 

Definition at line 666 of file datebook.cpp.

References QDateTime::addSecs(), alarmCounter, ampm, QValueList< T >::begin(), QValueList< T >::count(), QDateTime::currentDateTime(), TimeString::dateString(), dayView, db, editEvent(), QValueList< T >::end(), DateBookDBHack::eventByUID(), QPEApplication::execDialog(), FALSE, DateBookDBHoliday::getEffectiveEvents(), IO_ReadOnly, list, monthView, QString::number(), qApp, QPEApplication::setKeepRunning(), Event::Silent, Sound::soundAlarm(), stream, QDateTime::time(), tr, TRUE, view(), viewDay(), viewDefault(), viewMonth(), views, viewWeek(), viewWeekLst(), weekLstView, and weekView.

Referenced by DateBook().

static QString DateBook::appName  )  [inline, static]
 

Definition at line 55 of file datebook.h.

References QString::fromLatin1().

void DateBook::beamDone Ir ir  )  [private, slot]
 

Definition at line 951 of file datebook.cpp.

References beamfile.

Referenced by beamEvent().

void DateBook::beamEvent const Event e  )  [private, slot]
 

Definition at line 939 of file datebook.cpp.

References beamDone(), beamfile, description(), odebug, oendl, Ir::send(), and Event::writeVCalendar().

Referenced by initDay(), and initWeekLst().

void DateBook::changeClock bool  newClock  )  [private, slot]
 

Definition at line 798 of file datebook.cpp.

References ampm, dayView, DateBookDay::redraw(), weekLstView, and weekView.

Referenced by DateBook().

void DateBook::changeWeek bool  newDay  )  [private, slot]
 

Definition at line 807 of file datebook.cpp.

References onMonday.

Referenced by DateBook().

QString DateBook::checkEvent const Event  )  [private]
 

Definition at line 325 of file datebook.cpp.

References QDate::addDays(), QDateTime::date(), Event::end(), FALSE, i, nextOccurance(), QString::null, Event::start(), tr, and TRUE.

Referenced by duplicateEvent(), editEvent(), and slotNewEntry().

void DateBook::closeEvent QCloseEvent *  e  )  [protected]
 

Definition at line 820 of file datebook.cpp.

References db, Escape, DateBookDB::save(), saveSettings(), syncing, and tr.

QDate DateBook::currentDate  )  [protected]
 

Definition at line 353 of file datebook.cpp.

References QDate::currentDate(), d, DateBookWeekLst::date(), DateBookWeek::date(), DateBookDay::date(), dayView, monthView, ODateBookMonth::selectedDate(), views, weekLstView, and weekView.

Referenced by initWeek(), slotFind(), viewDay(), viewMonth(), viewWeek(), and viewWeekLst().

void DateBook::duplicateEvent const Event e  )  [private, slot]
 

Definition at line 429 of file datebook.cpp.

References DateBookDB::addEvent(), ampm, checkEvent(), Event::RepeatPattern::createTime, db, error(), QPEApplication::execDialog(), FALSE, QString::isNull(), newEvent(), NULL, onMonday, syncing, tr, TRUE, Qtopia::Record::uid(), and warning().

Referenced by initDay(), and initWeekLst().

void DateBook::editEvent const Event e  )  [private, slot]
 

Definition at line 478 of file datebook.cpp.

References ampm, checkEvent(), db, Event::description(), DateBookDB::editEvent(), error(), QPEApplication::execDialog(), FALSE, QString::isNull(), newEvent(), Event::notes(), onMonday, Qtopia::Record::setUid(), syncing, tr, TRUE, Qtopia::Record::uid(), and warning().

Referenced by appMessage(), initDay(), initWeekLst(), and receive().

void DateBook::fileNew  )  [private, slot]
 

Definition at line 320 of file datebook.cpp.

References slotNewEventFromKey().

Referenced by DateBook(), and initDay().

void DateBook::flush  )  [slot]
 

Definition at line 782 of file datebook.cpp.

References db, DateBookDB::save(), syncing, and TRUE.

Referenced by DateBook().

void DateBook::initDay  )  [private]
 

Definition at line 545 of file datebook.cpp.

References ampm, beamEvent(), bJumpToCurTime, DAY, dayView, db, db_holiday, duplicateEvent(), editEvent(), fileNew(), newEvent(), onMonday, redraw(), removeEvent(), rowStyle, DateBookDay::setJumpToCurTime(), DateBookDay::setRowStyle(), DateBookDay::setStartViewTime(), slotNewEventFromKey(), startTime, and views.

Referenced by addEvent(), and view().

void DateBook::initMonth  )  [private]
 

Definition at line 606 of file datebook.cpp.

References db, FALSE, MONTH, monthView, newEvent(), qApp, redraw(), showDay(), and views.

Referenced by view().

void DateBook::initWeek  )  [private]
 

Definition at line 563 of file datebook.cpp.

References QDate::addDays(), ampm, calcWeek(), currentDate(), d, db, newEvent(), onMonday, redraw(), DateBookWeek::setStartViewTime(), showDay(), startTime, views, WEEK, and weekView.

Referenced by view().

void DateBook::initWeekLst  )  [private]
 

Definition at line 588 of file datebook.cpp.

References addEvent(), ampm, beamEvent(), db, duplicateEvent(), editEvent(), newEvent(), onMonday, redraw(), removeEvent(), showDay(), slotNewEntry(), views, WEEKLST, and weekLstView.

Referenced by view().

void DateBook::insertEvent const Event e  )  [private, slot]
 

Definition at line 418 of file datebook.cpp.

References DateBookDB::addEvent(), Qtopia::Record::assignUid(), db, defaultCategories, defaultLocation, Qtopia::Record::isValidUid(), newEvent(), Qtopia::Record::setCategories(), and Event::setLocation().

void DateBook::loadSettings  )  [private]
 

Definition at line 617 of file datebook.cpp.

References ampm, aPreset, QValueList< T >::begin(), bJumpToCurTime, DAY, defaultCategories, defaultLocation, defaultView, QValueList< T >::end(), i, NORMAL, onMonday, presetTime, Config::readBoolEntry(), Config::readEntry(), Config::readNumEntry(), rowStyle, Config::setGroup(), QStringList::split(), startTime, TRUE, and weeklistviewconfig.

Referenced by DateBook().

void DateBook::newEvent  )  [signal]
 

Referenced by duplicateEvent(), editEvent(), initDay(), initMonth(), initWeek(), initWeekLst(), insertEvent(), and slotNewEntry().

void DateBook::receive const QCString msg,
const QByteArray data
[private, slot]
 

Definition at line 229 of file datebook.cpp.

References dayAction, db, editEvent(), DateBookDBHack::eventByUID(), IO_ReadOnly, monthAction, stream, viewDay(), viewDefault(), viewMonth(), viewWeek(), and weekAction.

Referenced by DateBook().

void DateBook::reload  )  [slot]
 

Definition at line 773 of file datebook.cpp.

References dayAction, db, FALSE, monthAction, DateBookDB::reload(), syncing, viewDay(), viewMonth(), viewWeek(), and weekAction.

Referenced by DateBook().

void DateBook::removeEvent const Event e  )  [private, slot]
 

Definition at line 514 of file datebook.cpp.

References QPEMessageBox::confirmDelete(), dayView, db, Event::description(), DateBookDay::redraw(), DateBookDB::removeEvent(), syncing, tr, views, and warning().

Referenced by initDay(), and initWeekLst().

void DateBook::saveSettings  )  [private]
 

Definition at line 645 of file datebook.cpp.

References aPreset, bJumpToCurTime, defaultCategories, defaultLocation, defaultView, i, QStringList::join(), QString::number(), presetTime, rowStyle, Config::setGroup(), startTime, weeklistviewconfig, and Config::writeEntry().

Referenced by closeEvent(), and slotSettings().

void DateBook::setDocument const QString  )  [private, slot]
 

Definition at line 927 of file datebook.cpp.

References DateBookDB::addEvent(), QValueList< T >::begin(), db, QValueList< T >::end(), QString::find(), QString::length(), and Event::readVCalendar().

void DateBook::showDay int  y,
int  m,
int  d
[private, slot]
 

Definition at line 539 of file datebook.cpp.

References d, DAY, and view().

Referenced by initMonth(), initWeek(), and initWeekLst().

void DateBook::signalNotFound  )  [signal]
 

Referenced by slotDoFind(), and slotFind().

void DateBook::signalWrapAround  )  [signal]
 

Referenced by slotDoFind(), and slotFind().

void DateBook::slotDoFind const QString ,
const QDate ,
bool  ,
bool  ,
int 
[private, slot]
 

Definition at line 1003 of file datebook.cpp.

References QValueList< T >::begin(), catComp(), dayView, db, QValueList< T >::end(), DateBookDB::getNonRepeatingEvents(), DateBookDB::getRawRepeats(), inSearch, nextOccurance(), qHeapSort(), rev, QRegExp::setCaseSensitive(), DateBookDay::setDate(), Event::setStart(), DateBookDay::setStartViewTime(), signalNotFound(), signalWrapAround(), start, and Event::start().

Referenced by slotFind().

void DateBook::slotFind  )  [private, slot]
 

Definition at line 957 of file datebook.cpp.

References currentDate(), inSearch, FindDialog::setDate(), FindDialog::setUseDate(), signalNotFound(), signalWrapAround(), slotDoFind(), and viewDay().

Referenced by DateBook().

void DateBook::slotNewEntry const QDateTime start,
const QDateTime end,
const QString str,
const QString location = 0
[private, slot]
 

Definition at line 881 of file datebook.cpp.

References DateBookDB::addEvent(), ampm, aPreset, Qtopia::Record::assignUid(), checkEvent(), db, defaultCategories, defaultLocation, error(), QPEApplication::execDialog(), QString::isEmpty(), QString::isNull(), Event::Loud, newEvent(), onMonday, presetTime, DateEntry::setAlarmEnabled(), Qtopia::Record::setCategories(), Event::setDescription(), Event::setEnd(), Event::setLocation(), Event::setStart(), tr, TRUE, and warning().

Referenced by initWeekLst(), and slotNewEventFromKey().

void DateBook::slotNewEventFromKey const QString str  )  [private, slot]
 

Definition at line 849 of file datebook.cpp.

References d, DateBookWeekLst::date(), DateBookWeek::date(), dayView, end, monthView, ODateBookMonth::selectedDate(), DateBookDay::selectedDates(), QDateTime::setTime(), slotNewEntry(), start, syncing, tr, views, warning(), weekLstView, and weekView.

Referenced by fileNew(), and initDay().

void DateBook::slotSettings  )  [private, slot]
 

Definition at line 258 of file datebook.cpp.

References ampm, aPreset, bJumpToCurTime, dayView, db_holiday, defaultCategories, defaultLocation, defaultView, QPEApplication::execDialog(), i, DateBookHoliday::pluginLoader(), DateBookHoliday::pluginManager(), presetTime, DateBookWeekLst::redraw(), DateBookHoliday::reloadPlugins(), rowStyle, saveSettings(), DateBookSettings::setAlarmPreset(), DateBookSettings::setJumpToCurTime(), DateBookSettings::setPluginList(), DateBookSettings::setRowStyle(), DateBookSettings::setStartTime(), startTime, tr, views, weeklistviewconfig, weekLstView, and weekView.

Referenced by DateBook().

void DateBook::slotToday  )  [private, slot]
 

Definition at line 814 of file datebook.cpp.

References QDate::currentDate(), defaultView, and view().

Referenced by DateBook().

void DateBook::timerEvent QTimerEvent *  e  )  [protected]
 

Definition at line 788 of file datebook.cpp.

References alarmCounter, and Sound::soundAlarm().

void DateBook::view int  v,
const QDate d
[protected]
 

Definition at line 370 of file datebook.cpp.

References QDate::day(), DAY, dayAction, dayView, initDay(), initMonth(), initWeek(), initWeekLst(), QDate::month(), MONTH, monthAction, monthView, ODateBookMonth::setDate(), DateBookWeekLst::setDate(), DateBookWeek::setDate(), DateBookDay::setDate(), TRUE, views, WEEK, weekAction, WEEKLST, weekLstAction, weekLstView, weekView, and QDate::year().

Referenced by appMessage(), showDay(), slotToday(), viewDay(), viewDefault(), viewMonth(), viewWeek(), and viewWeekLst().

void DateBook::viewDay  )  [private, slot]
 

Definition at line 402 of file datebook.cpp.

References currentDate(), DAY, and view().

Referenced by appMessage(), DateBook(), receive(), reload(), and slotFind().

void DateBook::viewDefault const QDate d  )  [private, slot]
 

Definition at line 398 of file datebook.cpp.

References defaultView, and view().

Referenced by appMessage(), and receive().

void DateBook::viewMonth  )  [private, slot]
 

Definition at line 414 of file datebook.cpp.

References currentDate(), MONTH, and view().

Referenced by appMessage(), DateBook(), receive(), and reload().

void DateBook::viewWeek  )  [private, slot]
 

Definition at line 406 of file datebook.cpp.

References currentDate(), view(), and WEEK.

Referenced by appMessage(), DateBook(), receive(), and reload().

void DateBook::viewWeekLst  )  [private, slot]
 

Definition at line 410 of file datebook.cpp.

References currentDate(), view(), and WEEKLST.

Referenced by appMessage(), and DateBook().


Member Data Documentation

int DateBook::alarmCounter [private]
 

Definition at line 140 of file datebook.h.

Referenced by appMessage(), and timerEvent().

bool DateBook::ampm [private]
 

Definition at line 134 of file datebook.h.

Referenced by appMessage(), changeClock(), duplicateEvent(), editEvent(), initDay(), initWeek(), initWeekLst(), loadSettings(), slotNewEntry(), and slotSettings().

bool DateBook::aPreset [private]
 

Definition at line 126 of file datebook.h.

Referenced by loadSettings(), saveSettings(), slotNewEntry(), and slotSettings().

bool DateBook::bJumpToCurTime [private]
 

Definition at line 133 of file datebook.h.

Referenced by initDay(), loadSettings(), saveSettings(), and slotSettings().

QAction* DateBook::dayAction [private]
 

Definition at line 124 of file datebook.h.

Referenced by DateBook(), receive(), reload(), and view().

DateBookDay* DateBook::dayView [private]
 

Definition at line 120 of file datebook.h.

Referenced by addEvent(), appMessage(), changeClock(), currentDate(), DateBook(), initDay(), removeEvent(), slotDoFind(), slotNewEventFromKey(), slotSettings(), and view().

DateBookDBHoliday* DateBook::db [private]
 

Definition at line 117 of file datebook.h.

Referenced by appMessage(), closeEvent(), DateBook(), duplicateEvent(), editEvent(), flush(), initDay(), initMonth(), initWeek(), initWeekLst(), insertEvent(), receive(), reload(), removeEvent(), setDocument(), slotDoFind(), and slotNewEntry().

DateBookHoliday* DateBook::db_holiday [private]
 

Definition at line 118 of file datebook.h.

Referenced by DateBook(), initDay(), slotSettings(), and ~DateBook().

QArray<int> DateBook::defaultCategories [private]
 

Definition at line 131 of file datebook.h.

Referenced by insertEvent(), loadSettings(), saveSettings(), slotNewEntry(), and slotSettings().

QString DateBook::defaultLocation [private]
 

Definition at line 132 of file datebook.h.

Referenced by insertEvent(), loadSettings(), saveSettings(), slotNewEntry(), and slotSettings().

int DateBook::defaultView [private]
 

Definition at line 130 of file datebook.h.

Referenced by DateBook(), loadSettings(), saveSettings(), slotSettings(), slotToday(), and viewDefault().

bool DateBook::inSearch [private]
 

Definition at line 138 of file datebook.h.

Referenced by slotDoFind(), and slotFind().

QAction * DateBook::monthAction [private]
 

Definition at line 124 of file datebook.h.

Referenced by DateBook(), receive(), reload(), and view().

ODateBookMonth* DateBook::monthView [private]
 

Definition at line 122 of file datebook.h.

Referenced by appMessage(), currentDate(), DateBook(), initMonth(), slotNewEventFromKey(), and view().

bool DateBook::onMonday [private]
 

Definition at line 135 of file datebook.h.

Referenced by changeWeek(), duplicateEvent(), editEvent(), initDay(), initWeek(), initWeekLst(), loadSettings(), and slotNewEntry().

int DateBook::presetTime [private]
 

Definition at line 127 of file datebook.h.

Referenced by loadSettings(), saveSettings(), slotNewEntry(), and slotSettings().

int DateBook::rowStyle [private]
 

Definition at line 129 of file datebook.h.

Referenced by initDay(), loadSettings(), saveSettings(), and slotSettings().

int DateBook::startTime [private]
 

Definition at line 128 of file datebook.h.

Referenced by initDay(), initWeek(), loadSettings(), saveSettings(), and slotSettings().

bool DateBook::syncing [private]
 

Definition at line 137 of file datebook.h.

Referenced by closeEvent(), duplicateEvent(), editEvent(), flush(), reload(), removeEvent(), and slotNewEventFromKey().

QWidgetStack* DateBook::views [private]
 

Definition at line 119 of file datebook.h.

Referenced by appMessage(), currentDate(), DateBook(), initDay(), initMonth(), initWeek(), initWeekLst(), removeEvent(), slotNewEventFromKey(), slotSettings(), and view().

QAction * DateBook::weekAction [private]
 

Definition at line 124 of file datebook.h.

Referenced by DateBook(), receive(), reload(), and view().

int DateBook::weeklistviewconfig [private]
 

Definition at line 125 of file datebook.h.

Referenced by loadSettings(), saveSettings(), and slotSettings().

QAction * DateBook::weekLstAction [private]
 

Definition at line 124 of file datebook.h.

Referenced by DateBook(), and view().

DateBookWeekLst* DateBook::weekLstView [private]
 

Definition at line 123 of file datebook.h.

Referenced by appMessage(), changeClock(), currentDate(), DateBook(), initWeekLst(), slotNewEventFromKey(), slotSettings(), and view().

DateBookWeek* DateBook::weekView [private]
 

Definition at line 121 of file datebook.h.

Referenced by appMessage(), changeClock(), currentDate(), DateBook(), initWeek(), slotNewEventFromKey(), slotSettings(), and view().


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