• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

korganizer

  • sources
  • kde-4.12
  • kdepim
  • korganizer
koviewmanager.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
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
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of Qt, and distribute the resulting executable,
23  without including the source code for Qt in the source distribution.
24 */
25 
26 #ifndef KORG_KOVIEWMANAGER_H
27 #define KORG_KOVIEWMANAGER_H
28 
29 #include <calendarviews/eventview.h>
30 
31 #include <KCalCore/IncidenceBase> //for KCalCore::DateList typedef
32 
33 #include <QDate>
34 #include <QObject>
35 
36 class CalendarView;
37 class KOAgendaView;
38 class KOJournalView;
39 class KOListView;
40 class KOTimelineView;
41 class KOTimeSpentView;
42 class KOTodoView;
43 class KOWhatsNextView;
44 namespace KOrg {
45  class BaseView;
46  class MultiAgendaView;
47  class MonthView;
48 }
49 
50 namespace Akonadi {
51  class Item;
52 }
53 
54 class KConfig;
55 class KTabWidget;
56 
61 class KOViewManager : public QObject
62 {
63 
64  Q_OBJECT
65  public:
66 
67  enum RangeMode {
68  NO_RANGE,
69  DAY_RANGE,
70  WORK_WEEK_RANGE,
71  WEEK_RANGE,
72  NEXTX_RANGE,
73  OTHER_RANGE // for example, showing 8 days
74  };
75 
76  explicit KOViewManager( CalendarView * );
77  virtual ~KOViewManager();
78 
80  void showView( KOrg::BaseView * );
81 
82  void readSettings( KConfig *config );
83  void writeSettings( KConfig *config );
84 
86  void readCurrentView( KConfig *config );
88  void writeCurrentView( KConfig *config );
89 
90  KOrg::BaseView *currentView();
91 
92  void setDocumentId( const QString & );
93 
94  void updateView();
95  void updateView( const QDate &start, const QDate &end, const QDate &preferredMonth );
96 
97  void goMenu( bool enable );
98  void raiseCurrentView();
99 
100  void connectView( KOrg::BaseView * );
101  void addView( KOrg::BaseView *, bool isTab = false );
102 
103  Akonadi::Item currentSelection();
104 
109  QDate currentSelectionDate();
110 
111  KOAgendaView *agendaView() const { return mAgendaView; }
112  KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; }
113  KOTodoView *todoView() const { return mTodoView; }
114  KOrg::MonthView *monthView() const { return mMonthView; }
115 
116  void updateMultiCalendarDisplay();
117 
125  bool agendaIsSelected() const;
126 
131  RangeMode rangeMode() const { return mRangeMode; }
132 
133  signals:
134  void configChanged();
135  void datesSelected( const KCalCore::DateList & );
136 
137  public slots:
138  void showWhatsNextView();
139  void showListView();
140  void showAgendaView();
141  void showTodoView();
142  void showTimeLineView();
143  void showTimeSpentView();
144  void showMonthView();
145  void showJournalView();
146  void showEventView();
147 
148  void selectDay();
149  void selectWorkWeek();
150  void selectWeek();
151  void selectNextX();
152 
153  void connectTodoView( KOTodoView *todoView );
154 
155  void zoomInHorizontally();
156  void zoomOutHorizontally();
157  void zoomInVertically();
158  void zoomOutVertically();
159 
165  void addChange( EventViews::EventView::Change change );
166 
167  private slots:
168  void currentAgendaViewTabChanged( QWidget * );
169 
170  private:
171  QWidget *widgetForView( KOrg::BaseView * ) const;
172  QList<KOrg::BaseView*> mViews;
173  CalendarView *mMainView;
174 
175  KOAgendaView *mAgendaView;
176  KOrg::MultiAgendaView *mAgendaSideBySideView;
177  KOListView *mListView;
178  KOTodoView *mTodoView;
179  KOWhatsNextView *mWhatsNextView;
180  KOJournalView *mJournalView;
181  KOTimelineView *mTimelineView;
182  KOTimeSpentView *mTimeSpentView;
183  KOrg::MonthView *mMonthView;
184  KOrg::BaseView *mCurrentView;
185 
186  KOrg::BaseView *mLastEventView;
187  KTabWidget *mAgendaViewTabs;
188  int mAgendaViewTabIndex;
189 
190  RangeMode mRangeMode;
191 };
192 
193 #endif
KOViewManager::setDocumentId
void setDocumentId(const QString &)
Definition: koviewmanager.cpp:650
KOViewManager::showJournalView
void showJournalView()
Definition: koviewmanager.cpp:590
KOViewManager::selectWeek
void selectWeek()
Definition: koviewmanager.cpp:559
KOViewManager::agendaIsSelected
bool agendaIsSelected() const
Returns true if agenda is the current view.
Definition: koviewmanager.cpp:695
KOViewManager::showAgendaView
void showAgendaView()
Definition: koviewmanager.cpp:464
KOViewManager::rangeMode
RangeMode rangeMode() const
Return the current range mode: week, work week, day or nextX days, etc.
Definition: koviewmanager.h:131
KOViewManager::connectView
void connectView(KOrg::BaseView *)
Definition: koviewmanager.cpp:283
KOAgendaView
KOAgendaView is the agenda-like view that displays events in a single or multi-day view...
Definition: koagendaview.h:36
KOTimeSpentView
This view show the time spent on each category.
Definition: kotimespentview.h:38
KOViewManager::showTodoView
void showTodoView()
Definition: koviewmanager.cpp:573
KOrg::MultiAgendaView
Shows one agenda for every resource side-by-side.
Definition: multiagendaview.h:37
KOViewManager::addView
void addView(KOrg::BaseView *, bool isTab=false)
Definition: koviewmanager.cpp:404
KOViewManager::zoomOutHorizontally
void zoomOutHorizontally()
Definition: koviewmanager.cpp:383
QWidget
KOViewManager::showWhatsNextView
void showWhatsNextView()
Definition: koviewmanager.cpp:441
KOViewManager::agendaView
KOAgendaView * agendaView() const
Definition: koviewmanager.h:111
KOViewManager::writeCurrentView
void writeCurrentView(KConfig *config)
Write which view is currently shown to config file.
KOViewManager::addChange
void addChange(EventViews::EventView::Change change)
Notifies all views that an update is needed.
Definition: koviewmanager.cpp:677
KOrg::MonthView
Definition: monthview.h:33
KOViewManager::raiseCurrentView
void raiseCurrentView()
Definition: koviewmanager.cpp:251
QObject
KOViewManager::goMenu
void goMenu(bool enable)
Definition: koviewmanager.cpp:228
KOWhatsNextView
This class provides a view of the next events and todos.
Definition: kowhatsnextview.h:33
KOViewManager::readCurrentView
void readCurrentView(KConfig *config)
Read which view was shown last from config file.
KOViewManager::selectDay
void selectDay()
Definition: koviewmanager.cpp:538
CalendarView
This is the main calendar widget.
Definition: calendarview.h:99
KOViewManager::connectTodoView
void connectTodoView(KOTodoView *todoView)
Definition: koviewmanager.cpp:356
KOViewManager::zoomInVertically
void zoomInVertically()
Definition: koviewmanager.cpp:390
KOViewManager::showEventView
void showEventView()
Definition: koviewmanager.cpp:614
KOViewManager::NEXTX_RANGE
Definition: koviewmanager.h:72
KOViewManager::currentView
KOrg::BaseView * currentView()
Definition: koviewmanager.cpp:74
KOViewManager::zoomInHorizontally
void zoomInHorizontally()
Definition: koviewmanager.cpp:376
KOViewManager::updateMultiCalendarDisplay
void updateMultiCalendarDisplay()
Definition: koviewmanager.cpp:686
KOViewManager::showMonthView
void showMonthView()
Definition: koviewmanager.cpp:427
KOViewManager::showListView
void showListView()
Definition: koviewmanager.cpp:453
KOViewManager::todoView
KOTodoView * todoView() const
Definition: koviewmanager.h:113
KOViewManager::OTHER_RANGE
Definition: koviewmanager.h:73
KOViewManager::DAY_RANGE
Definition: koviewmanager.h:69
KOJournalView
This class provides a journal view.
Definition: kojournalview.h:42
KOListView
Definition: kolistview.h:44
KOViewManager::monthView
KOrg::MonthView * monthView() const
Definition: koviewmanager.h:114
KOTimelineView
This class provides a view ....
Definition: kotimelineview.h:41
KOViewManager::KOViewManager
KOViewManager(CalendarView *)
Definition: koviewmanager.cpp:51
KOViewManager::WORK_WEEK_RANGE
Definition: koviewmanager.h:70
KOViewManager::showView
void showView(KOrg::BaseView *)
changes the view to be the currently selected view
Definition: koviewmanager.cpp:171
KOViewManager::WEEK_RANGE
Definition: koviewmanager.h:71
KOrg::BaseView
This class provides an interface for all views being displayed within the main calendar view...
Definition: baseview.h:51
KOViewManager::updateView
void updateView()
Definition: koviewmanager.cpp:267
KOViewManager::currentSelectionDate
QDate currentSelectionDate()
If there's a selected incidence, it's date is returned, otherwise an invalid QDate is returned...
Definition: koviewmanager.cpp:638
KOViewManager::showTimeSpentView
void showTimeSpentView()
Definition: koviewmanager.cpp:415
KOViewManager::configChanged
void configChanged()
KOViewManager::zoomOutVertically
void zoomOutVertically()
Definition: koviewmanager.cpp:397
KOViewManager::~KOViewManager
virtual ~KOViewManager()
Definition: koviewmanager.cpp:70
KOViewManager::currentSelection
Akonadi::Item currentSelection()
Definition: koviewmanager.cpp:625
KOTodoView
Definition: kotodoview.h:39
KOViewManager::datesSelected
void datesSelected(const KCalCore::DateList &)
KOViewManager::NO_RANGE
Definition: koviewmanager.h:68
KOViewManager::readSettings
void readSettings(KConfig *config)
Definition: koviewmanager.cpp:79
KOViewManager::selectWorkWeek
void selectWorkWeek()
Definition: koviewmanager.cpp:545
KOViewManager::multiAgendaView
KOrg::MultiAgendaView * multiAgendaView() const
Definition: koviewmanager.h:112
KOViewManager
This class manages the views of the calendar.
Definition: koviewmanager.h:61
KOViewManager::selectNextX
void selectNextX()
Definition: koviewmanager.cpp:566
KOViewManager::RangeMode
RangeMode
Definition: koviewmanager.h:67
KOViewManager::showTimeLineView
void showTimeLineView()
Definition: koviewmanager.cpp:602
KOViewManager::writeSettings
void writeSettings(KConfig *config)
Definition: koviewmanager.cpp:128
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korganizer

Skip menu "korganizer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal