diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kalarm/alarmtimewidget.cpp | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kalarm/alarmtimewidget.cpp')
-rw-r--r-- | kalarm/alarmtimewidget.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp index 2b907d9a1..e650072ec 100644 --- a/kalarm/alarmtimewidget.cpp +++ b/kalarm/alarmtimewidget.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqhbox.h> #include <tqpushbutton.h> @@ -93,30 +93,30 @@ void AlarmTimeWidget::init(int mode) // At time radio button/label mAtTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("&Defer to date/time:") : i18n("At &date/time:")), this, "atTimeRadio"); - mAtTimeRadio->setFixedSize(mAtTimeRadio->tqsizeHint()); + mAtTimeRadio->setFixedSize(mAtTimeRadio->sizeHint()); TQWhatsThis::add(mAtTimeRadio, ((mode & DEFER_TIME) ? i18n("Reschedule the alarm to the specified date and time.") : i18n("Schedule the alarm at the specified date and time."))); // Date edit box mDateEdit = new DateEdit(this); - mDateEdit->setFixedSize(mDateEdit->tqsizeHint()); + mDateEdit->setFixedSize(mDateEdit->sizeHint()); connect(mDateEdit, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(dateTimeChanged())); static const TQString enterDateText = i18n("Enter the date to schedule the alarm."); TQWhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText - : TQString("%1\n%2").tqarg(enterDateText).tqarg(recurText))); + : TQString("%1\n%2").arg(enterDateText).arg(recurText))); mAtTimeRadio->setFocusWidget(mDateEdit); // Time edit box and Any time checkbox TQHBox* timeBox = new TQHBox(this); timeBox->setSpacing(2*KDialog::spacingHint()); mTimeEdit = new TimeEdit(timeBox); - mTimeEdit->setFixedSize(mTimeEdit->tqsizeHint()); + mTimeEdit->setFixedSize(mTimeEdit->sizeHint()); connect(mTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(dateTimeChanged())); static const TQString enterTimeText = i18n("Enter the time to schedule the alarm."); TQWhatsThis::add(mTimeEdit, - ((mode & DEFER_TIME) ? TQString("%1\n\n%2").tqarg(enterTimeText).tqarg(TimeSpinBox::shiftWhatsThis()) - : TQString("%1\n%2\n\n%3").tqarg(enterTimeText).tqarg(recurText).tqarg(TimeSpinBox::shiftWhatsThis()))); + ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis()) + : TQString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis()))); mAnyTime = -1; // current status is uninitialised if (mode & DEFER_TIME) @@ -128,7 +128,7 @@ void AlarmTimeWidget::init(int mode) { mAnyTimeAllowed = true; mAnyTimeCheckBox = new CheckBox(i18n("An&y time"), timeBox); - mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->tqsizeHint()); + mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->sizeHint()); connect(mAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool))); TQWhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day")); } @@ -136,7 +136,7 @@ void AlarmTimeWidget::init(int mode) // 'Time from now' radio button/label mAfterTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("Defer for time &interval:") : i18n_w_TimeFromNow()), this, "afterTimeRadio"); - mAfterTimeRadio->setFixedSize(mAfterTimeRadio->tqsizeHint()); + mAfterTimeRadio->setFixedSize(mAfterTimeRadio->sizeHint()); TQWhatsThis::add(mAfterTimeRadio, ((mode & DEFER_TIME) ? i18n("Reschedule the alarm for the specified time interval after now.") : i18n("Schedule the alarm after the specified time interval from now."))); @@ -144,14 +144,14 @@ void AlarmTimeWidget::init(int mode) // Delay time spin box mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, this); mDelayTimeEdit->setValue(maxDelayTime); - mDelayTimeEdit->setFixedSize(mDelayTimeEdit->tqsizeHint()); + mDelayTimeEdit->setFixedSize(mDelayTimeEdit->sizeHint()); connect(mDelayTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(delayTimeChanged(int))); TQWhatsThis::add(mDelayTimeEdit, - ((mode & DEFER_TIME) ? TQString("%1\n\n%2").tqarg(i18n_TimeAfterPeriod()).tqarg(TimeSpinBox::shiftWhatsThis()) - : TQString("%1\n%2\n\n%3").tqarg(i18n_TimeAfterPeriod()).tqarg(recurText).tqarg(TimeSpinBox::shiftWhatsThis()))); + ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis()) + : TQString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis()))); mAfterTimeRadio->setFocusWidget(mDelayTimeEdit); - // Set up the tqlayout, either narrow or wide + // Set up the layout, either narrow or wide if (mode & NARROW) { TQGridLayout* grid = new TQGridLayout(topLayout, 2, 2, KDialog::spacingHint()); @@ -160,10 +160,10 @@ void AlarmTimeWidget::init(int mode) grid->addWidget(timeBox, 1, 1, TQt::AlignAuto); grid->setColStretch(2, 1); topLayout->addStretch(); - TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); - tqlayout->addWidget(mAfterTimeRadio); - tqlayout->addWidget(mDelayTimeEdit); - tqlayout->addStretch(); + TQBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); + layout->addWidget(mAfterTimeRadio); + layout->addWidget(mDelayTimeEdit); + layout->addStretch(); } else { @@ -226,7 +226,7 @@ DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool if (errorWidget) *errorWidget = 0; TQTime nowt = TQTime::currentTime(); - TQDateTime now(TQDate::tqcurrentDate(), TQTime(nowt.hour(), nowt.minute())); + TQDateTime now(TQDate::currentDate(), TQTime(nowt.hour(), nowt.minute())); if (mAtTimeRadio->isOn()) { bool anyTime = mAnyTimeAllowed && mAnyTimeCheckBox && mAnyTimeCheckBox->isChecked(); @@ -328,7 +328,7 @@ void AlarmTimeWidget::setMinDateTimeIsCurrent() { mMinDateTimeIsNow = true; mMinDateTime = TQDateTime(); - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); mDateEdit->setMinDate(now.date()); setMaxMinTimeIf(now); } @@ -342,7 +342,7 @@ void AlarmTimeWidget::setMinDateTime(const TQDateTime& dt) mMinDateTimeIsNow = false; mMinDateTime = dt; mDateEdit->setMinDate(dt.date()); - setMaxMinTimeIf(TQDateTime::tqcurrentDateTime()); + setMaxMinTimeIf(TQDateTime::currentDateTime()); } /****************************************************************************** @@ -357,7 +357,7 @@ void AlarmTimeWidget::setMaxDateTime(const DateTime& dt) else mMaxDateTime = dt.dateTime(); mDateEdit->setMaxDate(mMaxDateTime.date()); - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); setMaxMinTimeIf(now); setMaxDelayTime(now); } @@ -452,13 +452,13 @@ void AlarmTimeWidget::slotTimer() if (mMinDateTimeIsNow) { // Make sure that the minimum date is updated when the day changes - now = TQDateTime::tqcurrentDateTime(); + now = TQDateTime::currentDateTime(); mDateEdit->setMinDate(now.date()); } if (mMaxDateTime.isValid()) { if (!now.isValid()) - now = TQDateTime::tqcurrentDateTime(); + now = TQDateTime::currentDateTime(); if (!mPastMax) { // Check whether the maximum date/time has now been reached @@ -502,7 +502,7 @@ void AlarmTimeWidget::slotButtonSet(int) mAnyTimeCheckBox->setEnabled(at && mAnyTimeAllowed); // Ensure that the value of the delay edit box is > 0. TQDateTime dt(mDateEdit->date(), mTimeEdit->time()); - int minutes = (TQDateTime::tqcurrentDateTime().secsTo(dt) + 59) / 60; + int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60; if (minutes <= 0) mDelayTimeEdit->setValid(true); mDelayTimeEdit->setEnabled(!at); @@ -525,7 +525,7 @@ void AlarmTimeWidget::slotAnyTimeToggled(bool on) void AlarmTimeWidget::dateTimeChanged() { TQDateTime dt(mDateEdit->date(), mTimeEdit->time()); - int minutes = (TQDateTime::tqcurrentDateTime().secsTo(dt) + 59) / 60; + int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60; bool blocked = mDelayTimeEdit->signalsBlocked(); mDelayTimeEdit->blockSignals(true); // prevent infinite recursion between here and delayTimeChanged() if (minutes <= 0 || minutes > mDelayTimeEdit->maxValue()) @@ -543,7 +543,7 @@ void AlarmTimeWidget::delayTimeChanged(int minutes) { if (mDelayTimeEdit->isValid()) { - TQDateTime dt = TQDateTime::tqcurrentDateTime().addSecs(minutes * 60); + TQDateTime dt = TQDateTime::currentDateTime().addSecs(minutes * 60); bool blockedT = mTimeEdit->signalsBlocked(); bool blockedD = mDateEdit->signalsBlocked(); mTimeEdit->blockSignals(true); // prevent infinite recursion between here and dateTimeChanged() |