summaryrefslogtreecommitdiffstats
path: root/kalarm/recurrenceedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kalarm/recurrenceedit.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/recurrenceedit.cpp')
-rw-r--r--kalarm/recurrenceedit.cpp372
1 files changed, 186 insertions, 186 deletions
diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp
index c7aef494b..bc70e4fe0 100644
--- a/kalarm/recurrenceedit.cpp
+++ b/kalarm/recurrenceedit.cpp
@@ -23,16 +23,16 @@
#include "kalarm.h"
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
-#include <qlistbox.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
+#include <tqlistbox.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -66,24 +66,24 @@ using namespace KCal;
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString RecurrenceEdit::i18n_Norecur() { return i18n("No recurrence"); }
-QString RecurrenceEdit::i18n_NoRecur() { return i18n("No Recurrence"); }
-QString RecurrenceEdit::i18n_AtLogin() { return i18n("At Login"); }
-QString RecurrenceEdit::i18n_l_Atlogin() { return i18n("At &login"); }
-QString RecurrenceEdit::i18n_HourlyMinutely() { return i18n("Hourly/Minutely"); }
-QString RecurrenceEdit::i18n_u_HourlyMinutely() { return i18n("Ho&urly/Minutely"); }
-QString RecurrenceEdit::i18n_Daily() { return i18n("Daily"); }
-QString RecurrenceEdit::i18n_d_Daily() { return i18n("&Daily"); }
-QString RecurrenceEdit::i18n_Weekly() { return i18n("Weekly"); }
-QString RecurrenceEdit::i18n_w_Weekly() { return i18n("&Weekly"); }
-QString RecurrenceEdit::i18n_Monthly() { return i18n("Monthly"); }
-QString RecurrenceEdit::i18n_m_Monthly() { return i18n("&Monthly"); }
-QString RecurrenceEdit::i18n_Yearly() { return i18n("Yearly"); }
-QString RecurrenceEdit::i18n_y_Yearly() { return i18n("&Yearly"); }
-
-
-RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
- : QFrame(parent, name),
+TQString RecurrenceEdit::i18n_Norecur() { return i18n("No recurrence"); }
+TQString RecurrenceEdit::i18n_NoRecur() { return i18n("No Recurrence"); }
+TQString RecurrenceEdit::i18n_AtLogin() { return i18n("At Login"); }
+TQString RecurrenceEdit::i18n_l_Atlogin() { return i18n("At &login"); }
+TQString RecurrenceEdit::i18n_HourlyMinutely() { return i18n("Hourly/Minutely"); }
+TQString RecurrenceEdit::i18n_u_HourlyMinutely() { return i18n("Ho&urly/Minutely"); }
+TQString RecurrenceEdit::i18n_Daily() { return i18n("Daily"); }
+TQString RecurrenceEdit::i18n_d_Daily() { return i18n("&Daily"); }
+TQString RecurrenceEdit::i18n_Weekly() { return i18n("Weekly"); }
+TQString RecurrenceEdit::i18n_w_Weekly() { return i18n("&Weekly"); }
+TQString RecurrenceEdit::i18n_Monthly() { return i18n("Monthly"); }
+TQString RecurrenceEdit::i18n_m_Monthly() { return i18n("&Monthly"); }
+TQString RecurrenceEdit::i18n_Yearly() { return i18n("Yearly"); }
+TQString RecurrenceEdit::i18n_y_Yearly() { return i18n("&Yearly"); }
+
+
+RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mRule(0),
mRuleButtonType(INVALID_RECUR),
mDailyShown(false),
@@ -93,8 +93,8 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mNoEmitTypeChanged(true),
mReadOnly(readOnly)
{
- QBoxLayout* layout;
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQBoxLayout* layout;
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
/* Create the recurrence rule Group box which holds the recurrence period
* selection buttons, and the weekly, monthly and yearly recurrence rule
@@ -103,61 +103,61 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
* selection of its corresponding radio button.
*/
- QGroupBox* recurGroup = new QGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup");
+ TQGroupBox* recurGroup = new TQGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup");
topLayout->addWidget(recurGroup);
- QFrame* ruleFrame = new QFrame(recurGroup, "ruleFrame");
- layout = new QVBoxLayout(ruleFrame, 0);
+ TQFrame* ruleFrame = new TQFrame(recurGroup, "ruleFrame");
+ layout = new TQVBoxLayout(ruleFrame, 0);
layout->addSpacing(KDialog::spacingHint()/2);
- layout = new QHBoxLayout(layout, 0);
- QBoxLayout* lay = new QVBoxLayout(layout, 0);
+ layout = new TQHBoxLayout(layout, 0);
+ TQBoxLayout* lay = new TQVBoxLayout(layout, 0);
mRuleButtonGroup = new ButtonGroup(1, Qt::Horizontal, ruleFrame);
mRuleButtonGroup->setInsideMargin(0);
- mRuleButtonGroup->setFrameStyle(QFrame::NoFrame);
+ mRuleButtonGroup->setFrameStyle(TQFrame::NoFrame);
lay->addWidget(mRuleButtonGroup);
lay->addStretch(); // top-adjust the interval radio buttons
- connect(mRuleButtonGroup, SIGNAL(buttonSet(int)), SLOT(periodClicked(int)));
+ connect(mRuleButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(periodClicked(int)));
mNoneButton = new RadioButton(i18n_Norecur(), mRuleButtonGroup);
mNoneButton->setFixedSize(mNoneButton->sizeHint());
mNoneButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm"));
+ TQWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm"));
mAtLoginButton = new RadioButton(i18n_l_Atlogin(), mRuleButtonGroup);
mAtLoginButton->setFixedSize(mAtLoginButton->sizeHint());
mAtLoginButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mAtLoginButton,
+ TQWhatsThis::add(mAtLoginButton,
i18n("Trigger the alarm at the specified date/time and at every login until then.\n"
"Note that it will also be triggered any time the alarm daemon is restarted."));
mSubDailyButton = new RadioButton(i18n_u_HourlyMinutely(), mRuleButtonGroup);
mSubDailyButton->setFixedSize(mSubDailyButton->sizeHint());
mSubDailyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mSubDailyButton,
+ TQWhatsThis::add(mSubDailyButton,
i18n("Repeat the alarm at hourly/minutely intervals"));
mDailyButton = new RadioButton(i18n_d_Daily(), mRuleButtonGroup);
mDailyButton->setFixedSize(mDailyButton->sizeHint());
mDailyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mDailyButton,
+ TQWhatsThis::add(mDailyButton,
i18n("Repeat the alarm at daily intervals"));
mWeeklyButton = new RadioButton(i18n_w_Weekly(), mRuleButtonGroup);
mWeeklyButton->setFixedSize(mWeeklyButton->sizeHint());
mWeeklyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mWeeklyButton,
+ TQWhatsThis::add(mWeeklyButton,
i18n("Repeat the alarm at weekly intervals"));
mMonthlyButton = new RadioButton(i18n_m_Monthly(), mRuleButtonGroup);
mMonthlyButton->setFixedSize(mMonthlyButton->sizeHint());
mMonthlyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mMonthlyButton,
+ TQWhatsThis::add(mMonthlyButton,
i18n("Repeat the alarm at monthly intervals"));
mYearlyButton = new RadioButton(i18n_y_Yearly(), mRuleButtonGroup);
mYearlyButton->setFixedSize(mYearlyButton->sizeHint());
mYearlyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mYearlyButton,
+ TQWhatsThis::add(mYearlyButton,
i18n("Repeat the alarm at annual intervals"));
mNoneButtonId = mRuleButtonGroup->id(mNoneButton);
@@ -172,20 +172,20 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), true, ruleFrame);
mSubRepetition->setFixedSize(mSubRepetition->sizeHint());
mSubRepetition->setReadOnly(mReadOnly);
- connect(mSubRepetition, SIGNAL(needsInitialisation()), SIGNAL(repeatNeedsInitialisation()));
- connect(mSubRepetition, SIGNAL(changed()), SIGNAL(frequencyChanged()));
- QWhatsThis::add(mSubRepetition, i18n("Set up a repetition within the recurrence, to trigger the alarm multiple times each time the recurrence is due."));
+ connect(mSubRepetition, TQT_SIGNAL(needsInitialisation()), TQT_SIGNAL(repeatNeedsInitialisation()));
+ connect(mSubRepetition, TQT_SIGNAL(changed()), TQT_SIGNAL(frequencyChanged()));
+ TQWhatsThis::add(mSubRepetition, i18n("Set up a repetition within the recurrence, to trigger the alarm multiple times each time the recurrence is due."));
lay->addSpacing(KDialog::spacingHint());
lay->addWidget(mSubRepetition);
- lay = new QVBoxLayout(layout);
+ lay = new TQVBoxLayout(layout);
lay->addStretch();
- layout = new QHBoxLayout(lay);
+ layout = new TQHBoxLayout(lay);
layout->addSpacing(KDialog::marginHint());
- QFrame* divider = new QFrame(ruleFrame);
- divider->setFrameStyle(QFrame::VLine | QFrame::Sunken);
+ TQFrame* divider = new TQFrame(ruleFrame);
+ divider->setFrameStyle(TQFrame::VLine | TQFrame::Sunken);
layout->addWidget(divider);
layout->addSpacing(KDialog::marginHint());
@@ -196,13 +196,13 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mMonthlyRule = new MonthlyRule(mReadOnly, ruleFrame, "monthFrame");
mYearlyRule = new YearlyRule(mReadOnly, ruleFrame, "yearFrame");
- connect(mSubDailyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mDailyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mWeeklyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mMonthlyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mYearlyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
+ connect(mSubDailyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mDailyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mWeeklyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mMonthlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mYearlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
- mRuleStack = new QWidgetStack(ruleFrame);
+ mRuleStack = new TQWidgetStack(ruleFrame);
layout->addWidget(mRuleStack);
layout->addStretch(1);
mRuleStack->addWidget(mNoRule, 0);
@@ -217,33 +217,33 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
// which specify how long the recurrence is to last.
mRangeButtonGroup = new ButtonGroup(i18n("Recurrence End"), this, "mRangeButtonGroup");
- connect(mRangeButtonGroup, SIGNAL(buttonSet(int)), SLOT(rangeTypeClicked()));
+ connect(mRangeButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(rangeTypeClicked()));
topLayout->addWidget(mRangeButtonGroup);
- QVBoxLayout* vlayout = new QVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* vlayout = new TQVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint());
vlayout->addSpacing(fontMetrics().lineSpacing()/2);
mNoEndDateButton = new RadioButton(i18n("No &end"), mRangeButtonGroup);
mNoEndDateButton->setFixedSize(mNoEndDateButton->sizeHint());
mNoEndDateButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely"));
+ TQWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely"));
vlayout->addWidget(mNoEndDateButton, 1, Qt::AlignAuto);
- QSize size = mNoEndDateButton->size();
+ TQSize size = mNoEndDateButton->size();
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
mRepeatCountButton = new RadioButton(i18n("End a&fter:"), mRangeButtonGroup);
mRepeatCountButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mRepeatCountButton,
+ TQWhatsThis::add(mRepeatCountButton,
i18n("Repeat the alarm for the number of times specified"));
mRepeatCountEntry = new SpinBox(1, 9999, 1, mRangeButtonGroup);
mRepeatCountEntry->setFixedSize(mRepeatCountEntry->sizeHint());
mRepeatCountEntry->setLineShiftStep(10);
mRepeatCountEntry->setSelectOnStep(false);
mRepeatCountEntry->setReadOnly(mReadOnly);
- connect(mRepeatCountEntry, SIGNAL(valueChanged(int)), SLOT(repeatCountChanged(int)));
- QWhatsThis::add(mRepeatCountEntry,
+ connect(mRepeatCountEntry, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(repeatCountChanged(int)));
+ TQWhatsThis::add(mRepeatCountEntry,
i18n("Enter the total number of times to trigger the alarm"));
mRepeatCountButton->setFocusWidget(mRepeatCountEntry);
- mRepeatCountLabel = new QLabel(i18n("occurrence(s)"), mRangeButtonGroup);
+ mRepeatCountLabel = new TQLabel(i18n("occurrence(s)"), mRangeButtonGroup);
mRepeatCountLabel->setFixedSize(mRepeatCountLabel->sizeHint());
layout->addWidget(mRepeatCountButton);
layout->addSpacing(KDialog::spacingHint());
@@ -252,28 +252,28 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
layout->addStretch();
size = size.expandedTo(mRepeatCountButton->sizeHint());
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
mEndDateButton = new RadioButton(i18n("End &by:"), mRangeButtonGroup);
mEndDateButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mEndDateButton,
+ TQWhatsThis::add(mEndDateButton,
i18n("Repeat the alarm until the date/time specified.\n\n"
"Note: This applies to the main recurrence only. It does not limit any sub-repetition which will occur regardless after the last main recurrence."));
mEndDateEdit = new DateEdit(mRangeButtonGroup);
mEndDateEdit->setFixedSize(mEndDateEdit->sizeHint());
mEndDateEdit->setReadOnly(mReadOnly);
- QWhatsThis::add(mEndDateEdit,
+ TQWhatsThis::add(mEndDateEdit,
i18n("Enter the last date to repeat the alarm"));
mEndDateButton->setFocusWidget(mEndDateEdit);
mEndTimeEdit = new TimeEdit(mRangeButtonGroup);
mEndTimeEdit->setFixedSize(mEndTimeEdit->sizeHint());
mEndTimeEdit->setReadOnly(mReadOnly);
- static const QString lastTimeText = i18n("Enter the last time to repeat the alarm.");
- QWhatsThis::add(mEndTimeEdit, QString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis()));
+ static const TQString lastTimeText = i18n("Enter the last time to repeat the alarm.");
+ TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis()));
mEndAnyTimeCheckBox = new CheckBox(i18n("Any time"), mRangeButtonGroup);
mEndAnyTimeCheckBox->setFixedSize(mEndAnyTimeCheckBox->sizeHint());
mEndAnyTimeCheckBox->setReadOnly(mReadOnly);
- connect(mEndAnyTimeCheckBox, SIGNAL(toggled(bool)), SLOT(slotAnyTimeToggled(bool)));
- QWhatsThis::add(mEndAnyTimeCheckBox,
+ connect(mEndAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
+ TQWhatsThis::add(mEndAnyTimeCheckBox,
i18n("Stop repeating the alarm after your first login on or after the specified end date"));
layout->addWidget(mEndDateButton);
layout->addSpacing(KDialog::spacingHint());
@@ -290,18 +290,18 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
// Create the exceptions group which specifies dates to be excluded
// from the recurrence.
- mExceptionGroup = new QGroupBox(i18n("E&xceptions"), this, "mExceptionGroup");
+ mExceptionGroup = new TQGroupBox(i18n("E&xceptions"), this, "mExceptionGroup");
topLayout->addWidget(mExceptionGroup);
topLayout->setStretchFactor(mExceptionGroup, 2);
- vlayout = new QVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint());
+ vlayout = new TQVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint());
vlayout->addSpacing(fontMetrics().lineSpacing()/2);
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
- vlayout = new QVBoxLayout(layout);
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
+ vlayout = new TQVBoxLayout(layout);
- mExceptionDateList = new QListBox(mExceptionGroup);
- mExceptionDateList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- connect(mExceptionDateList, SIGNAL(selectionChanged()), SLOT(enableExceptionButtons()));
- QWhatsThis::add(mExceptionDateList,
+ mExceptionDateList = new TQListBox(mExceptionGroup);
+ mExceptionDateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ connect(mExceptionDateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(enableExceptionButtons()));
+ TQWhatsThis::add(mExceptionDateList,
i18n("The list of exceptions, i.e. dates/times excluded from the recurrence"));
vlayout->addWidget(mExceptionDateList);
@@ -313,34 +313,34 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
}
else
{
- vlayout = new QVBoxLayout(layout);
+ vlayout = new TQVBoxLayout(layout);
mExceptionDateEdit = new DateEdit(mExceptionGroup);
mExceptionDateEdit->setFixedSize(mExceptionDateEdit->sizeHint());
- mExceptionDateEdit->setDate(QDate::currentDate());
- QWhatsThis::add(mExceptionDateEdit,
+ mExceptionDateEdit->setDate(TQDate::currentDate());
+ TQWhatsThis::add(mExceptionDateEdit,
i18n("Enter a date to insert in the exceptions list. "
"Use in conjunction with the Add or Change button below."));
vlayout->addWidget(mExceptionDateEdit);
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
- QPushButton* button = new QPushButton(i18n("Add"), mExceptionGroup);
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
+ TQPushButton* button = new TQPushButton(i18n("Add"), mExceptionGroup);
button->setFixedSize(button->sizeHint());
- connect(button, SIGNAL(clicked()), SLOT(addException()));
- QWhatsThis::add(button,
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(addException()));
+ TQWhatsThis::add(button,
i18n("Add the date entered above to the exceptions list"));
layout->addWidget(button);
- mChangeExceptionButton = new QPushButton(i18n("Change"), mExceptionGroup);
+ mChangeExceptionButton = new TQPushButton(i18n("Change"), mExceptionGroup);
mChangeExceptionButton->setFixedSize(mChangeExceptionButton->sizeHint());
- connect(mChangeExceptionButton, SIGNAL(clicked()), SLOT(changeException()));
- QWhatsThis::add(mChangeExceptionButton,
+ connect(mChangeExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(changeException()));
+ TQWhatsThis::add(mChangeExceptionButton,
i18n("Replace the currently highlighted item in the exceptions list with the date entered above"));
layout->addWidget(mChangeExceptionButton);
- mDeleteExceptionButton = new QPushButton(i18n("Delete"), mExceptionGroup);
+ mDeleteExceptionButton = new TQPushButton(i18n("Delete"), mExceptionGroup);
mDeleteExceptionButton->setFixedSize(mDeleteExceptionButton->sizeHint());
- connect(mDeleteExceptionButton, SIGNAL(clicked()), SLOT(deleteException()));
- QWhatsThis::add(mDeleteExceptionButton,
+ connect(mDeleteExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteException()));
+ TQWhatsThis::add(mDeleteExceptionButton,
i18n("Remove the currently highlighted item from the exceptions list"));
layout->addWidget(mDeleteExceptionButton);
}
@@ -352,19 +352,19 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
* Verify the consistency of the entered data.
* Reply = widget to receive focus on error, or 0 if no error.
*/
-QWidget* RecurrenceEdit::checkData(const QDateTime& startDateTime, QString& errorMessage) const
+TQWidget* RecurrenceEdit::checkData(const TQDateTime& startDateTime, TQString& errorMessage) const
{
if (mAtLoginButton->isOn())
return 0;
const_cast<RecurrenceEdit*>(this)->mCurrStartDateTime = startDateTime;
if (mEndDateButton->isChecked())
{
- QWidget* errWidget = 0;
+ TQWidget* errWidget = 0;
bool noTime = !mEndTimeEdit->isEnabled();
- QDate endDate = mEndDateEdit->date();
+ TQDate endDate = mEndDateEdit->date();
if (endDate < startDateTime.date())
errWidget = mEndDateEdit;
- else if (!noTime && QDateTime(endDate, mEndTimeEdit->time()) < startDateTime)
+ else if (!noTime && TQDateTime(endDate, mEndTimeEdit->time()) < startDateTime)
errWidget = mEndTimeEdit;
if (errWidget)
{
@@ -452,7 +452,7 @@ void RecurrenceEdit::periodClicked(int id)
void RecurrenceEdit::slotAnyTimeToggled(bool on)
{
- QButton* button = mRuleButtonGroup->selected();
+ TQButton* button = mRuleButtonGroup->selected();
mEndTimeEdit->setEnabled(button == mAtLoginButton && !on
|| button == mSubDailyButton && mEndDateButton->isChecked());
}
@@ -472,7 +472,7 @@ void RecurrenceEdit::rangeTypeClicked()
mRepeatCountLabel->setEnabled(repeatCount);
}
-void RecurrenceEdit::showEvent(QShowEvent*)
+void RecurrenceEdit::showEvent(TQShowEvent*)
{
if (mRule)
mRule->setFrequencyFocus();
@@ -548,8 +548,8 @@ void RecurrenceEdit::addException()
{
if (!mExceptionDateEdit || !mExceptionDateEdit->isValid())
return;
- QDate date = mExceptionDateEdit->date();
- QValueList<QDate>::Iterator it;
+ TQDate date = mExceptionDateEdit->date();
+ TQValueList<TQDate>::Iterator it;
int index = 0;
bool insert = true;
for (it = mExceptionDates.begin(); it != mExceptionDates.end(); ++index, ++it)
@@ -580,8 +580,8 @@ void RecurrenceEdit::changeException()
int index = mExceptionDateList->currentItem();
if (index >= 0 && mExceptionDateList->isSelected(index))
{
- QDate olddate = mExceptionDates[index];
- QDate newdate = mExceptionDateEdit->date();
+ TQDate olddate = mExceptionDates[index];
+ TQDate newdate = mExceptionDateEdit->date();
if (newdate != olddate)
{
mExceptionDates.remove(mExceptionDates.at(index));
@@ -619,13 +619,13 @@ void RecurrenceEdit::enableExceptionButtons()
mChangeExceptionButton->setEnabled(enable);
// Prevent the exceptions list box receiving keyboard focus is it's empty
- mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? QWidget::WheelFocus : QWidget::NoFocus);
+ mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? TQWidget::WheelFocus : TQWidget::NoFocus);
}
/******************************************************************************
* Notify this instance of a change in the alarm start date.
*/
-void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
+void RecurrenceEdit::setStartDate(const TQDate& start, const TQDate& today)
{
if (!mReadOnly)
{
@@ -638,7 +638,7 @@ void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
}
else
{
- const QString startString = i18n("Date cannot be earlier than start date", "start date");
+ const TQString startString = i18n("Date cannot be earlier than start date", "start date");
mEndDateEdit->setMinDate(start, startString);
if (mExceptionDateEdit)
mExceptionDateEdit->setMinDate(start, startString);
@@ -649,7 +649,7 @@ void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
/******************************************************************************
* Specify the default recurrence end date.
*/
-void RecurrenceEdit::setDefaultEndDate(const QDate& end)
+void RecurrenceEdit::setDefaultEndDate(const TQDate& end)
{
if (!mEndDateButton->isOn())
mEndDateEdit->setDate(end);
@@ -673,10 +673,10 @@ DateTime RecurrenceEdit::endDateTime() const
/******************************************************************************
* Set all controls to their default values.
*/
-void RecurrenceEdit::setDefaults(const QDateTime& from)
+void RecurrenceEdit::setDefaults(const TQDateTime& from)
{
mCurrStartDateTime = from;
- QDate fromDate = from.date();
+ TQDate fromDate = from.date();
mNoEndDateButton->setChecked(true);
mSubDailyRule->setFrequency(1);
@@ -716,7 +716,7 @@ void RecurrenceEdit::setDefaults(const QDateTime& from)
* Set the controls for weekly, monthly and yearly rules which have not so far
* been shown, to their default values, depending on the recurrence start date.
*/
-void RecurrenceEdit::setRuleDefaults(const QDate& fromDate)
+void RecurrenceEdit::setRuleDefaults(const TQDate& fromDate)
{
int day = fromDate.day();
int dayOfWeek = fromDate.dayOfWeek();
@@ -759,7 +759,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::DAILY:
{
mRuleButtonGroup->setButton(mDailyButtonId);
- QBitArray rDays = recurrence->days();
+ TQBitArray rDays = recurrence->days();
bool set = false;
for (int i = 0; i < 7 && !set; ++i)
set = rDays.testBit(i);
@@ -772,13 +772,13 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::WEEKLY:
{
mRuleButtonGroup->setButton(mWeeklyButtonId);
- QBitArray rDays = recurrence->days();
+ TQBitArray rDays = recurrence->days();
mWeeklyRule->setDays(rDays);
break;
}
case KARecurrence::MONTHLY_POS: // on nth (Tuesday) of the month
{
- QValueList<RecurrenceRule::WDayPos> posns = recurrence->monthPositions();
+ TQValueList<RecurrenceRule::WDayPos> posns = recurrence->monthPositions();
int i = posns.first().pos();
if (!i)
{
@@ -786,8 +786,8 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
// (but ignoring any non-every xxxDay positions).
mRuleButtonGroup->setButton(mWeeklyButtonId);
mWeeklyRule->setFrequency(recurrence->frequency());
- QBitArray rDays(7);
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = posns.begin(); it != posns.end(); ++it)
+ TQBitArray rDays(7);
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = posns.begin(); it != posns.end(); ++it)
{
if (!(*it).pos())
rDays.setBit((*it).day() - 1, 1);
@@ -802,7 +802,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::MONTHLY_DAY: // on nth day of the month
{
mRuleButtonGroup->setButton(mMonthlyButtonId);
- QValueList<int> rmd = recurrence->monthDays();
+ TQValueList<int> rmd = recurrence->monthDays();
int day = (rmd.isEmpty()) ? event.mainDate().day() : rmd.first();
mMonthlyRule->setDate(day);
break;
@@ -813,7 +813,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
if (rtype == KARecurrence::ANNUAL_DATE)
{
mRuleButtonGroup->setButton(mYearlyButtonId);
- const QValueList<int> rmd = recurrence->monthDays();
+ const TQValueList<int> rmd = recurrence->monthDays();
int day = (rmd.isEmpty()) ? event.mainDate().day() : rmd.first();
mYearlyRule->setDate(day);
mYearlyRule->setFeb29Type(recurrence->feb29Type());
@@ -821,7 +821,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
else if (rtype == KARecurrence::ANNUAL_POS)
{
mRuleButtonGroup->setButton(mYearlyButtonId);
- QValueList<RecurrenceRule::WDayPos> posns = recurrence->yearPositions();
+ TQValueList<RecurrenceRule::WDayPos> posns = recurrence->yearPositions();
mYearlyRule->setPosition(posns.first().pos(), posns.first().day());
}
mYearlyRule->setMonths(recurrence->yearMonths());
@@ -834,7 +834,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
mRule->setFrequency(recurrence->frequency());
// Get range information
- QDateTime endtime = mCurrStartDateTime;
+ TQDateTime endtime = mCurrStartDateTime;
int duration = recurrence->duration();
if (duration == -1)
mNoEndDateButton->setChecked(true);
@@ -875,8 +875,8 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
{
// Get end date and repeat count, common to all types of recurring events
- QDate endDate;
- QTime endTime;
+ TQDate endDate;
+ TQTime endTime;
int repeatCount;
if (mNoEndDateButton->isChecked())
repeatCount = -1;
@@ -890,12 +890,12 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
}
// Set up the recurrence according to the type selected
- QButton* button = mRuleButtonGroup->selected();
+ TQButton* button = mRuleButtonGroup->selected();
event.setRepeatAtLogin(button == mAtLoginButton);
int frequency = mRule ? mRule->frequency() : 0;
if (button == mSubDailyButton)
{
- QDateTime endDateTime(endDate, endTime);
+ TQDateTime endDateTime(endDate, endTime);
event.setRecurMinutely(frequency, repeatCount, endDateTime);
}
else if (button == mDailyButton)
@@ -915,7 +915,7 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
pos.days.fill(false);
pos.days.setBit(mMonthlyRule->dayOfWeek() - 1);
pos.weeknum = mMonthlyRule->week();
- QValueList<KAEvent::MonthPos> poses;
+ TQValueList<KAEvent::MonthPos> poses;
poses.append(pos);
event.setRecurMonthlyByPos(frequency, poses, repeatCount, endDate);
}
@@ -923,14 +923,14 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
{
// It's by day
int daynum = mMonthlyRule->date();
- QValueList<int> daynums;
+ TQValueList<int> daynums;
daynums.append(daynum);
event.setRecurMonthlyByDate(frequency, daynums, repeatCount, endDate);
}
}
else if (button == mYearlyButton)
{
- QValueList<int> months = mYearlyRule->months();
+ TQValueList<int> months = mYearlyRule->months();
if (mYearlyRule->type() == YearlyRule::POS)
{
// It's by position
@@ -938,7 +938,7 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
pos.days.fill(false);
pos.days.setBit(mYearlyRule->dayOfWeek() - 1);
pos.weeknum = mYearlyRule->week();
- QValueList<KAEvent::MonthPos> poses;
+ TQValueList<KAEvent::MonthPos> poses;
poses.append(pos);
event.setRecurAnnualByPos(frequency, poses, months, repeatCount, endDate);
}
@@ -984,7 +984,7 @@ void RecurrenceEdit::saveState()
if (mSavedRangeButton == mRepeatCountButton)
mSavedRecurCount = mRepeatCountEntry->value();
else if (mSavedRangeButton == mEndDateButton)
- mSavedEndDateTime.set(QDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked());
+ mSavedEndDateTime.set(TQDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked());
mSavedExceptionDates = mExceptionDates;
mSavedRepeatInterval = mSubRepetition->interval();
mSavedRepeatCount = mSubRepetition->count();
@@ -1003,7 +1003,7 @@ bool RecurrenceEdit::stateChanged() const
&& mSavedRecurCount != mRepeatCountEntry->value())
return true;
if (mSavedRangeButton == mEndDateButton
- && mSavedEndDateTime != DateTime(QDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked()))
+ && mSavedEndDateTime != DateTime(TQDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked()))
return true;
if (mSavedExceptionDates != mExceptionDates
|| mSavedRepeatInterval != mSubRepetition->interval()
@@ -1019,16 +1019,16 @@ bool RecurrenceEdit::stateChanged() const
= Base class for rule widgets, including recurrence frequency.
=============================================================================*/
-Rule::Rule(const QString& freqText, const QString& freqWhatsThis, bool time, bool readOnly, QWidget* parent, const char* name)
+Rule::Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly, TQWidget* parent, const char* name)
: NoRule(parent, name)
{
- mLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBox* freqBox = new QHBox(this);
+ mLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBox* freqBox = new TQHBox(this);
mLayout->addWidget(freqBox);
- QHBox* box = new QHBox(freqBox); // this is to control the QWhatsThis text display area
+ TQHBox* box = new TQHBox(freqBox); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Recur e&very"), box);
+ TQLabel* label = new TQLabel(i18n("Recur e&very"), box);
label->setFixedSize(label->sizeHint());
if (time)
{
@@ -1044,14 +1044,14 @@ Rule::Rule(const QString& freqText, const QString& freqWhatsThis, bool time, boo
mIntSpinBox->setFixedSize(mIntSpinBox->sizeHint());
mIntSpinBox->setReadOnly(readOnly);
}
- connect(mSpinBox, SIGNAL(valueChanged(int)), SIGNAL(frequencyChanged()));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(frequencyChanged()));
label->setBuddy(mSpinBox);
- label = new QLabel(freqText, box);
+ label = new TQLabel(freqText, box);
label->setFixedSize(label->sizeHint());
box->setFixedSize(sizeHint());
- QWhatsThis::add(box, freqWhatsThis);
+ TQWhatsThis::add(box, freqWhatsThis);
- new QWidget(freqBox); // left adjust the visible widgets
+ new TQWidget(freqBox); // left adjust the visible widgets
freqBox->setFixedHeight(freqBox->sizeHint().height());
freqBox->setFocusProxy(mSpinBox);
}
@@ -1095,7 +1095,7 @@ bool Rule::stateChanged() const
= Sub-daily rule widget.
=============================================================================*/
-SubDailyRule::SubDailyRule(bool readOnly, QWidget* parent, const char* name)
+SubDailyRule::SubDailyRule(bool readOnly, TQWidget* parent, const char* name)
: Rule(i18n("hours:minutes"),
i18n("Enter the number of hours and minutes between repetitions of the alarm"),
true, readOnly, parent, name)
@@ -1107,23 +1107,23 @@ SubDailyRule::SubDailyRule(bool readOnly, QWidget* parent, const char* name)
= Daily/weekly rule widget base class.
=============================================================================*/
-DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis, const QString& daysWhatsThis,
- bool readOnly, QWidget* parent, const char* name)
+DayWeekRule::DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
+ bool readOnly, TQWidget* parent, const char* name)
: Rule(freqText, freqWhatsThis, false, readOnly, parent, name),
mSavedDays(7)
{
- QGridLayout* grid = new QGridLayout(layout(), 1, 4, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(layout(), 1, 4, KDialog::spacingHint());
grid->setRowStretch(0, 1);
- QLabel* label = new QLabel(i18n("On: Tuesday", "O&n:"), this);
+ TQLabel* label = new TQLabel(i18n("On: Tuesday", "O&n:"), this);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0, Qt::AlignRight | Qt::AlignTop);
grid->addColSpacing(1, KDialog::spacingHint());
// List the days of the week starting at the user's start day of the week.
// Save the first day of the week, just in case it changes while the dialog is open.
- QWidget* box = new QWidget(this); // this is to control the QWhatsThis text display area
- QGridLayout* dgrid = new QGridLayout(box, 4, 2, 0, KDialog::spacingHint());
+ TQWidget* box = new TQWidget(this); // this is to control the TQWhatsThis text display area
+ TQGridLayout* dgrid = new TQGridLayout(box, 4, 2, 0, KDialog::spacingHint());
const KCalendarSystem* calendar = KGlobal::locale()->calendar();
for (int i = 0; i < 7; ++i)
{
@@ -1134,7 +1134,7 @@ DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis,
dgrid->addWidget(mDayBox[i], i%4, i/4, Qt::AlignAuto);
}
box->setFixedSize(box->sizeHint());
- QWhatsThis::add(box, daysWhatsThis);
+ TQWhatsThis::add(box, daysWhatsThis);
grid->addWidget(box, 0, 2, Qt::AlignAuto);
label->setBuddy(mDayBox[0]);
grid->setColStretch(3, 1);
@@ -1143,9 +1143,9 @@ DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis,
/******************************************************************************
* Fetch which days of the week have been ticked.
*/
-QBitArray DayWeekRule::days() const
+TQBitArray DayWeekRule::days() const
{
- QBitArray ds(7);
+ TQBitArray ds(7);
ds.fill(false);
for (int i = 0; i < 7; ++i)
if (mDayBox[i]->isChecked())
@@ -1165,7 +1165,7 @@ void DayWeekRule::setDays(bool tick)
/******************************************************************************
* Tick/untick each day of the week according to the specified bits.
*/
-void DayWeekRule::setDays(const QBitArray& days)
+void DayWeekRule::setDays(const TQBitArray& days)
{
for (int i = 0; i < 7; ++i)
{
@@ -1188,7 +1188,7 @@ void DayWeekRule::setDay(int dayOfWeek)
/******************************************************************************
* Validate: check that at least one day is selected.
*/
-QWidget* DayWeekRule::validate(QString& errorMessage)
+TQWidget* DayWeekRule::validate(TQString& errorMessage)
{
for (int i = 0; i < 7; ++i)
if (mDayBox[i]->isChecked())
@@ -1221,7 +1221,7 @@ bool DayWeekRule::stateChanged() const
= Daily rule widget.
=============================================================================*/
-DailyRule::DailyRule(bool readOnly, QWidget* parent, const char* name)
+DailyRule::DailyRule(bool readOnly, TQWidget* parent, const char* name)
: DayWeekRule(i18n("day(s)"),
i18n("Enter the number of days between repetitions of the alarm"),
i18n("Select the days of the week on which the alarm is allowed to occur"),
@@ -1234,7 +1234,7 @@ DailyRule::DailyRule(bool readOnly, QWidget* parent, const char* name)
= Weekly rule widget.
=============================================================================*/
-WeeklyRule::WeeklyRule(bool readOnly, QWidget* parent, const char* name)
+WeeklyRule::WeeklyRule(bool readOnly, TQWidget* parent, const char* name)
: DayWeekRule(i18n("week(s)"),
i18n("Enter the number of weeks between repetitions of the alarm"),
i18n("Select the days of the week on which to repeat the alarm"),
@@ -1247,8 +1247,8 @@ WeeklyRule::WeeklyRule(bool readOnly, QWidget* parent, const char* name)
= Monthly/yearly rule widget base class.
=============================================================================*/
-MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsThis, bool allowEveryWeek,
- bool readOnly, QWidget* parent, const char* name)
+MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhatsThis, bool allowEveryWeek,
+ bool readOnly, TQWidget* parent, const char* name)
: Rule(freqText, freqWhatsThis, false, readOnly, parent, name),
mEveryWeek(allowEveryWeek)
{
@@ -1256,7 +1256,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mButtonGroup->hide();
// Month day selector
- QHBox* box = new QHBox(this);
+ TQHBox* box = new TQHBox(this);
box->setSpacing(KDialog::spacingHint());
layout()->addWidget(box);
@@ -1264,24 +1264,24 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayButton->setFixedSize(mDayButton->sizeHint());
mDayButton->setReadOnly(readOnly);
mDayButtonId = mButtonGroup->insert(mDayButton);
- QWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month"));
+ TQWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month"));
mDayCombo = new ComboBox(false, box);
mDayCombo->setSizeLimit(11);
for (int i = 0; i < 31; ++i)
- mDayCombo->insertItem(QString::number(i + 1));
+ mDayCombo->insertItem(TQString::number(i + 1));
mDayCombo->insertItem(i18n("Last day of month", "Last"));
mDayCombo->setFixedSize(mDayCombo->sizeHint());
mDayCombo->setReadOnly(readOnly);
- QWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm"));
+ TQWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm"));
mDayButton->setFocusWidget(mDayCombo);
- connect(mDayCombo, SIGNAL(activated(int)), SLOT(slotDaySelected(int)));
+ connect(mDayCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotDaySelected(int)));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
// Month position selector
- box = new QHBox(this);
+ box = new TQHBox(this);
box->setSpacing(KDialog::spacingHint());
layout()->addWidget(box);
@@ -1289,7 +1289,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mPosButton->setFixedSize(mPosButton->sizeHint());
mPosButton->setReadOnly(readOnly);
mPosButtonId = mButtonGroup->insert(mPosButton);
- QWhatsThis::add(mPosButton,
+ TQWhatsThis::add(mPosButton,
i18n("Repeat the alarm on one day of the week, in the selected week of the month"));
mWeekCombo = new ComboBox(false, box);
@@ -1308,7 +1308,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mWeekCombo->insertItem(i18n("Every (Monday...) in month", "Every"));
mWeekCombo->setSizeLimit(11);
}
- QWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm"));
+ TQWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm"));
mWeekCombo->setFixedSize(mWeekCombo->sizeHint());
mWeekCombo->setReadOnly(readOnly);
mPosButton->setFocusWidget(mWeekCombo);
@@ -1321,11 +1321,11 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayOfWeekCombo->insertItem(calendar->weekDayName(day));
}
mDayOfWeekCombo->setReadOnly(readOnly);
- QWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm"));
+ TQWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm"));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
- connect(mButtonGroup, SIGNAL(buttonSet(int)), SLOT(clicked(int)));
+ connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(clicked(int)));
}
MonthYearRule::DayPosType MonthYearRule::type() const
@@ -1438,7 +1438,7 @@ bool MonthYearRule::stateChanged() const
= Monthly rule widget.
=============================================================================*/
-MonthlyRule::MonthlyRule(bool readOnly, QWidget* parent, const char* name)
+MonthlyRule::MonthlyRule(bool readOnly, TQWidget* parent, const char* name)
: MonthYearRule(i18n("month(s)"),
i18n("Enter the number of months between repetitions of the alarm"),
false, readOnly, parent, name)
@@ -1450,23 +1450,23 @@ MonthlyRule::MonthlyRule(bool readOnly, QWidget* parent, const char* name)
= Yearly rule widget.
=============================================================================*/
-YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
+YearlyRule::YearlyRule(bool readOnly, TQWidget* parent, const char* name)
: MonthYearRule(i18n("year(s)"),
i18n("Enter the number of years between repetitions of the alarm"),
true, readOnly, parent, name)
{
// Set up the month selection widgets
- QBoxLayout* hlayout = new QHBoxLayout(layout(), KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("List of months to select", "Months:"), this);
+ TQBoxLayout* hlayout = new TQHBoxLayout(layout(), KDialog::spacingHint());
+ TQLabel* label = new TQLabel(i18n("List of months to select", "Months:"), this);
label->setFixedSize(label->sizeHint());
hlayout->addWidget(label, 0, Qt::AlignAuto | Qt::AlignTop);
// List the months of the year.
- QWidget* w = new QWidget(this); // this is to control the QWhatsThis text display area
+ TQWidget* w = new TQWidget(this); // this is to control the TQWhatsThis text display area
hlayout->addWidget(w, 1, Qt::AlignAuto);
- QGridLayout* grid = new QGridLayout(w, 4, 3, 0, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(w, 4, 3, 0, KDialog::spacingHint());
const KCalendarSystem* calendar = KGlobal::locale()->calendar();
- int year = QDate::currentDate().year();
+ int year = TQDate::currentDate().year();
for (int i = 0; i < 12; ++i)
{
mMonthBox[i] = new CheckBox(calendar->monthName(i + 1, year, true), w);
@@ -1474,16 +1474,16 @@ YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
mMonthBox[i]->setReadOnly(readOnly);
grid->addWidget(mMonthBox[i], i%3, i/3, Qt::AlignAuto);
}
- connect(mMonthBox[1], SIGNAL(toggled(bool)), SLOT(enableFeb29()));
+ connect(mMonthBox[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(enableFeb29()));
w->setFixedHeight(w->sizeHint().height());
- QWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm"));
+ TQWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm"));
// February 29th handling option
- QHBox* f29box = new QHBox(this);
+ TQHBox* f29box = new TQHBox(this);
layout()->addWidget(f29box);
- QHBox* box = new QHBox(f29box); // this is to control the QWhatsThis text display area
+ TQHBox* box = new TQHBox(f29box); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mFeb29Label = new QLabel(i18n("February 2&9th alarm in non-leap years:"), box);
+ mFeb29Label = new TQLabel(i18n("February 2&9th alarm in non-leap years:"), box);
mFeb29Label->setFixedSize(mFeb29Label->sizeHint());
mFeb29Combo = new ComboBox(false, box);
mFeb29Combo->insertItem(i18n("No date", "None"));
@@ -1493,9 +1493,9 @@ YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
mFeb29Combo->setReadOnly(readOnly);
mFeb29Label->setBuddy(mFeb29Combo);
box->setFixedSize(box->sizeHint());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Select which date, if any, the February 29th alarm should trigger in non-leap years"));
- new QWidget(f29box); // left adjust the visible widgets
+ new TQWidget(f29box); // left adjust the visible widgets
f29box->setFixedHeight(f29box->sizeHint().height());
}
@@ -1513,9 +1513,9 @@ void YearlyRule::setDefaultValues(int dayOfMonth, int dayOfWeek, int month)
* Fetch which months have been checked (1 - 12).
* Reply = true if February has been checked.
*/
-QValueList<int> YearlyRule::months() const
+TQValueList<int> YearlyRule::months() const
{
- QValueList<int> mnths;
+ TQValueList<int> mnths;
for (int i = 0; i < 12; ++i)
if (mMonthBox[i]->isChecked() && mMonthBox[i]->isEnabled())
mnths.append(i + 1);
@@ -1525,12 +1525,12 @@ QValueList<int> YearlyRule::months() const
/******************************************************************************
* Check/uncheck each month of the year according to the specified list.
*/
-void YearlyRule::setMonths(const QValueList<int>& mnths)
+void YearlyRule::setMonths(const TQValueList<int>& mnths)
{
bool checked[12];
for (int i = 0; i < 12; ++i)
checked[i] = false;
- for (QValueListConstIterator<int> it = mnths.begin(); it != mnths.end(); ++it)
+ for (TQValueListConstIterator<int> it = mnths.begin(); it != mnths.end(); ++it)
checked[(*it) - 1] = true;
for (int i = 0; i < 12; ++i)
mMonthBox[i]->setChecked(checked[i]);
@@ -1573,7 +1573,7 @@ void YearlyRule::setFeb29Type(KARecurrence::Feb29Type type)
/******************************************************************************
* Validate: check that at least one month is selected.
*/
-QWidget* YearlyRule::validate(QString& errorMessage)
+TQWidget* YearlyRule::validate(TQString& errorMessage)
{
for (int i = 0; i < 12; ++i)
if (mMonthBox[i]->isChecked() && mMonthBox[i]->isEnabled())