korganizer

koeventpopupmenu.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00004     Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 #ifndef KOEVENTPOPUPMENU_H
00025 #define KOEVENTPOPUPMENU_H
00026 //
00027 // Context menu for event views with standard event actions
00028 //
00029 
00030 #include <tqpopupmenu.h>
00031 #include <tqdatetime.h>
00032 
00033 namespace KCal {
00034 class Calendar;
00035 class Incidence;
00036 }
00037 using namespace KCal;
00038 
00039 class KOEventPopupMenu : public TQPopupMenu {
00040     Q_OBJECT
00041   public:
00042     KOEventPopupMenu();
00043 
00044     void addAdditionalItem(const TQIconSet &icon,const TQString &text,
00045                            const TQObject *receiver, const char *member,
00046                            bool editOnly=false);
00047 
00048 
00049   public slots:
00050     void showIncidencePopup( Calendar *, Incidence *, const TQDate & );
00051 
00052   protected slots:
00053     void popupShow();
00054     void popupEdit();
00055     void popupPaste();
00056     void print();
00057     void popupDelete();
00058     void popupCut();
00059     void popupCopy();
00060     void popupAlarm();
00061     void dissociateOccurrence();
00062     void dissociateFutureOccurrence();
00063     void forward();
00064 
00065   signals:
00066     void configChanged();
00067     void editIncidenceSignal( Incidence *, const TQDate & );
00068     void showIncidenceSignal( Incidence *, const TQDate & );
00069     void deleteIncidenceSignal( Incidence * );
00070     void cutIncidenceSignal( Incidence * );
00071     void copyIncidenceSignal( Incidence * );
00072     void pasteIncidenceSignal();
00073     void toggleAlarmSignal( Incidence * );
00074     void dissociateOccurrenceSignal( Incidence *, const TQDate & );
00075     void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & );
00076 
00077   private:
00078     Calendar *mCalendar;
00079     Incidence *mCurrentIncidence;
00080     TQDate mCurrentDate;
00081 
00082     bool mHasAdditionalItems;
00083     TQValueList<int> mEditOnlyItems;
00084     TQValueList<int> mRecurrenceItems;
00085 };
00086 
00087 #endif