korganizer

koviewmanager.h

00001 /*
00002   This file is part of KOrganizer.
00003 
00004   Copyright (c) 2001 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 Qt, and distribute the resulting executable,
00023   without including the source code for Qt in the source distribution.
00024 */
00025 #ifndef KOVIEWMANAGER_H
00026 #define KOVIEWMANAGER_H
00027 
00028 #include <qobject.h>
00029 class QWidget;
00030 class QTabWidget;
00031 
00032 class CalendarView;
00033 
00034 class KOListView;
00035 class KOAgendaView;
00036 class KOMonthView;
00037 class KOTodoView;
00038 class KOWhatsNextView;
00039 class KOJournalView;
00040 class KOTimelineView;
00041 
00042 namespace KOrg {
00043   class BaseView;
00044   class MultiAgendaView;
00045 }
00046 using namespace KCal;
00047 
00052 class KOViewManager : public QObject
00053 {
00054     Q_OBJECT
00055   public:
00056     KOViewManager( CalendarView * );
00057     virtual ~KOViewManager();
00058 
00060     void showView( KOrg::BaseView * );
00061 
00062     void readSettings( KConfig *config );
00063     void writeSettings( KConfig *config );
00064 
00066     void readCurrentView( KConfig * );
00068     void writeCurrentView( KConfig * );
00069 
00070     KOrg::BaseView *currentView();
00071 
00072     void setDocumentId( const QString & );
00073 
00074     void updateView();
00075     void updateView( const QDate &start, const QDate &end );
00076 
00077     void goMenu( bool enable );
00078     void raiseCurrentView();
00079 
00080     void connectView( KOrg::BaseView * );
00081     void addView( KOrg::BaseView * );
00082 
00083     Incidence *currentSelection();
00084     QDate currentSelectionDate();
00085 
00086     KOAgendaView *agendaView() const { return mAgendaView; }
00087     KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; }
00088     KOTodoView *todoView() const { return mTodoView; }
00089     KOMonthView *monthView() const { return mMonthView; }
00090 
00091     void updateMultiCalendarDisplay();
00092 
00093   public slots:
00094     void showWhatsNextView();
00095     void showListView();
00096     void showAgendaView();
00097     void showDayView();
00098     void showWorkWeekView();
00099     void showWeekView();
00100     void showNextXView();
00101     void showMonthView();
00102     void showTodoView();
00103     void showTimelineView();
00104     void showJournalView();
00105 
00106     void showEventView();
00107 
00108     void connectTodoView( KOTodoView *todoView );
00109 
00110     void zoomInHorizontally();
00111     void zoomOutHorizontally();
00112     void zoomInVertically();
00113     void zoomOutVertically();
00114 
00115     void resourcesChanged();
00116 
00117   private slots:
00118     void currentAgendaViewTabChanged( QWidget* );
00119   private:
00120     QWidget* widgetForView( KOrg::BaseView* ) const;
00121     CalendarView *mMainView;
00122 
00123     KOAgendaView    *mAgendaView;
00124     MultiAgendaView *mAgendaSideBySideView;
00125     KOListView      *mListView;
00126     KOMonthView     *mMonthView;
00127     KOTodoView      *mTodoView;
00128     KOWhatsNextView *mWhatsNextView;
00129     KOJournalView   *mJournalView;
00130     KOTimelineView  *mTimelineView;
00131 
00132     KOrg::BaseView *mCurrentView;
00133 
00134     KOrg::BaseView *mLastEventView;
00135     QTabWidget *mAgendaViewTabs;
00136 };
00137 
00138 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys