ktimetracker
mainwindow.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 KARM_MAIN_WINDOW_H 00024 #define KARM_MAIN_WINDOW_H 00025 00026 #include <KParts/MainWindow> 00027 00028 #include "karmerrors.h" 00029 #include "reportcriteria.h" 00030 00031 class KAccel; 00032 class KAccelMenuWatch; 00033 class KAction; 00034 class TrayIcon; 00035 class QPoint; 00036 class QString; 00037 00038 class Task; 00039 class TimetrackerWidget; 00040 00045 class MainWindow : public KParts::MainWindow 00046 { 00047 Q_OBJECT 00048 00049 private: 00050 void makeMenus(); 00051 00052 KAccel* _accel; 00053 KAccelMenuWatch* _watcher; 00054 long _totalSum; 00055 long _sessionSum; 00056 TrayIcon* _tray; 00057 KAction* actionKeyBindings; 00058 00059 TimetrackerWidget *mainWidget; 00060 00061 friend class TrayIcon; 00062 00063 public: 00064 MainWindow( const QString &icsfile = "" ); 00065 virtual ~MainWindow(); 00066 00067 public Q_SLOTS: 00068 void slotSetCaption( const QString& ); 00069 void setStatusBar( const QString& ); 00071 void quit(); 00072 protected Q_SLOTS: 00073 void keyBindings(); 00074 void startNewSession(); 00075 void updateTime( long, long ); 00080 void reSetTimes(); 00081 void updateStatusBar(); 00082 void taskViewCustomContextMenuRequested( const QPoint& ); 00083 00084 protected: 00085 void startStatusBar(); 00086 /* reimp */ void readProperties( const KConfigGroup &config ); 00087 /* reimp */ void saveProperties( KConfigGroup &config ); 00088 void saveGeometry(); 00089 void loadGeometry(); 00090 bool queryClose(); 00091 }; 00092 00093 #endif // KARM_MAIN_WINDOW_H
KDE 4.2 API Reference