• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kalarm/lib

DailyTimer Class Reference

#include <synchtimer.h>

Inheritance diagram for DailyTimer:

Inheritance graph
[legend]

List of all members.


Detailed Description

DailyTimer is an application-wide timer synchronized to a specified time of day, local time.

Daily timers come in two flavors: fixed, which can only be accessed through static methods, and variable, whose time can be adjusted and which are accessed through non-static methods.

Author:
David Jarvie <software@astrojar.org.uk>

Definition at line 115 of file synchtimer.h.


Public Member Functions

void changeTime (const QTime &newTimeOfDay, bool triggerMissed=true)
QTime timeOfDay () const
virtual ~DailyTimer ()

Static Public Member Functions

static void connect (const QTime &timeOfDay, QObject *receiver, const char *member)
static void disconnect (const QTime &timeOfDay, QObject *receiver, const char *member=0)

Protected Slots

virtual void slotTimer ()

Protected Member Functions

 DailyTimer (const QTime &, bool fixed)
virtual void start ()

Static Protected Member Functions

static DailyTimer * fixedInstance (const QTime &timeOfDay, bool create=true)

Constructor & Destructor Documentation

DailyTimer::~DailyTimer (  )  [virtual]

Definition at line 135 of file synchtimer.cpp.

DailyTimer::DailyTimer ( const QTime &  timeOfDay,
bool  fixed 
) [protected]

Construct an instance.

The constructor is protected to ensure that for variable timers, only derived classes can construct instances. This ensures that multiple timers are not created for the same use.

Definition at line 127 of file synchtimer.cpp.


Member Function Documentation

void DailyTimer::changeTime ( const QTime &  newTimeOfDay,
bool  triggerMissed = true 
)

Change the time at which this variable timer triggers.

Parameters:
newTimeOfDay New time at which the timer should trigger.
triggerMissed If true, and if newTimeOfDay < oldTimeOfDay, and if the current time is between newTimeOfDay and oldTimeOfDay, the timer will be triggered immediately so as to avoid missing today's trigger.

Definition at line 166 of file synchtimer.cpp.

static void DailyTimer::connect ( const QTime &  timeOfDay,
QObject *  receiver,
const char *  member 
) [inline, static]

Connect to the timer signal which triggers at the given fixed time of day.

A new timer is created if necessary.

Parameters:
timeOfDay Time at which the timer is to trigger.
receiver Receiving object.
member Slot to activate.

Definition at line 126 of file synchtimer.h.

void DailyTimer::disconnect ( const QTime &  timeOfDay,
QObject *  receiver,
const char *  member = 0 
) [static]

Disconnect from the timer signal which triggers at the given fixed time of day.

If there are no remaining connections to that timer, it is destroyed.

Parameters:
timeOfDay Time at which the timer triggers.
receiver Receiving object.
member Slot to disconnect. If null, all slots belonging to receiver will be disconnected.

Definition at line 153 of file synchtimer.cpp.

DailyTimer * DailyTimer::fixedInstance ( const QTime &  timeOfDay,
bool  create = true 
) [static, protected]

Return the instance which triggers at the specified fixed time of day, optionally creating a new instance if necessary.

Parameters:
timeOfDay Time at which the timer triggers.
create If true, create a new instance if none already exists for timeOfDay.
Returns:
The instance for timeOfDay, or 0 if it does not exist.

Definition at line 141 of file synchtimer.cpp.

void DailyTimer::slotTimer (  )  [protected, virtual, slot]

Implements SynchTimer.

Definition at line 227 of file synchtimer.cpp.

void DailyTimer::start (  )  [protected, virtual]

Implements SynchTimer.

Definition at line 199 of file synchtimer.cpp.

QTime DailyTimer::timeOfDay (  )  const [inline]

Return the current time of day at which this variable timer triggers.

Definition at line 144 of file synchtimer.h.


The documentation for this class was generated from the following files:
  • synchtimer.h
  • synchtimer.cpp

kalarm/lib

Skip menu "kalarm/lib"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal