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 <qpopupmenu.h>
00031 #include <qdatetime.h>
00032 
00033 namespace KCal {
00034 class Incidence;
00035 }
00036 using namespace KCal;
00037 
00038 class KOEventPopupMenu : public QPopupMenu {
00039     Q_OBJECT
00040   public:
00041     KOEventPopupMenu();
00042 
00043     void addAdditionalItem(const QIconSet &icon,const QString &text,
00044                            const QObject *receiver, const char *member,
00045                            bool editOnly=false);
00046 
00047 
00048   public slots:
00049     void showIncidencePopup( Incidence *, const QDate & );
00050 
00051   protected slots:
00052     void popupShow();
00053     void popupEdit();
00054     void print();
00055     void popupDelete();
00056     void popupCut();
00057     void popupCopy();
00058     void popupAlarm();
00059     void dissociateOccurrence();
00060     void dissociateFutureOccurrence();
00061 
00062   signals:
00063     void editIncidenceSignal(Incidence *);
00064     void showIncidenceSignal(Incidence *);
00065     void deleteIncidenceSignal(Incidence *);
00066     void cutIncidenceSignal(Incidence *);
00067     void copyIncidenceSignal(Incidence *);
00068     void toggleAlarmSignal(Incidence *);
00069     void dissociateOccurrenceSignal( Incidence *, const QDate & );
00070     void dissociateFutureOccurrenceSignal( Incidence *, const QDate & );
00071 
00072   private:
00073     Incidence *mCurrentIncidence;
00074     QDate mCurrentDate;
00075 
00076     bool mHasAdditionalItems;
00077     QValueList<int> mEditOnlyItems;
00078     QValueList<int> mRecurrenceItems;
00079 };
00080 
00081 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys