• 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
kdatenavigator.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2001,2003 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_KDATENAVIGATOR_H
27 #define KORG_KDATENAVIGATOR_H
28 
29 #include <QFrame>
30 
31 #include <KCalCore/IncidenceBase> //for DateList typedef
32 #include <Akonadi/Calendar/ETMCalendar>
33 
34 class KODayMatrix;
35 class NavigatorBar;
36 
37 namespace Akonadi {
38  class Item;
39 }
40 
41 class QLabel;
42 
43 class KDateNavigator: public QFrame
44 {
45  Q_OBJECT
46  public:
47  explicit KDateNavigator( QWidget *parent = 0 );
48  ~KDateNavigator();
49 
53  void setCalendar( const Akonadi::ETMCalendar::Ptr & );
54 
55  void setBaseDate( const QDate & );
56 
57  KCalCore::DateList selectedDates() const
58  {
59  return mSelectedDates;
60  }
61 
62  QSizePolicy sizePolicy () const;
63 
64  NavigatorBar *navigatorBar() const
65  {
66  return mNavigatorBar;
67  }
68 
69  QDate startDate() const;
70  QDate endDate() const;
71  void setHighlightMode( bool highlightEvents,
72  bool highlightTodos,
73  bool highlightJournals ) const;
74 
80  QDate month() const;
81 
82  public slots:
83  void selectDates( const KCalCore::DateList & );
84  void selectPreviousMonth();
85  void selectNextMonth();
86  void updateView();
87  void updateConfig();
88  void updateDayMatrix();
89  void updateToday();
90  void setUpdateNeeded();
91 
92  signals:
93  void datesSelected( const KCalCore::DateList & );
94  void incidenceDropped( const Akonadi::Item &, const QDate & );
95  void incidenceDroppedMove( const Akonadi::Item &, const QDate & );
96  void newEventSignal( const QDate & );
97  void newTodoSignal( const QDate & );
98  void newJournalSignal( const QDate & );
99  void weekClicked( const QDate &week, const QDate &month );
100 
101  void goPrevious();
102  void goNext();
103  void nextMonthClicked();
104  void prevMonthClicked();
105  void nextYearClicked();
106  void prevYearClicked();
107 
108  void monthSelected( int month );
109  void yearSelected( int year );
110 
111  protected:
112  void updateDates();
113 
114  void wheelEvent( QWheelEvent * );
115 
116  bool eventFilter( QObject *, QEvent * );
117 
118  void setShowWeekNums( bool enabled );
119 
120  private:
121  void selectMonthHelper( int monthDifference );
122  NavigatorBar *mNavigatorBar;
123 
124  QLabel *mHeadings[ 7 ];
125  QLabel *mWeeknos[ 7 ];
126 
127  KODayMatrix *mDayMatrix;
128 
129  KCalCore::DateList mSelectedDates;
130  QDate mBaseDate;
131  Akonadi::ETMCalendar::Ptr mCalendar;
132 
133  // Disabling copy constructor and assignment operator
134  KDateNavigator( const KDateNavigator & );
135  KDateNavigator &operator=( const KDateNavigator & );
136 };
137 
138 #endif
KDateNavigator::updateDates
void updateDates()
Definition: kdatenavigator.cpp:183
KDateNavigator::~KDateNavigator
~KDateNavigator()
Definition: kdatenavigator.cpp:101
KDateNavigator::selectNextMonth
void selectNextMonth()
Definition: kdatenavigator.cpp:298
KDateNavigator::selectDates
void selectDates(const KCalCore::DateList &)
Definition: kdatenavigator.cpp:308
KDateNavigator::updateConfig
void updateConfig()
Definition: kdatenavigator.cpp:248
KDateNavigator::nextYearClicked
void nextYearClicked()
KDateNavigator::startDate
QDate startDate() const
Definition: kdatenavigator.cpp:148
KDateNavigator::navigatorBar
NavigatorBar * navigatorBar() const
Definition: kdatenavigator.h:64
KDateNavigator::incidenceDroppedMove
void incidenceDroppedMove(const Akonadi::Item &, const QDate &)
KDateNavigator::wheelEvent
void wheelEvent(QWheelEvent *)
Definition: kdatenavigator.cpp:322
KDateNavigator::selectedDates
KCalCore::DateList selectedDates() const
Definition: kdatenavigator.h:57
QWidget
KDateNavigator::datesSelected
void datesSelected(const KCalCore::DateList &)
KDateNavigator::sizePolicy
QSizePolicy sizePolicy() const
Definition: kdatenavigator.cpp:136
KDateNavigator::goPrevious
void goPrevious()
KDateNavigator::updateView
void updateView()
Definition: kdatenavigator.cpp:242
KDateNavigator::endDate
QDate endDate() const
Definition: kdatenavigator.cpp:171
QObject
KDateNavigator::selectPreviousMonth
void selectPreviousMonth()
Definition: kdatenavigator.cpp:303
KDateNavigator::setShowWeekNums
void setShowWeekNums(bool enabled)
Definition: kdatenavigator.cpp:269
KDateNavigator::KDateNavigator
KDateNavigator(QWidget *parent=0)
Definition: kdatenavigator.cpp:39
KDateNavigator::incidenceDropped
void incidenceDropped(const Akonadi::Item &, const QDate &)
KDateNavigator::goNext
void goNext()
KDateNavigator::yearSelected
void yearSelected(int year)
KDateNavigator
Definition: kdatenavigator.h:43
KDateNavigator::nextMonthClicked
void nextMonthClicked()
KDateNavigator::eventFilter
bool eventFilter(QObject *, QEvent *)
Definition: kdatenavigator.cpp:332
KDateNavigator::setBaseDate
void setBaseDate(const QDate &)
Definition: kdatenavigator.cpp:118
KDateNavigator::updateToday
void updateToday()
Definition: kdatenavigator.cpp:142
KDateNavigator::newJournalSignal
void newJournalSignal(const QDate &)
KDateNavigator::monthSelected
void monthSelected(int month)
NavigatorBar
Definition: navigatorbar.h:33
KDateNavigator::newTodoSignal
void newTodoSignal(const QDate &)
KDateNavigator::month
QDate month() const
Returns the current displayed month.
Definition: kdatenavigator.cpp:228
KDateNavigator::setHighlightMode
void setHighlightMode(bool highlightEvents, bool highlightTodos, bool highlightJournals) const
Definition: kdatenavigator.cpp:176
KDateNavigator::prevMonthClicked
void prevMonthClicked()
KODayMatrix
Replacement for kdpdatebuton.cpp that used 42 widgets for the day matrix to be displayed.
Definition: kodaymatrix.h:69
KDateNavigator::setUpdateNeeded
void setUpdateNeeded()
Definition: kdatenavigator.cpp:223
KDateNavigator::newEventSignal
void newEventSignal(const QDate &)
QFrame
KDateNavigator::weekClicked
void weekClicked(const QDate &week, const QDate &month)
KDateNavigator::updateDayMatrix
void updateDayMatrix()
Definition: kdatenavigator.cpp:217
KDateNavigator::setCalendar
void setCalendar(const Akonadi::ETMCalendar::Ptr &)
Associate date navigator with a calendar.
Definition: kdatenavigator.cpp:105
KDateNavigator::prevYearClicked
void prevYearClicked()
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