summaryrefslogtreecommitdiffstats
path: root/kalarm/messagewin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
commitf4fae92b6768541e2952173c3d4b09040f95bf7e (patch)
treed8c5d93232235cd635f3310b4d95490df181ba2d /kalarm/messagewin.cpp
parent125c0a08265b75a133644d3b55f47e37c919f45d (diff)
downloadtdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz
tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/messagewin.cpp')
-rw-r--r--kalarm/messagewin.cpp210
1 files changed, 105 insertions, 105 deletions
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index 35d769c50..0b527ac35 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -101,7 +101,7 @@ class MessageText : public QTextEdit
}
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()); }
};
@@ -125,7 +125,7 @@ class MWMimeSourceFactory : public QMimeSourceFactory
// Basic flags for the window
static const Qt::WFlags WFLAGS = Qt::WStyle_StaysOnTop | Qt::WDestructiveClose;
-// Error message bit masks
+// Error message bit tqmasks
enum {
ErrMsg_Speak = 0x01,
ErrMsg_AudioFile = 0x02,
@@ -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, Qt::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, Qt::AlignHCenter);
+ label->setFixedSize(label->tqsizeHint());
+ tqlayout->addWidget(label, 0, Qt::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, Qt::AlignHCenter);
- frame->setFixedSize(frame->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
+ tqlayout->addWidget(label, 0, Qt::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, Qt::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(QMIN(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, Qt::AlignHCenter);
else
{
- TQBoxLayout* layout = new TQHBoxLayout(topLayout);
- layout->addSpacing(hspace);
- layout->addWidget(text, 1, Qt::AlignHCenter);
- layout->addSpacing(hspace);
+ TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout);
+ tqlayout->addSpacing(hspace);
+ tqlayout->addWidget(text, 1, Qt::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(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, Qt::AlignLeft);
label = new TQLabel(mEvent.emailAddresses("\n"), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 0, 1, Qt::AlignLeft);
label = new TQLabel(i18n("Email subject", "Subject:"), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 1, 0, Qt::AlignLeft);
label = new TQLabel(mEvent.emailSubject(), frame);
- label->setFixedSize(label->sizeHint());
+ label->setFixedSize(label->tqsizeHint());
grid->addWidget(label, 1, 1, Qt::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, Qt::AlignRight);
- TQBoxLayout* vlayout = new TQVBoxLayout(layout);
+ label->setFixedSize(label->tqsizeHint());
+ tqlayout->addWidget(label, 0, Qt::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, Qt::AlignLeft);
+ label->setFixedSize(label->tqsizeHint());
+ vtqlayout->addWidget(label, 0, Qt::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(TQWidget::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(TQWidget::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(TQWidget::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() & Qt::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)
@@ -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));
@@ -883,7 +883,7 @@ void MessageWin::slotPlayAudio()
if (!haveErrorMessage(ErrMsg_Volume))
{
KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").arg(mKMixError),
- TQString::null, TQString::fromLatin1("KMixError"));
+ TQString::null, 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 Qt documentation on window geometry for more details.
+ * See the Qt 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);
}
@@ -1437,8 +1437,8 @@ void MessageWin::slotShowKMailMessage()
TQCString replyType;
TQByteArray data, replyData;
TQDataStream arg(data, IO_WriteOnly);
- arg << (Q_UINT32)mKMailSerialNumber << TQString::null;
- if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(Q_UINT32,TQString)", data, replyType, replyData)
+ arg << (TQ_UINT32)mKMailSerialNumber << TQString::null;
+ if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(TQ_UINT32,TQString)", data, replyType, replyData)
&& replyType == "bool")
{
bool result;
@@ -1468,7 +1468,7 @@ void MessageWin::slotEdit()
KAlarm::UpdateStatus status;
if (AlarmCalendar::activeCalendar()->event(mEventID))
{
- // The old alarm hasn't expired yet, so replace it
+ // The old alarm hasn't expired yet, so tqreplace it
status = KAlarm::modifyEvent(mEvent, event, 0, &editDlg);
Undo::saveEdit(mEvent, event);
}
@@ -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(this, TQT_SLOT(checkDeferralLimit()));
@@ -1540,7 +1540,7 @@ void MessageWin::checkDeferralLimit()
*/
void MessageWin::slotDefer()
{
- mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime::currentDateTime().addSecs(60),
+ mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime::tqcurrentDateTime().addSecs(60),
false, this, "deferDlg");
if (mDefaultDeferMinutes > 0)
mDeferDlg->setDeferMinutes(mDefaultDeferMinutes);
@@ -1622,7 +1622,7 @@ void MessageWin::displayMainWindow()
*/
bool MessageWin::haveErrorMessage(unsigned msg) const
{
- if (!mErrorMessages.contains(mEventID))
+ if (!mErrorMessages.tqcontains(mEventID))
mErrorMessages.insert(mEventID, 0);
bool result = (mErrorMessages[mEventID] & msg);
mErrorMessages[mEventID] |= msg;
@@ -1631,7 +1631,7 @@ bool MessageWin::haveErrorMessage(unsigned msg) const
void MessageWin::clearErrorMessage(unsigned msg) const
{
- if (mErrorMessages.contains(mEventID))
+ if (mErrorMessages.tqcontains(mEventID))
{
if (mErrorMessages[mEventID] == msg)
mErrorMessages.remove(mEventID);
@@ -1673,7 +1673,7 @@ MWMimeSourceFactory::MWMimeSourceFactory(const TQString& absPath, KTextBrowser*
mLast(0)
{
view->setMimeSourceFactory(this);
- TQString type = KMimeType::findByPath(absPath)->name();
+ TQString type = KMimeType::tqfindByPath(absPath)->name();
switch (KAlarm::fileType(type))
{
case KAlarm::TextPlain: