krop's commit fixes my problem in a better way, reverting
[kdepim.git] / ktimetracker / ktimetrackerpart.h
blob8055b0d8c3fd52da44271d2388afbe22521ab46b
1 /*
2 * Copyright (C) 2005-2008 by Thorsten Staerk <kde@staerk.de>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the
16 * Free Software Foundation, Inc.
17 * 51 Franklin Street, Fifth Floor
18 * Boston, MA 02110-1301 USA.
22 #ifndef _KTIMETRACKERPART_H_
23 #define _KTIMETRACKERPART_H_
25 #include <kparts/part.h>
26 #include <kparts/factory.h>
27 #include "reportcriteria.h"
29 class TrayIcon;
30 class QWidget;
31 class TimetrackerWidget;
33 /**
34 * This is a "Part". It that does all the real work in a KPart
35 * application.
37 * @short Main Part
38 * @author Thorsten Staerk (kde at staerk dot de)
39 * @version 0.1
41 class ktimetrackerpart : public KParts::ReadWritePart
43 Q_OBJECT
45 private:
46 void makeMenus();
47 TrayIcon *mTray;
48 TimetrackerWidget *mMainWidget;
51 friend class TrayIcon;
53 public:
54 ktimetrackerpart(QWidget *parentWidget, QObject *parent, const QVariantList&);
56 TimetrackerWidget* MainWidget() { return mMainWidget; };
58 virtual ~ktimetrackerpart();
59 static KAboutData *createAboutData();
60 /**
61 * openFile() opens the icalendar file that contains the tasks and events.
62 * It has been inherited from KParts::ReadWritePart where it was protected
63 * openFile() just calls openFile(<standard ical file>).
65 virtual bool openFile();
66 virtual bool openFile(QString icsfile);
68 protected:
69 virtual bool saveFile();
71 public Q_SLOTS:
72 void setStatusBar(const QString & qs);
75 #endif // _KTIMETRACKERPART_H_