summaryrefslogtreecommitdiffstats
path: root/kplato/kptcalendarpanel.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:56:31 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kplato/kptcalendarpanel.cc
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kplato/kptcalendarpanel.cc')
-rw-r--r--kplato/kptcalendarpanel.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/kplato/kptcalendarpanel.cc b/kplato/kptcalendarpanel.cc
index 59ab2f01..e6322944 100644
--- a/kplato/kptcalendarpanel.cc
+++ b/kplato/kptcalendarpanel.cc
@@ -65,7 +65,7 @@ CalendarPanel::CalendarPanel(TQWidget *parent, TQDate dt, const char *name, WFla
CalendarPanel::CalendarPanel( TQWidget *parent, const char *name )
: TQFrame(parent,name)
{
- init( TQDate::currentDate() );
+ init( TQDate::tqcurrentDate() );
}
void CalendarPanel::init( const TQDate &dt )
@@ -96,10 +96,10 @@ void CalendarPanel::init( const TQDate &dt )
setFontSize(10);
line->setValidator(val);
line->installEventFilter( this );
- yearForward->setPixmap(BarIcon(TQString::fromLatin1("2rightarrow")));
- yearBackward->setPixmap(BarIcon(TQString::fromLatin1("2leftarrow")));
- monthForward->setPixmap(BarIcon(TQString::fromLatin1("1rightarrow")));
- monthBackward->setPixmap(BarIcon(TQString::fromLatin1("1leftarrow")));
+ yearForward->setPixmap(BarIcon(TQString::tqfromLatin1("2rightarrow")));
+ yearBackward->setPixmap(BarIcon(TQString::tqfromLatin1("2leftarrow")));
+ monthForward->setPixmap(BarIcon(TQString::tqfromLatin1("1rightarrow")));
+ monthBackward->setPixmap(BarIcon(TQString::tqfromLatin1("1leftarrow")));
setDate(dt); // set button texts
connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate)));
connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot()));
@@ -164,7 +164,7 @@ CalendarPanel::resizeEvent(TQResizeEvent*)
// ----- calculate button row height:
for(count=0; count<NoOfButtons; ++count) {
if ( buttons[count] ) { // closeButton may be 0L
- sizes[count]=buttons[count]->sizeHint();
+ sizes[count]=buttons[count]->tqsizeHint();
buttonHeight=TQMAX(buttonHeight, sizes[count].height());
}
else
@@ -175,7 +175,7 @@ CalendarPanel::resizeEvent(TQResizeEvent*)
for(count=0; count<NoOfButtons; ++count) {
if(buttons[count]==selectMonth) {
TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect);
- sizes[count].setWidth(TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().pixelMetric(TQStyle::PM_ButtonMargin)));
+ sizes[count].setWidth(TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin)));
}
}
// ----- center buttons
@@ -195,7 +195,7 @@ CalendarPanel::resizeEvent(TQResizeEvent*)
x+=w;
}
// ----- place the line edit for direct input:
- sizes[0]=line->sizeHint();
+ sizes[0]=line->tqsizeHint();
int week_width=d->selectWeek->fontMetrics().width(i18n("Week XX"))+((d->closeButton != 0L) ? 50 : 20);
line->setGeometry(0, height()-sizes[0].height(), width()-week_width, sizes[0].height());
d->selectWeek->setGeometry(width()-week_width, height()-sizes[0].height(), week_width, sizes[0].height());
@@ -209,7 +209,7 @@ CalendarPanel::dateChangedSlot(TQDate date)
{
//kdDebug() << "CalendarPanel::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
line->setText(KGlobal::locale()->formatDate(date, true));
- d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date)));
+ d->selectWeek->setText(i18n("Week %1").tqarg(weekOfYear(date)));
selectMonth->setText(KGlobal::locale()->calendar()->monthName(date.month(), false));
selectYear->setText(date.toString("yyyy"));
emit(dateChanged(date));
@@ -242,7 +242,7 @@ CalendarPanel::setDate(const TQDate& date)
TQString temp;
// -----
table->setDate(date);
- d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date)));
+ d->selectWeek->setText(i18n("Week %1").tqarg(weekOfYear(date)));
selectMonth->setText(KGlobal::locale()->calendar()->monthName(date.month(), false));
temp.setNum(date.year());
selectYear->setText(temp);
@@ -285,7 +285,7 @@ CalendarPanel::selectWeekClicked()
PopupFrame* popup = new PopupFrame(this);
DateInternalWeekSelector* picker = new DateInternalWeekSelector(fontsize, 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();
@@ -322,7 +322,7 @@ CalendarPanel::selectMonthClicked()
PopupFrame* popup = new PopupFrame(this);
DateInternalMonthPicker* picker = new DateInternalMonthPicker(fontsize, popup);
// -----
- picker->resize(picker->sizeHint());
+ picker->resize(picker->tqsizeHint());
popup->setMainWidget(picker);
picker->setFocus();
connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int)));
@@ -352,7 +352,7 @@ CalendarPanel::selectYearClicked()
PopupFrame* popup = new PopupFrame(this);
DateInternalYearSelector* picker = new DateInternalYearSelector(fontsize, 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();
@@ -409,9 +409,9 @@ CalendarPanel::lineEnterPressed()
}
TQSize
-CalendarPanel::sizeHint() const
+CalendarPanel::tqsizeHint() const
{
- TQSize tableSize=table->sizeHint();
+ TQSize tableSize=table->tqsizeHint();
TQWidget *buttons[]={
yearBackward,
monthBackward,
@@ -427,13 +427,13 @@ CalendarPanel::sizeHint() const
// ----- store the size hints:
for(count=0; count<NoOfButtons; ++count) {
if ( buttons[count] )
- sizes[count]=buttons[count]->sizeHint();
+ sizes[count]=buttons[count]->tqsizeHint();
else
sizes[count] = TQSize(0,0);
if(buttons[count]==selectMonth) {
TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect);
- cx+=TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().pixelMetric(TQStyle::PM_ButtonMargin));
+ cx+=TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin));
} else {
cx+=sizes[count].width();
}
@@ -442,7 +442,7 @@ CalendarPanel::sizeHint() const
// ----- calculate width hint:
cx=TQMAX(cx, tableSize.width()); // line edit ignored
// ----- calculate height hint:
- cy+=tableSize.height()+line->sizeHint().height();
+ cy+=tableSize.height()+line->tqsizeHint().height();
return TQSize(cx, cy);
}
@@ -471,7 +471,7 @@ CalendarPanel::setFontSize(int s)
}
TQFontMetrics metrics(selectMonth->fontMetrics());
for(int i=1; i <= 12; ++i)
- { // maxMonthRect is used by sizeHint()
+ { // maxMonthRect is used by tqsizeHint()
r=metrics.boundingRect(KGlobal::locale()->calendar()->monthName(i, false));
maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width()));
maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height()));
@@ -490,7 +490,7 @@ CalendarPanel::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;