korganizer

koeventpopupmenu.h
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 #ifndef KOEVENTPOPUPMENU_H
25 #define KOEVENTPOPUPMENU_H
26 //
27 // Context menu for event views with standard event actions
28 //
29 
30 #include <tqpopupmenu.h>
31 #include <tqdatetime.h>
32 
33 namespace KCal {
34 class Calendar;
35 class Incidence;
36 }
37 using namespace KCal;
38 
39 class KOEventPopupMenu : public TQPopupMenu {
40  TQ_OBJECT
41 
42  public:
43  KOEventPopupMenu();
44 
45  void addAdditionalItem(const TQIconSet &icon,const TQString &text,
46  const TQObject *receiver, const char *member,
47  bool editOnly=false);
48 
49 
50  public slots:
51  void showIncidencePopup( Calendar *, Incidence *, const TQDate & );
52 
53  protected slots:
54  void popupShow();
55  void popupEdit();
56  void popupPaste();
57  void print();
58  void popupDelete();
59  void popupCut();
60  void popupCopy();
61  void popupAlarm();
62  void dissociateOccurrence();
63  void dissociateFutureOccurrence();
64  void forward();
65 
66  signals:
67  void configChanged();
68  void editIncidenceSignal( Incidence *, const TQDate & );
69  void showIncidenceSignal( Incidence *, const TQDate & );
70  void deleteIncidenceSignal( Incidence * );
71  void cutIncidenceSignal( Incidence * );
72  void copyIncidenceSignal( Incidence * );
73  void pasteIncidenceSignal();
74  void toggleAlarmSignal( Incidence * );
75  void dissociateOccurrenceSignal( Incidence *, const TQDate & );
76  void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & );
77 
78  private:
79  Calendar *mCalendar;
80  Incidence *mCurrentIncidence;
81  TQDate mCurrentDate;
82 
83  bool mHasAdditionalItems;
84  TQValueList<int> mEditOnlyItems;
85  TQValueList<int> mRecurrenceItems;
86 };
87 
88 #endif