korganizer Library API Documentation

koviewmanager.h

00001 /*
00002   This file is part of KOrganizer.
00003 
00004   Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00005 
00006   This program is free software; you can redistribute it and/or modify
00007   it under the terms of the GNU General Public License as published by
00008   the Free Software Foundation; either version 2 of the License, or
00009   (at your option) any later version.
00010 
00011   This program is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014   GNU General Public License for more details.
00015 
00016   You should have received a copy of the GNU General Public License
00017   along with this program; if not, write to the Free Software
00018   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020   As a special exception, permission is given to link this program
00021   with any edition of Qt, and distribute the resulting executable,
00022   without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef KOVIEWMANAGER_H
00025 #define KOVIEWMANAGER_H
00026 
00027 #include <qobject.h>
00028 
00029 #include <korganizer/baseview.h>
00030 
00031 class CalendarView;
00032 
00033 class KOListView;
00034 class KOAgendaView;
00035 class KOMonthView;
00036 class KOTimeSpanView;
00037 class KOTodoView;
00038 class KOWhatsNextView;
00039 class KOJournalView;
00040 
00041 using namespace KCal;
00042 
00047 class KOViewManager : public QObject
00048 {
00049     Q_OBJECT
00050   public:
00051     KOViewManager( CalendarView * );
00052     virtual ~KOViewManager();
00053 
00055     void showView( KOrg::BaseView * );
00056 
00057     void readSettings( KConfig *config );
00058     void writeSettings( KConfig *config );
00059 
00061     void readCurrentView( KConfig * );
00063     void writeCurrentView( KConfig * );
00064 
00065     KOrg::BaseView *currentView();
00066 
00067     void setDocumentId( const QString & );
00068 
00069     void updateView();
00070     void updateView( const QDate &start, const QDate &end );
00071 
00072     void raiseCurrentView();
00073 
00074     void addView( KOrg::BaseView * );
00075 
00076     Incidence *currentSelection();
00077     QDate currentSelectionDate();
00078 
00079     KOAgendaView *agendaView() const { return mAgendaView; }
00080 
00081   public slots:
00082     void showWhatsNextView();
00083     void showListView();
00084     void showAgendaView();
00085     void showDayView();
00086     void showWorkWeekView();
00087     void showWeekView();
00088     void showNextXView();
00089     void showMonthView();
00090     void showTodoView();
00091     void showJournalView();
00092     void showTimeSpanView();
00093 
00094     void showEventView();
00095 
00096     void connectTodoView( KOTodoView *todoView );
00097 
00098   private:
00099     CalendarView *mMainView;
00100 
00101     KOAgendaView    *mAgendaView;
00102     KOListView      *mListView;
00103     KOMonthView     *mMonthView;
00104     KOTodoView      *mTodoView;
00105     KOWhatsNextView *mWhatsNextView;
00106     KOJournalView   *mJournalView;
00107     KOTimeSpanView  *mTimeSpanView;
00108 
00109     KOrg::BaseView *mCurrentView;
00110 
00111     KOrg::BaseView *mLastEventView;
00112 
00113     int mAgendaViewMode;
00114 };
00115 
00116 #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:31 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003