summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--korganizer/kdatenavigator.cpp2
-rw-r--r--korganizer/komonthview.cpp52
-rw-r--r--korganizer/komonthview.h4
4 files changed, 51 insertions, 12 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 3ba0841..7214035 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -14,2 +14,7 @@ Made the week-month mode changing in month view faster.
+Made month view better useable with keyboard.
+Now TAB key jumps to next cell with an event/todo.
+Scroll in cell with coursor keys, scroll in time (next week) with
+Shift/Control + coursorkeys.
+
********** VERSION 2.0.2 ************
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index f31e50a..c08f44f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -60,3 +60,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, Calendar *calendar,
if (! startDate.isValid()) {
- kdDebug() << "KDateNavigator::KDateNavigator(): an invalid date was passed as a parameter!" << endl;
+ qDebug("KDateNavigator::invalid startdate ");
startDate = QDate::currentDate();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index dfa89e2..df5e060 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -102,3 +102,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
case Key_Right:
- // if ( e->state() == Qt::ControlButton )
+ if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
{
@@ -107,6 +107,6 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
}
- scrollBy(4,0);
+ scrollBy(10,0);
break;
case Key_Left:
- // if ( e->state() == Qt::ControlButton )
+ if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
{
@@ -115,6 +115,6 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
}
- scrollBy(-4,0);
+ scrollBy(-10,0);
break;
case Key_Up:
- if(count() < 2) {
+ if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
e->ignore();
@@ -132,3 +132,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
case Key_Down:
- if(count() < 2) {
+ if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
e->ignore();
@@ -145,2 +145,6 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
break;
+ case Key_I:
+ QTimer::singleShot( 11, this, SLOT ( oneDown() ) );
+ e->ignore();
+ break;
case Key_Shift:
@@ -154,2 +158,13 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
+void KNoScrollListBox::oneDown()
+{
+ setCurrentItem((currentItem()+1)%count());
+ if(!itemVisible(currentItem())) {
+ if(currentItem() == 0) {
+ setTopItem(0);
+ } else {
+ setTopItem(topItem()+1);
+ }
+ }
+}
void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
@@ -284,2 +299,3 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
mLabel->setFlat( true );
+ mLabel->setFocusPolicy(NoFocus);
mItemList = new KNoScrollListBox( this );
@@ -403,4 +419,6 @@ void MonthViewCell::startUpdateCell()
+ mItemList->setFocusPolicy(NoFocus);
if ( !mMonthView->isUpdatePossible() )
return;
+
/*
@@ -435,2 +453,4 @@ void MonthViewCell::insertEvent(Event *event)
{
+
+ mItemList->setFocusPolicy(WheelFocus);
if ( !(event->doesRecur() == Recurrence::rNone) ) {
@@ -540,3 +560,3 @@ void MonthViewCell::insertTodo(Todo *todo)
}
- text += i18n("To-Do: %1").arg(todo->summary());
+ text += i18n("Td: %1").arg(todo->summary());
@@ -828,2 +848,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
KOWeekButton *label = new KOWeekButton( mMonthView );
+ label->setFocusPolicy(NoFocus);
label->setFont(bfont);
@@ -842,2 +863,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
KOWeekButton *label = new KOWeekButton( mWeekView );
+ label->setFocusPolicy(NoFocus);
label->setFont(bfont);
@@ -905,6 +927,3 @@ KOMonthView::~KOMonthView()
}
-void KOMonthView::selectDateWeekNum ( int )
-{
-}
void KOMonthView::selectInternalWeekNum ( int n )
@@ -915,2 +934,8 @@ void KOMonthView::selectInternalWeekNum ( int n )
+int KOMonthView::currentWeek()
+{
+ if ( mShowWeekView )
+ return mWeekLabelsW[0]->getWeekNum();
+ return mWeekLabels[0]->getWeekNum();
+}
void KOMonthView::switchView()
@@ -1541,2 +1566,9 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
break;
+ case Key_Return:
+ case Key_Enter:
+ {
+ selectInternalWeekNum ( currentWeek() );
+ }
+ e->accept();
+ break;
default:
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 700f098..51eb9e6 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -56,2 +56,3 @@ class KOWeekButton : public QPushButton
void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));}
+ int getWeekNum() { return mNumber;}
signals:
@@ -78,2 +79,3 @@ class KNoScrollListBox: public QListBox
protected slots:
+ void oneDown();
void keyPressEvent(QKeyEvent *);
@@ -243,3 +245,2 @@ class KOMonthView: public KOEventView
protected slots:
- void selectDateWeekNum ( int );
void selectInternalWeekNum ( int );
@@ -259,2 +260,3 @@ class KOMonthView: public KOEventView
private:
+ int currentWeek();
bool clPending;