kalarm

startdaytimer.h
1/*
2 * startdaytimer.h - timer triggered at the user-defined start-of-day time
3 * Program: kalarm
4 * Copyright © 2004,2005 by David Jarvie <software@astrojar.org.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef STARTDAYTIMER_H
22#define STARTDAYTIMER_H
23
24/* @file startdaytimer.h - timer triggered at the user-defined start-of-day time */
25
26#include "synchtimer.h"
27
28
35class StartOfDayTimer : public DailyTimer
36{
37 TQ_OBJECT
38
39 public:
40 virtual ~StartOfDayTimer() { }
45 static void connect(TQObject* receiver, const char* member)
46 { instance()->connecT(receiver, member); }
52 static void disconnect(TQObject* receiver, const char* member = 0)
53 { if (mInstance) mInstance->disconnecT(receiver, member); }
54
55 protected:
57 static StartOfDayTimer* instance();
58
59 private slots:
60 void startOfDayChanged(const TQTime& oldTime);
61
62 private:
63 static StartOfDayTimer* mInstance; // exists solely to receive signals
64};
65
66#endif // STARTDAYTIMER_H
67
StartOfDayTimer is an application-wide timer synchronised to the user-defined start-of-day time (set ...
Definition: startdaytimer.h:36
static void disconnect(TQObject *receiver, const char *member=0)
Disconnect from the timer signal.
Definition: startdaytimer.h:52
static void connect(TQObject *receiver, const char *member)
Connect to the timer signal.
Definition: startdaytimer.h:45