author | zautrix <zautrix> | 2005-04-21 11:44:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-21 11:44:00 (UTC) |
commit | 4d96d7b681ce99d76746a843c289b75f5e7dba64 (patch) (unidiff) | |
tree | 71b6953625d8b096e62177bf93379c3ca6c74d66 /korganizer/kolistview.cpp | |
parent | f23afbb9c09b4ee0f00af8f04ee4458181792cd0 (diff) | |
download | kdepimpi-4d96d7b681ce99d76746a843c289b75f5e7dba64.zip kdepimpi-4d96d7b681ce99d76746a843c289b75f5e7dba64.tar.gz kdepimpi-4d96d7b681ce99d76746a843c289b75f5e7dba64.tar.bz2 |
memory leaks fixed
-rw-r--r-- | korganizer/kolistview.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index fd86095..b94916a 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -216,173 +216,178 @@ bool ListItemVisitor::visit(Journal * j) | |||
216 | mItem->setText(3,"---"); | 216 | mItem->setText(3,"---"); |
217 | mItem->setText(4,"---"); | 217 | mItem->setText(4,"---"); |
218 | mItem->setText(5,"---"); | 218 | mItem->setText(5,"---"); |
219 | mItem->setText(6,"---"); | 219 | mItem->setText(6,"---"); |
220 | mItem->setText(7,j->dtStartDateStr()); | 220 | mItem->setText(7,j->dtStartDateStr()); |
221 | mItem->setText(8,"---"); | 221 | mItem->setText(8,"---"); |
222 | mItem->setText(9,"---"); | 222 | mItem->setText(9,"---"); |
223 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | 223 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); |
224 | 224 | ||
225 | QString key; | 225 | QString key; |
226 | QDate d = j->dtStart().date(); | 226 | QDate d = j->dtStart().date(); |
227 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 227 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
228 | mItem->setSortKey(1,key); | 228 | mItem->setSortKey(1,key); |
229 | mItem->setSortKey(7,key); | 229 | mItem->setSortKey(7,key); |
230 | 230 | ||
231 | return true; | 231 | return true; |
232 | } | 232 | } |
233 | 233 | ||
234 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 234 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
235 | const char *name) | 235 | const char *name) |
236 | : KOEventView(calendar, parent, name) | 236 | : KOEventView(calendar, parent, name) |
237 | { | 237 | { |
238 | mActiveItem = 0; | 238 | mActiveItem = 0; |
239 | mListView = new KOListViewListView(this); | 239 | mListView = new KOListViewListView(this); |
240 | mListView->addColumn(i18n("Summary")); | 240 | mListView->addColumn(i18n("Summary")); |
241 | mListView->addColumn(i18n("Start Date")); | 241 | mListView->addColumn(i18n("Start Date")); |
242 | mListView->addColumn(i18n("Start Time")); | 242 | mListView->addColumn(i18n("Start Time")); |
243 | mListView->addColumn(i18n("End Date")); | 243 | mListView->addColumn(i18n("End Date")); |
244 | mListView->addColumn(i18n("End Time")); | 244 | mListView->addColumn(i18n("End Time")); |
245 | mListView->addColumn(i18n("Alarm")); // alarm set? | 245 | mListView->addColumn(i18n("Alarm")); // alarm set? |
246 | mListView->addColumn(i18n("Recurs")); // recurs? | 246 | mListView->addColumn(i18n("Recurs")); // recurs? |
247 | mListView->addColumn(i18n("Due Date")); | 247 | mListView->addColumn(i18n("Due Date")); |
248 | mListView->addColumn(i18n("Due Time")); | 248 | mListView->addColumn(i18n("Due Time")); |
249 | mListView->addColumn(i18n("Cancelled")); | 249 | mListView->addColumn(i18n("Cancelled")); |
250 | mListView->addColumn(i18n("Categories")); | 250 | mListView->addColumn(i18n("Categories")); |
251 | 251 | ||
252 | mListView->setColumnAlignment(0,AlignLeft); | 252 | mListView->setColumnAlignment(0,AlignLeft); |
253 | mListView->setColumnAlignment(1,AlignLeft); | 253 | mListView->setColumnAlignment(1,AlignLeft); |
254 | mListView->setColumnAlignment(2,AlignHCenter); | 254 | mListView->setColumnAlignment(2,AlignHCenter); |
255 | mListView->setColumnAlignment(3,AlignLeft); | 255 | mListView->setColumnAlignment(3,AlignLeft); |
256 | mListView->setColumnAlignment(4,AlignHCenter); | 256 | mListView->setColumnAlignment(4,AlignHCenter); |
257 | mListView->setColumnAlignment(5,AlignLeft); | 257 | mListView->setColumnAlignment(5,AlignLeft); |
258 | mListView->setColumnAlignment(6,AlignLeft); | 258 | mListView->setColumnAlignment(6,AlignLeft); |
259 | mListView->setColumnAlignment(7,AlignLeft); | 259 | mListView->setColumnAlignment(7,AlignLeft); |
260 | mListView->setColumnAlignment(8,AlignLeft); | 260 | mListView->setColumnAlignment(8,AlignLeft); |
261 | mListView->setColumnAlignment(9,AlignLeft); | 261 | mListView->setColumnAlignment(9,AlignLeft); |
262 | mListView->setColumnAlignment(10,AlignLeft); | 262 | mListView->setColumnAlignment(10,AlignLeft); |
263 | mListView->setColumnWidthMode(10, QListView::Manual); | 263 | mListView->setColumnWidthMode(10, QListView::Manual); |
264 | new KOListViewWhatsThis(mListView->viewport(),this); | 264 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); |
265 | 265 | ||
266 | int iii = 0; | 266 | int iii = 0; |
267 | for ( iii = 0; iii< 10 ; ++iii ) | 267 | for ( iii = 0; iii< 10 ; ++iii ) |
268 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 268 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
269 | 269 | ||
270 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 270 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
271 | layoutTop->addWidget(mListView); | 271 | layoutTop->addWidget(mListView); |
272 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 272 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
273 | mPopupMenu = eventPopup(); | 273 | mPopupMenu = eventPopup(); |
274 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 274 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
275 | i18n("Select all"),this, | 275 | i18n("Select all"),this, |
276 | SLOT(allSelection()),true); | 276 | SLOT(allSelection()),true); |
277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
278 | i18n("Deselect all"),this, | 278 | i18n("Deselect all"),this, |
279 | SLOT(clearSelection()),true); | 279 | SLOT(clearSelection()),true); |
280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
281 | i18n("Delete all selected"),this, | 281 | i18n("Delete all selected"),this, |
282 | SLOT(deleteAll()),true); | 282 | SLOT(deleteAll()),true); |
283 | mPopupMenu->insertSeparator(); | 283 | mPopupMenu->insertSeparator(); |
284 | QPopupMenu * exportPO = new QPopupMenu ( this ); | 284 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
285 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); | 285 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); |
286 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, | 286 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
287 | SLOT(saveToFile())); | 287 | SLOT(saveToFile())); |
288 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, | 288 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
289 | SLOT(saveToFileVCS())); | 289 | SLOT(saveToFileVCS())); |
290 | exportPO->insertItem( i18n("Journal/Details..."),this, | 290 | exportPO->insertItem( i18n("Journal/Details..."),this, |
291 | SLOT(saveDescriptionToFile())); | 291 | SLOT(saveDescriptionToFile())); |
292 | // mPopupMenu->insertSeparator(); | 292 | // mPopupMenu->insertSeparator(); |
293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
294 | i18n("Add Categ. to selected..."),this, | 294 | i18n("Add Categ. to selected..."),this, |
295 | SLOT(addCat()),true); | 295 | SLOT(addCat()),true); |
296 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 296 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
297 | i18n("Set Categ. for selected..."),this, | 297 | i18n("Set Categ. for selected..."),this, |
298 | SLOT(setCat()),true); | 298 | SLOT(setCat()),true); |
299 | //mPopupMenu->insertSeparator(); | 299 | //mPopupMenu->insertSeparator(); |
300 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 300 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
301 | i18n("Set alarm for selected..."),this, | 301 | i18n("Set alarm for selected..."),this, |
302 | SLOT(setAlarm()),true); | 302 | SLOT(setAlarm()),true); |
303 | 303 | ||
304 | 304 | ||
305 | #ifndef DESKTOP_VERSION | 305 | #ifndef DESKTOP_VERSION |
306 | mPopupMenu->insertSeparator(); | 306 | mPopupMenu->insertSeparator(); |
307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
308 | i18n("Beam selected via IR"),this, | 308 | i18n("Beam selected via IR"),this, |
309 | SLOT(beamSelected()),true); | 309 | SLOT(beamSelected()),true); |
310 | #endif | 310 | #endif |
311 | /* | 311 | /* |
312 | mPopupMenu = new QPopupMenu; | 312 | mPopupMenu = new QPopupMenu; |
313 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 313 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
314 | SLOT (editEvent())); | 314 | SLOT (editEvent())); |
315 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 315 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
316 | SLOT (deleteEvent())); | 316 | SLOT (deleteEvent())); |
317 | mPopupMenu->insertSeparator(); | 317 | mPopupMenu->insertSeparator(); |
318 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 318 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
319 | SLOT(showDates())); | 319 | SLOT(showDates())); |
320 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 320 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
321 | SLOT(hideDates())); | 321 | SLOT(hideDates())); |
322 | */ | 322 | */ |
323 | QObject::connect(mListView,SIGNAL( newEvent()), | 323 | QObject::connect(mListView,SIGNAL( newEvent()), |
324 | this,SIGNAL(signalNewEvent())); | 324 | this,SIGNAL(signalNewEvent())); |
325 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 325 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
326 | this,SLOT(defaultItemAction(QListViewItem *))); | 326 | this,SLOT(defaultItemAction(QListViewItem *))); |
327 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, | 327 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, |
328 | const QPoint &, int )), | 328 | const QPoint &, int )), |
329 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); | 329 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); |
330 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), | 330 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), |
331 | SLOT(processSelectionChange(QListViewItem *))); | 331 | SLOT(processSelectionChange(QListViewItem *))); |
332 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), | 332 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), |
333 | SIGNAL(showIncidenceSignal(Incidence *)) ); | 333 | SIGNAL(showIncidenceSignal(Incidence *)) ); |
334 | 334 | ||
335 | readSettings(KOGlobals::config(),"KOListView Layout"); | 335 | readSettings(KOGlobals::config(),"KOListView Layout"); |
336 | } | 336 | } |
337 | 337 | ||
338 | KOListView::~KOListView() | 338 | KOListView::~KOListView() |
339 | { | 339 | { |
340 | delete mPopupMenu; | 340 | delete mPopupMenu; |
341 | #if QT_VERSION >= 0x030000 | ||
342 | |||
343 | #else | ||
344 | delete mKOListViewWhatsThis; | ||
345 | #endif | ||
341 | } | 346 | } |
342 | 347 | ||
343 | QString KOListView::getWhatsThisText(QPoint p) | 348 | QString KOListView::getWhatsThisText(QPoint p) |
344 | { | 349 | { |
345 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 350 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
346 | if ( item ) | 351 | if ( item ) |
347 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), | 352 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
348 | KOPrefs::instance()->mWTshowDetails, | 353 | KOPrefs::instance()->mWTshowDetails, |
349 | KOPrefs::instance()->mWTshowCreated, | 354 | KOPrefs::instance()->mWTshowCreated, |
350 | KOPrefs::instance()->mWTshowChanged); | 355 | KOPrefs::instance()->mWTshowChanged); |
351 | return i18n("That is the list view" ); | 356 | return i18n("That is the list view" ); |
352 | 357 | ||
353 | } | 358 | } |
354 | 359 | ||
355 | void KOListView::updateList() | 360 | void KOListView::updateList() |
356 | { | 361 | { |
357 | // qDebug(" KOListView::updateList() "); | 362 | // qDebug(" KOListView::updateList() "); |
358 | 363 | ||
359 | } | 364 | } |
360 | 365 | ||
361 | void KOListView::addCat( ) | 366 | void KOListView::addCat( ) |
362 | { | 367 | { |
363 | setCategories( false ); | 368 | setCategories( false ); |
364 | } | 369 | } |
365 | void KOListView::setCat() | 370 | void KOListView::setCat() |
366 | { | 371 | { |
367 | setCategories( true ); | 372 | setCategories( true ); |
368 | } | 373 | } |
369 | void KOListView::setAlarm() | 374 | void KOListView::setAlarm() |
370 | { | 375 | { |
371 | KOAlarmPrefs kap( this); | 376 | KOAlarmPrefs kap( this); |
372 | if ( !kap.exec() ) | 377 | if ( !kap.exec() ) |
373 | return; | 378 | return; |
374 | QStringList itemList; | 379 | QStringList itemList; |
375 | QPtrList<KOListViewItem> sel ; | 380 | QPtrList<KOListViewItem> sel ; |
376 | QListViewItem *qitem = mListView->firstChild (); | 381 | QListViewItem *qitem = mListView->firstChild (); |
377 | while ( qitem ) { | 382 | while ( qitem ) { |
378 | if ( qitem->isSelected() ) { | 383 | if ( qitem->isSelected() ) { |
379 | Incidence* inc = ((KOListViewItem *) qitem)->data(); | 384 | Incidence* inc = ((KOListViewItem *) qitem)->data(); |
380 | if ( inc->type() != "Journal" ) { | 385 | if ( inc->type() != "Journal" ) { |
381 | if ( inc->type() == "Todo" ) { | 386 | if ( inc->type() == "Todo" ) { |
382 | if ( ((Todo*)inc)->hasDueDate() ) | 387 | if ( ((Todo*)inc)->hasDueDate() ) |
383 | sel.append(((KOListViewItem *)qitem)); | 388 | sel.append(((KOListViewItem *)qitem)); |
384 | } else | 389 | } else |
385 | sel.append(((KOListViewItem *)qitem)); | 390 | sel.append(((KOListViewItem *)qitem)); |
386 | } | 391 | } |
387 | } | 392 | } |
388 | qitem = qitem->nextSibling(); | 393 | qitem = qitem->nextSibling(); |
@@ -1136,96 +1141,97 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) | |||
1136 | break; | 1141 | break; |
1137 | case Qt::Key_I: { | 1142 | case Qt::Key_I: { |
1138 | QListViewItem* cn; | 1143 | QListViewItem* cn; |
1139 | cn = currentItem(); | 1144 | cn = currentItem(); |
1140 | if ( cn ) { | 1145 | if ( cn ) { |
1141 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1146 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1142 | if ( ci ){ | 1147 | if ( ci ){ |
1143 | //emit showIncidence( ci->data()); | 1148 | //emit showIncidence( ci->data()); |
1144 | cn = cn->nextSibling(); | 1149 | cn = cn->nextSibling(); |
1145 | if ( cn ) { | 1150 | if ( cn ) { |
1146 | setCurrentItem ( cn ); | 1151 | setCurrentItem ( cn ); |
1147 | ensureItemVisible ( cn ); | 1152 | ensureItemVisible ( cn ); |
1148 | } | 1153 | } |
1149 | emit showIncidence( ci->data()); | 1154 | emit showIncidence( ci->data()); |
1150 | } | 1155 | } |
1151 | } | 1156 | } |
1152 | e->accept(); | 1157 | e->accept(); |
1153 | } | 1158 | } |
1154 | break; | 1159 | break; |
1155 | case Qt::Key_Return: | 1160 | case Qt::Key_Return: |
1156 | case Qt::Key_Enter: | 1161 | case Qt::Key_Enter: |
1157 | { | 1162 | { |
1158 | QListViewItem* cn; | 1163 | QListViewItem* cn; |
1159 | cn = currentItem(); | 1164 | cn = currentItem(); |
1160 | if ( cn ) { | 1165 | if ( cn ) { |
1161 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1166 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1162 | if ( ci ){ | 1167 | if ( ci ){ |
1163 | if ( e->state() == ShiftButton ) | 1168 | if ( e->state() == ShiftButton ) |
1164 | ci->setSelected( false ); | 1169 | ci->setSelected( false ); |
1165 | else | 1170 | else |
1166 | ci->setSelected( true ); | 1171 | ci->setSelected( true ); |
1167 | cn = cn->nextSibling(); | 1172 | cn = cn->nextSibling(); |
1168 | if ( cn ) { | 1173 | if ( cn ) { |
1169 | setCurrentItem ( cn ); | 1174 | setCurrentItem ( cn ); |
1170 | ensureItemVisible ( cn ); | 1175 | ensureItemVisible ( cn ); |
1171 | } | 1176 | } |
1172 | } | 1177 | } |
1173 | } | 1178 | } |
1174 | e->accept(); | 1179 | e->accept(); |
1175 | } | 1180 | } |
1176 | break; | 1181 | break; |
1177 | default: | 1182 | default: |
1178 | e->ignore(); | 1183 | e->ignore(); |
1179 | } | 1184 | } |
1180 | } | 1185 | } |
1181 | KOListViewListView::KOListViewListView(KOListView * lv ) | 1186 | KOListViewListView::KOListViewListView(KOListView * lv ) |
1182 | : KListView( lv, "kolistlistview", false ) | 1187 | : KListView( lv, "kolistlistview", false ) |
1183 | { | 1188 | { |
1189 | mYMousePos = 0; | ||
1184 | mPopupTimer = new QTimer(this); | 1190 | mPopupTimer = new QTimer(this); |
1185 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 1191 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
1186 | #ifndef DESKTOP_VERSION | 1192 | #ifndef DESKTOP_VERSION |
1187 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 1193 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
1188 | #endif | 1194 | #endif |
1189 | setSelectionMode( QListView::Multi ); | 1195 | setSelectionMode( QListView::Multi ); |
1190 | setMultiSelection( true); | 1196 | setMultiSelection( true); |
1191 | } | 1197 | } |
1192 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 1198 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
1193 | { | 1199 | { |
1194 | if (!e) return; | 1200 | if (!e) return; |
1195 | QPoint vp = contentsToViewport(e->pos()); | 1201 | QPoint vp = contentsToViewport(e->pos()); |
1196 | QListViewItem *item = itemAt(vp); | 1202 | QListViewItem *item = itemAt(vp); |
1197 | if (!item) { | 1203 | if (!item) { |
1198 | emit newEvent(); | 1204 | emit newEvent(); |
1199 | return; | 1205 | return; |
1200 | } | 1206 | } |
1201 | KListView::contentsMouseDoubleClickEvent(e); | 1207 | KListView::contentsMouseDoubleClickEvent(e); |
1202 | } | 1208 | } |
1203 | #if 0 | 1209 | #if 0 |
1204 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1210 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1205 | { | 1211 | { |
1206 | //qDebug("contentsMousePressEvent++++ "); | 1212 | //qDebug("contentsMousePressEvent++++ "); |
1207 | KListView::contentsMousePressEvent( e ); | 1213 | KListView::contentsMousePressEvent( e ); |
1208 | if ( e->button() == RightButton ) { | 1214 | if ( e->button() == RightButton ) { |
1209 | QListViewItem* ci = currentItem(); | 1215 | QListViewItem* ci = currentItem(); |
1210 | clearSelection () ; | 1216 | clearSelection () ; |
1211 | if ( ci ) | 1217 | if ( ci ) |
1212 | ci->setSelected( true ); | 1218 | ci->setSelected( true ); |
1213 | } | 1219 | } |
1214 | } | 1220 | } |
1215 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1221 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1216 | { | 1222 | { |
1217 | KListView::contentsMouseReleaseEvent(e); | 1223 | KListView::contentsMouseReleaseEvent(e); |
1218 | } | 1224 | } |
1219 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1225 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1220 | { | 1226 | { |
1221 | KListView::contentsMouseMoveEvent(e); | 1227 | KListView::contentsMouseMoveEvent(e); |
1222 | } | 1228 | } |
1223 | #endif | 1229 | #endif |
1224 | void KOListViewListView::popupMenu() | 1230 | void KOListViewListView::popupMenu() |
1225 | { | 1231 | { |
1226 | mPopupTimer->stop(); | 1232 | mPopupTimer->stop(); |
1227 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); | 1233 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); |
1228 | QApplication::postEvent( this->viewport(), e ); | 1234 | QApplication::postEvent( this->viewport(), e ); |
1229 | 1235 | ||
1230 | } | 1236 | } |
1231 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1237 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |