• 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
koeventview.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 1999 Preston Brown <pbrown@kde.org>
5  Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
6  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License along
19  with this program; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 
22  As a special exception, permission is given to link this program
23  with any edition of Qt, and distribute the resulting executable,
24  without including the source code for Qt in the source distribution.
25 */
26 
27 #ifndef KORG_KOEVENTVIEW_H
28 #define KORG_KOEVENTVIEW_H
29 
30 #include "korganizer/baseview.h"
31 
32 namespace Akonadi {
33  class Item;
34 }
35 
36 class KOEventPopupMenu;
37 
38 class QMenu;
39 
54 class KOEventView : public KOrg::BaseView
55 {
56  Q_OBJECT
57  public:
58  enum {
59  // This value is passed to QColor's lighter(int factor) for selected events
60  BRIGHTNESS_FACTOR = 125
61  };
62 
69  explicit KOEventView( QWidget *parent=0 );
70 
74  virtual ~KOEventView();
75 
80  virtual int maxDatesHint() const = 0;
81 
85  KOEventPopupMenu *eventPopup();
86 
90  QMenu *newEventPopup();
91 
93  bool isEventView() { return true; }
94 
95  int showMoveRecurDialog( const Akonadi::Item &inc, const QDate &date );
96 
97  /*
98  * Sets the QObject that will receive key events that were made
99  * while the new event dialog was still being created.
100  *
101  * This is virtual so KOAgendaView can call EventViews::AgendaView::setTypeAheadReceiver().
102  * because not all views are in kdepim/calendarviews yet
103  *
104  */
105  virtual void setTypeAheadReceiver( QObject *o );
106 
107  /*
108  * Returns true if the view item, that represents a to-do, should use the "completed"
109  * pixmap.
110  *
111  * @param todo The to-do associated with the view item.
112  * @param date The date in which the item appears in the view, for non recuring to-dos
113  * this is the same as the start date, but, for recurring to-dos this is the date of
114  * a particular occurrence.
115  *
116  */
117  static bool usesCompletedTodoPixmap( const Akonadi::Item &todo, const QDate &date );
118 
119  bool supportsDateNavigation() const { return true; }
120 
121  public slots:
122  void focusChanged( QWidget *, QWidget * );
123 
128  void defaultAction( const Akonadi::Item &incidence );
129 
130  signals:
139  void datesSelected( const KCalCore::DateList datelist );
140 
145  void shiftedEvent( const QDate &olddate, const QDate &ewdate );
146 
147  protected slots:
148  void popupShow();
149  void popupEdit();
150  void popupDelete();
151  void popupCut();
152  void popupCopy();
153  virtual void showNewEventPopup();
154 
155  protected:
156  Akonadi::Item mCurrentIncidence; // Incidence selected e.g. for a context menu
157 
158  private:
159  /*
160  * This is called when the new event dialog is shown. It sends
161  * all events in mTypeAheadEvents to the receiver.
162  */
163  void finishTypeAhead();
164 
165  private:
166 
167  /* When we receive a QEvent with a key_Return release
168  * we will only show a new event dialog if we previously received a
169  * key_Return press, otherwise a new event dialog appears when
170  * you hit return in some yes/no dialog */
171  bool mReturnPressed;
172 
173  bool mTypeAhead;
174  QObject *mTypeAheadReceiver;
175  QList<QEvent*> mTypeAheadEvents;
176 };
177 
178 #endif
KOEventView::focusChanged
void focusChanged(QWidget *, QWidget *)
Definition: koeventview.cpp:224
KOEventView::popupEdit
void popupEdit()
Definition: koeventview.cpp:123
KOEventView::setTypeAheadReceiver
virtual void setTypeAheadReceiver(QObject *o)
Definition: koeventview.cpp:219
KOEventView::popupDelete
void popupDelete()
Definition: koeventview.cpp:130
baseview.h
QWidget
KOEventView::showMoveRecurDialog
int showMoveRecurDialog(const Akonadi::Item &inc, const QDate &date)
Definition: koeventview.cpp:181
QObject
KOEventView
KOEventView is the abstract base class from which all other calendar views for event data are derived...
Definition: koeventview.h:54
KOEventView::maxDatesHint
virtual int maxDatesHint() const =0
provides a hint back to the caller on the maximum number of dates that the view supports.
KOEventView::popupShow
void popupShow()
Definition: koeventview.cpp:116
KOEventView::datesSelected
void datesSelected(const KCalCore::DateList datelist)
When the view changes the dates that are selected in one way or another, this signal is emitted...
KOEventView::usesCompletedTodoPixmap
static bool usesCompletedTodoPixmap(const Akonadi::Item &todo, const QDate &date)
Definition: koeventview.cpp:243
KOEventView::mCurrentIncidence
Akonadi::Item mCurrentIncidence
Definition: koeventview.h:156
KOEventView::newEventPopup
QMenu * newEventPopup()
Construct a standard context that allows to create a new event.
Definition: koeventview.cpp:99
KOEventView::supportsDateNavigation
bool supportsDateNavigation() const
Returns true if the view supports navigation through the date navigator ( selecting a date range...
Definition: koeventview.h:119
KOEventView::eventPopup
KOEventPopupMenu * eventPopup()
Construct a standard context menu for an event.
Definition: koeventview.cpp:69
KOEventPopupMenu
Context menu for event views with standard event actions.
Definition: koeventpopupmenu.h:38
QMenu
KOrg::BaseView
This class provides an interface for all views being displayed within the main calendar view...
Definition: baseview.h:51
KOEventView::popupCut
void popupCut()
Definition: koeventview.cpp:137
KOEventView::~KOEventView
virtual ~KOEventView()
Destructor.
Definition: koeventview.cpp:63
KOEventView::BRIGHTNESS_FACTOR
Definition: koeventview.h:60
KOEventView::popupCopy
void popupCopy()
Definition: koeventview.cpp:144
KOEventView::isEventView
bool isEventView()
This view is a view for displaying events.
Definition: koeventview.h:93
KOEventView::defaultAction
void defaultAction(const Akonadi::Item &incidence)
Performs the default action for an incidence, e.g.
Definition: koeventview.cpp:164
KOEventView::shiftedEvent
void shiftedEvent(const QDate &olddate, const QDate &ewdate)
Emitted when an event is moved using the mouse in an agenda view (week / month).
KOEventView::showNewEventPopup
virtual void showNewEventPopup()
Definition: koeventview.cpp:151
KOEventView::KOEventView
KOEventView(QWidget *parent=0)
Constructs a view.
Definition: koeventview.cpp:43
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