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 TQt, and distribute the resulting executable,
00022     without including the source code for TQt 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   TQ_OBJECT
00042   public:
00043     KOEventPopupMenu();
00044 
00045     void addAdditionalItem(const TQIconSet &icon,const TQString &text,
00046                            const TQObject *receiver, const char *member,
00047                            bool editOnly=false);
00048 
00049 
00050   public slots:
00051     void showIncidencePopup( Calendar *, Incidence *, const TQDate & );
00052 
00053   protected slots:
00054     void popupShow();
00055     void popupEdit();
00056     void popupPaste();
00057     void print();
00058     void popupDelete();
00059     void popupCut();
00060     void popupCopy();
00061     void popupAlarm();
00062     void dissociateOccurrence();
00063     void dissociateFutureOccurrence();
00064     void forward();
00065 
00066   signals:
00067     void configChanged();
00068     void editIncidenceSignal( Incidence *, const TQDate & );
00069     void showIncidenceSignal( Incidence *, const TQDate & );
00070     void deleteIncidenceSignal( Incidence * );
00071     void cutIncidenceSignal( Incidence * );
00072     void copyIncidenceSignal( Incidence * );
00073     void pasteIncidenceSignal();
00074     void toggleAlarmSignal( Incidence * );
00075     void dissociateOccurrenceSignal( Incidence *, const TQDate & );
00076     void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & );
00077 
00078   private:
00079     Calendar *mCalendar;
00080     Incidence *mCurrentIncidence;
00081     TQDate mCurrentDate;
00082 
00083     bool mHasAdditionalItems;
00084     TQValueList<int> mEditOnlyItems;
00085     TQValueList<int> mRecurrenceItems;
00086 };
00087 
00088 #endif