kalarm

startdaytimer.h

00001 /*
00002  *  startdaytimer.h  -  timer triggered at the user-defined start-of-day time
00003  *  Program:  kalarm
00004  *  Copyright (C) 2004, 2005 by David Jarvie <software@astrojar.org.uk>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef STARTOFDAYTIMER_H
00022 #define STARTOFDAYTIMER_H
00023 
00024 /* @file startdaytimer.h - timer triggered at the user-defined start-of-day time */
00025 
00026 #include "synchtimer.h"
00027 
00028 
00035 class StartOfDayTimer : public DailyTimer
00036 {
00037         Q_OBJECT
00038     public:
00039         virtual ~StartOfDayTimer()  { }
00044         static void connect(QObject* receiver, const char* member)
00045                            { instance()->connecT(receiver, member); }
00051         static void disconnect(QObject* receiver, const char* member = 0)
00052                            { if (mInstance) mInstance->disconnecT(receiver, member); }
00053 
00054     protected:
00055         StartOfDayTimer();
00056         static StartOfDayTimer* instance();
00057 
00058     private slots:
00059         void        startOfDayChanged(const QTime& oldTime);
00060 
00061     private:
00062         static StartOfDayTimer* mInstance;    // exists solely to receive signals
00063 };
00064 
00065 #endif // STARTOFDAYTIMER_H
00066 
KDE Home | KDE Accessibility Home | Description of Access Keys