kalarm Library API Documentation

traywindow.h

00001 /*
00002  *  traywindow.h  -  the KDE system tray applet
00003  *  Program:  kalarm
00004  *  (C) 2002 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
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #ifndef TRAYWINDOW_H
00022 #define TRAYWINDOW_H
00023 
00024 #include <ksystemtray.h>
00025 class KPopupMenu;
00026 class KAction;
00027 
00028 class KAlarmMainWindow;
00029 
00030 
00031 class TrayWindow : public KSystemTray
00032 {
00033                 Q_OBJECT
00034         public:
00035                 TrayWindow(KAlarmMainWindow* parent, const char* name = 0L);
00036                 ~TrayWindow();
00037                 void              removeWindow(KAlarmMainWindow*);
00038                 KAlarmMainWindow* assocMainWindow() const  { return mAssocMainWindow; }
00039                 void              setAssocMainWindow(KAlarmMainWindow* win)   { mAssocMainWindow = win; }
00040 
00041         public slots:
00042                 void              slotQuit();
00043 
00044         signals:
00045                 void              deleted();
00046 
00047         protected:
00048                 virtual void      contextMenuAboutToShow(KPopupMenu*);
00049                 void              mousePressEvent(QMouseEvent*);
00050                 void              mouseReleaseEvent(QMouseEvent*);
00051 
00052         private slots:
00053                 void              setEnabledStatus(bool status);
00054 
00055         private:
00056                 KAlarmMainWindow* mAssocMainWindow;     // main window associated with this, or null
00057                 QPixmap           mPixmapEnabled, mPixmapDisabled;
00058                 KAction*          mActionQuit;          // quit action for system tray window
00059                 int               mAlarmsEnabledId;     // alarms enabled item in menu
00060                 bool              mQuitReplaced;        // the context menu Quit item has been replaced
00061                 KActionCollection mActionCollection;
00062 };
00063 
00064 #endif // TRAYWINDOW_H
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:03 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001