summaryrefslogtreecommitdiffstats
path: root/kalarm/kalarmapp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kalarm/kalarmapp.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/kalarmapp.cpp')
-rw-r--r--kalarm/kalarmapp.cpp336
1 files changed, 168 insertions, 168 deletions
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index b222eeec..f4daec9c 100644
--- a/kalarm/kalarmapp.cpp
+++ b/kalarm/kalarmapp.cpp
@@ -24,10 +24,10 @@
#include <ctype.h>
#include <iostream>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kcmdlineargs.h>
#include <klocale.h>
@@ -68,8 +68,8 @@
#include <netwm.h>
-static bool convWakeTime(const QCString& timeParam, QDateTime&, bool& noTime);
-static bool convInterval(const QCString& timeParam, KARecurrence::Type&, int& timeInterval, bool allowMonthYear = false);
+static bool convWakeTime(const TQCString& timeParam, TQDateTime&, bool& noTime);
+static bool convInterval(const TQCString& timeParam, KARecurrence::Type&, int& timeInterval, bool allowMonthYear = false);
/******************************************************************************
* Find the maximum number of seconds late which a late-cancel alarm is allowed
@@ -87,7 +87,7 @@ static inline int maxLateness(int lateCancel)
KAlarmApp* KAlarmApp::theInstance = 0;
int KAlarmApp::mActiveCount = 0;
int KAlarmApp::mFatalError = 0;
-QString KAlarmApp::mFatalMessage;
+TQString KAlarmApp::mFatalMessage;
/******************************************************************************
@@ -109,7 +109,7 @@ KAlarmApp::KAlarmApp()
mSpeechEnabled(false)
{
Preferences::initialise();
- Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPreferencesChanged()));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPreferencesChanged()));
KCal::CalFormat::setApplication(aboutData()->programName(), AlarmCalendar::icalProductId());
KARecurrence::setDefaultFeb29Type(Preferences::defaultFeb29Type());
@@ -118,11 +118,11 @@ KAlarmApp::KAlarmApp()
if (AlarmCalendar::initialiseCalendars())
{
- connect(AlarmCalendar::expiredCalendar(), SIGNAL(purged()), SLOT(slotExpiredPurged()));
+ connect(AlarmCalendar::expiredCalendar(), TQT_SIGNAL(purged()), TQT_SLOT(slotExpiredPurged()));
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- mNoSystemTray = config->readBoolEntry(QString::fromLatin1("NoSystemTray"), false);
+ config->setGroup(TQString::fromLatin1("General"));
+ mNoSystemTray = config->readBoolEntry(TQString::fromLatin1("NoSystemTray"), false);
mSavedNoSystemTray = mNoSystemTray;
mOldRunInSystemTray = wantRunInSystemTray();
mDisableAlarmsIfStopped = mOldRunInSystemTray && !mNoSystemTray && Preferences::disableAlarmsIfStopped();
@@ -139,7 +139,7 @@ KAlarmApp::KAlarmApp()
if (!mSpeechEnabled)
kdDebug(5950) << "KAlarmApp::KAlarmApp(): speech synthesis disabled (KTTSD not found)" << endl;
// Check if KOrganizer is installed
- QString korg = QString::fromLatin1("korganizer");
+ TQString korg = TQString::fromLatin1("korganizer");
mKOrganizerEnabled = !locate("exe", korg).isNull() || !KStandardDirs::findExe(korg).isNull();
if (!mKOrganizerEnabled)
kdDebug(5950) << "KAlarmApp::KAlarmApp(): KOrganizer options disabled (KOrganizer not found)" << endl;
@@ -204,8 +204,8 @@ bool KAlarmApp::restoreSession()
MainWindow* trayParent = 0;
for (int i = 1; KMainWindow::canBeRestored(i); ++i)
{
- QString type = KMainWindow::classNameOfToplevel(i);
- if (type == QString::fromLatin1("MainWindow"))
+ TQString type = KMainWindow::classNameOfToplevel(i);
+ if (type == TQString::fromLatin1("MainWindow"))
{
MainWindow* win = MainWindow::create(true);
win->restore(i, false);
@@ -214,7 +214,7 @@ bool KAlarmApp::restoreSession()
else
win->show();
}
- else if (type == QString::fromLatin1("MessageWin"))
+ else if (type == TQString::fromLatin1("MessageWin"))
{
MessageWin* win = new MessageWin;
win->restore(i, false);
@@ -261,7 +261,7 @@ int KAlarmApp::newInstance()
bool dontRedisplay = false;
if (!firstInstance || !isRestored())
{
- QString usage;
+ TQString usage;
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
// Use a 'do' loop which is executed only once to allow easy error exits.
@@ -329,9 +329,9 @@ int KAlarmApp::newInstance()
if (args->isSet("triggerEvent")) { function = EVENT_TRIGGER; option = "triggerEvent"; ++count; }
if (args->isSet("cancelEvent")) { function = EVENT_CANCEL; option = "cancelEvent"; ++count; }
if (!count)
- USAGE(i18n("%1 requires %2, %3 or %4").arg(QString::fromLatin1("--calendarURL")).arg(QString::fromLatin1("--handleEvent")).arg(QString::fromLatin1("--triggerEvent")).arg(QString::fromLatin1("--cancelEvent")))
+ USAGE(i18n("%1 requires %2, %3 or %4").arg(TQString::fromLatin1("--calendarURL")).arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent")))
if (count > 1)
- USAGE(i18n("%1, %2, %3 mutually exclusive").arg(QString::fromLatin1("--handleEvent")).arg(QString::fromLatin1("--triggerEvent")).arg(QString::fromLatin1("--cancelEvent")));
+ USAGE(i18n("%1, %2, %3 mutually exclusive").arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent")));
if (!initCheck(true)) // open the calendar, don't register with daemon yet
{
exitCode = 1;
@@ -339,13 +339,13 @@ int KAlarmApp::newInstance()
}
if (args->isSet("calendarURL"))
{
- QString calendarUrl = args->getOption("calendarURL");
+ TQString calendarUrl = args->getOption("calendarURL");
if (KURL(calendarUrl).url() != AlarmCalendar::activeCalendar()->urlString())
- USAGE(i18n("%1: wrong calendar file").arg(QString::fromLatin1("--calendarURL")))
+ USAGE(i18n("%1: wrong calendar file").arg(TQString::fromLatin1("--calendarURL")))
}
- QString eventID = args->getOption(option);
+ TQString eventID = args->getOption(option);
args->clear(); // free up memory
- if (eventID.startsWith(QString::fromLatin1("ad:")))
+ if (eventID.startsWith(TQString::fromLatin1("ad:")))
{
// It's a notification from the alarm deamon
eventID = eventID.mid(3);
@@ -361,7 +361,7 @@ int KAlarmApp::newInstance()
else
if (args->isSet("edit"))
{
- QString eventID = args->getOption("edit");
+ TQString eventID = args->getOption("edit");
if (!initCheck())
{
exitCode = 1;
@@ -369,7 +369,7 @@ int KAlarmApp::newInstance()
}
if (!KAlarm::edit(eventID))
{
- USAGE(i18n("%1: Event %2 not found, or not editable").arg(QString::fromLatin1("--edit")).arg(eventID))
+ USAGE(i18n("%1: Event %2 not found, or not editable").arg(TQString::fromLatin1("--edit")).arg(eventID))
exitCode = 1;
break;
}
@@ -377,7 +377,7 @@ int KAlarmApp::newInstance()
else
if (args->isSet("edit-new") || args->isSet("edit-new-preset"))
{
- QString templ;
+ TQString templ;
if (args->isSet("edit-new-preset"))
templ = args->getOption("edit-new-preset");
if (!initCheck())
@@ -392,20 +392,20 @@ int KAlarmApp::newInstance()
{
// Display a message or file, execute a command, or send an email
KAEvent::Action action = KAEvent::MESSAGE;
- QCString alMessage;
+ TQCString alMessage;
uint alFromID = 0;
EmailAddressList alAddresses;
- QStringList alAttachments;
- QCString alSubject;
+ TQStringList alAttachments;
+ TQCString alSubject;
if (args->isSet("file"))
{
kdDebug(5950)<<"KAlarmApp::newInstance(): file\n";
if (args->isSet("exec"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--exec")).arg(QString::fromLatin1("--file")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--exec")).arg(TQString::fromLatin1("--file")))
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--mail")).arg(QString::fromLatin1("--file")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--file")))
if (args->count())
- USAGE(i18n("message incompatible with %1").arg(QString::fromLatin1("--file")))
+ USAGE(i18n("message incompatible with %1").arg(TQString::fromLatin1("--file")))
alMessage = args->getOption("file");
action = KAEvent::FILE;
}
@@ -413,7 +413,7 @@ int KAlarmApp::newInstance()
{
kdDebug(5950)<<"KAlarmApp::newInstance(): exec\n";
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--mail")).arg(QString::fromLatin1("--exec")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--exec")))
alMessage = args->getOption("exec");
int n = args->count();
for (int i = 0; i < n; ++i)
@@ -433,14 +433,14 @@ int KAlarmApp::newInstance()
QCStringList params = args->getOptionList("mail");
for (QCStringList::Iterator i = params.begin(); i != params.end(); ++i)
{
- QString addr = QString::fromLocal8Bit(*i);
+ TQString addr = TQString::fromLocal8Bit(*i);
if (!KAMail::checkAddress(addr))
- USAGE(i18n("%1: invalid email address").arg(QString::fromLatin1("--mail")))
- alAddresses += KCal::Person(QString::null, addr);
+ USAGE(i18n("%1: invalid email address").arg(TQString::fromLatin1("--mail")))
+ alAddresses += KCal::Person(TQString::null, addr);
}
params = args->getOptionList("attach");
for (QCStringList::Iterator i = params.begin(); i != params.end(); ++i)
- alAttachments += QString::fromLocal8Bit(*i);
+ alAttachments += TQString::fromLocal8Bit(*i);
alMessage = args->arg(0);
action = KAEvent::EMAIL;
}
@@ -453,87 +453,87 @@ int KAlarmApp::newInstance()
if (action != KAEvent::EMAIL)
{
if (args->isSet("subject"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--subject")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--subject")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("from-id"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--from-id")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--from-id")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("attach"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--attach")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--attach")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("bcc"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--bcc")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--bcc")).arg(TQString::fromLatin1("--mail")))
}
bool alarmNoTime = false;
- QDateTime alarmTime, endTime;
- QColor bgColour = Preferences::defaultBgColour();
- QColor fgColour = Preferences::defaultFgColour();
+ TQDateTime alarmTime, endTime;
+ TQColor bgColour = Preferences::defaultBgColour();
+ TQColor fgColour = Preferences::defaultFgColour();
KARecurrence recurrence;
int repeatCount = 0;
int repeatInterval = 0;
if (args->isSet("color"))
{
// Background colour is specified
- QCString colourText = args->getOption("color");
+ TQCString colourText = args->getOption("color");
if (static_cast<const char*>(colourText)[0] == '0'
&& tolower(static_cast<const char*>(colourText)[1]) == 'x')
colourText.replace(0, 2, "#");
bgColour.setNamedColor(colourText);
if (!bgColour.isValid())
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--color")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--color")))
}
if (args->isSet("colorfg"))
{
// Foreground colour is specified
- QCString colourText = args->getOption("colorfg");
+ TQCString colourText = args->getOption("colorfg");
if (static_cast<const char*>(colourText)[0] == '0'
&& tolower(static_cast<const char*>(colourText)[1]) == 'x')
colourText.replace(0, 2, "#");
fgColour.setNamedColor(colourText);
if (!fgColour.isValid())
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--colorfg")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--colorfg")))
}
if (args->isSet("time"))
{
- QCString dateTime = args->getOption("time");
+ TQCString dateTime = args->getOption("time");
if (!convWakeTime(dateTime, alarmTime, alarmNoTime))
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--time")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--time")))
}
else
- alarmTime = QDateTime::currentDateTime();
+ alarmTime = TQDateTime::currentDateTime();
bool haveRecurrence = args->isSet("recurrence");
if (haveRecurrence)
{
if (args->isSet("login"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--login")).arg(QString::fromLatin1("--recurrence")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--recurrence")))
if (args->isSet("until"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--until")).arg(QString::fromLatin1("--recurrence")))
- QCString rule = args->getOption("recurrence");
- recurrence.set(QString::fromLocal8Bit(static_cast<const char*>(rule)));
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--recurrence")))
+ TQCString rule = args->getOption("recurrence");
+ recurrence.set(TQString::fromLocal8Bit(static_cast<const char*>(rule)));
}
if (args->isSet("interval"))
{
// Repeat count is specified
int count;
if (args->isSet("login"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--login")).arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--interval")))
bool ok;
if (args->isSet("repeat"))
{
count = args->getOption("repeat").toInt(&ok);
if (!ok || !count || count < -1 || (count < 0 && haveRecurrence))
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--repeat")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--repeat")))
}
else if (haveRecurrence)
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--interval")).arg(QString::fromLatin1("--repeat")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat")))
else if (args->isSet("until"))
{
count = 0;
- QCString dateTime = args->getOption("until");
+ TQCString dateTime = args->getOption("until");
if (!convWakeTime(dateTime, endTime, alarmNoTime))
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--until")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--until")))
if (endTime < alarmTime)
- USAGE(i18n("%1 earlier than %2").arg(QString::fromLatin1("--until")).arg(QString::fromLatin1("--time")))
+ USAGE(i18n("%1 earlier than %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--time")))
}
else
count = -1;
@@ -543,16 +543,16 @@ int KAlarmApp::newInstance()
KARecurrence::Type recurType;
if (!convInterval(args->getOption("interval"), recurType, interval, !haveRecurrence)
|| interval < 0)
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--interval")))
if (alarmNoTime && recurType == KARecurrence::MINUTELY)
- USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(TQString::fromLatin1("--interval")))
if (haveRecurrence)
{
// There is a also a recurrence specified, so set up a sub-repetition
int longestInterval = recurrence.longestInterval();
if (count * interval > longestInterval)
- USAGE(i18n("Invalid %1 and %2 parameters: repetition is longer than %3 interval").arg(QString::fromLatin1("--interval")).arg(QString::fromLatin1("--repeat")).arg(QString::fromLatin1("--recurrence")));
+ USAGE(i18n("Invalid %1 and %2 parameters: repetition is longer than %3 interval").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--recurrence")));
repeatCount = count;
repeatInterval = interval;
}
@@ -566,12 +566,12 @@ int KAlarmApp::newInstance()
else
{
if (args->isSet("repeat"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--repeat")).arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--interval")))
if (args->isSet("until"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--until")).arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--interval")))
}
- QCString audioFile;
+ TQCString audioFile;
float audioVolume = -1;
#ifdef WITHOUT_ARTS
bool audioRepeat = false;
@@ -582,11 +582,11 @@ int KAlarmApp::newInstance()
{
// Play a sound with the alarm
if (audioRepeat && args->isSet("play"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--play")).arg(QString::fromLatin1("--play-repeat")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat")))
if (args->isSet("beep"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--beep")).arg(QString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
if (args->isSet("speak"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--speak")).arg(QString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--speak")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
audioFile = args->getOption(audioRepeat ? "play-repeat" : "play");
#ifndef WITHOUT_ARTS
if (args->isSet("volume"))
@@ -594,21 +594,21 @@ int KAlarmApp::newInstance()
bool ok;
int volumepc = args->getOption("volume").toInt(&ok);
if (!ok || volumepc < 0 || volumepc > 100)
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--volume")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--volume")))
audioVolume = static_cast<float>(volumepc) / 100;
}
#endif
}
#ifndef WITHOUT_ARTS
else if (args->isSet("volume"))
- USAGE(i18n("%1 requires %2 or %3").arg(QString::fromLatin1("--volume")).arg(QString::fromLatin1("--play")).arg(QString::fromLatin1("--play-repeat")))
+ USAGE(i18n("%1 requires %2 or %3").arg(TQString::fromLatin1("--volume")).arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat")))
#endif
if (args->isSet("speak"))
{
if (args->isSet("beep"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--beep")).arg(QString::fromLatin1("--speak")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1("--speak")))
if (!mSpeechEnabled)
- USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(QString::fromLatin1("--speak")))
+ USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(TQString::fromLatin1("--speak")))
}
int reminderMinutes = 0;
bool onceOnly = args->isSet("reminder-once");
@@ -616,14 +616,14 @@ int KAlarmApp::newInstance()
{
// Issue a reminder alarm in advance of the main alarm
if (onceOnly && args->isSet("reminder"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--reminder")).arg(QString::fromLatin1("--reminder-once")))
- QString opt = onceOnly ? QString::fromLatin1("--reminder-once") : QString::fromLatin1("--reminder");
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--reminder")).arg(TQString::fromLatin1("--reminder-once")))
+ TQString opt = onceOnly ? TQString::fromLatin1("--reminder-once") : TQString::fromLatin1("--reminder");
if (args->isSet("exec"))
- USAGE(i18n("%1 incompatible with %2").arg(opt).arg(QString::fromLatin1("--exec")))
+ USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--exec")))
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").arg(opt).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--mail")))
KARecurrence::Type recurType;
- QString optval = args->getOption(onceOnly ? "reminder-once" : "reminder");
+ TQString optval = args->getOption(onceOnly ? "reminder-once" : "reminder");
if (!convInterval(args->getOption(onceOnly ? "reminder-once" : "reminder"), recurType, reminderMinutes))
USAGE(i18n("Invalid %1 parameter").arg(opt))
if (recurType == KARecurrence::MINUTELY && alarmNoTime)
@@ -636,10 +636,10 @@ int KAlarmApp::newInstance()
KARecurrence::Type recurType;
bool ok = convInterval(args->getOption("late-cancel"), recurType, lateCancel);
if (!ok || lateCancel <= 0)
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("late-cancel")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("late-cancel")))
}
else if (args->isSet("auto-close"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--auto-close")).arg(QString::fromLatin1("--late-cancel")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--auto-close")).arg(TQString::fromLatin1("--late-cancel")))
int flags = KAEvent::DEFAULT_FONT;
if (args->isSet("ack-confirm"))
@@ -670,7 +670,7 @@ int KAlarmApp::newInstance()
exitCode = 1;
break;
}
- if (!scheduleEvent(action, alMessage, alarmTime, lateCancel, flags, bgColour, fgColour, QFont(), audioFile,
+ if (!scheduleEvent(action, alMessage, alarmTime, lateCancel, flags, bgColour, fgColour, TQFont(), audioFile,
audioVolume, reminderMinutes, recurrence, repeatInterval, repeatCount,
alFromID, alAddresses, alSubject, alAttachments))
{
@@ -683,52 +683,52 @@ int KAlarmApp::newInstance()
// No arguments - run interactively & display the main window
kdDebug(5950)<<"KAlarmApp::newInstance(): interactive\n";
if (args->isSet("ack-confirm"))
- usage += QString::fromLatin1("--ack-confirm ");
+ usage += TQString::fromLatin1("--ack-confirm ");
if (args->isSet("attach"))
- usage += QString::fromLatin1("--attach ");
+ usage += TQString::fromLatin1("--attach ");
if (args->isSet("auto-close"))
- usage += QString::fromLatin1("--auto-close ");
+ usage += TQString::fromLatin1("--auto-close ");
if (args->isSet("bcc"))
- usage += QString::fromLatin1("--bcc ");
+ usage += TQString::fromLatin1("--bcc ");
if (args->isSet("beep"))
- usage += QString::fromLatin1("--beep ");
+ usage += TQString::fromLatin1("--beep ");
if (args->isSet("color"))
- usage += QString::fromLatin1("--color ");
+ usage += TQString::fromLatin1("--color ");
if (args->isSet("colorfg"))
- usage += QString::fromLatin1("--colorfg ");
+ usage += TQString::fromLatin1("--colorfg ");
if (args->isSet("disable"))
- usage += QString::fromLatin1("--disable ");
+ usage += TQString::fromLatin1("--disable ");
if (args->isSet("from-id"))
- usage += QString::fromLatin1("--from-id ");
+ usage += TQString::fromLatin1("--from-id ");
if (args->isSet("korganizer"))
- usage += QString::fromLatin1("--korganizer ");
+ usage += TQString::fromLatin1("--korganizer ");
if (args->isSet("late-cancel"))
- usage += QString::fromLatin1("--late-cancel ");
+ usage += TQString::fromLatin1("--late-cancel ");
if (args->isSet("login"))
- usage += QString::fromLatin1("--login ");
+ usage += TQString::fromLatin1("--login ");
if (args->isSet("play"))
- usage += QString::fromLatin1("--play ");
+ usage += TQString::fromLatin1("--play ");
#ifndef WITHOUT_ARTS
if (args->isSet("play-repeat"))
- usage += QString::fromLatin1("--play-repeat ");
+ usage += TQString::fromLatin1("--play-repeat ");
#endif
if (args->isSet("reminder"))
- usage += QString::fromLatin1("--reminder ");
+ usage += TQString::fromLatin1("--reminder ");
if (args->isSet("reminder-once"))
- usage += QString::fromLatin1("--reminder-once ");
+ usage += TQString::fromLatin1("--reminder-once ");
if (args->isSet("speak"))
- usage += QString::fromLatin1("--speak ");
+ usage += TQString::fromLatin1("--speak ");
if (args->isSet("subject"))
- usage += QString::fromLatin1("--subject ");
+ usage += TQString::fromLatin1("--subject ");
if (args->isSet("time"))
- usage += QString::fromLatin1("--time ");
+ usage += TQString::fromLatin1("--time ");
#ifndef WITHOUT_ARTS
if (args->isSet("volume"))
- usage += QString::fromLatin1("--volume ");
+ usage += TQString::fromLatin1("--volume ");
#endif
if (!usage.isEmpty())
{
- usage += i18n(": option(s) only valid with a message/%1/%2").arg(QString::fromLatin1("--file")).arg(QString::fromLatin1("--exec"));
+ usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::fromLatin1("--file")).arg(TQString::fromLatin1("--exec"));
break;
}
@@ -816,13 +816,13 @@ void KAlarmApp::quitIf(int exitCode, bool force)
* Closes the system tray window and all main windows, but does not exit the
* program if other windows are still open.
*/
-void KAlarmApp::doQuit(QWidget* parent)
+void KAlarmApp::doQuit(TQWidget* parent)
{
kdDebug(5950) << "KAlarmApp::doQuit()\n";
if (mDisableAlarmsIfStopped
&& MessageBox::warningContinueCancel(parent, KMessageBox::Cancel,
i18n("Quitting will disable alarms\n(once any alarm message windows are closed)."),
- QString::null, KStdGuiItem::quit(), Preferences::QUIT_WARN
+ TQString::null, KStdGuiItem::quit(), Preferences::QUIT_WARN
) != KMessageBox::Yes)
return;
quitIf(0, true);
@@ -842,14 +842,14 @@ void KAlarmApp::commitData(QSessionManager& sm)
* Display an error message for a fatal error. Prevent further actions since
* the program state is unsafe.
*/
-void KAlarmApp::displayFatalError(const QString& message)
+void KAlarmApp::displayFatalError(const TQString& message)
{
if (!mFatalError)
{
mFatalError = 1;
mFatalMessage = message;
if (theInstance)
- QTimer::singleShot(0, theInstance, SLOT(quitFatal()));
+ TQTimer::singleShot(0, theInstance, TQT_SLOT(quitFatal()));
}
}
@@ -873,7 +873,7 @@ void KAlarmApp::quitFatal()
theInstance->quitIf(1, true);
break;
}
- QTimer::singleShot(1000, this, SLOT(quitFatal()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(quitFatal()));
}
/******************************************************************************
@@ -989,7 +989,7 @@ bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
creating = false;
}
mTrayWindow = new TrayWindow(parent ? parent : MainWindow::firstWindow());
- connect(mTrayWindow, SIGNAL(deleted()), SIGNAL(trayIconToggled()));
+ connect(mTrayWindow, TQT_SIGNAL(deleted()), TQT_SIGNAL(trayIconToggled()));
mTrayWindow->show();
emit trayIconToggled();
@@ -998,7 +998,7 @@ bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
mCheckingSystemTray = true;
mSavedNoSystemTray = mNoSystemTray;
mNoSystemTray = false;
- QTimer::singleShot(0, this, SLOT(slotSystemTrayTimer()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSystemTrayTimer()));
}
}
else if (mTrayWindow)
@@ -1043,8 +1043,8 @@ bool KAlarmApp::checkSystemTray()
// tray and alarms are disabled when KAlarm is not running, registering with
// NO_START_NOTIFY could result in alarms never being seen.
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- config->writeEntry(QString::fromLatin1("NoSystemTray"), mNoSystemTray);
+ config->setGroup(TQString::fromLatin1("General"));
+ config->writeEntry(TQString::fromLatin1("NoSystemTray"), mNoSystemTray);
config->sync();
// Update other settings and reregister with the alarm daemon
@@ -1132,7 +1132,7 @@ void KAlarmApp::slotPreferencesChanged()
void KAlarmApp::changeStartOfDay()
{
Daemon::notifyTimeChanged(); // tell the alarm daemon the new time
- QTime sod = Preferences::startOfDay();
+ TQTime sod = Preferences::startOfDay();
DateTime::setStartOfDay(sod);
AlarmCalendar* cal = AlarmCalendar::activeCalendar();
if (KAEvent::adjustStartOfDay(cal->events()))
@@ -1164,22 +1164,22 @@ bool KAlarmApp::wantRunInSystemTray() const
* to command line options.
* Reply = true unless there was a parameter error or an error opening calendar file.
*/
-bool KAlarmApp::scheduleEvent(KAEvent::Action action, const QString& text, const QDateTime& dateTime,
- int lateCancel, int flags, const QColor& bg, const QColor& fg, const QFont& font,
- const QString& audioFile, float audioVolume, int reminderMinutes,
+bool KAlarmApp::scheduleEvent(KAEvent::Action action, const TQString& text, const TQDateTime& dateTime,
+ int lateCancel, int flags, const TQColor& bg, const TQColor& fg, const TQFont& font,
+ const TQString& audioFile, float audioVolume, int reminderMinutes,
const KARecurrence& recurrence, int repeatInterval, int repeatCount,
uint mailFromID, const EmailAddressList& mailAddresses,
- const QString& mailSubject, const QStringList& mailAttachments)
+ const TQString& mailSubject, const TQStringList& mailAttachments)
{
kdDebug(5950) << "KAlarmApp::scheduleEvent(): " << text << endl;
if (!dateTime.isValid())
return false;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (lateCancel && dateTime < now.addSecs(-maxLateness(lateCancel)))
return true; // alarm time was already expired too long ago
- QDateTime alarmTime = dateTime;
+ TQDateTime alarmTime = dateTime;
// Round down to the nearest minute to avoid scheduling being messed up
- alarmTime.setTime(QTime(alarmTime.time().hour(), alarmTime.time().minute(), 0));
+ alarmTime.setTime(TQTime(alarmTime.time().hour(), alarmTime.time().minute(), 0));
KAEvent event(alarmTime, text, bg, fg, font, action, lateCancel, flags);
if (reminderMinutes)
@@ -1212,7 +1212,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const QString& text, const
// Queue the alarm for insertion into the calendar file
mDcopQueue.append(DcopQEntry(event));
if (mInitialised)
- QTimer::singleShot(0, this, SLOT(processQueue()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processQueue()));
return true;
}
@@ -1222,7 +1222,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const QString& text, const
* Optionally display the event. Delete the event from the calendar file and
* from every main window instance.
*/
-bool KAlarmApp::handleEvent(const QString& urlString, const QString& eventID, EventFunc function)
+bool KAlarmApp::handleEvent(const TQString& urlString, const TQString& eventID, EventFunc function)
{
kdDebug(5950) << "KAlarmApp::handleEvent(DCOP): " << eventID << endl;
AlarmCalendar* cal = AlarmCalendar::activeCalendar(); // this can be called before calendars have been initialised
@@ -1234,7 +1234,7 @@ bool KAlarmApp::handleEvent(const QString& urlString, const QString& eventID, Ev
}
mDcopQueue.append(DcopQEntry(function, eventID));
if (mInitialised)
- QTimer::singleShot(0, this, SLOT(processQueue()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processQueue()));
return true;
}
@@ -1246,7 +1246,7 @@ bool KAlarmApp::handleEvent(const QString& urlString, const QString& eventID, Ev
* If the event is deleted, it is removed from the calendar file and from every
* main window instance.
*/
-bool KAlarmApp::handleEvent(const QString& eventID, EventFunc function)
+bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
{
kdDebug(5950) << "KAlarmApp::handleEvent(): " << eventID << ", " << (function==EVENT_TRIGGER?"TRIGGER":function==EVENT_CANCEL?"CANCEL":function==EVENT_HANDLE?"HANDLE":"?") << endl;
KCal::Event* kcalEvent = AlarmCalendar::activeCalendar()->event(eventID);
@@ -1266,7 +1266,7 @@ bool KAlarmApp::handleEvent(const QString& eventID, EventFunc function)
case EVENT_TRIGGER: // handle it if it's due, else execute it regardless
case EVENT_HANDLE: // handle it if it's due
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
bool updateCalAndDisplay = false;
bool alarmToExecuteValid = false;
KAAlarm alarmToExecute;
@@ -1310,7 +1310,7 @@ bool KAlarmApp::handleEvent(const QString& eventID, EventFunc function)
{
// The alarm has no time, so cancel it if its date is too far past
int maxlate = alarm.lateCancel() / 1440; // maximum lateness in days
- QDateTime limit(alarm.date().addDays(maxlate + 1), Preferences::startOfDay());
+ TQDateTime limit(alarm.date().addDays(maxlate + 1), Preferences::startOfDay());
if (now >= limit)
{
// It's too late to display the scheduled occurrence.
@@ -1472,7 +1472,7 @@ void KAlarmApp::alarmCompleted(const KAEvent& event)
{
if (!event.postAction().isEmpty() && ShellProcess::authorised())
{
- QString command = event.postAction();
+ TQString command = event.postAction();
kdDebug(5950) << "KAlarmApp::alarmCompleted(" << event.id() << "): " << command << endl;
doShellCommand(command, event, 0, ProcData::POST_ACTION);
}
@@ -1502,7 +1502,7 @@ void KAlarmApp::rescheduleAlarm(KAEvent& event, const KAAlarm& alarm, bool updat
else
{
// Reschedule the alarm for its next recurrence.
- KAEvent::OccurType type = event.setNextOccurrence(QDateTime::currentDateTime());
+ KAEvent::OccurType type = event.setNextOccurrence(TQDateTime::currentDateTime());
switch (type)
{
case KAEvent::NO_OCCURRENCE:
@@ -1554,7 +1554,7 @@ void KAlarmApp::cancelAlarm(KAEvent& event, KAAlarm::Type alarmType, bool update
if (alarmType == KAAlarm::MAIN_ALARM && !event.displaying() && event.toBeArchived())
{
// The event is being deleted. Save it in the expired calendar file first.
- QString id = event.id(); // save event ID since KAlarm::addExpiredEvent() changes it
+ TQString id = event.id(); // save event ID since KAlarm::addExpiredEvent() changes it
KAlarm::addExpiredEvent(event);
event.setEventID(id); // restore event ID
}
@@ -1601,7 +1601,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
// (other than a reminder window) currently displayed for this alarm,
// and we need to execute a command before displaying the new window.
// Check whether the command is already being executed for this alarm.
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->event->id() == event.id() && (pd->flags & ProcData::PRE_ACTION))
@@ -1611,7 +1611,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
}
}
- QString command = event.preAction();
+ TQString command = event.preAction();
kdDebug(5950) << "KAlarmApp::execAlarm(): pre-DISPLAY command: " << command << endl;
int flags = (reschedule ? ProcData::RESCHEDULE : 0) | (allowDefer ? ProcData::ALLOW_DEFER : 0);
if (doShellCommand(command, event, &alarm, (flags | ProcData::PRE_ACTION)))
@@ -1645,12 +1645,12 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
case KAAlarm::COMMAND:
{
int flags = event.commandXterm() ? ProcData::EXEC_IN_XTERM : 0;
- QString command = event.cleanText();
+ TQString command = event.cleanText();
if (event.commandScript())
{
// Store the command script in a temporary file for execution
kdDebug(5950) << "KAlarmApp::execAlarm(): COMMAND: (script)" << endl;
- QString tmpfile = createTempScriptFile(command, false, event, alarm);
+ TQString tmpfile = createTempScriptFile(command, false, event, alarm);
if (tmpfile.isEmpty())
result = 0;
else
@@ -1668,7 +1668,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
case KAAlarm::EMAIL:
{
kdDebug(5950) << "KAlarmApp::execAlarm(): EMAIL to: " << event.emailAddresses(", ") << endl;
- QStringList errmsgs;
+ TQStringList errmsgs;
if (!KAMail::send(event, errmsgs, (reschedule || allowDefer)))
result = 0;
if (!errmsgs.isEmpty())
@@ -1696,12 +1696,12 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
* execAlarm() once the command completes, the execAlarm() parameters being
* derived from the remaining bits in 'flags'.
*/
-ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& event, const KAAlarm* alarm, int flags)
+ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& event, const KAAlarm* alarm, int flags)
{
kdDebug(5950) << "KAlarmApp::doShellCommand(" << command << ", " << event.id() << ")" << endl;
KProcess::Communication comms = KProcess::NoCommunication;
- QString cmd;
- QString tmpXtermFile;
+ TQString cmd;
+ TQString tmpXtermFile;
if (flags & ProcData::EXEC_IN_XTERM)
{
// Execute the command in a terminal window.
@@ -1724,7 +1724,7 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
{
// Execute the command from a temporary script file,
// with a sleep after the command is executed
- tmpXtermFile = createTempScriptFile(command + QString::fromLatin1("\nsleep 86400\n"), true, event, *alarm);
+ tmpXtermFile = createTempScriptFile(command + TQString::fromLatin1("\nsleep 86400\n"), true, event, *alarm);
if (tmpXtermFile.isEmpty())
return 0;
cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command
@@ -1733,14 +1733,14 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
{
// Append a sleep to the command.
// Quote the command in case it contains characters such as [>|;].
- QString exec = KShellProcess::quote(command + QString::fromLatin1("; sleep 86400"));
+ TQString exec = KShellProcess::quote(command + TQString::fromLatin1("; sleep 86400"));
cmd.replace("%w", exec); // %w indicates where to insert the command string
}
else
{
// Set the command to execute.
// Put it in quotes in case it contains characters such as [>|;].
- QString exec = KShellProcess::quote(command);
+ TQString exec = KShellProcess::quote(command);
if (cmd.find("%c") >= 0)
cmd.replace("%c", exec); // %c indicates where to insert the command string
else
@@ -1753,21 +1753,21 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
comms = KProcess::AllOutput;
}
ShellProcess* proc = new ShellProcess(cmd);
- connect(proc, SIGNAL(shellExited(ShellProcess*)), SLOT(slotCommandExited(ShellProcess*)));
- QGuardedPtr<ShellProcess> logproc = 0;
+ connect(proc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotCommandExited(ShellProcess*)));
+ TQGuardedPtr<ShellProcess> logproc = 0;
if (comms == KProcess::AllOutput && !event.logFile().isEmpty())
{
// Output is to be appended to a log file.
// Set up a logging process to write the command's output to.
- connect(proc, SIGNAL(receivedStdout(KProcess*,char*,int)), SLOT(slotCommandOutput(KProcess*,char*,int)));
- connect(proc, SIGNAL(receivedStderr(KProcess*,char*,int)), SLOT(slotCommandOutput(KProcess*,char*,int)));
- logproc = new ShellProcess(QString::fromLatin1("cat >>%1").arg(event.logFile()));
- connect(logproc, SIGNAL(shellExited(ShellProcess*)), SLOT(slotLogProcExited(ShellProcess*)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotCommandOutput(KProcess*,char*,int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotCommandOutput(KProcess*,char*,int)));
+ logproc = new ShellProcess(TQString::fromLatin1("cat >>%1").arg(event.logFile()));
+ connect(logproc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotLogProcExited(ShellProcess*)));
logproc->start(KProcess::Stdin);
- QCString heading;
+ TQCString heading;
if (alarm && alarm->dateTime().isValid())
{
- QString dateTime = alarm->dateTime().isDateOnly()
+ TQString dateTime = alarm->dateTime().isDateOnly()
? KGlobal::locale()->formatDate(alarm->dateTime().date(), true)
: KGlobal::locale()->formatDateTime(alarm->dateTime().dateTime());
heading.sprintf("\n******* KAlarm %s *******\n", dateTime.latin1());
@@ -1797,11 +1797,11 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
* Create a temporary script file containing the specified command string.
* Reply = path of temporary file, or null string if error.
*/
-QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell, const KAEvent& event, const KAAlarm& alarm)
+TQString KAlarmApp::createTempScriptFile(const TQString& command, bool insertShell, const KAEvent& event, const KAAlarm& alarm)
{
- KTempFile tmpFile(QString::null, QString::null, 0700);
+ KTempFile tmpFile(TQString::null, TQString::null, 0700);
tmpFile.setAutoDelete(false); // don't delete file when it is destructed
- QTextStream* stream = tmpFile.textStream();
+ TQTextStream* stream = tmpFile.textStream();
if (!stream)
kdError(5950) << "KAlarmApp::createTempScript(): Unable to create a temporary script file" << endl;
else
@@ -1816,9 +1816,9 @@ QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell
return tmpFile.name();
}
- QStringList errmsgs(i18n("Error creating temporary script file"));
+ TQStringList errmsgs(i18n("Error creating temporary script file"));
(new MessageWin(event, alarm.dateTime(), errmsgs))->show();
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -1826,9 +1826,9 @@ QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell
*/
void KAlarmApp::slotCommandOutput(KProcess* proc, char* buffer, int bufflen)
{
-//kdDebug(5950) << "KAlarmApp::slotCommandOutput(): '" << QCString(buffer, bufflen+1) << "'\n";
+//kdDebug(5950) << "KAlarmApp::slotCommandOutput(): '" << TQCString(buffer, bufflen+1) << "'\n";
// Find this command in the command list
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->process == proc && pd->logProcess)
@@ -1856,7 +1856,7 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
{
kdDebug(5950) << "KAlarmApp::slotCommandExited()\n";
// Find this command in the command list
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->process == proc)
@@ -1868,12 +1868,12 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
// Check its exit status
if (!proc->normalExit())
{
- QString errmsg = proc->errorMessage();
+ TQString errmsg = proc->errorMessage();
kdWarning(5950) << "KAlarmApp::slotCommandExited(" << pd->event->cleanText() << "): " << errmsg << endl;
if (pd->messageBoxParent)
{
// Close the existing informational KMessageBox for this process
- QObjectList* dialogs = pd->messageBoxParent->queryList("KDialogBase", 0, false, true);
+ TQObjectList* dialogs = pd->messageBoxParent->queryList("KDialogBase", 0, false, true);
KDialogBase* dialog = (KDialogBase*)dialogs->getFirst();
delete dialog;
delete dialogs;
@@ -1905,7 +1905,7 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
*/
void KAlarmApp::commandErrorMsg(const ShellProcess* proc, const KAEvent& event, const KAAlarm* alarm, int flags)
{
- QStringList errmsgs;
+ TQStringList errmsgs;
if (flags & ProcData::PRE_ACTION)
errmsgs += i18n("Pre-alarm action:");
else if (flags & ProcData::POST_ACTION)
@@ -1919,10 +1919,10 @@ void KAlarmApp::commandErrorMsg(const ShellProcess* proc, const KAEvent& event,
/******************************************************************************
* Notes that an informational KMessageBox is displayed for this process.
*/
-void KAlarmApp::commandMessage(ShellProcess* proc, QWidget* parent)
+void KAlarmApp::commandMessage(ShellProcess* proc, TQWidget* parent)
{
// Find this command in the command list
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->process == proc)
@@ -1942,7 +1942,7 @@ void KAlarmApp::setUpDcop()
{
mInitialised = true; // we're now ready to handle DCOP calls
Daemon::createDcopHandler();
- QTimer::singleShot(0, this, SLOT(processQueue())); // process anything already queued
+ TQTimer::singleShot(0, this, TQT_SLOT(processQueue())); // process anything already queued
}
}
@@ -1999,7 +1999,7 @@ bool KAlarmApp::initCheck(bool calendarOnly)
* The parameter is in the form [[[yyyy-]mm-]dd-]hh:mm or yyyy-mm-dd.
* Reply = true if successful.
*/
-static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& noTime)
+static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool& noTime)
{
if (timeParam.length() > 19)
return false;
@@ -2059,8 +2059,8 @@ static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& n
}
}
- QDate date(dt[0], dt[1], dt[2]);
- QTime time(0, 0, 0);
+ TQDate date(dt[0], dt[1], dt[2]);
+ TQTime time(0, 0, 0);
if (noTime)
{
// No time was specified, so the full date must have been specified
@@ -2070,7 +2070,7 @@ static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& n
else
{
// Compile the values into a date/time structure
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (dt[0] < 0)
date.setYMD(now.date().year(),
(dt[1] < 0 ? now.date().month() : dt[1]),
@@ -2092,9 +2092,9 @@ static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& n
* false, 'timeInterval' is converted to minutes.
* Reply = true if successful.
*/
-static bool convInterval(const QCString& timeParam, KARecurrence::Type& recurType, int& timeInterval, bool allowMonthYear)
+static bool convInterval(const TQCString& timeParam, KARecurrence::Type& recurType, int& timeInterval, bool allowMonthYear)
{
- QCString timeString = timeParam;
+ TQCString timeString = timeParam;
// Get the recurrence interval
bool ok = true;
uint interval = 0;
@@ -2177,7 +2177,7 @@ KAlarmApp::ProcData::~ProcData()
while (!tempFiles.isEmpty())
{
// Delete the temporary file called by the XTerm command
- QFile f(tempFiles.first());
+ TQFile f(tempFiles.first());
f.remove();
tempFiles.remove(tempFiles.begin());
}