summaryrefslogtreecommitdiffstats
path: root/karm/mainwindow.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /karm/mainwindow.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/mainwindow.h')
-rw-r--r--karm/mainwindow.h119
1 files changed, 119 insertions, 0 deletions
diff --git a/karm/mainwindow.h b/karm/mainwindow.h
new file mode 100644
index 000000000..7f066af30
--- /dev/null
+++ b/karm/mainwindow.h
@@ -0,0 +1,119 @@
+#ifndef KARM_MAIN_WINDOW_H
+#define KARM_MAIN_WINDOW_H
+
+#include <kparts/mainwindow.h>
+
+#include "karmerrors.h"
+#include <karmdcopiface.h>
+#include "reportcriteria.h"
+
+class KAccel;
+class KAccelMenuWatch;
+class KarmTray;
+class QListViewItem;
+class QPoint;
+class QString;
+
+class Preferences;
+class PrintDialog;
+class Task;
+class TaskView;
+
+/**
+ * Main window to tie the application together.
+ */
+
+class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
+{
+ Q_OBJECT
+
+ private:
+ void makeMenus();
+ QString _hasTask( Task* task, const QString &taskname ) const;
+ Task* _hasUid( Task* task, const QString &uid ) const;
+
+ KAccel* _accel;
+ KAccelMenuWatch* _watcher;
+ TaskView* _taskView;
+ long _totalSum;
+ long _sessionSum;
+ Preferences* _preferences;
+ KarmTray* _tray;
+ KAction* actionStart;
+ KAction* actionStop;
+ KAction* actionStopAll;
+ KAction* actionDelete;
+ KAction* actionEdit;
+ KAction* actionMarkAsComplete;
+ KAction* actionMarkAsIncomplete;
+ KAction* actionPreferences;
+ KAction* actionClipTotals;
+ KAction* actionClipHistory;
+ QString m_error[ KARM_MAX_ERROR_NO + 1 ];
+
+ friend class KarmTray;
+
+ //private:
+
+ //KDialogBase *dialog;
+
+
+
+ public:
+ MainWindow( const QString &icsfile = "" );
+ virtual ~MainWindow();
+
+ // DCOP
+ QString version() const;
+ QString taskIdFromName( const QString &taskName ) const;
+ /** @reimp from KarmDCOPIface::addTask */
+ int addTask( const QString &storage );
+ /** @reimp from KarmDCOPIface::setPerCentComplete */
+ QString setPerCentComplete( const QString& taskName, int PerCent );
+ /** @reimp from KarmDCOPIface::bookTime */
+ int bookTime( const QString& taskId, const QString& iso8601StartDateTime, long durationInMinutes );
+ /** @reimp from KarmDCOPIface::getError */
+ QString getError( int karmErrorNumber ) const;
+ int totalMinutesForTaskId( const QString& taskId );
+ /** start the timer for taskname */
+ QString starttimerfor( const QString &taskname );
+ /** stop the timer for taskname */
+ QString stoptimerfor( const QString &taskname );
+ QString deletetodo();
+ /** shall there be a "really delete" question */
+ bool getpromptdelete();
+ /** set if there will be a "really delete" question */
+ QString setpromptdelete( bool prompt );
+ QString exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote );
+ QString importplannerfile( QString filename );
+
+ public slots:
+ void setStatusBar( QString );
+ void quit();
+
+ protected slots:
+ void keyBindings();
+ void startNewSession();
+ void resetAllTimes();
+ void updateTime( long, long );
+ void updateStatusBar();
+ bool save();
+ void exportcsvHistory();
+ void print();
+ void slotSelectionChanged();
+ void contextMenuRequest( QListViewItem*, const QPoint&, int );
+ void enableStopAll();
+ void disableStopAll();
+// void timeLoggingChanged( bool on );
+
+ protected:
+ void startStatusBar();
+ virtual void saveProperties( KConfig* );
+ virtual void readProperties( KConfig* );
+ void saveGeometry();
+ void loadGeometry();
+ bool queryClose();
+
+};
+
+#endif // KARM_MAIN_WINDOW_H