kalarm

startdaytimer.h
00001 /*
00002  *  startdaytimer.h  -  timer triggered at the user-defined start-of-day time
00003  *  Program:  kalarm
00004  *  Copyright © 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 STARTDAYTIMER_H
00022 #define STARTDAYTIMER_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   
00039     public:
00040         virtual ~StartOfDayTimer()  { }
00045         static void connect(TQObject* receiver, const char* member)
00046                            { instance()->connecT(receiver, member); }
00052         static void disconnect(TQObject* receiver, const char* member = 0)
00053                            { if (mInstance) mInstance->disconnecT(receiver, member); }
00054 
00055     protected:
00056         StartOfDayTimer();
00057         static StartOfDayTimer* instance();
00058 
00059     private slots:
00060         void        startOfDayChanged(const TQTime& oldTime);
00061 
00062     private:
00063         static StartOfDayTimer* mInstance;    // exists solely to receive signals
00064 };
00065 
00066 #endif // STARTDAYTIMER_H
00067