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

korganizer

  • sources
  • kde-4.14
  • kdepim
  • korganizer
  • interfaces
  • korganizer
baseview.h
Go to the documentation of this file.
1 /*
2  This file is part of the KOrganizer interfaces.
3 
4  Copyright (c) 1999,2001,2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library 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 GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KORG_INTERFACES_BASEVIEW_H
24 #define KORG_INTERFACES_BASEVIEW_H
25 
26 #include "korganizer/korganizer_export.h"
27 
28 #include <calendarviews/eventview.h>
29 #include <calendarsupport/printing/printplugin.h>
30 
31 #include <Akonadi/Calendar/IncidenceChanger>
32 #include <Akonadi/Calendar/ETMCalendar>
33 
34 #include <Akonadi/Collection>
35 #include <Akonadi/Item>
36 
37 #include <QWidget>
38 
39 namespace KOrg {
40 
52 class KORGANIZER_INTERFACES_EXPORT BaseView : public QWidget
53 {
54  Q_OBJECT
55  public:
63  explicit BaseView( QWidget *parent = 0 );
64 
68  virtual ~BaseView();
69 
70  virtual void setCalendar( const Akonadi::ETMCalendar::Ptr &cal );
74  virtual Akonadi::ETMCalendar::Ptr calendar();
75 
81  virtual Akonadi::Item::List selectedIncidences() = 0;
82 
88  virtual KCalCore::DateList selectedIncidenceDates() = 0;
89 
94  virtual QDateTime selectionStart() { return QDateTime(); }
95 
100  virtual QDateTime selectionEnd() { return QDateTime(); }
101 
102  virtual CalendarSupport::CalPrinterBase::PrintType printType() const;
103 
108  virtual int currentDateCount() const = 0;
109 
113  virtual bool isEventView();
114 
127  virtual void getHighlightMode( bool &highlightEvents,
128  bool &highlightTodos,
129  bool &highlightJournals );
130 
135  virtual bool usesFullWindow();
136 
141  virtual bool supportsZoom();
142 
147  virtual bool supportsDateRangeSelection();
148 
149  virtual bool hasConfigurationDialog() const;
150 
151  virtual void showConfigurationDialog( QWidget *parent );
152 
153  QByteArray identifier() const;
154  virtual void setIdentifier( const QByteArray &identifier );
155 
163  virtual void restoreConfig( const KConfigGroup &configGroup );
164 
172  virtual void saveConfig( KConfigGroup &configGroup );
173 
179  virtual BaseView *viewAt( const QPoint &p );
180 
189  virtual void setDateRange( const KDateTime &start, const KDateTime &end,
190  const QDate &preferredMonth = QDate() );
191 
192  KDateTime startDateTime() const;
193  KDateTime endDateTime() const;
194 
195  KDateTime actualStartDateTime() const;
196  KDateTime actualEndDateTime() const;
197 
201  virtual bool supportsDateNavigation() const { return false; }
202 
203  virtual Akonadi::Collection::Id collectionId() const { return -1; }
204 
205  public Q_SLOTS:
213  virtual void showIncidences( const Akonadi::Item::List &incidenceList, const QDate &date ) = 0;
214 
219  virtual void updateView() = 0;
220  virtual void dayPassed( const QDate & );
221 
225  virtual void setIncidenceChanger( Akonadi::IncidenceChanger *changer );
226 
230  virtual void flushView();
231 
235  virtual void changeIncidenceDisplay( const Akonadi::Item &,
236  Akonadi::IncidenceChanger::ChangeType ) = 0;
237 
242  virtual void updateConfig();
243 
247  virtual void clearSelection();
248 
253  virtual bool eventDurationHint( QDateTime &startDt, QDateTime &endDt, bool &allDay );
254 
255  Q_SIGNALS:
256  void incidenceSelected( const Akonadi::Item &, const QDate );
257 
261  void showIncidenceSignal( const Akonadi::Item & );
262 
268  void editIncidenceSignal( const Akonadi::Item & );
269 
275  void deleteIncidenceSignal( const Akonadi::Item & );
276 
280  void cutIncidenceSignal( const Akonadi::Item & );
281 
285  void copyIncidenceSignal( const Akonadi::Item & );
286 
290  void pasteIncidenceSignal();
291 
295  void toggleAlarmSignal( const Akonadi::Item & );
296 
301  void toggleTodoCompletedSignal( const Akonadi::Item & );
302 
306  void copyIncidenceToResourceSignal( const Akonadi::Item &, const Akonadi::Collection & );
307 
311  void moveIncidenceToResourceSignal( const Akonadi::Item &, const Akonadi::Collection & );
312 
317  void dissociateOccurrencesSignal( const Akonadi::Item &, const QDate & );
318 
319  void startMultiModify( const QString & );
320  void endMultiModify();
321 
326  void newEventSignal();
327 
332  void newEventSignal( const QDate & );
333 
338  void newEventSignal( const QDateTime & );
339 
345  void newEventSignal( const QDateTime &, const QDateTime & );
346 
347  void newTodoSignal( const QDate & );
348  void newSubTodoSignal( const Akonadi::Item & );
349 
350  void newJournalSignal( const QDate & );
351 
352  public:
353 
359  virtual void setChanges( EventViews::EventView::Changes changes );
360 
364  EventViews::EventView::Changes changes() const;
365 
366  protected:
370  virtual void doRestoreConfig( const KConfigGroup &configGroup );
371 
375  virtual void doSaveConfig( KConfigGroup &configGroup );
376 
380  virtual void showDates( const QDate &start, const QDate &end,
381  const QDate &preferredMonth = QDate() ) = 0;
382 
389  virtual QPair<KDateTime,KDateTime> actualDateRange(
390  const KDateTime &start,
391  const KDateTime &end,
392  const QDate &preferredMonth = QDate() ) const;
393 
394  protected Q_SLOTS:
395  virtual void calendarReset();
396 
397  protected:
398  Akonadi::IncidenceChanger *mChanger;
399 
400  private:
401  class Private;
402  Private *const d;
403  friend class KOrg::BaseView::Private;
404 };
405 
406 }
407 
408 #endif
QWidget
KOrg::BaseView::mChanger
Akonadi::IncidenceChanger * mChanger
Definition: baseview.h:398
QByteArray
KOrg::BaseView::supportsDateNavigation
virtual bool supportsDateNavigation() const
Returns true if the view supports navigation through the date navigator ( selecting a date range...
Definition: baseview.h:201
QPoint
KORGANIZER_INTERFACES_EXPORT
#define KORGANIZER_INTERFACES_EXPORT
Definition: korganizer_export.h:87
QDate
d
#define d
QString
QPair
KOrg::BaseView::collectionId
virtual Akonadi::Collection::Id collectionId() const
Definition: baseview.h:203
korganizer_export.h
KOrg::BaseView
This class provides an interface for all views being displayed within the main calendar view...
Definition: baseview.h:52
KOrg::BaseView::selectionStart
virtual QDateTime selectionStart()
Returns the start of the selection, or an invalid QDateTime if there is no selection or the view does...
Definition: baseview.h:94
KOrg::BaseView::selectionEnd
virtual QDateTime selectionEnd()
Returns the end of the selection, or an invalid QDateTime if there is no selection or the view doesn'...
Definition: baseview.h:100
QDateTime
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:59 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
  • pimprint

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