-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 @@ -311,5 +311,5 @@ void CalendarView::init() leftFrameLayout->addWidget( mDateNavigator ); mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView"); - mTodoList = new KOTodoView(mCalendar, leftFrame, "todolist"); + mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); if ( QApplication::desktop()->width() < 480 ) { diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index da46eca..ca5eadd 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -58,4 +58,5 @@ KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, KListView(parent,name) { + mName = QString ( name ); mCalendar = calendar; #ifndef DESKTOP_VERSION @@ -265,10 +266,14 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) // qDebug("KOTodoListView::keyPressEvent "); - if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || ( height() > 150 && width() > 200 ) ) { + if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { switch ( e->key() ) { case Qt::Key_Down: case Qt::Key_Up: QListView::keyPressEvent ( e ); - break; + break; + case Qt::Key_Left: + case Qt::Key_Right: + QListView::keyPressEvent ( e ); + break; default: e->ignore(); @@ -333,5 +338,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); - mTodoListView = new KOTodoListView(calendar,this); + mTodoListView = new KOTodoListView(calendar,this, name ); topLayout->addWidget(mTodoListView); //mTodoListView->header()->setMaximumHeight(30); @@ -972,10 +977,8 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) switch ( e->key() ) { case Qt::Key_Down: - QWidget::keyPressEvent ( e ); - break; - case Qt::Key_Up: QWidget::keyPressEvent ( e ); break; + case Qt::Key_Q: toggleQuickTodo(); @@ -986,5 +989,5 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) } - if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || ( height() > 150 && width() > 200 ) ) { + if ( true ) { if ( e->key() == Qt::Key_I ) { KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); @@ -1002,5 +1005,5 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) } } - e->accept(); + e->accept(); } diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 4495702..6bf0203 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -75,4 +75,5 @@ class KOTodoListView : public KListView private: + QString mName; Calendar *mCalendar; QPoint mPressPos; |