korganizer.h
00001
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 #ifndef KORGANIZER_H
00029 #define KORGANIZER_H
00030
00031 #include <qframe.h>
00032 #include <qlayout.h>
00033 #include <qwidget.h>
00034 #include <qptrlist.h>
00035 #include <qtabdialog.h>
00036 #include <qframe.h>
00037 #include <qsplitter.h>
00038
00039 #include <ktoolbar.h>
00040 #include <kapplication.h>
00041 #include <klocale.h>
00042 #include <kstatusbar.h>
00043 #include <kmenubar.h>
00044 #include <kurl.h>
00045
00046 #include <libkcal/calendar.h>
00047
00048 #include <korganizer/mainwindow.h>
00049 #include <korganizer/part.h>
00050
00051 #include "kalarmd/alarmdaemoniface_stub.h"
00052
00053 #include "calendarview.h"
00054 #include "korganizeriface.h"
00055
00056 class KTempFile;
00057 class KRecentFilesAction;
00058 class KOWindowList;
00059 class KToggleAction;
00060 class KProcess;
00061
00062 class KONewStuff;
00063
00064 using namespace KCal;
00065
00074 class KOrganizer : public KOrg::MainWindow, virtual public KOrganizerIface
00075 {
00076 Q_OBJECT
00077 public:
00083 KOrganizer( const char *name=0 );
00084 virtual ~KOrganizer();
00085
00086 KOrg::CalendarViewBase *view() const { return mCalendarView; }
00087
00092 bool openURL(const KURL &url,bool merge=false);
00094 bool mergeURL(const KURL &url);
00096 bool saveURL();
00098 bool saveAsURL(const KURL & kurl);
00100 bool saveModifiedURL();
00102 KURL getCurrentURL() const { return mURL; }
00103
00105 static KOrganizer* findInstance(const KURL &url);
00106 static void setStartedKAddressBook(bool tmpBool) { startedKAddressBook = tmpBool; }
00108 bool openURL(QString url);
00110 bool mergeURL(QString url);
00112 bool saveAsURL(QString url);
00114 void closeURL();
00116 QString getCurrentURLasString() const;
00118 virtual bool deleteEvent(QString uid);
00119
00120 bool isActive() { return mActive; }
00121
00122 QString localFileName();
00123
00124 signals:
00125
00129 void configChanged();
00130
00133 void closingDown();
00134
00136 void calendarActivated(KOrganizer *);
00137
00138 public slots:
00139
00142 void updateConfig();
00143
00149 void setActive(bool active=true);
00150
00152 void makeActive();
00153
00155 void showStatusMessage(const QString &);
00156
00157 protected slots:
00158
00162 void readSettings();
00163
00165 void writeSettings();
00166
00168 void file_new();
00169
00171 void file_open();
00172
00174 void file_openRecent(const KURL& url);
00175
00177 void file_import();
00178
00180 void file_merge();
00181
00183 void file_revert();
00184
00186 void file_archive();
00187
00189 void file_save();
00190
00192 void file_saveas();
00193
00195 void file_close();
00196
00198 void file_quit();
00199
00201 void configureDateTime();
00202
00204 void configureToolbars();
00205
00207 void editKeys();
00208
00210 void showTip();
00211
00213 void showTipOnStart();
00214
00215 void processIncidenceSelection( Incidence * );
00216
00217 void downloadNewStuff();
00218 void uploadNewStuff();
00219
00220 protected slots:
00221
00223 void toggleToolBars(bool);
00224
00225 void toggleToolBar();
00226
00227 void toggleStatusBar();
00228
00229 void toggleFilterView();
00230
00231 void statusBarPressed(int);
00232
00234 void checkAutoSave();
00235
00237 void setTitle();
00238
00239 void setNumIncoming(int);
00240 void setNumOutgoing(int);
00241
00242 void configureDateTimeFinished(KProcess *);
00243
00244 void slotNewToolbarConfig();
00245
00246 protected:
00247 void initActions();
00248
00249
00251 bool queryClose();
00252 bool queryExit();
00253
00254
00255 void saveProperties(KConfig *);
00256 void readProperties(KConfig *);
00257
00259 KURL getSaveURL();
00260
00261 void enableIncidenceActions( bool enable );
00262
00263 private slots:
00264 void dumpText(const QString &);
00265
00266 private:
00267 void writeActiveState();
00268
00269
00270 CalendarView *mCalendarView;
00271 KOrg::Part::List mParts;
00272 KURL mURL;
00273 QString mFile;
00274 QString mLastUrl;
00275
00276 KTempFile *mTempFile;
00277
00278 QTimer *mAutoSaveTimer;
00279
00280 bool mActive;
00281
00282
00283 static KOWindowList *windowList;
00284
00285
00286 KRecentFilesAction *mRecent;
00287
00288 QPtrList<KAction> mToolBarToggles;
00289 KToggleAction *mToolBarToggleAction;
00290
00291 KToggleAction *mStatusBarAction;
00292 KToggleAction *mFilterViewAction;
00293
00294 KAction *mShowIncidenceAction;
00295 KAction *mEditIncidenceAction;
00296 KAction *mDeleteIncidenceAction;
00297
00298 KAction *mCutAction;
00299 KAction *mCopyAction;
00300 KAction *mDeleteAction;
00301
00302 KAction *mNextXDays;
00303
00304 KAction *mPublishEvent;
00305
00306
00307 enum { ID_HISTORY, ID_GENERAL, ID_ACTIVE, ID_MESSAGES_IN, ID_MESSAGES_OUT };
00308
00309 AlarmDaemonIface_stub mAlarmDaemonIface;
00310
00311 static bool startedKAddressBook;
00312
00313 KONewStuff *mNewStuff;
00314
00315
00316
00317 bool mHtmlExportSync;
00318 };
00319
00320 #endif
This file is part of the documentation for kdelibs Version 3.1.4.