kalarmd Library API Documentation

alarmdockwindow.h

00001 /*
00002     KDE Panel docking window for KDE Alarm Daemon GUI.
00003 
00004     Copyright (c) 2001 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
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef ALARMDOCKWINDOW_H
00025 #define ALARMDOCKWINDOW_H
00026 // $Id: alarmdockwindow.h,v 1.2 2002/01/16 16:57:02 cschumac Exp $
00027 
00028 #include <ksystemtray.h>
00029 #include <kpopupmenu.h>
00030 
00031 #include "koalarmclient.h"
00032 
00033 class AlarmDockWindow : public KSystemTray
00034 {
00035     Q_OBJECT
00036   public:
00037     AlarmDockWindow(KOAlarmClient *, QWidget *parent = 0L, const char *name = 0L);
00038     virtual ~AlarmDockWindow();
00039 
00040     bool alarmsOn()        { return contextMenu()->isItemChecked(mAlarmsEnabledId); }
00041     bool autostartGuiOn()  { return contextMenu()->isItemChecked(mAutostartGuiId); }
00042 
00043     void setGuiAutostart(bool on);
00044 
00045   protected:
00046     void mousePressEvent(QMouseEvent*);
00047     void closeEvent(QCloseEvent*);
00048 
00049   public slots:
00050     void toggleAlarmsEnabled();
00051     void toggleGuiAutostart()     { setGuiAutostart(!autostartGuiOn()); }
00052   
00053   protected slots:
00054     void configureAlarmDaemon();
00055 
00056   protected:
00057     QPixmap    mPixmapEnabled, mPixmapDisabled;
00058     int        mAlarmsEnabledId;     // alarms enabled item in menu
00059     int        mAutostartGuiId;      // GUI autostart item in menu
00060 
00061   private:
00062     // DCOP interface
00063     void       handleEvent(const QString& calendarURL, const QString& eventID);
00064 
00065     KOAlarmClient   *mAlarmGui;
00066 };
00067 
00068 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:21 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001