diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kdeui/kdatepicker.cpp | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/kdatepicker.cpp')
-rw-r--r-- | kdeui/kdatepicker.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kdeui/kdatepicker.cpp b/kdeui/kdatepicker.cpp index af9dede01..ab41fec15 100644 --- a/kdeui/kdatepicker.cpp +++ b/kdeui/kdatepicker.cpp @@ -92,7 +92,7 @@ void KDatePicker::fillWeeksCombo(const TQDate &date) // make sure that the week of the lastDay is always inserted: in Chinese calendar // system, this is not always the case if(day < lastDay && day.daysTo(lastDay) < 7 && calendar->weekNumber(day) != calendar->weekNumber(lastDay)) - day = lastDay.addDays(-7); + day = TQT_TQDATE_OBJECT(lastDay.addDays(-7)); } } @@ -175,17 +175,17 @@ void KDatePicker::init( const TQDate &dt ) line->installEventFilter( this ); 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(TQDate)), TQT_SLOT(dateChangedSlot(TQDate))); connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); @@ -223,8 +223,8 @@ KDatePicker::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) || + if ( (k->key() == TQt::Key_Prior) || + (k->key() == TQt::Key_Next) || (k->key() == Qt::Key_Up) || (k->key() == Qt::Key_Down) ) { @@ -371,7 +371,7 @@ KDatePicker::selectMonthClicked() int day = calendar->day(date); // ----- construct a valid date in this month: calendar->setYMD(date, calendar->year(date), month, 1); - date = date.addDays(QMIN(day, calendar->daysInMonth(date)) - 1); + date = TQT_TQDATE_OBJECT(date.addDays(QMIN(day, calendar->daysInMonth(date)) - 1)); // ----- set this month setDate(date); } @@ -390,7 +390,7 @@ KDatePicker::selectYearClicked() KPopupFrame* popup = new KPopupFrame(this); KDateInternalYearSelector* picker = new KDateInternalYearSelector(popup); // ----- - picker->resize(picker->sizeHint()); + picker->resize(picker->tqsizeHint()); picker->setYear( table->getDate().year() ); picker->selectAll(); popup->setMainWidget(picker); @@ -466,10 +466,10 @@ KDatePicker::todayButtonClicked() setDate(TQDate::currentDate()); } -QSize -KDatePicker::sizeHint() const +TQSize +KDatePicker::tqsizeHint() const { - return TQWidget::sizeHint(); + return TQWidget::tqsizeHint(); } void @@ -507,7 +507,7 @@ KDatePicker::setFontSize(int s) maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height())); } - TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton, + TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect); selectMonth->setMinimumSize(metricBound); @@ -529,7 +529,7 @@ KDatePicker::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; |