ktimetracker
tray.h
Go to the documentation of this file.00001 /* 00002 * Copyright (C) 2003 by Scott Monachello <smonach@cox.net> 00003 * 2007 the ktimetracker developers 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the 00017 * Free Software Foundation, Inc. 00018 * 51 Franklin Street, Fifth Floor 00019 * Boston, MA 02110-1301 USA. 00020 * 00021 */ 00022 00023 #ifndef TRAY_ICON_H 00024 #define TRAY_ICON_H 00025 00026 #include <QList> 00027 #include <QVector> 00028 00029 #include <KSystemTrayIcon> 00030 00031 #include "task.h" 00032 #include "ktimetrackerpart.h" 00033 00034 class QTimer; 00035 class MainWindow; 00036 00037 class TrayIcon : public KSystemTrayIcon 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 TrayIcon(MainWindow * parent); 00043 TrayIcon(ktimetrackerpart *); 00044 TrayIcon(); 00045 ~TrayIcon(); 00046 00047 private: 00048 int _activeIcon; 00049 static QVector<QPixmap*> *icons; 00050 QTimer *_taskActiveTimer; 00051 00052 public Q_SLOTS: 00053 void startClock(); 00054 void stopClock(); 00055 void resetClock(); 00056 void updateToolTip( QList<Task*> activeTasks); 00057 void initToolTip(); 00058 00059 protected Q_SLOTS: 00060 void advanceClock(); 00061 00062 // experiment 00063 /* 00064 void insertTitle(QString title); 00065 00066 private: 00067 KMenu *trayPopupMenu; 00068 QPopupMenu *trayPopupMenu2; 00069 */ 00070 }; 00071 00072 #endif // KARM_TRAY_H
KDE 4.2 API Reference