summaryrefslogtreecommitdiffstats
path: root/kalarm/editdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/editdlg.cpp')
-rw-r--r--kalarm/editdlg.cpp428
1 files changed, 214 insertions, 214 deletions
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index 232111000..bd22fdd9a 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -22,20 +22,20 @@
#include <limits.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdragobject.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qtabwidget.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qdir.h>
-#include <qstyle.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdragobject.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqtabwidget.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqdir.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -97,15 +97,15 @@ static const int maxDelayTime = 99*60 + 59; // < 100 hours
class PickAlarmFileRadio : public PickFileRadio
{
public:
- PickAlarmFileRadio(const QString& text, QButtonGroup* parent, const char* name = 0)
+ PickAlarmFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0)
: PickFileRadio(text, parent, name) { }
- virtual QString pickFile() // called when browse button is pressed to select a file to display
+ virtual TQString pickFile() // called when browse button is pressed to select a file to display
{
return KAlarm::browseFile(i18n("Choose Text or Image File to Display"), mDefaultDir, fileEdit()->text(),
- QString::null, KFile::ExistingOnly, parentWidget(), "pickAlarmFile");
+ TQString::null, KFile::ExistingOnly, parentWidget(), "pickAlarmFile");
}
private:
- QString mDefaultDir; // default directory for file browse button
+ TQString mDefaultDir; // default directory for file browse button
};
/*=============================================================================
@@ -114,22 +114,22 @@ class PickAlarmFileRadio : public PickFileRadio
class PickLogFileRadio : public PickFileRadio
{
public:
- PickLogFileRadio(QPushButton* b, LineEdit* e, const QString& text, QButtonGroup* parent, const char* name = 0)
+ PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* parent, const char* name = 0)
: PickFileRadio(b, e, text, parent, name) { }
- virtual QString pickFile() // called when browse button is pressed to select a log file
+ virtual TQString pickFile() // called when browse button is pressed to select a log file
{
- return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), QString::null,
+ return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), TQString::null,
KFile::LocalOnly, parentWidget(), "pickLogFile");
}
private:
- QString mDefaultDir; // default directory for log file browse button
+ TQString mDefaultDir; // default directory for log file browse button
};
-inline QString recurText(const KAEvent& event)
+inline TQString recurText(const KAEvent& event)
{
- QString r;
+ TQString r;
if (event.repeatCount())
- r = QString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText());
+ r = TQString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText());
else
r = event.recurrenceText();
return i18n("&Recurrence - [%1]").arg(r);
@@ -137,25 +137,25 @@ inline QString recurText(const KAEvent& event)
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString EditAlarmDlg::i18n_ConfirmAck() { return i18n("Confirm acknowledgment"); }
-QString EditAlarmDlg::i18n_k_ConfirmAck() { return i18n("Confirm ac&knowledgment"); }
-QString EditAlarmDlg::i18n_SpecialActions() { return i18n("Special Actions..."); }
-QString EditAlarmDlg::i18n_ShowInKOrganizer() { return i18n("Show in KOrganizer"); }
-QString EditAlarmDlg::i18n_g_ShowInKOrganizer() { return i18n("Show in KOr&ganizer"); }
-QString EditAlarmDlg::i18n_EnterScript() { return i18n("Enter a script"); }
-QString EditAlarmDlg::i18n_p_EnterScript() { return i18n("Enter a scri&pt"); }
-QString EditAlarmDlg::i18n_ExecInTermWindow() { return i18n("Execute in terminal window"); }
-QString EditAlarmDlg::i18n_w_ExecInTermWindow() { return i18n("Execute in terminal &window"); }
-QString EditAlarmDlg::i18n_u_ExecInTermWindow() { return i18n("Exec&ute in terminal window"); }
-QString EditAlarmDlg::i18n_g_LogToFile() { return i18n("Lo&g to file"); }
-QString EditAlarmDlg::i18n_CopyEmailToSelf() { return i18n("Copy email to self"); }
-QString EditAlarmDlg::i18n_e_CopyEmailToSelf() { return i18n("Copy &email to self"); }
-QString EditAlarmDlg::i18n_s_CopyEmailToSelf() { return i18n("Copy email to &self"); }
-QString EditAlarmDlg::i18n_EmailFrom() { return i18n("'From' email address", "From:"); }
-QString EditAlarmDlg::i18n_f_EmailFrom() { return i18n("'From' email address", "&From:"); }
-QString EditAlarmDlg::i18n_EmailTo() { return i18n("Email addressee", "To:"); }
-QString EditAlarmDlg::i18n_EmailSubject() { return i18n("Email subject", "Subject:"); }
-QString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "Sub&ject:"); }
+TQString EditAlarmDlg::i18n_ConfirmAck() { return i18n("Confirm acknowledgment"); }
+TQString EditAlarmDlg::i18n_k_ConfirmAck() { return i18n("Confirm ac&knowledgment"); }
+TQString EditAlarmDlg::i18n_SpecialActions() { return i18n("Special Actions..."); }
+TQString EditAlarmDlg::i18n_ShowInKOrganizer() { return i18n("Show in KOrganizer"); }
+TQString EditAlarmDlg::i18n_g_ShowInKOrganizer() { return i18n("Show in KOr&ganizer"); }
+TQString EditAlarmDlg::i18n_EnterScript() { return i18n("Enter a script"); }
+TQString EditAlarmDlg::i18n_p_EnterScript() { return i18n("Enter a scri&pt"); }
+TQString EditAlarmDlg::i18n_ExecInTermWindow() { return i18n("Execute in terminal window"); }
+TQString EditAlarmDlg::i18n_w_ExecInTermWindow() { return i18n("Execute in terminal &window"); }
+TQString EditAlarmDlg::i18n_u_ExecInTermWindow() { return i18n("Exec&ute in terminal window"); }
+TQString EditAlarmDlg::i18n_g_LogToFile() { return i18n("Lo&g to file"); }
+TQString EditAlarmDlg::i18n_CopyEmailToSelf() { return i18n("Copy email to self"); }
+TQString EditAlarmDlg::i18n_e_CopyEmailToSelf() { return i18n("Copy &email to self"); }
+TQString EditAlarmDlg::i18n_s_CopyEmailToSelf() { return i18n("Copy email to &self"); }
+TQString EditAlarmDlg::i18n_EmailFrom() { return i18n("'From' email address", "From:"); }
+TQString EditAlarmDlg::i18n_f_EmailFrom() { return i18n("'From' email address", "&From:"); }
+TQString EditAlarmDlg::i18n_EmailTo() { return i18n("Email addressee", "To:"); }
+TQString EditAlarmDlg::i18n_EmailSubject() { return i18n("Email subject", "Subject:"); }
+TQString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "Sub&ject:"); }
/******************************************************************************
@@ -165,7 +165,7 @@ QString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "
* = false to edit/create an alarm.
* event != to initialise the dialogue to show the specified event's data.
*/
-EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* parent, const char* name,
+EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent, const char* name,
const KAEvent* event, bool readOnly)
: KDialogBase(parent, (name ? name : Template ? "TemplEditDlg" : "EditDlg"), true, caption,
(readOnly ? Cancel|Try : Template ? Ok|Cancel|Try : Ok|Cancel|Try|Default),
@@ -188,56 +188,56 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
mSavedEvent(0)
{
setButtonText(Default, i18n("Load Template..."));
- QVBox* mainWidget = new QVBox(this);
+ TQVBox* mainWidget = new TQVBox(this);
mainWidget->setSpacing(spacingHint());
setMainWidget(mainWidget);
if (mTemplate)
{
- QHBox* box = new QHBox(mainWidget);
+ TQHBox* box = new TQHBox(mainWidget);
box->setSpacing(spacingHint());
- QLabel* label = new QLabel(i18n("Template name:"), box);
+ TQLabel* label = new TQLabel(i18n("Template name:"), box);
label->setFixedSize(label->sizeHint());
- mTemplateName = new QLineEdit(box);
+ mTemplateName = new TQLineEdit(box);
mTemplateName->setReadOnly(mReadOnly);
label->setBuddy(mTemplateName);
- QWhatsThis::add(box, i18n("Enter the name of the alarm template"));
+ TQWhatsThis::add(box, i18n("Enter the name of the alarm template"));
box->setFixedHeight(box->sizeHint().height());
}
- mTabs = new QTabWidget(mainWidget);
+ mTabs = new TQTabWidget(mainWidget);
mTabs->setMargin(marginHint());
- QVBox* mainPageBox = new QVBox(mTabs);
+ TQVBox* mainPageBox = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
mTabs->addTab(mainPageBox, i18n("&Alarm"));
mMainPageIndex = 0;
PageFrame* mainPage = new PageFrame(mainPageBox);
- connect(mainPage, SIGNAL(shown()), SLOT(slotShowMainPage()));
- QVBoxLayout* topLayout = new QVBoxLayout(mainPage, 0, spacingHint());
+ connect(mainPage, TQT_SIGNAL(shown()), TQT_SLOT(slotShowMainPage()));
+ TQVBoxLayout* topLayout = new TQVBoxLayout(mainPage, 0, spacingHint());
// Recurrence tab
- QVBox* recurTab = new QVBox(mTabs);
+ TQVBox* recurTab = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
- mTabs->addTab(recurTab, QString::null);
+ mTabs->addTab(recurTab, TQString::null);
mRecurPageIndex = 1;
mRecurrenceEdit = new RecurrenceEdit(readOnly, recurTab, "recurPage");
- connect(mRecurrenceEdit, SIGNAL(shown()), SLOT(slotShowRecurrenceEdit()));
- connect(mRecurrenceEdit, SIGNAL(typeChanged(int)), SLOT(slotRecurTypeChange(int)));
- connect(mRecurrenceEdit, SIGNAL(frequencyChanged()), SLOT(slotRecurFrequencyChange()));
- connect(mRecurrenceEdit, SIGNAL(repeatNeedsInitialisation()), SLOT(slotSetSubRepetition()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(shown()), TQT_SLOT(slotShowRecurrenceEdit()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(typeChanged(int)), TQT_SLOT(slotRecurTypeChange(int)));
+ connect(mRecurrenceEdit, TQT_SIGNAL(frequencyChanged()), TQT_SLOT(slotRecurFrequencyChange()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(repeatNeedsInitialisation()), TQT_SLOT(slotSetSubRepetition()));
// Alarm action
mActionGroup = new ButtonGroup(i18n("Action"), mainPage, "actionGroup");
- connect(mActionGroup, SIGNAL(buttonSet(int)), SLOT(slotAlarmTypeChanged(int)));
+ connect(mActionGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotAlarmTypeChanged(int)));
topLayout->addWidget(mActionGroup, 1);
- QBoxLayout* layout = new QVBoxLayout(mActionGroup, marginHint(), spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mActionGroup, marginHint(), spacingHint());
layout->addSpacing(fontMetrics().lineSpacing()/2);
- QGridLayout* grid = new QGridLayout(layout, 1, 5);
+ TQGridLayout* grid = new TQGridLayout(layout, 1, 5);
// Message radio button
mMessageRadio = new RadioButton(i18n("Te&xt"), mActionGroup, "messageButton");
mMessageRadio->setFixedSize(mMessageRadio->sizeHint());
- QWhatsThis::add(mMessageRadio,
+ TQWhatsThis::add(mMessageRadio,
i18n("If checked, the alarm will display a text message."));
grid->addWidget(mMessageRadio, 1, 0);
grid->setColStretch(1, 1);
@@ -245,7 +245,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// File radio button
mFileRadio = new PickAlarmFileRadio(i18n("&File"), mActionGroup, "fileButton");
mFileRadio->setFixedSize(mFileRadio->sizeHint());
- QWhatsThis::add(mFileRadio,
+ TQWhatsThis::add(mFileRadio,
i18n("If checked, the alarm will display the contents of a text or image file."));
grid->addWidget(mFileRadio, 1, 2);
grid->setColStretch(3, 1);
@@ -253,7 +253,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Command radio button
mCommandRadio = new RadioButton(i18n("Co&mmand"), mActionGroup, "cmdButton");
mCommandRadio->setFixedSize(mCommandRadio->sizeHint());
- QWhatsThis::add(mCommandRadio,
+ TQWhatsThis::add(mCommandRadio,
i18n("If checked, the alarm will execute a shell command."));
grid->addWidget(mCommandRadio, 1, 4);
grid->setColStretch(5, 1);
@@ -261,7 +261,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Email radio button
mEmailRadio = new RadioButton(i18n("&Email"), mActionGroup, "emailButton");
mEmailRadio->setFixedSize(mEmailRadio->sizeHint());
- QWhatsThis::add(mEmailRadio,
+ TQWhatsThis::add(mEmailRadio,
i18n("If checked, the alarm will send an email."));
grid->addWidget(mEmailRadio, 1, 6);
@@ -273,70 +273,70 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
layout->addWidget(mEmailFrame);
// Deferred date/time: visible only for a deferred recurring event.
- mDeferGroup = new QGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
+ mDeferGroup = new TQGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
topLayout->addWidget(mDeferGroup);
- QLabel* label = new QLabel(i18n("Deferred to:"), mDeferGroup);
+ TQLabel* label = new TQLabel(i18n("Deferred to:"), mDeferGroup);
label->setFixedSize(label->sizeHint());
- mDeferTimeLabel = new QLabel(mDeferGroup);
+ mDeferTimeLabel = new TQLabel(mDeferGroup);
- mDeferChangeButton = new QPushButton(i18n("C&hange..."), mDeferGroup);
+ mDeferChangeButton = new TQPushButton(i18n("C&hange..."), mDeferGroup);
mDeferChangeButton->setFixedSize(mDeferChangeButton->sizeHint());
- connect(mDeferChangeButton, SIGNAL(clicked()), SLOT(slotEditDeferral()));
- QWhatsThis::add(mDeferChangeButton, i18n("Change the alarm's deferred time, or cancel the deferral"));
+ connect(mDeferChangeButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditDeferral()));
+ TQWhatsThis::add(mDeferChangeButton, i18n("Change the alarm's deferred time, or cancel the deferral"));
mDeferGroup->addSpace(0);
- layout = new QHBoxLayout(topLayout);
+ layout = new TQHBoxLayout(topLayout);
// Date and time entry
if (mTemplate)
{
mTemplateTimeGroup = new ButtonGroup(i18n("Time"), mainPage, "templateGroup");
- connect(mTemplateTimeGroup, SIGNAL(buttonSet(int)), SLOT(slotTemplateTimeType(int)));
+ connect(mTemplateTimeGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotTemplateTimeType(int)));
layout->addWidget(mTemplateTimeGroup);
- grid = new QGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
+ grid = new TQGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
mTemplateDefaultTime = new RadioButton(i18n("&Default time"), mTemplateTimeGroup, "templateDefTimeButton");
mTemplateDefaultTime->setFixedSize(mTemplateDefaultTime->sizeHint());
mTemplateDefaultTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateDefaultTime,
+ TQWhatsThis::add(mTemplateDefaultTime,
i18n("Do not specify a start time for alarms based on this template. "
"The normal default start time will be used."));
grid->addWidget(mTemplateDefaultTime, 0, 0, alignment);
- QHBox* box = new QHBox(mTemplateTimeGroup);
+ TQHBox* box = new TQHBox(mTemplateTimeGroup);
box->setSpacing(spacingHint());
mTemplateUseTime = new RadioButton(i18n("Time:"), box, "templateTimeButton");
mTemplateUseTime->setFixedSize(mTemplateUseTime->sizeHint());
mTemplateUseTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateUseTime,
+ TQWhatsThis::add(mTemplateUseTime,
i18n("Specify a start time for alarms based on this template."));
mTemplateTimeGroup->insert(mTemplateUseTime);
mTemplateTime = new TimeEdit(box, "templateTimeEdit");
mTemplateTime->setFixedSize(mTemplateTime->sizeHint());
mTemplateTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateTime,
- QString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template."))
+ TQWhatsThis::add(mTemplateTime,
+ TQString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template."))
.arg(TimeSpinBox::shiftWhatsThis()));
- 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());
grid->addWidget(box, 0, 1, alignment);
mTemplateAnyTime = new RadioButton(i18n("An&y time"), mTemplateTimeGroup, "templateAnyTimeButton");
mTemplateAnyTime->setFixedSize(mTemplateAnyTime->sizeHint());
mTemplateAnyTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateAnyTime,
+ TQWhatsThis::add(mTemplateAnyTime,
i18n("Set the '%1' option for alarms based on this template.").arg(i18n("Any time")));
grid->addWidget(mTemplateAnyTime, 1, 0, alignment);
- box = new QHBox(mTemplateTimeGroup);
+ box = new TQHBox(mTemplateTimeGroup);
box->setSpacing(spacingHint());
mTemplateUseTimeAfter = new RadioButton(AlarmTimeWidget::i18n_w_TimeFromNow(), box, "templateFromNowButton");
mTemplateUseTimeAfter->setFixedSize(mTemplateUseTimeAfter->sizeHint());
mTemplateUseTimeAfter->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateUseTimeAfter,
+ TQWhatsThis::add(mTemplateUseTimeAfter,
i18n("Set alarms based on this template to start after the specified time "
"interval from when the alarm is created."));
mTemplateTimeGroup->insert(mTemplateUseTimeAfter);
@@ -344,8 +344,8 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
mTemplateTimeAfter->setValue(1439);
mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->sizeHint());
mTemplateTimeAfter->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateTimeAfter,
- QString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod())
+ TQWhatsThis::add(mTemplateTimeAfter,
+ TQString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod())
.arg(TimeSpinBox::shiftWhatsThis()));
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 1, 1, alignment);
@@ -355,15 +355,15 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
else
{
mTimeWidget = new AlarmTimeWidget(i18n("Time"), AlarmTimeWidget::AT_TIME, mainPage, "timeGroup");
- connect(mTimeWidget, SIGNAL(anyTimeToggled(bool)), SLOT(slotAnyTimeToggled(bool)));
+ connect(mTimeWidget, TQT_SIGNAL(anyTimeToggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
topLayout->addWidget(mTimeWidget);
}
// Reminder
- static const QString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm.");
+ static const TQString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm.");
mReminder = new Reminder(i18n("Rem&inder:"),
i18n("Check to additionally display a reminder in advance of the main alarm time(s)."),
- QString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
+ TQString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
true, true, mainPage);
mReminder->setFixedSize(mReminder->sizeHint());
topLayout->addWidget(mReminder, 0, Qt::AlignAuto);
@@ -373,7 +373,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
topLayout->addWidget(mLateCancel, 0, Qt::AlignAuto);
// Acknowledgement confirmation required - default = no confirmation
- layout = new QHBoxLayout(topLayout, 0);
+ layout = new TQHBoxLayout(topLayout, 0);
mConfirmAck = createConfirmAckCheckbox(mainPage);
mConfirmAck->setFixedSize(mConfirmAck->sizeHint());
layout->addWidget(mConfirmAck);
@@ -385,7 +385,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Show in KOrganizer checkbox
mShowInKorganizer = new CheckBox(i18n_ShowInKOrganizer(), mainPage);
mShowInKorganizer->setFixedSize(mShowInKorganizer->sizeHint());
- QWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar"));
+ TQWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar"));
layout->addWidget(mShowInKorganizer);
}
@@ -414,31 +414,31 @@ EditAlarmDlg::~EditAlarmDlg()
/******************************************************************************
* Set up the dialog controls common to display alarms.
*/
-void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
+void EditAlarmDlg::initDisplayAlarms(TQWidget* parent)
{
- mDisplayAlarmsFrame = new QFrame(parent);
- mDisplayAlarmsFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* frameLayout = new QVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
+ mDisplayAlarmsFrame = new TQFrame(parent);
+ mDisplayAlarmsFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* frameLayout = new TQVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
// Text message edit box
mTextMessageEdit = new TextEdit(mDisplayAlarmsFrame);
mTextMessageEdit->setWordWrap(KTextEdit::NoWrap);
- QWhatsThis::add(mTextMessageEdit, i18n("Enter the text of the alarm message. It may be multi-line."));
+ TQWhatsThis::add(mTextMessageEdit, i18n("Enter the text of the alarm message. It may be multi-line."));
frameLayout->addWidget(mTextMessageEdit);
// File name edit box
- mFileBox = new QHBox(mDisplayAlarmsFrame);
+ mFileBox = new TQHBox(mDisplayAlarmsFrame);
frameLayout->addWidget(mFileBox);
mFileMessageEdit = new LineEdit(LineEdit::Url, mFileBox);
mFileMessageEdit->setAcceptDrops(true);
- QWhatsThis::add(mFileMessageEdit, i18n("Enter the name or URL of a text or image file to display."));
+ TQWhatsThis::add(mFileMessageEdit, i18n("Enter the name or URL of a text or image file to display."));
// File browse button
- mFileBrowseButton = new QPushButton(mFileBox);
+ mFileBrowseButton = new TQPushButton(mFileBox);
mFileBrowseButton->setPixmap(SmallIcon("fileopen"));
mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint());
- QToolTip::add(mFileBrowseButton, i18n("Choose a file"));
- QWhatsThis::add(mFileBrowseButton, i18n("Select a text or image file to display."));
+ TQToolTip::add(mFileBrowseButton, i18n("Choose a file"));
+ TQWhatsThis::add(mFileBrowseButton, i18n("Select a text or image file to display."));
mFileRadio->init(mFileBrowseButton, mFileMessageEdit);
// Font and colour choice button and sample text
@@ -446,18 +446,18 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
mFontColourButton->setMaximumHeight(mFontColourButton->sizeHint().height());
frameLayout->addWidget(mFontColourButton);
- QHBoxLayout* layout = new QHBoxLayout(frameLayout, 0, 0);
- mBgColourBox = new QHBox(mDisplayAlarmsFrame);
+ TQHBoxLayout* layout = new TQHBoxLayout(frameLayout, 0, 0);
+ mBgColourBox = new TQHBox(mDisplayAlarmsFrame);
mBgColourBox->setSpacing(spacingHint());
layout->addWidget(mBgColourBox);
layout->addStretch();
- QLabel* label = new QLabel(i18n("&Background color:"), mBgColourBox);
+ TQLabel* label = new TQLabel(i18n("&Background color:"), mBgColourBox);
mBgColourButton = new ColourCombo(mBgColourBox);
label->setBuddy(mBgColourButton);
- QWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color"));
+ TQWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color"));
// Sound checkbox and file selector
- layout = new QHBoxLayout(frameLayout);
+ layout = new TQHBoxLayout(frameLayout);
mSoundPicker = new SoundPicker(mDisplayAlarmsFrame);
mSoundPicker->setFixedSize(mSoundPicker->sizeHint());
layout->addWidget(mSoundPicker);
@@ -473,7 +473,7 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
}
// Top-adjust the controls
- mFilePadding = new QHBox(mDisplayAlarmsFrame);
+ mFilePadding = new TQHBox(mDisplayAlarmsFrame);
frameLayout->addWidget(mFilePadding);
frameLayout->setStretchFactor(mFilePadding, 1);
}
@@ -481,60 +481,60 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
/******************************************************************************
* Set up the command alarm dialog controls.
*/
-void EditAlarmDlg::initCommand(QWidget* parent)
+void EditAlarmDlg::initCommand(TQWidget* parent)
{
- mCommandFrame = new QFrame(parent);
- mCommandFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* frameLayout = new QVBoxLayout(mCommandFrame, 0, spacingHint());
+ mCommandFrame = new TQFrame(parent);
+ mCommandFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* frameLayout = new TQVBoxLayout(mCommandFrame, 0, spacingHint());
mCmdTypeScript = new CheckBox(i18n_p_EnterScript(), mCommandFrame);
mCmdTypeScript->setFixedSize(mCmdTypeScript->sizeHint());
- connect(mCmdTypeScript, SIGNAL(toggled(bool)), SLOT(slotCmdScriptToggled(bool)));
- QWhatsThis::add(mCmdTypeScript, i18n("Check to enter the contents of a script instead of a shell command line"));
+ connect(mCmdTypeScript, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCmdScriptToggled(bool)));
+ TQWhatsThis::add(mCmdTypeScript, i18n("Check to enter the contents of a script instead of a shell command line"));
frameLayout->addWidget(mCmdTypeScript, 0, Qt::AlignAuto);
mCmdCommandEdit = new LineEdit(LineEdit::Url, mCommandFrame);
- QWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
+ TQWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
frameLayout->addWidget(mCmdCommandEdit);
mCmdScriptEdit = new TextEdit(mCommandFrame);
- QWhatsThis::add(mCmdScriptEdit, i18n("Enter the contents of a script to execute"));
+ TQWhatsThis::add(mCmdScriptEdit, i18n("Enter the contents of a script to execute"));
frameLayout->addWidget(mCmdScriptEdit);
// What to do with command output
mCmdOutputGroup = new ButtonGroup(i18n("Command Output"), mCommandFrame);
frameLayout->addWidget(mCmdOutputGroup);
- QBoxLayout* layout = new QVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint());
layout->addSpacing(fontMetrics().lineSpacing()/2);
// Execute in terminal window
RadioButton* button = new RadioButton(i18n_u_ExecInTermWindow(), mCmdOutputGroup, "execInTerm");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
+ TQWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
mCmdOutputGroup->insert(button, EXEC_IN_TERMINAL);
layout->addWidget(button, 0, Qt::AlignAuto);
// Log file name edit box
- QHBox* box = new QHBox(mCmdOutputGroup);
- (new QWidget(box))->setFixedWidth(button->style().subRect(QStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box
-// (new QWidget(box))->setFixedWidth(button->style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
+ TQHBox* box = new TQHBox(mCmdOutputGroup);
+ (new TQWidget(box))->setFixedWidth(button->style().subRect(TQStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box
+// (new TQWidget(box))->setFixedWidth(button->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
mCmdLogFileEdit = new LineEdit(LineEdit::Url, box);
mCmdLogFileEdit->setAcceptDrops(true);
- QWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file."));
+ TQWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file."));
// Log file browse button.
// The file browser dialogue is activated by the PickLogFileRadio class.
- QPushButton* browseButton = new QPushButton(box);
+ TQPushButton* browseButton = new TQPushButton(box);
browseButton->setPixmap(SmallIcon("fileopen"));
browseButton->setFixedSize(browseButton->sizeHint());
- QToolTip::add(browseButton, i18n("Choose a file"));
- QWhatsThis::add(browseButton, i18n("Select a log file."));
+ TQToolTip::add(browseButton, i18n("Choose a file"));
+ TQWhatsThis::add(browseButton, i18n("Select a log file."));
// Log output to file
button = new PickLogFileRadio(browseButton, mCmdLogFileEdit, i18n_g_LogToFile(), mCmdOutputGroup, "cmdLog");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button,
+ TQWhatsThis::add(button,
i18n("Check to log the command output to a local file. The output will be appended to any existing contents of the file."));
mCmdOutputGroup->insert(button, LOG_TO_FILE);
layout->addWidget(button, 0, Qt::AlignAuto);
@@ -543,12 +543,12 @@ void EditAlarmDlg::initCommand(QWidget* parent)
// Discard output
button = new RadioButton(i18n("Discard"), mCmdOutputGroup, "cmdDiscard");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button, i18n("Check to discard command output."));
+ TQWhatsThis::add(button, i18n("Check to discard command output."));
mCmdOutputGroup->insert(button, DISCARD_OUTPUT);
layout->addWidget(button, 0, Qt::AlignAuto);
// Top-adjust the controls
- mCmdPadding = new QHBox(mCommandFrame);
+ mCmdPadding = new TQHBox(mCommandFrame);
frameLayout->addWidget(mCmdPadding);
frameLayout->setStretchFactor(mCmdPadding, 1);
}
@@ -556,98 +556,98 @@ void EditAlarmDlg::initCommand(QWidget* parent)
/******************************************************************************
* Set up the email alarm dialog controls.
*/
-void EditAlarmDlg::initEmail(QWidget* parent)
+void EditAlarmDlg::initEmail(TQWidget* parent)
{
- mEmailFrame = new QFrame(parent);
- mEmailFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* layout = new QVBoxLayout(mEmailFrame, 0, spacingHint());
- QGridLayout* grid = new QGridLayout(layout, 3, 3, spacingHint());
+ mEmailFrame = new TQFrame(parent);
+ mEmailFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* layout = new TQVBoxLayout(mEmailFrame, 0, spacingHint());
+ TQGridLayout* grid = new TQGridLayout(layout, 3, 3, spacingHint());
grid->setColStretch(1, 1);
mEmailFromList = 0;
if (Preferences::emailFrom() == Preferences::MAIL_FROM_KMAIL)
{
// Email sender identity
- QLabel* label = new QLabel(i18n_EmailFrom(), mEmailFrame);
+ TQLabel* label = new TQLabel(i18n_EmailFrom(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
mEmailFromList = new EmailIdCombo(KAMail::identityManager(), mEmailFrame);
mEmailFromList->setMinimumSize(mEmailFromList->sizeHint());
label->setBuddy(mEmailFromList);
- QWhatsThis::add(mEmailFromList,
+ TQWhatsThis::add(mEmailFromList,
i18n("Your email identity, used to identify you as the sender when sending email alarms."));
grid->addMultiCellWidget(mEmailFromList, 0, 0, 1, 2);
}
// Email recipients
- QLabel* label = new QLabel(i18n_EmailTo(), mEmailFrame);
+ TQLabel* label = new TQLabel(i18n_EmailTo(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 0);
mEmailToEdit = new LineEdit(LineEdit::Emails, mEmailFrame);
mEmailToEdit->setMinimumSize(mEmailToEdit->sizeHint());
- QWhatsThis::add(mEmailToEdit,
+ TQWhatsThis::add(mEmailToEdit,
i18n("Enter the addresses of the email recipients. Separate multiple addresses by "
"commas or semicolons."));
grid->addWidget(mEmailToEdit, 1, 1);
- mEmailAddressButton = new QPushButton(mEmailFrame);
+ mEmailAddressButton = new TQPushButton(mEmailFrame);
mEmailAddressButton->setPixmap(SmallIcon("contents"));
mEmailAddressButton->setFixedSize(mEmailAddressButton->sizeHint());
- connect(mEmailAddressButton, SIGNAL(clicked()), SLOT(openAddressBook()));
- QToolTip::add(mEmailAddressButton, i18n("Open address book"));
- QWhatsThis::add(mEmailAddressButton, i18n("Select email addresses from your address book."));
+ connect(mEmailAddressButton, TQT_SIGNAL(clicked()), TQT_SLOT(openAddressBook()));
+ TQToolTip::add(mEmailAddressButton, i18n("Open address book"));
+ TQWhatsThis::add(mEmailAddressButton, i18n("Select email addresses from your address book."));
grid->addWidget(mEmailAddressButton, 1, 2);
// Email subject
- label = new QLabel(i18n_j_EmailSubject(), mEmailFrame);
+ label = new TQLabel(i18n_j_EmailSubject(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 2, 0);
mEmailSubjectEdit = new LineEdit(mEmailFrame);
mEmailSubjectEdit->setMinimumSize(mEmailSubjectEdit->sizeHint());
label->setBuddy(mEmailSubjectEdit);
- QWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject."));
+ TQWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject."));
grid->addMultiCellWidget(mEmailSubjectEdit, 2, 2, 1, 2);
// Email body
mEmailMessageEdit = new TextEdit(mEmailFrame);
- QWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message."));
+ TQWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message."));
layout->addWidget(mEmailMessageEdit);
// Email attachments
- grid = new QGridLayout(layout, 2, 3, spacingHint());
- label = new QLabel(i18n("Attachment&s:"), mEmailFrame);
+ grid = new TQGridLayout(layout, 2, 3, spacingHint());
+ label = new TQLabel(i18n("Attachment&s:"), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
- mEmailAttachList = new QComboBox(true, mEmailFrame);
+ mEmailAttachList = new TQComboBox(true, mEmailFrame);
mEmailAttachList->setMinimumSize(mEmailAttachList->sizeHint());
mEmailAttachList->lineEdit()->setReadOnly(true);
-QListBox* list = mEmailAttachList->listBox();
-QRect rect = list->geometry();
+TQListBox* list = mEmailAttachList->listBox();
+TQRect rect = list->geometry();
list->setGeometry(rect.left() - 50, rect.top(), rect.width(), rect.height());
label->setBuddy(mEmailAttachList);
- QWhatsThis::add(mEmailAttachList,
+ TQWhatsThis::add(mEmailAttachList,
i18n("Files to send as attachments to the email."));
grid->addWidget(mEmailAttachList, 0, 1);
grid->setColStretch(1, 1);
- mEmailAddAttachButton = new QPushButton(i18n("Add..."), mEmailFrame);
- connect(mEmailAddAttachButton, SIGNAL(clicked()), SLOT(slotAddAttachment()));
- QWhatsThis::add(mEmailAddAttachButton, i18n("Add an attachment to the email."));
+ mEmailAddAttachButton = new TQPushButton(i18n("Add..."), mEmailFrame);
+ connect(mEmailAddAttachButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddAttachment()));
+ TQWhatsThis::add(mEmailAddAttachButton, i18n("Add an attachment to the email."));
grid->addWidget(mEmailAddAttachButton, 0, 2);
- mEmailRemoveButton = new QPushButton(i18n("Remo&ve"), mEmailFrame);
- connect(mEmailRemoveButton, SIGNAL(clicked()), SLOT(slotRemoveAttachment()));
- QWhatsThis::add(mEmailRemoveButton, i18n("Remove the highlighted attachment from the email."));
+ mEmailRemoveButton = new TQPushButton(i18n("Remo&ve"), mEmailFrame);
+ connect(mEmailRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveAttachment()));
+ TQWhatsThis::add(mEmailRemoveButton, i18n("Remove the highlighted attachment from the email."));
grid->addWidget(mEmailRemoveButton, 1, 2);
// BCC email to sender
mEmailBcc = new CheckBox(i18n_s_CopyEmailToSelf(), mEmailFrame);
mEmailBcc->setFixedSize(mEmailBcc->sizeHint());
- QWhatsThis::add(mEmailBcc,
+ TQWhatsThis::add(mEmailBcc,
i18n("If checked, the email will be blind copied to you."));
grid->addMultiCellWidget(mEmailBcc, 1, 1, 0, 1, Qt::AlignAuto);
}
@@ -708,7 +708,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
if (event->isTemplate())
{
// Initialising from an alarm template: use current date
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
int afterTime = event->templateAfterTime();
if (afterTime >= 0)
{
@@ -717,12 +717,12 @@ void EditAlarmDlg::initialise(const KAEvent* event)
}
else
{
- QDate d = now.date();
- QTime t = event->startDateTime().time();
+ TQDate d = now.date();
+ TQTime t = event->startDateTime().time();
bool dateOnly = event->startDateTime().isDateOnly();
if (!dateOnly && now.time() >= t)
d = d.addDays(1); // alarm time has already passed, so use tomorrow
- mTimeWidget->setDateTime(DateTime(QDateTime(d, t), dateOnly));
+ mTimeWidget->setDateTime(DateTime(TQDateTime(d, t), dateOnly));
}
}
else
@@ -804,7 +804,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
mFontColourButton->setBgColour(Preferences::defaultBgColour());
mFontColourButton->setFgColour(Preferences::defaultFgColour());
mBgColourButton->setColour(Preferences::defaultBgColour());
- QDateTime defaultTime = QDateTime::currentDateTime().addSecs(60);
+ TQDateTime defaultTime = TQDateTime::currentDateTime().addSecs(60);
if (mTemplate)
{
mTemplateTimeGroup->setButton(mTemplateTimeGroup->id(mTemplateDefaultTime));
@@ -922,9 +922,9 @@ void EditAlarmDlg::setReadOnly()
*/
void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
{
- QString text = alarmText.displayText();
+ TQString text = alarmText.displayText();
bool script;
- QRadioButton* radio;
+ TQRadioButton* radio;
switch (action)
{
case KAEvent::FILE:
@@ -972,10 +972,10 @@ void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
/******************************************************************************
* Create an "acknowledgement confirmation required" checkbox.
*/
-CheckBox* EditAlarmDlg::createConfirmAckCheckbox(QWidget* parent, const char* name)
+CheckBox* EditAlarmDlg::createConfirmAckCheckbox(TQWidget* parent, const char* name)
{
CheckBox* widget = new CheckBox(i18n_k_ConfirmAck(), parent, name);
- QWhatsThis::add(widget,
+ TQWhatsThis::add(widget,
i18n("Check to be prompted for confirmation when you acknowledge the alarm."));
return widget;
}
@@ -1046,7 +1046,7 @@ bool EditAlarmDlg::stateChanged() const
mOnlyDeferred = false;
if (!mSavedEvent)
return true;
- QString textFileCommandMessage;
+ TQString textFileCommandMessage;
checkText(textFileCommandMessage, false);
if (mTemplate)
{
@@ -1111,7 +1111,7 @@ bool EditAlarmDlg::stateChanged() const
}
else if (mEmailRadio->isOn())
{
- QStringList emailAttach;
+ TQStringList emailAttach;
for (int i = 0; i < mEmailAttachList->count(); ++i)
emailAttach += mEmailAttachList->text(i);
if (mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName()
@@ -1162,15 +1162,15 @@ bool EditAlarmDlg::getEvent(KAEvent& event)
* If 'trial' is true, the event is set up for a simple one-off test, ignoring
* recurrence, reminder, template etc. data.
*/
-void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
+void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial)
{
- QDateTime dt;
+ TQDateTime dt;
if (!trial)
{
if (!mTemplate)
dt = mAlarmDateTime.dateTime();
else if (mTemplateUseTime->isOn())
- dt = QDateTime(QDate(2000,1,1), mTemplateTime->time());
+ dt = TQDateTime(TQDate(2000,1,1), mTemplateTime->time());
}
KAEvent::Action type = getAlarmType();
event.set(dt, text, (mFileRadio->isOn() ? mBgColourButton->colour() : mFontColourButton->bgColour()),
@@ -1212,7 +1212,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
if (mRecurrenceEdit->repeatType() != RecurrenceEdit::NO_RECUR)
{
mRecurrenceEdit->updateEvent(event, !mTemplate);
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
bool dateOnly = mAlarmDateTime.isDateOnly();
if (dateOnly && mAlarmDateTime.date() < now.date()
|| !dateOnly && mAlarmDateTime.rawDateTime() < now)
@@ -1232,7 +1232,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
DateTime remindTime = mAlarmDateTime.addMins(-reminder);
if (mDeferDateTime >= remindTime)
{
- if (remindTime > QDateTime::currentDateTime())
+ if (remindTime > TQDateTime::currentDateTime())
deferral = false; // ignore deferral if it's after next reminder
else if (mDeferDateTime > remindTime)
deferReminder = true; // it's the reminder which is being deferred
@@ -1289,12 +1289,12 @@ KAEvent::Action EditAlarmDlg::getAlarmType() const
* The first time through, sets the size to the same as the last time it was
* displayed.
*/
-void EditAlarmDlg::showEvent(QShowEvent* se)
+void EditAlarmDlg::showEvent(TQShowEvent* se)
{
if (!mDeferGroupHeight)
{
mDeferGroupHeight = mDeferGroup->height() + spacingHint();
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(EDIT_DIALOG_NAME, s))
s.setHeight(s.height() + (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight));
else
@@ -1310,11 +1310,11 @@ void EditAlarmDlg::showEvent(QShowEvent* se)
* Records the new size (adjusted to ignore the optional height of the deferred
* time edit widget) in the config file.
*/
-void EditAlarmDlg::resizeEvent(QResizeEvent* re)
+void EditAlarmDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
{
- QSize s = re->size();
+ TQSize s = re->size();
s.setHeight(s.height() - (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight));
KAlarm::writeConfigWindowSize(EDIT_DIALOG_NAME, s);
}
@@ -1344,8 +1344,8 @@ void EditAlarmDlg::slotOk()
if (mTemplate)
{
// Check that the template name is not blank and is unique
- QString errmsg;
- QString name = mTemplateName->text();
+ TQString errmsg;
+ TQString name = mTemplateName->text();
if (name.isEmpty())
errmsg = i18n("You must enter a name for the alarm template");
else if (name != mSavedTemplateName)
@@ -1363,7 +1363,7 @@ void EditAlarmDlg::slotOk()
}
else
{
- QWidget* errWidget;
+ TQWidget* errWidget;
mAlarmDateTime = mTimeWidget->getDateTime(0, !timedRecurrence, false, &errWidget);
if (errWidget)
{
@@ -1381,7 +1381,7 @@ void EditAlarmDlg::slotOk()
{
if (timedRecurrence)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mAlarmDateTime.date() < now.date()
|| mAlarmDateTime.date() == now.date()
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
@@ -1400,8 +1400,8 @@ void EditAlarmDlg::slotOk()
}
}
}
- QString errmsg;
- QWidget* errWidget = mRecurrenceEdit->checkData(mAlarmDateTime.dateTime(), errmsg);
+ TQString errmsg;
+ TQWidget* errWidget = mRecurrenceEdit->checkData(mAlarmDateTime.dateTime(), errmsg);
if (errWidget)
{
mTabs->setCurrentPage(mRecurPageIndex);
@@ -1461,7 +1461,7 @@ void EditAlarmDlg::slotOk()
*/
void EditAlarmDlg::slotTry()
{
- QString text;
+ TQString text;
if (checkText(text))
{
if (mEmailRadio->isOn())
@@ -1484,7 +1484,7 @@ void EditAlarmDlg::slotTry()
}
else if (mEmailRadio->isOn())
{
- QString bcc;
+ TQString bcc;
if (mEmailBcc->isChecked())
bcc = i18n("\nBcc: %1").arg(Preferences::emailBccAddress());
KMessageBox::information(this, i18n("Email sent to:\n%1%2").arg(mEmailAddresses.join("\n")).arg(bcc));
@@ -1508,7 +1508,7 @@ void EditAlarmDlg::slotCancel()
void EditAlarmDlg::slotDefault()
{
TemplatePickDlg dlg(this, "templPickDlg");
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
initialise(dlg.selectedTemplate());
}
@@ -1530,7 +1530,7 @@ void EditAlarmDlg::slotEditDeferral()
return;
limit = false;
}
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (limit)
{
if (repeatCount && start < now)
@@ -1557,15 +1557,15 @@ void EditAlarmDlg::slotEditDeferral()
if (reminder)
{
DateTime remindTime = start.addMins(-reminder);
- if (QDateTime::currentDateTime() < remindTime)
+ if (TQDateTime::currentDateTime() < remindTime)
start = remindTime;
}
deferDlg.setLimit(start.addSecs(-60));
}
- if (deferDlg.exec() == QDialog::Accepted)
+ if (deferDlg.exec() == TQDialog::Accepted)
{
mDeferDateTime = deferDlg.getDateTime();
- mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : QString::null);
+ mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : TQString::null);
}
}
@@ -1604,7 +1604,7 @@ void EditAlarmDlg::slotShowRecurrenceEdit()
mRecurPageIndex = mTabs->currentPageIndex();
if (!mReadOnly && !mTemplate)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mAlarmDateTime = mTimeWidget->getDateTime(0, false, false);
bool expired = (mAlarmDateTime.dateTime() < now);
if (mRecurSetDefaultEndDate)
@@ -1682,9 +1682,9 @@ bool EditAlarmDlg::checkCommandData()
if (mCommandRadio->isOn() && mCmdOutputGroup->selectedId() == LOG_TO_FILE)
{
// Validate the log file name
- QString file = mCmdLogFileEdit->text();
- QFileInfo info(file);
- QDir::setCurrent(QDir::homeDirPath());
+ TQString file = mCmdLogFileEdit->text();
+ TQFileInfo info(file);
+ TQDir::setCurrent(TQDir::homeDirPath());
bool err = file.isEmpty() || info.isDir();
if (!err)
{
@@ -1694,7 +1694,7 @@ bool EditAlarmDlg::checkCommandData()
}
else
{
- QFileInfo dirinfo(info.dirPath(true)); // get absolute directory path
+ TQFileInfo dirinfo(info.dirPath(true)); // get absolute directory path
err = (!dirinfo.isDir() || !dirinfo.isWritable());
}
}
@@ -1719,12 +1719,12 @@ bool EditAlarmDlg::checkEmailData()
{
if (mEmailRadio->isOn())
{
- QString addrs = mEmailToEdit->text();
+ TQString addrs = mEmailToEdit->text();
if (addrs.isEmpty())
mEmailAddresses.clear();
else
{
- QString bad = KAMail::convertAddresses(addrs, mEmailAddresses);
+ TQString bad = KAMail::convertAddresses(addrs, mEmailAddresses);
if (!bad.isEmpty())
{
mEmailToEdit->setFocus();
@@ -1742,7 +1742,7 @@ bool EditAlarmDlg::checkEmailData()
mEmailAttachments.clear();
for (int i = 0; i < mEmailAttachList->count(); ++i)
{
- QString att = mEmailAttachList->text(i);
+ TQString att = mEmailAttachList->text(i);
switch (KAMail::checkAttachment(att))
{
case 1:
@@ -1767,7 +1767,7 @@ bool EditAlarmDlg::checkEmailData()
void EditAlarmDlg::slotAlarmTypeChanged(int)
{
bool displayAlarm = false;
- QWidget* focus = 0;
+ TQWidget* focus = 0;
if (mMessageRadio->isOn())
{
mFileBox->hide();
@@ -1883,7 +1883,7 @@ void EditAlarmDlg::openAddressBook()
if (a.isEmpty())
return;
Person person(a.realName(), a.preferredEmail());
- QString addrs = mEmailToEdit->text().stripWhiteSpace();
+ TQString addrs = mEmailToEdit->text().stripWhiteSpace();
if (!addrs.isEmpty())
addrs += ", ";
addrs += person.fullName();
@@ -1895,8 +1895,8 @@ void EditAlarmDlg::openAddressBook()
*/
void EditAlarmDlg::slotAddAttachment()
{
- QString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, QString::null,
- QString::null, KFile::ExistingOnly, this, "pickAttachFile");
+ TQString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, TQString::null,
+ TQString::null, KFile::ExistingOnly, this, "pickAttachFile");
if (!url.isEmpty())
{
mEmailAttachList->insertItem(url);
@@ -1926,7 +1926,7 @@ void EditAlarmDlg::slotRemoveAttachment()
/******************************************************************************
* Clean up the alarm text, and if it's a file, check whether it's valid.
*/
-bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
+bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const
{
if (mMessageRadio->isOn())
result = mTextMessageEdit->text();
@@ -1942,13 +1942,13 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
}
else if (mFileRadio->isOn())
{
- QString alarmtext = mFileMessageEdit->text().stripWhiteSpace();
+ TQString alarmtext = mFileMessageEdit->text().stripWhiteSpace();
// Convert any relative file path to absolute
// (using home directory as the default)
enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE };
Err err = NONE;
KURL url;
- int i = alarmtext.find(QString::fromLatin1("/"));
+ int i = alarmtext.find(TQString::fromLatin1("/"));
if (i > 0 && alarmtext[i - 1] == ':')
{
url = alarmtext;
@@ -1969,11 +1969,11 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
else
{
// It's a local file - convert to absolute path & check validity
- QFileInfo info(alarmtext);
- QDir::setCurrent(QDir::homeDirPath());
+ TQFileInfo info(alarmtext);
+ TQDir::setCurrent(TQDir::homeDirPath());
alarmtext = info.absFilePath();
url.setPath(alarmtext);
- alarmtext = QString::fromLatin1("file:") + alarmtext;
+ alarmtext = TQString::fromLatin1("file:") + alarmtext;
if (!err)
{
if (info.isDir()) err = DIRECTORY;
@@ -1998,7 +1998,7 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
if (err && showErrorMessage)
{
mFileMessageEdit->setFocus();
- QString errmsg;
+ TQString errmsg;
switch (err)
{
case BLANK:
@@ -2027,15 +2027,15 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
= A text edit field with a minimum height of 3 text lines.
= Provides KDE 2 compatibility.
=============================================================================*/
-TextEdit::TextEdit(QWidget* parent, const char* name)
+TextEdit::TextEdit(TQWidget* parent, const char* name)
: KTextEdit(parent, name)
{
- QSize tsize = sizeHint();
+ TQSize tsize = sizeHint();
tsize.setHeight(fontMetrics().lineSpacing()*13/4 + 2*frameWidth());
setMinimumSize(tsize);
}
-void TextEdit::dragEnterEvent(QDragEnterEvent* e)
+void TextEdit::dragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(false); // don't accept "text/calendar" objects