korganizer Library API Documentation

korganizer.h

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 1997, 1998, 1999
00005     Preston Brown (preston.brown@yale.edu)
00006     Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl)
00007     Ian Dawes (iadawes@globalserve.net)
00008     Laszlo Boloni (boloni@cs.purdue.edu)
00009 
00010     Copyright (c) 2000-2003 Cornelius Schumacher <schumacher@kde.org>
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00025 
00026     As a special exception, permission is given to link this program
00027     with any edition of Qt, and distribute the resulting executable,
00028     without including the source code for Qt in the source distribution.
00029 */
00030 #ifndef KORGANIZER_H
00031 #define KORGANIZER_H
00032 
00033 #include <qframe.h>
00034 #include <qlayout.h>
00035 #include <qwidget.h>
00036 #include <qptrlist.h>
00037 #include <qtabdialog.h>
00038 #include <qsplitter.h>
00039 
00040 #include <ktoolbar.h>
00041 #include <kapplication.h>
00042 #include <klocale.h>
00043 #include <kstatusbar.h>
00044 #include <kmenubar.h>
00045 #include <kurl.h>
00046 
00047 #include <libkcal/calendar.h>
00048 
00049 #include <korganizer/mainwindow.h>
00050 #include <korganizer/part.h>
00051 #include <kparts/mainwindow.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 class KONewStuff;
00062 class ActionManager;
00063 class CalendarView;
00064 
00065 namespace KCal { class CalendarResources; }
00066 
00067 using namespace KCal;
00068 
00069 // Workaround for moc workaround for visual c++ 6.0 sucking
00070 typedef KOrg::MainWindow KOrgMainWindow;
00071 typedef KParts::MainWindow KPartsMainWindow;
00072 
00081 class KOrganizer : public KPartsMainWindow, virtual public KOrganizerIface,
00082                    public KOrgMainWindow
00083 {
00084     Q_OBJECT
00085   public:
00093     KOrganizer( const char *name = 0 );
00094     virtual ~KOrganizer();
00095 
00096     void init( bool hasDocument );
00097 
00098     KOrg::CalendarViewBase *view() const;
00099     ActionManager *actionManager() { return mActionManager; }
00100 
00105     bool openURL( const KURL &url, bool merge = false );
00107     bool saveURL();
00109     bool saveAsURL( const KURL & kurl );
00111     KURL getCurrentURL() const;
00112 
00114     bool openURL( QString url );
00116     bool mergeURL( QString url );
00118     bool saveAsURL( QString url );
00120     void closeURL();
00122     QString getCurrentURLasString() const;
00124     virtual bool deleteEvent( QString uid );
00125 
00126     bool eventRequest( QString request, QCString receiver, QString ical );
00127     bool eventReply( QString ical );
00128 
00129     virtual KXMLGUIFactory *mainGuiFactory() { return factory(); }
00130     virtual KXMLGUIClient *mainGuiClient() { return this; }
00131     virtual QWidget *topLevelWidget() { return this; }
00132 
00133   public slots:
00135     void showStatusMessage( const QString & );
00136 
00137   protected slots:
00138 
00142     void readSettings();
00143 
00145     void writeSettings();
00146 
00148     void configureToolbars();
00149 
00150     void toggleStatusBar();
00151 
00152     void statusBarPressed( int );
00153 
00155     void setTitle();
00156 
00157     void setNumIncoming( int );
00158     void setNumOutgoing( int );
00159 
00160     void newMainWindow( const KURL & );
00161 
00162     void configureKeyBindings();
00163 
00164   protected:
00165     void initActions();
00166 //    void initViews();
00167 
00169     bool queryClose();
00170     bool queryExit();
00171 
00172     /* Session management */
00173     void saveProperties( KConfig * );
00174     void readProperties( KConfig * );
00175 
00176   private:
00177     CalendarView *mCalendarView;  // Main view widget
00178     KOrg::Part::List mParts; // List of parts loaded
00179 
00180     KToggleAction *mStatusBarAction;
00181 
00182     // status bar ids
00183     enum { ID_HISTORY, ID_GENERAL, ID_ACTIVE, ID_MESSAGES_IN, ID_MESSAGES_OUT };
00184     ActionManager *mActionManager;
00185 };
00186 
00187 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:30 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003