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

Clock Class Reference

#include </home/clem/local/src/opie/noncore/tools/clock/clock.h>

Collaboration diagram for Clock:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Clock (QWidget *parent=0, const char *name=0, WFlags fl=0)
 ~Clock ()

Static Public Member Functions

static QString appName ()

Public Attributes

QDateTime when
bool bSound
int hour
int minute
int snoozeTime

Protected Member Functions

QDateTime nextAlarm (int h, int m)
int dayBtnIdx (int) const
void closeEvent (QCloseEvent *e)
void updateLap ()
void setSwatchLcd (QLCDNumber *lcd, int ms, bool showMs)
bool eventFilter (QObject *, QEvent *)
bool spinBoxValid (QSpinBox *sb)
bool validDaysSelected (void)

Private Slots

void stopStartStopWatch ()
void resetStopWatch ()
void prevLap ()
void nextLap ()
void lapTimeout ()
void tabChanged (QWidget *)
void updateClock ()
void changeClock (bool)
void setDailyAmPm (int)
void setDailyMinute (int)
void dailyEdited ()
void enableDaily (bool)
void appMessage (const QCString &msg, const QByteArray &data)
void alarmTimeout ()
void applyDailyAlarm ()
void scheduleApplyDailyAlarm ()
void slotBrowseMp3File ()

Private Attributes

QTimer * t
QTimer * alarmt
QTime swatch_start
int swatch_totalms
QArray< int > swatch_splitms
bool swatch_running
int swatch_currLap
int swatch_dispLap
QToolButton * prevLapBtn
QToolButton * nextLapBtn
QTimer * lapTimer
AnalogClockanalogStopwatch
QLCDNumber * stopwatchLcd
QBoxLayout * swLayout
bool ampm
bool onMonday
int alarmCount
AlarmDlgalarmDlg
QToolButton ** dayBtn
bool init
QTimer * applyAlarmTimer

Constructor & Destructor Documentation

Clock::Clock QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

Definition at line 155 of file clock.cpp.

References alarmDlg, alarmt, alarmTimeout(), ampm, analogStopwatch, QValueList< T >::append(), applyAlarmTimer, applyDailyAlarm(), appMessage(), QValueList< T >::begin(), changeClock(), QDate::currentDate(), TimeString::currentDateFormat(), QTime::currentTime(), d, dailyEdited(), TimeString::dateString(), dayBtn, dayBtnIdx(), enableDaily(), QValueList< T >::end(), FALSE, i, init, lapTimeout(), lapTimer, nextLap(), nextLapBtn, onMonday, prevLap(), prevLapBtn, qApp, Config::readBoolEntry(), Config::readEntry(), Config::readListEntry(), Config::readNumEntry(), reset(), resetStopWatch(), s, scheduleApplyDailyAlarm(), setDailyAmPm(), setDailyMinute(), Config::setGroup(), stopStartStopWatch(), stopwatchLcd, sw_prec, swatch_currLap, swatch_dispLap, swatch_running, swatch_splitms, swatch_totalms, swLayout, t, tabChanged(), tr, TRUE, and updateClock().

Clock::~Clock  ) 
 

Definition at line 333 of file clock.cpp.

References dayBtn, and toggleScreenSaver().


Member Function Documentation

void Clock::alarmTimeout  )  [private, slot]
 

Definition at line 657 of file clock.cpp.

References alarmCount, alarmt, and Sound::soundAlarm().

Referenced by Clock().

void Clock::applyDailyAlarm  )  [private, slot]
 

Definition at line 700 of file clock.cpp.

References AlarmServer::addAlarm(), ALARM_CLOCK_CHANNEL, ALARM_CLOCK_MESSAGE, ampm, applyAlarmTimer, dayBtn, dayBtnIdx(), AlarmServer::deleteAlarm(), enableDaily(), hour, i, init, QString::isEmpty(), magic_daily, magic_playmp, magic_snooze, minute, nextAlarm(), QString::number(), Config::setGroup(), when, and Config::writeEntry().

Referenced by appMessage(), Clock(), and closeEvent().

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

Definition at line 574 of file clock.cpp.

References ALARM_CLOCK_MESSAGE, alarmCount, alarmDlg, alarmt, ampm, applyDailyAlarm(), enableDaily(), QPEApplication::execDialog(), FALSE, QTime::hour(), IO_ReadOnly, magic_countdown, magic_daily, magic_playmp, magic_snooze, QTime::minute(), NULL, resetStopWatch(), QPEApplication::setKeepRunning(), AlarmDlg::setText(), Sound::soundAlarm(), QString::sprintf(), startPlayer(), stopStartStopWatch(), swatch_running, t, QDateTime::time(), tr, TRUE, and when.

Referenced by Clock().

static QString Clock::appName void   )  [inline, static]
 

Definition at line 60 of file clock.h.

References QString::fromLatin1().

void Clock::changeClock bool   )  [private, slot]
 

Definition at line 379 of file clock.cpp.

References ampm, hour, minute, and updateClock().

Referenced by Clock().

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

Definition at line 763 of file clock.cpp.

References applyDailyAlarm(), tr, validDaysSelected(), and warning().

void Clock::dailyEdited  )  [private, slot]
 

Definition at line 561 of file clock.cpp.

References applyAlarmTimer, scheduleApplyDailyAlarm(), and spinBoxValid().

Referenced by Clock().

int Clock::dayBtnIdx int   )  const [protected]
 

Definition at line 685 of file clock.cpp.

References onMonday.

Referenced by applyDailyAlarm(), Clock(), and validDaysSelected().

void Clock::enableDaily bool   )  [private, slot]
 

Definition at line 569 of file clock.cpp.

References scheduleApplyDailyAlarm().

Referenced by applyDailyAlarm(), appMessage(), and Clock().

bool Clock::eventFilter QObject *  ,
QEvent * 
[protected]
 

Definition at line 520 of file clock.cpp.

References analogStopwatch, FALSE, stopwatchLcd, and swLayout.

void Clock::lapTimeout  )  [private, slot]
 

Definition at line 484 of file clock.cpp.

References nextLapBtn, prevLapBtn, swatch_currLap, swatch_dispLap, and updateLap().

Referenced by Clock().

QDateTime Clock::nextAlarm int  h,
int  m
[protected]
 

Definition at line 668 of file clock.cpp.

References QDateTime::addDays(), at(), QDateTime::currentDateTime(), QDateTime::date(), and when.

Referenced by applyDailyAlarm().

void Clock::nextLap  )  [private, slot]
 

Definition at line 474 of file clock.cpp.

References nextLapBtn, prevLapBtn, swatch_currLap, swatch_dispLap, and updateLap().

Referenced by Clock().

void Clock::prevLap  )  [private, slot]
 

Definition at line 464 of file clock.cpp.

References nextLapBtn, prevLapBtn, swatch_currLap, swatch_dispLap, and updateLap().

Referenced by Clock().

void Clock::resetStopWatch  )  [private, slot]
 

Definition at line 438 of file clock.cpp.

References QTime::elapsed(), FALSE, i, lapTimer, nextLapBtn, prevLapBtn, reset(), QTime::start(), swatch_currLap, swatch_dispLap, swatch_running, swatch_splitms, swatch_start, swatch_totalms, tr, TRUE, updateClock(), and updateLap().

Referenced by appMessage(), and Clock().

void Clock::scheduleApplyDailyAlarm  )  [private, slot]
 

Definition at line 695 of file clock.cpp.

References applyAlarmTimer, and TRUE.

Referenced by Clock(), dailyEdited(), enableDaily(), setDailyAmPm(), and slotBrowseMp3File().

void Clock::setDailyAmPm int   )  [private, slot]
 

Definition at line 551 of file clock.cpp.

References scheduleApplyDailyAlarm().

Referenced by Clock().

void Clock::setDailyMinute int   )  [private, slot]
 

Definition at line 556 of file clock.cpp.

Referenced by Clock().

void Clock::setSwatchLcd QLCDNumber *  lcd,
int  ms,
bool  showMs
[protected]
 

Definition at line 511 of file clock.cpp.

References d, FALSE, QString::number(), QString::right(), sw_prec, and QTime::toString().

Referenced by updateClock(), and updateLap().

void Clock::slotBrowseMp3File  )  [private, slot]
 

Definition at line 795 of file clock.cpp.

References Opie::Ui::OFileDialog::getOpenFileName(), QMap< Key, T >::insert(), QString::isEmpty(), QString::null, QPEApplication::qpeDir(), scheduleApplyDailyAlarm(), Config::setGroup(), str, text, tr, and Config::writeEntry().

bool Clock::spinBoxValid QSpinBox *  sb  )  [protected]
 

Definition at line 777 of file clock.cpp.

References FALSE, i, QString::length(), QString::toInt(), TRUE, and v.

Referenced by dailyEdited().

void Clock::stopStartStopWatch  )  [private, slot]
 

Definition at line 409 of file clock.cpp.

References QTime::elapsed(), FALSE, nextLapBtn, prevLapBtn, reset(), QTime::start(), swatch_currLap, swatch_dispLap, swatch_running, swatch_splitms, swatch_start, swatch_totalms, t, toggleScreenSaver(), tr, TRUE, updateClock(), and updateLap().

Referenced by appMessage(), and Clock().

void Clock::tabChanged QWidget *   )  [private, slot]
 

Definition at line 537 of file clock.cpp.

References swatch_running, t, and updateClock().

Referenced by Clock().

void Clock::updateClock  )  [private, slot]
 

Definition at line 339 of file clock.cpp.

References ampm, analogStopwatch, QDate::currentDate(), TimeString::currentDateFormat(), QDateTime::currentDateTime(), QTime::currentTime(), TimeString::dateString(), AnalogClock::display(), QTime::elapsed(), FALSE, QTime::hour(), hour, QTime::minute(), s, setSwatchLcd(), QString::sprintf(), stopwatchLcd, swatch_currLap, swatch_dispLap, swatch_running, swatch_splitms, swatch_start, swatch_totalms, and updateLap().

Referenced by changeClock(), Clock(), resetStopWatch(), stopStartStopWatch(), and tabChanged().

void Clock::updateLap  )  [protected]
 

Definition at line 492 of file clock.cpp.

References QTime::elapsed(), setSwatchLcd(), swatch_currLap, swatch_dispLap, swatch_running, swatch_splitms, swatch_start, and swatch_totalms.

Referenced by lapTimeout(), nextLap(), prevLap(), resetStopWatch(), stopStartStopWatch(), and updateClock().

bool Clock::validDaysSelected void   )  [protected]
 

Definition at line 753 of file clock.cpp.

References dayBtn, dayBtnIdx(), FALSE, i, and TRUE.

Referenced by closeEvent().


Member Data Documentation

int Clock::alarmCount [private]
 

Definition at line 108 of file clock.h.

Referenced by alarmTimeout(), and appMessage().

AlarmDlg* Clock::alarmDlg [private]
 

Definition at line 109 of file clock.h.

Referenced by appMessage(), and Clock().

QTimer* Clock::alarmt [private]
 

Definition at line 93 of file clock.h.

Referenced by alarmTimeout(), appMessage(), and Clock().

bool Clock::ampm [private]
 

Definition at line 106 of file clock.h.

Referenced by applyDailyAlarm(), appMessage(), changeClock(), Clock(), and updateClock().

AnalogClock* Clock::analogStopwatch [private]
 

Definition at line 103 of file clock.h.

Referenced by Clock(), eventFilter(), and updateClock().

QTimer* Clock::applyAlarmTimer [private]
 

Definition at line 112 of file clock.h.

Referenced by applyDailyAlarm(), Clock(), dailyEdited(), and scheduleApplyDailyAlarm().

bool Clock::bSound
 

Definition at line 58 of file clock.h.

QToolButton** Clock::dayBtn [private]
 

Definition at line 110 of file clock.h.

Referenced by applyDailyAlarm(), Clock(), validDaysSelected(), and ~Clock().

int Clock::hour
 

Definition at line 59 of file clock.h.

Referenced by applyDailyAlarm(), changeClock(), and updateClock().

bool Clock::init [private]
 

Definition at line 111 of file clock.h.

Referenced by applyDailyAlarm(), and Clock().

QTimer* Clock::lapTimer [private]
 

Definition at line 102 of file clock.h.

Referenced by Clock(), and resetStopWatch().

int Clock::minute
 

Definition at line 59 of file clock.h.

Referenced by applyDailyAlarm(), and changeClock().

QToolButton* Clock::nextLapBtn [private]
 

Definition at line 101 of file clock.h.

Referenced by Clock(), lapTimeout(), nextLap(), prevLap(), resetStopWatch(), and stopStartStopWatch().

bool Clock::onMonday [private]
 

Definition at line 107 of file clock.h.

Referenced by Clock(), and dayBtnIdx().

QToolButton* Clock::prevLapBtn [private]
 

Definition at line 100 of file clock.h.

Referenced by Clock(), lapTimeout(), nextLap(), prevLap(), resetStopWatch(), and stopStartStopWatch().

int Clock::snoozeTime
 

Definition at line 59 of file clock.h.

QLCDNumber* Clock::stopwatchLcd [private]
 

Definition at line 104 of file clock.h.

Referenced by Clock(), eventFilter(), and updateClock().

int Clock::swatch_currLap [private]
 

Definition at line 98 of file clock.h.

Referenced by Clock(), lapTimeout(), nextLap(), prevLap(), resetStopWatch(), stopStartStopWatch(), updateClock(), and updateLap().

int Clock::swatch_dispLap [private]
 

Definition at line 99 of file clock.h.

Referenced by Clock(), lapTimeout(), nextLap(), prevLap(), resetStopWatch(), stopStartStopWatch(), updateClock(), and updateLap().

bool Clock::swatch_running [private]
 

Definition at line 97 of file clock.h.

Referenced by appMessage(), Clock(), resetStopWatch(), stopStartStopWatch(), tabChanged(), updateClock(), and updateLap().

QArray<int> Clock::swatch_splitms [private]
 

Definition at line 96 of file clock.h.

Referenced by Clock(), resetStopWatch(), stopStartStopWatch(), updateClock(), and updateLap().

QTime Clock::swatch_start [private]
 

Definition at line 94 of file clock.h.

Referenced by resetStopWatch(), stopStartStopWatch(), updateClock(), and updateLap().

int Clock::swatch_totalms [private]
 

Definition at line 95 of file clock.h.

Referenced by Clock(), resetStopWatch(), stopStartStopWatch(), updateClock(), and updateLap().

QBoxLayout* Clock::swLayout [private]
 

Definition at line 105 of file clock.h.

Referenced by Clock(), and eventFilter().

QTimer* Clock::t [private]
 

Definition at line 92 of file clock.h.

Referenced by appMessage(), Clock(), stopStartStopWatch(), and tabChanged().

QDateTime Clock::when
 

Definition at line 57 of file clock.h.

Referenced by applyDailyAlarm(), appMessage(), and nextAlarm().


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