french -> French
[kdepim.git] / kalarm / startdaytimer.h
blob045c58981279118ba71465a4a050ab1a47871989
1 /*
2 * startdaytimer.h - timer triggered at the user-defined start-of-day time
3 * Program: kalarm
4 * Copyright © 2004,2005,2009 by David Jarvie <djarvie@kde.org>
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.
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.
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.
21 #ifndef STARTDAYTIMER_H
22 #define STARTDAYTIMER_H
24 /* @file startdaytimer.h - timer triggered at the user-defined start-of-day time */
26 #include "synchtimer.h"
29 /** StartOfDayTimer is an application-wide timer synchronized to the user-defined
30 * start-of-day time (set in KAlarm's Preferences dialog).
31 * It automatically adjusts to any changes in the start-of-day time.
33 * @author David Jarvie <djarvie@kde.org>
35 class StartOfDayTimer : public DailyTimer
37 Q_OBJECT
38 public:
39 virtual ~StartOfDayTimer() { }
40 /** Connect to the timer signal.
41 * @param receiver Receiving object.
42 * @param member Slot to activate.
44 static void connect(QObject* receiver, const char* member)
45 { instance()->connecT(receiver, member); }
46 /** Disconnect from the timer signal.
47 * @param receiver Receiving object.
48 * @param member Slot to disconnect. If null, all slots belonging to
49 * @p receiver will be disconnected.
51 static void disconnect(QObject* receiver, const char* member = 0)
52 { if (mInstance) mInstance->disconnecT(receiver, member); }
54 protected:
55 StartOfDayTimer();
56 static StartOfDayTimer* instance();
58 private slots:
59 void startOfDayChanged();
61 private:
62 static StartOfDayTimer* mInstance; // exists solely to receive signals
65 #endif // STARTDAYTIMER_H
67 // vim: et sw=4: