summaryrefslogtreecommitdiffstats
path: root/kalarm/editdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/editdlg.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/editdlg.cpp')
-rw-r--r--kalarm/editdlg.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index e5cd07dcd..b93f681e6 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -97,12 +97,12 @@ static const int maxDelayTime = 99*60 + 59; // < 100 hours
class PickAlarmFileRadio : public PickFileRadio
{
public:
- PickAlarmFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0)
- : PickFileRadio(text, parent, name) { }
+ PickAlarmFileRadio(const TQString& text, TQButtonGroup* tqparent, const char* name = 0)
+ : PickFileRadio(text, tqparent, name) { }
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(),
- TQString::null, KFile::ExistingOnly, tqparentWidget(), "pickAlarmFile");
+ TQString(), KFile::ExistingOnly, tqparentWidget(), "pickAlarmFile");
}
private:
TQString mDefaultDir; // default directory for file browse button
@@ -114,11 +114,11 @@ class PickAlarmFileRadio : public PickFileRadio
class PickLogFileRadio : public PickFileRadio
{
public:
- PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* parent, const char* name = 0)
- : PickFileRadio(b, e, text, parent, name) { }
+ PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* tqparent, const char* name = 0)
+ : PickFileRadio(b, e, text, tqparent, name) { }
virtual TQString pickFile() // called when browse button is pressed to select a log file
{
- return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), TQString::null,
+ return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), TQString(),
KFile::LocalOnly, tqparentWidget(), "pickLogFile");
}
private:
@@ -165,9 +165,9 @@ TQString 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 TQString& caption, TQWidget* parent, const char* name,
+EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* tqparent, const char* name,
const KAEvent* event, bool readOnly)
- : KDialogBase(parent, (name ? name : Template ? "TemplEditDlg" : "EditDlg"), true, caption,
+ : KDialogBase(tqparent, (name ? name : Template ? "TemplEditDlg" : "EditDlg"), true, caption,
(readOnly ? Cancel|Try : Template ? Ok|Cancel|Try : Ok|Cancel|Try|Default),
(readOnly ? Cancel : Ok)),
mMainPageShown(false),
@@ -217,7 +217,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par
// Recurrence tab
TQVBox* recurTab = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
- mTabs->addTab(recurTab, TQString::null);
+ mTabs->addTab(recurTab, TQString());
mRecurPageIndex = 1;
mRecurrenceEdit = new RecurrenceEdit(readOnly, recurTab, "recurPage");
connect(mRecurrenceEdit, TQT_SIGNAL(shown()), TQT_SLOT(slotShowRecurrenceEdit()));
@@ -273,7 +273,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par
tqlayout->addWidget(mEmailFrame);
// Deferred date/time: visible only for a deferred recurring event.
- mDeferGroup = new TQGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
+ mDeferGroup = new TQGroupBox(1, TQt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
topLayout->addWidget(mDeferGroup);
TQLabel* label = new TQLabel(i18n("Deferred to:"), mDeferGroup);
label->setFixedSize(label->tqsizeHint());
@@ -296,7 +296,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par
grid = new TQGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
// Get tqalignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
- int tqalignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft;
mTemplateDefaultTime = new RadioButton(i18n("&Default time"), mTemplateTimeGroup, "templateDefTimeButton");
mTemplateDefaultTime->setFixedSize(mTemplateDefaultTime->tqsizeHint());
@@ -366,11 +366,11 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par
TQString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
true, true, mainPage);
mReminder->setFixedSize(mReminder->tqsizeHint());
- topLayout->addWidget(mReminder, 0, Qt::AlignAuto);
+ topLayout->addWidget(mReminder, 0, TQt::AlignAuto);
// Late cancel selector - default = allow late display
mLateCancel = new LateCancelSelector(true, mainPage);
- topLayout->addWidget(mLateCancel, 0, Qt::AlignAuto);
+ topLayout->addWidget(mLateCancel, 0, TQt::AlignAuto);
// Acknowledgement confirmation required - default = no confirmation
tqlayout = new TQHBoxLayout(topLayout, 0);
@@ -414,9 +414,9 @@ EditAlarmDlg::~EditAlarmDlg()
/******************************************************************************
* Set up the dialog controls common to display alarms.
*/
-void EditAlarmDlg::initDisplayAlarms(TQWidget* parent)
+void EditAlarmDlg::initDisplayAlarms(TQWidget* tqparent)
{
- mDisplayAlarmsFrame = new TQFrame(parent);
+ mDisplayAlarmsFrame = new TQFrame(tqparent);
mDisplayAlarmsFrame->setFrameStyle(TQFrame::NoFrame);
TQBoxLayout* frameLayout = new TQVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
@@ -481,9 +481,9 @@ void EditAlarmDlg::initDisplayAlarms(TQWidget* parent)
/******************************************************************************
* Set up the command alarm dialog controls.
*/
-void EditAlarmDlg::initCommand(TQWidget* parent)
+void EditAlarmDlg::initCommand(TQWidget* tqparent)
{
- mCommandFrame = new TQFrame(parent);
+ mCommandFrame = new TQFrame(tqparent);
mCommandFrame->setFrameStyle(TQFrame::NoFrame);
TQBoxLayout* frameLayout = new TQVBoxLayout(mCommandFrame, 0, spacingHint());
@@ -491,7 +491,7 @@ void EditAlarmDlg::initCommand(TQWidget* parent)
mCmdTypeScript->setFixedSize(mCmdTypeScript->tqsizeHint());
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);
+ frameLayout->addWidget(mCmdTypeScript, 0, TQt::AlignAuto);
mCmdCommandEdit = new LineEdit(LineEdit::Url, mCommandFrame);
TQWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
@@ -513,7 +513,7 @@ void EditAlarmDlg::initCommand(TQWidget* parent)
button->setFixedSize(button->tqsizeHint());
TQWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
mCmdOutputGroup->insert(button, EXEC_IN_TERMINAL);
- tqlayout->addWidget(button, 0, Qt::AlignAuto);
+ tqlayout->addWidget(button, 0, TQt::AlignAuto);
// Log file name edit box
TQHBox* box = new TQHBox(mCmdOutputGroup);
@@ -537,7 +537,7 @@ void EditAlarmDlg::initCommand(TQWidget* parent)
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);
- tqlayout->addWidget(button, 0, Qt::AlignAuto);
+ tqlayout->addWidget(button, 0, TQt::AlignAuto);
tqlayout->addWidget(box);
// Discard output
@@ -545,7 +545,7 @@ void EditAlarmDlg::initCommand(TQWidget* parent)
button->setFixedSize(button->tqsizeHint());
TQWhatsThis::add(button, i18n("Check to discard command output."));
mCmdOutputGroup->insert(button, DISCARD_OUTPUT);
- tqlayout->addWidget(button, 0, Qt::AlignAuto);
+ tqlayout->addWidget(button, 0, TQt::AlignAuto);
// Top-adjust the controls
mCmdPadding = new TQHBox(mCommandFrame);
@@ -556,9 +556,9 @@ void EditAlarmDlg::initCommand(TQWidget* parent)
/******************************************************************************
* Set up the email alarm dialog controls.
*/
-void EditAlarmDlg::initEmail(TQWidget* parent)
+void EditAlarmDlg::initEmail(TQWidget* tqparent)
{
- mEmailFrame = new TQFrame(parent);
+ mEmailFrame = new TQFrame(tqparent);
mEmailFrame->setFrameStyle(TQFrame::NoFrame);
TQBoxLayout* tqlayout = new TQVBoxLayout(mEmailFrame, 0, spacingHint());
TQGridLayout* grid = new TQGridLayout(tqlayout, 3, 3, spacingHint());
@@ -649,7 +649,7 @@ list->setGeometry(rect.left() - 50, rect.top(), rect.width(), rect.height());
mEmailBcc->setFixedSize(mEmailBcc->tqsizeHint());
TQWhatsThis::add(mEmailBcc,
i18n("If checked, the email will be blind copied to you."));
- grid->addMultiCellWidget(mEmailBcc, 1, 1, 0, 1, Qt::AlignAuto);
+ grid->addMultiCellWidget(mEmailBcc, 1, 1, 0, 1, TQt::AlignAuto);
}
/******************************************************************************
@@ -728,7 +728,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
else
{
mExpiredRecurrence = recurs && event->mainExpired();
- mTimeWidget->setDateTime(recurs || event->uidStatus() == KAEvent::EXPIRED ? event->startDateTime()
+ mTimeWidget->setDateTime(recurs || event->uidtqStatus() == KAEvent::EXPIRED ? event->startDateTime()
: event->mainExpired() ? event->deferDateTime() : event->mainDateTime());
}
}
@@ -894,7 +894,7 @@ void EditAlarmDlg::setReadOnly()
mCmdCommandEdit->setReadOnly(mReadOnly);
mCmdScriptEdit->setReadOnly(mReadOnly);
for (int id = DISCARD_OUTPUT; id < EXEC_IN_TERMINAL; ++id)
- ((RadioButton*)mCmdOutputGroup->find(id))->setReadOnly(mReadOnly);
+ ((RadioButton*)mCmdOutputGroup->tqfind(id))->setReadOnly(mReadOnly);
// Email alarm controls
mEmailToEdit->setReadOnly(mReadOnly);
@@ -972,9 +972,9 @@ void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
/******************************************************************************
* Create an "acknowledgement confirmation required" checkbox.
*/
-CheckBox* EditAlarmDlg::createConfirmAckCheckbox(TQWidget* parent, const char* name)
+CheckBox* EditAlarmDlg::createConfirmAckCheckbox(TQWidget* tqparent, const char* name)
{
- CheckBox* widget = new CheckBox(i18n_k_ConfirmAck(), parent, name);
+ CheckBox* widget = new CheckBox(i18n_k_ConfirmAck(), tqparent, name);
TQWhatsThis::add(widget,
i18n("Check to be prompted for confirmation when you acknowledge the alarm."));
return widget;
@@ -1565,7 +1565,7 @@ void EditAlarmDlg::slotEditDeferral()
if (deferDlg.exec() == TQDialog::Accepted)
{
mDeferDateTime = deferDlg.getDateTime();
- mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : TQString::null);
+ mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : TQString());
}
}
@@ -1895,8 +1895,8 @@ void EditAlarmDlg::openAddressBook()
*/
void EditAlarmDlg::slotAddAttachment()
{
- TQString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, TQString::null,
- TQString::null, KFile::ExistingOnly, this, "pickAttachFile");
+ TQString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, TQString(),
+ TQString(), KFile::ExistingOnly, this, "pickAttachFile");
if (!url.isEmpty())
{
mEmailAttachList->insertItem(url);
@@ -1948,7 +1948,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const
enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE };
Err err = NONE;
KURL url;
- int i = alarmtext.find(TQString::tqfromLatin1("/"));
+ int i = alarmtext.tqfind(TQString::tqfromLatin1("/"));
if (i > 0 && alarmtext[i - 1] == ':')
{
url = alarmtext;
@@ -2027,8 +2027,8 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const
= A text edit field with a minimum height of 3 text lines.
= Provides KDE 2 compatibility.
=============================================================================*/
-TextEdit::TextEdit(TQWidget* parent, const char* name)
- : KTextEdit(parent, name)
+TextEdit::TextEdit(TQWidget* tqparent, const char* name)
+ : KTextEdit(tqparent, name)
{
TQSize tsize = tqsizeHint();
tsize.setHeight(fontMetrics().lineSpacing()*13/4 + 2*frameWidth());