summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-09 21:22:38 (UTC)
committer zautrix <zautrix>2004-09-09 21:22:38 (UTC)
commit10eb314475b75a162582e8138d465890dbd21806 (patch) (unidiff)
tree9045f8a02113eedf2f2c59d239e4e43b41c2cdc5
parent5b0e3c87bbe32aacd51f6faff5446ed3838a68e0 (diff)
downloadkdepimpi-10eb314475b75a162582e8138d465890dbd21806.zip
kdepimpi-10eb314475b75a162582e8138d465890dbd21806.tar.gz
kdepimpi-10eb314475b75a162582e8138d465890dbd21806.tar.bz2
Fixed closing of event viewer
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp1
-rw-r--r--korganizer/koeventviewerdialog.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index d34e6a9..948047a 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -1,225 +1,224 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 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 19
20#include <qcstring.h> 20#include <qcstring.h>
21#include <qwhatsthis.h> 21#include <qwhatsthis.h>
22#include <qdialog.h> 22#include <qdialog.h>
23#include <qapplication.h> 23#include <qapplication.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qlayout.h> 25#include <qlayout.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
28#include <kapplication.h> 28#include <kapplication.h>
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30#include <libkcal/todo.h> 30#include <libkcal/todo.h>
31#include <kdebug.h> 31#include <kdebug.h>
32#include <kiconloader.h> 32#include <kiconloader.h>
33#include <krun.h> 33#include <krun.h>
34#include <kglobal.h> 34#include <kglobal.h>
35#include <kprocess.h> 35#include <kprocess.h>
36#include "koprefs.h" 36#include "koprefs.h"
37 37
38#include <libkdepim/addresseeview.h> 38#include <libkdepim/addresseeview.h>
39#include <kabc/stdaddressbook.h> 39#include <kabc/stdaddressbook.h>
40 40
41#ifndef KORG_NODCOP 41#ifndef KORG_NODCOP
42#include <dcopclient.h> 42#include <dcopclient.h>
43#include "korganizer.h" 43#include "korganizer.h"
44#include "koprefs.h" 44#include "koprefs.h"
45#include "actionmanager.h" 45#include "actionmanager.h"
46#endif 46#endif
47 47
48#include "koeventviewer.h" 48#include "koeventviewer.h"
49#ifndef KORG_NOKABC 49#ifndef KORG_NOKABC
50#include <kabc/stdaddressbook.h> 50#include <kabc/stdaddressbook.h>
51#define size count 51#define size count
52#endif 52#endif
53 53
54#ifdef DESKTOP_VERSION 54#ifdef DESKTOP_VERSION
55#include <kabc/addresseedialog.h> 55#include <kabc/addresseedialog.h>
56#else //DESKTOP_VERSION 56#else //DESKTOP_VERSION
57#include <externalapphandler.h> 57#include <externalapphandler.h>
58#include <qtopia/qcopenvelope_qws.h> 58#include <qtopia/qcopenvelope_qws.h>
59#endif //DESKTOP_VERSION 59#endif //DESKTOP_VERSION
60 60
61KOEventViewer::KOEventViewer(QWidget *parent,const char *name) 61KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
62 : QTextBrowser(parent,name) 62 : QTextBrowser(parent,name)
63{ 63{
64 mSyncMode = false; 64 mSyncMode = false;
65 mColorMode = 0; 65 mColorMode = 0;
66} 66}
67 67
68KOEventViewer::~KOEventViewer() 68KOEventViewer::~KOEventViewer()
69{ 69{
70} 70}
71 71
72void KOEventViewer::setSource(const QString& n) 72void KOEventViewer::setSource(const QString& n)
73{ 73{
74 74
75 if ( n.left(3) == "uid" ) 75 if ( n.left(3) == "uid" )
76#ifdef DESKTOP_VERSION 76#ifdef DESKTOP_VERSION
77 { 77 {
78 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 78 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
79 KABC::AddressBook::Iterator it; 79 KABC::AddressBook::Iterator it;
80 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 80 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
81 // LR I do not understand, why the uid string is different on zaurus and desktop 81 // LR I do not understand, why the uid string is different on zaurus and desktop
82 QString uid = "uid://"+(*it).uid(); 82 QString uid = "uid://"+(*it).uid();
83 83
84 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); 84 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
85 if (n == uid ) { 85 if (n == uid ) {
86 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 86 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
87 QDialog dia( this,"dia123", true ); 87 QDialog dia( this,"dia123", true );
88 dia.setCaption( i18n("Details of attendee") ); 88 dia.setCaption( i18n("Details of attendee") );
89 QVBoxLayout lay ( &dia ); 89 QVBoxLayout lay ( &dia );
90 KPIM::AddresseeView av ( &dia ); 90 KPIM::AddresseeView av ( &dia );
91 av.setAddressee( (*it) ); 91 av.setAddressee( (*it) );
92 lay.addWidget( &av ); 92 lay.addWidget( &av );
93 if ( QApplication::desktop()->width() < 480 ) 93 if ( QApplication::desktop()->width() < 480 )
94 dia.resize( 220, 240); 94 dia.resize( 220, 240);
95 else { 95 else {
96 dia.resize( 400,400); 96 dia.resize( 400,400);
97
98 } 97 }
99 dia.exec(); 98 dia.exec();
100 break; 99 break;
101 } 100 }
102 } 101 }
103 return; 102 return;
104 } 103 }
105#else 104#else
106 { 105 {
107 if ( "uid:organizer" == n ) { 106 if ( "uid:organizer" == n ) {
108 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 107 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
109 return; 108 return;
110 } 109 }
111 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 110 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
112 if (attendees.count()) { 111 if (attendees.count()) {
113 Attendee *a; 112 Attendee *a;
114 for(a=attendees.first();a;a=attendees.next()) { 113 for(a=attendees.first();a;a=attendees.next()) {
115 if ( "uid:"+a->uid() == n ) { 114 if ( "uid:"+a->uid() == n ) {
116 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); 115 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
117 return; 116 return;
118 } 117 }
119 } 118 }
120 } 119 }
121 return; 120 return;
122 } 121 }
123 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 122 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
124 // the result should now arrive through method insertAttendees 123 // the result should now arrive through method insertAttendees
125 //QString uid = "uid:"+(*it).uid(); 124 //QString uid = "uid:"+(*it).uid();
126#endif 125#endif
127 if ( n.left(6) == "mailto" ) { 126 if ( n.left(6) == "mailto" ) {
128 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); 127 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
129#ifndef DESKTOP_VERSION 128#ifndef DESKTOP_VERSION
130 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); 129 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
131 e << n.mid(7); 130 e << n.mid(7);
132#endif 131#endif
133 132
134 } 133 }
135 134
136 135
137#ifndef KORG_NODCOP 136#ifndef KORG_NODCOP
138 kdDebug() << "KOEventViewer::setSource(): " << n << endl; 137 kdDebug() << "KOEventViewer::setSource(): " << n << endl;
139 QString tmpStr; 138 QString tmpStr;
140 if (n.startsWith("mailto:")) { 139 if (n.startsWith("mailto:")) {
141 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); 140 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
142 //emit showIncidence(n); 141 //emit showIncidence(n);
143 return; 142 return;
144 } else if (n.startsWith("uid:")) { 143 } else if (n.startsWith("uid:")) {
145 DCOPClient *client = KApplication::kApplication()->dcopClient(); 144 DCOPClient *client = KApplication::kApplication()->dcopClient();
146 const QByteArray noParamData; 145 const QByteArray noParamData;
147 const QByteArray paramData; 146 const QByteArray paramData;
148 QByteArray replyData; 147 QByteArray replyData;
149 QCString replyTypeStr; 148 QCString replyTypeStr;
150#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 149#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
151 bool foundAbbrowser = PING_ABBROWSER; 150 bool foundAbbrowser = PING_ABBROWSER;
152 151
153 if (foundAbbrowser) { 152 if (foundAbbrowser) {
154 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 153 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
155 //client->send("kaddressbook","KAddressBookIface", 154 //client->send("kaddressbook","KAddressBookIface",
156 QDataStream arg(paramData, IO_WriteOnly); 155 QDataStream arg(paramData, IO_WriteOnly);
157 arg << n.mid(6); 156 arg << n.mid(6);
158 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 157 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
159 return; 158 return;
160 } else { 159 } else {
161 /* 160 /*
162 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. 161 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
163 We start it without its main interface 162 We start it without its main interface
164 */ 163 */
165 KIconLoader* iconLoader = new KIconLoader(); 164 KIconLoader* iconLoader = new KIconLoader();
166 QString iconPath = iconLoader->iconPath("go",KIcon::Small); 165 QString iconPath = iconLoader->iconPath("go",KIcon::Small);
167 ActionManager::setStartedKAddressBook(true); 166 ActionManager::setStartedKAddressBook(true);
168 tmpStr = "kaddressbook --editor-only --uid "; 167 tmpStr = "kaddressbook --editor-only --uid ";
169 tmpStr += KProcess::quote(n.mid(6)); 168 tmpStr += KProcess::quote(n.mid(6));
170 KRun::runCommand(tmpStr,"KAddressBook",iconPath); 169 KRun::runCommand(tmpStr,"KAddressBook",iconPath);
171 return; 170 return;
172 } 171 }
173 } else { 172 } else {
174 //QTextBrowser::setSource(n); 173 //QTextBrowser::setSource(n);
175 } 174 }
176#endif 175#endif
177} 176}
178 177
179void KOEventViewer::addTag(const QString & tag,const QString & text) 178void KOEventViewer::addTag(const QString & tag,const QString & text)
180{ 179{
181 int number=text.contains("\n"); 180 int number=text.contains("\n");
182 QString str = "<" + tag + ">"; 181 QString str = "<" + tag + ">";
183 QString tmpText=text; 182 QString tmpText=text;
184 QString tmpStr=str; 183 QString tmpStr=str;
185 if(number !=-1) 184 if(number !=-1)
186 { 185 {
187 if (number > 0) { 186 if (number > 0) {
188 int pos=0; 187 int pos=0;
189 QString tmp; 188 QString tmp;
190 for(int i=0;i<=number;i++) { 189 for(int i=0;i<=number;i++) {
191 pos=tmpText.find("\n"); 190 pos=tmpText.find("\n");
192 tmp=tmpText.left(pos); 191 tmp=tmpText.left(pos);
193 tmpText=tmpText.right(tmpText.length()-pos-1); 192 tmpText=tmpText.right(tmpText.length()-pos-1);
194 tmpStr+=tmp+"<br>"; 193 tmpStr+=tmp+"<br>";
195 } 194 }
196 } 195 }
197 else tmpStr += tmpText; 196 else tmpStr += tmpText;
198 tmpStr+="</" + tag + ">"; 197 tmpStr+="</" + tag + ">";
199 mText.append(tmpStr); 198 mText.append(tmpStr);
200 } 199 }
201 else 200 else
202 { 201 {
203 str += text + "</" + tag + ">"; 202 str += text + "</" + tag + ">";
204 mText.append(str); 203 mText.append(str);
205 } 204 }
206} 205}
207 206
208void KOEventViewer::setColorMode( int m ) 207void KOEventViewer::setColorMode( int m )
209{ 208{
210 mColorMode = m; 209 mColorMode = m;
211} 210}
212void KOEventViewer::appendEvent(Event *event, int mode ) 211void KOEventViewer::appendEvent(Event *event, int mode )
213{ 212{
214 mMailSubject = ""; 213 mMailSubject = "";
215 mCurrentIncidence = event; 214 mCurrentIncidence = event;
216 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 215 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
217 topLevelWidget()->setCaption(i18n("Event Viewer")); 216 topLevelWidget()->setCaption(i18n("Event Viewer"));
218 if ( mode == 0 ) { 217 if ( mode == 0 ) {
219 addTag("h2",event->summary()); 218 addTag("h2",event->summary());
220 } 219 }
221 else { 220 else {
222 if ( mColorMode == 1 ) { 221 if ( mColorMode == 1 ) {
223 mText +="<font color=\"#00A000\">"; 222 mText +="<font color=\"#00A000\">";
224 } 223 }
225 if ( mColorMode == 2 ) { 224 if ( mColorMode == 2 ) {
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index be183eb..68c0e1a 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -102,138 +102,139 @@ void KOEventViewerDialog::setColorMode( int m )
102} 102}
103int KOEventViewerDialog::executeS( bool local ) 103int KOEventViewerDialog::executeS( bool local )
104{ 104{
105 mSyncResult = 3; 105 mSyncResult = 3;
106 if ( local ) 106 if ( local )
107 findButton( User1 )->setFocus(); 107 findButton( User1 )->setFocus();
108 else 108 else
109 findButton( Ok )->setFocus(); 109 findButton( Ok )->setFocus();
110 exec(); 110 exec();
111 return mSyncResult; 111 return mSyncResult;
112} 112}
113 113
114void KOEventViewerDialog::updateConfig() 114void KOEventViewerDialog::updateConfig()
115{ 115{
116 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 116 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
117 117
118} 118}
119void KOEventViewerDialog::setEvent(Event *event) 119void KOEventViewerDialog::setEvent(Event *event)
120{ 120{
121 mEventViewer->setEvent(event); 121 mEventViewer->setEvent(event);
122 mIncidence = event; 122 mIncidence = event;
123 findButton( Close )->setFocus(); 123 findButton( Close )->setFocus();
124} 124}
125void KOEventViewerDialog::setIncidence(Incidence *in ) 125void KOEventViewerDialog::setIncidence(Incidence *in )
126{ 126{
127 if ( in->type() == "Event" ) 127 if ( in->type() == "Event" )
128 setEvent( (Event*) in ); 128 setEvent( (Event*) in );
129 else if ( in->type() =="Todo" ) 129 else if ( in->type() =="Todo" )
130 setTodo( (Todo*) in ); 130 setTodo( (Todo*) in );
131 else if ( in->type() =="Journal" ) 131 else if ( in->type() =="Journal" )
132 setJournal( (Journal*) in ); 132 setJournal( (Journal*) in );
133} 133}
134void KOEventViewerDialog::addIncidence(Incidence *in) 134void KOEventViewerDialog::addIncidence(Incidence *in)
135{ 135{
136 if ( in->type() == "Event" ) 136 if ( in->type() == "Event" )
137 addEvent( (Event*) in ); 137 addEvent( (Event*) in );
138 else if ( in->type() =="Todo" ) 138 else if ( in->type() =="Todo" )
139 mEventViewer->setTodo( (Todo*) in, false ); 139 mEventViewer->setTodo( (Todo*) in, false );
140 else if ( in->type() =="Journal" ) 140 else if ( in->type() =="Journal" )
141 mEventViewer->setJournal( (Journal*) in, false ); 141 mEventViewer->setJournal( (Journal*) in, false );
142 if ( mSyncMode ) { 142 if ( mSyncMode ) {
143 findButton( User1 )->setFocus(); 143 findButton( User1 )->setFocus();
144 setCaption(i18n("Conflict! Please choose entry")); 144 setCaption(i18n("Conflict! Please choose entry"));
145 } 145 }
146} 146}
147 147
148void KOEventViewerDialog::addEvent(Event *event) 148void KOEventViewerDialog::addEvent(Event *event)
149{ 149{
150 mEventViewer->addEvent(event); 150 mEventViewer->addEvent(event);
151 mIncidence = event; 151 mIncidence = event;
152 findButton( Close )->setFocus(); 152 findButton( Close )->setFocus();
153} 153}
154 154
155void KOEventViewerDialog::setTodo(Todo *event) 155void KOEventViewerDialog::setTodo(Todo *event)
156{ 156{
157 mEventViewer->setTodo(event); 157 mEventViewer->setTodo(event);
158 mIncidence = (Incidence*)event; 158 mIncidence = (Incidence*)event;
159 findButton( Close )->setFocus(); 159 findButton( Close )->setFocus();
160} 160}
161void KOEventViewerDialog::setJournal(Journal *j) 161void KOEventViewerDialog::setJournal(Journal *j)
162{ 162{
163 mEventViewer->setJournal(j); 163 mEventViewer->setJournal(j);
164 mIncidence = (Incidence*)j; 164 mIncidence = (Incidence*)j;
165 findButton( Close )->setFocus(); 165 findButton( Close )->setFocus();
166} 166}
167 167
168void KOEventViewerDialog::addText(QString text) 168void KOEventViewerDialog::addText(QString text)
169{ 169{
170 mEventViewer->addText(text); 170 mEventViewer->addText(text);
171 findButton( Close )->setFocus(); 171 findButton( Close )->setFocus();
172} 172}
173void KOEventViewerDialog::editIncidence() 173void KOEventViewerDialog::editIncidence()
174{ 174{
175 if ( mSyncMode ) { 175 if ( mSyncMode ) {
176 mSyncResult = 2; 176 mSyncResult = 2;
177 accept(); 177 accept();
178 return; 178 return;
179 } 179 }
180 if ( mIncidence ){ 180 if ( mIncidence ){
181#ifndef DESKTOP_VERSION 181#ifndef DESKTOP_VERSION
182 hide(); 182 hide();
183#endif 183#endif
184 emit editIncidence( mIncidence ); 184 emit editIncidence( mIncidence );
185 } 185 }
186} 186}
187void KOEventViewerDialog::showIncidence() 187void KOEventViewerDialog::showIncidence()
188{ 188{
189 189
190 if ( mSyncMode ) { 190 if ( mSyncMode ) {
191 mSyncResult = 1; 191 mSyncResult = 1;
192 accept(); 192 accept();
193 return; 193 return;
194 } 194 }
195 195
196 if ( mIncidence ){ 196 if ( mIncidence ){
197#ifndef DESKTOP_VERSION 197#ifndef DESKTOP_VERSION
198 hide(); 198 hide();
199#endif 199#endif
200 QDate date; 200 QDate date;
201 if ( mIncidence->type() == "Todo" ) { 201 if ( mIncidence->type() == "Todo" ) {
202 if ( ((Todo*)mIncidence)->hasDueDate() ) 202 if ( ((Todo*)mIncidence)->hasDueDate() )
203 date = ((Todo*)mIncidence)->dtDue().date(); 203 date = ((Todo*)mIncidence)->dtDue().date();
204 else { 204 else {
205 globalFlagBlockAgenda = 2; 205 globalFlagBlockAgenda = 2;
206 emit showAgendaView( false ); 206 emit showAgendaView( false );
207 return; 207 return;
208 } 208 }
209 } else 209 } else
210 date = mIncidence->dtStart().date(); 210 date = mIncidence->dtStart().date();
211 globalFlagBlockAgenda = 1; 211 globalFlagBlockAgenda = 1;
212 emit showAgendaView( false ); 212 emit showAgendaView( false );
213 globalFlagBlockAgenda = 2; 213 globalFlagBlockAgenda = 2;
214 emit jumpToTime( date ); 214 emit jumpToTime( date );
215 } 215 }
216} 216}
217void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) 217void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
218{ 218{
219 switch ( e->key() ) { 219 switch ( e->key() ) {
220 220
221 case Qt::Key_A : 221 case Qt::Key_A :
222 case Qt::Key_L : 222 case Qt::Key_L :
223 showIncidence(); 223 showIncidence();
224 break; 224 break;
225 case Qt::Key_E : 225 case Qt::Key_E :
226 case Qt::Key_R : 226 case Qt::Key_R :
227 editIncidence(); 227 editIncidence();
228 break; 228 break;
229 case Qt::Key_C: 229 case Qt::Key_C:
230 case Qt::Key_Escape:
230 close(); 231 close();
231 break; 232 break;
232 case Qt::Key_I: 233 case Qt::Key_I:
233 accept(); 234 accept();
234 break; 235 break;
235 default: 236 default:
236 break; 237 break;
237 } 238 }
238 239
239} 240}