summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
authorzautrix <zautrix>2005-07-02 17:31:20 (UTC)
committer zautrix <zautrix>2005-07-02 17:31:20 (UTC)
commit0233482f5f4baf7a0af45229b02c5deaab17a412 (patch) (unidiff)
treef22927da2ae116c53dc87026ce60b56704309e56 /korganizer/kolistview.cpp
parent78866028c185f4227bfb653ee2050d7feb2e2b78 (diff)
downloadkdepimpi-0233482f5f4baf7a0af45229b02c5deaab17a412.zip
kdepimpi-0233482f5f4baf7a0af45229b02c5deaab17a412.tar.gz
kdepimpi-0233482f5f4baf7a0af45229b02c5deaab17a412.tar.bz2
mv warnings removed
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 1b4397f..db3f802 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -311,32 +311,34 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
311 SLOT(printList()),true); 311 SLOT(printList()),true);
312 mPopupMenu->insertSeparator(); 312 mPopupMenu->insertSeparator();
313#endif 313#endif
314 mCalPopup = new QPopupMenu ( this ); 314 mCalPopup = new QPopupMenu ( this );
315 mPopupMenu->insertItem( i18n("Set Calendar"), mCalPopup ); 315 mPopupMenu->insertItem( i18n("Set Calendar"), mCalPopup );
316 316
317 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 317 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
318 i18n("Set categories")+"...",this, 318 i18n("Set categories")+"...",this,
319 SLOT(setCat()),true); 319 SLOT(setCat()),true);
320 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 320 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
321 i18n("Set alarm..."),this, 321 i18n("Set alarm..."),this,
322 SLOT(setAlarm()),true); 322 SLOT(setAlarm()),true);
323 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, 323 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this,
324 SLOT( populateCalPopup() )); 324 SLOT( populateCalPopup() ));
325 QObject::connect(mCalPopup,SIGNAL(activated( int )),this, 325 QObject::connect(mCalPopup,SIGNAL(activated( int )),this,
326 SLOT( setCalendar( int ) )); 326 SLOT( setCalendar( int ) ));
327 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this,
328 SLOT( catChanged( Incidence * ) ));
327 QPopupMenu * exportPO = new QPopupMenu ( this ); 329 QPopupMenu * exportPO = new QPopupMenu ( this );
328 mPopupMenu->insertItem( i18n("Export"), exportPO ); 330 mPopupMenu->insertItem( i18n("Export"), exportPO );
329 exportPO->insertItem( i18n("As iCal (ics) file..."),this, 331 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
330 SLOT(saveToFile())); 332 SLOT(saveToFile()));
331 exportPO->insertItem( i18n("As vCal (vcs) file..."),this, 333 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
332 SLOT(saveToFileVCS())); 334 SLOT(saveToFileVCS()));
333 exportPO->insertItem( i18n("Journal/Details..."),this, 335 exportPO->insertItem( i18n("Journal/Details..."),this,
334 SLOT(saveDescriptionToFile())); 336 SLOT(saveDescriptionToFile()));
335 // mPopupMenu->insertSeparator(); 337 // mPopupMenu->insertSeparator();
336 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 338 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
337 // i18n("Add Categ. to selected..."),this, 339 // i18n("Add Categ. to selected..."),this,
338 // SLOT(addCat()),true); 340 // SLOT(addCat()),true);
339 //mPopupMenu->insertSeparator(); 341 //mPopupMenu->insertSeparator();
340#ifndef DESKTOP_VERSION 342#ifndef DESKTOP_VERSION
341 mPopupMenu->insertSeparator(); 343 mPopupMenu->insertSeparator();
342 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 344 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
@@ -367,32 +369,40 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
367 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 369 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
368 SIGNAL(showIncidenceSignal(Incidence *)) ); 370 SIGNAL(showIncidenceSignal(Incidence *)) );
369 371
370 readSettings(KOGlobals::config(),"KOListView Layout"); 372 readSettings(KOGlobals::config(),"KOListView Layout");
371} 373}
372 374
373KOListView::~KOListView() 375KOListView::~KOListView()
374{ 376{
375 delete mPopupMenu; 377 delete mPopupMenu;
376#if QT_VERSION >= 0x030000 378#if QT_VERSION >= 0x030000
377 379
378#else 380#else
379 delete mKOListViewWhatsThis; 381 delete mKOListViewWhatsThis;
380#endif 382#endif
381} 383}
382 384
385void KOListView::catChanged( Incidence* inc)
386{
387 KOListViewItem* item = getItemForEvent(inc);
388 if (item) {
389 ListItemVisitor v(item, mStartDate );
390 inc->accept(v);
391 }
392}
383QString KOListView::getWhatsThisText(QPoint p) 393QString KOListView::getWhatsThisText(QPoint p)
384{ 394{
385 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); 395 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
386 if ( item ) 396 if ( item )
387 return KIncidenceFormatter::instance()->getFormattedText( item->data(), 397 return KIncidenceFormatter::instance()->getFormattedText( item->data(),
388 KOPrefs::instance()->mWTshowDetails, 398 KOPrefs::instance()->mWTshowDetails,
389 KOPrefs::instance()->mWTshowCreated, 399 KOPrefs::instance()->mWTshowCreated,
390 KOPrefs::instance()->mWTshowChanged); 400 KOPrefs::instance()->mWTshowChanged);
391 return i18n("That is the list view" ); 401 return i18n("That is the list view" );
392 402
393} 403}
394 404
395void KOListView::setCalendar( int c ) 405void KOListView::setCalendar( int c )
396{ 406{
397 int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), 407 int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"),
398 i18n("This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!").arg( KOPrefs::instance()->calName( c ) ), 408 i18n("This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!").arg( KOPrefs::instance()->calName( c ) ),