summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
Unidiff
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index cec0476..25e599d 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -311,53 +311,53 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
311 selPopup->insertItem(i18n("All"),this, 311 selPopup->insertItem(i18n("All"),this,
312 SLOT(allSelection())); 312 SLOT(allSelection()));
313 selPopup->insertItem(i18n("None"),this, 313 selPopup->insertItem(i18n("None"),this,
314 SLOT(clearSelection())); 314 SLOT(clearSelection()));
315 selPopup->insertItem(i18n("Delete selected..."),this, 315 selPopup->insertItem(i18n("Delete selected..."),this,
316 SLOT(deleteAll())); 316 SLOT(deleteAll()));
317 mPopupMenu->insertItem(i18n("Selection"), selPopup ); 317 mPopupMenu->insertItem(i18n("Selection"), selPopup );
318 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 318 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
319 i18n("Hide all selected"),this, 319 i18n("Hide all selected"),this,
320 SLOT(hideAll()),true); 320 SLOT(hideAll()),true);
321 321
322 selPopup->insertSeparator(); 322 selPopup->insertSeparator();
323 QPopupMenu * exportPO = new QPopupMenu ( this );
324 selPopup->insertItem( i18n("Export"), exportPO );
323#ifdef DESKTOP_VERSION 325#ifdef DESKTOP_VERSION
324 mPopupMenu->insertSeparator(); 326 mPopupMenu->insertSeparator();
325 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 327 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
326 i18n("Print complete list"),this, 328 i18n("Print complete list..."),this,
327 SLOT(printList()),true); 329 SLOT(printList()),true);
328#endif 330#endif
329 mCalPopup = new QPopupMenu ( this ); 331 mCalPopup = new QPopupMenu ( this );
330 selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); 332 selPopup->insertItem( i18n("Set Calendar"), mCalPopup );
331 333
332 selPopup->insertItem(i18n("Set categories")+"...",this, 334 selPopup->insertItem(i18n("Set categories")+"...",this,
333 SLOT(setCat()) ); 335 SLOT(setCat()) );
334 selPopup->insertItem( i18n("Set alarm..."),this, 336 selPopup->insertItem( i18n("Set alarm..."),this,
335 SLOT(setAlarm())); 337 SLOT(setAlarm()));
336#if 0 338#if 0
337 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 339 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
338 i18n("Set categories")+"...",this, 340 i18n("Set categories")+"...",this,
339 SLOT(setCat()),true); 341 SLOT(setCat()),true);
340 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 342 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
341 i18n("Set alarm..."),this, 343 i18n("Set alarm..."),this,
342 SLOT(setAlarm()),true); 344 SLOT(setAlarm()),true);
343#endif 345#endif
344 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, 346 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this,
345 SLOT( populateCalPopup() )); 347 SLOT( populateCalPopup() ));
346 QObject::connect(mCalPopup,SIGNAL(activated( int )),this, 348 QObject::connect(mCalPopup,SIGNAL(activated( int )),this,
347 SLOT( setCalendar( int ) )); 349 SLOT( setCalendar( int ) ));
348 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, 350 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this,
349 SLOT( catChanged( Incidence * ) )); 351 SLOT( catChanged( Incidence * ) ));
350 QPopupMenu * exportPO = new QPopupMenu ( this );
351 selPopup->insertItem( i18n("Export"), exportPO );
352 exportPO->insertItem( i18n("As iCal (ics) file..."),this, 352 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
353 SLOT(saveToFile())); 353 SLOT(saveToFile()));
354 exportPO->insertItem( i18n("As vCal (vcs) file..."),this, 354 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
355 SLOT(saveToFileVCS())); 355 SLOT(saveToFileVCS()));
356 exportPO->insertItem( i18n("Journal/Details..."),this, 356 exportPO->insertItem( i18n("Journal/Details..."),this,
357 SLOT(saveDescriptionToFile())); 357 SLOT(saveDescriptionToFile()));
358 // mPopupMenu->insertSeparator(); 358 // mPopupMenu->insertSeparator();
359 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 359 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
360 // i18n("Add Categ. to selected..."),this, 360 // i18n("Add Categ. to selected..."),this,
361 // SLOT(addCat()),true); 361 // SLOT(addCat()),true);
362 //mPopupMenu->insertSeparator(); 362 //mPopupMenu->insertSeparator();
363#ifndef DESKTOP_VERSION 363#ifndef DESKTOP_VERSION
@@ -1303,25 +1303,24 @@ KOListViewListView::KOListViewListView(KOListView * lv )
1303{ 1303{
1304 mYMousePos = 0; 1304 mYMousePos = 0;
1305 mPopupTimer = new QTimer(this); 1305 mPopupTimer = new QTimer(this);
1306 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); 1306 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
1307#ifndef DESKTOP_VERSION 1307#ifndef DESKTOP_VERSION
1308 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 1308 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
1309#endif 1309#endif
1310 setSelectionMode( QListView::Multi ); 1310 setSelectionMode( QListView::Multi );
1311 setMultiSelection( true); 1311 setMultiSelection( true);
1312} 1312}
1313bool KOListViewListView::hasMultiSelection(QListViewItem* item) 1313bool KOListViewListView::hasMultiSelection(QListViewItem* item)
1314{ 1314{
1315 int selCount = 0;
1316 QListViewItem *qitem = firstChild (); 1315 QListViewItem *qitem = firstChild ();
1317 while ( qitem ) { 1316 while ( qitem ) {
1318 if ( qitem->isSelected() && item != qitem ) 1317 if ( qitem->isSelected() && item != qitem )
1319 return true; 1318 return true;
1320 qitem = qitem->nextSibling(); 1319 qitem = qitem->nextSibling();
1321 } 1320 }
1322 return false; 1321 return false;
1323} 1322}
1324void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) 1323void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1325{ 1324{
1326 if (!e) return; 1325 if (!e) return;
1327 QPoint vp = contentsToViewport(e->pos()); 1326 QPoint vp = contentsToViewport(e->pos());