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