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

kalarm/lib

Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions | List of all members
DailyTimer Class Reference

#include <synchtimer.h>

Inheritance diagram for DailyTimer:
Inheritance graph
[legend]

Public Member Functions

virtual ~DailyTimer ()
 
void changeTime (const QTime &newTimeOfDay, bool triggerMissed=true)
 
QTime timeOfDay () const
 
- Public Member Functions inherited from SynchTimer
virtual ~SynchTimer ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

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)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Protected Slots

virtual void slotTimer ()
 
- Protected Slots inherited from SynchTimer
virtual void slotTimer ()=0
 

Protected Member Functions

 DailyTimer (const QTime &, bool fixed)
 
virtual void start ()
 
- Protected Member Functions inherited from SynchTimer
 SynchTimer ()
 
void connecT (QObject *receiver, const char *member)
 
void disconnecT (QObject *receiver, const char *member=0)
 
bool hasConnections () const
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Static Protected Member Functions

static DailyTimer * fixedInstance (const QTime &timeOfDay, bool create=true)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 

Additional Inherited Members

- Protected Attributes inherited from SynchTimer
QTimer * mTimer
 
- Properties inherited from QObject
 objectName
 

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 djarv.nosp@m.ie@k.nosp@m.de.or.nosp@m.g

Definition at line 115 of file synchtimer.h.

Constructor & Destructor Documentation

DailyTimer::~DailyTimer ( )
virtual

Definition at line 137 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 129 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
newTimeOfDayNew time at which the timer should trigger.
triggerMissedIf 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 168 of file synchtimer.cpp.

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

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

A new timer is created if necessary.

Parameters
timeOfDayTime at which the timer is to trigger.
receiverReceiving object.
memberSlot 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
timeOfDayTime at which the timer triggers.
receiverReceiving object.
memberSlot to disconnect. If null, all slots belonging to receiver will be disconnected.

Definition at line 155 of file synchtimer.cpp.

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

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

Parameters
timeOfDayTime at which the timer triggers.
createIf 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 143 of file synchtimer.cpp.

void DailyTimer::slotTimer ( )
protectedvirtualslot

Definition at line 229 of file synchtimer.cpp.

void DailyTimer::start ( )
protectedvirtual

Implements SynchTimer.

Definition at line 201 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:35:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm/lib

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal