korganizer
korganizer.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef KORGANIZER_H
00032 #define KORGANIZER_H
00033
00034 #include <kurl.h>
00035
00036 #include <korganizer/mainwindow.h>
00037 #include <korganizer/part.h>
00038 #include <kparts/mainwindow.h>
00039
00040 class KTempFile;
00041 class KRecentFilesAction;
00042 class KOWindowList;
00043 class KToggleAction;
00044 class KProcess;
00045 class KONewStuff;
00046 class ActionManager;
00047 class CalendarView;
00048
00049 namespace KCal { class CalendarResources; }
00050
00051 using namespace KCal;
00052
00053
00054 typedef KOrg::MainWindow KOrgMainWindow;
00055 typedef KParts::MainWindow KPartsMainWindow;
00056
00065 class KOrganizer : public KPartsMainWindow, public KOrgMainWindow
00066 {
00067 Q_OBJECT
00068 public:
00073 KOrganizer( const char *name = 0 );
00074 virtual ~KOrganizer();
00075
00076 void init( bool hasDocument );
00077
00078 KOrg::CalendarViewBase *view() const;
00079 ActionManager *actionManager() { return mActionManager; }
00080 KActionCollection *getActionCollection() const { return actionCollection(); }
00081
00086 bool openURL( const KURL &url, bool merge = false );
00088 bool saveURL();
00090 bool saveAsURL( const KURL & kurl );
00092 KURL getCurrentURL() const;
00093
00094 virtual KXMLGUIFactory *mainGuiFactory() { return factory(); }
00095 virtual KXMLGUIClient *mainGuiClient() { return this; }
00096 virtual QWidget *topLevelWidget() { return this; }
00097
00098 virtual bool isCurrentlyActivePart();
00099
00100 public slots:
00102 void showStatusMessage( const QString & );
00103
00104 protected slots:
00105
00109 void readSettings();
00110
00112 void writeSettings();
00113
00114 void statusBarPressed( int );
00115
00117 void setTitle();
00118
00119 void newMainWindow( const KURL & );
00120
00121 protected:
00122 void initActions();
00123
00124
00126 bool queryClose();
00127 bool queryExit();
00128
00129
00130 void saveProperties( KConfig * );
00131 void readProperties( KConfig * );
00132
00133 private:
00134 CalendarView *mCalendarView;
00135 KOrg::Part::List mParts;
00136
00137
00138 enum { ID_HISTORY, ID_GENERAL, ID_ACTIVE, ID_MESSAGES_IN, ID_MESSAGES_OUT };
00139 ActionManager *mActionManager;
00140 };
00141
00142 #endif
|