summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-12-04 04:53:22 (UTC)
committer zautrix <zautrix>2004-12-04 04:53:22 (UTC)
commit7828f46413766ee5db72dc9bd457eac0868f0646 (patch) (unidiff)
treed3da09120bdef2b498f836c5b1b97a5b2aa2da99 /korganizer
parent967f7c879d06961dd7a25d019380c521f7a84792 (diff)
downloadkdepimpi-7828f46413766ee5db72dc9bd457eac0868f0646.zip
kdepimpi-7828f46413766ee5db72dc9bd457eac0868f0646.tar.gz
kdepimpi-7828f46413766ee5db72dc9bd457eac0868f0646.tar.bz2
fixed some bugs
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/kotodoview.cpp1
-rw-r--r--korganizer/kotodoviewitem.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 2321087..3908dbb 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2434,40 +2434,44 @@ void CalendarView::showDatePicker( )
2434 int w =mDatePicker->sizeHint().width() ; 2434 int w =mDatePicker->sizeHint().width() ;
2435 int h = mDatePicker->sizeHint().height() ; 2435 int h = mDatePicker->sizeHint().height() ;
2436 int dw = QApplication::desktop()->width(); 2436 int dw = QApplication::desktop()->width();
2437 int dh = QApplication::desktop()->height(); 2437 int dh = QApplication::desktop()->height();
2438 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2438 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2439 mDateFrame->show(); 2439 mDateFrame->show();
2440 } 2440 }
2441 mDatePickerMode = 1; 2441 mDatePickerMode = 1;
2442 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2442 mDatePicker->setDate( mNavigator->selectedDates().first() );
2443} 2443}
2444 2444
2445void CalendarView::showEventEditor() 2445void CalendarView::showEventEditor()
2446{ 2446{
2447#ifdef DESKTOP_VERSION 2447#ifdef DESKTOP_VERSION
2448 mEventEditor->show(); 2448 mEventEditor->show();
2449#else 2449#else
2450 if ( mEventEditor->width() != QApplication::desktop()->width() )
2451 mEventEditor->hide();
2450 mEventEditor->showMaximized(); 2452 mEventEditor->showMaximized();
2451#endif 2453#endif
2452} 2454}
2453void CalendarView::showTodoEditor() 2455void CalendarView::showTodoEditor()
2454{ 2456{
2455#ifdef DESKTOP_VERSION 2457#ifdef DESKTOP_VERSION
2456 mTodoEditor->show(); 2458 mTodoEditor->show();
2457#else 2459#else
2460 if ( mTodoEditor->width() != QApplication::desktop()->width() )
2461 mTodoEditor->hide();
2458 mTodoEditor->showMaximized(); 2462 mTodoEditor->showMaximized();
2459#endif 2463#endif
2460} 2464}
2461 2465
2462void CalendarView::cloneIncidence() 2466void CalendarView::cloneIncidence()
2463{ 2467{
2464 Incidence *incidence = currentSelection(); 2468 Incidence *incidence = currentSelection();
2465 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2469 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2466 if ( incidence ) { 2470 if ( incidence ) {
2467 cloneIncidence(incidence); 2471 cloneIncidence(incidence);
2468 } 2472 }
2469} 2473}
2470void CalendarView::moveIncidence() 2474void CalendarView::moveIncidence()
2471{ 2475{
2472 Incidence *incidence = currentSelection(); 2476 Incidence *incidence = currentSelection();
2473 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2477 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index a12acd1..9cafc60 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -361,32 +361,33 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
361 mTodoListView->addColumn(i18n("Categories")); 361 mTodoListView->addColumn(i18n("Categories"));
362#if 0 362#if 0
363 mTodoListView->addColumn(i18n("Sort Id")); 363 mTodoListView->addColumn(i18n("Sort Id"));
364 mTodoListView->setColumnAlignment(4,AlignHCenter); 364 mTodoListView->setColumnAlignment(4,AlignHCenter);
365#endif 365#endif
366 366
367 mTodoListView->setMinimumHeight( 60 ); 367 mTodoListView->setMinimumHeight( 60 );
368 mTodoListView->setItemsRenameable( true ); 368 mTodoListView->setItemsRenameable( true );
369 mTodoListView->setRenameable( 0 ); 369 mTodoListView->setRenameable( 0 );
370 mTodoListView->setColumnWidth( 0, 120 ); 370 mTodoListView->setColumnWidth( 0, 120 );
371 mTodoListView->setColumnWidthMode(0, QListView::Manual); 371 mTodoListView->setColumnWidthMode(0, QListView::Manual);
372 mTodoListView->setColumnWidthMode(1, QListView::Manual); 372 mTodoListView->setColumnWidthMode(1, QListView::Manual);
373 mTodoListView->setColumnWidthMode(2, QListView::Manual); 373 mTodoListView->setColumnWidthMode(2, QListView::Manual);
374 mTodoListView->setColumnWidthMode(3, QListView::Manual); 374 mTodoListView->setColumnWidthMode(3, QListView::Manual);
375 mTodoListView->setColumnWidthMode(4, QListView::Manual); 375 mTodoListView->setColumnWidthMode(4, QListView::Manual);
376 mTodoListView->setColumnWidthMode(5, QListView::Manual); 376 mTodoListView->setColumnWidthMode(5, QListView::Manual);
377 mTodoListView->setColumnWidthMode(6, QListView::Manual);
377 mTodoListView->setColumnAlignment( 2, AlignCenter ); 378 mTodoListView->setColumnAlignment( 2, AlignCenter );
378#if 0 379#if 0
379 mTodoListView->setColumnWidthMode(6, QListView::Manual); 380 mTodoListView->setColumnWidthMode(6, QListView::Manual);
380#endif 381#endif
381 382
382 mPriorityPopupMenu = new QPopupMenu(this); 383 mPriorityPopupMenu = new QPopupMenu(this);
383 for (int i = 1; i <= 5; i++) { 384 for (int i = 1; i <= 5; i++) {
384 QString label = QString ("%1").arg (i); 385 QString label = QString ("%1").arg (i);
385 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 386 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
386 } 387 }
387 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 388 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
388 389
389 mPercentageCompletedPopupMenu = new QPopupMenu(this); 390 mPercentageCompletedPopupMenu = new QPopupMenu(this);
390 for (int i = 0; i <= 100; i+=20) { 391 for (int i = 0; i <= 100; i+=20) {
391 QString label = QString ("%1 %").arg (i); 392 QString label = QString ("%1 %").arg (i);
392 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 393 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 85647b1..ae0b334 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -29,33 +29,33 @@
29KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo) 29KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo)
30 : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 30 : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
31{ 31{
32 construct(); 32 construct();
33} 33}
34 34
35KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo ) 35KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
36 : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 36 : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
37{ 37{
38 construct(); 38 construct();
39} 39}
40 40
41QString KOTodoViewItem::key(int column,bool) const 41QString KOTodoViewItem::key(int column,bool) const
42{ 42{
43 QMap<int,QString>::ConstIterator it = mKeyMap.find(column); 43 QMap<int,QString>::ConstIterator it = mKeyMap.find(column);
44 if (it == mKeyMap.end()) { 44 if (it == mKeyMap.end()) {
45 return text(column); 45 return text(column).lower();
46 } else { 46 } else {
47 return *it; 47 return *it;
48 } 48 }
49} 49}
50 50
51void KOTodoViewItem:: setup() 51void KOTodoViewItem:: setup()
52{ 52{
53 53
54 int h = 20; 54 int h = 20;
55 if ( listView () ) { 55 if ( listView () ) {
56 QFontMetrics fm ( listView ()->font () ); 56 QFontMetrics fm ( listView ()->font () );
57 h = fm.height(); 57 h = fm.height();
58 } 58 }
59 setHeight( h ); 59 setHeight( h );
60 60
61} 61}