korganizer
korganizer_part.h
00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2000,2003 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 00021 As a special exception, permission is given to link this program 00022 with any edition of Qt, and distribute the resulting executable, 00023 without including the source code for Qt in the source distribution. 00024 */ 00025 #ifndef KORGANIZER_PART_H 00026 #define KORGANIZER_PART_H 00027 00028 #include <kurl.h> 00029 #include <kparts/part.h> 00030 00031 #include <korganizer/mainwindow.h> 00032 00033 00034 class KInstance; 00035 class KAboutData; 00036 class KProcess; 00037 00038 class CalendarView; 00039 class ActionManager; 00040 00041 namespace KCal { 00042 class CalendarResources; 00043 class Calendar; 00044 class Incidence; 00045 } 00046 using namespace KCal; 00047 namespace KParts { 00048 class StatusBarExtension; 00049 } 00050 namespace KOrg { 00051 class CalendarViewBase; 00052 } 00053 00054 class KOrganizerPart: public KParts::ReadOnlyPart, 00055 public KOrg::MainWindow 00056 { 00057 Q_OBJECT 00058 public: 00059 KOrganizerPart( QWidget *parentWidget, const char *widgetName, 00060 QObject *parent, const char *name, const QStringList & ); 00061 virtual ~KOrganizerPart(); 00062 00063 static KAboutData *createAboutData(); 00064 00065 virtual KOrg::CalendarViewBase *view() const; 00066 00068 virtual bool openURL( const KURL &url, bool merge = false ); 00070 virtual bool saveURL(); 00072 virtual bool saveAsURL( const KURL &kurl ); 00073 00075 virtual KURL getCurrentURL() const; 00076 00077 virtual KXMLGUIFactory *mainGuiFactory() { return factory(); } 00078 virtual KXMLGUIClient *mainGuiClient() { return this; } 00079 virtual QWidget *topLevelWidget(); 00080 virtual ActionManager *actionManager(); 00081 virtual KActionCollection *getActionCollection() const { return actionCollection(); } 00082 virtual void showStatusMessage( const QString &message ); 00083 00084 void setTitle(); 00085 00086 public slots: 00087 void slotChangeInfo( Incidence * ); 00088 00089 protected: 00090 virtual bool openFile(); 00091 00092 protected slots: 00093 void startCompleted( KProcess * ); 00094 00095 private: 00096 CalendarView *mView; 00097 ActionManager *mActionManager; 00098 KParts::StatusBarExtension *mStatusBarExtension; 00099 QWidget *mTopLevelWidget; 00100 00101 signals: 00102 void textChanged( const QString & ); 00103 }; 00104 00105 #endif