author | zautrix <zautrix> | 2004-10-10 20:52:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 20:52:35 (UTC) |
commit | ad409bf71ce6c3733f9e5ae4e4aa38765329d7d8 (patch) (unidiff) | |
tree | 1e8b4286ed0d30499bfdb048fc4163caf05f69ce | |
parent | ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a (diff) | |
download | kdepimpi-ad409bf71ce6c3733f9e5ae4e4aa38765329d7d8.zip kdepimpi-ad409bf71ce6c3733f9e5ae4e4aa38765329d7d8.tar.gz kdepimpi-ad409bf71ce6c3733f9e5ae4e4aa38765329d7d8.tar.bz2 |
todo list fixes
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 19 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 |
3 files changed, 13 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 0c35bb3..1f2c6da 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -309,9 +309,9 @@ void CalendarView::init() | |||
309 | "CalendarView::DateNavigator", QDate::currentDate()); | 309 | "CalendarView::DateNavigator", QDate::currentDate()); |
310 | // mDateNavigator->blockSignals( true ); | 310 | // mDateNavigator->blockSignals( true ); |
311 | leftFrameLayout->addWidget( mDateNavigator ); | 311 | leftFrameLayout->addWidget( mDateNavigator ); |
312 | mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView"); | 312 | mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView"); |
313 | mTodoList = new KOTodoView(mCalendar, leftFrame, "todolist"); | 313 | mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); |
314 | 314 | ||
315 | if ( QApplication::desktop()->width() < 480 ) { | 315 | if ( QApplication::desktop()->width() < 480 ) { |
316 | leftFrameLayout->addWidget(mFilterView); | 316 | leftFrameLayout->addWidget(mFilterView); |
317 | leftFrameLayout->addWidget(mTodoList, 2 ); | 317 | leftFrameLayout->addWidget(mTodoList, 2 ); |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index da46eca..ca5eadd 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -56,8 +56,9 @@ using namespace KOrg; | |||
56 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 56 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
57 | const char *name) : | 57 | const char *name) : |
58 | KListView(parent,name) | 58 | KListView(parent,name) |
59 | { | 59 | { |
60 | mName = QString ( name ); | ||
60 | mCalendar = calendar; | 61 | mCalendar = calendar; |
61 | #ifndef DESKTOP_VERSION | 62 | #ifndef DESKTOP_VERSION |
62 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 63 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
63 | #endif | 64 | #endif |
@@ -263,14 +264,18 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
263 | return; | 264 | return; |
264 | } | 265 | } |
265 | 266 | ||
266 | // qDebug("KOTodoListView::keyPressEvent "); | 267 | // qDebug("KOTodoListView::keyPressEvent "); |
267 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || ( height() > 150 && width() > 200 ) ) { | 268 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
268 | switch ( e->key() ) { | 269 | switch ( e->key() ) { |
269 | case Qt::Key_Down: | 270 | case Qt::Key_Down: |
270 | case Qt::Key_Up: | 271 | case Qt::Key_Up: |
271 | QListView::keyPressEvent ( e ); | 272 | QListView::keyPressEvent ( e ); |
272 | break; | 273 | break; |
274 | case Qt::Key_Left: | ||
275 | case Qt::Key_Right: | ||
276 | QListView::keyPressEvent ( e ); | ||
277 | break; | ||
273 | default: | 278 | default: |
274 | e->ignore(); | 279 | e->ignore(); |
275 | break; | 280 | break; |
276 | } | 281 | } |
@@ -331,9 +336,9 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
331 | topLayout->addWidget(mQuickAdd); | 336 | topLayout->addWidget(mQuickAdd); |
332 | 337 | ||
333 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 338 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
334 | 339 | ||
335 | mTodoListView = new KOTodoListView(calendar,this); | 340 | mTodoListView = new KOTodoListView(calendar,this, name ); |
336 | topLayout->addWidget(mTodoListView); | 341 | topLayout->addWidget(mTodoListView); |
337 | //mTodoListView->header()->setMaximumHeight(30); | 342 | //mTodoListView->header()->setMaximumHeight(30); |
338 | mTodoListView->setRootIsDecorated(true); | 343 | mTodoListView->setRootIsDecorated(true); |
339 | mTodoListView->setAllColumnsShowFocus(true); | 344 | mTodoListView->setAllColumnsShowFocus(true); |
@@ -970,23 +975,21 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
970 | // e->ignore(); | 975 | // e->ignore(); |
971 | //return; | 976 | //return; |
972 | switch ( e->key() ) { | 977 | switch ( e->key() ) { |
973 | case Qt::Key_Down: | 978 | case Qt::Key_Down: |
974 | QWidget::keyPressEvent ( e ); | ||
975 | break; | ||
976 | |||
977 | case Qt::Key_Up: | 979 | case Qt::Key_Up: |
978 | QWidget::keyPressEvent ( e ); | 980 | QWidget::keyPressEvent ( e ); |
979 | break; | 981 | break; |
982 | |||
980 | case Qt::Key_Q: | 983 | case Qt::Key_Q: |
981 | toggleQuickTodo(); | 984 | toggleQuickTodo(); |
982 | break; | 985 | break; |
983 | 986 | ||
984 | default: | 987 | default: |
985 | e->ignore(); | 988 | e->ignore(); |
986 | } | 989 | } |
987 | 990 | ||
988 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || ( height() > 150 && width() > 200 ) ) { | 991 | if ( true ) { |
989 | if ( e->key() == Qt::Key_I ) { | 992 | if ( e->key() == Qt::Key_I ) { |
990 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 993 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
991 | if ( cn ) { | 994 | if ( cn ) { |
992 | mActiveItem = cn; | 995 | mActiveItem = cn; |
@@ -1000,9 +1003,9 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
1000 | } | 1003 | } |
1001 | 1004 | ||
1002 | } | 1005 | } |
1003 | } | 1006 | } |
1004 | e->accept(); | 1007 | e->accept(); |
1005 | 1008 | ||
1006 | } | 1009 | } |
1007 | 1010 | ||
1008 | } | 1011 | } |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 4495702..6bf0203 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -73,8 +73,9 @@ class KOTodoListView : public KListView | |||
73 | void contentsMouseReleaseEvent(QMouseEvent *); | 73 | void contentsMouseReleaseEvent(QMouseEvent *); |
74 | void contentsMouseDoubleClickEvent(QMouseEvent *); | 74 | void contentsMouseDoubleClickEvent(QMouseEvent *); |
75 | 75 | ||
76 | private: | 76 | private: |
77 | QString mName; | ||
77 | Calendar *mCalendar; | 78 | Calendar *mCalendar; |
78 | QPoint mPressPos; | 79 | QPoint mPressPos; |
79 | bool mMousePressed; | 80 | bool mMousePressed; |
80 | QListViewItem *mOldCurrent; | 81 | QListViewItem *mOldCurrent; |