2 This file is part of KOrganizer.
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
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.
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.
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.
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.
26 #ifndef KORG_KOEVENTPOPUPMENU_H
27 #define KORG_KOEVENTPOPUPMENU_H
32 #include <AkonadiCore/Item>
33 #include <Akonadi/Calendar/ETMCalendar>
36 * Context menu for event views with standard event actions.
38 class KOEventPopupMenu
: public QMenu
42 explicit KOEventPopupMenu(Akonadi::ETMCalendar
*, QWidget
*parent
= Q_NULLPTR
);
43 void setCalendar(const Akonadi::ETMCalendar::Ptr
&calendar
);
46 void showIncidencePopup(const Akonadi::Item
&, const QDate
&);
47 void createEvent(const Akonadi::Item
&item
);
48 void createNote(const Akonadi::Item
&item
);
60 void toggleTodoCompleted();
61 void dissociateOccurrences();
67 void slotCreateNote(const Akonadi::Item
¬eItem
, const Akonadi::Collection
&collection
);
68 void slotCreateNewNoteJobFinished(KJob
*);
72 void editIncidenceSignal(const Akonadi::Item
&);
73 void showIncidenceSignal(const Akonadi::Item
&);
74 void deleteIncidenceSignal(const Akonadi::Item
&);
75 void cutIncidenceSignal(const Akonadi::Item
&);
76 void copyIncidenceSignal(const Akonadi::Item
&);
77 void pasteIncidenceSignal();
78 void toggleAlarmSignal(const Akonadi::Item
&);
79 void toggleTodoCompletedSignal(const Akonadi::Item
&);
80 void copyIncidenceToResourceSignal(const Akonadi::Item
&, const Akonadi::Collection
&);
81 void moveIncidenceToResourceSignal(const Akonadi::Item
&, const Akonadi::Collection
&);
82 void dissociateOccurrencesSignal(const Akonadi::Item
&, const QDate
&);
85 void print(bool previous
);
87 Akonadi::ETMCalendar::Ptr mCalendar
;
88 Akonadi::Item mCurrentIncidence
;
91 bool mHasAdditionalItems
;
92 QList
<QAction
*> mEditOnlyItems
;
93 QList
<QAction
*> mTodoOnlyItems
;
94 QList
<QAction
*> mEventOnlyItems
;
95 QList
<QAction
*> mRecurrenceItems
;
96 QAction
*mDissociateOccurrences
;
97 QAction
*mToggleReminder
;