summaryrefslogtreecommitdiffstats
path: root/kalarm/messagewin.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
commit9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch)
treeab537a329b9613e11dce8195761f93ffe82aed24 /kalarm/messagewin.cpp
parent3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff)
downloadtdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz
tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kalarm/messagewin.cpp')
-rw-r--r--kalarm/messagewin.cpp208
1 files changed, 104 insertions, 104 deletions
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index 2c455b128..f7decdf65 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -25,13 +25,13 @@
#include <tqfile.h>
#include <tqfileinfo.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqpushbutton.h>
#include <tqlabel.h>
#include <tqwhatsthis.h>
#include <tqtooltip.h>
#include <tqdragobject.h>
-#include <textedit.h>
+#include <tqtextedit.h>
#include <tqtimer.h>
#include <kstandarddirs.h>
@@ -101,7 +101,7 @@ class MessageText : public TQTextEdit
}
int scrollBarHeight() const { return horizontalScrollBar()->height(); }
int scrollBarWidth() const { return verticalScrollBar()->width(); }
- virtual TQSize sizeHint() const { return TQSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); }
+ virtual TQSize tqsizeHint() const { return TQSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); }
};
@@ -191,7 +191,7 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
kdDebug(5950) << "MessageWin::MessageWin(event)" << endl;
// Set to save settings automatically, but don't save window size.
// File alarm window size is saved elsewhere.
- setAutoSaveSettings(TQString::fromLatin1("MessageWin"), false);
+ setAutoSaveSettings(TQString::tqfromLatin1("MessageWin"), false);
initView();
mWindowList.append(this);
if (event.autoClose())
@@ -298,13 +298,13 @@ void MessageWin::initView()
{
// Show the alarm date/time, together with an "Advance reminder" text where appropriate
TQFrame* frame = 0;
- TQVBoxLayout* layout = topLayout;
+ TQVBoxLayout* tqlayout = topLayout;
if (reminder)
{
frame = new TQFrame(topWidget);
frame->setFrameStyle(TQFrame::Box | TQFrame::Raised);
topLayout->addWidget(frame, 0, TQt::AlignHCenter);
- layout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading);
+ tqlayout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading);
}
// Alarm date/time
@@ -314,8 +314,8 @@ void MessageWin::initView()
: KGlobal::locale()->formatDateTime(mDateTime.dateTime()));
if (!frame)
label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
- label->setFixedSize(label->sizeHint());
- layout->addWidget(label, 0, TQt::AlignHCenter);
+ label->setFixedSize(label->tqsizeHint());
+ tqlayout->addWidget(label, 0, TQt::AlignHCenter);
TQWhatsThis::add(label,
i18n("The scheduled date/time for the message (as opposed to the actual time of display)."));
@@ -323,9 +323,9 @@ void MessageWin::initView()
{
label = new TQLabel(frame);
label->setText(i18n("Reminder"));
- label->setFixedSize(label->sizeHint());
- layout->addWidget(label, 0, TQt::AlignHCenter);
- frame->setFixedSize(frame->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
+ tqlayout->addWidget(label, 0, TQt::AlignHCenter);
+ frame->setFixedSize(frame->tqsizeHint());
}
}
@@ -339,7 +339,7 @@ void MessageWin::initView()
// Display the file name
TQLabel* label = new TQLabel(mMessage, topWidget);
label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
TQWhatsThis::add(label, i18n("The file whose contents are displayed below"));
topLayout->addWidget(label, 0, TQt::AlignHCenter);
@@ -357,7 +357,7 @@ void MessageWin::initView()
opened = true;
KTextBrowser* view = new KTextBrowser(topWidget, "fileContents");
MWMimeSourceFactory msf(tmpFile, view);
- view->setMinimumSize(view->sizeHint());
+ view->setMinimumSize(view->tqsizeHint());
topLayout->addWidget(view);
// Set the default size to 20 lines square.
@@ -365,7 +365,7 @@ void MessageWin::initView()
// is overridden by the user-set default stored in the config file.
// So there is no need to calculate an accurate size.
int h = 20*view->fontMetrics().lineSpacing() + 2*view->frameWidth();
- view->resize(TQSize(h, h).expandedTo(view->sizeHint()));
+ view->resize(TQSize(h, h).expandedTo(view->tqsizeHint()));
TQWhatsThis::add(view, i18n("The contents of the file to be displayed"));
}
KIO::NetAccess::removeTempFile(tmpFile);
@@ -388,7 +388,7 @@ void MessageWin::initView()
text->setPaletteForegroundColor(mFgColour);
text->setFont(mFont);
int lineSpacing = text->fontMetrics().lineSpacing();
- TQSize s = text->sizeHint();
+ TQSize s = text->tqsizeHint();
int h = s.height();
text->setMaximumHeight(h + text->scrollBarHeight());
text->setMinimumHeight(TQMIN(h, lineSpacing*4));
@@ -401,14 +401,14 @@ void MessageWin::initView()
// Don't include any horizontal margins if message is 2/3 screen width
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
- if (text->sizeHint().width() >= mWinModule->workArea().width()*2/3)
+ if (text->tqsizeHint().width() >= mWinModule->workArea().width()*2/3)
topLayout->addWidget(text, 1, TQt::AlignHCenter);
else
{
- TQBoxLayout* layout = new TQHBoxLayout(topLayout);
- layout->addSpacing(hspace);
- layout->addWidget(text, 1, TQt::AlignHCenter);
- layout->addSpacing(hspace);
+ TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout);
+ tqlayout->addSpacing(hspace);
+ tqlayout->addWidget(text, 1, TQt::AlignHCenter);
+ tqlayout->addSpacing(hspace);
}
if (!reminder)
topLayout->addStretch();
@@ -426,7 +426,7 @@ void MessageWin::initView()
mRemainingText = new TQLabel(topWidget);
mRemainingText->setFrameStyle(TQFrame::Box | TQFrame::Raised);
mRemainingText->setMargin(leading);
- if (mDateTime.isDateOnly() || TQDate::currentDate().daysTo(mDateTime.date()) > 0)
+ if (mDateTime.isDateOnly() || TQDate::tqcurrentDate().daysTo(mDateTime.date()) > 0)
{
setRemainingTextDay();
MidnightTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextDay())); // update every day
@@ -456,17 +456,17 @@ void MessageWin::initView()
TQGridLayout* grid = new TQGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
TQLabel* label = new TQLabel(i18n("Email addressee", "To:"), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 0, 0, TQt::AlignLeft);
label = new TQLabel(mEvent.emailAddresses("\n"), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 0, 1, TQt::AlignLeft);
label = new TQLabel(i18n("Email subject", "Subject:"), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 1, 0, TQt::AlignLeft);
label = new TQLabel(mEvent.emailSubject(), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 1, 1, TQt::AlignLeft);
break;
}
@@ -484,21 +484,21 @@ void MessageWin::initView()
else
{
setCaption(i18n("Error"));
- TQBoxLayout* layout = new TQHBoxLayout(topLayout);
- layout->setMargin(2*KDialog::marginHint());
- layout->addStretch();
+ TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout);
+ tqlayout->setMargin(2*KDialog::marginHint());
+ tqlayout->addStretch();
TQLabel* label = new TQLabel(topWidget);
label->setPixmap(DesktopIcon("error"));
- label->setFixedSize(label->sizeHint());
- layout->addWidget(label, 0, TQt::AlignRight);
- TQBoxLayout* vlayout = new TQVBoxLayout(layout);
+ label->setFixedSize(label->tqsizeHint());
+ tqlayout->addWidget(label, 0, TQt::AlignRight);
+ TQBoxLayout* vtqlayout = new TQVBoxLayout(tqlayout);
for (TQStringList::Iterator it = mErrorMsgs.begin(); it != mErrorMsgs.end(); ++it)
{
label = new TQLabel(*it, topWidget);
- label->setFixedSize(label->sizeHint());
- vlayout->addWidget(label, 0, TQt::AlignLeft);
+ label->setFixedSize(label->tqsizeHint());
+ vtqlayout->addWidget(label, 0, TQt::AlignLeft);
}
- layout->addStretch();
+ tqlayout->addStretch();
}
TQGridLayout* grid = new TQGridLayout(1, 4);
@@ -511,7 +511,7 @@ void MessageWin::initView()
// Prevent accidental acknowledgement of the message if the user is typing when the window appears
mOkButton->clearFocus();
mOkButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection
- mOkButton->setFixedSize(mOkButton->sizeHint());
+ mOkButton->setFixedSize(mOkButton->tqsizeHint());
connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close()));
grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter);
TQWhatsThis::add(mOkButton, i18n("Acknowledge the alarm"));
@@ -521,7 +521,7 @@ void MessageWin::initView()
// Edit button
mEditButton = new TQPushButton(i18n("&Edit..."), topWidget);
mEditButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection
- mEditButton->setFixedSize(mEditButton->sizeHint());
+ mEditButton->setFixedSize(mEditButton->tqsizeHint());
connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter);
TQWhatsThis::add(mEditButton, i18n("Edit the alarm."));
@@ -532,7 +532,7 @@ void MessageWin::initView()
// Defer button
mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget);
mDeferButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection
- mDeferButton->setFixedSize(mDeferButton->sizeHint());
+ mDeferButton->setFixedSize(mDeferButton->tqsizeHint());
connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer()));
grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter);
TQWhatsThis::add(mDeferButton,
@@ -549,7 +549,7 @@ void MessageWin::initView()
TQPixmap pixmap = MainBarIcon("player_stop");
mSilenceButton = new TQPushButton(topWidget);
mSilenceButton->setPixmap(pixmap);
- mSilenceButton->setFixedSize(mSilenceButton->sizeHint());
+ mSilenceButton->setFixedSize(mSilenceButton->tqsizeHint());
connect(mSilenceButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopPlay()));
grid->addWidget(mSilenceButton, 0, gridIndex++, AlignHCenter);
TQToolTip::add(mSilenceButton, i18n("Stop sound"));
@@ -563,10 +563,10 @@ void MessageWin::initView()
if (mKMailSerialNumber)
{
// KMail button
- TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1("kmail"), KIcon::MainToolbar);
+ TQPixmap pixmap = iconLoader.loadIcon(TQString::tqfromLatin1("kmail"), KIcon::MainToolbar);
mKMailButton = new TQPushButton(topWidget);
mKMailButton->setPixmap(pixmap);
- mKMailButton->setFixedSize(mKMailButton->sizeHint());
+ mKMailButton->setFixedSize(mKMailButton->tqsizeHint());
connect(mKMailButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowKMailMessage()));
grid->addWidget(mKMailButton, 0, gridIndex++, AlignHCenter);
TQToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail"));
@@ -576,10 +576,10 @@ void MessageWin::initView()
mKMailButton = 0;
// KAlarm button
- TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar);
+ TQPixmap pixmap = iconLoader.loadIcon(TQString::tqfromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar);
mKAlarmButton = new TQPushButton(topWidget);
mKAlarmButton->setPixmap(pixmap);
- mKAlarmButton->setFixedSize(mKAlarmButton->sizeHint());
+ mKAlarmButton->setFixedSize(mKAlarmButton->tqsizeHint());
connect(mKAlarmButton, TQT_SIGNAL(clicked()), TQT_SLOT(displayMainWindow()));
grid->addWidget(mKAlarmButton, 0, gridIndex++, AlignHCenter);
TQString actKAlarm = i18n("Activate KAlarm");
@@ -598,7 +598,7 @@ void MessageWin::initView()
mKAlarmButton->setEnabled(false);
topLayout->activate();
- setMinimumSize(TQSize(grid->sizeHint().width() + 2*KDialog::marginHint(), sizeHint().height()));
+ setMinimumSize(TQSize(grid->tqsizeHint().width() + 2*KDialog::marginHint(), tqsizeHint().height()));
bool modal = !(getWFlags() & TQt::WX11BypassWM);
@@ -615,7 +615,7 @@ void MessageWin::initView()
void MessageWin::setRemainingTextDay()
{
TQString text;
- int days = TQDate::currentDate().daysTo(mDateTime.date());
+ int days = TQDate::tqcurrentDate().daysTo(mDateTime.date());
if (days <= 0 && !mDateTime.isDateOnly())
{
// The alarm is due today, so start refreshing every minute
@@ -642,7 +642,7 @@ void MessageWin::setRemainingTextDay()
void MessageWin::setRemainingTextMinute()
{
TQString text;
- int mins = (TQDateTime::currentDateTime().secsTo(mDateTime.dateTime()) + 59) / 60;
+ int mins = (TQDateTime::tqcurrentDateTime().secsTo(mDateTime.dateTime()) + 59) / 60;
if (mins < 60)
text = i18n("in 1 minute's time", "in %n minutes' time", (mins > 0 ? mins : 0));
else if (mins % 60 == 0)
@@ -650,7 +650,7 @@ void MessageWin::setRemainingTextMinute()
else if (mins % 60 == 1)
text = i18n("in 1 hour 1 minute's time", "in %n hours 1 minute's time", mins/60);
else
- text = i18n("in 1 hour %1 minutes' time", "in %n hours %1 minutes' time", mins/60).arg(mins%60);
+ text = i18n("in 1 hour %1 minutes' time", "in %n hours %1 minutes' time", mins/60).tqarg(mins%60);
mRemainingText->setText(text);
}
@@ -662,38 +662,38 @@ void MessageWin::saveProperties(KConfig* config)
{
if (mShown && !mErrorWindow)
{
- config->writeEntry(TQString::fromLatin1("EventID"), mEventID);
- config->writeEntry(TQString::fromLatin1("AlarmType"), mAlarmType);
- config->writeEntry(TQString::fromLatin1("Message"), mMessage);
- config->writeEntry(TQString::fromLatin1("Type"), mAction);
- config->writeEntry(TQString::fromLatin1("Font"), mFont);
- config->writeEntry(TQString::fromLatin1("BgColour"), mBgColour);
- config->writeEntry(TQString::fromLatin1("FgColour"), mFgColour);
- config->writeEntry(TQString::fromLatin1("ConfirmAck"), mConfirmAck);
+ config->writeEntry(TQString::tqfromLatin1("EventID"), mEventID);
+ config->writeEntry(TQString::tqfromLatin1("AlarmType"), mAlarmType);
+ config->writeEntry(TQString::tqfromLatin1("Message"), mMessage);
+ config->writeEntry(TQString::tqfromLatin1("Type"), mAction);
+ config->writeEntry(TQString::tqfromLatin1("Font"), mFont);
+ config->writeEntry(TQString::tqfromLatin1("BgColour"), mBgColour);
+ config->writeEntry(TQString::tqfromLatin1("FgColour"), mFgColour);
+ config->writeEntry(TQString::tqfromLatin1("ConfirmAck"), mConfirmAck);
if (mDateTime.isValid())
{
- config->writeEntry(TQString::fromLatin1("Time"), mDateTime.dateTime());
- config->writeEntry(TQString::fromLatin1("DateOnly"), mDateTime.isDateOnly());
+ config->writeEntry(TQString::tqfromLatin1("Time"), mDateTime.dateTime());
+ config->writeEntry(TQString::tqfromLatin1("DateOnly"), mDateTime.isDateOnly());
}
if (mCloseTime.isValid())
- config->writeEntry(TQString::fromLatin1("Expiry"), mCloseTime);
+ config->writeEntry(TQString::tqfromLatin1("Expiry"), mCloseTime);
#ifndef WITHOUT_ARTS
if (mAudioRepeat && mSilenceButton && mSilenceButton->isEnabled())
{
// Only need to restart sound file playing if it's being repeated
- config->writePathEntry(TQString::fromLatin1("AudioFile"), mAudioFile);
- config->writeEntry(TQString::fromLatin1("Volume"), static_cast<int>(mVolume * 100));
+ config->writePathEntry(TQString::tqfromLatin1("AudioFile"), mAudioFile);
+ config->writeEntry(TQString::tqfromLatin1("Volume"), static_cast<int>(mVolume * 100));
}
#endif
- config->writeEntry(TQString::fromLatin1("Speak"), mSpeak);
- config->writeEntry(TQString::fromLatin1("Height"), height());
- config->writeEntry(TQString::fromLatin1("DeferMins"), mDefaultDeferMinutes);
- config->writeEntry(TQString::fromLatin1("NoDefer"), mNoDefer);
- config->writeEntry(TQString::fromLatin1("NoPostAction"), mNoPostAction);
- config->writeEntry(TQString::fromLatin1("KMailSerial"), mKMailSerialNumber);
+ config->writeEntry(TQString::tqfromLatin1("Speak"), mSpeak);
+ config->writeEntry(TQString::tqfromLatin1("Height"), height());
+ config->writeEntry(TQString::tqfromLatin1("DeferMins"), mDefaultDeferMinutes);
+ config->writeEntry(TQString::tqfromLatin1("NoDefer"), mNoDefer);
+ config->writeEntry(TQString::tqfromLatin1("NoPostAction"), mNoPostAction);
+ config->writeEntry(TQString::tqfromLatin1("KMailSerial"), mKMailSerialNumber);
}
else
- config->writeEntry(TQString::fromLatin1("Invalid"), true);
+ config->writeEntry(TQString::tqfromLatin1("Invalid"), true);
}
/******************************************************************************
@@ -703,34 +703,34 @@ void MessageWin::saveProperties(KConfig* config)
*/
void MessageWin::readProperties(KConfig* config)
{
- mInvalid = config->readBoolEntry(TQString::fromLatin1("Invalid"), false);
- mEventID = config->readEntry(TQString::fromLatin1("EventID"));
- mAlarmType = KAAlarm::Type(config->readNumEntry(TQString::fromLatin1("AlarmType")));
- mMessage = config->readEntry(TQString::fromLatin1("Message"));
- mAction = KAEvent::Action(config->readNumEntry(TQString::fromLatin1("Type")));
- mFont = config->readFontEntry(TQString::fromLatin1("Font"));
- mBgColour = config->readColorEntry(TQString::fromLatin1("BgColour"));
- mFgColour = config->readColorEntry(TQString::fromLatin1("FgColour"));
- mConfirmAck = config->readBoolEntry(TQString::fromLatin1("ConfirmAck"));
+ mInvalid = config->readBoolEntry(TQString::tqfromLatin1("Invalid"), false);
+ mEventID = config->readEntry(TQString::tqfromLatin1("EventID"));
+ mAlarmType = KAAlarm::Type(config->readNumEntry(TQString::tqfromLatin1("AlarmType")));
+ mMessage = config->readEntry(TQString::tqfromLatin1("Message"));
+ mAction = KAEvent::Action(config->readNumEntry(TQString::tqfromLatin1("Type")));
+ mFont = config->readFontEntry(TQString::tqfromLatin1("Font"));
+ mBgColour = config->readColorEntry(TQString::tqfromLatin1("BgColour"));
+ mFgColour = config->readColorEntry(TQString::tqfromLatin1("FgColour"));
+ mConfirmAck = config->readBoolEntry(TQString::tqfromLatin1("ConfirmAck"));
TQDateTime invalidDateTime;
- TQDateTime dt = config->readDateTimeEntry(TQString::fromLatin1("Time"), &invalidDateTime);
- bool dateOnly = config->readBoolEntry(TQString::fromLatin1("DateOnly"));
+ TQDateTime dt = config->readDateTimeEntry(TQString::tqfromLatin1("Time"), &invalidDateTime);
+ bool dateOnly = config->readBoolEntry(TQString::tqfromLatin1("DateOnly"));
mDateTime.set(dt, dateOnly);
- mCloseTime = config->readDateTimeEntry(TQString::fromLatin1("Expiry"), &invalidDateTime);
+ mCloseTime = config->readDateTimeEntry(TQString::tqfromLatin1("Expiry"), &invalidDateTime);
#ifndef WITHOUT_ARTS
- mAudioFile = config->readPathEntry(TQString::fromLatin1("AudioFile"));
- mVolume = static_cast<float>(config->readNumEntry(TQString::fromLatin1("Volume"))) / 100;
+ mAudioFile = config->readPathEntry(TQString::tqfromLatin1("AudioFile"));
+ mVolume = static_cast<float>(config->readNumEntry(TQString::tqfromLatin1("Volume"))) / 100;
mFadeVolume = -1;
mFadeSeconds = 0;
if (!mAudioFile.isEmpty())
mAudioRepeat = true;
#endif
- mSpeak = config->readBoolEntry(TQString::fromLatin1("Speak"));
- mRestoreHeight = config->readNumEntry(TQString::fromLatin1("Height"));
- mDefaultDeferMinutes = config->readNumEntry(TQString::fromLatin1("DeferMins"));
- mNoDefer = config->readBoolEntry(TQString::fromLatin1("NoDefer"));
- mNoPostAction = config->readBoolEntry(TQString::fromLatin1("NoPostAction"));
- mKMailSerialNumber = config->readUnsignedLongNumEntry(TQString::fromLatin1("KMailSerial"));
+ mSpeak = config->readBoolEntry(TQString::tqfromLatin1("Speak"));
+ mRestoreHeight = config->readNumEntry(TQString::tqfromLatin1("Height"));
+ mDefaultDeferMinutes = config->readNumEntry(TQString::tqfromLatin1("DeferMins"));
+ mNoDefer = config->readBoolEntry(TQString::tqfromLatin1("NoDefer"));
+ mNoPostAction = config->readBoolEntry(TQString::tqfromLatin1("NoPostAction"));
+ mKMailSerialNumber = config->readUnsignedLongNumEntry(TQString::tqfromLatin1("KMailSerial"));
mShowEdit = false;
kdDebug(5950) << "MessageWin::readProperties(" << mEventID << ")" << endl;
if (mAlarmType != KAAlarm::INVALID_ALARM)
@@ -789,7 +789,7 @@ void MessageWin::playAudio()
return; // ensure zero volume doesn't play anything
#ifdef WITHOUT_ARTS
TQString play = mAudioFile;
- TQString file = TQString::fromLatin1("file:");
+ TQString file = TQString::tqfromLatin1("file:");
if (mAudioFile.startsWith(file))
play = mAudioFile.mid(file.length());
KAudioPlayer::play(TQFile::encodeName(play));
@@ -859,7 +859,7 @@ void MessageWin::slotPlayAudio()
kdError(5950) << "MessageWin::playAudio(): Open failure: " << mAudioFile << endl;
if (!haveErrorMessage(ErrMsg_AudioFile))
{
- KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mAudioFile));
+ KMessageBox::error(this, i18n("Cannot open audio file:\n%1").tqarg(mAudioFile));
clearErrorMessage(ErrMsg_AudioFile);
}
return;
@@ -882,8 +882,8 @@ void MessageWin::slotPlayAudio()
kdWarning(5950) << "Unable to set master volume (KMix: " << mKMixError << ")\n";
if (!haveErrorMessage(ErrMsg_Volume))
{
- KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").arg(mKMixError),
- TQString(), TQString::fromLatin1("KMixError"));
+ KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").tqarg(mKMixError),
+ TQString(), TQString::tqfromLatin1("KMixError"));
clearErrorMessage(ErrMsg_Volume);
}
}
@@ -1183,7 +1183,7 @@ void MessageWin::show()
if (mCloseTime.isValid())
{
// Set a timer to auto-close the window
- int delay = TQDateTime::currentDateTime().secsTo(mCloseTime);
+ int delay = TQDateTime::tqcurrentDateTime().secsTo(mCloseTime);
if (delay < 0)
delay = 0;
TQTimer::singleShot(delay * 1000, this, TQT_SLOT(close()));
@@ -1200,18 +1200,18 @@ void MessageWin::show()
* For message windows, the size if limited to fit inside the working area of
* the desktop.
*/
-TQSize MessageWin::sizeHint() const
+TQSize MessageWin::tqsizeHint() const
{
if (mAction != KAEvent::MESSAGE)
- return MainWindowBase::sizeHint();
+ return MainWindowBase::tqsizeHint();
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
TQSize frame = frameGeometry().size();
- TQSize contents = geometry().size();
+ TQSize contents = tqgeometry().size();
TQSize desktop = mWinModule->workArea().size();
TQSize maxSize(desktop.width() - (frame.width() - contents.width()),
desktop.height() - (frame.height() - contents.height()));
- return MainWindowBase::sizeHint().boundedTo(maxSize);
+ return MainWindowBase::tqsizeHint().boundedTo(maxSize);
}
/******************************************************************************
@@ -1233,7 +1233,7 @@ void MessageWin::showEvent(TQShowEvent* se)
* method is called, so for large windows the size needs to be
* set again later.
*/
- TQSize s = sizeHint(); // fit the window round the message
+ TQSize s = tqsizeHint(); // fit the window round the message
if (mAction == KAEvent::FILE && !mErrorMsgs.count())
KAlarm::readConfigWindowSize("FileMessage", s);
resize(s);
@@ -1246,10 +1246,10 @@ void MessageWin::showEvent(TQShowEvent* se)
* To achieve this, move the window so that the OK button is as far away
* from the cursor as possible. If the buttons are still too close to the
* cursor, disable the buttons for a short time.
- * N.B. This can't be done in show(), since the geometry of the window
+ * N.B. This can't be done in show(), since the tqgeometry of the window
* is not known until it is displayed. Unfortunately by moving the
* window in showEvent(), a flicker is unavoidable.
- * See the TQt documentation on window geometry for more details.
+ * See the TQt documentation on window tqgeometry for more details.
*/
// PROBLEM: The frame size is not known yet!
@@ -1267,7 +1267,7 @@ void MessageWin::showEvent(TQShowEvent* se)
desk &= dw->screenGeometry(dw->screenNumber(cursor));
TQRect frame = frameGeometry();
- TQRect rect = geometry();
+ TQRect rect = tqgeometry();
// Find the offsets from the outside of the frame to the edges of the OK button
TQRect button(mOkButton->mapToParent(TQPoint(0, 0)), mOkButton->mapToParent(mOkButton->rect().bottomRight()));
int buttonLeft = button.left() + rect.left() - frame.left();
@@ -1282,7 +1282,7 @@ void MessageWin::showEvent(TQShowEvent* se)
// Find the enclosing rectangle for the new button positions
// and check if the cursor is too near
- TQRect buttons = mOkButton->geometry().unite(mKAlarmButton->geometry());
+ TQRect buttons = mOkButton->tqgeometry().unite(mKAlarmButton->tqgeometry());
buttons.moveBy(rect.left() + x - frame.left(), rect.top() + y - frame.top());
int minDistance = proximityMultiple * mOkButton->height();
if ((abs(cursor.x() - buttons.left()) < minDistance
@@ -1328,7 +1328,7 @@ void MessageWin::moveEvent(TQMoveEvent* e)
*/
void MessageWin::setMaxSize()
{
- TQSize s = sizeHint();
+ TQSize s = tqsizeHint();
if (width() > s.width() || height() > s.height())
resize(s);
}
@@ -1465,7 +1465,7 @@ void MessageWin::slotEdit()
editDlg.getEvent(event);
// Update the displayed lists and the calendar file
- KAlarm::UpdateStatus status;
+ KAlarm::UpdatetqStatus status;
if (AlarmCalendar::activeCalendar()->event(mEventID))
{
// The old alarm hasn't expired yet, so replace it
@@ -1516,7 +1516,7 @@ void MessageWin::checkDeferralLimit()
{
if (!mDeferButton || !mDeferLimit.isValid())
return;
- int n = TQDate::currentDate().daysTo(mDeferLimit.date());
+ int n = TQDate::tqcurrentDate().daysTo(mDeferLimit.date());
if (n > 0)
return;
MidnightTimer::disconnect(TQT_TQOBJECT(this), TQT_SLOT(checkDeferralLimit()));
@@ -1540,7 +1540,7 @@ void MessageWin::checkDeferralLimit()
*/
void MessageWin::slotDefer()
{
- mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime(TQDateTime::currentDateTime().addSecs(60)),
+ mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime(TQDateTime::tqcurrentDateTime().addSecs(60)),
false, this, "deferDlg");
if (mDefaultDeferMinutes > 0)
mDeferDlg->setDeferMinutes(mDefaultDeferMinutes);