summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
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
@@ -2426,56 +2426,60 @@ void CalendarView::moveIncidence(Incidence * inc )
2426 mDatePicker->setDate( da ); 2426 mDatePicker->setDate( da );
2427} 2427}
2428void CalendarView::showDatePicker( ) 2428void CalendarView::showDatePicker( )
2429{ 2429{
2430 //qDebug("CalendarView::showDatePicker( ) "); 2430 //qDebug("CalendarView::showDatePicker( ) ");
2431 if ( mDateFrame->isVisible() ) 2431 if ( mDateFrame->isVisible() )
2432 mDateFrame->hide(); 2432 mDateFrame->hide();
2433 else { 2433 else {
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();
2474 if ( incidence ) { 2478 if ( incidence ) {
2475 moveIncidence(incidence); 2479 moveIncidence(incidence);
2476 } 2480 }
2477} 2481}
2478void CalendarView::beamIncidence() 2482void CalendarView::beamIncidence()
2479{ 2483{
2480 Incidence *incidence = currentSelection(); 2484 Incidence *incidence = currentSelection();
2481 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2485 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
@@ -353,48 +353,49 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
353 mTodoListView->setColumnAlignment(1,AlignHCenter); 353 mTodoListView->setColumnAlignment(1,AlignHCenter);
354 mTodoListView->addColumn(i18n("Complete")); 354 mTodoListView->addColumn(i18n("Complete"));
355 mTodoListView->setColumnAlignment(2,AlignHCenter); 355 mTodoListView->setColumnAlignment(2,AlignHCenter);
356 mTodoListView->addColumn(i18n("Due Date")); 356 mTodoListView->addColumn(i18n("Due Date"));
357 mTodoListView->setColumnAlignment(3,AlignLeft); 357 mTodoListView->setColumnAlignment(3,AlignLeft);
358 mTodoListView->addColumn(i18n("Due Time")); 358 mTodoListView->addColumn(i18n("Due Time"));
359 mTodoListView->setColumnAlignment(4,AlignHCenter); 359 mTodoListView->setColumnAlignment(4,AlignHCenter);
360 mTodoListView->addColumn(i18n("Cancelled")); 360 mTodoListView->addColumn(i18n("Cancelled"));
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;
393 } 394 }
394 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 395 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
395 396
396 397
397 398
398 mItemPopupMenu = new QPopupMenu(this); 399 mItemPopupMenu = new QPopupMenu(this);
399 mItemPopupMenu->insertItem(i18n("Show..."), this, 400 mItemPopupMenu->insertItem(i18n("Show..."), this,
400 SLOT (showTodo())); 401 SLOT (showTodo()));
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 85647b1..ae0b334 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -21,49 +21,49 @@
21#include <kdebug.h> 21#include <kdebug.h>
22#include <qapp.h> 22#include <qapp.h>
23 23
24#include <kiconloader.h> 24#include <kiconloader.h>
25#include "kotodoviewitem.h" 25#include "kotodoviewitem.h"
26#include "kotodoview.h" 26#include "kotodoview.h"
27#include "koprefs.h" 27#include "koprefs.h"
28 28
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}
62void KOTodoViewItem::setSortKey(int column,const QString &key) 62void KOTodoViewItem::setSortKey(int column,const QString &key)
63{ 63{
64 mKeyMap.insert(column,key); 64 mKeyMap.insert(column,key);
65} 65}
66 66
67#if QT_VERSION >= 300 67#if QT_VERSION >= 300
68void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, 68void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
69 int y,int h) 69 int y,int h)