summaryrefslogtreecommitdiffabout
path: root/libkdepim/kdatepicker.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/kdatepicker.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/kdatepicker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 5d83511..7f352d6 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -431,58 +431,59 @@ KDatePicker::setFontSize(int s)
// monthForward,
// yearForward
};
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
int count;
QFont font;
QRect r;
// -----
fontsize=s;
for(count=0; count<NoOfButtons; ++count)
{
font=buttons[count]->font();
font.setPointSize(s);
buttons[count]->setFont(font);
}
QFontMetrics metrics(selectMonth->fontMetrics());
for(int i=1; i <= 12; ++i)
{ // maxMonthRect is used by sizeHint()
r=metrics.boundingRect(KGlobal::locale()->monthName(i, false));
maxMonthRect.setWidth(QMAX(r.width(), maxMonthRect.width()));
maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height()));
}
table->setFontSize(s);
}
void KDatePicker::virtual_hook( int id, void* data )
{ /*BASE::virtual_hook( id, data );*/ }
void KDatePicker::keyPressEvent ( QKeyEvent * e )
{
switch ( e->key() ) {
case Qt::Key_Right:
monthForwardClicked();
break;
case Qt::Key_Left:
monthBackwardClicked();
break;
case Qt::Key_Down:
yearForwardClicked();
break;
case Qt::Key_Up:
yearBackwardClicked();
break;
case Qt::Key_Return:
+ case Qt::Key_Enter:
tableClickedSlot();
break;
case Qt::Key_Escape:
e->ignore();
break;
default:
break;
}
}