• 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
datenavigator.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-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_DATENAVIGATOR_H
30 #define KORG_DATENAVIGATOR_H
31 
32 #include <KCalCore/IncidenceBase> // for KCalCore::DateList typedef
33 
34 #include <QObject>
35 
41 class DateNavigator : public QObject
42 {
43  Q_OBJECT
44  public:
45  explicit DateNavigator( QObject *parent = 0 );
46  ~DateNavigator();
47 
48  KCalCore::DateList selectedDates();
49 
50  int datesCount() const;
51 
52  public slots:
53  void selectDates( const KCalCore::DateList &, const QDate &preferredMonth = QDate() );
54  void selectDate( const QDate & );
55 
56  void selectDates( int count );
57  void selectDates( const QDate &, int count, const QDate &preferredMonth = QDate() );
58 
59  void selectWeek();
60  void selectWeek( const QDate &, const QDate &preferredMonth = QDate() );
61 
62  void selectWorkWeek();
63  void selectWorkWeek( const QDate & );
64 
65  void selectWeekByDay( int weekDay, const QDate &, const QDate &preferredMonth = QDate() );
66 
67  void selectToday();
68 
69  void selectPreviousYear();
70  void selectPreviousMonth( const QDate &currentMonth = QDate(),
71  const QDate &selectionLowerLimit = QDate(),
72  const QDate &selectionUpperLimit = QDate() );
73  void selectPreviousWeek();
74  void selectNextWeek();
75  void selectNextMonth( const QDate &currentMonth = QDate(),
76  const QDate &selectionLowerLimit = QDate(),
77  const QDate &selectionUpperLimit = QDate() );
78  void selectNextYear();
79 
80  void selectPrevious();
81  void selectNext();
82 
83  void selectMonth( int month );
84  void selectYear( int year );
85 
86  signals:
87  /* preferredMonth is useful when the datelist crosses months,
88  if valid, any month-like component should honour it
89  */
90  void datesSelected( const KCalCore::DateList &, const QDate &preferredMonth );
91 
92  protected:
93  void emitSelected( const QDate &preferredMonth = QDate() );
94 
95  private:
96 
97  /*
98  Selects next month if offset equals 1, or previous month
99  if offset equals -1.
100  Bigger offsets are accepted.
101  */
102  void shiftMonth( const QDate &date,
103  const QDate &selectionLowerLimit,
104  const QDate &selectionUpperLimit,
105  int offset );
106 
107  KCalCore::DateList mSelectedDates;
108 
109  enum {
110  MAX_SELECTABLE_DAYS = 50
111  };
112 };
113 
114 #endif
DateNavigator::selectToday
void selectToday()
Definition: datenavigator.cpp:154
DateNavigator::selectDate
void selectDate(const QDate &)
Definition: datenavigator.cpp:63
DateNavigator::selectMonth
void selectMonth(int month)
Definition: datenavigator.cpp:278
DateNavigator::selectPreviousYear
void selectPreviousYear()
Definition: datenavigator.cpp:169
QObject
DateNavigator::selectNextWeek
void selectNextWeek()
Definition: datenavigator.cpp:197
DateNavigator::selectWeekByDay
void selectWeekByDay(int weekDay, const QDate &, const QDate &preferredMonth=QDate())
Definition: datenavigator.cpp:97
DateNavigator::selectWeek
void selectWeek()
Definition: datenavigator.cpp:108
DateNavigator::selectDates
void selectDates(const KCalCore::DateList &, const QDate &preferredMonth=QDate())
Definition: datenavigator.cpp:55
DateNavigator::selectedDates
KCalCore::DateList selectedDates()
Definition: datenavigator.cpp:45
DateNavigator::selectPreviousWeek
void selectPreviousWeek()
Definition: datenavigator.cpp:188
DateNavigator::selectPreviousMonth
void selectPreviousMonth(const QDate &currentMonth=QDate(), const QDate &selectionLowerLimit=QDate(), const QDate &selectionUpperLimit=QDate())
Definition: datenavigator.cpp:178
DateNavigator::selectPrevious
void selectPrevious()
Definition: datenavigator.cpp:258
DateNavigator::selectNextMonth
void selectNextMonth(const QDate &currentMonth=QDate(), const QDate &selectionLowerLimit=QDate(), const QDate &selectionUpperLimit=QDate())
Definition: datenavigator.cpp:239
DateNavigator::datesCount
int datesCount() const
Definition: datenavigator.cpp:50
DateNavigator::~DateNavigator
~DateNavigator()
Definition: datenavigator.cpp:41
DateNavigator::DateNavigator
DateNavigator(QObject *parent=0)
Definition: datenavigator.cpp:36
DateNavigator::emitSelected
void emitSelected(const QDate &preferredMonth=QDate())
Definition: datenavigator.cpp:310
DateNavigator
This class controls date navigation.
Definition: datenavigator.h:41
DateNavigator::datesSelected
void datesSelected(const KCalCore::DateList &, const QDate &preferredMonth)
DateNavigator::selectYear
void selectYear(int year)
Definition: datenavigator.cpp:300
DateNavigator::selectNext
void selectNext()
Definition: datenavigator.cpp:268
DateNavigator::selectWorkWeek
void selectWorkWeek()
Definition: datenavigator.cpp:127
DateNavigator::selectNextYear
void selectNextYear()
Definition: datenavigator.cpp:249
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