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 TQt, and distribute the resulting executable, 00023 without including the source code for TQt in the source distribution. 00024 */ 00025 #ifndef KORGANIZER_PART_H 00026 #define KORGANIZER_PART_H 00027 00028 #include <kurl.h> 00029 #include <tdeparts/part.h> 00030 00031 #include <korganizer/mainwindow.h> 00032 00033 00034 class TDEInstance; 00035 class TDEAboutData; 00036 class TDEProcess; 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 TQDate; 00055 00056 class KOrganizerPart: public KParts::ReadOnlyPart, 00057 public KOrg::MainWindow 00058 { 00059 Q_OBJECT 00060 00061 public: 00062 KOrganizerPart( TQWidget *parentWidget, const char *widgetName, 00063 TQObject *parent, const char *name, const TQStringList & ); 00064 virtual ~KOrganizerPart(); 00065 00066 static TDEAboutData *createAboutData(); 00067 00068 virtual KOrg::CalendarViewBase *view() const; 00069 00071 virtual bool openURL( const KURL &url, bool merge = false ); 00073 virtual bool saveURL(); 00075 virtual bool saveAsURL( const KURL &kurl ); 00076 00078 virtual KURL getCurrentURL() const; 00079 00080 virtual KXMLGUIFactory *mainGuiFactory() { return factory(); } 00081 virtual KXMLGUIClient *mainGuiClient() { return this; } 00082 virtual TQWidget *topLevelWidget(); 00083 virtual ActionManager *actionManager(); 00084 virtual TDEActionCollection *getActionCollection() const { return actionCollection(); } 00085 virtual void showStatusMessage( const TQString &message ); 00086 00087 virtual bool isCurrentlyActivePart(); 00088 00089 void setTitle(); 00090 00091 public slots: 00092 void slotChangeInfo( Incidence *incidence, const TQDate & ); 00093 00094 protected: 00095 virtual bool openFile(); 00096 00097 protected slots: 00098 void startCompleted( TDEProcess * ); 00099 00100 private: 00101 CalendarView *mView; 00102 ActionManager *mActionManager; 00103 KParts::StatusBarExtension *mStatusBarExtension; 00104 TQWidget *mTopLevelWidget; 00105 00106 signals: 00107 void textChanged( const TQString & ); 00108 }; 00109 00110 #endif