• 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
datenavigatorcontainer.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  Copyright (C) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
8  Author: Sergio Martins <sergio@kdab.com>
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License along
21  with this program; if not, write to the Free Software Foundation, Inc.,
22  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 
24  As a special exception, permission is given to link this program
25  with any edition of Qt, and distribute the resulting executable,
26  without including the source code for Qt in the source distribution.
27 */
28 
29 #ifndef KORG_DATENAVIGATORCONTAINER_H
30 #define KORG_DATENAVIGATORCONTAINER_H
31 
32 #include <Akonadi/Calendar/ETMCalendar>
33 
34 #include <QFrame>
35 
36 class KDateNavigator;
37 
38 class DateNavigatorContainer: public QFrame
39 {
40  Q_OBJECT
41  public:
42  explicit DateNavigatorContainer( QWidget *parent = 0 );
43  ~DateNavigatorContainer();
44 
48  void setCalendar( const Akonadi::ETMCalendar::Ptr & );
49 
50  QSize minimumSizeHint() const;
51  QSize sizeHint() const;
52  void setHighlightMode( bool highlightEvents,
53  bool highlightTodos,
54  bool highlightJournals ) const;
55  void setUpdateNeeded();
56 
64  QDate monthOfNavigator( int navigatorIndex = 0 ) const;
65  public slots:
66 
72  void selectDates( const KCalCore::DateList &, const QDate &preferredMonth = QDate() );
73 
74  void updateView();
75  void updateConfig();
76  void updateDayMatrix();
77  void updateToday();
78 
79  void goPrevMonth();
80  void goNextMonth();
81 
82  signals:
83  void datesSelected( const KCalCore::DateList &, const QDate &preferredMonth );
84  void incidenceDropped( const Akonadi::Item &, const QDate & );
85  void incidenceDroppedMove( const Akonadi::Item &, const QDate & );
86  void newEventSignal( const QDate & );
87  void newTodoSignal( const QDate & );
88  void newJournalSignal( const QDate & );
89 
95  void weekClicked( const QDate &week, const QDate &preferredMonth );
96 
97  void goPrevious();
98  void goNext();
99 
100  void nextYearClicked();
101  void prevYearClicked();
102 
111  void prevMonthClicked( const QDate &currentMonth,
112  const QDate &selectionLowerLimit,
113  const QDate &selectionUpperLimit );
114 
115  void nextMonthClicked( const QDate &currentMonth,
116  const QDate &selectionLowerLimit,
117  const QDate &selectionUpperLimit );
118 
119  void monthSelected( int month );
120 
121  void yearSelected( int year );
122 
123  protected:
124  void resizeEvent( QResizeEvent * );
125  void setBaseDates( const QDate &start );
126  void connectNavigatorView( KDateNavigator *v );
127 
128  protected slots:
135  void resizeAllContents();
136 
137  private slots:
138  void handleDatesSelectedSignal( const KCalCore::DateList & );
139  void handleWeekClickedSignal( const QDate &, const QDate & );
140 
141  private:
142  /* Returns the first day of the first KDateNavigator, and the last day
143  of the last KDateNavigator.
144 
145  @param monthOffset If you have two KDateNavigators displaying
146  January and February and want to know the boundaries of,
147  for e.g. displaying February and March, use monthOffset = 1.
148  */
149  QPair<QDate,QDate> dateLimits( int monthOffset = 0 ) const;
150 
155  KDateNavigator *firstNavigatorForDate( const QDate &date ) const;
156 
157  KDateNavigator *mNavigatorView;
158 
159  Akonadi::ETMCalendar::Ptr mCalendar;
160 
161  QList<KDateNavigator*> mExtraViews;
162 
163  int mHorizontalCount;
164  int mVerticalCount;
165 
166  bool mIgnoreNavigatorUpdates;
167 };
168 
169 #endif
DateNavigatorContainer::goNextMonth
void goNextMonth()
Definition: datenavigatorcontainer.cpp:333
DateNavigatorContainer::DateNavigatorContainer
DateNavigatorContainer(QWidget *parent=0)
Definition: datenavigatorcontainer.cpp:39
DateNavigatorContainer::monthOfNavigator
QDate monthOfNavigator(int navigatorIndex=0) const
Returns the month of the specified KDateNavigator.
Definition: datenavigatorcontainer.cpp:370
DateNavigatorContainer::resizeEvent
void resizeEvent(QResizeEvent *)
Definition: datenavigatorcontainer.cpp:224
DateNavigatorContainer
Definition: datenavigatorcontainer.h:38
DateNavigatorContainer::datesSelected
void datesSelected(const KCalCore::DateList &, const QDate &preferredMonth)
DateNavigatorContainer::setUpdateNeeded
void setUpdateNeeded()
Definition: datenavigatorcontainer.cpp:131
DateNavigatorContainer::setHighlightMode
void setHighlightMode(bool highlightEvents, bool highlightTodos, bool highlightJournals) const
Definition: datenavigatorcontainer.cpp:319
DateNavigatorContainer::incidenceDropped
void incidenceDropped(const Akonadi::Item &, const QDate &)
QWidget
DateNavigatorContainer::goNext
void goNext()
DateNavigatorContainer::newEventSignal
void newEventSignal(const QDate &)
DateNavigatorContainer::setCalendar
void setCalendar(const Akonadi::ETMCalendar::Ptr &)
Associate date navigator with a calendar.
Definition: datenavigatorcontainer.cpp:97
DateNavigatorContainer::incidenceDroppedMove
void incidenceDroppedMove(const Akonadi::Item &, const QDate &)
DateNavigatorContainer::newJournalSignal
void newJournalSignal(const QDate &)
KDateNavigator
Definition: kdatenavigator.h:43
DateNavigatorContainer::nextMonthClicked
void nextMonthClicked(const QDate &currentMonth, const QDate &selectionLowerLimit, const QDate &selectionUpperLimit)
DateNavigatorContainer::~DateNavigatorContainer
~DateNavigatorContainer()
Definition: datenavigatorcontainer.cpp:59
DateNavigatorContainer::connectNavigatorView
void connectNavigatorView(KDateNavigator *v)
Definition: datenavigatorcontainer.cpp:64
DateNavigatorContainer::prevMonthClicked
void prevMonthClicked(const QDate &currentMonth, const QDate &selectionLowerLimit, const QDate &selectionUpperLimit)
Signals that the previous month button has been clicked.
DateNavigatorContainer::minimumSizeHint
QSize minimumSizeHint() const
Definition: datenavigatorcontainer.cpp:309
DateNavigatorContainer::yearSelected
void yearSelected(int year)
DateNavigatorContainer::weekClicked
void weekClicked(const QDate &week, const QDate &preferredMonth)
DateNavigatorContainer::monthSelected
void monthSelected(int month)
DateNavigatorContainer::updateToday
void updateToday()
Definition: datenavigatorcontainer.cpp:121
DateNavigatorContainer::sizeHint
QSize sizeHint() const
Definition: datenavigatorcontainer.cpp:314
DateNavigatorContainer::goPrevious
void goPrevious()
DateNavigatorContainer::selectDates
void selectDates(const KCalCore::DateList &, const QDate &preferredMonth=QDate())
preferredMonth is useful when the datelist crosses months, if different from -1, it has the month tha...
Definition: datenavigatorcontainer.cpp:161
DateNavigatorContainer::updateView
void updateView()
Definition: datenavigatorcontainer.cpp:141
DateNavigatorContainer::setBaseDates
void setBaseDates(const QDate &start)
Definition: datenavigatorcontainer.cpp:209
DateNavigatorContainer::goPrevMonth
void goPrevMonth()
Definition: datenavigatorcontainer.cpp:342
DateNavigatorContainer::updateDayMatrix
void updateDayMatrix()
Definition: datenavigatorcontainer.cpp:111
DateNavigatorContainer::newTodoSignal
void newTodoSignal(const QDate &)
DateNavigatorContainer::prevYearClicked
void prevYearClicked()
DateNavigatorContainer::nextYearClicked
void nextYearClicked()
QFrame
DateNavigatorContainer::resizeAllContents
void resizeAllContents()
Resizes all the child elements after the size of the widget changed.
Definition: datenavigatorcontainer.cpp:236
DateNavigatorContainer::updateConfig
void updateConfig()
Definition: datenavigatorcontainer.cpp:151
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