diff options
Diffstat (limited to 'kalarm/messagewin.cpp')
-rw-r--r-- | kalarm/messagewin.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index 293d92b0..4e8c90a8 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -34,7 +34,7 @@ #include <tqtextedit.h> #include <tqtimer.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeaction.h> #include <kstdguiitem.h> #include <tdeaboutdata.h> @@ -48,7 +48,7 @@ #include <tdemessagebox.h> #include <twin.h> #include <twinmodule.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdeio/netaccess.h> #include <knotifyclient.h> #include <kpushbutton.h> @@ -429,12 +429,12 @@ void MessageWin::initView() if (mDateTime.isDateOnly() || TQDate::currentDate().daysTo(mDateTime.date()) > 0) { setRemainingTextDay(); - MidnightTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextDay())); // update every day + MidnightTimer::connect(this, TQ_SLOT(setRemainingTextDay())); // update every day } else { setRemainingTextMinute(); - MinuteTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextMinute())); // update every minute + MinuteTimer::connect(this, TQ_SLOT(setRemainingTextMinute())); // update every minute } topLayout->addWidget(mRemainingText, 0, TQt::AlignHCenter); topLayout->addSpacing(KDialog::spacingHint()); @@ -510,9 +510,9 @@ void MessageWin::initView() mOkButton = new KPushButton(KStdGuiItem::close(), topWidget); // 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->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection mOkButton->setFixedSize(mOkButton->sizeHint()); - connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close())); + connect(mOkButton, TQ_SIGNAL(clicked()), TQ_SLOT(close())); grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter); TQWhatsThis::add(mOkButton, i18n("Acknowledge the alarm")); @@ -520,9 +520,9 @@ void MessageWin::initView() { // Edit button mEditButton = new TQPushButton(i18n("&Edit..."), topWidget); - mEditButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection + mEditButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection mEditButton->setFixedSize(mEditButton->sizeHint()); - connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit())); + connect(mEditButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotEdit())); grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter); TQWhatsThis::add(mEditButton, i18n("Edit the alarm.")); } @@ -531,9 +531,9 @@ void MessageWin::initView() { // Defer button mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget); - mDeferButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection + mDeferButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection mDeferButton->setFixedSize(mDeferButton->sizeHint()); - connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer())); + connect(mDeferButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotDefer())); grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter); TQWhatsThis::add(mDeferButton, i18n("Defer the alarm until later.\n" @@ -550,7 +550,7 @@ void MessageWin::initView() mSilenceButton = new TQPushButton(topWidget); mSilenceButton->setPixmap(pixmap); mSilenceButton->setFixedSize(mSilenceButton->sizeHint()); - connect(mSilenceButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopPlay())); + connect(mSilenceButton, TQ_SIGNAL(clicked()), TQ_SLOT(stopPlay())); grid->addWidget(mSilenceButton, 0, gridIndex++, AlignHCenter); TQToolTip::add(mSilenceButton, i18n("Stop sound")); TQWhatsThis::add(mSilenceButton, i18n("Stop playing the sound")); @@ -567,7 +567,7 @@ void MessageWin::initView() mKMailButton = new TQPushButton(topWidget); mKMailButton->setPixmap(pixmap); mKMailButton->setFixedSize(mKMailButton->sizeHint()); - connect(mKMailButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowKMailMessage())); + connect(mKMailButton, TQ_SIGNAL(clicked()), TQ_SLOT(slotShowKMailMessage())); grid->addWidget(mKMailButton, 0, gridIndex++, AlignHCenter); TQToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail")); TQWhatsThis::add(mKMailButton, i18n("Locate and highlight this email in KMail")); @@ -576,11 +576,11 @@ void MessageWin::initView() mKMailButton = 0; // KAlarm button - TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(kapp->aboutData()->appName()), TDEIcon::MainToolbar); + TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(tdeApp->aboutData()->appName()), TDEIcon::MainToolbar); mKAlarmButton = new TQPushButton(topWidget); mKAlarmButton->setPixmap(pixmap); mKAlarmButton->setFixedSize(mKAlarmButton->sizeHint()); - connect(mKAlarmButton, TQT_SIGNAL(clicked()), TQT_SLOT(displayMainWindow())); + connect(mKAlarmButton, TQ_SIGNAL(clicked()), TQ_SLOT(displayMainWindow())); grid->addWidget(mKAlarmButton, 0, gridIndex++, AlignHCenter); TQString actKAlarm = i18n("Activate KAlarm"); TQToolTip::add(mKAlarmButton, actKAlarm); @@ -619,9 +619,9 @@ void MessageWin::setRemainingTextDay() if (days <= 0 && !mDateTime.isDateOnly()) { // The alarm is due today, so start refreshing every minute - MidnightTimer::disconnect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextDay())); + MidnightTimer::disconnect(this, TQ_SLOT(setRemainingTextDay())); setRemainingTextMinute(); - MinuteTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextMinute())); // update every minute + MinuteTimer::connect(this, TQ_SLOT(setRemainingTextMinute())); // update every minute } else { @@ -796,14 +796,14 @@ void MessageWin::playAudio() #else // An audio file is specified. Because loading it may take some time, // call it on a timer to allow the window to display first. - TQTimer::singleShot(0, this, TQT_SLOT(slotPlayAudio())); + TQTimer::singleShot(0, this, TQ_SLOT(slotPlayAudio())); #endif } else if (mSpeak) { // The message is to be spoken. In case of error messges, // call it on a timer to allow the window to display first. - TQTimer::singleShot(0, this, TQT_SLOT(slotSpeak())); + TQTimer::singleShot(0, this, TQ_SLOT(slotSpeak())); } } @@ -813,12 +813,12 @@ void MessageWin::playAudio() */ void MessageWin::slotSpeak() { - DCOPClient* client = kapp->dcopClient(); + DCOPClient* client = tdeApp->dcopClient(); if (!client->isApplicationRegistered("kttsd")) { // kttsd is not running, so start it TQString error; - if (kapp->startServiceByDesktopName("kttsd", TQStringList(), &error)) + if (tdeApp->startServiceByDesktopName("kttsd", TQStringList(), &error)) { kdDebug(5950) << "MessageWin::slotSpeak(): failed to start kttsd: " << error << endl; if (!haveErrorMessage(ErrMsg_Speak)) @@ -868,7 +868,7 @@ void MessageWin::slotPlayAudio() { mFadeTimer = 0; mPlayTimer = new TQTimer(this); - connect(mPlayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAudioPlay())); + connect(mPlayTimer, TQ_SIGNAL(timeout()), TQ_SLOT(checkAudioPlay())); mArtsDispatcher = new KArtsDispatcher; mPlayedOnce = false; mAudioFileStart = TQTime::currentTime(); @@ -935,7 +935,7 @@ void MessageWin::initAudio(bool firstTime) } mSilenceButton->setEnabled(true); mPlayed = false; - connect(mPlayObject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(checkAudioPlay())); + connect(mPlayObject, TQ_SIGNAL(playObjectCreated()), TQ_SLOT(checkAudioPlay())); if (!mPlayObject->object().isNull()) checkAudioPlay(); } @@ -976,7 +976,7 @@ void MessageWin::checkAudioPlay() // Set up volume fade mAudioFileStart = now; mFadeTimer = new TQTimer(this); - connect(mFadeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFade())); + connect(mFadeTimer, TQ_SIGNAL(timeout()), TQ_SLOT(slotFade())); mFadeTimer->start(1000); // adjust volume every second } mPlayedOnce = true; @@ -1117,7 +1117,7 @@ int MessageWin::getKMixVolume() TQByteArray data, replyData; TQCString replyType; TQDataStream arg(data, IO_WriteOnly); - if (!kapp->dcopClient()->call(mKMixName, KMIX_DCOP_OBJECT, "masterVolume()", data, replyType, replyData) + if (!tdeApp->dcopClient()->call(mKMixName, KMIX_DCOP_OBJECT, "masterVolume()", data, replyType, replyData) || replyType != "int") return -1; int result; @@ -1138,7 +1138,7 @@ void MessageWin::setKMixVolume(int percent) TQByteArray data; TQDataStream arg(data, IO_WriteOnly); arg << percent; - if (!kapp->dcopClient()->send(mKMixName, KMIX_DCOP_OBJECT, "setMasterVolume(int)", data)) + if (!tdeApp->dcopClient()->send(mKMixName, KMIX_DCOP_OBJECT, "setMasterVolume(int)", data)) kdError(5950) << "MessageWin::setKMixVolume(): kmix dcop call failed\n"; } #endif @@ -1186,7 +1186,7 @@ void MessageWin::show() int delay = TQDateTime::currentDateTime().secsTo(mCloseTime); if (delay < 0) delay = 0; - TQTimer::singleShot(delay * 1000, this, TQT_SLOT(close())); + TQTimer::singleShot(delay * 1000, this, TQ_SLOT(close())); if (!delay) return; // don't show the window if auto-closing is already due } @@ -1302,7 +1302,7 @@ void MessageWin::showEvent(TQShowEvent* se) if (mAction == KAEvent::MESSAGE) { // Set the window size once the frame size is known - TQTimer::singleShot(0, this, TQT_SLOT(setMaxSize())); + TQTimer::singleShot(0, this, TQ_SLOT(setMaxSize())); } } mShown = true; @@ -1345,7 +1345,7 @@ void MessageWin::displayComplete() // Enable the window's buttons either now or after the configured delay if (mButtonDelay > 0) - TQTimer::singleShot(mButtonDelay, this, TQT_SLOT(enableButtons())); + TQTimer::singleShot(mButtonDelay, this, TQ_SLOT(enableButtons())); else enableButtons(); } @@ -1438,7 +1438,7 @@ void MessageWin::slotShowKMailMessage() TQByteArray data, replyData; TQDataStream arg(data, IO_WriteOnly); arg << (TQ_UINT32)mKMailSerialNumber << TQString(); - if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(TQ_UINT32,TQString)", data, replyType, replyData) + if (tdeApp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(TQ_UINT32,TQString)", data, replyType, replyData) && replyType == "bool") { bool result; @@ -1497,7 +1497,7 @@ void MessageWin::setDeferralLimit(const KAEvent& event) if (mDeferButton) { mDeferLimit = event.deferralLimit().dateTime(); - MidnightTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(checkDeferralLimit())); // check every day + MidnightTimer::connect(this, TQ_SLOT(checkDeferralLimit())); // check every day mDisableDeferral = false; checkDeferralLimit(); } @@ -1519,14 +1519,14 @@ void MessageWin::checkDeferralLimit() int n = TQDate::currentDate().daysTo(mDeferLimit.date()); if (n > 0) return; - MidnightTimer::disconnect(TQT_TQOBJECT(this), TQT_SLOT(checkDeferralLimit())); + MidnightTimer::disconnect(this, TQ_SLOT(checkDeferralLimit())); if (n == 0) { // The deferral limit will be reached today n = TQTime::currentTime().secsTo(mDeferLimit.time()); if (n > 0) { - TQTimer::singleShot(n * 1000, this, TQT_SLOT(checkDeferralLimit())); + TQTimer::singleShot(n * 1000, this, TQ_SLOT(checkDeferralLimit())); return; } } |