summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 88d69c6..fc2bc77 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -1,97 +1,96 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2001 4 Copyright (c) 2001
5 Cornelius Schumacher <schumacher@kde.org> 5 Cornelius Schumacher <schumacher@kde.org>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 20
21 As a special exception, permission is given to link this program 21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable, 22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution. 23 without including the source code for Qt in the source distribution.
24*/ 24*/
25 25
26#include <qwidgetstack.h> 26#include <qwidgetstack.h>
27 27
28#include <kconfig.h> 28#include <kconfig.h>
29#include <kglobal.h> 29#include <kglobal.h>
30#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
31#include <qpe/qpeapplication.h> 31#include <qpe/qpeapplication.h>
32#else 32#else
33#include <qapplication.h> 33#include <qapplication.h>
34#endif 34#endif
35#include "calendarview.h" 35#include "calendarview.h"
36#include "datenavigator.h" 36#include "datenavigator.h"
37#include "kotodoview.h" 37#include "kotodoview.h"
38#include "koagendaview.h" 38#include "koagendaview.h"
39#include "kodialogmanager.h" 39#include "kodialogmanager.h"
40#include "komonthview.h" 40#include "komonthview.h"
41#include "kolistview.h" 41#include "kolistview.h"
42#include "kowhatsnextview.h" 42#include "kowhatsnextview.h"
43#include "kojournalview.h" 43#include "kojournalview.h"
44#include "kotimespanview.h" 44#include "kotimespanview.h"
45#include "koprefs.h" 45#include "koprefs.h"
46#include "navigatorbar.h" 46#include "navigatorbar.h"
47 47
48#include "koviewmanager.h" 48#include "koviewmanager.h"
49#include "koviewmanager.moc"
50//extern bool externFlagMonthviewBlockPainting; 49//extern bool externFlagMonthviewBlockPainting;
51 50
52//bool globalFlagBlockPainting = false; 51//bool globalFlagBlockPainting = false;
53int globalFlagBlockAgenda = 0; 52int globalFlagBlockAgenda = 0;
54int globalFlagBlockLabel = 0; 53int globalFlagBlockLabel = 0;
55int globalFlagBlockAgendaItemPaint = 1; 54int globalFlagBlockAgendaItemPaint = 1;
56int globalFlagBlockAgendaItemUpdate = 1; 55int globalFlagBlockAgendaItemUpdate = 1;
57 56
58 57
59KOViewManager::KOViewManager( CalendarView *mainView ) : 58KOViewManager::KOViewManager( CalendarView *mainView ) :
60 QObject(), mMainView( mainView ) 59 QObject(), mMainView( mainView )
61{ 60{
62 mCurrentView = 0; 61 mCurrentView = 0;
63 62
64 mWhatsNextView = 0; 63 mWhatsNextView = 0;
65 mTodoView = 0; 64 mTodoView = 0;
66 mAgendaView = 0; 65 mAgendaView = 0;
67 mMonthView = 0; 66 mMonthView = 0;
68 mListView = 0; 67 mListView = 0;
69 mJournalView = 0; 68 mJournalView = 0;
70 mTimeSpanView = 0; 69 mTimeSpanView = 0;
71 mCurrentAgendaView = 0 ; 70 mCurrentAgendaView = 0 ;
72 mFlagShowNextxDays = false; 71 mFlagShowNextxDays = false;
73} 72}
74 73
75KOViewManager::~KOViewManager() 74KOViewManager::~KOViewManager()
76{ 75{
77} 76}
78 77
79 78
80KOrg::BaseView *KOViewManager::currentView() 79KOrg::BaseView *KOViewManager::currentView()
81{ 80{
82 return mCurrentView; 81 return mCurrentView;
83} 82}
84 83
85void KOViewManager::readSettings(KConfig *config) 84void KOViewManager::readSettings(KConfig *config)
86{ 85{
87 config->setGroup("General"); 86 config->setGroup("General");
88 QString view = config->readEntry("Current View"); 87 QString view = config->readEntry("Current View");
89 if (view == "WhatsNext") showWhatsNextView(); 88 if (view == "WhatsNext") showWhatsNextView();
90 else if (view == "Month") showMonthView(); 89 else if (view == "Month") showMonthView();
91 else if (view == "List") showListView(); 90 else if (view == "List") showListView();
92 else if (view == "Journal") showJournalView(); 91 else if (view == "Journal") showJournalView();
93 else if (view == "TimeSpan") showTimeSpanView(); 92 else if (view == "TimeSpan") showTimeSpanView();
94 else if (view == "Todo") showTodoView(); 93 else if (view == "Todo") showTodoView();
95 else { 94 else {
96 showAgendaView(); 95 showAgendaView();
97 } 96 }