summaryrefslogtreecommitdiffstats
path: root/kalarm/messagewin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/messagewin.cpp')
-rw-r--r--kalarm/messagewin.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index 0b527ac35..c6a0916c8 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -90,11 +90,11 @@ static const int proximityMultiple = 10; // multiple of button height di
static bool wantModal();
// A text label widget which can be scrolled and copied with the mouse
-class MessageText : public QTextEdit
+class MessageText : public TQTextEdit
{
public:
- MessageText(const TQString& text, const TQString& context = TQString::null, TQWidget* parent = 0, const char* name = 0)
- : TQTextEdit(text, context, parent, name)
+ MessageText(const TQString& text, const TQString& context = TQString(), TQWidget* tqparent = 0, const char* name = 0)
+ : TQTextEdit(text, context, tqparent, name)
{
setReadOnly(true);
setWordWrap(TQTextEdit::NoWrap);
@@ -105,7 +105,7 @@ class MessageText : public QTextEdit
};
-class MWMimeSourceFactory : public QMimeSourceFactory
+class MWMimeSourceFactory : public TQMimeSourceFactory
{
public:
MWMimeSourceFactory(const TQString& absPath, KTextBrowser*);
@@ -123,7 +123,7 @@ class MWMimeSourceFactory : public QMimeSourceFactory
// Basic flags for the window
-static const Qt::WFlags WFLAGS = Qt::WStyle_StaysOnTop | Qt::WDestructiveClose;
+static const TQt::WFlags WFLAGS = TQt::WStyle_StaysOnTop | TQt::WDestructiveClose;
// Error message bit tqmasks
enum {
@@ -144,8 +144,8 @@ TQMap<TQString, unsigned> MessageWin::mErrorMessages;
* displayed.
*/
MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedule_event, bool allowDefer)
- : MainWindowBase(0, "MessageWin", WFLAGS | Qt::WGroupLeader | Qt::WStyle_ContextHelp
- | (wantModal() ? 0 : Qt::WX11BypassWM)),
+ : MainWindowBase(0, "MessageWin", WFLAGS | TQt::WGroupLeader | TQt::WStyle_ContextHelp
+ | (wantModal() ? 0 : TQt::WX11BypassWM)),
mMessage(event.cleanText()),
mFont(event.font()),
mBgColour(event.bgColour()),
@@ -155,7 +155,7 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
mAudioFile(event.audioFile()),
mVolume(event.soundVolume()),
mFadeVolume(event.fadeVolume()),
- mFadeSeconds(QMIN(event.fadeSeconds(), 86400)),
+ mFadeSeconds(TQMIN(event.fadeSeconds(), 86400)),
mDefaultDeferMinutes(event.deferDefaultMinutes()),
mAlarmType(alarm.type()),
mAction(event.action()),
@@ -202,7 +202,7 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
* Construct the message window for a specified error message.
*/
MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, const TQStringList& errmsgs)
- : MainWindowBase(0, "MessageWin", WFLAGS | Qt::WGroupLeader | Qt::WStyle_ContextHelp),
+ : MainWindowBase(0, "MessageWin", WFLAGS | TQt::WGroupLeader | TQt::WStyle_ContextHelp),
mMessage(event.cleanText()),
mDateTime(alarmDateTime),
mEventID(event.id()),
@@ -303,7 +303,7 @@ void MessageWin::initView()
{
frame = new TQFrame(topWidget);
frame->setFrameStyle(TQFrame::Box | TQFrame::Raised);
- topLayout->addWidget(frame, 0, Qt::AlignHCenter);
+ topLayout->addWidget(frame, 0, TQt::AlignHCenter);
tqlayout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading);
}
@@ -315,7 +315,7 @@ void MessageWin::initView()
if (!frame)
label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setFixedSize(label->tqsizeHint());
- tqlayout->addWidget(label, 0, Qt::AlignHCenter);
+ 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)."));
@@ -324,7 +324,7 @@ void MessageWin::initView()
label = new TQLabel(frame);
label->setText(i18n("Reminder"));
label->setFixedSize(label->tqsizeHint());
- tqlayout->addWidget(label, 0, Qt::AlignHCenter);
+ tqlayout->addWidget(label, 0, TQt::AlignHCenter);
frame->setFixedSize(frame->tqsizeHint());
}
}
@@ -341,7 +341,7 @@ void MessageWin::initView()
label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setFixedSize(label->tqsizeHint());
TQWhatsThis::add(label, i18n("The file whose contents are displayed below"));
- topLayout->addWidget(label, 0, Qt::AlignHCenter);
+ topLayout->addWidget(label, 0, TQt::AlignHCenter);
// Display contents of file
bool opened = false;
@@ -382,7 +382,7 @@ void MessageWin::initView()
{
// Message label
// Using MessageText instead of TQLabel allows scrolling and mouse copying
- MessageText* text = new MessageText(mMessage, TQString::null, topWidget);
+ MessageText* text = new MessageText(mMessage, TQString(), topWidget);
text->setFrameStyle(TQFrame::NoFrame);
text->setPaper(mBgColour);
text->setPaletteForegroundColor(mFgColour);
@@ -391,7 +391,7 @@ void MessageWin::initView()
TQSize s = text->tqsizeHint();
int h = s.height();
text->setMaximumHeight(h + text->scrollBarHeight());
- text->setMinimumHeight(QMIN(h, lineSpacing*4));
+ text->setMinimumHeight(TQMIN(h, lineSpacing*4));
text->setMaximumWidth(s.width() + text->scrollBarWidth());
TQWhatsThis::add(text, i18n("The alarm message"));
int vspace = lineSpacing/2;
@@ -402,12 +402,12 @@ void MessageWin::initView()
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
if (text->tqsizeHint().width() >= mWinModule->workArea().width()*2/3)
- topLayout->addWidget(text, 1, Qt::AlignHCenter);
+ topLayout->addWidget(text, 1, TQt::AlignHCenter);
else
{
TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout);
tqlayout->addSpacing(hspace);
- tqlayout->addWidget(text, 1, Qt::AlignHCenter);
+ tqlayout->addWidget(text, 1, TQt::AlignHCenter);
tqlayout->addSpacing(hspace);
}
if (!reminder)
@@ -436,7 +436,7 @@ void MessageWin::initView()
setRemainingTextMinute();
MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute
}
- topLayout->addWidget(mRemainingText, 0, Qt::AlignHCenter);
+ topLayout->addWidget(mRemainingText, 0, TQt::AlignHCenter);
topLayout->addSpacing(KDialog::spacingHint());
topLayout->addStretch();
}
@@ -452,22 +452,22 @@ void MessageWin::initView()
TQFrame* frame = new TQFrame(topWidget);
frame->setFrameStyle(TQFrame::Box | TQFrame::Raised);
TQWhatsThis::add(frame, i18n("The email to send"));
- topLayout->addWidget(frame, 0, Qt::AlignHCenter);
+ topLayout->addWidget(frame, 0, TQt::AlignHCenter);
TQGridLayout* grid = new TQGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
TQLabel* label = new TQLabel(i18n("Email addressee", "To:"), frame);
label->setFixedSize(label->tqsizeHint());
- grid->addWidget(label, 0, 0, Qt::AlignLeft);
+ grid->addWidget(label, 0, 0, TQt::AlignLeft);
label = new TQLabel(mEvent.emailAddresses("\n"), frame);
label->setFixedSize(label->tqsizeHint());
- grid->addWidget(label, 0, 1, Qt::AlignLeft);
+ grid->addWidget(label, 0, 1, TQt::AlignLeft);
label = new TQLabel(i18n("Email subject", "Subject:"), frame);
label->setFixedSize(label->tqsizeHint());
- grid->addWidget(label, 1, 0, Qt::AlignLeft);
+ grid->addWidget(label, 1, 0, TQt::AlignLeft);
label = new TQLabel(mEvent.emailSubject(), frame);
label->setFixedSize(label->tqsizeHint());
- grid->addWidget(label, 1, 1, Qt::AlignLeft);
+ grid->addWidget(label, 1, 1, TQt::AlignLeft);
break;
}
case KAEvent::COMMAND:
@@ -490,13 +490,13 @@ void MessageWin::initView()
TQLabel* label = new TQLabel(topWidget);
label->setPixmap(DesktopIcon("error"));
label->setFixedSize(label->tqsizeHint());
- tqlayout->addWidget(label, 0, Qt::AlignRight);
+ 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->tqsizeHint());
- vtqlayout->addWidget(label, 0, Qt::AlignLeft);
+ vtqlayout->addWidget(label, 0, TQt::AlignLeft);
}
tqlayout->addStretch();
}
@@ -600,7 +600,7 @@ void MessageWin::initView()
topLayout->activate();
setMinimumSize(TQSize(grid->tqsizeHint().width() + 2*KDialog::marginHint(), tqsizeHint().height()));
- bool modal = !(getWFlags() & Qt::WX11BypassWM);
+ bool modal = !(getWFlags() & TQt::WX11BypassWM);
unsigned long wstate = (modal ? NET::Modal : 0) | NET::Sticky | NET::KeepAbove;
WId winid = winId();
@@ -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::tqfromLatin1("KMixError"));
+ TQString(), TQString::tqfromLatin1("KMixError"));
clearErrorMessage(ErrMsg_Volume);
}
}
@@ -1058,7 +1058,7 @@ void MessageWin::stopPlay()
if (!mLocalAudioFile.isEmpty())
{
KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
- mLocalAudioFile = TQString::null;
+ mLocalAudioFile = TQString();
}
if (mSilenceButton)
mSilenceButton->setEnabled(false);
@@ -1249,7 +1249,7 @@ void MessageWin::showEvent(TQShowEvent* se)
* 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 tqgeometry for more details.
+ * See the TQt documentation on window tqgeometry for more details.
*/
// PROBLEM: The frame size is not known yet!
@@ -1437,7 +1437,7 @@ void MessageWin::slotShowKMailMessage()
TQCString replyType;
TQByteArray data, replyData;
TQDataStream arg(data, IO_WriteOnly);
- arg << (TQ_UINT32)mKMailSerialNumber << TQString::null;
+ arg << (TQ_UINT32)mKMailSerialNumber << TQString();
if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(TQ_UINT32,TQString)", data, replyType, replyData)
&& replyType == "bool")
{
@@ -1465,10 +1465,10 @@ 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 tqreplace it
+ // The old alarm hasn't expired yet, so replace it
status = KAlarm::modifyEvent(mEvent, event, 0, &editDlg);
Undo::saveEdit(mEvent, event);
}
@@ -1673,7 +1673,7 @@ MWMimeSourceFactory::MWMimeSourceFactory(const TQString& absPath, KTextBrowser*
mLast(0)
{
view->setMimeSourceFactory(this);
- TQString type = KMimeType::tqfindByPath(absPath)->name();
+ TQString type = KMimeType::findByPath(absPath)->name();
switch (KAlarm::fileType(type))
{
case KAlarm::TextPlain: