SVN_SILENT made messages (.desktop file) - always resolve ours
[kdepim.git] / korganizer / koeventpopupmenu.h
blob7d59f84e45719a3d585965f16f6c8ada58408986
1 /*
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
29 #include <QDate>
30 #include <QMenu>
32 #include <AkonadiCore/Item>
33 #include <Akonadi/Calendar/ETMCalendar>
35 /**
36 * Context menu for event views with standard event actions.
38 class KOEventPopupMenu : public QMenu
40 Q_OBJECT
41 public:
42 explicit KOEventPopupMenu(Akonadi::ETMCalendar *, QWidget *parent = Q_NULLPTR);
43 void setCalendar(const Akonadi::ETMCalendar::Ptr &calendar);
45 public Q_SLOTS:
46 void showIncidencePopup(const Akonadi::Item &, const QDate &);
47 void createEvent(const Akonadi::Item &item);
48 void createNote(const Akonadi::Item &item);
50 protected Q_SLOTS:
51 void popupShow();
52 void popupEdit();
53 void popupPaste();
54 void print();
55 void printPreview();
56 void popupDelete();
57 void popupCut();
58 void popupCopy();
59 void toggleAlarm();
60 void toggleTodoCompleted();
61 void dissociateOccurrences();
62 void forward();
63 void createTodo();
64 void createEvent();
65 void createNote();
67 void slotCreateNote(const Akonadi::Item &noteItem, const Akonadi::Collection &collection);
68 void slotCreateNewNoteJobFinished(KJob *);
70 Q_SIGNALS:
71 void configChanged();
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 &);
84 private:
85 void print(bool previous);
87 Akonadi::ETMCalendar::Ptr mCalendar;
88 Akonadi::Item mCurrentIncidence;
89 QDate mCurrentDate;
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;
100 #endif