summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventview.cpp
Unidiff
Diffstat (limited to 'korganizer/koeventview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 1d26930..a4ba85e 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -1,124 +1,124 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qpopupmenu.h> 24#include <q3popupmenu.h>
25#include <qcursor.h> 25#include <qcursor.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
28#include <kdebug.h> 28#include <kdebug.h>
29#include <kiconloader.h> 29#include <kiconloader.h>
30#include <kmessagebox.h> 30#include <kmessagebox.h>
31 31
32#include <libkcal/calendar.h> 32#include <libkcal/calendar.h>
33#include "koprefs.h" 33#include "koprefs.h"
34#include "koeventview.h" 34#include "koeventview.h"
35using namespace KOrg; 35using namespace KOrg;
36 36
37//--------------------------------------------------------------------------- 37//---------------------------------------------------------------------------
38 38
39KOEventView::KOEventView(Calendar *cal,QWidget *parent,const char *name) 39KOEventView::KOEventView(Calendar *cal,QWidget *parent,const char *name)
40 : KOrg::BaseView(cal,parent,name) 40 : KOrg::BaseView(cal,parent,name)
41{ 41{
42} 42}
43 43
44//--------------------------------------------------------------------------- 44//---------------------------------------------------------------------------
45 45
46KOEventView::~KOEventView() 46KOEventView::~KOEventView()
47{ 47{
48} 48}
49 49
50//--------------------------------------------------------------------------- 50//---------------------------------------------------------------------------
51 51
52KOEventPopupMenu *KOEventView::eventPopup() 52KOEventPopupMenu *KOEventView::eventPopup()
53{ 53{
54 KOEventPopupMenu *eventPopup = new KOEventPopupMenu; 54 KOEventPopupMenu *eventPopup = new KOEventPopupMenu;
55 55
56 connect(eventPopup,SIGNAL(editIncidenceSignal(Incidence *)), 56 connect(eventPopup,SIGNAL(editIncidenceSignal(Incidence *)),
57 SIGNAL(editIncidenceSignal(Incidence *))); 57 SIGNAL(editIncidenceSignal(Incidence *)));
58 connect(eventPopup,SIGNAL(showIncidenceSignal(Incidence *)), 58 connect(eventPopup,SIGNAL(showIncidenceSignal(Incidence *)),
59 SIGNAL(showIncidenceSignal(Incidence *))); 59 SIGNAL(showIncidenceSignal(Incidence *)));
60 connect(eventPopup,SIGNAL(deleteIncidenceSignal(Incidence *)), 60 connect(eventPopup,SIGNAL(deleteIncidenceSignal(Incidence *)),
61 SIGNAL(deleteIncidenceSignal(Incidence *))); 61 SIGNAL(deleteIncidenceSignal(Incidence *)));
62 connect(eventPopup,SIGNAL(cancelIncidenceSignal(Incidence *)), 62 connect(eventPopup,SIGNAL(cancelIncidenceSignal(Incidence *)),
63 SIGNAL(cancelIncidenceSignal(Incidence *))); 63 SIGNAL(cancelIncidenceSignal(Incidence *)));
64 connect(eventPopup,SIGNAL(cloneIncidenceSignal(Incidence *)), 64 connect(eventPopup,SIGNAL(cloneIncidenceSignal(Incidence *)),
65 SIGNAL(cloneIncidenceSignal(Incidence *))); 65 SIGNAL(cloneIncidenceSignal(Incidence *)));
66 connect(eventPopup,SIGNAL(beamIncidenceSignal(Incidence *)), 66 connect(eventPopup,SIGNAL(beamIncidenceSignal(Incidence *)),
67 SIGNAL(beamIncidenceSignal(Incidence *))); 67 SIGNAL(beamIncidenceSignal(Incidence *)));
68 connect(eventPopup,SIGNAL(moveIncidenceSignal(Incidence *)), 68 connect(eventPopup,SIGNAL(moveIncidenceSignal(Incidence *)),
69 SIGNAL(moveIncidenceSignal(Incidence *))); 69 SIGNAL(moveIncidenceSignal(Incidence *)));
70 70
71 return eventPopup; 71 return eventPopup;
72} 72}
73 73
74//--------------------------------------------------------------------------- 74//---------------------------------------------------------------------------
75 75
76void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event) 76void KOEventView::showIncidencePopup(Q3PopupMenu *popup,Incidence *event)
77{ 77{
78 mCurrentIncidence = event; 78 mCurrentIncidence = event;
79 if (event) popup->popup(QCursor::pos()); 79 if (event) popup->popup(QCursor::pos());
80} 80}
81 81
82//--------------------------------------------------------------------------- 82//---------------------------------------------------------------------------
83 83
84void KOEventView::popupShow() 84void KOEventView::popupShow()
85{ 85{
86 emit showIncidenceSignal(mCurrentIncidence); 86 emit showIncidenceSignal(mCurrentIncidence);
87} 87}
88 88
89//--------------------------------------------------------------------------- 89//---------------------------------------------------------------------------
90 90
91void KOEventView::popupEdit() 91void KOEventView::popupEdit()
92{ 92{
93 emit editIncidenceSignal(mCurrentIncidence); 93 emit editIncidenceSignal(mCurrentIncidence);
94} 94}
95 95
96//--------------------------------------------------------------------------- 96//---------------------------------------------------------------------------
97 97
98void KOEventView::popupDelete() 98void KOEventView::popupDelete()
99{ 99{
100 emit deleteIncidenceSignal(mCurrentIncidence); 100 emit deleteIncidenceSignal(mCurrentIncidence);
101} 101}
102void KOEventView::popupClone() 102void KOEventView::popupClone()
103{ 103{
104 emit cloneIncidenceSignal(mCurrentIncidence); 104 emit cloneIncidenceSignal(mCurrentIncidence);
105} 105}
106void KOEventView::popupCancel() 106void KOEventView::popupCancel()
107{ 107{
108 emit cancelIncidenceSignal(mCurrentIncidence); 108 emit cancelIncidenceSignal(mCurrentIncidence);
109} 109}
110 110
111//--------------------------------------------------------------------------- 111//---------------------------------------------------------------------------
112 112
113void KOEventView::defaultAction( Incidence *incidence ) 113void KOEventView::defaultAction( Incidence *incidence )
114{ 114{
115 115
116 if ( !incidence ) return; 116 if ( !incidence ) return;
117 117
118 if ( incidence->isReadOnly() ) 118 if ( incidence->isReadOnly() )
119 emit showIncidenceSignal(incidence); 119 emit showIncidenceSignal(incidence);
120 else { 120 else {
121 if ( KOPrefs::instance()->mEditOnDoubleClick ) 121 if ( KOPrefs::instance()->mEditOnDoubleClick )
122 emit editIncidenceSignal(incidence); 122 emit editIncidenceSignal(incidence);
123 else 123 else
124 emit showIncidenceSignal(incidence); 124 emit showIncidenceSignal(incidence);