summaryrefslogtreecommitdiffstats
path: root/libkdeedu/extdate/extdatepicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdeedu/extdate/extdatepicker.cpp')
-rw-r--r--libkdeedu/extdate/extdatepicker.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/libkdeedu/extdate/extdatepicker.cpp b/libkdeedu/extdate/extdatepicker.cpp
index ad524863..5a5864d2 100644
--- a/libkdeedu/extdate/extdatepicker.cpp
+++ b/libkdeedu/extdate/extdatepicker.cpp
@@ -77,28 +77,28 @@ void ExtDatePicker::fillWeeksCombo(const ExtDate &date)
for (; day <= lastDay; day = d->calendar->addDays(day, 7 /*calendar->daysOfWeek()*/) )
{
int year = 0;
- TQString week = i18n("Week %1").arg(d->calendar->weekNumber(day, &year));
+ TQString week = i18n("Week %1").tqarg(d->calendar->weekNumber(day, &year));
if ( year != date.year() ) week += "*"; // show that this is a week from a different year
d->selectWeek->insertItem(week);
}
}
-ExtDatePicker::ExtDatePicker(TQWidget *parent, ExtDate dt, const char *name)
- : TQFrame(parent,name)
+ExtDatePicker::ExtDatePicker(TQWidget *tqparent, ExtDate dt, const char *name)
+ : TQFrame(tqparent,name)
{
init( dt );
}
-ExtDatePicker::ExtDatePicker(TQWidget *parent, ExtDate dt, const char *name, WFlags f)
- : TQFrame(parent,name, f)
+ExtDatePicker::ExtDatePicker(TQWidget *tqparent, ExtDate dt, const char *name, WFlags f)
+ : TQFrame(tqparent,name, f)
{
init( dt );
}
-ExtDatePicker::ExtDatePicker( TQWidget *parent, const char *name )
- : TQFrame(parent,name)
+ExtDatePicker::ExtDatePicker( TQWidget *tqparent, const char *name )
+ : TQFrame(tqparent,name)
{
- init( ExtDate::currentDate() );
+ init( ExtDate::tqcurrentDate() );
}
void ExtDatePicker::init( const ExtDate &dt )
@@ -166,17 +166,17 @@ void ExtDatePicker::init( const ExtDate &dt )
if ( TQApplication::reverseLayout() )
{
- yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
- yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
- monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
- monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow")));
}
else
{
- yearForward->setIconSet(BarIconSet(TQString::fromLatin1("2rightarrow")));
- yearBackward->setIconSet(BarIconSet(TQString::fromLatin1("2leftarrow")));
- monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow")));
- monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow")));
+ yearForward->setIconSet(BarIconSet(TQString::tqfromLatin1("2rightarrow")));
+ yearBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("2leftarrow")));
+ monthForward->setIconSet(BarIconSet(TQString::tqfromLatin1("1rightarrow")));
+ monthBackward->setIconSet(BarIconSet(TQString::tqfromLatin1("1leftarrow")));
}
connect(table, TQT_SIGNAL(dateChanged(const ExtDate&)), TQT_SLOT(dateChangedSlot(const ExtDate&)));
connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot()));
@@ -214,10 +214,10 @@ ExtDatePicker::eventFilter(TQObject *o, TQEvent *e )
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *k = (TQKeyEvent *)e;
- if ( (k->key() == Qt::Key_Prior) ||
- (k->key() == Qt::Key_Next) ||
- (k->key() == Qt::Key_Up) ||
- (k->key() == Qt::Key_Down) )
+ if ( (k->key() == TQt::Key_Prior) ||
+ (k->key() == TQt::Key_Next) ||
+ (k->key() == TQt::Key_Up) ||
+ (k->key() == TQt::Key_Down) )
{
TQApplication::sendEvent( table, e );
table->setFocus();
@@ -365,9 +365,9 @@ ExtDatePicker::selectMonthClicked()
int day = d->calendar->day(date);
// ----- construct a valid date in this month:
//date.setYMD(date.year(), month, 1);
- //date.setYMD(date.year(), month, QMIN(day, date.daysInMonth()));
+ //date.setYMD(date.year(), month, TQMIN(day, date.daysInMonth()));
d->calendar->setYMD(date, d->calendar->year(date), month,
- QMIN(day, d->calendar->daysInMonth(date)));
+ TQMIN(day, d->calendar->daysInMonth(date)));
// ----- set this month
setDate(date);
}
@@ -386,7 +386,7 @@ ExtDatePicker::selectYearClicked()
KPopupFrame* popup = new KPopupFrame(this);
ExtDateInternalYearSelector* picker = new ExtDateInternalYearSelector(popup);
// -----
- picker->resize(picker->sizeHint());
+ picker->resize(picker->tqsizeHint());
popup->setMainWidget(picker);
connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
picker->setFocus();
@@ -400,9 +400,9 @@ ExtDatePicker::selectYearClicked()
day=d->calendar->day(date);
// ----- construct a valid date in this month:
//date.setYMD(year, date.month(), 1);
- //date.setYMD(year, date.month(), QMIN(day, date.daysInMonth()));
+ //date.setYMD(year, date.month(), TQMIN(day, date.daysInMonth()));
d->calendar->setYMD(date, year, d->calendar->month(date),
- QMIN(day, d->calendar->daysInMonth(date)));
+ TQMIN(day, d->calendar->daysInMonth(date)));
// ----- set this month
setDate(date);
} else {
@@ -446,13 +446,13 @@ ExtDatePicker::lineEnterPressed()
void
ExtDatePicker::todayButtonClicked()
{
- setDate(ExtDate::currentDate());
+ setDate(ExtDate::tqcurrentDate());
}
-QSize
-ExtDatePicker::sizeHint() const
+TQSize
+ExtDatePicker::tqsizeHint() const
{
- return TQWidget::sizeHint();
+ return TQWidget::tqsizeHint();
}
void
@@ -486,11 +486,11 @@ ExtDatePicker::setFontSize(int s)
d->calendar->year(table->getDate()), false);
if (str.isNull()) break;
r=metrics.boundingRect(str);
- maxMonthRect.setWidth(QMAX(r.width(), maxMonthRect.width()));
- maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height()));
+ maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width()));
+ maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height()));
}
- TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton,
+ TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton,
selectMonth,
maxMonthRect);
selectMonth->setMinimumSize(metricBound);
@@ -512,7 +512,7 @@ ExtDatePicker::setCloseButton( bool enable )
TQToolTip::add(d->closeButton, i18n("Close"));
d->closeButton->setPixmap( SmallIcon("remove") );
connect( d->closeButton, TQT_SIGNAL( clicked() ),
- topLevelWidget(), TQT_SLOT( close() ) );
+ tqtopLevelWidget(), TQT_SLOT( close() ) );
}
else {
delete d->closeButton;