|
|
@ -351,22 +351,22 @@ void KDateTable::previousMonth()
|
|
|
|
|
|
|
|
|
|
|
|
void KDateTable::beginningOfMonth()
|
|
|
|
void KDateTable::beginningOfMonth()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(1 - date.day())));
|
|
|
|
setDate(date.addDays(1 - date.day()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KDateTable::endOfMonth()
|
|
|
|
void KDateTable::endOfMonth()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(date.daysInMonth() - date.day())));
|
|
|
|
setDate(date.addDays(date.daysInMonth() - date.day()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KDateTable::beginningOfWeek()
|
|
|
|
void KDateTable::beginningOfWeek()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(1 - date.dayOfWeek())));
|
|
|
|
setDate(date.addDays(1 - date.dayOfWeek()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KDateTable::endOfWeek()
|
|
|
|
void KDateTable::endOfWeek()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(7 - date.dayOfWeek())));
|
|
|
|
setDate(date.addDays(7 - date.dayOfWeek()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
@ -374,22 +374,22 @@ KDateTable::keyPressEvent( TQKeyEvent *e )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch( e->key() ) {
|
|
|
|
switch( e->key() ) {
|
|
|
|
case Key_Up:
|
|
|
|
case Key_Up:
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(-7)));
|
|
|
|
setDate(date.addDays(-7));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Key_Down:
|
|
|
|
case Key_Down:
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(7)));
|
|
|
|
setDate(date.addDays(7));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Key_Left:
|
|
|
|
case Key_Left:
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(-1)));
|
|
|
|
setDate(date.addDays(-1));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Key_Right:
|
|
|
|
case Key_Right:
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(1)));
|
|
|
|
setDate(date.addDays(1));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Key_Minus:
|
|
|
|
case Key_Minus:
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(-1)));
|
|
|
|
setDate(date.addDays(-1));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Key_Plus:
|
|
|
|
case Key_Plus:
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addDays(1)));
|
|
|
|
setDate(date.addDays(1));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Key_N:
|
|
|
|
case Key_N:
|
|
|
|
setDate(TQDate::currentDate());
|
|
|
|
setDate(TQDate::currentDate());
|
|
|
@ -447,7 +447,7 @@ KDateTable::setFontSize(int size)
|
|
|
|
void
|
|
|
|
void
|
|
|
|
KDateTable::wheelEvent ( TQWheelEvent * e )
|
|
|
|
KDateTable::wheelEvent ( TQWheelEvent * e )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setDate(TQT_TQDATE_OBJECT(date.addMonths( -(int)(e->delta()/120)) ));
|
|
|
|
setDate(date.addMonths( -(int)(e->delta()/120)) );
|
|
|
|
e->accept();
|
|
|
|
e->accept();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|