summaryrefslogtreecommitdiffstats
path: root/kalarm
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm')
-rw-r--r--kalarm/alarmcalendar.cpp96
-rw-r--r--kalarm/alarmcalendar.h30
-rw-r--r--kalarm/alarmevent.cpp458
-rw-r--r--kalarm/alarmevent.h164
-rw-r--r--kalarm/alarmlistview.cpp148
-rw-r--r--kalarm/alarmlistview.h58
-rw-r--r--kalarm/alarmtext.cpp72
-rw-r--r--kalarm/alarmtext.h62
-rw-r--r--kalarm/alarmtimewidget.cpp114
-rw-r--r--kalarm/alarmtimewidget.h24
-rw-r--r--kalarm/birthdaydlg.cpp120
-rw-r--r--kalarm/birthdaydlg.h22
-rw-r--r--kalarm/calendarcompat.cpp42
-rw-r--r--kalarm/calendarcompat.h8
-rw-r--r--kalarm/daemon.cpp98
-rw-r--r--kalarm/daemon.h24
-rw-r--r--kalarm/dcophandler.cpp282
-rw-r--r--kalarm/dcophandler.h92
-rw-r--r--kalarm/deferdlg.cpp18
-rw-r--r--kalarm/deferdlg.h8
-rw-r--r--kalarm/editdlg.cpp428
-rw-r--r--kalarm/editdlg.h140
-rw-r--r--kalarm/editdlgprivate.h8
-rw-r--r--kalarm/emailidcombo.cpp12
-rw-r--r--kalarm/emailidcombo.h12
-rw-r--r--kalarm/eventlistviewbase.cpp80
-rw-r--r--kalarm/eventlistviewbase.h46
-rw-r--r--kalarm/find.cpp56
-rw-r--r--kalarm/find.h26
-rw-r--r--kalarm/fontcolour.cpp126
-rw-r--r--kalarm/fontcolour.h30
-rw-r--r--kalarm/fontcolourbutton.cpp40
-rw-r--r--kalarm/fontcolourbutton.h40
-rw-r--r--kalarm/functions.cpp190
-rw-r--r--kalarm/functions.h56
-rw-r--r--kalarm/kalarmapp.cpp336
-rw-r--r--kalarm/kalarmapp.h54
-rw-r--r--kalarm/kalarmd/adcalendar.cpp28
-rw-r--r--kalarm/kalarmd/adcalendar.h40
-rw-r--r--kalarm/kalarmd/adconfigdata.cpp46
-rw-r--r--kalarm/kalarmd/adconfigdata.h6
-rw-r--r--kalarm/kalarmd/alarmdaemon.cpp102
-rw-r--r--kalarm/kalarmd/alarmdaemon.h30
-rw-r--r--kalarm/kalarmd/alarmdaemoniface.h14
-rw-r--r--kalarm/kalarmd/alarmguiiface.h4
-rw-r--r--kalarm/kalarmd/clientinfo.cpp22
-rw-r--r--kalarm/kalarmd/clientinfo.h34
-rw-r--r--kalarm/kalarmiface.h126
-rw-r--r--kalarm/kamail.cpp298
-rw-r--r--kalarm/kamail.h40
-rw-r--r--kalarm/karecurrence.cpp100
-rw-r--r--kalarm/karecurrence.h28
-rw-r--r--kalarm/latecancel.cpp52
-rw-r--r--kalarm/latecancel.h22
-rw-r--r--kalarm/lib/buttongroup.cpp36
-rw-r--r--kalarm/lib/buttongroup.h24
-rw-r--r--kalarm/lib/checkbox.cpp36
-rw-r--r--kalarm/lib/checkbox.h28
-rw-r--r--kalarm/lib/colourcombo.cpp66
-rw-r--r--kalarm/lib/colourcombo.h36
-rw-r--r--kalarm/lib/colourlist.cpp6
-rw-r--r--kalarm/lib/colourlist.h40
-rw-r--r--kalarm/lib/combobox.cpp30
-rw-r--r--kalarm/lib/combobox.h20
-rw-r--r--kalarm/lib/dateedit.cpp28
-rw-r--r--kalarm/lib/dateedit.h36
-rw-r--r--kalarm/lib/datetime.cpp14
-rw-r--r--kalarm/lib/datetime.h56
-rw-r--r--kalarm/lib/label.cpp38
-rw-r--r--kalarm/lib/label.h28
-rw-r--r--kalarm/lib/lineedit.cpp40
-rw-r--r--kalarm/lib/lineedit.h12
-rw-r--r--kalarm/lib/messagebox.cpp34
-rw-r--r--kalarm/lib/messagebox.h26
-rw-r--r--kalarm/lib/pushbutton.cpp34
-rw-r--r--kalarm/lib/pushbutton.h24
-rw-r--r--kalarm/lib/radiobutton.cpp36
-rw-r--r--kalarm/lib/radiobutton.h28
-rw-r--r--kalarm/lib/shellprocess.cpp20
-rw-r--r--kalarm/lib/shellprocess.h24
-rw-r--r--kalarm/lib/slider.cpp32
-rw-r--r--kalarm/lib/slider.h22
-rw-r--r--kalarm/lib/spinbox.cpp104
-rw-r--r--kalarm/lib/spinbox.h14
-rw-r--r--kalarm/lib/spinbox2.cpp148
-rw-r--r--kalarm/lib/spinbox2.h68
-rw-r--r--kalarm/lib/spinbox2private.h36
-rw-r--r--kalarm/lib/synchtimer.cpp42
-rw-r--r--kalarm/lib/synchtimer.h54
-rw-r--r--kalarm/lib/timeedit.cpp8
-rw-r--r--kalarm/lib/timeedit.h18
-rw-r--r--kalarm/lib/timeperiod.cpp40
-rw-r--r--kalarm/lib/timeperiod.h26
-rw-r--r--kalarm/lib/timespinbox.cpp88
-rw-r--r--kalarm/lib/timespinbox.h22
-rw-r--r--kalarm/mainwindow.cpp274
-rw-r--r--kalarm/mainwindow.h46
-rw-r--r--kalarm/mainwindowbase.cpp2
-rw-r--r--kalarm/mainwindowbase.h4
-rw-r--r--kalarm/messagewin.cpp452
-rw-r--r--kalarm/messagewin.h60
-rw-r--r--kalarm/pickfileradio.cpp26
-rw-r--r--kalarm/pickfileradio.h22
-rw-r--r--kalarm/prefdlg.cpp480
-rw-r--r--kalarm/prefdlg.h108
-rw-r--r--kalarm/preferences.cpp272
-rw-r--r--kalarm/preferences.h112
-rw-r--r--kalarm/recurrenceedit.cpp372
-rw-r--r--kalarm/recurrenceedit.h72
-rw-r--r--kalarm/recurrenceeditprivate.h58
-rw-r--r--kalarm/reminder.cpp24
-rw-r--r--kalarm/reminder.h10
-rw-r--r--kalarm/repetition.cpp44
-rw-r--r--kalarm/repetition.h6
-rw-r--r--kalarm/sounddlg.cpp136
-rw-r--r--kalarm/sounddlg.h38
-rw-r--r--kalarm/soundpicker.cpp84
-rw-r--r--kalarm/soundpicker.h30
-rw-r--r--kalarm/specialactions.cpp50
-rw-r--r--kalarm/specialactions.h34
-rw-r--r--kalarm/startdaytimer.cpp4
-rw-r--r--kalarm/startdaytimer.h6
-rw-r--r--kalarm/templatedlg.cpp70
-rw-r--r--kalarm/templatedlg.h14
-rw-r--r--kalarm/templatelistview.cpp20
-rw-r--r--kalarm/templatelistview.h28
-rw-r--r--kalarm/templatemenuaction.cpp22
-rw-r--r--kalarm/templatemenuaction.h4
-rw-r--r--kalarm/templatepickdlg.cpp20
-rw-r--r--kalarm/templatepickdlg.h4
-rw-r--r--kalarm/timeselector.cpp32
-rw-r--r--kalarm/timeselector.h8
-rw-r--r--kalarm/traywindow.cpp42
-rw-r--r--kalarm/traywindow.h14
-rw-r--r--kalarm/undo.cpp144
-rw-r--r--kalarm/undo.h38
136 files changed, 4710 insertions, 4710 deletions
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp
index 85c4f7bcf..4b03f3050 100644
--- a/kalarm/alarmcalendar.cpp
+++ b/kalarm/alarmcalendar.cpp
@@ -22,10 +22,10 @@
#include <unistd.h>
#include <time.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -59,19 +59,19 @@ extern "C" {
using namespace KCal;
-QString AlarmCalendar::icalProductId()
+TQString AlarmCalendar::icalProductId()
{
- return QString::fromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString());
+ return TQString::fromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString());
}
static const KAEvent::Status eventTypes[AlarmCalendar::NCALS] = {
KAEvent::ACTIVE, KAEvent::EXPIRED, KAEvent::DISPLAYING, KAEvent::TEMPLATE
};
-static const QString calendarNames[AlarmCalendar::NCALS] = {
- QString::fromLatin1("calendar.ics"),
- QString::fromLatin1("expired.ics"),
- QString::fromLatin1("displaying.ics"),
- QString::fromLatin1("template.ics")
+static const TQString calendarNames[AlarmCalendar::NCALS] = {
+ TQString::fromLatin1("calendar.ics"),
+ TQString::fromLatin1("expired.ics"),
+ TQString::fromLatin1("displaying.ics"),
+ TQString::fromLatin1("template.ics")
};
static KStaticDeleter<AlarmCalendar> calendarDeleter[AlarmCalendar::NCALS]; // ensure that the calendar destructors are called
@@ -91,17 +91,17 @@ AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 };
bool AlarmCalendar::initialiseCalendars()
{
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- QString activeKey = QString::fromLatin1("Calendar");
- QString expiredKey = QString::fromLatin1("ExpiredCalendar");
- QString templateKey = QString::fromLatin1("TemplateCalendar");
- QString displayCal, activeCal, expiredCal, templateCal;
+ config->setGroup(TQString::fromLatin1("General"));
+ TQString activeKey = TQString::fromLatin1("Calendar");
+ TQString expiredKey = TQString::fromLatin1("ExpiredCalendar");
+ TQString templateKey = TQString::fromLatin1("TemplateCalendar");
+ TQString displayCal, activeCal, expiredCal, templateCal;
calendarDeleter[ACTIVE].setObject(mCalendars[ACTIVE], createCalendar(ACTIVE, config, activeCal, activeKey));
calendarDeleter[EXPIRED].setObject(mCalendars[EXPIRED], createCalendar(EXPIRED, config, expiredCal, expiredKey));
calendarDeleter[DISPLAY].setObject(mCalendars[DISPLAY], createCalendar(DISPLAY, config, displayCal));
calendarDeleter[TEMPLATE].setObject(mCalendars[TEMPLATE], createCalendar(TEMPLATE, config, templateCal, templateKey));
- QString errorKey1, errorKey2;
+ TQString errorKey1, errorKey2;
if (activeCal == displayCal)
errorKey1 = activeKey;
else if (expiredCal == displayCal)
@@ -111,7 +111,7 @@ bool AlarmCalendar::initialiseCalendars()
if (!errorKey1.isNull())
{
kdError(5950) << "AlarmCalendar::initialiseCalendars(): '" << errorKey1 << "' calendar name = display calendar name\n";
- QString file = config->readPathEntry(errorKey1);
+ TQString file = config->readPathEntry(errorKey1);
KAlarmApp::displayFatalError(i18n("%1: file name not permitted: %2").arg(errorKey1).arg(file));
return false;
}
@@ -138,7 +138,7 @@ bool AlarmCalendar::initialiseCalendars()
}
if (!mCalendars[ACTIVE]->valid())
{
- QString path = mCalendars[ACTIVE]->path();
+ TQString path = mCalendars[ACTIVE]->path();
kdError(5950) << "AlarmCalendar::initialiseCalendars(): invalid name: " << path << endl;
KAlarmApp::displayFatalError(i18n("Invalid calendar file name: %1").arg(path));
return false;
@@ -150,10 +150,10 @@ bool AlarmCalendar::initialiseCalendars()
* Create an alarm calendar instance.
* If 'configKey' is non-null, the calendar will be converted to ICal format.
*/
-AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, QString& writePath, const QString& configKey)
+AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQString& writePath, const TQString& configKey)
{
- static QRegExp vcsRegExp(QString::fromLatin1("\\.vcs$"));
- static QString ical = QString::fromLatin1(".ics");
+ static TQRegExp vcsRegExp(TQString::fromLatin1("\\.vcs$"));
+ static TQString ical = TQString::fromLatin1(".ics");
if (configKey.isNull())
{
@@ -162,7 +162,7 @@ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, QStrin
}
else
{
- QString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type]));
+ TQString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type]));
writePath = readPath;
writePath.replace(vcsRegExp, ical);
return new AlarmCalendar(readPath, type, writePath, configKey);
@@ -201,7 +201,7 @@ AlarmCalendar* AlarmCalendar::calendarOpen(CalID id)
* Find and return the event with the specified ID.
* The calendar searched is determined by the calendar identifier in the ID.
*/
-const KCal::Event* AlarmCalendar::getEvent(const QString& uniqueID)
+const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
{
if (uniqueID.isEmpty())
return 0;
@@ -228,10 +228,10 @@ const KCal::Event* AlarmCalendar::getEvent(const QString& uniqueID)
* If 'configKey' is also non-null, that config file entry will be updated when
* the file is saved in ICal format.
*/
-AlarmCalendar::AlarmCalendar(const QString& path, CalID type, const QString& icalPath,
- const QString& configKey)
+AlarmCalendar::AlarmCalendar(const TQString& path, CalID type, const TQString& icalPath,
+ const TQString& configKey)
: mCalendar(0),
- mConfigKey(icalPath.isNull() ? QString::null : configKey),
+ mConfigKey(icalPath.isNull() ? TQString::null : configKey),
mType(eventTypes[type]),
mPurgeDays(-1), // default to not purging
mOpen(false),
@@ -261,7 +261,7 @@ bool AlarmCalendar::open()
kdDebug(5950) << "AlarmCalendar::open(" << mUrl.prettyURL() << ")\n";
if (!mCalendar)
- mCalendar = new CalendarLocal(QString::fromLatin1("UTC"));
+ mCalendar = new CalendarLocal(TQString::fromLatin1("UTC"));
mCalendar->setLocalTime(); // write out using local time (i.e. no time zone)
// Check for file's existence, assuming that it does exist when uncertain,
@@ -317,7 +317,7 @@ int AlarmCalendar::load()
return -2;
kdDebug(5950) << "AlarmCalendar::load(): " << mUrl.prettyURL() << endl;
- QString tmpFile;
+ TQString tmpFile;
if (!KIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow()))
{
kdError(5950) << "AlarmCalendar::load(): Load failure" << endl;
@@ -325,7 +325,7 @@ int AlarmCalendar::load()
return -1;
}
kdDebug(5950) << "AlarmCalendar::load(): --- Downloaded to " << tmpFile << endl;
- mCalendar->setTimeZoneId(QString::null); // default to the local time zone for reading
+ mCalendar->setTimeZoneId(TQString::null); // default to the local time zone for reading
bool loaded = mCalendar->load(tmpFile);
mCalendar->setLocalTime(); // write using local time (i.e. no time zone)
if (!loaded)
@@ -371,13 +371,13 @@ bool AlarmCalendar::reload()
* Save the calendar from memory to file.
* If a filename is specified, create a new calendar file.
*/
-bool AlarmCalendar::saveCal(const QString& newFile)
+bool AlarmCalendar::saveCal(const TQString& newFile)
{
if (!mCalendar || !mOpen && newFile.isNull())
return false;
kdDebug(5950) << "AlarmCalendar::saveCal(\"" << newFile << "\", " << mType << ")\n";
- QString saveFilename = newFile.isNull() ? mLocalFile : newFile;
+ TQString saveFilename = newFile.isNull() ? mLocalFile : newFile;
if (mVCal && newFile.isNull() && mUrl.isLocalFile())
saveFilename = mICalUrl.path();
if (!mCalendar->save(saveFilename, new ICalFormat))
@@ -404,7 +404,7 @@ bool AlarmCalendar::saveCal(const QString& newFile)
if (!mConfigKey.isNull())
{
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
+ config->setGroup(TQString::fromLatin1("General"));
config->writePathEntry(mConfigKey, mICalUrl.path());
config->sync();
}
@@ -443,10 +443,10 @@ void AlarmCalendar::close()
* Reply = true if all alarms in the calendar were successfully imported
* = false if any alarms failed to be imported.
*/
-bool AlarmCalendar::importAlarms(QWidget* parent)
+bool AlarmCalendar::importAlarms(TQWidget* parent)
{
- KURL url = KFileDialog::getOpenURL(QString::fromLatin1(":importalarms"),
- QString::fromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), parent);
+ KURL url = KFileDialog::getOpenURL(TQString::fromLatin1(":importalarms"),
+ TQString::fromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), parent);
if (url.isEmpty())
{
kdError(5950) << "AlarmCalendar::importAlarms(): Empty URL" << endl;
@@ -460,7 +460,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent)
kdDebug(5950) << "AlarmCalendar::importAlarms(" << url.prettyURL() << ")" << endl;
bool success = true;
- QString filename;
+ TQString filename;
bool local = url.isLocalFile();
if (local)
{
@@ -484,7 +484,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent)
}
// Read the calendar and add its alarms to the current calendars
- CalendarLocal cal(QString::fromLatin1("UTC"));
+ CalendarLocal cal(TQString::fromLatin1("UTC"));
cal.setLocalTime(); // write out using local time (i.e. no time zone)
success = cal.load(filename);
if (!success)
@@ -544,7 +544,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent)
if (alarm->type() == Alarm::Display && alarm->text().isEmpty())
alarm->setText(newev->summary());
}
- newev->setSummary(QString::null); // KAlarm only uses summary for template names
+ newev->setSummary(TQString::null); // KAlarm only uses summary for template names
}
// Give the event a new ID and add it to the calendar
newev->setUid(KAEvent::uid(CalFormat::createUniqueId(), type));
@@ -616,7 +616,7 @@ void AlarmCalendar::convertToICal()
if (!mConfigKey.isNull())
{
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
+ config->setGroup(TQString::fromLatin1("General"));
config->writePathEntry(mConfigKey, mICalUrl.path());
config->sync();
}
@@ -688,7 +688,7 @@ void AlarmCalendar::purgeIfQueued()
{
kdDebug(5950) << "AlarmCalendar::purgeIfQueued(" << mPurgeDaysQueued << ")\n";
bool changed = false;
- QDate cutoff = QDate::currentDate().addDays(-mPurgeDaysQueued);
+ TQDate cutoff = TQDate::currentDate().addDays(-mPurgeDaysQueued);
Event::List events = mCalendar->rawEvents();
for (Event::List::ConstIterator it = events.begin(); it != events.end(); ++it)
{
@@ -717,7 +717,7 @@ void AlarmCalendar::purgeIfQueued()
void AlarmCalendar::startPurgeTimer()
{
if (mPurgeDays > 0)
- StartOfDayTimer::connect(this, SLOT(slotPurge()));
+ StartOfDayTimer::connect(this, TQT_SLOT(slotPurge()));
}
/******************************************************************************
@@ -731,7 +731,7 @@ Event* AlarmCalendar::addEvent(KAEvent& event, bool useEventID)
{
if (!mOpen)
return 0;
- QString id = event.id();
+ TQString id = event.id();
Event* kcalEvent = new Event;
if (mType == KAEvent::ACTIVE)
{
@@ -784,7 +784,7 @@ void AlarmCalendar::updateEvent(const KAEvent& evnt)
* Delete the specified event from the calendar, if it exists.
* The calendar is then optionally saved.
*/
-bool AlarmCalendar::deleteEvent(const QString& eventID, bool saveit)
+bool AlarmCalendar::deleteEvent(const TQString& eventID, bool saveit)
{
if (mOpen)
{
@@ -815,7 +815,7 @@ void AlarmCalendar::emitEmptyStatus()
/******************************************************************************
* Return the event with the specified ID.
*/
-KCal::Event* AlarmCalendar::event(const QString& uniqueID)
+KCal::Event* AlarmCalendar::event(const TQString& uniqueID)
{
return mCalendar ? mCalendar->event(uniqueID) : 0;
}
@@ -843,11 +843,11 @@ KCal::Event::List AlarmCalendar::events()
/******************************************************************************
* Return all events which have alarms falling within the specified time range.
*/
-Event::List AlarmCalendar::eventsWithAlarms(const QDateTime& from, const QDateTime& to)
+Event::List AlarmCalendar::eventsWithAlarms(const TQDateTime& from, const TQDateTime& to)
{
kdDebug(5950) << "AlarmCalendar::eventsWithAlarms(" << from.toString() << " - " << to.toString() << ")\n";
Event::List evnts;
- QDateTime dt;
+ TQDateTime dt;
Event::List allEvents = events(); // ignore events without usable alarms
for (Event::List::ConstIterator it = allEvents.begin(); it != allEvents.end(); ++it)
{
@@ -883,7 +883,7 @@ Event::List AlarmCalendar::eventsWithAlarms(const QDateTime& from, const QDateTi
offset = alarm->endOffset().asSeconds() + endOffset;
}
// Adjust the 'from' date/time and find the next recurrence at or after it
- QDateTime pre = from.addSecs(-offset - 1);
+ TQDateTime pre = from.addSecs(-offset - 1);
if (e->doesFloat() && pre.time() < Preferences::startOfDay())
pre = pre.addDays(-1); // today's recurrence (if today recurs) is still to come
dt = e->recurrence()->getNextDateTime(pre);
diff --git a/kalarm/alarmcalendar.h b/kalarm/alarmcalendar.h
index 87abc2d13..be96c3879 100644
--- a/kalarm/alarmcalendar.h
+++ b/kalarm/alarmcalendar.h
@@ -21,7 +21,7 @@
#ifndef ALARMCALENDAR_H
#define ALARMCALENDAR_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <libkcal/calendarlocal.h>
#include "alarmevent.h"
@@ -47,21 +47,21 @@ class AlarmCalendar : public QObject
void close();
void startUpdate();
bool endUpdate();
- KCal::Event* event(const QString& uniqueID);
+ KCal::Event* event(const TQString& uniqueID);
KCal::Event::List events();
- KCal::Event::List eventsWithAlarms(const QDateTime& from, const QDateTime& to);
+ KCal::Event::List eventsWithAlarms(const TQDateTime& from, const TQDateTime& to);
KCal::Event* addEvent(KAEvent&, bool useEventID = false);
void updateEvent(const KAEvent&);
- bool deleteEvent(const QString& eventID, bool save = false);
+ bool deleteEvent(const TQString& eventID, bool save = false);
void emitEmptyStatus();
void purgeAll() { purge(0); }
void setPurgeDays(int days);
void purgeIfQueued(); // must only be called from KAlarmApp::processQueue()
bool isOpen() const { return mOpen; }
- QString path() const { return mUrl.prettyURL(); }
- QString urlString() const { return mUrl.url(); }
+ TQString path() const { return mUrl.prettyURL(); }
+ TQString urlString() const { return mUrl.url(); }
- static QString icalProductId();
+ static TQString icalProductId();
static bool initialiseCalendars();
static void terminateCalendars();
static AlarmCalendar* activeCalendar() { return mCalendars[ACTIVE]; }
@@ -72,8 +72,8 @@ class AlarmCalendar : public QObject
static AlarmCalendar* expiredCalendarOpen() { return calendarOpen(EXPIRED); }
static AlarmCalendar* displayCalendarOpen() { return calendarOpen(DISPLAY); }
static AlarmCalendar* templateCalendarOpen() { return calendarOpen(TEMPLATE); }
- static bool importAlarms(QWidget*);
- static const KCal::Event* getEvent(const QString& uniqueID);
+ static bool importAlarms(TQWidget*);
+ static const KCal::Event* getEvent(const TQString& uniqueID);
enum CalID { ACTIVE, EXPIRED, DISPLAY, TEMPLATE, NCALS };
@@ -86,13 +86,13 @@ class AlarmCalendar : public QObject
void slotPurge();
private:
- AlarmCalendar(const QString& file, CalID, const QString& icalFile = QString::null,
- const QString& configKey = QString::null);
+ AlarmCalendar(const TQString& file, CalID, const TQString& icalFile = TQString::null,
+ const TQString& configKey = TQString::null);
bool create();
- bool saveCal(const QString& newFile = QString::null);
+ bool saveCal(const TQString& newFile = TQString::null);
void purge(int daysToKeep);
void startPurgeTimer();
- static AlarmCalendar* createCalendar(CalID, KConfig*, QString& writePath, const QString& configKey = QString::null);
+ static AlarmCalendar* createCalendar(CalID, KConfig*, TQString& writePath, const TQString& configKey = TQString::null);
static AlarmCalendar* calendarOpen(CalID);
static AlarmCalendar* mCalendars[NCALS]; // the calendars
@@ -100,8 +100,8 @@ class AlarmCalendar : public QObject
KCal::CalendarLocal* mCalendar;
KURL mUrl; // URL of current calendar file
KURL mICalUrl; // URL of iCalendar file
- QString mLocalFile; // calendar file, or local copy if it's a remote file
- QString mConfigKey; // config file key for this calendar's URL
+ TQString mLocalFile; // calendar file, or local copy if it's a remote file
+ TQString mConfigKey; // config file key for this calendar's URL
KAEvent::Status mType; // what type of events the calendar file is for
int mPurgeDays; // how long to keep alarms, 0 = don't keep, -1 = keep indefinitely
bool mOpen; // true if the calendar file is open
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp
index 28b0a55a4..8aa898922 100644
--- a/kalarm/alarmevent.cpp
+++ b/kalarm/alarmevent.cpp
@@ -23,8 +23,8 @@
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -39,73 +39,73 @@
using namespace KCal;
-const QCString APPNAME("KALARM");
+const TQCString APPNAME("KALARM");
// KAlarm version which first used the current calendar/event format.
// If this changes, KAEvent::convertKCalEvents() must be changed correspondingly.
// The string version is the KAlarm version string used in the calendar file.
-QString KAEvent::calVersionString() { return QString::fromLatin1("1.5.0"); }
+TQString KAEvent::calVersionString() { return TQString::fromLatin1("1.5.0"); }
int KAEvent::calVersion() { return KAlarm::Version(1,5,0); }
// Custom calendar properties.
// Note that all custom property names are prefixed with X-KDE-KALARM- in the calendar file.
// - Event properties
-static const QCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEXTRECUR property
-static const QCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property
+static const TQCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEXTRECUR property
+static const TQCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property
// - General alarm properties
-static const QCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property
-static const QString FILE_TYPE = QString::fromLatin1("FILE");
-static const QString AT_LOGIN_TYPE = QString::fromLatin1("LOGIN");
-static const QString REMINDER_TYPE = QString::fromLatin1("REMINDER");
-static const QString REMINDER_ONCE_TYPE = QString::fromLatin1("REMINDER_ONCE");
-static const QString ARCHIVE_REMINDER_ONCE_TYPE = QString::fromLatin1("ONCE");
-static const QString TIME_DEFERRAL_TYPE = QString::fromLatin1("DEFERRAL");
-static const QString DATE_DEFERRAL_TYPE = QString::fromLatin1("DATE_DEFERRAL");
-static const QString DISPLAYING_TYPE = QString::fromLatin1("DISPLAYING"); // used only in displaying calendar
-static const QString PRE_ACTION_TYPE = QString::fromLatin1("PRE");
-static const QString POST_ACTION_TYPE = QString::fromLatin1("POST");
-static const QCString NEXT_REPEAT_PROPERTY("NEXTREPEAT"); // X-KDE-KALARM-NEXTREPEAT property
+static const TQCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property
+static const TQString FILE_TYPE = TQString::fromLatin1("FILE");
+static const TQString AT_LOGIN_TYPE = TQString::fromLatin1("LOGIN");
+static const TQString REMINDER_TYPE = TQString::fromLatin1("REMINDER");
+static const TQString REMINDER_ONCE_TYPE = TQString::fromLatin1("REMINDER_ONCE");
+static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::fromLatin1("ONCE");
+static const TQString TIME_DEFERRAL_TYPE = TQString::fromLatin1("DEFERRAL");
+static const TQString DATE_DEFERRAL_TYPE = TQString::fromLatin1("DATE_DEFERRAL");
+static const TQString DISPLAYING_TYPE = TQString::fromLatin1("DISPLAYING"); // used only in displaying calendar
+static const TQString PRE_ACTION_TYPE = TQString::fromLatin1("PRE");
+static const TQString POST_ACTION_TYPE = TQString::fromLatin1("POST");
+static const TQCString NEXT_REPEAT_PROPERTY("NEXTREPEAT"); // X-KDE-KALARM-NEXTREPEAT property
// - Display alarm properties
-static const QCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property
+static const TQCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property
// - Email alarm properties
-static const QCString EMAIL_ID_PROPERTY("EMAILID"); // X-KDE-KALARM-EMAILID property
+static const TQCString EMAIL_ID_PROPERTY("EMAILID"); // X-KDE-KALARM-EMAILID property
// - Audio alarm properties
-static const QCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOLUME property
-static const QCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property
+static const TQCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOLUME property
+static const TQCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property
// Event categories
-static const QString DATE_ONLY_CATEGORY = QString::fromLatin1("DATE");
-static const QString EMAIL_BCC_CATEGORY = QString::fromLatin1("BCC");
-static const QString CONFIRM_ACK_CATEGORY = QString::fromLatin1("ACKCONF");
-static const QString LATE_CANCEL_CATEGORY = QString::fromLatin1("LATECANCEL;");
-static const QString AUTO_CLOSE_CATEGORY = QString::fromLatin1("LATECLOSE;");
-static const QString TEMPL_AFTER_TIME_CATEGORY = QString::fromLatin1("TMPLAFTTIME;");
-static const QString KMAIL_SERNUM_CATEGORY = QString::fromLatin1("KMAIL:");
-static const QString KORGANIZER_CATEGORY = QString::fromLatin1("KORG");
-static const QString DEFER_CATEGORY = QString::fromLatin1("DEFER;");
-static const QString ARCHIVE_CATEGORY = QString::fromLatin1("SAVE");
-static const QString ARCHIVE_CATEGORIES = QString::fromLatin1("SAVE:");
-static const QString LOG_CATEGORY = QString::fromLatin1("LOG:");
-static const QString xtermURL = QString::fromLatin1("xterm:");
+static const TQString DATE_ONLY_CATEGORY = TQString::fromLatin1("DATE");
+static const TQString EMAIL_BCC_CATEGORY = TQString::fromLatin1("BCC");
+static const TQString CONFIRM_ACK_CATEGORY = TQString::fromLatin1("ACKCONF");
+static const TQString LATE_CANCEL_CATEGORY = TQString::fromLatin1("LATECANCEL;");
+static const TQString AUTO_CLOSE_CATEGORY = TQString::fromLatin1("LATECLOSE;");
+static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::fromLatin1("TMPLAFTTIME;");
+static const TQString KMAIL_SERNUM_CATEGORY = TQString::fromLatin1("KMAIL:");
+static const TQString KORGANIZER_CATEGORY = TQString::fromLatin1("KORG");
+static const TQString DEFER_CATEGORY = TQString::fromLatin1("DEFER;");
+static const TQString ARCHIVE_CATEGORY = TQString::fromLatin1("SAVE");
+static const TQString ARCHIVE_CATEGORIES = TQString::fromLatin1("SAVE:");
+static const TQString LOG_CATEGORY = TQString::fromLatin1("LOG:");
+static const TQString xtermURL = TQString::fromLatin1("xterm:");
// Event status strings
-static const QString DISABLED_STATUS = QString::fromLatin1("DISABLED");
+static const TQString DISABLED_STATUS = TQString::fromLatin1("DISABLED");
-static const QString EXPIRED_UID = QString::fromLatin1("-exp-");
-static const QString DISPLAYING_UID = QString::fromLatin1("-disp-");
-static const QString TEMPLATE_UID = QString::fromLatin1("-tmpl-");
-static const QString KORGANIZER_UID = QString::fromLatin1("-korg-");
+static const TQString EXPIRED_UID = TQString::fromLatin1("-exp-");
+static const TQString DISPLAYING_UID = TQString::fromLatin1("-disp-");
+static const TQString TEMPLATE_UID = TQString::fromLatin1("-tmpl-");
+static const TQString KORGANIZER_UID = TQString::fromLatin1("-korg-");
struct AlarmData
{
const Alarm* alarm;
- QString cleanText; // text or audio file name
+ TQString cleanText; // text or audio file name
uint emailFromId;
EmailAddressList emailAddresses;
- QString emailSubject;
- QStringList emailAttachments;
- QFont font;
- QColor bgColour, fgColour;
+ TQString emailSubject;
+ TQStringList emailAttachments;
+ TQFont font;
+ TQColor bgColour, fgColour;
float soundVolume;
float fadeVolume;
int fadeSeconds;
@@ -122,9 +122,9 @@ struct AlarmData
int repeatInterval;
int nextRepeat;
};
-typedef QMap<KAAlarm::SubType, AlarmData> AlarmMap;
+typedef TQMap<KAAlarm::SubType, AlarmData> AlarmMap;
-static void setProcedureAlarm(Alarm*, const QString& commandLine);
+static void setProcedureAlarm(Alarm*, const TQString& commandLine);
/*=============================================================================
@@ -211,8 +211,8 @@ void KAEvent::set(const Event& event)
// Extract status from the event
mEventID = event.uid();
mRevision = event.revision();
- mTemplateName = QString::null;
- mLogFile = QString::null;
+ mTemplateName = TQString::null;
+ mLogFile = TQString::null;
mTemplateAfterTime = -1;
mBeep = false;
mSpeak = false;
@@ -228,14 +228,14 @@ void KAEvent::set(const Event& event)
mDeferDefaultMinutes = 0;
mLateCancel = 0;
mKMailSerialNumber = 0;
- mBgColour = QColor(255, 255, 255); // missing/invalid colour - return white background
- mFgColour = QColor(0, 0, 0); // and black foreground
+ mBgColour = TQColor(255, 255, 255); // missing/invalid colour - return white background
+ mFgColour = TQColor(0, 0, 0); // and black foreground
mDefaultFont = true;
mEnabled = true;
clearRecur();
bool ok;
bool dateOnly = false;
- const QStringList cats = event.categories();
+ const TQStringList cats = event.categories();
for (unsigned int i = 0; i < cats.count(); ++i)
{
if (cats[i] == DATE_ONLY_CATEGORY)
@@ -252,7 +252,7 @@ void KAEvent::set(const Event& event)
mKMailSerialNumber = cats[i].mid(KMAIL_SERNUM_CATEGORY.length()).toULong();
else if (cats[i].startsWith(LOG_CATEGORY))
{
- QString logUrl = cats[i].mid(LOG_CATEGORY.length());
+ TQString logUrl = cats[i].mid(LOG_CATEGORY.length());
if (logUrl == xtermURL)
mCommandXterm = true;
else
@@ -262,7 +262,7 @@ void KAEvent::set(const Event& event)
{
// It's the archive flag plus a reminder time and/or repeat-at-login flag
mArchive = true;
- QStringList list = QStringList::split(';', cats[i].mid(ARCHIVE_CATEGORIES.length()));
+ TQStringList list = TQStringList::split(';', cats[i].mid(ARCHIVE_CATEGORIES.length()));
for (unsigned int j = 0; j < list.count(); ++j)
{
if (list[j] == AT_LOGIN_TYPE)
@@ -316,11 +316,11 @@ void KAEvent::set(const Event& event)
mAutoClose = true;
}
}
- QString prop = event.customProperty(APPNAME, REPEAT_PROPERTY);
+ TQString prop = event.customProperty(APPNAME, REPEAT_PROPERTY);
if (!prop.isEmpty())
{
// This property is used when the main alarm has expired
- QStringList list = QStringList::split(':', prop);
+ TQStringList list = TQStringList::split(':', prop);
if (list.count() >= 2)
{
int interval = static_cast<int>(list[0].toUInt());
@@ -562,20 +562,20 @@ DateTime KAEvent::readDateTime(const Event& event, bool dateOnly, DateTime& star
{
start.set(event.dtStart(), dateOnly);
DateTime next = start;
- QString prop = event.customProperty(APPNAME, NEXT_RECUR_PROPERTY);
+ TQString prop = event.customProperty(APPNAME, NEXT_RECUR_PROPERTY);
if (prop.length() >= 8)
{
// The next due recurrence time is specified
- QDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
+ TQDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
if (d.isValid())
{
if (dateOnly && prop.length() == 8)
next = d;
- else if (!dateOnly && prop.length() == 15 && prop[8] == QChar('T'))
+ else if (!dateOnly && prop.length() == 15 && prop[8] == TQChar('T'))
{
- QTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
+ TQTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
if (t.isValid())
- next = QDateTime(d, t);
+ next = TQDateTime(d, t);
}
}
}
@@ -617,7 +617,7 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
if (data.repeatCount)
{
bool ok;
- QString property = alarm.customProperty(APPNAME, NEXT_REPEAT_PROPERTY);
+ TQString property = alarm.customProperty(APPNAME, NEXT_REPEAT_PROPERTY);
int n = static_cast<int>(property.toUInt(&ok));
if (ok)
data.nextRepeat = n;
@@ -647,22 +647,22 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
{
data.action = T_MESSAGE;
data.cleanText = AlarmText::fromCalendarText(alarm.text(), data.isEmailText);
- QString property = alarm.customProperty(APPNAME, FONT_COLOUR_PROPERTY);
- QStringList list = QStringList::split(QChar(';'), property, true);
- data.bgColour = QColor(255, 255, 255); // white
- data.fgColour = QColor(0, 0, 0); // black
+ TQString property = alarm.customProperty(APPNAME, FONT_COLOUR_PROPERTY);
+ TQStringList list = TQStringList::split(TQChar(';'), property, true);
+ data.bgColour = TQColor(255, 255, 255); // white
+ data.fgColour = TQColor(0, 0, 0); // black
int n = list.count();
if (n > 0)
{
if (!list[0].isEmpty())
{
- QColor c(list[0]);
+ TQColor c(list[0]);
if (c.isValid())
data.bgColour = c;
}
if (n > 1 && !list[1].isEmpty())
{
- QColor c(list[1]);
+ TQColor c(list[1]);
if (c.isValid())
data.fgColour = c;
}
@@ -681,13 +681,13 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
data.fadeVolume = -1;
data.fadeSeconds = 0;
data.speak = !alarm.customProperty(APPNAME, SPEAK_PROPERTY).isNull();
- QString property = alarm.customProperty(APPNAME, VOLUME_PROPERTY);
+ TQString property = alarm.customProperty(APPNAME, VOLUME_PROPERTY);
if (!property.isEmpty())
{
bool ok;
float fadeVolume;
int fadeSecs = 0;
- QStringList list = QStringList::split(QChar(';'), property, true);
+ TQStringList list = TQStringList::split(TQChar(';'), property, true);
data.soundVolume = list[0].toFloat(&ok);
if (!ok)
data.soundVolume = -1;
@@ -716,11 +716,11 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
bool dateDeferral = false;
data.reminderOnceOnly = false;
data.type = KAAlarm::MAIN__ALARM;
- QString property = alarm.customProperty(APPNAME, TYPE_PROPERTY);
- QStringList types = QStringList::split(QChar(','), property);
+ TQString property = alarm.customProperty(APPNAME, TYPE_PROPERTY);
+ TQStringList types = TQStringList::split(TQChar(','), property);
for (unsigned int i = 0; i < types.count(); ++i)
{
- QString type = types[i];
+ TQString type = types[i];
if (type == AT_LOGIN_TYPE)
atLogin = true;
else if (type == FILE_TYPE && data.action == T_MESSAGE)
@@ -770,8 +770,8 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
/******************************************************************************
* Initialise the KAEvent with the specified parameters.
*/
-void KAEvent::set(const QDateTime& dateTime, const QString& text, const QColor& bg, const QColor& fg,
- const QFont& font, Action action, int lateCancel, int flags)
+void KAEvent::set(const TQDateTime& dateTime, const TQString& text, const TQColor& bg, const TQColor& fg,
+ const TQFont& font, Action action, int lateCancel, int flags)
{
clearRecur();
mStartDateTime.set(dateTime, flags & ANY_TIME);
@@ -789,10 +789,10 @@ void KAEvent::set(const QDateTime& dateTime, const QString& text, const QColor&
break;
}
mText = (mActionType == T_COMMAND) ? text.stripWhiteSpace() : text;
- mEventID = QString::null;
- mTemplateName = QString::null;
- mPreAction = QString::null;
- mPostAction = QString::null;
+ mEventID = TQString::null;
+ mTemplateName = TQString::null;
+ mPreAction = TQString::null;
+ mPostAction = TQString::null;
mAudioFile = "";
mSoundVolume = -1;
mFadeVolume = -1;
@@ -824,14 +824,14 @@ void KAEvent::set(const QDateTime& dateTime, const QString& text, const QColor&
mUpdated = false;
}
-void KAEvent::setLogFile(const QString& logfile)
+void KAEvent::setLogFile(const TQString& logfile)
{
mLogFile = logfile;
if (!logfile.isEmpty())
mCommandXterm = false;
}
-void KAEvent::setEmail(uint from, const EmailAddressList& addresses, const QString& subject, const QStringList& attachments)
+void KAEvent::setEmail(uint from, const EmailAddressList& addresses, const TQString& subject, const TQStringList& attachments)
{
mEmailFromIdentity = from;
mEmailAddresses = addresses;
@@ -839,7 +839,7 @@ void KAEvent::setEmail(uint from, const EmailAddressList& addresses, const QStri
mEmailAttachments = attachments;
}
-void KAEvent::setAudioFile(const QString& filename, float volume, float fadeVolume, int fadeSeconds)
+void KAEvent::setAudioFile(const TQString& filename, float volume, float fadeVolume, int fadeSeconds)
{
mAudioFile = filename;
mSoundVolume = filename.isEmpty() ? -1 : volume;
@@ -885,9 +885,9 @@ DateTime KAEvent::displayDateTime() const
/******************************************************************************
* Convert a unique ID to indicate that the event is in a specified calendar file.
*/
-QString KAEvent::uid(const QString& id, Status status)
+TQString KAEvent::uid(const TQString& id, Status status)
{
- QString result = id;
+ TQString result = id;
Status oldStatus;
int i, len;
if ((i = result.find(EXPIRED_UID)) > 0)
@@ -918,7 +918,7 @@ QString KAEvent::uid(const QString& id, Status status)
}
if (status != oldStatus && i > 0)
{
- QString part;
+ TQString part;
switch (status)
{
case ACTIVE: part = "-"; break;
@@ -935,7 +935,7 @@ QString KAEvent::uid(const QString& id, Status status)
/******************************************************************************
* Get the calendar type for a unique ID.
*/
-KAEvent::Status KAEvent::uidStatus(const QString& uid)
+KAEvent::Status KAEvent::uidStatus(const TQString& uid)
{
if (uid.find(EXPIRED_UID) > 0)
return EXPIRED;
@@ -992,7 +992,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ev.removeCustomProperty(APPNAME, NEXT_RECUR_PROPERTY);
ev.removeCustomProperty(APPNAME, REPEAT_PROPERTY);
- QStringList cats;
+ TQStringList cats;
if (mStartDateTime.isDateOnly())
cats.append(DATE_ONLY_CATEGORY);
if (mConfirmAck)
@@ -1000,7 +1000,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
if (mEmailBcc)
cats.append(EMAIL_BCC_CATEGORY);
if (mKMailSerialNumber)
- cats.append(QString("%1%2").arg(KMAIL_SERNUM_CATEGORY).arg(mKMailSerialNumber));
+ cats.append(TQString("%1%2").arg(KMAIL_SERNUM_CATEGORY).arg(mKMailSerialNumber));
if (mCopyToKOrganizer)
cats.append(KORGANIZER_CATEGORY);
if (mCommandXterm)
@@ -1008,14 +1008,14 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
else if (!mLogFile.isEmpty())
cats.append(LOG_CATEGORY + mLogFile);
if (mLateCancel)
- cats.append(QString("%1%2").arg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).arg(mLateCancel));
+ cats.append(TQString("%1%2").arg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).arg(mLateCancel));
if (mDeferDefaultMinutes)
- cats.append(QString("%1%2").arg(DEFER_CATEGORY).arg(mDeferDefaultMinutes));
+ cats.append(TQString("%1%2").arg(DEFER_CATEGORY).arg(mDeferDefaultMinutes));
if (!mTemplateName.isEmpty() && mTemplateAfterTime >= 0)
- cats.append(QString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(mTemplateAfterTime));
+ cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(mTemplateAfterTime));
if (mArchive && !original)
{
- QStringList params;
+ TQStringList params;
if (mArchiveReminderMinutes)
{
if (mReminderOnceOnly)
@@ -1032,21 +1032,21 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
unit = 'H';
count /= 60;
}
- params += QString("%1%2").arg(count).arg(unit);
+ params += TQString("%1%2").arg(count).arg(unit);
}
if (mArchiveRepeatAtLogin)
params += AT_LOGIN_TYPE;
if (params.count() > 0)
{
- QString cat = ARCHIVE_CATEGORIES;
- cat += params.join(QString::fromLatin1(";"));
+ TQString cat = ARCHIVE_CATEGORIES;
+ cat += params.join(TQString::fromLatin1(";"));
cats.append(cat);
}
else
cats.append(ARCHIVE_CATEGORY);
}
ev.setCategories(cats);
- ev.setCustomStatus(mEnabled ? QString::null : DISABLED_STATUS);
+ ev.setCustomStatus(mEnabled ? TQString::null : DISABLED_STATUS);
ev.setRevision(mRevision);
ev.clearAlarms();
@@ -1071,12 +1071,12 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
*/
if (!original && checkRecur() != KARecurrence::NO_RECUR)
{
- QDateTime dt = mNextMainDateTime.dateTime();
+ TQDateTime dt = mNextMainDateTime.dateTime();
ev.setCustomProperty(APPNAME, NEXT_RECUR_PROPERTY,
dt.toString(mNextMainDateTime.isDateOnly() ? "yyyyMMdd" : "yyyyMMddThhmmss"));
}
// Add the main alarm
- initKCalAlarm(ev, 0, QStringList(), KAAlarm::MAIN_ALARM);
+ initKCalAlarm(ev, 0, TQStringList(), KAAlarm::MAIN_ALARM);
ancillaryOffset = 0;
ancillaryType = dtMain.isValid() ? 2 : 0;
}
@@ -1084,7 +1084,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
{
// Alarm repetition is normally held in the main alarm, but since
// the main alarm has expired, store in a custom property.
- QString param = QString("%1:%2").arg(mRepeatInterval).arg(mRepeatCount);
+ TQString param = TQString("%1:%2").arg(mRepeatInterval).arg(mRepeatCount);
ev.setCustomProperty(APPNAME, REPEAT_PROPERTY, param);
}
@@ -1097,9 +1097,9 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
else if (mAtLoginDateTime.isValid())
dtl = mAtLoginDateTime;
else if (mStartDateTime.isDateOnly())
- dtl = QDate::currentDate().addDays(-1);
+ dtl = TQDate::currentDate().addDays(-1);
else
- dtl = QDateTime::currentDateTime();
+ dtl = TQDateTime::currentDateTime();
initKCalAlarm(ev, dtl, AT_LOGIN_TYPE);
if (!ancillaryType && dtl.isValid())
{
@@ -1110,7 +1110,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
if (mReminderMinutes || mArchiveReminderMinutes && original)
{
int minutes = mReminderMinutes ? mReminderMinutes : mArchiveReminderMinutes;
- initKCalAlarm(ev, -minutes * 60, QStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
+ initKCalAlarm(ev, -minutes * 60, TQStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
if (!ancillaryType)
{
ancillaryOffset = -minutes * 60;
@@ -1136,7 +1136,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
}
}
int startOffset;
- QStringList list;
+ TQStringList list;
if (mDeferralTime.isDateOnly())
{
startOffset = nextDateTime.secsTo(mDeferralTime.dateTime());
@@ -1160,7 +1160,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ev.setSummary(mTemplateName);
else if (mDisplaying)
{
- QStringList list(DISPLAYING_TYPE);
+ TQStringList list(DISPLAYING_TYPE);
if (mDisplayingFlags & REPEAT_AT_LOGIN)
list += AT_LOGIN_TYPE;
else if (mDisplayingFlags & DEFERRAL)
@@ -1183,25 +1183,25 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
{
// A sound is specified
if (ancillaryType == 2)
- initKCalAlarm(ev, ancillaryOffset, QStringList(), KAAlarm::AUDIO_ALARM);
+ initKCalAlarm(ev, ancillaryOffset, TQStringList(), KAAlarm::AUDIO_ALARM);
else
- initKCalAlarm(ev, ancillaryTime, QStringList(), KAAlarm::AUDIO_ALARM);
+ initKCalAlarm(ev, ancillaryTime, TQStringList(), KAAlarm::AUDIO_ALARM);
}
if (!mPreAction.isEmpty())
{
// A pre-display action is specified
if (ancillaryType == 2)
- initKCalAlarm(ev, ancillaryOffset, QStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryOffset, TQStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
else
- initKCalAlarm(ev, ancillaryTime, QStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryTime, TQStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
}
if (!mPostAction.isEmpty())
{
// A post-display action is specified
if (ancillaryType == 2)
- initKCalAlarm(ev, ancillaryOffset, QStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryOffset, TQStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
else
- initKCalAlarm(ev, ancillaryTime, QStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryTime, TQStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
}
if (mRecurrence)
@@ -1219,16 +1219,16 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
* alarm action. If 'types' is non-null, it is appended to the X-KDE-KALARM-TYPE
* property value list.
*/
-Alarm* KAEvent::initKCalAlarm(Event& event, const DateTime& dt, const QStringList& types, KAAlarm::Type type) const
+Alarm* KAEvent::initKCalAlarm(Event& event, const DateTime& dt, const TQStringList& types, KAAlarm::Type type) const
{
int startOffset = dt.isDateOnly() ? mStartDateTime.secsTo(dt)
: mStartDateTime.dateTime().secsTo(dt.dateTime());
return initKCalAlarm(event, startOffset, types, type);
}
-Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringList& types, KAAlarm::Type type) const
+Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringList& types, KAAlarm::Type type) const
{
- QStringList alltypes;
+ TQStringList alltypes;
Alarm* alarm = event.newAlarm();
alarm->setEnabled(true);
if (type != KAAlarm::MAIN_ALARM)
@@ -1243,7 +1243,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
case KAAlarm::AUDIO_ALARM:
alarm->setAudioAlarm(mAudioFile); // empty for a beep or for speaking
if (mSpeak)
- alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, QString::fromLatin1("Y"));
+ alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::fromLatin1("Y"));
if (mRepeatSound)
{
alarm->setRepeatCount(-1);
@@ -1251,8 +1251,8 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
}
if (!mAudioFile.isEmpty() && mSoundVolume >= 0)
alarm->setCustomProperty(APPNAME, VOLUME_PROPERTY,
- QString::fromLatin1("%1;%2;%3").arg(QString::number(mSoundVolume, 'f', 2))
- .arg(QString::number(mFadeVolume, 'f', 2))
+ TQString::fromLatin1("%1;%2;%3").arg(TQString::number(mSoundVolume, 'f', 2))
+ .arg(TQString::number(mFadeVolume, 'f', 2))
.arg(mFadeSeconds));
break;
case KAAlarm::PRE_ACTION_ALARM:
@@ -1266,7 +1266,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
alarm->setRepeatCount(mRepeatCount);
if (mRepeatCount)
alarm->setCustomProperty(APPNAME, NEXT_REPEAT_PROPERTY,
- QString::number(mNextRepeat));
+ TQString::number(mNextRepeat));
// fall through to INVALID_ALARM
case KAAlarm::INVALID_ALARM:
switch (mActionType)
@@ -1277,9 +1277,9 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
case T_MESSAGE:
alarm->setDisplayAlarm(AlarmText::toCalendarText(mText));
alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY,
- QString::fromLatin1("%1;%2;%3").arg(mBgColour.name())
+ TQString::fromLatin1("%1;%2;%3").arg(mBgColour.name())
.arg(mFgColour.name())
- .arg(mDefaultFont ? QString::null : mFont.toString()));
+ .arg(mDefaultFont ? TQString::null : mFont.toString()));
break;
case T_COMMAND:
if (mCommandScript)
@@ -1290,7 +1290,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
case T_EMAIL:
alarm->setEmailAlarm(mEmailSubject, mText, mEmailAddresses, mEmailAttachments);
if (mEmailFromIdentity)
- alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, QString::number(mEmailFromIdentity));
+ alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, TQString::number(mEmailFromIdentity));
break;
case T_AUDIO:
break;
@@ -1601,7 +1601,7 @@ bool KAEvent::defer(const DateTime& dateTime, bool reminder, bool adjustRecurren
set_deferral(NORMAL_DEFERRAL);
if (adjustRecurrence)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mainEndRepeatTime() < now)
{
// The last repetition (if any) of the current recurrence has already passed.
@@ -1641,7 +1641,7 @@ void KAEvent::cancelDefer()
// Set the deferral time to be the same as the next recurrence/repetition.
// This prevents an immediate retriggering of the alarm.
if (mMainExpired
- || nextOccurrence(QDateTime::currentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE)
+ || nextOccurrence(TQDateTime::currentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE)
{
// The main alarm has expired, so simply delete the deferral
mDeferralTime = DateTime();
@@ -1678,7 +1678,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const
// It's a repeated alarm. Don't allow it to be deferred past its
// next occurrence or repetition.
DateTime reminderTime;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
OccurType type = nextOccurrence(now, endTime, RETURN_REPETITION);
if (type & OCCURRENCE_REPEAT)
ltype = LIMIT_REPETITION;
@@ -1695,7 +1695,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const
ltype = LIMIT_RECURRENCE;
}
else if ((mReminderMinutes || mDeferral == REMINDER_DEFERRAL || mArchiveReminderMinutes)
- && QDateTime::currentDateTime() < mNextMainDateTime.dateTime())
+ && TQDateTime::currentDateTime() < mNextMainDateTime.dateTime())
{
// It's an reminder alarm. Don't allow it to be deferred past its main alarm time.
endTime = mNextMainDateTime;
@@ -1719,7 +1719,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const
* saved in case their end time expires before the next login.
* Reply = true if successful, false if alarm was not copied.
*/
-bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const QDateTime& repeatAtLoginTime)
+bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const TQDateTime& repeatAtLoginTime)
{
if (!mDisplaying
&& (alarmType == KAAlarm::MAIN_ALARM
@@ -1804,9 +1804,9 @@ void KAEvent::reinstateFromDisplaying(const KAEvent& dispEvent)
* If 'includeRepetitions' is true and the alarm has a sub-repetition, it
* returns true if any repetitions occur after the specified date/time.
*/
-bool KAEvent::occursAfter(const QDateTime& preDateTime, bool includeRepetitions) const
+bool KAEvent::occursAfter(const TQDateTime& preDateTime, bool includeRepetitions) const
{
- QDateTime dt;
+ TQDateTime dt;
if (checkRecur() != KARecurrence::NO_RECUR)
{
if (mRecurrence->duration() < 0)
@@ -1817,7 +1817,7 @@ bool KAEvent::occursAfter(const QDateTime& preDateTime, bool includeRepetitions)
dt = mNextMainDateTime.dateTime();
if (mStartDateTime.isDateOnly())
{
- QDate pre = preDateTime.date();
+ TQDate pre = preDateTime.date();
if (preDateTime.time() < Preferences::startOfDay())
pre = pre.addDays(-1); // today's recurrence (if today recurs) is still to come
if (pre < dt.date())
@@ -1839,11 +1839,11 @@ bool KAEvent::occursAfter(const QDateTime& preDateTime, bool includeRepetitions)
* date/time.
* 'result' = date/time of next occurrence, or invalid date/time if none.
*/
-KAEvent::OccurType KAEvent::nextOccurrence(const QDateTime& preDateTime, DateTime& result,
+KAEvent::OccurType KAEvent::nextOccurrence(const TQDateTime& preDateTime, DateTime& result,
KAEvent::OccurOption includeRepetitions) const
{
int repeatSecs = 0;
- QDateTime pre = preDateTime;
+ TQDateTime pre = preDateTime;
if (includeRepetitions != IGNORE_REPETITION)
{
if (!mRepeatCount || !mRepeatInterval)
@@ -1914,11 +1914,11 @@ KAEvent::OccurType KAEvent::nextOccurrence(const QDateTime& preDateTime, DateTim
* last previous repetition is returned if appropriate.
* 'result' = date/time of previous occurrence, or invalid date/time if none.
*/
-KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, DateTime& result, bool includeRepetitions) const
+KAEvent::OccurType KAEvent::previousOccurrence(const TQDateTime& afterDateTime, DateTime& result, bool includeRepetitions) const
{
if (mStartDateTime >= afterDateTime)
{
- result = QDateTime();
+ result = TQDateTime();
return NO_OCCURRENCE; // the event starts after the specified date/time
}
@@ -1931,11 +1931,11 @@ KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, D
}
else
{
- QDateTime recurStart = mRecurrence->startDateTime();
- QDateTime after = afterDateTime;
+ TQDateTime recurStart = mRecurrence->startDateTime();
+ TQDateTime after = afterDateTime;
if (mStartDateTime.isDateOnly() && afterDateTime.time() > Preferences::startOfDay())
after = after.addDays(1); // today's recurrence (if today recurs) has passed
- QDateTime dt = mRecurrence->getPreviousDateTime(after);
+ TQDateTime dt = mRecurrence->getPreviousDateTime(after);
result.set(dt, mStartDateTime.isDateOnly());
if (!dt.isValid())
return NO_OCCURRENCE;
@@ -1951,7 +1951,7 @@ KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, D
{
// Find the latest repetition which is before the specified time.
// N.B. This is coded to avoid 32-bit integer overflow which occurs
- // in QDateTime::secsTo() for large enough time differences.
+ // in TQDateTime::secsTo() for large enough time differences.
int repeatSecs = mRepeatInterval * 60;
DateTime lastRepetition = result.addSecs(mRepeatCount * repeatSecs);
if (lastRepetition < afterDateTime)
@@ -1977,11 +1977,11 @@ KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, D
* recurrence occurs after the specified date/time, that repetition is set as
* the next occurrence.
*/
-KAEvent::OccurType KAEvent::setNextOccurrence(const QDateTime& preDateTime)
+KAEvent::OccurType KAEvent::setNextOccurrence(const TQDateTime& preDateTime)
{
if (preDateTime < mNextMainDateTime.dateTime())
return FIRST_OR_ONLY_OCCURRENCE; // it might not be the first recurrence - tant pis
- QDateTime pre = preDateTime;
+ TQDateTime pre = preDateTime;
// If there are repetitions, adjust the comparison date/time so that
// we find the earliest recurrence which has a repetition falling after
// the specified preDateTime.
@@ -2053,16 +2053,16 @@ KAEvent::OccurType KAEvent::setNextOccurrence(const QDateTime& preDateTime)
* date/time.
* 'result' = date/time of next occurrence, or invalid date/time if none.
*/
-KAEvent::OccurType KAEvent::nextRecurrence(const QDateTime& preDateTime, DateTime& result) const
+KAEvent::OccurType KAEvent::nextRecurrence(const TQDateTime& preDateTime, DateTime& result) const
{
- QDateTime recurStart = mRecurrence->startDateTime();
- QDateTime pre = preDateTime;
+ TQDateTime recurStart = mRecurrence->startDateTime();
+ TQDateTime pre = preDateTime;
if (mStartDateTime.isDateOnly() && preDateTime.time() < Preferences::startOfDay())
{
pre = pre.addDays(-1); // today's recurrence (if today recurs) is still to come
pre.setTime(Preferences::startOfDay());
}
- QDateTime dt = mRecurrence->getNextDateTime(pre);
+ TQDateTime dt = mRecurrence->getNextDateTime(pre);
result.set(dt, mStartDateTime.isDateOnly());
if (!dt.isValid())
return NO_OCCURRENCE;
@@ -2076,7 +2076,7 @@ KAEvent::OccurType KAEvent::nextRecurrence(const QDateTime& preDateTime, DateTim
/******************************************************************************
* Return the recurrence interval as text suitable for display.
*/
-QString KAEvent::recurrenceText(bool brief) const
+TQString KAEvent::recurrenceText(bool brief) const
{
if (mRepeatAtLogin)
return brief ? i18n("Brief form of 'At Login'", "Login") : i18n("At login");
@@ -2092,8 +2092,8 @@ QString KAEvent::recurrenceText(bool brief) const
return i18n("1 Hour", "%n Hours", frequency/60);
else
{
- QString mins;
- return i18n("Hours and Minutes", "%1H %2M").arg(QString::number(frequency/60)).arg(mins.sprintf("%02d", frequency%60));
+ TQString mins;
+ return i18n("Hours and Minutes", "%1H %2M").arg(TQString::number(frequency/60)).arg(mins.sprintf("%02d", frequency%60));
}
case RecurrenceRule::rDaily:
return i18n("1 Day", "%n Days", frequency);
@@ -2108,13 +2108,13 @@ QString KAEvent::recurrenceText(bool brief) const
break;
}
}
- return brief ? QString::null : i18n("None");
+ return brief ? TQString::null : i18n("None");
}
/******************************************************************************
* Return the repetition interval as text suitable for display.
*/
-QString KAEvent::repetitionText(bool brief) const
+TQString KAEvent::repetitionText(bool brief) const
{
if (mRepeatCount)
{
@@ -2124,14 +2124,14 @@ QString KAEvent::repetitionText(bool brief) const
return i18n("1 Minute", "%n Minutes", mRepeatInterval);
if (mRepeatInterval % 60 == 0)
return i18n("1 Hour", "%n Hours", mRepeatInterval/60);
- QString mins;
- return i18n("Hours and Minutes", "%1H %2M").arg(QString::number(mRepeatInterval/60)).arg(mins.sprintf("%02d", mRepeatInterval%60));
+ TQString mins;
+ return i18n("Hours and Minutes", "%1H %2M").arg(TQString::number(mRepeatInterval/60)).arg(mins.sprintf("%02d", mRepeatInterval%60));
}
if (mRepeatInterval % (7*1440))
return i18n("1 Day", "%n Days", mRepeatInterval/1440);
return i18n("1 Week", "%n Weeks", mRepeatInterval/(7*1440));
}
- return brief ? QString::null : i18n("None");
+ return brief ? TQString::null : i18n("None");
}
/******************************************************************************
@@ -2157,7 +2157,7 @@ void KAEvent::setFirstRecurrence()
case KARecurrence::MONTHLY_DAY:
break;
}
- QDateTime recurStart = mRecurrence->startDateTime();
+ TQDateTime recurStart = mRecurrence->startDateTime();
if (mRecurrence->recursOn(recurStart.date()))
return; // it already recurs on the start date
@@ -2236,7 +2236,7 @@ bool KAEvent::setRepetition(int interval, int count)
* end = end date/time (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurMinutely(int freq, int count, const QDateTime& end)
+bool KAEvent::setRecurMinutely(int freq, int count, const TQDateTime& end)
{
return setRecur(RecurrenceRule::rMinutely, freq, count, end);
}
@@ -2252,7 +2252,7 @@ bool KAEvent::setRecurMinutely(int freq, int count, const QDateTime& end)
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurDaily(int freq, const QBitArray& days, int count, const QDate& end)
+bool KAEvent::setRecurDaily(int freq, const TQBitArray& days, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rDaily, freq, count, end))
return false;
@@ -2278,7 +2278,7 @@ bool KAEvent::setRecurDaily(int freq, const QBitArray& days, int count, const QD
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurWeekly(int freq, const QBitArray& days, int count, const QDate& end)
+bool KAEvent::setRecurWeekly(int freq, const TQBitArray& days, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rWeekly, freq, count, end))
return false;
@@ -2297,11 +2297,11 @@ bool KAEvent::setRecurWeekly(int freq, const QBitArray& days, int count, const Q
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurMonthlyByDate(int freq, const QValueList<int>& days, int count, const QDate& end)
+bool KAEvent::setRecurMonthlyByDate(int freq, const TQValueList<int>& days, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rMonthly, freq, count, end))
return false;
- for (QValueListConstIterator<int> it = days.begin(); it != days.end(); ++it)
+ for (TQValueListConstIterator<int> it = days.begin(); it != days.end(); ++it)
mRecurrence->addMonthlyDate(*it);
return true;
}
@@ -2318,11 +2318,11 @@ bool KAEvent::setRecurMonthlyByDate(int freq, const QValueList<int>& days, int c
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& posns, int count, const QDate& end)
+bool KAEvent::setRecurMonthlyByPos(int freq, const TQValueList<MonthPos>& posns, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rMonthly, freq, count, end))
return false;
- for (QValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
+ for (TQValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
mRecurrence->addMonthlyPos((*it).weeknum, (*it).days);
return true;
}
@@ -2341,11 +2341,11 @@ bool KAEvent::setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& posns,
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurAnnualByDate(int freq, const QValueList<int>& months, int day, KARecurrence::Feb29Type feb29, int count, const QDate& end)
+bool KAEvent::setRecurAnnualByDate(int freq, const TQValueList<int>& months, int day, KARecurrence::Feb29Type feb29, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rYearly, freq, count, end, feb29))
return false;
- for (QValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
+ for (TQValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
mRecurrence->addYearlyMonth(*it);
if (day)
mRecurrence->addMonthlyDate(day);
@@ -2365,13 +2365,13 @@ bool KAEvent::setRecurAnnualByDate(int freq, const QValueList<int>& months, int
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurAnnualByPos(int freq, const QValueList<MonthPos>& posns, const QValueList<int>& months, int count, const QDate& end)
+bool KAEvent::setRecurAnnualByPos(int freq, const TQValueList<MonthPos>& posns, const TQValueList<int>& months, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rYearly, freq, count, end))
return false;
- for (QValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
+ for (TQValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
mRecurrence->addYearlyMonth(*it);
- for (QValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
+ for (TQValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
mRecurrence->addYearlyPos((*it).weeknum, (*it).days);
return true;
}
@@ -2386,7 +2386,7 @@ bool KAEvent::setRecurAnnualByPos(int freq, const QValueList<MonthPos>& posns, c
* end = end date/time (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecur(RecurrenceRule::PeriodType recurType, int freq, int count, const QDateTime& end, KARecurrence::Feb29Type feb29)
+bool KAEvent::setRecur(RecurrenceRule::PeriodType recurType, int freq, int count, const TQDateTime& end, KARecurrence::Feb29Type feb29)
{
if (count >= -1 && (count || end.date().isValid()))
{
@@ -2483,17 +2483,17 @@ void KAEvent::checkRepetition() const
#if 0
/******************************************************************************
- * Convert a QValueList<WDayPos> to QValueList<MonthPos>.
+ * Convert a TQValueList<WDayPos> to TQValueList<MonthPos>.
*/
-QValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const QValueList<KCal::RecurrenceRule::WDayPos>& wdaypos)
+TQValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const TQValueList<KCal::RecurrenceRule::WDayPos>& wdaypos)
{
- QValueList<MonthPos> mposns;
- for (QValueList<KCal::RecurrenceRule::WDayPos>::ConstIterator it = wdaypos.begin(); it != wdaypos.end(); ++it)
+ TQValueList<MonthPos> mposns;
+ for (TQValueList<KCal::RecurrenceRule::WDayPos>::ConstIterator it = wdaypos.begin(); it != wdaypos.end(); ++it)
{
int daybit = (*it).day() - 1;
int weeknum = (*it).pos();
bool found = false;
- for (QValueList<MonthPos>::Iterator mit = mposns.begin(); mit != mposns.end(); ++mit)
+ for (TQValueList<MonthPos>::Iterator mit = mposns.begin(); mit != mposns.end(); ++mit)
{
if ((*mit).weeknum == weeknum)
{
@@ -2519,7 +2519,7 @@ QValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const QValueList<KCal::Recur
* Find the alarm template with the specified name.
* Reply = invalid event if not found.
*/
-KAEvent KAEvent::findTemplateName(AlarmCalendar& calendar, const QString& name)
+KAEvent KAEvent::findTemplateName(AlarmCalendar& calendar, const TQString& name)
{
KAEvent event;
Event::List events = calendar.events();
@@ -2546,19 +2546,19 @@ KAEvent KAEvent::findTemplateName(AlarmCalendar& calendar, const QString& name)
bool KAEvent::adjustStartOfDay(const Event::List& events)
{
bool changed = false;
- QTime startOfDay = Preferences::startOfDay();
+ TQTime startOfDay = Preferences::startOfDay();
for (Event::List::ConstIterator evit = events.begin(); evit != events.end(); ++evit)
{
Event* event = *evit;
- const QStringList cats = event->categories();
+ const TQStringList cats = event->categories();
if (cats.find(DATE_ONLY_CATEGORY) != cats.end())
{
// It's an untimed event, so fix it
- QTime oldTime = event->dtStart().time();
+ TQTime oldTime = event->dtStart().time();
int adjustment = oldTime.secsTo(startOfDay);
if (adjustment)
{
- event->setDtStart(QDateTime(event->dtStart().date(), startOfDay));
+ event->setDtStart(TQDateTime(event->dtStart().date(), startOfDay));
Alarm::List alarms = event->alarms();
int deferralOffset = 0;
for (Alarm::List::ConstIterator alit = alarms.begin(); alit != alarms.end(); ++alit)
@@ -2589,7 +2589,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
int deferralOffset = 0;
int newDeferralOffset = 0;
DateTime start;
- QDateTime nextMainDateTime = readDateTime(*event, false, start).rawDateTime();
+ TQDateTime nextMainDateTime = readDateTime(*event, false, start).rawDateTime();
AlarmMap alarmMap;
readAlarms(*event, &alarmMap);
for (AlarmMap::Iterator it = alarmMap.begin(); it != alarmMap.end(); ++it)
@@ -2601,7 +2601,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
&& !(data.type & KAAlarm::TIMED_DEFERRAL_FLAG))
{
// Date-only deferral alarm, so adjust its time
- QDateTime altime = nextMainDateTime.addSecs(data.alarm->startOffset().asSeconds());
+ TQDateTime altime = nextMainDateTime.addSecs(data.alarm->startOffset().asSeconds());
altime.setTime(startOfDay);
deferralOffset = data.alarm->startOffset().asSeconds();
newDeferralOffset = event->dtStart().secsTo(altime);
@@ -2629,28 +2629,28 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adjustSummerTime)
{
// KAlarm pre-0.9 codes held in the alarm's DESCRIPTION property
- static const QChar SEPARATOR = ';';
- static const QChar LATE_CANCEL_CODE = 'C';
- static const QChar AT_LOGIN_CODE = 'L'; // subsidiary alarm at every login
- static const QChar DEFERRAL_CODE = 'D'; // extra deferred alarm
- static const QString TEXT_PREFIX = QString::fromLatin1("TEXT:");
- static const QString FILE_PREFIX = QString::fromLatin1("FILE:");
- static const QString COMMAND_PREFIX = QString::fromLatin1("CMD:");
+ static const TQChar SEPARATOR = ';';
+ static const TQChar LATE_CANCEL_CODE = 'C';
+ static const TQChar AT_LOGIN_CODE = 'L'; // subsidiary alarm at every login
+ static const TQChar DEFERRAL_CODE = 'D'; // extra deferred alarm
+ static const TQString TEXT_PREFIX = TQString::fromLatin1("TEXT:");
+ static const TQString FILE_PREFIX = TQString::fromLatin1("FILE:");
+ static const TQString COMMAND_PREFIX = TQString::fromLatin1("CMD:");
// KAlarm pre-0.9.2 codes held in the event's CATEGORY property
- static const QString BEEP_CATEGORY = QString::fromLatin1("BEEP");
+ static const TQString BEEP_CATEGORY = TQString::fromLatin1("BEEP");
// KAlarm pre-1.1.1 LATECANCEL category with no parameter
- static const QString LATE_CANCEL_CAT = QString::fromLatin1("LATECANCEL");
+ static const TQString LATE_CANCEL_CAT = TQString::fromLatin1("LATECANCEL");
// KAlarm pre-1.3.0 TMPLDEFTIME category with no parameter
- static const QString TEMPL_DEF_TIME_CAT = QString::fromLatin1("TMPLDEFTIME");
+ static const TQString TEMPL_DEF_TIME_CAT = TQString::fromLatin1("TMPLDEFTIME");
// KAlarm pre-1.3.1 XTERM category
- static const QString EXEC_IN_XTERM_CAT = QString::fromLatin1("XTERM");
+ static const TQString EXEC_IN_XTERM_CAT = TQString::fromLatin1("XTERM");
// KAlarm pre-1.4.22 properties
- static const QCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property
+ static const TQCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property
if (version >= calVersion())
return;
@@ -2667,8 +2667,8 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
bool pre_1_5_0 = (version < KAlarm::Version(1,5,0));
Q_ASSERT(calVersion() == KAlarm::Version(1,5,0));
- QDateTime dt0(QDate(1970,1,1), QTime(0,0,0));
- QTime startOfDay = Preferences::startOfDay();
+ TQDateTime dt0(TQDate(1970,1,1), TQTime(0,0,0));
+ TQTime startOfDay = Preferences::startOfDay();
Event::List events = calendar.rawEvents();
for (Event::List::ConstIterator evit = events.begin(); evit != events.end(); ++evit)
@@ -2677,7 +2677,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm::List alarms = event->alarms();
if (alarms.isEmpty())
continue; // KAlarm isn't interested in events without alarms
- QStringList cats = event->categories();
+ TQStringList cats = event->categories();
bool addLateCancel = false;
if (pre_0_7 && event->doesFloat())
@@ -2708,7 +2708,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
bool deferral = false;
bool lateCancel = false;
KAAlarmEventBase::Type action = T_MESSAGE;
- QString txt = alarm->text();
+ TQString txt = alarm->text();
int length = txt.length();
int i = 0;
if (txt[0].isDigit())
@@ -2718,7 +2718,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
{
while (i < length)
{
- QChar ch = txt[i++];
+ TQChar ch = txt[i++];
if (ch == SEPARATOR)
break;
if (ch == LATE_CANCEL_CODE)
@@ -2748,7 +2748,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
i = 0;
txt = txt.mid(i);
- QStringList types;
+ TQStringList types;
switch (action)
{
case T_FILE:
@@ -2794,7 +2794,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
{
// The calendar file was written by the KDE 3.0.0 version of KAlarm 0.5.7.
// Summer time was ignored when converting to UTC.
- QDateTime dt = alarm->time();
+ TQDateTime dt = alarm->time();
time_t t = dt0.secsTo(dt);
struct tm* dtm = localtime(&t);
if (dtm->tm_isdst)
@@ -2820,7 +2820,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
*/
if (uidStatus(event->uid()) == EXPIRED)
event->setCreated(event->dtEnd());
- QDateTime start = event->dtStart();
+ TQDateTime start = event->dtStart();
if (event->doesFloat())
{
event->setFloats(false);
@@ -2833,7 +2833,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
for (alit = alarms.begin(); alit != alarms.end(); ++alit)
{
Alarm* alarm = *alit;
- QDateTime dt = alarm->time();
+ TQDateTime dt = alarm->time();
alarm->setStartOffset(start.secsTo(dt));
}
@@ -2844,12 +2844,12 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = *alit;
if (alarm->type() == Alarm::Display)
alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY,
- QString::fromLatin1("%1;;").arg(cats[0]));
+ TQString::fromLatin1("%1;;").arg(cats[0]));
}
cats.remove(cats.begin());
}
- for (QStringList::Iterator it = cats.begin(); it != cats.end(); ++it)
+ for (TQStringList::Iterator it = cats.begin(); it != cats.end(); ++it)
{
if (*it == BEEP_CATEGORY)
{
@@ -2858,7 +2858,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = event->newAlarm();
alarm->setEnabled(true);
alarm->setAudioAlarm();
- QDateTime dt = event->dtStart(); // default
+ TQDateTime dt = event->dtStart(); // default
// Parse and order the alarms to know which one's date/time to use
AlarmMap alarmMap;
@@ -2881,7 +2881,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* It's a KAlarm pre-1.1.1 calendar file.
* Convert simple LATECANCEL category to LATECANCEL:n where n = minutes late.
*/
- QStringList::Iterator it;
+ TQStringList::Iterator it;
while ((it = cats.find(LATE_CANCEL_CAT)) != cats.end())
{
cats.remove(it);
@@ -2900,8 +2900,8 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = *alit;
if (alarm->type() == Alarm::Display)
{
- QString oldtext = alarm->text();
- QString newtext = AlarmText::toCalendarText(oldtext);
+ TQString oldtext = alarm->text();
+ TQString newtext = AlarmText::toCalendarText(oldtext);
if (oldtext != newtext)
alarm->setDisplayAlarm(newtext);
}
@@ -2914,11 +2914,11 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* It's a KAlarm pre-1.3.0 calendar file.
* Convert simple TMPLDEFTIME category to TMPLAFTTIME:n where n = minutes after.
*/
- QStringList::Iterator it;
+ TQStringList::Iterator it;
while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end())
{
cats.remove(it);
- cats.append(QString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0));
+ cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0));
}
}
@@ -2928,7 +2928,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* It's a KAlarm pre-1.3.1 calendar file.
* Convert simple XTERM category to LOG:xterm:
*/
- QStringList::Iterator it;
+ TQStringList::Iterator it;
while ((it = cats.find(EXEC_IN_XTERM_CAT)) != cats.end())
{
cats.remove(it);
@@ -2937,7 +2937,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
}
if (addLateCancel)
- cats.append(QString("%1%2").arg(LATE_CANCEL_CATEGORY).arg(1));
+ cats.append(TQString("%1%2").arg(LATE_CANCEL_CATEGORY).arg(1));
event->setCategories(cats);
@@ -2964,11 +2964,11 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
if (!alarm->hasStartOffset())
continue;
bool mainAlarm = true;
- QString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
- QStringList types = QStringList::split(QChar(','), property);
+ TQString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
+ TQStringList types = TQStringList::split(TQChar(','), property);
for (unsigned int i = 0; i < types.count(); ++i)
{
- QString type = types[i];
+ TQString type = types[i];
if (type == AT_LOGIN_TYPE
|| type == TIME_DEFERRAL_TYPE
|| type == DATE_DEFERRAL_TYPE
@@ -2986,7 +2986,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
nextMainDateTime.setDateOnly(dateOnly);
if (nextMainDateTime != startDateTime)
{
- QDateTime dt = nextMainDateTime.dateTime();
+ TQDateTime dt = nextMainDateTime.dateTime();
event->setCustomProperty(APPNAME, NEXT_RECUR_PROPERTY,
dt.toString(dateOnly ? "yyyyMMdd" : "yyyyMMddThhmmss"));
}
@@ -3013,11 +3013,11 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = *alit;
if (!alarm->hasStartOffset())
continue;
- QString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
- QStringList types = QStringList::split(QChar(','), property);
+ TQString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
+ TQStringList types = TQStringList::split(TQChar(','), property);
for (unsigned int i = 0; i < types.count(); ++i)
{
- QString type = types[i];
+ TQString type = types[i];
if (type == TIME_DEFERRAL_TYPE
|| type == DATE_DEFERRAL_TYPE)
{
@@ -3039,12 +3039,12 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
for (Alarm::List::ConstIterator alit = alarms.begin(); alit != alarms.end(); ++alit)
{
Alarm* alarm = *alit;
- QString name = alarm->customProperty(APPNAME, KMAIL_ID_PROPERTY);
+ TQString name = alarm->customProperty(APPNAME, KMAIL_ID_PROPERTY);
if (name.isEmpty())
continue;
uint id = KAMail::identityUoid(name);
if (id)
- alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, QString::number(id));
+ alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, TQString::number(id));
alarm->removeCustomProperty(APPNAME, KMAIL_ID_PROPERTY);
}
convertRepetition(event);
@@ -3299,7 +3299,7 @@ int KAAlarmEventBase::flags() const
| (mCommandScript ? KAEvent::SCRIPT : 0);
}
-const QFont& KAAlarmEventBase::font() const
+const TQFont& KAAlarmEventBase::font() const
{
return mDefaultFont ? Preferences::messageFont() : mFont;
}
@@ -3365,10 +3365,10 @@ void KAAlarmEventBase::dumpDebug() const
* Sets the list of email addresses, removing any empty addresses.
* Reply = false if empty addresses were found.
*/
-EmailAddressList& EmailAddressList::operator=(const QValueList<Person>& addresses)
+EmailAddressList& EmailAddressList::operator=(const TQValueList<Person>& addresses)
{
clear();
- for (QValueList<Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
+ for (TQValueList<Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
{
if (!(*it).email().isEmpty())
append(*it);
@@ -3380,11 +3380,11 @@ EmailAddressList& EmailAddressList::operator=(const QValueList<Person>& addresse
* Return the email address list as a string, each address being delimited by
* the specified separator string.
*/
-QString EmailAddressList::join(const QString& separator) const
+TQString EmailAddressList::join(const TQString& separator) const
{
- QString result;
+ TQString result;
bool first = true;
- for (QValueList<Person>::ConstIterator it = begin(); it != end(); ++it)
+ for (TQValueList<Person>::ConstIterator it = begin(); it != end(); ++it)
{
if (first)
first = false;
@@ -3392,14 +3392,14 @@ QString EmailAddressList::join(const QString& separator) const
result += separator;
bool quote = false;
- QString name = (*it).name();
+ TQString name = (*it).name();
if (!name.isEmpty())
{
// Need to enclose the name in quotes if it has any special characters
int len = name.length();
for (int i = 0; i < len; ++i)
{
- QChar ch = name[i];
+ TQChar ch = name[i];
if (!ch.isLetterOrNumber())
{
quote = true;
@@ -3429,17 +3429,17 @@ QString EmailAddressList::join(const QString& separator) const
* The command line is first split into its program file and arguments before
* initialising the alarm.
*/
-static void setProcedureAlarm(Alarm* alarm, const QString& commandLine)
+static void setProcedureAlarm(Alarm* alarm, const TQString& commandLine)
{
- QString command = QString::null;
- QString arguments = QString::null;
- QChar quoteChar;
+ TQString command = TQString::null;
+ TQString arguments = TQString::null;
+ TQChar quoteChar;
bool quoted = false;
uint posMax = commandLine.length();
uint pos;
for (pos = 0; pos < posMax; ++pos)
{
- QChar ch = commandLine[pos];
+ TQChar ch = commandLine[pos];
if (quoted)
{
if (ch == quoteChar)
diff --git a/kalarm/alarmevent.h b/kalarm/alarmevent.h
index ff8ab3056..91bf24289 100644
--- a/kalarm/alarmevent.h
+++ b/kalarm/alarmevent.h
@@ -23,8 +23,8 @@
/** @file alarmevent.h - represents calendar alarms and events */
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include <libkcal/person.h>
#include <libkcal/event.h>
@@ -42,13 +42,13 @@ struct AlarmData;
typedef KCal::Person EmailAddress;
-class EmailAddressList : public QValueList<KCal::Person>
+class EmailAddressList : public TQValueList<KCal::Person>
{
public:
- EmailAddressList() : QValueList<KCal::Person>() { }
- EmailAddressList(const QValueList<KCal::Person>& list) { operator=(list); }
- EmailAddressList& operator=(const QValueList<KCal::Person>&);
- QString join(const QString& separator) const;
+ EmailAddressList() : TQValueList<KCal::Person>() { }
+ EmailAddressList(const TQValueList<KCal::Person>& list) { operator=(list); }
+ EmailAddressList& operator=(const TQValueList<KCal::Person>&);
+ TQString join(const TQString& separator) const;
};
@@ -57,21 +57,21 @@ class KAAlarmEventBase
{
public:
~KAAlarmEventBase() { }
- const QString& cleanText() const { return mText; }
- QString message() const { return (mActionType == T_MESSAGE || mActionType == T_EMAIL) ? mText : QString::null; }
- QString fileName() const { return (mActionType == T_FILE) ? mText : QString::null; }
- QString command() const { return (mActionType == T_COMMAND) ? mText : QString::null; }
+ const TQString& cleanText() const { return mText; }
+ TQString message() const { return (mActionType == T_MESSAGE || mActionType == T_EMAIL) ? mText : TQString::null; }
+ TQString fileName() const { return (mActionType == T_FILE) ? mText : TQString::null; }
+ TQString command() const { return (mActionType == T_COMMAND) ? mText : TQString::null; }
uint emailFromId() const { return mEmailFromIdentity; }
const EmailAddressList& emailAddresses() const { return mEmailAddresses; }
- QString emailAddresses(const QString& sep) const { return mEmailAddresses.join(sep); }
- const QString& emailSubject() const { return mEmailSubject; }
- const QStringList& emailAttachments() const { return mEmailAttachments; }
- QString emailAttachments(const QString& sep) const { return mEmailAttachments.join(sep); }
+ TQString emailAddresses(const TQString& sep) const { return mEmailAddresses.join(sep); }
+ const TQString& emailSubject() const { return mEmailSubject; }
+ const TQStringList& emailAttachments() const { return mEmailAttachments; }
+ TQString emailAttachments(const TQString& sep) const { return mEmailAttachments.join(sep); }
bool emailBcc() const { return mEmailBcc; }
- const QColor& bgColour() const { return mBgColour; }
- const QColor& fgColour() const { return mFgColour; }
+ const TQColor& bgColour() const { return mBgColour; }
+ const TQColor& fgColour() const { return mFgColour; }
bool defaultFont() const { return mDefaultFont; }
- const QFont& font() const;
+ const TQFont& font() const;
int lateCancel() const { return mLateCancel; }
bool autoClose() const { return mAutoClose; }
bool commandScript() const { return mCommandScript; }
@@ -99,16 +99,16 @@ class KAAlarmEventBase
void copy(const KAAlarmEventBase&);
void set(int flags);
- QString mEventID; // UID: KCal::Event unique ID
- QString mText; // message text, file URL, command, email body [or audio file for KAAlarm]
+ TQString mEventID; // UID: KCal::Event unique ID
+ TQString mText; // message text, file URL, command, email body [or audio file for KAAlarm]
DateTime mNextMainDateTime; // next time to display the alarm, excluding repetitions
- QColor mBgColour; // background colour of alarm message
- QColor mFgColour; // foreground colour of alarm message, or invalid for default
- QFont mFont; // font of alarm message (ignored if mDefaultFont true)
+ TQColor mBgColour; // background colour of alarm message
+ TQColor mFgColour; // foreground colour of alarm message, or invalid for default
+ TQFont mFont; // font of alarm message (ignored if mDefaultFont true)
uint mEmailFromIdentity;// KMail identity for email 'From' field, or empty
EmailAddressList mEmailAddresses; // ATTENDEE: addresses to send email to
- QString mEmailSubject; // SUMMARY: subject line of email
- QStringList mEmailAttachments; // ATTACH: email attachment file names
+ TQString mEmailSubject; // SUMMARY: subject line of email
+ TQStringList mEmailAttachments; // ATTACH: email attachment file names
float mSoundVolume; // volume for sound file, or < 0 for unspecified
float mFadeVolume; // initial volume for sound file, or < 0 for no fade
int mFadeSeconds; // fade time for sound file, or 0 if none
@@ -194,13 +194,13 @@ class KAAlarm : public KAAlarmEventBase
bool valid() const { return mType != INVALID__ALARM; }
Type type() const { return static_cast<Type>(mType & ~TIMED_DEFERRAL_FLAG); }
SubType subType() const { return mType; }
- const QString& eventID() const { return mEventID; }
+ const TQString& eventID() const { return mEventID; }
DateTime dateTime(bool withRepeats = false) const
{ return (withRepeats && mNextRepeat && mRepeatInterval)
? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; }
- QDate date() const { return mNextMainDateTime.date(); }
- QTime time() const { return mNextMainDateTime.time(); }
- QString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : QString::null; }
+ TQDate date() const { return mNextMainDateTime.date(); }
+ TQTime time() const { return mNextMainDateTime.time(); }
+ TQString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : TQString::null; }
float soundVolume() const { return (mActionType == T_AUDIO) && !mBeep && !mText.isEmpty() ? mSoundVolume : -1; }
float fadeVolume() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeSeconds && !mBeep && !mText.isEmpty() ? mFadeVolume : -1; }
int fadeSeconds() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeVolume >= 0 && !mBeep && !mText.isEmpty() ? mFadeSeconds : 0; }
@@ -208,7 +208,7 @@ class KAAlarm : public KAAlarmEventBase
bool reminder() const { return mType == REMINDER__ALARM; }
bool deferred() const { return mDeferred; }
void setTime(const DateTime& dt) { mNextMainDateTime = dt; }
- void setTime(const QDateTime& dt) { mNextMainDateTime = dt; }
+ void setTime(const TQDateTime& dt) { mNextMainDateTime = dt; }
int flags() const;
#ifdef NDEBUG
void dumpDebug() const { }
@@ -310,36 +310,36 @@ class KAEvent : public KAAlarmEventBase
};
KAEvent() : mRevision(0), mRecurrence(0), mAlarmCount(0) { }
- KAEvent(const QDateTime& dt, const QString& message, const QColor& bg, const QColor& fg, const QFont& f, Action action, int lateCancel, int flags)
+ KAEvent(const TQDateTime& dt, const TQString& message, const TQColor& bg, const TQColor& fg, const TQFont& f, Action action, int lateCancel, int flags)
: mRecurrence(0) { set(dt, message, bg, fg, f, action, lateCancel, flags); }
explicit KAEvent(const KCal::Event& e) : mRecurrence(0) { set(e); }
KAEvent(const KAEvent& e) : KAAlarmEventBase(e), mRecurrence(0) { copy(e); }
~KAEvent() { delete mRecurrence; }
KAEvent& operator=(const KAEvent& e) { if (&e != this) copy(e); return *this; }
void set(const KCal::Event&);
- void set(const QDateTime&, const QString& message, const QColor& bg, const QColor& fg, const QFont&, Action, int lateCancel, int flags);
- void setEmail(uint from, const EmailAddressList&, const QString& subject, const QStringList& attachments);
- void setAudioFile(const QString& filename, float volume, float fadeVolume, int fadeSeconds);
- void setTemplate(const QString& name, int afterTime = -1) { mTemplateName = name; mTemplateAfterTime = afterTime; mUpdated = true; }
- void setActions(const QString& pre, const QString& post) { mPreAction = pre; mPostAction = post; mUpdated = true; }
- OccurType setNextOccurrence(const QDateTime& preDateTime);
+ void set(const TQDateTime&, const TQString& message, const TQColor& bg, const TQColor& fg, const TQFont&, Action, int lateCancel, int flags);
+ void setEmail(uint from, const EmailAddressList&, const TQString& subject, const TQStringList& attachments);
+ void setAudioFile(const TQString& filename, float volume, float fadeVolume, int fadeSeconds);
+ void setTemplate(const TQString& name, int afterTime = -1) { mTemplateName = name; mTemplateAfterTime = afterTime; mUpdated = true; }
+ void setActions(const TQString& pre, const TQString& post) { mPreAction = pre; mPostAction = post; mUpdated = true; }
+ OccurType setNextOccurrence(const TQDateTime& preDateTime);
void setFirstRecurrence();
- void setEventID(const QString& id) { mEventID = id; mUpdated = true; }
- void setDate(const QDate& d) { mNextMainDateTime.set(d); mUpdated = true; }
- void setTime(const QDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; }
- void setSaveDateTime(const QDateTime& dt) { mSaveDateTime = dt; mUpdated = true; }
+ void setEventID(const TQString& id) { mEventID = id; mUpdated = true; }
+ void setDate(const TQDate& d) { mNextMainDateTime.set(d); mUpdated = true; }
+ void setTime(const TQDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; }
+ void setSaveDateTime(const TQDateTime& dt) { mSaveDateTime = dt; mUpdated = true; }
void setLateCancel(int lc) { mLateCancel = lc; mUpdated = true; }
void setAutoClose(bool ac) { mAutoClose = ac; mUpdated = true; }
void setRepeatAtLogin(bool rl) { mRepeatAtLogin = rl; mUpdated = true; }
void setUid(Status s) { mEventID = uid(mEventID, s); mUpdated = true; }
void setKMailSerialNumber(unsigned long n) { mKMailSerialNumber = n; }
- void setLogFile(const QString& logfile);
+ void setLogFile(const TQString& logfile);
void setReminder(int minutes, bool onceOnly);
bool defer(const DateTime&, bool reminder, bool adjustRecurrence = false);
void cancelDefer();
void cancelCancelledDeferral();
void setDeferDefaultMinutes(int minutes) { mDeferDefaultMinutes = minutes; mUpdated = true; }
- bool setDisplaying(const KAEvent&, KAAlarm::Type, const QDateTime&);
+ bool setDisplaying(const KAEvent&, KAAlarm::Type, const TQDateTime&);
void reinstateFromDisplaying(const KAEvent& dispEvent);
void setArchive() { mArchive = true; mUpdated = true; }
void setEnabled(bool enable) { mEnabled = enable; mUpdated = true; }
@@ -350,7 +350,7 @@ class KAEvent : public KAAlarmEventBase
KCal::Event* event() const; // convert to new Event
bool isTemplate() const { return !mTemplateName.isEmpty(); }
- const QString& templateName() const { return mTemplateName; }
+ const TQString& templateName() const { return mTemplateName; }
bool usingDefaultTime() const { return mTemplateAfterTime == 0; }
int templateAfterTime() const { return mTemplateAfterTime; }
KAAlarm alarm(KAAlarm::Type) const;
@@ -361,15 +361,15 @@ class KAEvent : public KAAlarmEventBase
bool updateKCalEvent(KCal::Event&, bool checkUid = true, bool original = false, bool cancelCancelledDefer = false) const;
Action action() const { return (Action)mActionType; }
bool displayAction() const { return mActionType == T_MESSAGE || mActionType == T_FILE; }
- const QString& id() const { return mEventID; }
+ const TQString& id() const { return mEventID; }
bool valid() const { return mAlarmCount && (mAlarmCount != 1 || !mRepeatAtLogin); }
int alarmCount() const { return mAlarmCount; }
const DateTime& startDateTime() const { return mStartDateTime; }
DateTime mainDateTime(bool withRepeats = false) const
{ return (withRepeats && mNextRepeat && mRepeatInterval)
? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; }
- QDate mainDate() const { return mNextMainDateTime.date(); }
- QTime mainTime() const { return mNextMainDateTime.time(); }
+ TQDate mainDate() const { return mNextMainDateTime.date(); }
+ TQTime mainTime() const { return mNextMainDateTime.time(); }
DateTime mainEndRepeatTime() const { return (mRepeatCount > 0 && mRepeatInterval)
? mNextMainDateTime.addSecs(mRepeatCount * mRepeatInterval * 60) : mNextMainDateTime; }
int reminder() const { return mReminderMinutes; }
@@ -380,28 +380,28 @@ class KAEvent : public KAAlarmEventBase
DateTime deferralLimit(DeferLimitType* = 0) const;
int deferDefaultMinutes() const { return mDeferDefaultMinutes; }
DateTime displayDateTime() const;
- const QString& messageFileOrCommand() const { return mText; }
- QString logFile() const { return mLogFile; }
+ const TQString& messageFileOrCommand() const { return mText; }
+ TQString logFile() const { return mLogFile; }
bool commandXterm() const { return mCommandXterm; }
unsigned long kmailSerialNumber() const { return mKMailSerialNumber; }
bool copyToKOrganizer() const { return mCopyToKOrganizer; }
- const QString& audioFile() const { return mAudioFile; }
+ const TQString& audioFile() const { return mAudioFile; }
float soundVolume() const { return !mAudioFile.isEmpty() ? mSoundVolume : -1; }
float fadeVolume() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeSeconds ? mFadeVolume : -1; }
int fadeSeconds() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeVolume >= 0 ? mFadeSeconds : 0; }
bool repeatSound() const { return mRepeatSound && !mAudioFile.isEmpty(); }
- const QString& preAction() const { return mPreAction; }
- const QString& postAction() const { return mPostAction; }
+ const TQString& preAction() const { return mPreAction; }
+ const TQString& postAction() const { return mPostAction; }
bool recurs() const { return checkRecur() != KARecurrence::NO_RECUR; }
KARecurrence::Type recurType() const { return checkRecur(); }
KARecurrence* recurrence() const { return mRecurrence; }
int recurInterval() const; // recurrence period in units of the recurrence period type (minutes, days, etc)
int longestRecurrenceInterval() const { return mRecurrence ? mRecurrence->longestInterval() : 0; }
- QString recurrenceText(bool brief = false) const;
- QString repetitionText(bool brief = false) const;
- bool occursAfter(const QDateTime& preDateTime, bool includeRepetitions) const;
- OccurType nextOccurrence(const QDateTime& preDateTime, DateTime& result, OccurOption = IGNORE_REPETITION) const;
- OccurType previousOccurrence(const QDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const;
+ TQString recurrenceText(bool brief = false) const;
+ TQString repetitionText(bool brief = false) const;
+ bool occursAfter(const TQDateTime& preDateTime, bool includeRepetitions) const;
+ OccurType nextOccurrence(const TQDateTime& preDateTime, DateTime& result, OccurOption = IGNORE_REPETITION) const;
+ OccurType previousOccurrence(const TQDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const;
int flags() const;
bool deferred() const { return mDeferral > 0; }
bool toBeArchived() const { return mArchive; }
@@ -410,34 +410,34 @@ class KAEvent : public KAAlarmEventBase
bool mainExpired() const { return mMainExpired; }
bool expired() const { return mDisplaying && mMainExpired || uidStatus(mEventID) == EXPIRED; }
Status uidStatus() const { return uidStatus(mEventID); }
- static Status uidStatus(const QString& uid);
- static QString uid(const QString& id, Status);
- static KAEvent findTemplateName(AlarmCalendar&, const QString& name);
+ static Status uidStatus(const TQString& uid);
+ static TQString uid(const TQString& id, Status);
+ static KAEvent findTemplateName(AlarmCalendar&, const TQString& name);
struct MonthPos
{
MonthPos() : days(7) { }
int weeknum; // week in month, or < 0 to count from end of month
- QBitArray days; // days in week
+ TQBitArray days; // days in week
};
bool setRepetition(int interval, int count);
void setNoRecur() { clearRecur(); }
void setRecurrence(const KARecurrence&);
- bool setRecurMinutely(int freq, int count, const QDateTime& end);
- bool setRecurDaily(int freq, const QBitArray& days, int count, const QDate& end);
- bool setRecurWeekly(int freq, const QBitArray& days, int count, const QDate& end);
- bool setRecurMonthlyByDate(int freq, const QValueList<int>& days, int count, const QDate& end);
- bool setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& pos, int count, const QDate& end);
- bool setRecurAnnualByDate(int freq, const QValueList<int>& months, int day, KARecurrence::Feb29Type, int count, const QDate& end);
- bool setRecurAnnualByPos(int freq, const QValueList<MonthPos>& pos, const QValueList<int>& months, int count, const QDate& end);
-// static QValueList<MonthPos> convRecurPos(const QValueList<KCal::RecurrenceRule::WDayPos>&);
+ bool setRecurMinutely(int freq, int count, const TQDateTime& end);
+ bool setRecurDaily(int freq, const TQBitArray& days, int count, const TQDate& end);
+ bool setRecurWeekly(int freq, const TQBitArray& days, int count, const TQDate& end);
+ bool setRecurMonthlyByDate(int freq, const TQValueList<int>& days, int count, const TQDate& end);
+ bool setRecurMonthlyByPos(int freq, const TQValueList<MonthPos>& pos, int count, const TQDate& end);
+ bool setRecurAnnualByDate(int freq, const TQValueList<int>& months, int day, KARecurrence::Feb29Type, int count, const TQDate& end);
+ bool setRecurAnnualByPos(int freq, const TQValueList<MonthPos>& pos, const TQValueList<int>& months, int count, const TQDate& end);
+// static TQValueList<MonthPos> convRecurPos(const TQValueList<KCal::RecurrenceRule::WDayPos>&);
#ifdef NDEBUG
void dumpDebug() const { }
#else
void dumpDebug() const;
#endif
static int calVersion();
- static QString calVersionString();
+ static TQString calVersionString();
static bool adjustStartOfDay(const KCal::Event::List&);
static void convertKCalEvents(KCal::Calendar&, int version, bool adjustSummerTime);
static void convertRepetitions(KCal::CalendarLocal&);
@@ -451,15 +451,15 @@ class KAEvent : public KAAlarmEventBase
};
void copy(const KAEvent&);
- bool setRecur(KCal::RecurrenceRule::PeriodType, int freq, int count, const QDateTime& end, KARecurrence::Feb29Type = KARecurrence::FEB29_FEB29);
+ bool setRecur(KCal::RecurrenceRule::PeriodType, int freq, int count, const TQDateTime& end, KARecurrence::Feb29Type = KARecurrence::FEB29_FEB29);
void clearRecur();
KARecurrence::Type checkRecur() const;
void checkRepetition() const;
- OccurType nextRecurrence(const QDateTime& preDateTime, DateTime& result) const;
- OccurType previousRecurrence(const QDateTime& afterDateTime, DateTime& result) const;
+ OccurType nextRecurrence(const TQDateTime& preDateTime, DateTime& result) const;
+ OccurType previousRecurrence(const TQDateTime& afterDateTime, DateTime& result) const;
static bool convertRepetition(KCal::Event*);
- KCal::Alarm* initKCalAlarm(KCal::Event&, const DateTime&, const QStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
- KCal::Alarm* initKCalAlarm(KCal::Event&, int startOffsetSecs, const QStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
+ KCal::Alarm* initKCalAlarm(KCal::Event&, const DateTime&, const TQStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
+ KCal::Alarm* initKCalAlarm(KCal::Event&, int startOffsetSecs, const TQStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
static DateTime readDateTime(const KCal::Event&, bool dateOnly, DateTime& start);
static void readAlarms(const KCal::Event&, void* alarmMap);
static void readAlarm(const KCal::Alarm&, AlarmData&);
@@ -467,13 +467,13 @@ class KAEvent : public KAAlarmEventBase
inline void set_reminder(int minutes);
inline void set_archiveReminder();
- QString mTemplateName; // alarm template's name, or null if normal event
- QString mAudioFile; // ATTACH: audio file to play
- QString mPreAction; // command to execute before alarm is displayed
- QString mPostAction; // command to execute after alarm window is closed
+ TQString mTemplateName; // alarm template's name, or null if normal event
+ TQString mAudioFile; // ATTACH: audio file to play
+ TQString mPreAction; // command to execute before alarm is displayed
+ TQString mPostAction; // command to execute after alarm window is closed
DateTime mStartDateTime; // DTSTART and DTEND: start and end time for event
- QDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar
- QDateTime mAtLoginDateTime; // repeat-at-login time
+ TQDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar
+ TQDateTime mAtLoginDateTime; // repeat-at-login time
DateTime mDeferralTime; // extra time to trigger alarm (if alarm or reminder deferred)
DateTime mDisplayingTime; // date/time shown in the alarm currently being displayed
int mDisplayingFlags; // type of alarm which is currently being displayed
@@ -486,7 +486,7 @@ class KAEvent : public KAAlarmEventBase
DeferType mDeferral; // whether the alarm is an extra deferred/deferred-reminder alarm
unsigned long mKMailSerialNumber;// if email text, message's KMail serial number
int mTemplateAfterTime;// time not specified: use n minutes after default time, or -1 (applies to templates only)
- QString mLogFile; // alarm output is to be logged to this URL
+ TQString mLogFile; // alarm output is to be logged to this URL
bool mCommandXterm; // command alarm is to be executed in a terminal window
bool mCopyToKOrganizer; // KOrganizer should hold a copy of the event
bool mReminderOnceOnly; // the reminder is output only for the first recurrence
diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp
index 19fcda4b5..8fb72fe31 100644
--- a/kalarm/alarmlistview.cpp
+++ b/kalarm/alarmlistview.cpp
@@ -20,11 +20,11 @@
#include "kalarm.h"
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qheader.h>
-#include <qregexp.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqheader.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <klocale.h>
@@ -44,10 +44,10 @@
class AlarmListTooltip : public QToolTip
{
public:
- AlarmListTooltip(QWidget* parent) : QToolTip(parent) { }
+ AlarmListTooltip(TQWidget* parent) : TQToolTip(parent) { }
virtual ~AlarmListTooltip() {}
protected:
- virtual void maybeTip(const QPoint&);
+ virtual void maybeTip(const TQPoint&);
};
@@ -55,26 +55,26 @@ class AlarmListTooltip : public QToolTip
= Class: AlarmListView
= Displays the list of outstanding alarms.
=============================================================================*/
-QValueList<EventListViewBase*> AlarmListView::mInstanceList;
+TQValueList<EventListViewBase*> AlarmListView::mInstanceList;
bool AlarmListView::mDragging = false;
-AlarmListView::AlarmListView(const QValueList<int>& order, QWidget* parent, const char* name)
+AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* parent, const char* name)
: EventListViewBase(parent, name),
mMousePressed(false),
mDrawMessageInColour(false),
mShowExpired(false)
{
- static QString titles[COLUMN_COUNT] = {
+ static TQString titles[COLUMN_COUNT] = {
i18n("Time"),
i18n("Time To"),
i18n("Repeat"),
- QString::null,
- QString::null,
+ TQString::null,
+ TQString::null,
i18n("Message, File or Command")
};
- setSelectionMode(QListView::Extended);
+ setSelectionMode(TQListView::Extended);
// Set the column order
int i;
@@ -134,17 +134,17 @@ AlarmListView::AlarmListView(const QValueList<int>& order, QWidget* parent, cons
mTimeColumnHeaderWidth = columnWidth(mColumn[TIME_COLUMN]);
mTimeToColumnHeaderWidth = columnWidth(mColumn[TIME_TO_COLUMN]);
setColumnAlignment(mColumn[REPEAT_COLUMN], Qt::AlignHCenter);
- setColumnWidthMode(mColumn[REPEAT_COLUMN], QListView::Maximum);
+ setColumnWidthMode(mColumn[REPEAT_COLUMN], TQListView::Maximum);
// Set the width of the colour column in proportion to height
setColumnWidth(mColumn[COLOUR_COLUMN], itemHeight() * 3/4);
- setColumnWidthMode(mColumn[COLOUR_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[COLOUR_COLUMN], TQListView::Manual);
// Set the width of the alarm type column to exactly accommodate the icons.
// Don't allow the user to resize it (to avoid refresh problems, and bearing
// in mind that resizing doesn't seem very useful anyway).
setColumnWidth(mColumn[TYPE_COLUMN], AlarmListViewItem::typeIconWidth(this));
- setColumnWidthMode(mColumn[TYPE_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[TYPE_COLUMN], TQListView::Manual);
header()->setResizeEnabled(false, mColumn[TYPE_COLUMN]);
mInstanceList.append(this);
@@ -167,7 +167,7 @@ void AlarmListView::populate()
KAEvent event;
KCal::Event::List events;
KCal::Event::List::ConstIterator it;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mShowExpired)
{
AlarmCalendar* cal = AlarmCalendar::expiredCalendarOpen();
@@ -208,7 +208,7 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
{
// Unhide the time column
int colWidth = mTimeColumnHeaderWidth;
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
for (AlarmListViewItem* item = firstChild(); item; item = item->nextSibling())
{
int w = item->width(fm, this, mColumn[TIME_COLUMN]);
@@ -216,13 +216,13 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
colWidth = w;
}
setColumnWidth(mColumn[TIME_COLUMN], colWidth);
- setColumnWidthMode(mColumn[TIME_COLUMN], QListView::Maximum);
+ setColumnWidthMode(mColumn[TIME_COLUMN], TQListView::Maximum);
changed = true;
}
else if (!time && w)
{
// Hide the time column
- setColumnWidthMode(mColumn[TIME_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[TIME_COLUMN], TQListView::Manual);
setColumnWidth(mColumn[TIME_COLUMN], 0);
changed = true;
}
@@ -230,7 +230,7 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
if (timeTo && !w)
{
// Unhide the time-to-alarm column
- setColumnWidthMode(mColumn[TIME_TO_COLUMN], QListView::Maximum);
+ setColumnWidthMode(mColumn[TIME_TO_COLUMN], TQListView::Maximum);
updateTimeToAlarms(true);
if (columnWidth(mColumn[TIME_TO_COLUMN]) < mTimeToColumnHeaderWidth)
setColumnWidth(mColumn[TIME_TO_COLUMN], mTimeToColumnHeaderWidth);
@@ -239,7 +239,7 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
else if (!timeTo && w)
{
// Hide the time-to-alarm column
- setColumnWidthMode(mColumn[TIME_TO_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[TIME_TO_COLUMN], TQListView::Manual);
setColumnWidth(mColumn[TIME_TO_COLUMN], 0);
changed = true;
}
@@ -257,7 +257,7 @@ void AlarmListView::updateTimeToAlarms(bool forceDisplay)
{
if (forceDisplay || columnWidth(mColumn[TIME_TO_COLUMN]))
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
for (AlarmListViewItem* item = firstChild(); item; item = item->nextSibling())
item->updateTimeToAlarm(now, forceDisplay);
}
@@ -269,7 +269,7 @@ void AlarmListView::updateTimeToAlarms(bool forceDisplay)
*/
void AlarmListView::addEvent(const KAEvent& event, EventListViewBase* view)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
for (InstanceListConstIterator it = mInstanceList.begin(); it != mInstanceList.end(); ++it)
static_cast<AlarmListView*>(*it)->addEntry(event, now, true, (*it == view));
}
@@ -277,7 +277,7 @@ void AlarmListView::addEvent(const KAEvent& event, EventListViewBase* view)
/******************************************************************************
* Add a new item to the list.
*/
-AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const QDateTime& now, bool setSize, bool reselect)
+AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const TQDateTime& now, bool setSize, bool reselect)
{
if (!mShowExpired && event.expired())
return 0;
@@ -290,7 +290,7 @@ AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const QDateTime
*/
EventListViewItemBase* AlarmListView::createItem(const KAEvent& event)
{
- return new AlarmListViewItem(this, event, QDateTime::currentDateTime());
+ return new AlarmListViewItem(this, event, TQDateTime::currentDateTime());
}
/******************************************************************************
@@ -304,9 +304,9 @@ bool AlarmListView::expired(AlarmListViewItem* item) const
/******************************************************************************
* Return the column order.
*/
-QValueList<int> AlarmListView::columnOrder() const
+TQValueList<int> AlarmListView::columnOrder() const
{
- QHeader* hdr = header();
+ TQHeader* hdr = header();
int order[COLUMN_COUNT];
order[TIME_COLUMN] = hdr->mapToIndex(mColumn[TIME_COLUMN]);
order[TIME_TO_COLUMN] = hdr->mapToIndex(mColumn[TIME_TO_COLUMN]);
@@ -314,16 +314,16 @@ QValueList<int> AlarmListView::columnOrder() const
order[COLOUR_COLUMN] = hdr->mapToIndex(mColumn[COLOUR_COLUMN]);
order[TYPE_COLUMN] = hdr->mapToIndex(mColumn[TYPE_COLUMN]);
order[MESSAGE_COLUMN] = hdr->mapToIndex(mColumn[MESSAGE_COLUMN]);
- QValueList<int> orderList;
+ TQValueList<int> orderList;
for (int i = 0; i < COLUMN_COUNT; ++i)
orderList += order[i];
return orderList;
}
/******************************************************************************
-* Returns the QWhatsThis text for a specified column.
+* Returns the TQWhatsThis text for a specified column.
*/
-QString AlarmListView::whatsThisText(int column) const
+TQString AlarmListView::whatsThisText(int column) const
{
if (column == mColumn[TIME_COLUMN])
return i18n("Next scheduled date and time of the alarm");
@@ -345,12 +345,12 @@ QString AlarmListView::whatsThisText(int column) const
* Records the position of the mouse when the left button is pressed, for use
* in drag operations.
*/
-void AlarmListView::contentsMousePressEvent(QMouseEvent* e)
+void AlarmListView::contentsMousePressEvent(TQMouseEvent* e)
{
- QListView::contentsMousePressEvent(e);
+ TQListView::contentsMousePressEvent(e);
if (e->button() == Qt::LeftButton)
{
- QPoint p(contentsToViewport(e->pos()));
+ TQPoint p(contentsToViewport(e->pos()));
if (itemAt(p))
{
mMousePressPos = e->pos();
@@ -364,21 +364,21 @@ void AlarmListView::contentsMousePressEvent(QMouseEvent* e)
* Called when the mouse is moved.
* Creates a drag object when the mouse drags one or more selected items.
*/
-void AlarmListView::contentsMouseMoveEvent(QMouseEvent* e)
+void AlarmListView::contentsMouseMoveEvent(TQMouseEvent* e)
{
- QListView::contentsMouseMoveEvent(e);
+ TQListView::contentsMouseMoveEvent(e);
if (mMousePressed
- && (mMousePressPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
+ && (mMousePressPos - e->pos()).manhattanLength() > TQApplication::startDragDistance())
{
// Create a calendar object containing all the currently selected alarms
kdDebug(5950) << "AlarmListView::contentsMouseMoveEvent(): drag started" << endl;
mMousePressed = false;
- KCal::CalendarLocal cal(QString::fromLatin1("UTC"));
+ KCal::CalendarLocal cal(TQString::fromLatin1("UTC"));
cal.setLocalTime(); // write out using local time (i.e. no time zone)
- QValueList<EventListViewItemBase*> items = selectedItems();
+ TQValueList<EventListViewItemBase*> items = selectedItems();
if (!items.count())
return;
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
const KAEvent& event = (*it)->event();
KCal::Event* kcalEvent = new KCal::Event;
@@ -399,9 +399,9 @@ void AlarmListView::contentsMouseMoveEvent(QMouseEvent* e)
* Notes that the mouse left button is no longer pressed, for use in drag
* operations.
*/
-void AlarmListView::contentsMouseReleaseEvent(QMouseEvent *e)
+void AlarmListView::contentsMouseReleaseEvent(TQMouseEvent *e)
{
- QListView::contentsMouseReleaseEvent(e);
+ TQListView::contentsMouseReleaseEvent(e);
mMousePressed = false;
mDragging = false;
}
@@ -414,7 +414,7 @@ void AlarmListView::contentsMouseReleaseEvent(QMouseEvent *e)
int AlarmListViewItem::mTimeHourPos = -2;
int AlarmListViewItem::mDigitWidth = -1;
-AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event, const QDateTime& now)
+AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event, const TQDateTime& now)
: EventListViewItemBase(parent, event),
mMessageTruncated(false),
mTimeToAlarmShown(false)
@@ -426,17 +426,17 @@ AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event
setText(parent->column(AlarmListView::TIME_COLUMN), alarmTimeText(dateTime));
if (parent->column(AlarmListView::TIME_TO_COLUMN) >= 0)
{
- QString tta = timeToAlarmText(now);
+ TQString tta = timeToAlarmText(now);
setText(parent->column(AlarmListView::TIME_TO_COLUMN), tta);
mTimeToAlarmShown = !tta.isNull();
}
- QTime t = dateTime.time();
+ TQTime t = dateTime.time();
mDateTimeOrder.sprintf("%04d%03d%02d%02d", dateTime.date().year(), dateTime.date().dayOfYear(),
t.hour(), t.minute());
int repeatOrder = 0;
int repeatInterval = 0;
- QString repeatText = event.recurrenceText(true); // text displayed in Repeat column
+ TQString repeatText = event.recurrenceText(true); // text displayed in Repeat column
if (repeatText.isEmpty())
repeatText = event.repetitionText(true);
if (event.repeatAtLogin())
@@ -480,10 +480,10 @@ AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event
/******************************************************************************
* Return the single line alarm summary text.
*/
-QString AlarmListViewItem::alarmText(const KAEvent& event) const
+TQString AlarmListViewItem::alarmText(const KAEvent& event) const
{
bool truncated;
- QString text = AlarmText::summary(event, 1, &truncated);
+ TQString text = AlarmText::summary(event, 1, &truncated);
mMessageTruncated = truncated;
return text;
}
@@ -491,23 +491,23 @@ QString AlarmListViewItem::alarmText(const KAEvent& event) const
/******************************************************************************
* Return the alarm time text in the form "date time".
*/
-QString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
+TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
{
KLocale* locale = KGlobal::locale();
- QString dateTimeText = locale->formatDate(dateTime.date(), true);
+ TQString dateTimeText = locale->formatDate(dateTime.date(), true);
if (!dateTime.isDateOnly())
{
dateTimeText += ' ';
- QString time = locale->formatTime(dateTime.time());
+ TQString time = locale->formatTime(dateTime.time());
if (mTimeHourPos == -2)
{
// Initialise the position of the hour within the time string, if leading
// zeroes are omitted, so that displayed times can be aligned with each other.
mTimeHourPos = -1; // default = alignment isn't possible/sensible
- if (!QApplication::reverseLayout()) // don't try to align right-to-left languages
+ if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages
{
- QString fmt = locale->timeFormat();
- int i = fmt.find(QRegExp("%[kl]")); // check if leading zeroes are omitted
+ TQString fmt = locale->timeFormat();
+ int i = fmt.find(TQRegExp("%[kl]")); // check if leading zeroes are omitted
if (i >= 0 && i == fmt.find('%')) // and whether the hour is first
mTimeHourPos = i; // yes, so need to align
}
@@ -523,10 +523,10 @@ QString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
/******************************************************************************
* Return the time-to-alarm text.
*/
-QString AlarmListViewItem::timeToAlarmText(const QDateTime& now) const
+TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const
{
if (event().expired())
- return QString::null;
+ return TQString::null;
DateTime dateTime = event().displayDateTime();
if (dateTime.isDateOnly())
{
@@ -535,7 +535,7 @@ QString AlarmListViewItem::timeToAlarmText(const QDateTime& now) const
}
int mins = (now.secsTo(dateTime.dateTime()) + 59) / 60;
if (mins < 0)
- return QString::null;
+ return TQString::null;
char minutes[3] = "00";
minutes[0] = (mins%60) / 10 + '0';
minutes[1] = (mins%60) % 10 + '0';
@@ -551,19 +551,19 @@ QString AlarmListViewItem::timeToAlarmText(const QDateTime& now) const
* The updated value is only displayed if it is different from the existing value,
* or if 'forceDisplay' is true.
*/
-void AlarmListViewItem::updateTimeToAlarm(const QDateTime& now, bool forceDisplay)
+void AlarmListViewItem::updateTimeToAlarm(const TQDateTime& now, bool forceDisplay)
{
if (event().expired())
{
if (forceDisplay || mTimeToAlarmShown)
{
- setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), QString::null);
+ setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), TQString::null);
mTimeToAlarmShown = false;
}
}
else
{
- QString tta = timeToAlarmText(now);
+ TQString tta = timeToAlarmText(now);
if (forceDisplay || tta != text(alarmListView()->column(AlarmListView::TIME_TO_COLUMN)))
setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), tta);
mTimeToAlarmShown = !tta.isNull();
@@ -573,14 +573,14 @@ void AlarmListViewItem::updateTimeToAlarm(const QDateTime& now, bool forceDispla
/******************************************************************************
* Paint one value in one of the columns in the list view.
*/
-void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int column, int width, int /*align*/)
+void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, int column, int width, int /*align*/)
{
const AlarmListView* listView = alarmListView();
int margin = listView->itemMargin();
- QRect box(margin, margin, width - margin*2, height() - margin*2); // area within which to draw
+ TQRect box(margin, margin, width - margin*2, height() - margin*2); // area within which to draw
bool selected = isSelected();
- QColor bgColour = selected ? cg.highlight() : cg.base();
- QColor fgColour = selected ? cg.highlightedText()
+ TQColor bgColour = selected ? cg.highlight() : cg.base();
+ TQColor fgColour = selected ? cg.highlightedText()
: !event().enabled() ? Preferences::disabledColour()
: event().expired() ? Preferences::expiredColour() : cg.text();
painter->setPen(fgColour);
@@ -589,7 +589,7 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
if (column == listView->column(AlarmListView::TIME_COLUMN))
{
int i = -1;
- QString str = text(column);
+ TQString str = text(column);
if (mTimeHourPos >= 0)
{
// Need to pad out spacing to align times without leading zeroes
@@ -598,7 +598,7 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
{
if (mDigitWidth < 0)
mDigitWidth = painter->fontMetrics().width("0");
- QString date = str.left(i + 1);
+ TQString date = str.left(i + 1);
int w = painter->fontMetrics().width(date) + mDigitWidth;
painter->drawText(box, AlignVCenter, date);
box.setLeft(box.left() + w);
@@ -621,15 +621,15 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
else if (column == listView->column(AlarmListView::TYPE_COLUMN))
{
// Display the alarm type icon, horizontally and vertically centred in the cell
- QPixmap* pixmap = eventIcon();
- QRect pixmapRect = pixmap->rect();
+ TQPixmap* pixmap = eventIcon();
+ TQRect pixmapRect = pixmap->rect();
int diff = box.height() - pixmap->height();
if (diff < 0)
{
pixmapRect.setTop(-diff / 2);
pixmapRect.setHeight(box.height());
}
- QPoint iconTopLeft(box.left() + (box.width() - pixmapRect.width()) / 2,
+ TQPoint iconTopLeft(box.left() + (box.width() - pixmapRect.width()) / 2,
box.top() + (diff > 0 ? diff / 2 : 0));
painter->drawPixmap(iconTopLeft, *pixmap, pixmapRect);
}
@@ -641,7 +641,7 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
painter->setBackgroundColor(event().bgColour());
// painter->setPen(event().fgColour());
}
- QString txt = text(column);
+ TQString txt = text(column);
painter->drawText(box, AlignVCenter, txt);
mMessageColWidth = listView->fontMetrics().boundingRect(txt).width();
}
@@ -652,13 +652,13 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
*/
int AlarmListViewItem::typeIconWidth(AlarmListView* v)
{
- return iconWidth() + 2 * v->style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ return iconWidth() + 2 * v->style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
}
/******************************************************************************
* Return the column sort order for one item in the list.
*/
-QString AlarmListViewItem::key(int column, bool) const
+TQString AlarmListViewItem::key(int column, bool) const
{
AlarmListView* listView = alarmListView();
if (column == listView->column(AlarmListView::TIME_COLUMN)
@@ -682,7 +682,7 @@ QString AlarmListViewItem::key(int column, bool) const
/******************************************************************************
* Displays the full alarm text in a tooltip, if not all the text is displayed.
*/
-void AlarmListTooltip::maybeTip(const QPoint& pt)
+void AlarmListTooltip::maybeTip(const TQPoint& pt)
{
AlarmListView* listView = (AlarmListView*)parentWidget()->parentWidget();
int column = listView->column(AlarmListView::MESSAGE_COLUMN);
@@ -700,7 +700,7 @@ void AlarmListTooltip::maybeTip(const QPoint& pt)
if (columnX + widthNeeded <= listView->viewport()->width())
return;
}
- QRect rect = listView->itemRect(item);
+ TQRect rect = listView->itemRect(item);
rect.setLeft(columnX);
rect.setWidth(columnWidth);
kdDebug(5950) << "AlarmListTooltip::maybeTip(): display\n";
diff --git a/kalarm/alarmlistview.h b/kalarm/alarmlistview.h
index 63d5bf0b0..f2ad5b2c2 100644
--- a/kalarm/alarmlistview.h
+++ b/kalarm/alarmlistview.h
@@ -31,30 +31,30 @@ class AlarmListTooltip;
class AlarmListViewItem : public EventListViewItemBase
{
public:
- AlarmListViewItem(AlarmListView* parent, const KAEvent&, const QDateTime& now);
- QTime showTimeToAlarm(bool show);
- void updateTimeToAlarm(const QDateTime& now, bool forceDisplay = false);
- virtual void paintCell(QPainter*, const QColorGroup&, int column, int width, int align);
+ AlarmListViewItem(AlarmListView* parent, const KAEvent&, const TQDateTime& now);
+ TQTime showTimeToAlarm(bool show);
+ void updateTimeToAlarm(const TQDateTime& now, bool forceDisplay = false);
+ virtual void paintCell(TQPainter*, const TQColorGroup&, int column, int width, int align);
AlarmListView* alarmListView() const { return (AlarmListView*)listView(); }
bool messageTruncated() const { return mMessageTruncated; }
int messageColWidthNeeded() const { return mMessageColWidth; }
static int typeIconWidth(AlarmListView*);
// Overridden base class methods
- AlarmListViewItem* nextSibling() const { return (AlarmListViewItem*)QListViewItem::nextSibling(); }
- virtual QString key(int column, bool ascending) const;
+ AlarmListViewItem* nextSibling() const { return (AlarmListViewItem*)TQListViewItem::nextSibling(); }
+ virtual TQString key(int column, bool ascending) const;
protected:
- virtual QString lastColumnText() const { return alarmText(event()); }
+ virtual TQString lastColumnText() const { return alarmText(event()); }
private:
- QString alarmText(const KAEvent&) const;
- QString alarmTimeText(const DateTime&) const;
- QString timeToAlarmText(const QDateTime& now) const;
+ TQString alarmText(const KAEvent&) const;
+ TQString alarmTimeText(const DateTime&) const;
+ TQString timeToAlarmText(const TQDateTime& now) const;
static int mTimeHourPos; // position of hour within time string, or -1 if leading zeroes included
static int mDigitWidth; // display width of a digit
- QString mDateTimeOrder; // controls ordering of date/time column
- QString mRepeatOrder; // controls ordering of repeat column
- QString mColourOrder; // controls ordering of colour column
- QString mTypeOrder; // controls ordering of alarm type column
+ TQString mDateTimeOrder; // controls ordering of date/time column
+ TQString mRepeatOrder; // controls ordering of repeat column
+ TQString mColourOrder; // controls ordering of colour column
+ TQString mTypeOrder; // controls ordering of alarm type column
mutable int mMessageColWidth; // width needed to display complete message text
mutable bool mMessageTruncated; // multi-line message text has been truncated for the display
bool mTimeToAlarmShown; // relative alarm time is displayed
@@ -63,14 +63,14 @@ class AlarmListViewItem : public EventListViewItemBase
class AlarmListView : public EventListViewBase
{
- Q_OBJECT // needed by QObject::isA() calls
+ Q_OBJECT // needed by TQObject::isA() calls
public:
enum ColumnIndex { // default column order
TIME_COLUMN, TIME_TO_COLUMN, REPEAT_COLUMN, COLOUR_COLUMN, TYPE_COLUMN, MESSAGE_COLUMN,
COLUMN_COUNT
};
- AlarmListView(const QValueList<int>& order, QWidget* parent = 0, const char* name = 0);
+ AlarmListView(const TQValueList<int>& order, TQWidget* parent = 0, const char* name = 0);
~AlarmListView();
void showExpired(bool show) { mShowExpired = show; }
bool showingExpired() const { return mShowExpired; }
@@ -80,42 +80,42 @@ class AlarmListView : public EventListViewBase
bool expired(AlarmListViewItem*) const;
bool drawMessageInColour() const { return mDrawMessageInColour; }
void setDrawMessageInColour(bool inColour) { mDrawMessageInColour = inColour; }
- QValueList<int> columnOrder() const;
+ TQValueList<int> columnOrder() const;
int column(ColumnIndex i) const { return mColumn[i]; }
static bool dragging() { return mDragging; }
// Overridden base class methods
static void addEvent(const KAEvent&, EventListViewBase*);
static void modifyEvent(const KAEvent& e, EventListViewBase* selectionView)
{ EventListViewBase::modifyEvent(e.id(), e, mInstanceList, selectionView); }
- static void modifyEvent(const QString& oldEventID, const KAEvent& newEvent, EventListViewBase* selectionView)
+ static void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent, EventListViewBase* selectionView)
{ EventListViewBase::modifyEvent(oldEventID, newEvent, mInstanceList, selectionView); }
- static void deleteEvent(const QString& eventID)
+ static void deleteEvent(const TQString& eventID)
{ EventListViewBase::deleteEvent(eventID, mInstanceList); }
- static void undeleteEvent(const QString& oldEventID, const KAEvent& event, EventListViewBase* selectionView)
+ static void undeleteEvent(const TQString& oldEventID, const KAEvent& event, EventListViewBase* selectionView)
{ EventListViewBase::modifyEvent(oldEventID, event, mInstanceList, selectionView); }
- AlarmListViewItem* getEntry(const QString& eventID) { return (AlarmListViewItem*)EventListViewBase::getEntry(eventID); }
+ AlarmListViewItem* getEntry(const TQString& eventID) { return (AlarmListViewItem*)EventListViewBase::getEntry(eventID); }
AlarmListViewItem* currentItem() const { return (AlarmListViewItem*)EventListViewBase::currentItem(); }
AlarmListViewItem* firstChild() const { return (AlarmListViewItem*)EventListViewBase::firstChild(); }
AlarmListViewItem* selectedItem() const { return (AlarmListViewItem*)EventListViewBase::selectedItem(); }
- virtual void setSelected(QListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
+ virtual void setSelected(TQListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
virtual void setSelected(AlarmListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
virtual InstanceList instances() { return mInstanceList; }
protected:
virtual void populate();
EventListViewItemBase* createItem(const KAEvent&);
- virtual QString whatsThisText(int column) const;
+ virtual TQString whatsThisText(int column) const;
virtual bool shouldShowEvent(const KAEvent& e) const { return mShowExpired || !e.expired(); }
AlarmListViewItem* addEntry(const KAEvent& e, bool setSize = false)
- { return addEntry(e, QDateTime::currentDateTime(), setSize); }
+ { return addEntry(e, TQDateTime::currentDateTime(), setSize); }
AlarmListViewItem* updateEntry(AlarmListViewItem* item, const KAEvent& newEvent, bool setSize = false)
{ return (AlarmListViewItem*)EventListViewBase::updateEntry(item, newEvent, setSize); }
- virtual void contentsMousePressEvent(QMouseEvent*);
- virtual void contentsMouseMoveEvent(QMouseEvent*);
- virtual void contentsMouseReleaseEvent(QMouseEvent*);
+ virtual void contentsMousePressEvent(TQMouseEvent*);
+ virtual void contentsMouseMoveEvent(TQMouseEvent*);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent*);
private:
- AlarmListViewItem* addEntry(const KAEvent&, const QDateTime& now, bool setSize = false, bool reselect = false);
+ AlarmListViewItem* addEntry(const KAEvent&, const TQDateTime& now, bool setSize = false, bool reselect = false);
static InstanceList mInstanceList; // all current instances of this class
static bool mDragging;
@@ -123,7 +123,7 @@ class AlarmListView : public EventListViewBase
int mTimeColumnHeaderWidth;
int mTimeToColumnHeaderWidth;
AlarmListTooltip* mTooltip; // tooltip for showing full text of alarm messages
- QPoint mMousePressPos; // where the mouse left button was last pressed
+ TQPoint mMousePressPos; // where the mouse left button was last pressed
bool mMousePressed; // true while the mouse left button is pressed
bool mDrawMessageInColour;
bool mShowExpired; // true to show expired alarms
diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp
index 2162f62a4..460517118 100644
--- a/kalarm/alarmtext.cpp
+++ b/kalarm/alarmtext.cpp
@@ -19,7 +19,7 @@
*/
#include "kalarm.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include "alarmevent.h"
@@ -27,29 +27,29 @@
#include "alarmtext.h"
-QString AlarmText::mFromPrefix;
-QString AlarmText::mToPrefix;
-QString AlarmText::mCcPrefix;
-QString AlarmText::mDatePrefix;
-QString AlarmText::mSubjectPrefix;
-QString AlarmText::mFromPrefixEn = QString::fromLatin1("From:");
-QString AlarmText::mToPrefixEn = QString::fromLatin1("To:");
-QString AlarmText::mCcPrefixEn = QString::fromLatin1("Cc:");
-QString AlarmText::mDatePrefixEn = QString::fromLatin1("Date:");
-QString AlarmText::mSubjectPrefixEn = QString::fromLatin1("Subject:");
+TQString AlarmText::mFromPrefix;
+TQString AlarmText::mToPrefix;
+TQString AlarmText::mCcPrefix;
+TQString AlarmText::mDatePrefix;
+TQString AlarmText::mSubjectPrefix;
+TQString AlarmText::mFromPrefixEn = TQString::fromLatin1("From:");
+TQString AlarmText::mToPrefixEn = TQString::fromLatin1("To:");
+TQString AlarmText::mCcPrefixEn = TQString::fromLatin1("Cc:");
+TQString AlarmText::mDatePrefixEn = TQString::fromLatin1("Date:");
+TQString AlarmText::mSubjectPrefixEn = TQString::fromLatin1("Subject:");
-void AlarmText::setText(const QString& text)
+void AlarmText::setText(const TQString& text)
{
mBody = text;
- mIsScript = text.startsWith(QString::fromLatin1("#!"));
+ mIsScript = text.startsWith(TQString::fromLatin1("#!"));
mIsEmail = false;
- mTo = mFrom = mCc = mTime = mSubject = QString::null;
+ mTo = mFrom = mCc = mTime = mSubject = TQString::null;
mKMailSerialNum = 0;
}
-void AlarmText::setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
- const QString& subject, const QString& body, unsigned long kmailSerialNumber)
+void AlarmText::setEmail(const TQString& to, const TQString& from, const TQString& cc, const TQString& time,
+ const TQString& subject, const TQString& body, unsigned long kmailSerialNumber)
{
mIsScript = false;
mIsEmail = true;
@@ -65,13 +65,13 @@ void AlarmText::setEmail(const QString& to, const QString& from, const QString&
/******************************************************************************
* Return the text for a text message alarm, in display format.
*/
-QString AlarmText::displayText() const
+TQString AlarmText::displayText() const
{
if (mIsEmail)
{
// Format the email into a text alarm
setUpTranslations();
- QString text;
+ TQString text;
text = mFromPrefix + '\t' + mFrom + '\n';
text += mToPrefix + '\t' + mTo + '\n';
if (!mCc.isEmpty())
@@ -104,9 +104,9 @@ bool AlarmText::isEmpty() const
/******************************************************************************
* Check whether a text is an email.
*/
-bool AlarmText::checkIfEmail(const QString& text)
+bool AlarmText::checkIfEmail(const TQString& text)
{
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
return emailHeaderCount(lines);
}
@@ -114,7 +114,7 @@ bool AlarmText::checkIfEmail(const QString& text)
* Check whether a text is an email.
* Reply = number of email header lines, or 0 if not an email.
*/
-int AlarmText::emailHeaderCount(const QStringList& lines)
+int AlarmText::emailHeaderCount(const TQStringList& lines)
{
setUpTranslations();
int maxn = lines.count();
@@ -136,17 +136,17 @@ int AlarmText::emailHeaderCount(const QStringList& lines)
/******************************************************************************
* Check whether a text is an email, and if so return its headers or optionally
* only its subject line.
-* Reply = headers/subject line, or QString::null if not the text of an email.
+* Reply = headers/subject line, or TQString::null if not the text of an email.
*/
-QString AlarmText::emailHeaders(const QString& text, bool subjectOnly)
+TQString AlarmText::emailHeaders(const TQString& text, bool subjectOnly)
{
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
int n = emailHeaderCount(lines);
if (!n)
- return QString::null;
+ return TQString::null;
if (subjectOnly)
return lines[n-1].mid(mSubjectPrefix.length()).stripWhiteSpace();
- QString h = lines[0];
+ TQString h = lines[0];
for (int i = 1; i < n; ++i)
{
h += '\n';
@@ -161,9 +161,9 @@ QString AlarmText::emailHeaders(const QString& text, bool subjectOnly)
* untranslated email prefixes.
* 'email' is set to indicate whether it is an email text.
*/
-QString AlarmText::fromCalendarText(const QString& text, bool& email)
+TQString AlarmText::fromCalendarText(const TQString& text, bool& email)
{
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
int maxn = lines.count();
if (maxn >= 4
&& lines[0].startsWith(mFromPrefixEn)
@@ -177,7 +177,7 @@ QString AlarmText::fromCalendarText(const QString& text, bool& email)
&& lines[n+1].startsWith(mSubjectPrefixEn))
{
setUpTranslations();
- QString dispText;
+ TQString dispText;
dispText = mFromPrefix + lines[0].mid(mFromPrefixEn.length()) + '\n';
dispText += mToPrefix + lines[1].mid(mToPrefixEn.length()) + '\n';
if (n == 3)
@@ -200,10 +200,10 @@ QString AlarmText::fromCalendarText(const QString& text, bool& email)
* Return the text for a text message alarm, in alarm calendar format.
* (The prefix strings are untranslated in the calendar.)
*/
-QString AlarmText::toCalendarText(const QString& text)
+TQString AlarmText::toCalendarText(const TQString& text)
{
setUpTranslations();
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
int maxn = lines.count();
if (maxn >= 4
&& lines[0].startsWith(mFromPrefix)
@@ -217,7 +217,7 @@ QString AlarmText::toCalendarText(const QString& text)
&& lines[n+1].startsWith(mSubjectPrefix))
{
// Format the email into a text alarm
- QString calText;
+ TQString calText;
calText = mFromPrefixEn + lines[0].mid(mFromPrefix.length()) + '\n';
calText += mToPrefixEn + lines[1].mid(mToPrefix.length()) + '\n';
if (n == 3)
@@ -255,13 +255,13 @@ void AlarmText::setUpTranslations()
* If 'truncated' is non-null, it will be set true if the text returned has been
* truncated, other than to strip a trailing newline.
*/
-QString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
+TQString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
{
- QString text = (event.action() == KAEvent::EMAIL) ? event.emailSubject() : event.cleanText();
+ TQString text = (event.action() == KAEvent::EMAIL) ? event.emailSubject() : event.cleanText();
if (event.action() == KAEvent::MESSAGE)
{
// If the message is the text of an email, return its headers or just subject line
- QString subject = emailHeaders(text, (maxLines <= 1));
+ TQString subject = emailHeaders(text, (maxLines <= 1));
if (!subject.isNull())
{
if (truncated)
@@ -284,5 +284,5 @@ QString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
return text.left(newline); // text ends in newline
if (truncated)
*truncated = true;
- return text.left(newline + (maxLines <= 1 ? 0 : 1)) + QString::fromLatin1("...");
+ return text.left(newline + (maxLines <= 1 ? 0 : 1)) + TQString::fromLatin1("...");
}
diff --git a/kalarm/alarmtext.h b/kalarm/alarmtext.h
index 8d643b3cb..56f3cf17e 100644
--- a/kalarm/alarmtext.h
+++ b/kalarm/alarmtext.h
@@ -21,7 +21,7 @@
#ifndef ALARMTEXT_H
#define ALARMTEXT_H
-#include <qstring.h>
+#include <tqstring.h>
class QStringList;
class KAEvent;
@@ -29,44 +29,44 @@ class KAEvent;
class AlarmText
{
public:
- AlarmText(const QString& text = QString::null) { setText(text); }
- void setText(const QString&);
- void setScript(const QString& text) { setText(text); mIsScript = true; }
- void setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
- const QString& subject, const QString& body, unsigned long kmailSerialNumber = 0);
- QString displayText() const;
- QString calendarText() const;
- QString to() const { return mTo; }
- QString from() const { return mFrom; }
- QString cc() const { return mCc; }
- QString time() const { return mTime; }
- QString subject() const { return mSubject; }
- QString body() const { return mIsEmail ? mBody : QString::null; }
+ AlarmText(const TQString& text = TQString::null) { setText(text); }
+ void setText(const TQString&);
+ void setScript(const TQString& text) { setText(text); mIsScript = true; }
+ void setEmail(const TQString& to, const TQString& from, const TQString& cc, const TQString& time,
+ const TQString& subject, const TQString& body, unsigned long kmailSerialNumber = 0);
+ TQString displayText() const;
+ TQString calendarText() const;
+ TQString to() const { return mTo; }
+ TQString from() const { return mFrom; }
+ TQString cc() const { return mCc; }
+ TQString time() const { return mTime; }
+ TQString subject() const { return mSubject; }
+ TQString body() const { return mIsEmail ? mBody : TQString::null; }
bool isEmpty() const;
bool isEmail() const { return mIsEmail; }
bool isScript() const { return mIsScript; }
unsigned long kmailSerialNumber() const { return mKMailSerialNum; }
- static QString summary(const KAEvent&, int maxLines = 1, bool* truncated = 0);
- static bool checkIfEmail(const QString&);
- static QString emailHeaders(const QString&, bool subjectOnly);
- static QString fromCalendarText(const QString&, bool& email);
- static QString toCalendarText(const QString&);
+ static TQString summary(const KAEvent&, int maxLines = 1, bool* truncated = 0);
+ static bool checkIfEmail(const TQString&);
+ static TQString emailHeaders(const TQString&, bool subjectOnly);
+ static TQString fromCalendarText(const TQString&, bool& email);
+ static TQString toCalendarText(const TQString&);
private:
static void setUpTranslations();
- static int emailHeaderCount(const QStringList&);
+ static int emailHeaderCount(const TQStringList&);
- static QString mFromPrefix; // translated header prefixes
- static QString mToPrefix;
- static QString mCcPrefix;
- static QString mDatePrefix;
- static QString mSubjectPrefix;
- static QString mFromPrefixEn; // untranslated header prefixes
- static QString mToPrefixEn;
- static QString mCcPrefixEn;
- static QString mDatePrefixEn;
- static QString mSubjectPrefixEn;
- QString mBody, mFrom, mTo, mCc, mTime, mSubject;
+ static TQString mFromPrefix; // translated header prefixes
+ static TQString mToPrefix;
+ static TQString mCcPrefix;
+ static TQString mDatePrefix;
+ static TQString mSubjectPrefix;
+ static TQString mFromPrefixEn; // untranslated header prefixes
+ static TQString mToPrefixEn;
+ static TQString mCcPrefixEn;
+ static TQString mDatePrefixEn;
+ static TQString mSubjectPrefixEn;
+ TQString mBody, mFrom, mTo, mCc, mTime, mSubject;
unsigned long mKMailSerialNum; // if email, message's KMail serial number, else 0
bool mIsEmail;
bool mIsScript;
diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp
index 1e7e777b0..5c3316bce 100644
--- a/kalarm/alarmtimewidget.cpp
+++ b/kalarm/alarmtimewidget.cpp
@@ -20,11 +20,11 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kdialog.h>
#include <kmessagebox.h>
@@ -39,13 +39,13 @@
#include "timespinbox.h"
#include "alarmtimewidget.moc"
-static const QTime time_23_59(23, 59);
+static const TQTime time_23_59(23, 59);
const int AlarmTimeWidget::maxDelayTime = 999*60 + 59; // < 1000 hours
-QString AlarmTimeWidget::i18n_w_TimeFromNow() { return i18n("Time from no&w:"); }
-QString AlarmTimeWidget::i18n_TimeAfterPeriod()
+TQString AlarmTimeWidget::i18n_w_TimeFromNow() { return i18n("Time from no&w:"); }
+TQString AlarmTimeWidget::i18n_TimeAfterPeriod()
{
return i18n("Enter the length of time (in hours and minutes) after "
"the current time to schedule the alarm.");
@@ -55,7 +55,7 @@ QString AlarmTimeWidget::i18n_TimeAfterPeriod()
/******************************************************************************
* Construct a widget with a group box and title.
*/
-AlarmTimeWidget::AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget* parent, const char* name)
+AlarmTimeWidget::AlarmTimeWidget(const TQString& groupBoxTitle, int mode, TQWidget* parent, const char* name)
: ButtonGroup(groupBoxTitle, parent, name),
mMinDateTimeIsNow(false),
mPastMax(false),
@@ -67,24 +67,24 @@ AlarmTimeWidget::AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget
/******************************************************************************
* Construct a widget without a group box or title.
*/
-AlarmTimeWidget::AlarmTimeWidget(int mode, QWidget* parent, const char* name)
+AlarmTimeWidget::AlarmTimeWidget(int mode, TQWidget* parent, const char* name)
: ButtonGroup(parent, name),
mMinDateTimeIsNow(false),
mPastMax(false),
mMinMaxTimeSet(false)
{
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
init(mode);
}
void AlarmTimeWidget::init(int mode)
{
- static const QString recurText = i18n("For a simple repetition, enter the date/time of the first occurrence.\n"
+ static const TQString recurText = i18n("For a simple repetition, enter the date/time of the first occurrence.\n"
"If a recurrence is configured, the start date/time will be adjusted "
"to the first recurrence on or after the entered date/time.");
- connect(this, SIGNAL(buttonSet(int)), SLOT(slotButtonSet(int)));
- QBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ connect(this, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotButtonSet(int)));
+ TQBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
if (!title().isEmpty())
{
topLayout->setMargin(KDialog::marginHint());
@@ -94,29 +94,29 @@ void AlarmTimeWidget::init(int mode)
// At time radio button/label
mAtTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("&Defer to date/time:") : i18n("At &date/time:")), this, "atTimeRadio");
mAtTimeRadio->setFixedSize(mAtTimeRadio->sizeHint());
- QWhatsThis::add(mAtTimeRadio,
+ TQWhatsThis::add(mAtTimeRadio,
((mode & DEFER_TIME) ? i18n("Reschedule the alarm to the specified date and time.")
: i18n("Schedule the alarm at the specified date and time.")));
// Date edit box
mDateEdit = new DateEdit(this);
mDateEdit->setFixedSize(mDateEdit->sizeHint());
- connect(mDateEdit, SIGNAL(dateEntered(const QDate&)), SLOT(dateTimeChanged()));
- static const QString enterDateText = i18n("Enter the date to schedule the alarm.");
- QWhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText
- : QString("%1\n%2").arg(enterDateText).arg(recurText)));
+ connect(mDateEdit, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(dateTimeChanged()));
+ static const TQString enterDateText = i18n("Enter the date to schedule the alarm.");
+ TQWhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText
+ : TQString("%1\n%2").arg(enterDateText).arg(recurText)));
mAtTimeRadio->setFocusWidget(mDateEdit);
// Time edit box and Any time checkbox
- QHBox* timeBox = new QHBox(this);
+ TQHBox* timeBox = new TQHBox(this);
timeBox->setSpacing(2*KDialog::spacingHint());
mTimeEdit = new TimeEdit(timeBox);
mTimeEdit->setFixedSize(mTimeEdit->sizeHint());
- connect(mTimeEdit, SIGNAL(valueChanged(int)), SLOT(dateTimeChanged()));
- static const QString enterTimeText = i18n("Enter the time to schedule the alarm.");
- QWhatsThis::add(mTimeEdit,
- ((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis())
- : QString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
+ connect(mTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(dateTimeChanged()));
+ static const TQString enterTimeText = i18n("Enter the time to schedule the alarm.");
+ TQWhatsThis::add(mTimeEdit,
+ ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis())
+ : TQString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
mAnyTime = -1; // current status is uninitialised
if (mode & DEFER_TIME)
@@ -129,15 +129,15 @@ void AlarmTimeWidget::init(int mode)
mAnyTimeAllowed = true;
mAnyTimeCheckBox = new CheckBox(i18n("An&y time"), timeBox);
mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->sizeHint());
- connect(mAnyTimeCheckBox, SIGNAL(toggled(bool)), SLOT(slotAnyTimeToggled(bool)));
- QWhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day"));
+ connect(mAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
+ TQWhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day"));
}
// 'Time from now' radio button/label
mAfterTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("Defer for time &interval:") : i18n_w_TimeFromNow()),
this, "afterTimeRadio");
mAfterTimeRadio->setFixedSize(mAfterTimeRadio->sizeHint());
- QWhatsThis::add(mAfterTimeRadio,
+ TQWhatsThis::add(mAfterTimeRadio,
((mode & DEFER_TIME) ? i18n("Reschedule the alarm for the specified time interval after now.")
: i18n("Schedule the alarm after the specified time interval from now.")));
@@ -145,29 +145,29 @@ void AlarmTimeWidget::init(int mode)
mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, this);
mDelayTimeEdit->setValue(maxDelayTime);
mDelayTimeEdit->setFixedSize(mDelayTimeEdit->sizeHint());
- connect(mDelayTimeEdit, SIGNAL(valueChanged(int)), SLOT(delayTimeChanged(int)));
- QWhatsThis::add(mDelayTimeEdit,
- ((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis())
- : QString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
+ connect(mDelayTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(delayTimeChanged(int)));
+ TQWhatsThis::add(mDelayTimeEdit,
+ ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis())
+ : TQString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
mAfterTimeRadio->setFocusWidget(mDelayTimeEdit);
// Set up the layout, either narrow or wide
if (mode & NARROW)
{
- QGridLayout* grid = new QGridLayout(topLayout, 2, 2, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(topLayout, 2, 2, KDialog::spacingHint());
grid->addWidget(mAtTimeRadio, 0, 0);
grid->addWidget(mDateEdit, 0, 1, Qt::AlignAuto);
grid->addWidget(timeBox, 1, 1, Qt::AlignAuto);
grid->setColStretch(2, 1);
topLayout->addStretch();
- QBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
layout->addWidget(mAfterTimeRadio);
layout->addWidget(mDelayTimeEdit);
layout->addStretch();
}
else
{
- QGridLayout* grid = new QGridLayout(topLayout, 2, 3, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(topLayout, 2, 3, KDialog::spacingHint());
grid->addWidget(mAtTimeRadio, 0, 0, Qt::AlignAuto);
grid->addWidget(mDateEdit, 0, 1, Qt::AlignAuto);
grid->addWidget(timeBox, 0, 2, Qt::AlignAuto);
@@ -182,7 +182,7 @@ void AlarmTimeWidget::init(int mode)
setButton(id(mAtTimeRadio));
// Timeout every minute to update alarm time fields.
- MinuteTimer::connect(this, SLOT(slotTimer()));
+ MinuteTimer::connect(this, TQT_SLOT(slotTimer()));
}
/******************************************************************************
@@ -219,14 +219,14 @@ void AlarmTimeWidget::selectTimeFromNow(int minutes)
* 'errorWidget' if non-null, is set to point to the widget containing the error.
* Reply = invalid date/time if error.
*/
-DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool showErrorMessage, QWidget** errorWidget) const
+DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool showErrorMessage, TQWidget** errorWidget) const
{
if (minsFromNow)
*minsFromNow = 0;
if (errorWidget)
*errorWidget = 0;
- QTime nowt = QTime::currentTime();
- QDateTime now(QDate::currentDate(), QTime(nowt.hour(), nowt.minute()));
+ TQTime nowt = TQTime::currentTime();
+ TQDateTime now(TQDate::currentDate(), TQTime(nowt.hour(), nowt.minute()));
if (mAtTimeRadio->isOn())
{
bool anyTime = mAnyTimeAllowed && mAnyTimeCheckBox && mAnyTimeCheckBox->isChecked();
@@ -327,8 +327,8 @@ void AlarmTimeWidget::setDateTime(const DateTime& dt)
void AlarmTimeWidget::setMinDateTimeIsCurrent()
{
mMinDateTimeIsNow = true;
- mMinDateTime = QDateTime();
- QDateTime now = QDateTime::currentDateTime();
+ mMinDateTime = TQDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mDateEdit->setMinDate(now.date());
setMaxMinTimeIf(now);
}
@@ -337,12 +337,12 @@ void AlarmTimeWidget::setMinDateTimeIsCurrent()
* Set the minimum date/time, adjusting the entered date/time if necessary.
* If 'dt' is invalid, any current minimum date/time is cleared.
*/
-void AlarmTimeWidget::setMinDateTime(const QDateTime& dt)
+void AlarmTimeWidget::setMinDateTime(const TQDateTime& dt)
{
mMinDateTimeIsNow = false;
mMinDateTime = dt;
mDateEdit->setMinDate(dt.date());
- setMaxMinTimeIf(QDateTime::currentDateTime());
+ setMaxMinTimeIf(TQDateTime::currentDateTime());
}
/******************************************************************************
@@ -357,7 +357,7 @@ void AlarmTimeWidget::setMaxDateTime(const DateTime& dt)
else
mMaxDateTime = dt.dateTime();
mDateEdit->setMaxDate(mMaxDateTime.date());
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
setMaxMinTimeIf(now);
setMaxDelayTime(now);
}
@@ -366,15 +366,15 @@ void AlarmTimeWidget::setMaxDateTime(const DateTime& dt)
* If the minimum and maximum date/times fall on the same date, set the minimum
* and maximum times in the time edit box.
*/
-void AlarmTimeWidget::setMaxMinTimeIf(const QDateTime& now)
+void AlarmTimeWidget::setMaxMinTimeIf(const TQDateTime& now)
{
int mint = 0;
- QTime maxt = time_23_59;
+ TQTime maxt = time_23_59;
mMinMaxTimeSet = false;
if (mMaxDateTime.isValid())
{
bool set = true;
- QDateTime minDT;
+ TQDateTime minDT;
if (mMinDateTimeIsNow)
minDT = now.addSecs(60);
else if (mMinDateTime.isValid())
@@ -399,14 +399,14 @@ void AlarmTimeWidget::setMaxMinTimeIf(const QDateTime& now)
* Set the maximum value for the delay time edit box, depending on the maximum
* value for the date/time.
*/
-void AlarmTimeWidget::setMaxDelayTime(const QDateTime& now)
+void AlarmTimeWidget::setMaxDelayTime(const TQDateTime& now)
{
int maxVal = maxDelayTime;
if (mMaxDateTime.isValid())
{
if (now.date().daysTo(mMaxDateTime.date()) < 100) // avoid possible 32-bit overflow on secsTo()
{
- QDateTime dt(now.date(), QTime(now.time().hour(), now.time().minute(), 0)); // round down to nearest minute
+ TQDateTime dt(now.date(), TQTime(now.time().hour(), now.time().minute(), 0)); // round down to nearest minute
maxVal = dt.secsTo(mMaxDateTime) / 60;
if (maxVal > maxDelayTime)
maxVal = maxDelayTime;
@@ -448,17 +448,17 @@ void AlarmTimeWidget::enableAnyTime(bool enable)
*/
void AlarmTimeWidget::slotTimer()
{
- QDateTime now;
+ TQDateTime now;
if (mMinDateTimeIsNow)
{
// Make sure that the minimum date is updated when the day changes
- now = QDateTime::currentDateTime();
+ now = TQDateTime::currentDateTime();
mDateEdit->setMinDate(now.date());
}
if (mMaxDateTime.isValid())
{
if (!now.isValid())
- now = QDateTime::currentDateTime();
+ now = TQDateTime::currentDateTime();
if (!mPastMax)
{
// Check whether the maximum date/time has now been reached
@@ -501,8 +501,8 @@ void AlarmTimeWidget::slotButtonSet(int)
if (mAnyTimeCheckBox)
mAnyTimeCheckBox->setEnabled(at && mAnyTimeAllowed);
// Ensure that the value of the delay edit box is > 0.
- QDateTime dt(mDateEdit->date(), mTimeEdit->time());
- int minutes = (QDateTime::currentDateTime().secsTo(dt) + 59) / 60;
+ TQDateTime dt(mDateEdit->date(), mTimeEdit->time());
+ int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60;
if (minutes <= 0)
mDelayTimeEdit->setValid(true);
mDelayTimeEdit->setEnabled(!at);
@@ -524,8 +524,8 @@ void AlarmTimeWidget::slotAnyTimeToggled(bool on)
*/
void AlarmTimeWidget::dateTimeChanged()
{
- QDateTime dt(mDateEdit->date(), mTimeEdit->time());
- int minutes = (QDateTime::currentDateTime().secsTo(dt) + 59) / 60;
+ TQDateTime dt(mDateEdit->date(), mTimeEdit->time());
+ int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60;
bool blocked = mDelayTimeEdit->signalsBlocked();
mDelayTimeEdit->blockSignals(true); // prevent infinite recursion between here and delayTimeChanged()
if (minutes <= 0 || minutes > mDelayTimeEdit->maxValue())
@@ -543,7 +543,7 @@ void AlarmTimeWidget::delayTimeChanged(int minutes)
{
if (mDelayTimeEdit->isValid())
{
- QDateTime dt = QDateTime::currentDateTime().addSecs(minutes * 60);
+ TQDateTime dt = TQDateTime::currentDateTime().addSecs(minutes * 60);
bool blockedT = mTimeEdit->signalsBlocked();
bool blockedD = mDateEdit->signalsBlocked();
mTimeEdit->blockSignals(true); // prevent infinite recursion between here and dateTimeChanged()
diff --git a/kalarm/alarmtimewidget.h b/kalarm/alarmtimewidget.h
index 0a93e9cf4..9e1e2535b 100644
--- a/kalarm/alarmtimewidget.h
+++ b/kalarm/alarmtimewidget.h
@@ -40,22 +40,22 @@ class AlarmTimeWidget : public ButtonGroup
DEFER_TIME = 0x01, // "Defer to ..."
NARROW = 0x02 // make a narrow widget
};
- AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget* parent = 0, const char* name = 0);
- AlarmTimeWidget(int mode, QWidget* parent = 0, const char* name = 0);
- DateTime getDateTime(int* minsFromNow = 0, bool checkExpired = true, bool showErrorMessage = true, QWidget** errorWidget = 0) const;
+ AlarmTimeWidget(const TQString& groupBoxTitle, int mode, TQWidget* parent = 0, const char* name = 0);
+ AlarmTimeWidget(int mode, TQWidget* parent = 0, const char* name = 0);
+ DateTime getDateTime(int* minsFromNow = 0, bool checkExpired = true, bool showErrorMessage = true, TQWidget** errorWidget = 0) const;
void setDateTime(const DateTime&);
void setMinDateTimeIsCurrent();
- void setMinDateTime(const QDateTime& = QDateTime());
+ void setMinDateTime(const TQDateTime& = TQDateTime());
void setMaxDateTime(const DateTime& = DateTime());
- const QDateTime& maxDateTime() const { return mMaxDateTime; }
+ const TQDateTime& maxDateTime() const { return mMaxDateTime; }
void setReadOnly(bool);
bool anyTime() const { return mAnyTime; }
void enableAnyTime(bool enable);
void selectTimeFromNow(int minutes = 0);
- QSize sizeHint() const { return minimumSizeHint(); }
+ TQSize sizeHint() const { return minimumSizeHint(); }
- static QString i18n_w_TimeFromNow(); // text of 'Time from now:' radio button, with 'w' shortcut
- static QString i18n_TimeAfterPeriod();
+ static TQString i18n_w_TimeFromNow(); // text of 'Time from now:' radio button, with 'w' shortcut
+ static TQString i18n_TimeAfterPeriod();
static const int maxDelayTime; // maximum time from now
signals:
@@ -72,8 +72,8 @@ class AlarmTimeWidget : public ButtonGroup
private:
void init(int mode);
void setAnyTime();
- void setMaxDelayTime(const QDateTime& now);
- void setMaxMinTimeIf(const QDateTime& now);
+ void setMaxDelayTime(const TQDateTime& now);
+ void setMaxMinTimeIf(const TQDateTime& now);
RadioButton* mAtTimeRadio;
RadioButton* mAfterTimeRadio;
@@ -81,8 +81,8 @@ class AlarmTimeWidget : public ButtonGroup
TimeEdit* mTimeEdit;
TimeSpinBox* mDelayTimeEdit;
CheckBox* mAnyTimeCheckBox;
- QDateTime mMinDateTime; // earliest allowed date/time
- QDateTime mMaxDateTime; // latest allowed date/time
+ TQDateTime mMinDateTime; // earliest allowed date/time
+ TQDateTime mMaxDateTime; // latest allowed date/time
int mAnyTime; // 0 = date/time is specified, 1 = only a date, -1 = uninitialised
bool mAnyTimeAllowed; // 'mAnyTimeCheckBox' is enabled
bool mMinDateTimeIsNow; // earliest allowed date/time is the current time
diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp
index 3c4f28ab0..98a4b629c 100644
--- a/kalarm/birthdaydlg.cpp
+++ b/kalarm/birthdaydlg.cpp
@@ -20,12 +20,12 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kglobal.h>
@@ -58,72 +58,72 @@ class AddresseeItem : public QListViewItem
{
public:
enum columns { NAME = 0, BIRTHDAY = 1 };
- AddresseeItem(QListView* parent, const QString& name, const QDate& birthday);
- QDate birthday() const { return mBirthday; }
- virtual QString key(int column, bool ascending) const;
+ AddresseeItem(TQListView* parent, const TQString& name, const TQDate& birthday);
+ TQDate birthday() const { return mBirthday; }
+ virtual TQString key(int column, bool ascending) const;
private:
- QDate mBirthday;
- QString mBirthdayOrder;
+ TQDate mBirthday;
+ TQString mBirthdayOrder;
};
const KABC::AddressBook* BirthdayDlg::mAddressBook = 0;
-BirthdayDlg::BirthdayDlg(QWidget* parent)
+BirthdayDlg::BirthdayDlg(TQWidget* parent)
: KDialogBase(KDialogBase::Plain, i18n("Import Birthdays From KAddressBook"), Ok|Cancel, Ok, parent, "BirthdayDlg"),
mSpecialActionsButton(0)
{
- QWidget* topWidget = plainPage();
- QBoxLayout* topLayout = new QVBoxLayout(topWidget);
+ TQWidget* topWidget = plainPage();
+ TQBoxLayout* topLayout = new TQVBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
// Prefix and suffix to the name in the alarm text
// Get default prefix and suffix texts from config file
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- mPrefixText = config->readEntry(QString::fromLatin1("BirthdayPrefix"), i18n("Birthday: "));
- mSuffixText = config->readEntry(QString::fromLatin1("BirthdaySuffix"));
+ config->setGroup(TQString::fromLatin1("General"));
+ mPrefixText = config->readEntry(TQString::fromLatin1("BirthdayPrefix"), i18n("Birthday: "));
+ mSuffixText = config->readEntry(TQString::fromLatin1("BirthdaySuffix"));
- QGroupBox* textGroup = new QGroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget);
+ TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget);
topLayout->addWidget(textGroup);
- QLabel* label = new QLabel(i18n("Pre&fix:"), textGroup);
+ TQLabel* label = new TQLabel(i18n("Pre&fix:"), textGroup);
mPrefix = new BLineEdit(mPrefixText, textGroup);
mPrefix->setMinimumSize(mPrefix->sizeHint());
label->setBuddy(mPrefix);
- connect(mPrefix, SIGNAL(focusLost()), SLOT(slotTextLostFocus()));
- QWhatsThis::add(mPrefix,
+ connect(mPrefix, TQT_SIGNAL(focusLost()), TQT_SLOT(slotTextLostFocus()));
+ TQWhatsThis::add(mPrefix,
i18n("Enter text to appear before the person's name in the alarm message, "
"including any necessary trailing spaces."));
- label = new QLabel(i18n("S&uffix:"), textGroup);
+ label = new TQLabel(i18n("S&uffix:"), textGroup);
mSuffix = new BLineEdit(mSuffixText, textGroup);
mSuffix->setMinimumSize(mSuffix->sizeHint());
label->setBuddy(mSuffix);
- connect(mSuffix, SIGNAL(focusLost()), SLOT(slotTextLostFocus()));
- QWhatsThis::add(mSuffix,
+ connect(mSuffix, TQT_SIGNAL(focusLost()), TQT_SLOT(slotTextLostFocus()));
+ TQWhatsThis::add(mSuffix,
i18n("Enter text to appear after the person's name in the alarm message, "
"including any necessary leading spaces."));
- QGroupBox* group = new QGroupBox(1, Qt::Horizontal, i18n("Select Birthdays"), topWidget);
+ TQGroupBox* group = new TQGroupBox(1, Qt::Horizontal, i18n("Select Birthdays"), topWidget);
topLayout->addWidget(group);
mAddresseeList = new BListView(group);
mAddresseeList->setMultiSelection(true);
- mAddresseeList->setSelectionMode(QListView::Extended);
+ mAddresseeList->setSelectionMode(TQListView::Extended);
mAddresseeList->setAllColumnsShowFocus(true);
mAddresseeList->setFullWidth(true);
mAddresseeList->addColumn(i18n("Name"));
mAddresseeList->addColumn(i18n("Birthday"));
- connect(mAddresseeList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
- QWhatsThis::add(mAddresseeList,
+ connect(mAddresseeList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
+ TQWhatsThis::add(mAddresseeList,
i18n("Select birthdays to set alarms for.\n"
"This list shows all birthdays in KAddressBook except those for which alarms already exist.\n\n"
"You can select multiple birthdays at one time by dragging the mouse over the list, "
"or by clicking the mouse while pressing Ctrl or Shift."));
- group = new QGroupBox(i18n("Alarm Configuration"), topWidget);
+ group = new TQGroupBox(i18n("Alarm Configuration"), topWidget);
topLayout->addWidget(group);
- QBoxLayout* groupLayout = new QVBoxLayout(group, marginHint(), spacingHint());
+ TQBoxLayout* groupLayout = new TQVBoxLayout(group, marginHint(), spacingHint());
groupLayout->addSpacing(fontMetrics().lineSpacing()/2);
// Font and colour choice button and sample text
@@ -148,7 +148,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
groupLayout->addWidget(mReminder, 0, Qt::AlignAuto);
// Acknowledgement confirmation required - default = no confirmation
- QHBoxLayout* layout = new QHBoxLayout(groupLayout, 2*spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(groupLayout, 2*spacingHint());
mConfirmAck = EditAlarmDlg::createConfirmAckCheckbox(group);
layout->addWidget(mConfirmAck);
layout->addSpacing(2*spacingHint());
@@ -162,7 +162,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
}
// Late display checkbox - default = allow late display
- layout = new QHBoxLayout(groupLayout, 2*spacingHint());
+ layout = new TQHBoxLayout(groupLayout, 2*spacingHint());
mLateCancel = new LateCancelSelector(false, group);
layout->addWidget(mLateCancel);
layout->addStretch();
@@ -170,7 +170,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
// Sub-repetition button
mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), false, group);
mSubRepetition->set(0, 0, true, 364*24*60);
- QWhatsThis::add(mSubRepetition, i18n("Set up an additional alarm repetition"));
+ TQWhatsThis::add(mSubRepetition, i18n("Set up an additional alarm repetition"));
layout->addWidget(mSubRepetition);
// Set the values to their defaults
@@ -198,7 +198,7 @@ void BirthdayDlg::loadAddressBook()
#if KDE_IS_VERSION(3,1,90)
mAddressBook = KABC::StdAddressBook::self(true);
if (mAddressBook)
- connect(mAddressBook, SIGNAL(addressBookChanged(AddressBook*)), SLOT(updateSelectionList()));
+ connect(mAddressBook, TQT_SIGNAL(addressBookChanged(AddressBook*)), TQT_SLOT(updateSelectionList()));
#else
mAddressBook = KABC::StdAddressBook::self();
if (mAddressBook)
@@ -230,7 +230,7 @@ void BirthdayDlg::close()
void BirthdayDlg::updateSelectionList()
{
// Compile a list of all pending alarm messages which look like birthdays
- QStringList messageList;
+ TQStringList messageList;
KAEvent event;
Event::List events = AlarmCalendar::activeCalendar()->events();
for (Event::List::ConstIterator it = events.begin(); it != events.end(); ++it)
@@ -250,17 +250,17 @@ void BirthdayDlg::updateSelectionList()
if (addressee.birthday().isValid())
{
// Create a list entry for this birthday
- QDate birthday = addressee.birthday().date();
- QString name = addressee.nickName();
+ TQDate birthday = addressee.birthday().date();
+ TQString name = addressee.nickName();
if (name.isEmpty())
name = addressee.realName();
// Check if the birthday already has an alarm
- QString text = mPrefixText + name + mSuffixText;
+ TQString text = mPrefixText + name + mSuffixText;
bool alarmExists = (messageList.find(text) != messageList.end());
// Check if the birthday is already in the selection list
bool inSelectionList = false;
AddresseeItem* item = 0;
- for (QListViewItem* qitem = mAddresseeList->firstChild(); qitem; qitem = qitem->nextSibling())
+ for (TQListViewItem* qitem = mAddresseeList->firstChild(); qitem; qitem = qitem->nextSibling())
{
item = dynamic_cast<AddresseeItem*>(qitem);
if (item && item->text(AddresseeItem::NAME) == name && item->birthday() == birthday)
@@ -280,7 +280,7 @@ void BirthdayDlg::updateSelectionList()
// Enable/disable OK button according to whether anything is currently selected
bool selection = false;
- for (QListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
if (mAddresseeList->isSelected(item))
{
selection = true;
@@ -292,22 +292,22 @@ void BirthdayDlg::updateSelectionList()
/******************************************************************************
* Return a list of events for birthdays chosen.
*/
-QValueList<KAEvent> BirthdayDlg::events() const
+TQValueList<KAEvent> BirthdayDlg::events() const
{
- QValueList<KAEvent> list;
- QDate today = QDate::currentDate();
- QDateTime todayNoon(today, QTime(12, 0, 0));
+ TQValueList<KAEvent> list;
+ TQDate today = TQDate::currentDate();
+ TQDateTime todayNoon(today, TQTime(12, 0, 0));
int thisYear = today.year();
int reminder = mReminder->minutes();
- for (QListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
{
if (mAddresseeList->isSelected(item))
{
AddresseeItem* aItem = dynamic_cast<AddresseeItem*>(item);
if (aItem)
{
- QDate date = aItem->birthday();
+ TQDate date = aItem->birthday();
date.setYMD(thisYear, date.month(), date.day());
if (date <= today)
date.setYMD(thisYear + 1, date.month(), date.day());
@@ -320,9 +320,9 @@ QValueList<KAEvent> BirthdayDlg::events() const
int fadeSecs;
float volume = mSoundPicker->volume(fadeVolume, fadeSecs);
event.setAudioFile(mSoundPicker->file(), volume, fadeVolume, fadeSecs);
- QValueList<int> months;
+ TQValueList<int> months;
months.append(date.month());
- event.setRecurAnnualByDate(1, months, 0, Preferences::defaultFeb29Type(), -1, QDate());
+ event.setRecurAnnualByDate(1, months, 0, Preferences::defaultFeb29Type(), -1, TQDate());
event.setRepetition(mSubRepetition->interval(), mSubRepetition->count());
event.setNextOccurrence(todayNoon);
if (reminder)
@@ -344,9 +344,9 @@ void BirthdayDlg::slotOk()
{
// Save prefix and suffix texts to use as future defaults
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- config->writeEntry(QString::fromLatin1("BirthdayPrefix"), mPrefix->text());
- config->writeEntry(QString::fromLatin1("BirthdaySuffix"), mSuffix->text());
+ config->setGroup(TQString::fromLatin1("General"));
+ config->writeEntry(TQString::fromLatin1("BirthdayPrefix"), mPrefix->text());
+ config->writeEntry(TQString::fromLatin1("BirthdaySuffix"), mSuffix->text());
config->sync();
mFlags = (mSoundPicker->sound() == SoundPicker::BEEP ? KAEvent::BEEP : 0)
@@ -363,7 +363,7 @@ void BirthdayDlg::slotOk()
*/
void BirthdayDlg::slotSelectionChanged()
{
- for (QListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
if (mAddresseeList->isSelected(item))
{
enableButtonOK(true);
@@ -380,8 +380,8 @@ void BirthdayDlg::slotSelectionChanged()
*/
void BirthdayDlg::slotTextLostFocus()
{
- QString prefix = mPrefix->text();
- QString suffix = mSuffix->text();
+ TQString prefix = mPrefix->text();
+ TQString suffix = mSuffix->text();
if (prefix != mPrefixText || suffix != mSuffixText)
{
// Text has changed - re-evaluate the selection list
@@ -396,8 +396,8 @@ void BirthdayDlg::slotTextLostFocus()
= Class: AddresseeItem
=============================================================================*/
-AddresseeItem::AddresseeItem(QListView* parent, const QString& name, const QDate& birthday)
- : QListViewItem(parent),
+AddresseeItem::AddresseeItem(TQListView* parent, const TQString& name, const TQDate& birthday)
+ : TQListViewItem(parent),
mBirthday(birthday)
{
setText(NAME, name);
@@ -405,7 +405,7 @@ AddresseeItem::AddresseeItem(QListView* parent, const QString& name, const QDate
mBirthdayOrder.sprintf("%04d%03d", mBirthday.year(), mBirthday.dayOfYear());
}
-QString AddresseeItem::key(int column, bool) const
+TQString AddresseeItem::key(int column, bool) const
{
if (column == BIRTHDAY)
return mBirthdayOrder;
@@ -417,11 +417,11 @@ QString AddresseeItem::key(int column, bool) const
= Class: BListView
=============================================================================*/
-BListView::BListView(QWidget* parent, const char* name)
+BListView::BListView(TQWidget* parent, const char* name)
: KListView(parent, name)
{
KAccel* accel = new KAccel(this);
- accel->insert(KStdAccel::SelectAll, this, SLOT(slotSelectAll()));
- accel->insert(KStdAccel::Deselect, this, SLOT(slotDeselect()));
+ accel->insert(KStdAccel::SelectAll, this, TQT_SLOT(slotSelectAll()));
+ accel->insert(KStdAccel::Deselect, this, TQT_SLOT(slotDeselect()));
accel->readSettings();
}
diff --git a/kalarm/birthdaydlg.h b/kalarm/birthdaydlg.h
index b8dd202c1..412e0ac5e 100644
--- a/kalarm/birthdaydlg.h
+++ b/kalarm/birthdaydlg.h
@@ -20,7 +20,7 @@
#ifndef BIRTHDAYDLG_H
#define BIRTHDAYDLG_H
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <klistview.h>
#include <kdialogbase.h>
@@ -44,8 +44,8 @@ class BirthdayDlg : public KDialogBase
{
Q_OBJECT
public:
- BirthdayDlg(QWidget* parent = 0);
- QValueList<KAEvent> events() const;
+ BirthdayDlg(TQWidget* parent = 0);
+ TQValueList<KAEvent> events() const;
static void close();
protected slots:
@@ -70,8 +70,8 @@ class BirthdayDlg : public KDialogBase
LateCancelSelector* mLateCancel;
SpecialActionsButton* mSpecialActionsButton;
RepetitionButton* mSubRepetition;
- QString mPrefixText; // last entered value of prefix text
- QString mSuffixText; // last entered value of suffix text
+ TQString mPrefixText; // last entered value of prefix text
+ TQString mSuffixText; // last entered value of suffix text
int mFlags; // event flag bits
};
@@ -80,21 +80,21 @@ class BLineEdit : public QLineEdit
{
Q_OBJECT
public:
- BLineEdit(QWidget* parent = 0, const char* name = 0)
- : QLineEdit(parent, name) {}
- BLineEdit(const QString& text, QWidget* parent = 0, const char* name = 0)
- : QLineEdit(text, parent, name) {}
+ BLineEdit(TQWidget* parent = 0, const char* name = 0)
+ : TQLineEdit(parent, name) {}
+ BLineEdit(const TQString& text, TQWidget* parent = 0, const char* name = 0)
+ : TQLineEdit(text, parent, name) {}
signals:
void focusLost();
protected:
- virtual void focusOutEvent(QFocusEvent*) { emit focusLost(); }
+ virtual void focusOutEvent(TQFocusEvent*) { emit focusLost(); }
};
class BListView : public KListView
{
Q_OBJECT
public:
- BListView(QWidget* parent = 0, const char* name = 0);
+ BListView(TQWidget* parent = 0, const char* name = 0);
public slots:
virtual void slotSelectAll() { selectAll(true); }
virtual void slotDeselect() { selectAll(false); }
diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp
index ada75e768..50d76c508 100644
--- a/kalarm/calendarcompat.cpp
+++ b/kalarm/calendarcompat.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -43,10 +43,10 @@ using namespace KCal;
* necessary conversions to the current format. The calendar is not saved - any
* conversions will only be saved if changes are made later.
*/
-void CalendarCompat::fix(KCal::Calendar& calendar, const QString& localFile)
+void CalendarCompat::fix(KCal::Calendar& calendar, const TQString& localFile)
{
bool version057_UTC = false;
- QString subVersion;
+ TQString subVersion;
int version = readKAlarmVersion(calendar, subVersion);
if (!version)
{
@@ -74,26 +74,26 @@ void CalendarCompat::fix(KCal::Calendar& calendar, const QString& localFile)
* Reply = 0 if the calendar was created by the current version of KAlarm,
* KAlarm pre-0.3.5, or another program.
*/
-int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, QString& subVersion)
+int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVersion)
{
- subVersion = QString::null;
- const QString& prodid = calendar.productId();
+ subVersion = TQString::null;
+ const TQString& prodid = calendar.productId();
// Find the KAlarm identifier
- QString progname = QString::fromLatin1(" KAlarm ");
+ TQString progname = TQString::fromLatin1(" KAlarm ");
int i = prodid.find(progname, 0, false);
if (i < 0)
{
// Older versions used KAlarm's translated name in the product ID, which
// could have created problems using a calendar in different locales.
- progname = QString(" ") + kapp->aboutData()->programName() + ' ';
+ progname = TQString(" ") + kapp->aboutData()->programName() + ' ';
i = prodid.find(progname, 0, false);
if (i < 0)
return 0; // calendar wasn't created by KAlarm
}
// Extract the KAlarm version string
- QString ver = prodid.mid(i + progname.length()).stripWhiteSpace();
+ TQString ver = prodid.mid(i + progname.length()).stripWhiteSpace();
i = ver.find('/');
int j = ver.find(' ');
if (j >= 0 && j < i)
@@ -112,23 +112,23 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, QString& subVers
* Reply = true if times are stored in UTC
* = false if the calendar is a vCalendar, times are not UTC, or any error occurred.
*/
-bool CalendarCompat::isUTC(const QString& localFile)
+bool CalendarCompat::isUTC(const TQString& localFile)
{
// Read the calendar file into a QString
- QFile file(localFile);
+ TQFile file(localFile);
if (!file.open(IO_ReadOnly))
return false;
- QTextStream ts(&file);
- ts.setEncoding(QTextStream::Latin1);
- QString text = ts.read();
+ TQTextStream ts(&file);
+ ts.setEncoding(TQTextStream::Latin1);
+ TQString text = ts.read();
file.close();
// Extract the CREATED property for the first VEVENT from the calendar
- QString VCALENDAR = QString::fromLatin1("BEGIN:VCALENDAR");
- QString VEVENT = QString::fromLatin1("BEGIN:VEVENT");
- QString CREATED = QString::fromLatin1("CREATED:");
- QStringList lines = QStringList::split(QChar('\n'), text);
- for (QStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it)
+ TQString VCALENDAR = TQString::fromLatin1("BEGIN:VCALENDAR");
+ TQString VEVENT = TQString::fromLatin1("BEGIN:VEVENT");
+ TQString CREATED = TQString::fromLatin1("CREATED:");
+ TQStringList lines = TQStringList::split(TQChar('\n'), text);
+ for (TQStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it)
{
if ((*it).startsWith(VCALENDAR))
{
diff --git a/kalarm/calendarcompat.h b/kalarm/calendarcompat.h
index a8cc3e812..ec79ea802 100644
--- a/kalarm/calendarcompat.h
+++ b/kalarm/calendarcompat.h
@@ -23,18 +23,18 @@
/* @file calendarcompat.h - compatibility for old calendar file formats */
-#include <qstring.h>
+#include <tqstring.h>
namespace KCal { class Calendar; }
class CalendarCompat
{
public:
- static void fix(KCal::Calendar&, const QString& localFile = QString::null);
+ static void fix(KCal::Calendar&, const TQString& localFile = TQString::null);
private:
- static int readKAlarmVersion(KCal::Calendar&, QString& subVersion);
- static bool isUTC(const QString& localFile);
+ static int readKAlarmVersion(KCal::Calendar&, TQString& subVersion);
+ static bool isUTC(const TQString& localFile);
};
#endif // CALENDARCOMPAT_H
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index 22f1fb36d..d2d2b2343 100644
--- a/kalarm/daemon.cpp
+++ b/kalarm/daemon.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qtimer.h>
-#include <qiconset.h>
+#include <tqtimer.h>
+#include <tqiconset.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -44,7 +44,7 @@
static const int REGISTER_TIMEOUT = 20; // seconds to wait before assuming registration with daemon has failed
static const char* NOTIFY_DCOP_OBJECT = "notify"; // DCOP name of KAlarm's interface for notification by alarm daemon
-static QString expandURL(const QString& urlString);
+static TQString expandURL(const TQString& urlString);
/*=============================================================================
@@ -52,25 +52,25 @@ static QString expandURL(const QString& urlString);
= Handles the the alarm daemon's client notification DCOP interface.
=============================================================================*/
-class NotificationHandler : public QObject, virtual public AlarmGuiIface
+class NotificationHandler : public TQObject, virtual public AlarmGuiIface
{
public:
NotificationHandler();
private:
// DCOP interface
- void alarmDaemonUpdate(int calendarStatus, const QString& calendarURL);
- void handleEvent(const QString& calendarURL, const QString& eventID);
+ void alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL);
+ void handleEvent(const TQString& calendarURL, const TQString& eventID);
void registered(bool reregister, int result, int version);
};
Daemon* Daemon::mInstance = 0;
NotificationHandler* Daemon::mDcopHandler = 0;
-QValueList<QString> Daemon::mQueuedEvents;
-QValueList<QString> Daemon::mSavingEvents;
-QTimer* Daemon::mStartTimer = 0;
-QTimer* Daemon::mRegisterTimer = 0;
-QTimer* Daemon::mStatusTimer = 0;
+TQValueList<TQString> Daemon::mQueuedEvents;
+TQValueList<TQString> Daemon::mSavingEvents;
+TQTimer* Daemon::mStartTimer = 0;
+TQTimer* Daemon::mRegisterTimer = 0;
+TQTimer* Daemon::mStatusTimer = 0;
int Daemon::mStatusTimerCount = 0;
int Daemon::mStatusTimerInterval;
int Daemon::mStartTimeout = 0;
@@ -95,7 +95,7 @@ void Daemon::initialise()
{
if (!mInstance)
mInstance = new Daemon();
- connect(AlarmCalendar::activeCalendar(), SIGNAL(calendarSaved(AlarmCalendar*)), mInstance, SLOT(slotCalendarSaved(AlarmCalendar*)));
+ connect(AlarmCalendar::activeCalendar(), TQT_SIGNAL(calendarSaved(AlarmCalendar*)), mInstance, TQT_SLOT(slotCalendarSaved(AlarmCalendar*)));
}
/******************************************************************************
@@ -111,10 +111,10 @@ void Daemon::createDcopHandler()
mRunning = isRunning(false);
mStatusTimerInterval = Preferences::daemonTrayCheckInterval();
- Preferences::connect(SIGNAL(preferencesChanged()), mInstance, SLOT(slotPreferencesChanged()));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), mInstance, TQT_SLOT(slotPreferencesChanged()));
- mStatusTimer = new QTimer(mInstance);
- connect(mStatusTimer, SIGNAL(timeout()), mInstance, SLOT(timerCheckIfRunning()));
+ mStatusTimer = new TQTimer(mInstance);
+ connect(mStatusTimer, TQT_SIGNAL(timeout()), mInstance, TQT_SLOT(timerCheckIfRunning()));
mStatusTimer->start(mStatusTimerInterval * 1000); // check regularly if daemon is running
}
@@ -134,7 +134,7 @@ bool Daemon::start()
return true; // we're currently waiting for the daemon to start
// Start the alarm daemon. It is a KUniqueApplication, which means that
// there is automatically only one instance of the alarm daemon running.
- QString execStr = locate("exe", QString::fromLatin1(DAEMON_APP_NAME));
+ TQString execStr = locate("exe", TQString::fromLatin1(DAEMON_APP_NAME));
if (execStr.isEmpty())
{
KMessageBox::error(0, i18n("Alarm daemon not found."));
@@ -144,8 +144,8 @@ bool Daemon::start()
KApplication::kdeinitExec(execStr);
kdDebug(5950) << "Daemon::start(): Alarm daemon started" << endl;
mStartTimeout = 5000/startCheckInterval + 1; // check daemon status for 5 seconds before giving up
- mStartTimer = new QTimer(mInstance);
- connect(mStartTimer, SIGNAL(timeout()), mInstance, SLOT(checkIfStarted()));
+ mStartTimer = new TQTimer(mInstance);
+ connect(mStartTimer, TQT_SIGNAL(timeout()), mInstance, TQT_SLOT(checkIfStarted()));
mStartTimer->start(startCheckInterval);
mInstance->checkIfStarted();
return true;
@@ -188,20 +188,20 @@ bool Daemon::registerWith(bool reregister)
bool disabledIfStopped = theApp()->alarmsDisabledIfStopped();
kdDebug(5950) << (reregister ? "Daemon::reregisterWith(): " : "Daemon::registerWith(): ") << (disabledIfStopped ? "NO_START" : "COMMAND_LINE") << endl;
- QCString appname = kapp->aboutData()->appName();
+ TQCString appname = kapp->aboutData()->appName();
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
if (reregister)
s.registerChange(appname, !disabledIfStopped);
else
- s.registerApp(appname, kapp->aboutData()->programName(), QCString(NOTIFY_DCOP_OBJECT), AlarmCalendar::activeCalendar()->urlString(), !disabledIfStopped);
+ s.registerApp(appname, kapp->aboutData()->programName(), TQCString(NOTIFY_DCOP_OBJECT), AlarmCalendar::activeCalendar()->urlString(), !disabledIfStopped);
if (!s.ok())
{
kdError(5950) << "Daemon::registerWith(" << reregister << "): DCOP error" << endl;
registrationResult(reregister, KAlarmd::FAILURE);
return false;
}
- mRegisterTimer = new QTimer(mInstance);
- connect(mRegisterTimer, SIGNAL(timeout()), mInstance, SLOT(registerTimerExpired()));
+ mRegisterTimer = new TQTimer(mInstance);
+ connect(mRegisterTimer, TQT_SIGNAL(timeout()), mInstance, TQT_SLOT(registerTimerExpired()));
mRegisterTimer->start(REGISTER_TIMEOUT * 1000); // wait for the reply
return true;
}
@@ -215,13 +215,13 @@ void Daemon::registrationResult(bool reregister, int result, int version)
delete mRegisterTimer;
mRegisterTimer = 0;
bool failed = false;
- QString errmsg;
+ TQString errmsg;
if (version && version != DAEMON_VERSION_NUM)
{
failed = true;
kdError(5950) << "Daemon::registrationResult(" << reregister << "): kalarmd reports incompatible version " << version << endl;
errmsg = i18n("Cannot enable alarms.\nInstallation or configuration error: Alarm Daemon (%1) version is incompatible.")
- .arg(QString::fromLatin1(DAEMON_APP_NAME));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME));
}
else
{
@@ -236,7 +236,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
kdError(5950) << "Daemon::registrationResult(" << reregister << "): registerApp dcop call: " << kapp->aboutData()->appName() << " not found\n";
KMessageBox::error(0, i18n("Alarms will be disabled if you stop KAlarm.\n"
"(Installation or configuration error: %1 cannot locate %2 executable.)")
- .arg(QString::fromLatin1(DAEMON_APP_NAME))
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME))
.arg(kapp->aboutData()->appName()));
break;
case KAlarmd::FAILURE:
@@ -248,7 +248,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
if (!reregister)
{
errmsg = i18n("Cannot enable alarms:\nFailed to register with Alarm Daemon (%1)")
- .arg(QString::fromLatin1(DAEMON_APP_NAME));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME));
}
break;
}
@@ -304,7 +304,7 @@ void Daemon::checkIfStarted()
if (err)
{
kdError(5950) << "Daemon::checkIfStarted(): failed to start daemon" << endl;
- KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(QString::fromLatin1(DAEMON_APP_NAME)));
+ KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::fromLatin1(DAEMON_APP_NAME)));
}
}
@@ -327,7 +327,7 @@ void Daemon::updateRegisteredStatus(bool timeout)
// The daemon has newly been detected as registered with DCOP.
// Wait for a short time to ensure that it is ready for DCOP calls.
mStatus = RUNNING;
- QTimer::singleShot(startCheckInterval, mInstance, SLOT(slotStarted()));
+ TQTimer::singleShot(startCheckInterval, mInstance, TQT_SLOT(slotStarted()));
break;
case RUNNING:
if (timeout)
@@ -374,7 +374,7 @@ bool Daemon::reset()
if (!kapp->dcopClient()->isApplicationRegistered(DAEMON_APP_NAME))
return false;
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
- s.resetCalendar(QCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
+ s.resetCalendar(TQCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
if (!s.ok())
kdError(5950) << "Daemon::reset(): resetCalendar dcop send failed" << endl;
return true;
@@ -387,7 +387,7 @@ void Daemon::reload()
{
kdDebug(5950) << "Daemon::reload()\n";
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
- s.reloadCalendar(QCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
+ s.reloadCalendar(TQCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
if (!s.ok())
kdError(5950) << "Daemon::reload(): reloadCalendar dcop send failed" << endl;
}
@@ -414,8 +414,8 @@ void Daemon::enableAutoStart(bool enable)
// The return status doesn't report failure even if the daemon isn't running,
// so in case of failure, rewrite the config file in any case.
KConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
- adconfig.setGroup(QString::fromLatin1(DAEMON_AUTOSTART_SECTION));
- adconfig.writeEntry(QString::fromLatin1(DAEMON_AUTOSTART_KEY), enable);
+ adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ adconfig.writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), enable);
adconfig.sync();
}
@@ -437,8 +437,8 @@ void Daemon::notifyTimeChanged()
bool Daemon::autoStart()
{
KConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
- adconfig.setGroup(QString::fromLatin1(DAEMON_AUTOSTART_SECTION));
- return adconfig.readBoolEntry(QString::fromLatin1(DAEMON_AUTOSTART_KEY), true);
+ adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ return adconfig.readBoolEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), true);
}
/******************************************************************************
@@ -569,8 +569,8 @@ void Daemon::slotPreferencesChanged()
AlarmEnableAction* Daemon::createAlarmEnableAction(KActionCollection* actions, const char* name)
{
AlarmEnableAction* a = new AlarmEnableAction(0, actions, name);
- connect(a, SIGNAL(userClicked(bool)), mInstance, SLOT(setAlarmsEnabled(bool)));
- connect(mInstance, SIGNAL(daemonRunning(bool)), a, SLOT(setCheckedActual(bool)));
+ connect(a, TQT_SIGNAL(userClicked(bool)), mInstance, TQT_SLOT(setAlarmsEnabled(bool)));
+ connect(mInstance, TQT_SIGNAL(daemonRunning(bool)), a, TQT_SLOT(setCheckedActual(bool)));
return a;
}
@@ -600,7 +600,7 @@ void Daemon::slotCalendarSaved(AlarmCalendar* cal)
/******************************************************************************
* Note an event ID which has been triggered by the alarm daemon.
*/
-void Daemon::queueEvent(const QString& eventId)
+void Daemon::queueEvent(const TQString& eventId)
{
mQueuedEvents += eventId;
}
@@ -609,7 +609,7 @@ void Daemon::queueEvent(const QString& eventId)
* Note an event ID which is currently being saved in the calendar file, if the
* event was originally triggered by the alarm daemon.
*/
-void Daemon::savingEvent(const QString& eventId)
+void Daemon::savingEvent(const TQString& eventId)
{
if (mQueuedEvents.remove(eventId) > 0)
mSavingEvents += eventId;
@@ -619,7 +619,7 @@ void Daemon::savingEvent(const QString& eventId)
* If the event ID has been triggered by the alarm daemon, tell the daemon that
* it has been processed, and whether to reload its calendar.
*/
-void Daemon::eventHandled(const QString& eventId, bool reloadCal)
+void Daemon::eventHandled(const TQString& eventId, bool reloadCal)
{
if (mQueuedEvents.remove(eventId) > 0)
notifyEventHandled(eventId, reloadCal); // it's a daemon event, so tell daemon that it's been handled
@@ -631,11 +631,11 @@ void Daemon::eventHandled(const QString& eventId, bool reloadCal)
* Tell the daemon that an event has been processed, and whether to reload its
* calendar.
*/
-void Daemon::notifyEventHandled(const QString& eventId, bool reloadCal)
+void Daemon::notifyEventHandled(const TQString& eventId, bool reloadCal)
{
kdDebug(5950) << "Daemon::notifyEventHandled(" << eventId << (reloadCal ? "): reload" : ")") << endl;
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
- s.eventHandled(QCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString(), eventId, reloadCal);
+ s.eventHandled(TQCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString(), eventId, reloadCal);
if (!s.ok())
kdError(5950) << "Daemon::notifyEventHandled(): eventHandled dcop send failed" << endl;
}
@@ -656,7 +656,7 @@ int Daemon::maxTimeSinceCheck()
NotificationHandler::NotificationHandler()
: DCOPObject(NOTIFY_DCOP_OBJECT),
- QObject()
+ TQObject()
{
kdDebug(5950) << "NotificationHandler::NotificationHandler()\n";
}
@@ -666,7 +666,7 @@ NotificationHandler::NotificationHandler()
* The daemon notifies calendar statuses when we first register as a GUI, and whenever
* a calendar status changes. So we don't need to read its config files.
*/
-void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const QString& calendarURL)
+void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL)
{
kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendarStatus << ")\n";
KAlarmd::CalendarStatus status = KAlarmd::CalendarStatus(calendarStatus);
@@ -697,10 +697,10 @@ void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const QString& c
/******************************************************************************
* DCOP call from the alarm daemon to notify that an alarm is due.
*/
-void NotificationHandler::handleEvent(const QString& url, const QString& eventId)
+void NotificationHandler::handleEvent(const TQString& url, const TQString& eventId)
{
- QString id = eventId;
- if (id.startsWith(QString::fromLatin1("ad:")))
+ TQString id = eventId;
+ if (id.startsWith(TQString::fromLatin1("ad:")))
{
// It's a notification from the alarm deamon
id = id.mid(3);
@@ -723,7 +723,7 @@ void NotificationHandler::registered(bool reregister, int result, int version)
= Class: AlarmEnableAction
=============================================================================*/
-AlarmEnableAction::AlarmEnableAction(int accel, QObject* parent, const char* name)
+AlarmEnableAction::AlarmEnableAction(int accel, TQObject* parent, const char* name)
: KToggleAction(i18n("Enable &Alarms"), accel, parent, name),
mInitialised(false)
{
@@ -766,9 +766,9 @@ void AlarmEnableAction::setChecked(bool check)
* (We must store full URLs in the calendar data since otherwise later calls to
* reload or remove calendars won't necessarily find a match.)
*/
-QString expandURL(const QString& urlString)
+TQString expandURL(const TQString& urlString)
{
if (urlString.isEmpty())
- return QString();
+ return TQString();
return KURL(urlString).url();
}
diff --git a/kalarm/daemon.h b/kalarm/daemon.h
index 04198904c..58b34ecdf 100644
--- a/kalarm/daemon.h
+++ b/kalarm/daemon.h
@@ -21,8 +21,8 @@
#ifndef DAEMON_H
#define DAEMON_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include <kaction.h>
#include <kalarmd/kalarmd.h>
@@ -57,9 +57,9 @@ class Daemon : public QObject
static bool isRegistered() { return mStatus == REGISTERED; }
static void allowRegisterFailMsg() { mRegisterFailMsg = false; }
- static void queueEvent(const QString& eventID);
- static void savingEvent(const QString& eventID);
- static void eventHandled(const QString& eventID, bool reloadCal);
+ static void queueEvent(const TQString& eventID);
+ static void savingEvent(const TQString& eventID);
+ static void eventHandled(const TQString& eventID, bool reloadCal);
signals:
void daemonRunning(bool running);
@@ -86,7 +86,7 @@ class Daemon : public QObject
static bool registerWith(bool reregister);
static void registrationResult(bool reregister, int result, int version = 0);
static void reload();
- static void notifyEventHandled(const QString& eventID, bool reloadCal);
+ static void notifyEventHandled(const TQString& eventID, bool reloadCal);
static void updateRegisteredStatus(bool timeout = false);
static void enableCalendar(bool enable);
static void calendarIsEnabled(bool enabled);
@@ -95,11 +95,11 @@ class Daemon : public QObject
static Daemon* mInstance; // only one instance allowed
static NotificationHandler* mDcopHandler; // handles DCOP requests from daemon
- static QValueList<QString> mQueuedEvents; // IDs of pending events that daemon has triggered
- static QValueList<QString> mSavingEvents; // IDs of updated events that are currently being saved
- static QTimer* mStartTimer; // timer to check daemon status after starting daemon
- static QTimer* mRegisterTimer; // timer to check whether daemon has sent registration status
- static QTimer* mStatusTimer; // timer for checking daemon status
+ static TQValueList<TQString> mQueuedEvents; // IDs of pending events that daemon has triggered
+ static TQValueList<TQString> mSavingEvents; // IDs of updated events that are currently being saved
+ static TQTimer* mStartTimer; // timer to check daemon status after starting daemon
+ static TQTimer* mRegisterTimer; // timer to check whether daemon has sent registration status
+ static TQTimer* mStatusTimer; // timer for checking daemon status
static int mStatusTimerCount; // countdown for fast status checking
static int mStatusTimerInterval; // timer interval (seconds) for checking daemon status
static int mStartTimeout; // remaining number of times to check if alarm daemon has started
@@ -120,7 +120,7 @@ class AlarmEnableAction : public KToggleAction
{
Q_OBJECT
public:
- AlarmEnableAction(int accel, QObject* parent, const char* name = 0);
+ AlarmEnableAction(int accel, TQObject* parent, const char* name = 0);
public slots:
void setCheckedActual(bool); // set state and emit switched() signal
virtual void setChecked(bool); // request state change and emit userClicked() signal
diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp
index ab4105fe6..8c37ffd88 100644
--- a/kalarm/dcophandler.cpp
+++ b/kalarm/dcophandler.cpp
@@ -46,25 +46,25 @@ static const char* DCOP_OLD_OBJECT_NAME = "display";
=============================================================================*/
DcopHandler::DcopHandler()
: DCOPObject(DCOP_OBJECT_NAME),
- QWidget()
+ TQWidget()
{
kdDebug(5950) << "DcopHandler::DcopHandler()\n";
}
-bool DcopHandler::cancelEvent(const QString& url,const QString& eventId)
+bool DcopHandler::cancelEvent(const TQString& url,const TQString& eventId)
{
return theApp()->deleteEvent(url, eventId);
}
-bool DcopHandler::triggerEvent(const QString& url,const QString& eventId)
+bool DcopHandler::triggerEvent(const TQString& url,const TQString& eventId)
{
return theApp()->triggerEvent(url, eventId);
}
-bool DcopHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+bool DcopHandler::scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount)
{
DateTime start;
@@ -74,8 +74,8 @@ bool DcopHandler::scheduleMessage(const QString& message, const QString& startDa
return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font, audioFile, reminderMins, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+bool DcopHandler::scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
int recurType, int recurInterval, int recurCount)
{
@@ -86,10 +86,10 @@ bool DcopHandler::scheduleMessage(const QString& message, const QString& startDa
return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+bool DcopHandler::scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
- int recurType, int recurInterval, const QString& endDateTime)
+ int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -98,8 +98,8 @@ bool DcopHandler::scheduleMessage(const QString& message, const QString& startDa
return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+bool DcopHandler::scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount)
{
DateTime start;
@@ -109,7 +109,7 @@ bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, i
return scheduleFile(file, start, lateCancel, flags, bgColor, audioFile, reminderMins, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+bool DcopHandler::scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, int recurType, int recurInterval, int recurCount)
{
DateTime start;
@@ -119,8 +119,8 @@ bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, i
return scheduleFile(file, start, lateCancel, flags, bgColor, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -129,8 +129,8 @@ bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, i
return scheduleFile(file, start, lateCancel, flags, bgColor, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int subRepeatInterval, int subRepeatCount)
+bool DcopHandler::scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int subRepeatInterval, int subRepeatCount)
{
DateTime start;
KARecurrence recur;
@@ -139,7 +139,7 @@ bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& sta
return scheduleCommand(commandLine, start, lateCancel, flags, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
+bool DcopHandler::scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount)
{
DateTime start = convertStartDateTime(startDateTime);
@@ -151,8 +151,8 @@ bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& sta
return scheduleCommand(commandLine, start, lateCancel, flags, recur);
}
-bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -161,9 +161,9 @@ bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& sta
return scheduleCommand(commandLine, start, lateCancel, flags, recur);
}
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int subRepeatInterval, int subRepeatCount)
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int subRepeatInterval, int subRepeatCount)
{
DateTime start;
KARecurrence recur;
@@ -172,8 +172,8 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount)
{
DateTime start;
@@ -183,9 +183,9 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur);
}
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -194,12 +194,12 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur);
}
-bool DcopHandler::edit(const QString& eventID)
+bool DcopHandler::edit(const TQString& eventID)
{
return KAlarm::edit(eventID);
}
-bool DcopHandler::editNew(const QString& templateName)
+bool DcopHandler::editNew(const TQString& templateName)
{
return KAlarm::editNew(templateName);
}
@@ -208,16 +208,16 @@ bool DcopHandler::editNew(const QString& templateName)
/******************************************************************************
* Schedule a message alarm, after converting the parameters from strings.
*/
-bool DcopHandler::scheduleMessage(const QString& message, const DateTime& start, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& fontStr,
+bool DcopHandler::scheduleMessage(const TQString& message, const DateTime& start, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& fontStr,
const KURL& audioFile, int reminderMins, const KARecurrence& recurrence,
int subRepeatInterval, int subRepeatCount)
{
unsigned kaEventFlags = convertStartFlags(start, flags);
- QColor bg = convertBgColour(bgColor);
+ TQColor bg = convertBgColour(bgColor);
if (!bg.isValid())
return false;
- QColor fg;
+ TQColor fg;
if (fgColor.isEmpty())
fg = Preferences::defaultFgColour();
else
@@ -229,7 +229,7 @@ bool DcopHandler::scheduleMessage(const QString& message, const DateTime& start,
return false;
}
}
- QFont font;
+ TQFont font;
if (fontStr.isEmpty())
kaEventFlags |= KAEvent::DEFAULT_FONT;
else
@@ -248,35 +248,35 @@ bool DcopHandler::scheduleMessage(const QString& message, const DateTime& start,
* Schedule a file alarm, after converting the parameters from strings.
*/
bool DcopHandler::scheduleFile(const KURL& file,
- const DateTime& start, int lateCancel, unsigned flags, const QString& bgColor,
+ const DateTime& start, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, const KARecurrence& recurrence,
int subRepeatInterval, int subRepeatCount)
{
unsigned kaEventFlags = convertStartFlags(start, flags);
- QColor bg = convertBgColour(bgColor);
+ TQColor bg = convertBgColour(bgColor);
if (!bg.isValid())
return false;
- return theApp()->scheduleEvent(KAEvent::FILE, file.url(), start.dateTime(), lateCancel, kaEventFlags, bg, Qt::black, QFont(),
+ return theApp()->scheduleEvent(KAEvent::FILE, file.url(), start.dateTime(), lateCancel, kaEventFlags, bg, Qt::black, TQFont(),
audioFile.url(), -1, reminderMins, recurrence, subRepeatInterval, subRepeatCount);
}
/******************************************************************************
* Schedule a command alarm, after converting the parameters from strings.
*/
-bool DcopHandler::scheduleCommand(const QString& commandLine,
+bool DcopHandler::scheduleCommand(const TQString& commandLine,
const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence& recurrence, int subRepeatInterval, int subRepeatCount)
{
unsigned kaEventFlags = convertStartFlags(start, flags);
- return theApp()->scheduleEvent(KAEvent::COMMAND, commandLine, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
- QString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount);
+ return theApp()->scheduleEvent(KAEvent::COMMAND, commandLine, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, TQFont(),
+ TQString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount);
}
/******************************************************************************
* Schedule an email alarm, after validating the addresses and attachments.
*/
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject,
- const QString& message, const QString& attachments,
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject,
+ const TQString& message, const TQString& attachments,
const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence& recurrence, int subRepeatInterval, int subRepeatCount)
{
@@ -292,7 +292,7 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
}
}
EmailAddressList addrs;
- QString bad = KAMail::convertAddresses(addresses, addrs);
+ TQString bad = KAMail::convertAddresses(addresses, addrs);
if (!bad.isEmpty())
{
kdError(5950) << "DCOP call scheduleEmail(): invalid email addresses: " << bad << endl;
@@ -303,15 +303,15 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
kdError(5950) << "DCOP call scheduleEmail(): no email address\n";
return false;
}
- QStringList atts;
+ TQStringList atts;
bad = KAMail::convertAttachments(attachments, atts);
if (!bad.isEmpty())
{
kdError(5950) << "DCOP call scheduleEmail(): invalid email attachment: " << bad << endl;
return false;
}
- return theApp()->scheduleEvent(KAEvent::EMAIL, message, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
- QString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount, senderId, addrs, subject, atts);
+ return theApp()->scheduleEvent(KAEvent::EMAIL, message, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, TQFont(),
+ TQString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount, senderId, addrs, subject, atts);
}
@@ -319,18 +319,18 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
* Convert the start date/time string to a DateTime. The date/time string is in
* the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
*/
-DateTime DcopHandler::convertStartDateTime(const QString& startDateTime)
+DateTime DcopHandler::convertStartDateTime(const TQString& startDateTime)
{
DateTime start;
if (startDateTime.length() > 10)
{
// Both a date and a time are specified
- start = QDateTime::fromString(startDateTime, Qt::ISODate);
+ start = TQDateTime::fromString(startDateTime, Qt::ISODate);
}
else
{
// Check whether a time is specified
- QString t;
+ TQString t;
if (startDateTime[0] == 'T')
t = startDateTime.mid(1); // it's a time: remove the leading 'T'
else if (!startDateTime[2].isDigit())
@@ -339,12 +339,12 @@ DateTime DcopHandler::convertStartDateTime(const QString& startDateTime)
if (t.isEmpty())
{
// It's a date
- start = QDate::fromString(startDateTime, Qt::ISODate);
+ start = TQDate::fromString(startDateTime, Qt::ISODate);
}
else
{
// It's a time, so use today as the date
- start.set(QDate::currentDate(), QTime::fromString(t, Qt::ISODate));
+ start.set(TQDate::currentDate(), TQTime::fromString(t, Qt::ISODate));
}
}
if (!start.isValid())
@@ -374,20 +374,20 @@ unsigned DcopHandler::convertStartFlags(const DateTime& start, unsigned flags)
}
/******************************************************************************
-* Convert the background colour string to a QColor.
+* Convert the background colour string to a TQColor.
*/
-QColor DcopHandler::convertBgColour(const QString& bgColor)
+TQColor DcopHandler::convertBgColour(const TQString& bgColor)
{
if (bgColor.isEmpty())
return Preferences::defaultBgColour();
- QColor bg(bgColor);
+ TQColor bg(bgColor);
if (!bg.isValid())
kdError(5950) << "DCOP call: invalid background color: " << bgColor << endl;
return bg;
}
bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence,
- const QString& startDateTime, const QString& icalRecurrence,
+ const TQString& startDateTime, const TQString& icalRecurrence,
int& subRepeatInterval)
{
start = convertStartDateTime(startDateTime);
@@ -403,22 +403,22 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence,
return true;
}
-bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const QString& startDateTime,
+bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const TQString& startDateTime,
int recurType, int recurInterval, int recurCount)
{
start = convertStartDateTime(startDateTime);
if (!start.isValid())
return false;
- return convertRecurrence(recurrence, start, recurType, recurInterval, recurCount, QDateTime());
+ return convertRecurrence(recurrence, start, recurType, recurInterval, recurCount, TQDateTime());
}
-bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const QString& startDateTime,
- int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const TQString& startDateTime,
+ int recurType, int recurInterval, const TQString& endDateTime)
{
start = convertStartDateTime(startDateTime);
if (!start.isValid())
return false;
- QDateTime end;
+ TQDateTime end;
if (endDateTime.find('T') < 0)
{
if (!start.isDateOnly())
@@ -426,7 +426,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c
kdError(5950) << "DCOP call: alarm is date-only, but recurrence end is date/time" << endl;
return false;
}
- end.setDate(QDate::fromString(endDateTime, Qt::ISODate));
+ end.setDate(TQDate::fromString(endDateTime, Qt::ISODate));
}
else
{
@@ -435,7 +435,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c
kdError(5950) << "DCOP call: alarm is timed, but recurrence end is date-only" << endl;
return false;
}
- end = QDateTime::fromString(endDateTime, Qt::ISODate);
+ end = TQDateTime::fromString(endDateTime, Qt::ISODate);
}
if (!end.isValid())
{
@@ -446,7 +446,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c
}
bool DcopHandler::convertRecurrence(KARecurrence& recurrence, const DateTime& start, int recurType,
- int recurInterval, int recurCount, const QDateTime& end)
+ int recurInterval, int recurCount, const TQDateTime& end)
{
KARecurrence::Type type;
switch (recurType)
@@ -472,7 +472,7 @@ bool DcopHandler::convertRecurrence(KARecurrence& recurrence, const DateTime& st
= This class's function is simply to act as a receiver for DCOP requests.
=============================================================================*/
DcopHandlerOld::DcopHandlerOld()
- : QWidget(),
+ : TQWidget(),
DCOPObject(DCOP_OLD_OBJECT_NAME)
{
kdDebug(5950) << "DcopHandlerOld::DcopHandlerOld()\n";
@@ -481,7 +481,7 @@ DcopHandlerOld::DcopHandlerOld()
/******************************************************************************
* Process a DCOP request.
*/
-bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCString& replyType, QByteArray&)
+bool DcopHandlerOld::process(const TQCString& func, const TQByteArray& data, TQCString& replyType, TQByteArray&)
{
kdDebug(5950) << "DcopHandlerOld::process(): " << func << endl;
enum
@@ -505,127 +505,127 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
};
replyType = "void";
int function;
- if (func == "handleEvent(const QString&,const QString&)"
- || func == "handleEvent(QString,QString)")
+ if (func == "handleEvent(const TQString&,const TQString&)"
+ || func == "handleEvent(TQString,TQString)")
function = HANDLE;
- else if (func == "cancelEvent(const QString&,const QString&)"
- || func == "cancelEvent(QString,QString)")
+ else if (func == "cancelEvent(const TQString&,const TQString&)"
+ || func == "cancelEvent(TQString,TQString)")
function = CANCEL;
- else if (func == "triggerEvent(const QString&,const QString&)"
- || func == "triggerEvent(QString,QString)")
+ else if (func == "triggerEvent(const TQString&,const TQString&)"
+ || func == "triggerEvent(TQString,TQString)")
function = TRIGGER;
// scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE;
// scheduleMessage(message, dateTime, colour, colourfg, font, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,const QFont&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,QFont,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,const TQFont&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,TQFont,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | FONT;
// scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,const QString&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,const TQString&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | FILE;
// scheduleCommand(commandLine, dateTime, flags, recurrence)
- else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,const QString&)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,QString)")
+ else if (func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,const TQString&)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,TQString)")
function = SCHEDULE | COMMAND;
// scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurrence)
- else if (func == "scheduleEmail(const QString&,const QString&,const QString&,const QString&,const QDateTime&,Q_UINT32,const QString&)"
- || func == "scheduleEmail(QString,QString,QString,QString,QDateTime,Q_UINT32,QString)")
+ else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,Q_UINT32,const TQString&)"
+ || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,Q_UINT32,TQString)")
function = SCHEDULE | EMAIL;
// scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurType, interval, recurCount)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | MESSAGE | REP_COUNT;
// scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurType, interval, recurCount)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | FILE | REP_COUNT;
// scheduleCommand(commandLine, dateTime, flags, recurType, interval, recurCount)
- else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | COMMAND | REP_COUNT;
// scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurType, interval, recurCount)
- else if (func == "scheduleEmail(const QString&,const QString&,const QString&,const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleEmail(QString,QString,QString,QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | EMAIL | REP_COUNT;
// scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurType, interval, endTime)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | MESSAGE | REP_END;
// scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurType, interval, endTime)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | FILE | REP_END;
// scheduleCommand(commandLine, dateTime, flags, recurType, interval, endTime)
- else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | COMMAND | REP_END;
// scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurType, interval, endTime)
- else if (func == "scheduleEmail(const QString&,const QString&,const QString&,const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleEmail(QString,QString,QString,QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | EMAIL | REP_END;
// Deprecated methods: backwards compatibility with KAlarm pre-0.9.6
// scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | PRE_096;
// scheduleMessage(message, dateTime, colour, font, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QFont&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QFont,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQFont&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQFont,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | FONT | PRE_096;
// scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurType, interval, recurCount)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | MESSAGE | REP_COUNT | PRE_096;
// scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurType, interval, endTime)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | MESSAGE | REP_END | PRE_096;
// Deprecated methods: backwards compatibility with KAlarm pre-0.9.1
// scheduleMessage(message, dateTime, colour, flags, audioURL)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | PRE_091;
// scheduleFile(URL, dateTime, colour, flags, audioURL)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString)")
function = SCHEDULE | FILE | PRE_091;
// scheduleMessage(message, dateTime, colour, flags, audioURL, recurType, interval, recurCount)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | MESSAGE | REP_COUNT | PRE_091;
// scheduleFile(URL, dateTime, colour, flags, audioURL, recurType, interval, recurCount)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | FILE | REP_COUNT | PRE_091;
// scheduleMessage(message, dateTime, colour, flags, audioURL, recurType, interval, endTime)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | MESSAGE | REP_END | PRE_091;
// scheduleFile(URL, dateTime, colour, flags, audioURL, recurType, interval, endTime)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | FILE | REP_END | PRE_091;
// Obsolete methods: backwards compatibility with KAlarm pre-0.7
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32)"
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32)"
// Obsolete methods: backwards compatibility with KAlarm pre-0.6
- || func == "cancelMessage(const QString&,const QString&)"
- || func == "cancelMessage(QString,QString)"
- || func == "displayMessage(const QString&,const QString&)"
- || func == "displayMessage(QString,QString)")
+ || func == "cancelMessage(const TQString&,const TQString&)"
+ || func == "cancelMessage(TQString,TQString)"
+ || func == "displayMessage(const TQString&,const TQString&)"
+ || func == "displayMessage(TQString,TQString)")
{
kdError(5950) << "DcopHandlerOld::process(): obsolete DCOP function call: '" << func << "'" << endl;
return false;
@@ -643,8 +643,8 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
case TRIGGER: // trigger event with specified ID in calendar file
{
- QDataStream arg(data, IO_ReadOnly);
- QString urlString, vuid;
+ TQDataStream arg(data, IO_ReadOnly);
+ TQString urlString, vuid;
arg >> urlString >> vuid;
switch (function)
{
@@ -668,24 +668,24 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
case EMAIL: action = KAEvent::EMAIL; break;
default: return false;
}
- QDataStream arg(data, IO_ReadOnly);
- QString text, audioFile, mailSubject;
+ TQDataStream arg(data, IO_ReadOnly);
+ TQString text, audioFile, mailSubject;
float audioVolume = -1;
EmailAddressList mailAddresses;
- QStringList mailAttachments;
- QDateTime dateTime, endTime;
- QColor bgColour;
- QColor fgColour(Qt::black);
- QFont font;
+ TQStringList mailAttachments;
+ TQDateTime dateTime, endTime;
+ TQColor bgColour;
+ TQColor fgColour(Qt::black);
+ TQFont font;
Q_UINT32 flags;
int lateCancel = 0;
KARecurrence recurrence;
Q_INT32 reminderMinutes = 0;
if (action == KAEvent::EMAIL)
{
- QString addresses, attachments;
+ TQString addresses, attachments;
arg >> addresses >> mailSubject >> text >> attachments;
- QString bad = KAMail::convertAddresses(addresses, mailAddresses);
+ TQString bad = KAMail::convertAddresses(addresses, mailAddresses);
if (!bad.isEmpty())
{
kdError(5950) << "DcopHandlerOld::process(): invalid email addresses: " << bad << endl;
@@ -755,7 +755,7 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
}
else if (!(function & PRE_091))
{
- QString rule;
+ TQString rule;
arg >> rule;
recurrence.set(rule);
}
diff --git a/kalarm/dcophandler.h b/kalarm/dcophandler.h
index 1ea6f05e5..f14f4cda7 100644
--- a/kalarm/dcophandler.h
+++ b/kalarm/dcophandler.h
@@ -21,86 +21,86 @@
#ifndef DCOPHANDLER_H
#define DCOPHANDLER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <dcopobject.h>
#include "datetime.h"
#include "kalarmiface.h"
-class DcopHandler : public QWidget, virtual public KAlarmIface
+class DcopHandler : public TQWidget, virtual public KAlarmIface
{
public:
DcopHandler();
- virtual bool cancelEvent(const QString& url,const QString& eventId);
- virtual bool triggerEvent(const QString& url,const QString& eventId);
+ virtual bool cancelEvent(const TQString& url,const TQString& eventId);
+ virtual bool triggerEvent(const TQString& url,const TQString& eventId);
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount);
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins, int recurType, int recurInterval, int recurCount);
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const QString& endDateTime);
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount);
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, int recurType, int recurInterval, int recurCount);
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const QString& endDateTime);
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int subRepeatInterval, int subRepeatCount);
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int subRepeatInterval, int subRepeatCount);
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount);
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime);
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int recurInterval, int recurCount);
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int recurInterval, int recurCount);
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount);
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime);
- virtual bool edit(const QString& eventID);
- virtual bool editNew(const QString& templateName);
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool edit(const TQString& eventID);
+ virtual bool editNew(const TQString& templateName);
private:
- static bool scheduleMessage(const QString& message, const DateTime& start, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& fontStr,
+ static bool scheduleMessage(const TQString& message, const DateTime& start, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& fontStr,
const KURL& audioFile, int reminderMins, const KARecurrence&,
int subRepeatInterval = 0, int subRepeatCount = 0);
- static bool scheduleFile(const KURL& file, const DateTime& start, int lateCancel, unsigned flags, const QString& bgColor,
+ static bool scheduleFile(const KURL& file, const DateTime& start, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, const KARecurrence&,
int subRepeatInterval = 0, int subRepeatCount = 0);
- static bool scheduleCommand(const QString& commandLine, const DateTime& start, int lateCancel, unsigned flags,
+ static bool scheduleCommand(const TQString& commandLine, const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence&, int subRepeatInterval = 0, int subRepeatCount = 0);
- static bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const DateTime& start, int lateCancel, unsigned flags,
+ static bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence&, int subRepeatInterval = 0, int subRepeatCount = 0);
- static DateTime convertStartDateTime(const QString& startDateTime);
+ static DateTime convertStartDateTime(const TQString& startDateTime);
static unsigned convertStartFlags(const DateTime& start, unsigned flags);
- static QColor convertBgColour(const QString& bgColor);
- static bool convertRecurrence(DateTime& start, KARecurrence&, const QString& startDateTime, const QString& icalRecurrence, int& subRepeatInterval);
- static bool convertRecurrence(DateTime& start, KARecurrence&, const QString& startDateTime, int recurType, int recurInterval, int recurCount);
- static bool convertRecurrence(DateTime& start, KARecurrence&, const QString& startDateTime, int recurType, int recurInterval, const QString& endDateTime);
- static bool convertRecurrence(KARecurrence&, const DateTime& start, int recurType, int recurInterval, int recurCount, const QDateTime& end);
+ static TQColor convertBgColour(const TQString& bgColor);
+ static bool convertRecurrence(DateTime& start, KARecurrence&, const TQString& startDateTime, const TQString& icalRecurrence, int& subRepeatInterval);
+ static bool convertRecurrence(DateTime& start, KARecurrence&, const TQString& startDateTime, int recurType, int recurInterval, int recurCount);
+ static bool convertRecurrence(DateTime& start, KARecurrence&, const TQString& startDateTime, int recurType, int recurInterval, const TQString& endDateTime);
+ static bool convertRecurrence(KARecurrence&, const DateTime& start, int recurType, int recurInterval, int recurCount, const TQDateTime& end);
};
#ifdef OLD_DCOP
-class DcopHandlerOld : public QWidget, public DCOPObject
+class DcopHandlerOld : public TQWidget, public DCOPObject
{
Q_OBJECT
public:
DcopHandlerOld();
~DcopHandlerOld() { }
- virtual bool process(const QCString& func, const QByteArray& data, QCString& replyType, QByteArray& replyData);
+ virtual bool process(const TQCString& func, const TQByteArray& data, TQCString& replyType, TQByteArray& replyData);
};
#endif
diff --git a/kalarm/deferdlg.cpp b/kalarm/deferdlg.cpp
index 5e0e039c4..60fce82c5 100644
--- a/kalarm/deferdlg.cpp
+++ b/kalarm/deferdlg.cpp
@@ -20,7 +20,7 @@
#include "kalarm.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kglobal.h>
#include <klocale.h>
@@ -39,21 +39,21 @@
#include "deferdlg.moc"
-DeferAlarmDlg::DeferAlarmDlg(const QString& caption, const DateTime& initialDT,
- bool cancelButton, QWidget* parent, const char* name)
+DeferAlarmDlg::DeferAlarmDlg(const TQString& caption, const DateTime& initialDT,
+ bool cancelButton, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel|User1, Ok, false, i18n("Cancel &Deferral"))
{
if (!cancelButton)
showButton(User1, false);
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
mTimeWidget = new AlarmTimeWidget(AlarmTimeWidget::DEFER_TIME, page, "timeGroup");
mTimeWidget->setDateTime(initialDT);
mTimeWidget->setMinDateTimeIsCurrent();
- connect(mTimeWidget, SIGNAL(pastMax()), SLOT(slotPastLimit()));
+ connect(mTimeWidget, TQT_SIGNAL(pastMax()), TQT_SLOT(slotPastLimit()));
layout->addWidget(mTimeWidget);
layout->addSpacing(spacingHint());
@@ -89,7 +89,7 @@ void DeferAlarmDlg::slotOk()
}
if (endTime.isValid() && mAlarmDateTime > endTime)
{
- QString text;
+ TQString text;
switch (limitType)
{
case KAEvent::LIMIT_REPETITION:
@@ -135,7 +135,7 @@ void DeferAlarmDlg::slotPastLimit()
*/
void DeferAlarmDlg::setLimit(const DateTime& limit)
{
- mLimitEventID = QString::null;
+ mLimitEventID = TQString::null;
mLimitDateTime = limit;
mTimeWidget->setMaxDateTime(mLimitDateTime);
}
@@ -144,7 +144,7 @@ void DeferAlarmDlg::setLimit(const DateTime& limit)
* Set the time limit for deferral based on the next occurrence of the alarm
* with the specified ID.
*/
-DateTime DeferAlarmDlg::setLimit(const QString& eventID)
+DateTime DeferAlarmDlg::setLimit(const TQString& eventID)
{
mLimitEventID = eventID;
const KCal::Event* kcalEvent = AlarmCalendar::getEvent(mLimitEventID);
diff --git a/kalarm/deferdlg.h b/kalarm/deferdlg.h
index 69275a054..999eccf40 100644
--- a/kalarm/deferdlg.h
+++ b/kalarm/deferdlg.h
@@ -31,10 +31,10 @@ class DeferAlarmDlg : public KDialogBase
{
Q_OBJECT
public:
- DeferAlarmDlg(const QString& caption, const DateTime& initialDT,
- bool cancelButton, QWidget* parent = 0, const char* name = 0);
+ DeferAlarmDlg(const TQString& caption, const DateTime& initialDT,
+ bool cancelButton, TQWidget* parent = 0, const char* name = 0);
void setLimit(const DateTime&);
- DateTime setLimit(const QString& eventID);
+ DateTime setLimit(const TQString& eventID);
const DateTime& getDateTime() const { return mAlarmDateTime; }
void setDeferMinutes(int mins);
int deferMinutes() const { return mDeferMinutes; }
@@ -51,7 +51,7 @@ class DeferAlarmDlg : public KDialogBase
AlarmTimeWidget* mTimeWidget;
DateTime mAlarmDateTime;
DateTime mLimitDateTime; // latest date/time allowed for deferral
- QString mLimitEventID; // event from whose recurrences to derive the limit date/time for deferral
+ TQString mLimitEventID; // event from whose recurrences to derive the limit date/time for deferral
int mDeferMinutes; // number of minutes deferral selected, or 0 if date/time entered
};
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index 232111000..bd22fdd9a 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -22,20 +22,20 @@
#include <limits.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdragobject.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qtabwidget.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qdir.h>
-#include <qstyle.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdragobject.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqtabwidget.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqdir.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -97,15 +97,15 @@ static const int maxDelayTime = 99*60 + 59; // < 100 hours
class PickAlarmFileRadio : public PickFileRadio
{
public:
- PickAlarmFileRadio(const QString& text, QButtonGroup* parent, const char* name = 0)
+ PickAlarmFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0)
: PickFileRadio(text, parent, name) { }
- virtual QString pickFile() // called when browse button is pressed to select a file to display
+ virtual TQString pickFile() // called when browse button is pressed to select a file to display
{
return KAlarm::browseFile(i18n("Choose Text or Image File to Display"), mDefaultDir, fileEdit()->text(),
- QString::null, KFile::ExistingOnly, parentWidget(), "pickAlarmFile");
+ TQString::null, KFile::ExistingOnly, parentWidget(), "pickAlarmFile");
}
private:
- QString mDefaultDir; // default directory for file browse button
+ TQString mDefaultDir; // default directory for file browse button
};
/*=============================================================================
@@ -114,22 +114,22 @@ class PickAlarmFileRadio : public PickFileRadio
class PickLogFileRadio : public PickFileRadio
{
public:
- PickLogFileRadio(QPushButton* b, LineEdit* e, const QString& text, QButtonGroup* parent, const char* name = 0)
+ PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* parent, const char* name = 0)
: PickFileRadio(b, e, text, parent, name) { }
- virtual QString pickFile() // called when browse button is pressed to select a log file
+ virtual TQString pickFile() // called when browse button is pressed to select a log file
{
- return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), QString::null,
+ return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), TQString::null,
KFile::LocalOnly, parentWidget(), "pickLogFile");
}
private:
- QString mDefaultDir; // default directory for log file browse button
+ TQString mDefaultDir; // default directory for log file browse button
};
-inline QString recurText(const KAEvent& event)
+inline TQString recurText(const KAEvent& event)
{
- QString r;
+ TQString r;
if (event.repeatCount())
- r = QString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText());
+ r = TQString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText());
else
r = event.recurrenceText();
return i18n("&Recurrence - [%1]").arg(r);
@@ -137,25 +137,25 @@ inline QString recurText(const KAEvent& event)
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString EditAlarmDlg::i18n_ConfirmAck() { return i18n("Confirm acknowledgment"); }
-QString EditAlarmDlg::i18n_k_ConfirmAck() { return i18n("Confirm ac&knowledgment"); }
-QString EditAlarmDlg::i18n_SpecialActions() { return i18n("Special Actions..."); }
-QString EditAlarmDlg::i18n_ShowInKOrganizer() { return i18n("Show in KOrganizer"); }
-QString EditAlarmDlg::i18n_g_ShowInKOrganizer() { return i18n("Show in KOr&ganizer"); }
-QString EditAlarmDlg::i18n_EnterScript() { return i18n("Enter a script"); }
-QString EditAlarmDlg::i18n_p_EnterScript() { return i18n("Enter a scri&pt"); }
-QString EditAlarmDlg::i18n_ExecInTermWindow() { return i18n("Execute in terminal window"); }
-QString EditAlarmDlg::i18n_w_ExecInTermWindow() { return i18n("Execute in terminal &window"); }
-QString EditAlarmDlg::i18n_u_ExecInTermWindow() { return i18n("Exec&ute in terminal window"); }
-QString EditAlarmDlg::i18n_g_LogToFile() { return i18n("Lo&g to file"); }
-QString EditAlarmDlg::i18n_CopyEmailToSelf() { return i18n("Copy email to self"); }
-QString EditAlarmDlg::i18n_e_CopyEmailToSelf() { return i18n("Copy &email to self"); }
-QString EditAlarmDlg::i18n_s_CopyEmailToSelf() { return i18n("Copy email to &self"); }
-QString EditAlarmDlg::i18n_EmailFrom() { return i18n("'From' email address", "From:"); }
-QString EditAlarmDlg::i18n_f_EmailFrom() { return i18n("'From' email address", "&From:"); }
-QString EditAlarmDlg::i18n_EmailTo() { return i18n("Email addressee", "To:"); }
-QString EditAlarmDlg::i18n_EmailSubject() { return i18n("Email subject", "Subject:"); }
-QString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "Sub&ject:"); }
+TQString EditAlarmDlg::i18n_ConfirmAck() { return i18n("Confirm acknowledgment"); }
+TQString EditAlarmDlg::i18n_k_ConfirmAck() { return i18n("Confirm ac&knowledgment"); }
+TQString EditAlarmDlg::i18n_SpecialActions() { return i18n("Special Actions..."); }
+TQString EditAlarmDlg::i18n_ShowInKOrganizer() { return i18n("Show in KOrganizer"); }
+TQString EditAlarmDlg::i18n_g_ShowInKOrganizer() { return i18n("Show in KOr&ganizer"); }
+TQString EditAlarmDlg::i18n_EnterScript() { return i18n("Enter a script"); }
+TQString EditAlarmDlg::i18n_p_EnterScript() { return i18n("Enter a scri&pt"); }
+TQString EditAlarmDlg::i18n_ExecInTermWindow() { return i18n("Execute in terminal window"); }
+TQString EditAlarmDlg::i18n_w_ExecInTermWindow() { return i18n("Execute in terminal &window"); }
+TQString EditAlarmDlg::i18n_u_ExecInTermWindow() { return i18n("Exec&ute in terminal window"); }
+TQString EditAlarmDlg::i18n_g_LogToFile() { return i18n("Lo&g to file"); }
+TQString EditAlarmDlg::i18n_CopyEmailToSelf() { return i18n("Copy email to self"); }
+TQString EditAlarmDlg::i18n_e_CopyEmailToSelf() { return i18n("Copy &email to self"); }
+TQString EditAlarmDlg::i18n_s_CopyEmailToSelf() { return i18n("Copy email to &self"); }
+TQString EditAlarmDlg::i18n_EmailFrom() { return i18n("'From' email address", "From:"); }
+TQString EditAlarmDlg::i18n_f_EmailFrom() { return i18n("'From' email address", "&From:"); }
+TQString EditAlarmDlg::i18n_EmailTo() { return i18n("Email addressee", "To:"); }
+TQString EditAlarmDlg::i18n_EmailSubject() { return i18n("Email subject", "Subject:"); }
+TQString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "Sub&ject:"); }
/******************************************************************************
@@ -165,7 +165,7 @@ QString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "
* = false to edit/create an alarm.
* event != to initialise the dialogue to show the specified event's data.
*/
-EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* parent, const char* name,
+EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent, const char* name,
const KAEvent* event, bool readOnly)
: KDialogBase(parent, (name ? name : Template ? "TemplEditDlg" : "EditDlg"), true, caption,
(readOnly ? Cancel|Try : Template ? Ok|Cancel|Try : Ok|Cancel|Try|Default),
@@ -188,56 +188,56 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
mSavedEvent(0)
{
setButtonText(Default, i18n("Load Template..."));
- QVBox* mainWidget = new QVBox(this);
+ TQVBox* mainWidget = new TQVBox(this);
mainWidget->setSpacing(spacingHint());
setMainWidget(mainWidget);
if (mTemplate)
{
- QHBox* box = new QHBox(mainWidget);
+ TQHBox* box = new TQHBox(mainWidget);
box->setSpacing(spacingHint());
- QLabel* label = new QLabel(i18n("Template name:"), box);
+ TQLabel* label = new TQLabel(i18n("Template name:"), box);
label->setFixedSize(label->sizeHint());
- mTemplateName = new QLineEdit(box);
+ mTemplateName = new TQLineEdit(box);
mTemplateName->setReadOnly(mReadOnly);
label->setBuddy(mTemplateName);
- QWhatsThis::add(box, i18n("Enter the name of the alarm template"));
+ TQWhatsThis::add(box, i18n("Enter the name of the alarm template"));
box->setFixedHeight(box->sizeHint().height());
}
- mTabs = new QTabWidget(mainWidget);
+ mTabs = new TQTabWidget(mainWidget);
mTabs->setMargin(marginHint());
- QVBox* mainPageBox = new QVBox(mTabs);
+ TQVBox* mainPageBox = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
mTabs->addTab(mainPageBox, i18n("&Alarm"));
mMainPageIndex = 0;
PageFrame* mainPage = new PageFrame(mainPageBox);
- connect(mainPage, SIGNAL(shown()), SLOT(slotShowMainPage()));
- QVBoxLayout* topLayout = new QVBoxLayout(mainPage, 0, spacingHint());
+ connect(mainPage, TQT_SIGNAL(shown()), TQT_SLOT(slotShowMainPage()));
+ TQVBoxLayout* topLayout = new TQVBoxLayout(mainPage, 0, spacingHint());
// Recurrence tab
- QVBox* recurTab = new QVBox(mTabs);
+ TQVBox* recurTab = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
- mTabs->addTab(recurTab, QString::null);
+ mTabs->addTab(recurTab, TQString::null);
mRecurPageIndex = 1;
mRecurrenceEdit = new RecurrenceEdit(readOnly, recurTab, "recurPage");
- connect(mRecurrenceEdit, SIGNAL(shown()), SLOT(slotShowRecurrenceEdit()));
- connect(mRecurrenceEdit, SIGNAL(typeChanged(int)), SLOT(slotRecurTypeChange(int)));
- connect(mRecurrenceEdit, SIGNAL(frequencyChanged()), SLOT(slotRecurFrequencyChange()));
- connect(mRecurrenceEdit, SIGNAL(repeatNeedsInitialisation()), SLOT(slotSetSubRepetition()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(shown()), TQT_SLOT(slotShowRecurrenceEdit()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(typeChanged(int)), TQT_SLOT(slotRecurTypeChange(int)));
+ connect(mRecurrenceEdit, TQT_SIGNAL(frequencyChanged()), TQT_SLOT(slotRecurFrequencyChange()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(repeatNeedsInitialisation()), TQT_SLOT(slotSetSubRepetition()));
// Alarm action
mActionGroup = new ButtonGroup(i18n("Action"), mainPage, "actionGroup");
- connect(mActionGroup, SIGNAL(buttonSet(int)), SLOT(slotAlarmTypeChanged(int)));
+ connect(mActionGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotAlarmTypeChanged(int)));
topLayout->addWidget(mActionGroup, 1);
- QBoxLayout* layout = new QVBoxLayout(mActionGroup, marginHint(), spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mActionGroup, marginHint(), spacingHint());
layout->addSpacing(fontMetrics().lineSpacing()/2);
- QGridLayout* grid = new QGridLayout(layout, 1, 5);
+ TQGridLayout* grid = new TQGridLayout(layout, 1, 5);
// Message radio button
mMessageRadio = new RadioButton(i18n("Te&xt"), mActionGroup, "messageButton");
mMessageRadio->setFixedSize(mMessageRadio->sizeHint());
- QWhatsThis::add(mMessageRadio,
+ TQWhatsThis::add(mMessageRadio,
i18n("If checked, the alarm will display a text message."));
grid->addWidget(mMessageRadio, 1, 0);
grid->setColStretch(1, 1);
@@ -245,7 +245,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// File radio button
mFileRadio = new PickAlarmFileRadio(i18n("&File"), mActionGroup, "fileButton");
mFileRadio->setFixedSize(mFileRadio->sizeHint());
- QWhatsThis::add(mFileRadio,
+ TQWhatsThis::add(mFileRadio,
i18n("If checked, the alarm will display the contents of a text or image file."));
grid->addWidget(mFileRadio, 1, 2);
grid->setColStretch(3, 1);
@@ -253,7 +253,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Command radio button
mCommandRadio = new RadioButton(i18n("Co&mmand"), mActionGroup, "cmdButton");
mCommandRadio->setFixedSize(mCommandRadio->sizeHint());
- QWhatsThis::add(mCommandRadio,
+ TQWhatsThis::add(mCommandRadio,
i18n("If checked, the alarm will execute a shell command."));
grid->addWidget(mCommandRadio, 1, 4);
grid->setColStretch(5, 1);
@@ -261,7 +261,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Email radio button
mEmailRadio = new RadioButton(i18n("&Email"), mActionGroup, "emailButton");
mEmailRadio->setFixedSize(mEmailRadio->sizeHint());
- QWhatsThis::add(mEmailRadio,
+ TQWhatsThis::add(mEmailRadio,
i18n("If checked, the alarm will send an email."));
grid->addWidget(mEmailRadio, 1, 6);
@@ -273,70 +273,70 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
layout->addWidget(mEmailFrame);
// Deferred date/time: visible only for a deferred recurring event.
- mDeferGroup = new QGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
+ mDeferGroup = new TQGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
topLayout->addWidget(mDeferGroup);
- QLabel* label = new QLabel(i18n("Deferred to:"), mDeferGroup);
+ TQLabel* label = new TQLabel(i18n("Deferred to:"), mDeferGroup);
label->setFixedSize(label->sizeHint());
- mDeferTimeLabel = new QLabel(mDeferGroup);
+ mDeferTimeLabel = new TQLabel(mDeferGroup);
- mDeferChangeButton = new QPushButton(i18n("C&hange..."), mDeferGroup);
+ mDeferChangeButton = new TQPushButton(i18n("C&hange..."), mDeferGroup);
mDeferChangeButton->setFixedSize(mDeferChangeButton->sizeHint());
- connect(mDeferChangeButton, SIGNAL(clicked()), SLOT(slotEditDeferral()));
- QWhatsThis::add(mDeferChangeButton, i18n("Change the alarm's deferred time, or cancel the deferral"));
+ connect(mDeferChangeButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditDeferral()));
+ TQWhatsThis::add(mDeferChangeButton, i18n("Change the alarm's deferred time, or cancel the deferral"));
mDeferGroup->addSpace(0);
- layout = new QHBoxLayout(topLayout);
+ layout = new TQHBoxLayout(topLayout);
// Date and time entry
if (mTemplate)
{
mTemplateTimeGroup = new ButtonGroup(i18n("Time"), mainPage, "templateGroup");
- connect(mTemplateTimeGroup, SIGNAL(buttonSet(int)), SLOT(slotTemplateTimeType(int)));
+ connect(mTemplateTimeGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotTemplateTimeType(int)));
layout->addWidget(mTemplateTimeGroup);
- grid = new QGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
+ grid = new TQGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
mTemplateDefaultTime = new RadioButton(i18n("&Default time"), mTemplateTimeGroup, "templateDefTimeButton");
mTemplateDefaultTime->setFixedSize(mTemplateDefaultTime->sizeHint());
mTemplateDefaultTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateDefaultTime,
+ TQWhatsThis::add(mTemplateDefaultTime,
i18n("Do not specify a start time for alarms based on this template. "
"The normal default start time will be used."));
grid->addWidget(mTemplateDefaultTime, 0, 0, alignment);
- QHBox* box = new QHBox(mTemplateTimeGroup);
+ TQHBox* box = new TQHBox(mTemplateTimeGroup);
box->setSpacing(spacingHint());
mTemplateUseTime = new RadioButton(i18n("Time:"), box, "templateTimeButton");
mTemplateUseTime->setFixedSize(mTemplateUseTime->sizeHint());
mTemplateUseTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateUseTime,
+ TQWhatsThis::add(mTemplateUseTime,
i18n("Specify a start time for alarms based on this template."));
mTemplateTimeGroup->insert(mTemplateUseTime);
mTemplateTime = new TimeEdit(box, "templateTimeEdit");
mTemplateTime->setFixedSize(mTemplateTime->sizeHint());
mTemplateTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateTime,
- QString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template."))
+ TQWhatsThis::add(mTemplateTime,
+ TQString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template."))
.arg(TimeSpinBox::shiftWhatsThis()));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 0, 1, alignment);
mTemplateAnyTime = new RadioButton(i18n("An&y time"), mTemplateTimeGroup, "templateAnyTimeButton");
mTemplateAnyTime->setFixedSize(mTemplateAnyTime->sizeHint());
mTemplateAnyTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateAnyTime,
+ TQWhatsThis::add(mTemplateAnyTime,
i18n("Set the '%1' option for alarms based on this template.").arg(i18n("Any time")));
grid->addWidget(mTemplateAnyTime, 1, 0, alignment);
- box = new QHBox(mTemplateTimeGroup);
+ box = new TQHBox(mTemplateTimeGroup);
box->setSpacing(spacingHint());
mTemplateUseTimeAfter = new RadioButton(AlarmTimeWidget::i18n_w_TimeFromNow(), box, "templateFromNowButton");
mTemplateUseTimeAfter->setFixedSize(mTemplateUseTimeAfter->sizeHint());
mTemplateUseTimeAfter->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateUseTimeAfter,
+ TQWhatsThis::add(mTemplateUseTimeAfter,
i18n("Set alarms based on this template to start after the specified time "
"interval from when the alarm is created."));
mTemplateTimeGroup->insert(mTemplateUseTimeAfter);
@@ -344,8 +344,8 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
mTemplateTimeAfter->setValue(1439);
mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->sizeHint());
mTemplateTimeAfter->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateTimeAfter,
- QString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod())
+ TQWhatsThis::add(mTemplateTimeAfter,
+ TQString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod())
.arg(TimeSpinBox::shiftWhatsThis()));
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 1, 1, alignment);
@@ -355,15 +355,15 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
else
{
mTimeWidget = new AlarmTimeWidget(i18n("Time"), AlarmTimeWidget::AT_TIME, mainPage, "timeGroup");
- connect(mTimeWidget, SIGNAL(anyTimeToggled(bool)), SLOT(slotAnyTimeToggled(bool)));
+ connect(mTimeWidget, TQT_SIGNAL(anyTimeToggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
topLayout->addWidget(mTimeWidget);
}
// Reminder
- static const QString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm.");
+ static const TQString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm.");
mReminder = new Reminder(i18n("Rem&inder:"),
i18n("Check to additionally display a reminder in advance of the main alarm time(s)."),
- QString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
+ TQString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
true, true, mainPage);
mReminder->setFixedSize(mReminder->sizeHint());
topLayout->addWidget(mReminder, 0, Qt::AlignAuto);
@@ -373,7 +373,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
topLayout->addWidget(mLateCancel, 0, Qt::AlignAuto);
// Acknowledgement confirmation required - default = no confirmation
- layout = new QHBoxLayout(topLayout, 0);
+ layout = new TQHBoxLayout(topLayout, 0);
mConfirmAck = createConfirmAckCheckbox(mainPage);
mConfirmAck->setFixedSize(mConfirmAck->sizeHint());
layout->addWidget(mConfirmAck);
@@ -385,7 +385,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Show in KOrganizer checkbox
mShowInKorganizer = new CheckBox(i18n_ShowInKOrganizer(), mainPage);
mShowInKorganizer->setFixedSize(mShowInKorganizer->sizeHint());
- QWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar"));
+ TQWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar"));
layout->addWidget(mShowInKorganizer);
}
@@ -414,31 +414,31 @@ EditAlarmDlg::~EditAlarmDlg()
/******************************************************************************
* Set up the dialog controls common to display alarms.
*/
-void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
+void EditAlarmDlg::initDisplayAlarms(TQWidget* parent)
{
- mDisplayAlarmsFrame = new QFrame(parent);
- mDisplayAlarmsFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* frameLayout = new QVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
+ mDisplayAlarmsFrame = new TQFrame(parent);
+ mDisplayAlarmsFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* frameLayout = new TQVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
// Text message edit box
mTextMessageEdit = new TextEdit(mDisplayAlarmsFrame);
mTextMessageEdit->setWordWrap(KTextEdit::NoWrap);
- QWhatsThis::add(mTextMessageEdit, i18n("Enter the text of the alarm message. It may be multi-line."));
+ TQWhatsThis::add(mTextMessageEdit, i18n("Enter the text of the alarm message. It may be multi-line."));
frameLayout->addWidget(mTextMessageEdit);
// File name edit box
- mFileBox = new QHBox(mDisplayAlarmsFrame);
+ mFileBox = new TQHBox(mDisplayAlarmsFrame);
frameLayout->addWidget(mFileBox);
mFileMessageEdit = new LineEdit(LineEdit::Url, mFileBox);
mFileMessageEdit->setAcceptDrops(true);
- QWhatsThis::add(mFileMessageEdit, i18n("Enter the name or URL of a text or image file to display."));
+ TQWhatsThis::add(mFileMessageEdit, i18n("Enter the name or URL of a text or image file to display."));
// File browse button
- mFileBrowseButton = new QPushButton(mFileBox);
+ mFileBrowseButton = new TQPushButton(mFileBox);
mFileBrowseButton->setPixmap(SmallIcon("fileopen"));
mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint());
- QToolTip::add(mFileBrowseButton, i18n("Choose a file"));
- QWhatsThis::add(mFileBrowseButton, i18n("Select a text or image file to display."));
+ TQToolTip::add(mFileBrowseButton, i18n("Choose a file"));
+ TQWhatsThis::add(mFileBrowseButton, i18n("Select a text or image file to display."));
mFileRadio->init(mFileBrowseButton, mFileMessageEdit);
// Font and colour choice button and sample text
@@ -446,18 +446,18 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
mFontColourButton->setMaximumHeight(mFontColourButton->sizeHint().height());
frameLayout->addWidget(mFontColourButton);
- QHBoxLayout* layout = new QHBoxLayout(frameLayout, 0, 0);
- mBgColourBox = new QHBox(mDisplayAlarmsFrame);
+ TQHBoxLayout* layout = new TQHBoxLayout(frameLayout, 0, 0);
+ mBgColourBox = new TQHBox(mDisplayAlarmsFrame);
mBgColourBox->setSpacing(spacingHint());
layout->addWidget(mBgColourBox);
layout->addStretch();
- QLabel* label = new QLabel(i18n("&Background color:"), mBgColourBox);
+ TQLabel* label = new TQLabel(i18n("&Background color:"), mBgColourBox);
mBgColourButton = new ColourCombo(mBgColourBox);
label->setBuddy(mBgColourButton);
- QWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color"));
+ TQWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color"));
// Sound checkbox and file selector
- layout = new QHBoxLayout(frameLayout);
+ layout = new TQHBoxLayout(frameLayout);
mSoundPicker = new SoundPicker(mDisplayAlarmsFrame);
mSoundPicker->setFixedSize(mSoundPicker->sizeHint());
layout->addWidget(mSoundPicker);
@@ -473,7 +473,7 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
}
// Top-adjust the controls
- mFilePadding = new QHBox(mDisplayAlarmsFrame);
+ mFilePadding = new TQHBox(mDisplayAlarmsFrame);
frameLayout->addWidget(mFilePadding);
frameLayout->setStretchFactor(mFilePadding, 1);
}
@@ -481,60 +481,60 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
/******************************************************************************
* Set up the command alarm dialog controls.
*/
-void EditAlarmDlg::initCommand(QWidget* parent)
+void EditAlarmDlg::initCommand(TQWidget* parent)
{
- mCommandFrame = new QFrame(parent);
- mCommandFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* frameLayout = new QVBoxLayout(mCommandFrame, 0, spacingHint());
+ mCommandFrame = new TQFrame(parent);
+ mCommandFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* frameLayout = new TQVBoxLayout(mCommandFrame, 0, spacingHint());
mCmdTypeScript = new CheckBox(i18n_p_EnterScript(), mCommandFrame);
mCmdTypeScript->setFixedSize(mCmdTypeScript->sizeHint());
- connect(mCmdTypeScript, SIGNAL(toggled(bool)), SLOT(slotCmdScriptToggled(bool)));
- QWhatsThis::add(mCmdTypeScript, i18n("Check to enter the contents of a script instead of a shell command line"));
+ connect(mCmdTypeScript, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCmdScriptToggled(bool)));
+ TQWhatsThis::add(mCmdTypeScript, i18n("Check to enter the contents of a script instead of a shell command line"));
frameLayout->addWidget(mCmdTypeScript, 0, Qt::AlignAuto);
mCmdCommandEdit = new LineEdit(LineEdit::Url, mCommandFrame);
- QWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
+ TQWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
frameLayout->addWidget(mCmdCommandEdit);
mCmdScriptEdit = new TextEdit(mCommandFrame);
- QWhatsThis::add(mCmdScriptEdit, i18n("Enter the contents of a script to execute"));
+ TQWhatsThis::add(mCmdScriptEdit, i18n("Enter the contents of a script to execute"));
frameLayout->addWidget(mCmdScriptEdit);
// What to do with command output
mCmdOutputGroup = new ButtonGroup(i18n("Command Output"), mCommandFrame);
frameLayout->addWidget(mCmdOutputGroup);
- QBoxLayout* layout = new QVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint());
layout->addSpacing(fontMetrics().lineSpacing()/2);
// Execute in terminal window
RadioButton* button = new RadioButton(i18n_u_ExecInTermWindow(), mCmdOutputGroup, "execInTerm");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
+ TQWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
mCmdOutputGroup->insert(button, EXEC_IN_TERMINAL);
layout->addWidget(button, 0, Qt::AlignAuto);
// Log file name edit box
- QHBox* box = new QHBox(mCmdOutputGroup);
- (new QWidget(box))->setFixedWidth(button->style().subRect(QStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box
-// (new QWidget(box))->setFixedWidth(button->style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
+ TQHBox* box = new TQHBox(mCmdOutputGroup);
+ (new TQWidget(box))->setFixedWidth(button->style().subRect(TQStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box
+// (new TQWidget(box))->setFixedWidth(button->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
mCmdLogFileEdit = new LineEdit(LineEdit::Url, box);
mCmdLogFileEdit->setAcceptDrops(true);
- QWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file."));
+ TQWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file."));
// Log file browse button.
// The file browser dialogue is activated by the PickLogFileRadio class.
- QPushButton* browseButton = new QPushButton(box);
+ TQPushButton* browseButton = new TQPushButton(box);
browseButton->setPixmap(SmallIcon("fileopen"));
browseButton->setFixedSize(browseButton->sizeHint());
- QToolTip::add(browseButton, i18n("Choose a file"));
- QWhatsThis::add(browseButton, i18n("Select a log file."));
+ TQToolTip::add(browseButton, i18n("Choose a file"));
+ TQWhatsThis::add(browseButton, i18n("Select a log file."));
// Log output to file
button = new PickLogFileRadio(browseButton, mCmdLogFileEdit, i18n_g_LogToFile(), mCmdOutputGroup, "cmdLog");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button,
+ TQWhatsThis::add(button,
i18n("Check to log the command output to a local file. The output will be appended to any existing contents of the file."));
mCmdOutputGroup->insert(button, LOG_TO_FILE);
layout->addWidget(button, 0, Qt::AlignAuto);
@@ -543,12 +543,12 @@ void EditAlarmDlg::initCommand(QWidget* parent)
// Discard output
button = new RadioButton(i18n("Discard"), mCmdOutputGroup, "cmdDiscard");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button, i18n("Check to discard command output."));
+ TQWhatsThis::add(button, i18n("Check to discard command output."));
mCmdOutputGroup->insert(button, DISCARD_OUTPUT);
layout->addWidget(button, 0, Qt::AlignAuto);
// Top-adjust the controls
- mCmdPadding = new QHBox(mCommandFrame);
+ mCmdPadding = new TQHBox(mCommandFrame);
frameLayout->addWidget(mCmdPadding);
frameLayout->setStretchFactor(mCmdPadding, 1);
}
@@ -556,98 +556,98 @@ void EditAlarmDlg::initCommand(QWidget* parent)
/******************************************************************************
* Set up the email alarm dialog controls.
*/
-void EditAlarmDlg::initEmail(QWidget* parent)
+void EditAlarmDlg::initEmail(TQWidget* parent)
{
- mEmailFrame = new QFrame(parent);
- mEmailFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* layout = new QVBoxLayout(mEmailFrame, 0, spacingHint());
- QGridLayout* grid = new QGridLayout(layout, 3, 3, spacingHint());
+ mEmailFrame = new TQFrame(parent);
+ mEmailFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* layout = new TQVBoxLayout(mEmailFrame, 0, spacingHint());
+ TQGridLayout* grid = new TQGridLayout(layout, 3, 3, spacingHint());
grid->setColStretch(1, 1);
mEmailFromList = 0;
if (Preferences::emailFrom() == Preferences::MAIL_FROM_KMAIL)
{
// Email sender identity
- QLabel* label = new QLabel(i18n_EmailFrom(), mEmailFrame);
+ TQLabel* label = new TQLabel(i18n_EmailFrom(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
mEmailFromList = new EmailIdCombo(KAMail::identityManager(), mEmailFrame);
mEmailFromList->setMinimumSize(mEmailFromList->sizeHint());
label->setBuddy(mEmailFromList);
- QWhatsThis::add(mEmailFromList,
+ TQWhatsThis::add(mEmailFromList,
i18n("Your email identity, used to identify you as the sender when sending email alarms."));
grid->addMultiCellWidget(mEmailFromList, 0, 0, 1, 2);
}
// Email recipients
- QLabel* label = new QLabel(i18n_EmailTo(), mEmailFrame);
+ TQLabel* label = new TQLabel(i18n_EmailTo(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 0);
mEmailToEdit = new LineEdit(LineEdit::Emails, mEmailFrame);
mEmailToEdit->setMinimumSize(mEmailToEdit->sizeHint());
- QWhatsThis::add(mEmailToEdit,
+ TQWhatsThis::add(mEmailToEdit,
i18n("Enter the addresses of the email recipients. Separate multiple addresses by "
"commas or semicolons."));
grid->addWidget(mEmailToEdit, 1, 1);
- mEmailAddressButton = new QPushButton(mEmailFrame);
+ mEmailAddressButton = new TQPushButton(mEmailFrame);
mEmailAddressButton->setPixmap(SmallIcon("contents"));
mEmailAddressButton->setFixedSize(mEmailAddressButton->sizeHint());
- connect(mEmailAddressButton, SIGNAL(clicked()), SLOT(openAddressBook()));
- QToolTip::add(mEmailAddressButton, i18n("Open address book"));
- QWhatsThis::add(mEmailAddressButton, i18n("Select email addresses from your address book."));
+ connect(mEmailAddressButton, TQT_SIGNAL(clicked()), TQT_SLOT(openAddressBook()));
+ TQToolTip::add(mEmailAddressButton, i18n("Open address book"));
+ TQWhatsThis::add(mEmailAddressButton, i18n("Select email addresses from your address book."));
grid->addWidget(mEmailAddressButton, 1, 2);
// Email subject
- label = new QLabel(i18n_j_EmailSubject(), mEmailFrame);
+ label = new TQLabel(i18n_j_EmailSubject(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 2, 0);
mEmailSubjectEdit = new LineEdit(mEmailFrame);
mEmailSubjectEdit->setMinimumSize(mEmailSubjectEdit->sizeHint());
label->setBuddy(mEmailSubjectEdit);
- QWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject."));
+ TQWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject."));
grid->addMultiCellWidget(mEmailSubjectEdit, 2, 2, 1, 2);
// Email body
mEmailMessageEdit = new TextEdit(mEmailFrame);
- QWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message."));
+ TQWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message."));
layout->addWidget(mEmailMessageEdit);
// Email attachments
- grid = new QGridLayout(layout, 2, 3, spacingHint());
- label = new QLabel(i18n("Attachment&s:"), mEmailFrame);
+ grid = new TQGridLayout(layout, 2, 3, spacingHint());
+ label = new TQLabel(i18n("Attachment&s:"), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
- mEmailAttachList = new QComboBox(true, mEmailFrame);
+ mEmailAttachList = new TQComboBox(true, mEmailFrame);
mEmailAttachList->setMinimumSize(mEmailAttachList->sizeHint());
mEmailAttachList->lineEdit()->setReadOnly(true);
-QListBox* list = mEmailAttachList->listBox();
-QRect rect = list->geometry();
+TQListBox* list = mEmailAttachList->listBox();
+TQRect rect = list->geometry();
list->setGeometry(rect.left() - 50, rect.top(), rect.width(), rect.height());
label->setBuddy(mEmailAttachList);
- QWhatsThis::add(mEmailAttachList,
+ TQWhatsThis::add(mEmailAttachList,
i18n("Files to send as attachments to the email."));
grid->addWidget(mEmailAttachList, 0, 1);
grid->setColStretch(1, 1);
- mEmailAddAttachButton = new QPushButton(i18n("Add..."), mEmailFrame);
- connect(mEmailAddAttachButton, SIGNAL(clicked()), SLOT(slotAddAttachment()));
- QWhatsThis::add(mEmailAddAttachButton, i18n("Add an attachment to the email."));
+ mEmailAddAttachButton = new TQPushButton(i18n("Add..."), mEmailFrame);
+ connect(mEmailAddAttachButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddAttachment()));
+ TQWhatsThis::add(mEmailAddAttachButton, i18n("Add an attachment to the email."));
grid->addWidget(mEmailAddAttachButton, 0, 2);
- mEmailRemoveButton = new QPushButton(i18n("Remo&ve"), mEmailFrame);
- connect(mEmailRemoveButton, SIGNAL(clicked()), SLOT(slotRemoveAttachment()));
- QWhatsThis::add(mEmailRemoveButton, i18n("Remove the highlighted attachment from the email."));
+ mEmailRemoveButton = new TQPushButton(i18n("Remo&ve"), mEmailFrame);
+ connect(mEmailRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveAttachment()));
+ TQWhatsThis::add(mEmailRemoveButton, i18n("Remove the highlighted attachment from the email."));
grid->addWidget(mEmailRemoveButton, 1, 2);
// BCC email to sender
mEmailBcc = new CheckBox(i18n_s_CopyEmailToSelf(), mEmailFrame);
mEmailBcc->setFixedSize(mEmailBcc->sizeHint());
- QWhatsThis::add(mEmailBcc,
+ TQWhatsThis::add(mEmailBcc,
i18n("If checked, the email will be blind copied to you."));
grid->addMultiCellWidget(mEmailBcc, 1, 1, 0, 1, Qt::AlignAuto);
}
@@ -708,7 +708,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
if (event->isTemplate())
{
// Initialising from an alarm template: use current date
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
int afterTime = event->templateAfterTime();
if (afterTime >= 0)
{
@@ -717,12 +717,12 @@ void EditAlarmDlg::initialise(const KAEvent* event)
}
else
{
- QDate d = now.date();
- QTime t = event->startDateTime().time();
+ TQDate d = now.date();
+ TQTime t = event->startDateTime().time();
bool dateOnly = event->startDateTime().isDateOnly();
if (!dateOnly && now.time() >= t)
d = d.addDays(1); // alarm time has already passed, so use tomorrow
- mTimeWidget->setDateTime(DateTime(QDateTime(d, t), dateOnly));
+ mTimeWidget->setDateTime(DateTime(TQDateTime(d, t), dateOnly));
}
}
else
@@ -804,7 +804,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
mFontColourButton->setBgColour(Preferences::defaultBgColour());
mFontColourButton->setFgColour(Preferences::defaultFgColour());
mBgColourButton->setColour(Preferences::defaultBgColour());
- QDateTime defaultTime = QDateTime::currentDateTime().addSecs(60);
+ TQDateTime defaultTime = TQDateTime::currentDateTime().addSecs(60);
if (mTemplate)
{
mTemplateTimeGroup->setButton(mTemplateTimeGroup->id(mTemplateDefaultTime));
@@ -922,9 +922,9 @@ void EditAlarmDlg::setReadOnly()
*/
void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
{
- QString text = alarmText.displayText();
+ TQString text = alarmText.displayText();
bool script;
- QRadioButton* radio;
+ TQRadioButton* radio;
switch (action)
{
case KAEvent::FILE:
@@ -972,10 +972,10 @@ void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
/******************************************************************************
* Create an "acknowledgement confirmation required" checkbox.
*/
-CheckBox* EditAlarmDlg::createConfirmAckCheckbox(QWidget* parent, const char* name)
+CheckBox* EditAlarmDlg::createConfirmAckCheckbox(TQWidget* parent, const char* name)
{
CheckBox* widget = new CheckBox(i18n_k_ConfirmAck(), parent, name);
- QWhatsThis::add(widget,
+ TQWhatsThis::add(widget,
i18n("Check to be prompted for confirmation when you acknowledge the alarm."));
return widget;
}
@@ -1046,7 +1046,7 @@ bool EditAlarmDlg::stateChanged() const
mOnlyDeferred = false;
if (!mSavedEvent)
return true;
- QString textFileCommandMessage;
+ TQString textFileCommandMessage;
checkText(textFileCommandMessage, false);
if (mTemplate)
{
@@ -1111,7 +1111,7 @@ bool EditAlarmDlg::stateChanged() const
}
else if (mEmailRadio->isOn())
{
- QStringList emailAttach;
+ TQStringList emailAttach;
for (int i = 0; i < mEmailAttachList->count(); ++i)
emailAttach += mEmailAttachList->text(i);
if (mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName()
@@ -1162,15 +1162,15 @@ bool EditAlarmDlg::getEvent(KAEvent& event)
* If 'trial' is true, the event is set up for a simple one-off test, ignoring
* recurrence, reminder, template etc. data.
*/
-void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
+void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial)
{
- QDateTime dt;
+ TQDateTime dt;
if (!trial)
{
if (!mTemplate)
dt = mAlarmDateTime.dateTime();
else if (mTemplateUseTime->isOn())
- dt = QDateTime(QDate(2000,1,1), mTemplateTime->time());
+ dt = TQDateTime(TQDate(2000,1,1), mTemplateTime->time());
}
KAEvent::Action type = getAlarmType();
event.set(dt, text, (mFileRadio->isOn() ? mBgColourButton->colour() : mFontColourButton->bgColour()),
@@ -1212,7 +1212,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
if (mRecurrenceEdit->repeatType() != RecurrenceEdit::NO_RECUR)
{
mRecurrenceEdit->updateEvent(event, !mTemplate);
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
bool dateOnly = mAlarmDateTime.isDateOnly();
if (dateOnly && mAlarmDateTime.date() < now.date()
|| !dateOnly && mAlarmDateTime.rawDateTime() < now)
@@ -1232,7 +1232,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
DateTime remindTime = mAlarmDateTime.addMins(-reminder);
if (mDeferDateTime >= remindTime)
{
- if (remindTime > QDateTime::currentDateTime())
+ if (remindTime > TQDateTime::currentDateTime())
deferral = false; // ignore deferral if it's after next reminder
else if (mDeferDateTime > remindTime)
deferReminder = true; // it's the reminder which is being deferred
@@ -1289,12 +1289,12 @@ KAEvent::Action EditAlarmDlg::getAlarmType() const
* The first time through, sets the size to the same as the last time it was
* displayed.
*/
-void EditAlarmDlg::showEvent(QShowEvent* se)
+void EditAlarmDlg::showEvent(TQShowEvent* se)
{
if (!mDeferGroupHeight)
{
mDeferGroupHeight = mDeferGroup->height() + spacingHint();
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(EDIT_DIALOG_NAME, s))
s.setHeight(s.height() + (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight));
else
@@ -1310,11 +1310,11 @@ void EditAlarmDlg::showEvent(QShowEvent* se)
* Records the new size (adjusted to ignore the optional height of the deferred
* time edit widget) in the config file.
*/
-void EditAlarmDlg::resizeEvent(QResizeEvent* re)
+void EditAlarmDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
{
- QSize s = re->size();
+ TQSize s = re->size();
s.setHeight(s.height() - (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight));
KAlarm::writeConfigWindowSize(EDIT_DIALOG_NAME, s);
}
@@ -1344,8 +1344,8 @@ void EditAlarmDlg::slotOk()
if (mTemplate)
{
// Check that the template name is not blank and is unique
- QString errmsg;
- QString name = mTemplateName->text();
+ TQString errmsg;
+ TQString name = mTemplateName->text();
if (name.isEmpty())
errmsg = i18n("You must enter a name for the alarm template");
else if (name != mSavedTemplateName)
@@ -1363,7 +1363,7 @@ void EditAlarmDlg::slotOk()
}
else
{
- QWidget* errWidget;
+ TQWidget* errWidget;
mAlarmDateTime = mTimeWidget->getDateTime(0, !timedRecurrence, false, &errWidget);
if (errWidget)
{
@@ -1381,7 +1381,7 @@ void EditAlarmDlg::slotOk()
{
if (timedRecurrence)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mAlarmDateTime.date() < now.date()
|| mAlarmDateTime.date() == now.date()
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
@@ -1400,8 +1400,8 @@ void EditAlarmDlg::slotOk()
}
}
}
- QString errmsg;
- QWidget* errWidget = mRecurrenceEdit->checkData(mAlarmDateTime.dateTime(), errmsg);
+ TQString errmsg;
+ TQWidget* errWidget = mRecurrenceEdit->checkData(mAlarmDateTime.dateTime(), errmsg);
if (errWidget)
{
mTabs->setCurrentPage(mRecurPageIndex);
@@ -1461,7 +1461,7 @@ void EditAlarmDlg::slotOk()
*/
void EditAlarmDlg::slotTry()
{
- QString text;
+ TQString text;
if (checkText(text))
{
if (mEmailRadio->isOn())
@@ -1484,7 +1484,7 @@ void EditAlarmDlg::slotTry()
}
else if (mEmailRadio->isOn())
{
- QString bcc;
+ TQString bcc;
if (mEmailBcc->isChecked())
bcc = i18n("\nBcc: %1").arg(Preferences::emailBccAddress());
KMessageBox::information(this, i18n("Email sent to:\n%1%2").arg(mEmailAddresses.join("\n")).arg(bcc));
@@ -1508,7 +1508,7 @@ void EditAlarmDlg::slotCancel()
void EditAlarmDlg::slotDefault()
{
TemplatePickDlg dlg(this, "templPickDlg");
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
initialise(dlg.selectedTemplate());
}
@@ -1530,7 +1530,7 @@ void EditAlarmDlg::slotEditDeferral()
return;
limit = false;
}
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (limit)
{
if (repeatCount && start < now)
@@ -1557,15 +1557,15 @@ void EditAlarmDlg::slotEditDeferral()
if (reminder)
{
DateTime remindTime = start.addMins(-reminder);
- if (QDateTime::currentDateTime() < remindTime)
+ if (TQDateTime::currentDateTime() < remindTime)
start = remindTime;
}
deferDlg.setLimit(start.addSecs(-60));
}
- if (deferDlg.exec() == QDialog::Accepted)
+ if (deferDlg.exec() == TQDialog::Accepted)
{
mDeferDateTime = deferDlg.getDateTime();
- mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : QString::null);
+ mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : TQString::null);
}
}
@@ -1604,7 +1604,7 @@ void EditAlarmDlg::slotShowRecurrenceEdit()
mRecurPageIndex = mTabs->currentPageIndex();
if (!mReadOnly && !mTemplate)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mAlarmDateTime = mTimeWidget->getDateTime(0, false, false);
bool expired = (mAlarmDateTime.dateTime() < now);
if (mRecurSetDefaultEndDate)
@@ -1682,9 +1682,9 @@ bool EditAlarmDlg::checkCommandData()
if (mCommandRadio->isOn() && mCmdOutputGroup->selectedId() == LOG_TO_FILE)
{
// Validate the log file name
- QString file = mCmdLogFileEdit->text();
- QFileInfo info(file);
- QDir::setCurrent(QDir::homeDirPath());
+ TQString file = mCmdLogFileEdit->text();
+ TQFileInfo info(file);
+ TQDir::setCurrent(TQDir::homeDirPath());
bool err = file.isEmpty() || info.isDir();
if (!err)
{
@@ -1694,7 +1694,7 @@ bool EditAlarmDlg::checkCommandData()
}
else
{
- QFileInfo dirinfo(info.dirPath(true)); // get absolute directory path
+ TQFileInfo dirinfo(info.dirPath(true)); // get absolute directory path
err = (!dirinfo.isDir() || !dirinfo.isWritable());
}
}
@@ -1719,12 +1719,12 @@ bool EditAlarmDlg::checkEmailData()
{
if (mEmailRadio->isOn())
{
- QString addrs = mEmailToEdit->text();
+ TQString addrs = mEmailToEdit->text();
if (addrs.isEmpty())
mEmailAddresses.clear();
else
{
- QString bad = KAMail::convertAddresses(addrs, mEmailAddresses);
+ TQString bad = KAMail::convertAddresses(addrs, mEmailAddresses);
if (!bad.isEmpty())
{
mEmailToEdit->setFocus();
@@ -1742,7 +1742,7 @@ bool EditAlarmDlg::checkEmailData()
mEmailAttachments.clear();
for (int i = 0; i < mEmailAttachList->count(); ++i)
{
- QString att = mEmailAttachList->text(i);
+ TQString att = mEmailAttachList->text(i);
switch (KAMail::checkAttachment(att))
{
case 1:
@@ -1767,7 +1767,7 @@ bool EditAlarmDlg::checkEmailData()
void EditAlarmDlg::slotAlarmTypeChanged(int)
{
bool displayAlarm = false;
- QWidget* focus = 0;
+ TQWidget* focus = 0;
if (mMessageRadio->isOn())
{
mFileBox->hide();
@@ -1883,7 +1883,7 @@ void EditAlarmDlg::openAddressBook()
if (a.isEmpty())
return;
Person person(a.realName(), a.preferredEmail());
- QString addrs = mEmailToEdit->text().stripWhiteSpace();
+ TQString addrs = mEmailToEdit->text().stripWhiteSpace();
if (!addrs.isEmpty())
addrs += ", ";
addrs += person.fullName();
@@ -1895,8 +1895,8 @@ void EditAlarmDlg::openAddressBook()
*/
void EditAlarmDlg::slotAddAttachment()
{
- QString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, QString::null,
- QString::null, KFile::ExistingOnly, this, "pickAttachFile");
+ TQString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, TQString::null,
+ TQString::null, KFile::ExistingOnly, this, "pickAttachFile");
if (!url.isEmpty())
{
mEmailAttachList->insertItem(url);
@@ -1926,7 +1926,7 @@ void EditAlarmDlg::slotRemoveAttachment()
/******************************************************************************
* Clean up the alarm text, and if it's a file, check whether it's valid.
*/
-bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
+bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const
{
if (mMessageRadio->isOn())
result = mTextMessageEdit->text();
@@ -1942,13 +1942,13 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
}
else if (mFileRadio->isOn())
{
- QString alarmtext = mFileMessageEdit->text().stripWhiteSpace();
+ TQString alarmtext = mFileMessageEdit->text().stripWhiteSpace();
// Convert any relative file path to absolute
// (using home directory as the default)
enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE };
Err err = NONE;
KURL url;
- int i = alarmtext.find(QString::fromLatin1("/"));
+ int i = alarmtext.find(TQString::fromLatin1("/"));
if (i > 0 && alarmtext[i - 1] == ':')
{
url = alarmtext;
@@ -1969,11 +1969,11 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
else
{
// It's a local file - convert to absolute path & check validity
- QFileInfo info(alarmtext);
- QDir::setCurrent(QDir::homeDirPath());
+ TQFileInfo info(alarmtext);
+ TQDir::setCurrent(TQDir::homeDirPath());
alarmtext = info.absFilePath();
url.setPath(alarmtext);
- alarmtext = QString::fromLatin1("file:") + alarmtext;
+ alarmtext = TQString::fromLatin1("file:") + alarmtext;
if (!err)
{
if (info.isDir()) err = DIRECTORY;
@@ -1998,7 +1998,7 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
if (err && showErrorMessage)
{
mFileMessageEdit->setFocus();
- QString errmsg;
+ TQString errmsg;
switch (err)
{
case BLANK:
@@ -2027,15 +2027,15 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
= A text edit field with a minimum height of 3 text lines.
= Provides KDE 2 compatibility.
=============================================================================*/
-TextEdit::TextEdit(QWidget* parent, const char* name)
+TextEdit::TextEdit(TQWidget* parent, const char* name)
: KTextEdit(parent, name)
{
- QSize tsize = sizeHint();
+ TQSize tsize = sizeHint();
tsize.setHeight(fontMetrics().lineSpacing()*13/4 + 2*frameWidth());
setMinimumSize(tsize);
}
-void TextEdit::dragEnterEvent(QDragEnterEvent* e)
+void TextEdit::dragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(false); // don't accept "text/calendar" objects
diff --git a/kalarm/editdlg.h b/kalarm/editdlg.h
index 8a8f40ce9..069e873f4 100644
--- a/kalarm/editdlg.h
+++ b/kalarm/editdlg.h
@@ -21,8 +21,8 @@
#ifndef EDITDLG_H
#define EDITDLG_H
-#include <qdatetime.h>
-#include <qlineedit.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
@@ -62,37 +62,37 @@ class EditAlarmDlg : public KDialogBase
enum MessageType { MESSAGE, FILE };
enum CmdLogType { DISCARD_OUTPUT, LOG_TO_FILE, EXEC_IN_TERMINAL };
- EditAlarmDlg(bool Template, const QString& caption, QWidget* parent = 0, const char* name = 0,
+ EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent = 0, const char* name = 0,
const KAEvent* = 0, bool readOnly = false);
virtual ~EditAlarmDlg();
bool getEvent(KAEvent&);
void setAction(KAEvent::Action, const AlarmText& = AlarmText());
- static CheckBox* createConfirmAckCheckbox(QWidget* parent, const char* name = 0);
+ static CheckBox* createConfirmAckCheckbox(TQWidget* parent, const char* name = 0);
- static QString i18n_ConfirmAck(); // plain text of 'Confirm acknowledgement' checkbox
- static QString i18n_k_ConfirmAck(); // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
- static QString i18n_SpecialActions(); // plain text of 'Special Actions...' button
- static QString i18n_ShowInKOrganizer(); // plain text of 'Show in KOrganizer' checkbox
- static QString i18n_g_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox, with 'G' shortcut
- static QString i18n_EnterScript(); // plain text of 'Enter a script' checkbox
- static QString i18n_p_EnterScript(); // text of 'Enter a script' checkbox, with 'P' shortcut
- static QString i18n_ExecInTermWindow(); // plain text of 'Execute in terminal window' checkbox
- static QString i18n_w_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'W' shortcut
- static QString i18n_u_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'U' shortcut
- static QString i18n_g_LogToFile(); // text of 'Log to file' radio button, with 'G' shortcut
- static QString i18n_CopyEmailToSelf(); // plain text of 'Copy email to self' checkbox
- static QString i18n_e_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'E' shortcut
- static QString i18n_s_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'S' shortcut
- static QString i18n_EmailFrom(); // plain text of 'From:' (email address)
- static QString i18n_f_EmailFrom(); // text of 'From:' (email address), with 'F' shortcut
- static QString i18n_EmailTo(); // plain text of 'To:' (email addressee)
- static QString i18n_EmailSubject(); // plain text of 'Subject:' (email)
- static QString i18n_j_EmailSubject(); // text of 'Subject:' (email), with 'J' shortcut
+ static TQString i18n_ConfirmAck(); // plain text of 'Confirm acknowledgement' checkbox
+ static TQString i18n_k_ConfirmAck(); // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
+ static TQString i18n_SpecialActions(); // plain text of 'Special Actions...' button
+ static TQString i18n_ShowInKOrganizer(); // plain text of 'Show in KOrganizer' checkbox
+ static TQString i18n_g_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox, with 'G' shortcut
+ static TQString i18n_EnterScript(); // plain text of 'Enter a script' checkbox
+ static TQString i18n_p_EnterScript(); // text of 'Enter a script' checkbox, with 'P' shortcut
+ static TQString i18n_ExecInTermWindow(); // plain text of 'Execute in terminal window' checkbox
+ static TQString i18n_w_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'W' shortcut
+ static TQString i18n_u_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'U' shortcut
+ static TQString i18n_g_LogToFile(); // text of 'Log to file' radio button, with 'G' shortcut
+ static TQString i18n_CopyEmailToSelf(); // plain text of 'Copy email to self' checkbox
+ static TQString i18n_e_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'E' shortcut
+ static TQString i18n_s_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'S' shortcut
+ static TQString i18n_EmailFrom(); // plain text of 'From:' (email address)
+ static TQString i18n_f_EmailFrom(); // text of 'From:' (email address), with 'F' shortcut
+ static TQString i18n_EmailTo(); // plain text of 'To:' (email addressee)
+ static TQString i18n_EmailSubject(); // plain text of 'Subject:' (email)
+ static TQString i18n_j_EmailSubject(); // text of 'Subject:' (email), with 'J' shortcut
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void showEvent(QShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
protected slots:
virtual void slotOk();
virtual void slotCancel();
@@ -116,22 +116,22 @@ class EditAlarmDlg : public KDialogBase
private:
void initialise(const KAEvent*);
void setReadOnly();
- void setEvent(KAEvent&, const QString& text, bool trial);
+ void setEvent(KAEvent&, const TQString& text, bool trial);
KAEvent::Action getAlarmType() const;
int getAlarmFlags() const;
- bool checkText(QString& result, bool showErrorMessage = true) const;
+ bool checkText(TQString& result, bool showErrorMessage = true) const;
void setSoundPicker();
void setRecurTabTitle(const KAEvent* = 0);
bool checkCommandData();
bool checkEmailData();
- void initDisplayAlarms(QWidget* parent);
- void initCommand(QWidget* parent);
- void initEmail(QWidget* parent);
+ void initDisplayAlarms(TQWidget* parent);
+ void initCommand(TQWidget* parent);
+ void initEmail(TQWidget* parent);
void saveState(const KAEvent*);
bool stateChanged() const;
- QTabWidget* mTabs; // the tabs in the dialog
+ TQTabWidget* mTabs; // the tabs in the dialog
int mMainPageIndex;
int mRecurPageIndex;
bool mMainPageShown; // true once the main tab has been displayed
@@ -143,10 +143,10 @@ class EditAlarmDlg : public KDialogBase
RadioButton* mCommandRadio;
PickAlarmFileRadio* mFileRadio;
RadioButton* mEmailRadio;
- QWidgetStack* mAlarmTypeStack;
+ TQWidgetStack* mAlarmTypeStack;
// Templates
- QLineEdit* mTemplateName;
+ TQLineEdit* mTemplateName;
ButtonGroup* mTemplateTimeGroup;
RadioButton* mTemplateDefaultTime; // no alarm time is specified
RadioButton* mTemplateUseTimeAfter;// alarm time is specified as an offset from current
@@ -156,14 +156,14 @@ class EditAlarmDlg : public KDialogBase
TimeEdit* mTemplateTime; // the alarm time which is specified
// Display alarm options widgets
- QFrame* mDisplayAlarmsFrame;
- QHBox* mFileBox;
- QHBox* mFilePadding;
+ TQFrame* mDisplayAlarmsFrame;
+ TQHBox* mFileBox;
+ TQHBox* mFilePadding;
SoundPicker* mSoundPicker;
CheckBox* mConfirmAck;
FontColourButton* mFontColourButton; // for text display option
ColourCombo* mBgColourButton; // for file display option
- QHBox* mBgColourBox;
+ TQHBox* mBgColourBox;
SpecialActionsButton* mSpecialActionsButton;
Reminder* mReminder;
bool mReminderDeferral;
@@ -172,32 +172,32 @@ class EditAlarmDlg : public KDialogBase
TextEdit* mTextMessageEdit; // text message edit box
// Text file alarm widgets
LineEdit* mFileMessageEdit; // text file URL edit box
- QPushButton* mFileBrowseButton; // text file browse button
- QString mFileDefaultDir; // default directory for browse button
+ TQPushButton* mFileBrowseButton; // text file browse button
+ TQString mFileDefaultDir; // default directory for browse button
// Command alarm widgets
- QFrame* mCommandFrame;
+ TQFrame* mCommandFrame;
CheckBox* mCmdTypeScript; // entering a script
LineEdit* mCmdCommandEdit; // command line edit box
TextEdit* mCmdScriptEdit; // script edit box
ButtonGroup* mCmdOutputGroup; // what to do with command output
LineEdit* mCmdLogFileEdit; // log file URL edit box
- QWidget* mCmdPadding;
+ TQWidget* mCmdPadding;
// Email alarm widgets
- QFrame* mEmailFrame;
+ TQFrame* mEmailFrame;
EmailIdCombo* mEmailFromList;
LineEdit* mEmailToEdit;
- QPushButton* mEmailAddressButton; // email open address book button
- QLineEdit* mEmailSubjectEdit;
+ TQPushButton* mEmailAddressButton; // email open address book button
+ TQLineEdit* mEmailSubjectEdit;
TextEdit* mEmailMessageEdit; // email body edit box
- QComboBox* mEmailAttachList;
- QPushButton* mEmailAddAttachButton;
- QPushButton* mEmailRemoveButton;
+ TQComboBox* mEmailAttachList;
+ TQPushButton* mEmailAddAttachButton;
+ TQPushButton* mEmailRemoveButton;
CheckBox* mEmailBcc;
- QString mAttachDefaultDir;
+ TQString mAttachDefaultDir;
- QGroupBox* mDeferGroup;
- QLabel* mDeferTimeLabel;
- QPushButton* mDeferChangeButton;
+ TQGroupBox* mDeferGroup;
+ TQLabel* mDeferTimeLabel;
+ TQPushButton* mDeferChangeButton;
AlarmTimeWidget* mTimeWidget;
LateCancelSelector* mLateCancel;
@@ -205,11 +205,11 @@ class EditAlarmDlg : public KDialogBase
RecurrenceEdit* mRecurrenceEdit;
- QString mAlarmMessage; // message text/file name/command/email message
+ TQString mAlarmMessage; // message text/file name/command/email message
DateTime mAlarmDateTime;
DateTime mDeferDateTime;
EmailAddressList mEmailAddresses; // list of addresses to send email to
- QStringList mEmailAttachments; // list of email attachment file names
+ TQStringList mEmailAttachments; // list of email attachment file names
unsigned long mKMailSerialNumber; // if email text, message's KMail serial number, else 0
int mDeferGroupHeight; // height added by deferred time widget
int mDesktop; // desktop to display the dialog in
@@ -222,34 +222,34 @@ class EditAlarmDlg : public KDialogBase
// Initial state of all controls
KAEvent* mSavedEvent;
- QString mSavedTemplateName; // mTemplateName value
- QButton* mSavedTemplateTimeType; // selected button in mTemplateTimeGroup
- QTime mSavedTemplateTime; // mTemplateTime value
+ TQString mSavedTemplateName; // mTemplateName value
+ TQButton* mSavedTemplateTimeType; // selected button in mTemplateTimeGroup
+ TQTime mSavedTemplateTime; // mTemplateTime value
int mSavedTemplateAfterTime; // mTemplateAfterTime value
- QButton* mSavedTypeRadio; // mMessageRadio, etc
+ TQButton* mSavedTypeRadio; // mMessageRadio, etc
SoundPicker::Type mSavedSoundType; // mSoundPicker sound type
bool mSavedRepeatSound; // mSoundPicker repeat status
- QString mSavedSoundFile; // mSoundPicker sound file
+ TQString mSavedSoundFile; // mSoundPicker sound file
float mSavedSoundVolume; // mSoundPicker volume
float mSavedSoundFadeVolume;// mSoundPicker fade volume
int mSavedSoundFadeSeconds;// mSoundPicker fade time
bool mSavedConfirmAck; // mConfirmAck status
- QFont mSavedFont; // mFontColourButton font
- QColor mSavedBgColour; // mFontColourButton background colour
- QColor mSavedFgColour; // mFontColourButton foreground colour
- QString mSavedPreAction; // mSpecialActionsButton pre-alarm action
- QString mSavedPostAction; // mSpecialActionsButton post-alarm action
+ TQFont mSavedFont; // mFontColourButton font
+ TQColor mSavedBgColour; // mFontColourButton background colour
+ TQColor mSavedFgColour; // mFontColourButton foreground colour
+ TQString mSavedPreAction; // mSpecialActionsButton pre-alarm action
+ TQString mSavedPostAction; // mSpecialActionsButton post-alarm action
int mSavedReminder; // mReminder value
bool mSavedOnceOnly; // mReminder once-only status
- QString mSavedTextFileCommandMessage; // mTextMessageEdit/mFileMessageEdit/mCmdCommandEdit/mEmailMessageEdit value
- QString mSavedEmailFrom; // mEmailFromList current value
- QString mSavedEmailTo; // mEmailToEdit value
- QString mSavedEmailSubject; // mEmailSubjectEdit value
- QStringList mSavedEmailAttach; // mEmailAttachList values
+ TQString mSavedTextFileCommandMessage; // mTextMessageEdit/mFileMessageEdit/mCmdCommandEdit/mEmailMessageEdit value
+ TQString mSavedEmailFrom; // mEmailFromList current value
+ TQString mSavedEmailTo; // mEmailToEdit value
+ TQString mSavedEmailSubject; // mEmailSubjectEdit value
+ TQStringList mSavedEmailAttach; // mEmailAttachList values
bool mSavedEmailBcc; // mEmailBcc status
bool mSavedCmdScript; // mCmdTypeScript status
- QButton* mSavedCmdOutputRadio; // selected button in mCmdOutputGroup
- QString mSavedCmdLogFile; // mCmdLogFileEdit value
+ TQButton* mSavedCmdOutputRadio; // selected button in mCmdOutputGroup
+ TQString mSavedCmdLogFile; // mCmdLogFileEdit value
DateTime mSavedDateTime; // mTimeWidget value
int mSavedRecurrenceType; // RecurrenceEdit::RepeatType value
int mSavedLateCancel; // mLateCancel value
diff --git a/kalarm/editdlgprivate.h b/kalarm/editdlgprivate.h
index cbcddb62f..6cf664006 100644
--- a/kalarm/editdlgprivate.h
+++ b/kalarm/editdlgprivate.h
@@ -28,9 +28,9 @@ class PageFrame : public QFrame
{
Q_OBJECT
public:
- PageFrame(QWidget* parent = 0, const char* name = 0) : QFrame(parent, name) { }
+ PageFrame(TQWidget* parent = 0, const char* name = 0) : TQFrame(parent, name) { }
protected:
- virtual void showEvent(QShowEvent*) { emit shown(); }
+ virtual void showEvent(TQShowEvent*) { emit shown(); }
signals:
void shown();
};
@@ -39,9 +39,9 @@ class TextEdit : public KTextEdit
{
Q_OBJECT
public:
- TextEdit(QWidget* parent, const char* name = 0);
+ TextEdit(TQWidget* parent, const char* name = 0);
protected:
- virtual void dragEnterEvent(QDragEnterEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
};
#endif // EDITDLGPRIVATE_H
diff --git a/kalarm/emailidcombo.cpp b/kalarm/emailidcombo.cpp
index fc4fc6e74..baa8c2103 100644
--- a/kalarm/emailidcombo.cpp
+++ b/kalarm/emailidcombo.cpp
@@ -21,12 +21,12 @@
#include "emailidcombo.moc"
-EmailIdCombo::EmailIdCombo(KPIM::IdentityManager* manager, QWidget* parent, const char* name)
+EmailIdCombo::EmailIdCombo(KPIM::IdentityManager* manager, TQWidget* parent, const char* name)
: KPIM::IdentityCombo(manager, parent, name),
mReadOnly(false)
{ }
-void EmailIdCombo::mousePressEvent(QMouseEvent* e)
+void EmailIdCombo::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -37,25 +37,25 @@ void EmailIdCombo::mousePressEvent(QMouseEvent* e)
KPIM::IdentityCombo::mousePressEvent(e);
}
-void EmailIdCombo::mouseReleaseEvent(QMouseEvent* e)
+void EmailIdCombo::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
KPIM::IdentityCombo::mouseReleaseEvent(e);
}
-void EmailIdCombo::mouseMoveEvent(QMouseEvent* e)
+void EmailIdCombo::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
KPIM::IdentityCombo::mouseMoveEvent(e);
}
-void EmailIdCombo::keyPressEvent(QKeyEvent* e)
+void EmailIdCombo::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
KPIM::IdentityCombo::keyPressEvent(e);
}
-void EmailIdCombo::keyReleaseEvent(QKeyEvent* e)
+void EmailIdCombo::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
KPIM::IdentityCombo::keyReleaseEvent(e);
diff --git a/kalarm/emailidcombo.h b/kalarm/emailidcombo.h
index d0399ec08..378f5c6b2 100644
--- a/kalarm/emailidcombo.h
+++ b/kalarm/emailidcombo.h
@@ -29,14 +29,14 @@ class EmailIdCombo : public KPIM::IdentityCombo
{
Q_OBJECT
public:
- explicit EmailIdCombo(KPIM::IdentityManager*, QWidget* parent = 0, const char* name = 0);
+ explicit EmailIdCombo(KPIM::IdentityManager*, TQWidget* parent = 0, const char* name = 0);
void setReadOnly(bool ro) { mReadOnly = ro; }
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp
index 1a25e2ac0..a0f5d4952 100644
--- a/kalarm/eventlistviewbase.cpp
+++ b/kalarm/eventlistviewbase.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qwhatsthis.h>
-#include <qheader.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -33,8 +33,8 @@
class EventListWhatsThisBase : public QWhatsThis
{
public:
- EventListWhatsThisBase(EventListViewBase* lv) : QWhatsThis(lv), mListView(lv) { }
- virtual QString text(const QPoint&);
+ EventListWhatsThisBase(EventListViewBase* lv) : TQWhatsThis(lv), mListView(lv) { }
+ virtual TQString text(const TQPoint&);
private:
EventListViewBase* mListView;
};
@@ -45,7 +45,7 @@ class EventListWhatsThisBase : public QWhatsThis
= Base class for displaying a list of events.
=============================================================================*/
-EventListViewBase::EventListViewBase(QWidget* parent, const char* name)
+EventListViewBase::EventListViewBase(TQWidget* parent, const char* name)
: KListView(parent, name),
mFind(0),
mLastColumn(-1),
@@ -57,12 +57,12 @@ EventListViewBase::EventListViewBase(QWidget* parent, const char* name)
new EventListWhatsThisBase(this);
}
-void EventListViewBase::addLastColumn(const QString& title)
+void EventListViewBase::addLastColumn(const TQString& title)
{
addColumn(title);
mLastColumn = columns() - 1;
mLastColumnHeaderWidth = columnWidth(mLastColumn);
- setColumnWidthMode(mLastColumn, QListView::Maximum);
+ setColumnWidthMode(mLastColumn, TQListView::Maximum);
}
/******************************************************************************
@@ -70,7 +70,7 @@ void EventListViewBase::addLastColumn(const QString& title)
*/
void EventListViewBase::refresh()
{
- QString currentID;
+ TQString currentID;
if (currentItem())
currentID = currentItem()->event().id(); // save current item for restoration afterwards
clear();
@@ -87,7 +87,7 @@ void EventListViewBase::refresh()
/******************************************************************************
* Get the item for a given event ID.
*/
-EventListViewItemBase* EventListViewBase::getEntry(const QString& eventID) const
+EventListViewItemBase* EventListViewBase::getEntry(const TQString& eventID) const
{
if (!eventID.isEmpty())
{
@@ -114,7 +114,7 @@ void EventListViewBase::addEvent(const KAEvent& event, const InstanceList& insta
* If 'selectionView' is non-null, the selection highlight is moved to the
* modified event in that listView instance.
*/
-void EventListViewBase::modifyEvent(const QString& oldEventID, const KAEvent& newEvent,
+void EventListViewBase::modifyEvent(const TQString& oldEventID, const KAEvent& newEvent,
const InstanceList& instanceList, EventListViewBase* selectionView)
{
for (InstanceListConstIterator it = instanceList.begin(); it != instanceList.end(); ++it)
@@ -130,7 +130,7 @@ void EventListViewBase::modifyEvent(const QString& oldEventID, const KAEvent& ne
/******************************************************************************
* Delete an event from every displayed list.
*/
-void EventListViewBase::deleteEvent(const QString& eventID, const InstanceList& instanceList)
+void EventListViewBase::deleteEvent(const TQString& eventID, const InstanceList& instanceList)
{
for (InstanceListConstIterator it = instanceList.begin(); it != instanceList.end(); ++it)
{
@@ -199,7 +199,7 @@ void EventListViewBase::slotFind()
if (!mFind)
{
mFind = new Find(this);
- connect(mFind, SIGNAL(active(bool)), SIGNAL(findActive(bool)));
+ connect(mFind, TQT_SIGNAL(active(bool)), TQT_SIGNAL(findActive(bool)));
}
mFind->display();
}
@@ -219,7 +219,7 @@ void EventListViewBase::findNext(bool forward)
*/
void EventListViewBase::slotSelectAll()
{
- if (selectionMode() == QListView::Multi || selectionMode() == QListView::Extended)
+ if (selectionMode() == TQListView::Multi || selectionMode() == TQListView::Extended)
selectAll(true);
}
@@ -237,7 +237,7 @@ void EventListViewBase::slotDeselect()
*/
bool EventListViewBase::anySelected() const
{
- for (QListViewItem* item = KListView::firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = KListView::firstChild(); item; item = item->nextSibling())
if (isSelected(item))
return true;
return false;
@@ -257,16 +257,16 @@ const KAEvent* EventListViewBase::selectedEvent() const
/******************************************************************************
* Fetch the single selected item.
* This method works in both Single and Multi selection mode, unlike
-* QListView::selectedItem().
+* TQListView::selectedItem().
* Reply = null if no items are selected, or if multiple items are selected.
*/
EventListViewItemBase* EventListViewBase::selectedItem() const
{
- if (selectionMode() == QListView::Single)
+ if (selectionMode() == TQListView::Single)
return (EventListViewItemBase*)KListView::selectedItem();
- QListViewItem* item = 0;
- for (QListViewItem* it = firstChild(); it; it = it->nextSibling())
+ TQListViewItem* item = 0;
+ for (TQListViewItem* it = firstChild(); it; it = it->nextSibling())
{
if (isSelected(it))
{
@@ -281,10 +281,10 @@ EventListViewItemBase* EventListViewBase::selectedItem() const
/******************************************************************************
* Fetch all selected items.
*/
-QValueList<EventListViewItemBase*> EventListViewBase::selectedItems() const
+TQValueList<EventListViewItemBase*> EventListViewBase::selectedItems() const
{
- QValueList<EventListViewItemBase*> items;
- for (QListViewItem* item = firstChild(); item; item = item->nextSibling())
+ TQValueList<EventListViewItemBase*> items;
+ for (TQListViewItem* item = firstChild(); item; item = item->nextSibling())
{
if (isSelected(item))
items.append((EventListViewItemBase*)item);
@@ -298,7 +298,7 @@ QValueList<EventListViewItemBase*> EventListViewBase::selectedItems() const
int EventListViewBase::selectedCount() const
{
int count = 0;
- for (QListViewItem* item = firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = firstChild(); item; item = item->nextSibling())
{
if (isSelected(item))
++count;
@@ -319,7 +319,7 @@ void EventListViewBase::resizeLastColumn()
if (mw > lastColumnWidth)
lastColumnWidth = mw;
}
- QHeader* head = header();
+ TQHeader* head = header();
int x = head->sectionPos(mLastColumn);
int availableWidth = visibleWidth() - x;
int rightColWidth = 0;
@@ -344,7 +344,7 @@ void EventListViewBase::resizeLastColumn()
* Sets the last column in the list view to extend at least to the right hand
* edge of the list view.
*/
-void EventListViewBase::resizeEvent(QResizeEvent* re)
+void EventListViewBase::resizeEvent(TQResizeEvent* re)
{
KListView::resizeEvent(re);
resizeLastColumn();
@@ -355,7 +355,7 @@ void EventListViewBase::resizeEvent(QResizeEvent* re)
* Sets the last column in the list view to extend at least to the right hand
* edge of the list view.
*/
-void EventListViewBase::showEvent(QShowEvent* se)
+void EventListViewBase::showEvent(TQShowEvent* se)
{
KListView::showEvent(se);
resizeLastColumn();
@@ -370,7 +370,7 @@ int EventListViewBase::itemHeight()
if (!item)
{
// The list is empty, so create a temporary item to find its height
- QListViewItem* item = new QListViewItem(this, QString::null);
+ TQListViewItem* item = new TQListViewItem(this, TQString::null);
int height = item->height();
delete item;
return height;
@@ -385,15 +385,15 @@ int EventListViewBase::itemHeight()
= Base class containing the details of one event for display in an
* EventListViewBase.
=============================================================================*/
-QPixmap* EventListViewItemBase::mTextIcon;
-QPixmap* EventListViewItemBase::mFileIcon;
-QPixmap* EventListViewItemBase::mCommandIcon;
-QPixmap* EventListViewItemBase::mEmailIcon;
+TQPixmap* EventListViewItemBase::mTextIcon;
+TQPixmap* EventListViewItemBase::mFileIcon;
+TQPixmap* EventListViewItemBase::mCommandIcon;
+TQPixmap* EventListViewItemBase::mEmailIcon;
int EventListViewItemBase::mIconWidth = 0;
EventListViewItemBase::EventListViewItemBase(EventListViewBase* parent, const KAEvent& event)
- : QListViewItem(parent),
+ : TQListViewItem(parent),
mEvent(event)
{
iconWidth(); // load the icons
@@ -416,10 +416,10 @@ int EventListViewItemBase::iconWidth()
{
if (!mIconWidth)
{
- mTextIcon = new QPixmap(SmallIcon("message"));
- mFileIcon = new QPixmap(SmallIcon("file"));
- mCommandIcon = new QPixmap(SmallIcon("exec"));
- mEmailIcon = new QPixmap(SmallIcon("mail_generic"));
+ mTextIcon = new TQPixmap(SmallIcon("message"));
+ mFileIcon = new TQPixmap(SmallIcon("file"));
+ mCommandIcon = new TQPixmap(SmallIcon("exec"));
+ mEmailIcon = new TQPixmap(SmallIcon("mail_generic"));
if (mTextIcon)
mIconWidth = mTextIcon->width();
if (mFileIcon && mFileIcon->width() > mIconWidth)
@@ -435,7 +435,7 @@ int EventListViewItemBase::iconWidth()
/******************************************************************************
* Return the icon associated with the event's action.
*/
-QPixmap* EventListViewItemBase::eventIcon() const
+TQPixmap* EventListViewItemBase::eventIcon() const
{
switch (mEvent.action())
{
@@ -453,13 +453,13 @@ QPixmap* EventListViewItemBase::eventIcon() const
= Sets What's This? text depending on where in the list view is clicked.
=============================================================================*/
-QString EventListWhatsThisBase::text(const QPoint& pt)
+TQString EventListWhatsThisBase::text(const TQPoint& pt)
{
int column = -1;
- QPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt);
- QRect frame = mListView->header()->frameGeometry();
+ TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt);
+ TQRect frame = mListView->header()->frameGeometry();
if (frame.contains(pt)
- || mListView->itemAt(QPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(QPoint(pt.x(), frame.y())))
+ || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y())))
column = mListView->header()->sectionAt(pt.x());
return mListView->whatsThisText(column);
}
diff --git a/kalarm/eventlistviewbase.h b/kalarm/eventlistviewbase.h
index 23831c71d..8da8d2c7f 100644
--- a/kalarm/eventlistviewbase.h
+++ b/kalarm/eventlistviewbase.h
@@ -23,7 +23,7 @@
#include "kalarm.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <klistview.h>
#include "alarmevent.h"
@@ -37,25 +37,25 @@ class EventListViewBase : public KListView
{
Q_OBJECT
public:
- typedef QValueList<EventListViewBase*> InstanceList;
- typedef QValueListIterator<EventListViewBase*> InstanceListIterator;
- typedef QValueListConstIterator<EventListViewBase*> InstanceListConstIterator;
+ typedef TQValueList<EventListViewBase*> InstanceList;
+ typedef TQValueListIterator<EventListViewBase*> InstanceListIterator;
+ typedef TQValueListConstIterator<EventListViewBase*> InstanceListConstIterator;
- EventListViewBase(QWidget* parent = 0, const char* name = 0);
+ EventListViewBase(TQWidget* parent = 0, const char* name = 0);
virtual ~EventListViewBase() { }
- EventListViewItemBase* getEntry(const QString& eventID) const;
+ EventListViewItemBase* getEntry(const TQString& eventID) const;
void addEvent(const KAEvent& e) { addEvent(e, instances(), this); }
void modifyEvent(const KAEvent& e)
{ modifyEvent(e.id(), e, instances(), this); }
- void modifyEvent(const QString& oldEventID, const KAEvent& newEvent)
+ void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent)
{ modifyEvent(oldEventID, newEvent, instances(), this); }
- void deleteEvent(const QString& eventID) { deleteEvent(eventID, instances()); }
+ void deleteEvent(const TQString& eventID) { deleteEvent(eventID, instances()); }
static void addEvent(const KAEvent&, const InstanceList&, EventListViewBase* selectionView);
static void modifyEvent(const KAEvent& e, const InstanceList& list, EventListViewBase* selectionView)
{ modifyEvent(e.id(), e, list, selectionView); }
- static void modifyEvent(const QString& oldEventID, const KAEvent& newEvent, const InstanceList&, EventListViewBase* selectionView);
- static void deleteEvent(const QString& eventID, const InstanceList&);
- static void undeleteEvent(const QString& oldEventID, const KAEvent& event, const InstanceList& list, EventListViewBase* selectionView)
+ static void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent, const InstanceList&, EventListViewBase* selectionView);
+ static void deleteEvent(const TQString& eventID, const InstanceList&);
+ static void undeleteEvent(const TQString& oldEventID, const KAEvent& event, const InstanceList& list, EventListViewBase* selectionView)
{ modifyEvent(oldEventID, event, list, selectionView); }
void resizeLastColumn();
int itemHeight();
@@ -64,10 +64,10 @@ class EventListViewBase : public KListView
bool anySelected() const; // are any items selected?
const KAEvent* selectedEvent() const;
EventListViewItemBase* selectedItem() const;
- QValueList<EventListViewItemBase*> selectedItems() const;
+ TQValueList<EventListViewItemBase*> selectedItems() const;
int selectedCount() const;
int lastColumn() const { return mLastColumn; }
- virtual QString whatsThisText(int column) const = 0;
+ virtual TQString whatsThisText(int column) const = 0;
virtual InstanceList instances() = 0; // return all instances
public slots:
@@ -89,9 +89,9 @@ class EventListViewBase : public KListView
EventListViewItemBase* addEntry(const KAEvent&, bool setSize = false, bool reselect = false);
EventListViewItemBase* addEntry(EventListViewItemBase*, bool setSize, bool reselect);
EventListViewItemBase* updateEntry(EventListViewItemBase*, const KAEvent& newEvent, bool setSize = false, bool reselect = false);
- void addLastColumn(const QString& title);
- virtual void showEvent(QShowEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ void addLastColumn(const TQString& title);
+ virtual void showEvent(TQShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private:
void deleteEntry(EventListViewItemBase*, bool setSize = false);
@@ -108,20 +108,20 @@ class EventListViewItemBase : public QListViewItem
public:
EventListViewItemBase(EventListViewBase* parent, const KAEvent&);
const KAEvent& event() const { return mEvent; }
- QPixmap* eventIcon() const;
+ TQPixmap* eventIcon() const;
int lastColumnWidth() const { return mLastColumnWidth; }
- EventListViewItemBase* nextSibling() const { return (EventListViewItemBase*)QListViewItem::nextSibling(); }
+ EventListViewItemBase* nextSibling() const { return (EventListViewItemBase*)TQListViewItem::nextSibling(); }
static int iconWidth();
protected:
void setLastColumnText();
- virtual QString lastColumnText() const = 0; // get the text to display in the last column
+ virtual TQString lastColumnText() const = 0; // get the text to display in the last column
private:
- static QPixmap* mTextIcon;
- static QPixmap* mFileIcon;
- static QPixmap* mCommandIcon;
- static QPixmap* mEmailIcon;
+ static TQPixmap* mTextIcon;
+ static TQPixmap* mFileIcon;
+ static TQPixmap* mCommandIcon;
+ static TQPixmap* mEmailIcon;
static int mIconWidth; // maximum width of any icon
KAEvent mEvent; // the event for this item
diff --git a/kalarm/find.cpp b/kalarm/find.cpp
index 7caf4bde0..a05517826 100644
--- a/kalarm/find.cpp
+++ b/kalarm/find.cpp
@@ -20,10 +20,10 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include <kfinddialog.h>
#include <kfind.h>
@@ -50,7 +50,7 @@ static long FIND_KALARM_OPTIONS = FIND_LIVE | FIND_EXPIRED | FIND_MESSAGE | FIND
Find::Find(EventListViewBase* parent)
- : QObject(parent),
+ : TQObject(parent),
mListView(parent),
mDialog(0),
mFind(0),
@@ -90,25 +90,25 @@ void Find::display()
mDialog = new KFindDialog(false, mListView, "FindDlg", mOptions, mHistory, (mListView->selectedCount() > 1));
#endif
mDialog->setHasSelection(false);
- QWidget* kalarmWidgets = mDialog->findExtension();
+ TQWidget* kalarmWidgets = mDialog->findExtension();
// Alarm types
- QBoxLayout* layout = new QVBoxLayout(kalarmWidgets, 0, KDialog::spacingHint());
- QGroupBox* group = new QGroupBox(i18n("Alarm Type"), kalarmWidgets);
+ TQBoxLayout* layout = new TQVBoxLayout(kalarmWidgets, 0, KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("Alarm Type"), kalarmWidgets);
layout->addWidget(group);
- QGridLayout* grid = new QGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->addRowSpacing(0, mDialog->fontMetrics().lineSpacing()/2);
grid->setColStretch(1, 1);
// Live & expired alarm selection
- mLive = new QCheckBox(i18n("Acti&ve"), group);
+ mLive = new TQCheckBox(i18n("Acti&ve"), group);
mLive->setFixedSize(mLive->sizeHint());
- QWhatsThis::add(mLive, i18n("Check to include active alarms in the search."));
+ TQWhatsThis::add(mLive, i18n("Check to include active alarms in the search."));
grid->addWidget(mLive, 1, 0, Qt::AlignAuto);
- mExpired = new QCheckBox(i18n("Ex&pired"), group);
+ mExpired = new TQCheckBox(i18n("Ex&pired"), group);
mExpired->setFixedSize(mExpired->sizeHint());
- QWhatsThis::add(mExpired,
+ TQWhatsThis::add(mExpired,
i18n("Check to include expired alarms in the search. "
"This option is only available if expired alarms are currently being displayed."));
grid->addWidget(mExpired, 1, 2, Qt::AlignAuto);
@@ -117,24 +117,24 @@ void Find::display()
grid->addMultiCellWidget(mActiveExpiredSep, 2, 2, 0, 2);
// Alarm actions
- mMessageType = new QCheckBox(i18n("Text"), group, "message");
+ mMessageType = new TQCheckBox(i18n("Text"), group, "message");
mMessageType->setFixedSize(mMessageType->sizeHint());
- QWhatsThis::add(mMessageType, i18n("Check to include text message alarms in the search."));
+ TQWhatsThis::add(mMessageType, i18n("Check to include text message alarms in the search."));
grid->addWidget(mMessageType, 3, 0);
- mFileType = new QCheckBox(i18n("Fi&le"), group, "file");
+ mFileType = new TQCheckBox(i18n("Fi&le"), group, "file");
mFileType->setFixedSize(mFileType->sizeHint());
- QWhatsThis::add(mFileType, i18n("Check to include file alarms in the search."));
+ TQWhatsThis::add(mFileType, i18n("Check to include file alarms in the search."));
grid->addWidget(mFileType, 3, 2);
- mCommandType = new QCheckBox(i18n("Co&mmand"), group, "command");
+ mCommandType = new TQCheckBox(i18n("Co&mmand"), group, "command");
mCommandType->setFixedSize(mCommandType->sizeHint());
- QWhatsThis::add(mCommandType, i18n("Check to include command alarms in the search."));
+ TQWhatsThis::add(mCommandType, i18n("Check to include command alarms in the search."));
grid->addWidget(mCommandType, 4, 0);
- mEmailType = new QCheckBox(i18n("&Email"), group, "email");
+ mEmailType = new TQCheckBox(i18n("&Email"), group, "email");
mEmailType->setFixedSize(mEmailType->sizeHint());
- QWhatsThis::add(mEmailType, i18n("Check to include email alarms in the search."));
+ TQWhatsThis::add(mEmailType, i18n("Check to include email alarms in the search."));
grid->addWidget(mEmailType, 4, 2);
// Set defaults
@@ -146,7 +146,7 @@ void Find::display()
mEmailType->setChecked(mOptions & FIND_EMAIL);
#ifndef MODAL_FIND
- connect(mDialog, SIGNAL(okClicked()), this, SLOT(slotFind()));
+ connect(mDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotFind()));
#endif
}
@@ -195,7 +195,7 @@ void Find::display()
mDialog->setHasCursor(mListView->currentItem());
#ifdef MODAL_FIND
- if (mDialog->exec() == QDialog::Accepted)
+ if (mDialog->exec() == TQDialog::Accepted)
slotFind();
else
delete mDialog;
@@ -245,12 +245,12 @@ void Find::slotFind()
#else
mFind = new KFind(mLastPattern, options, mListView, mDialog);
#endif
- connect(mFind, SIGNAL(destroyed()), SLOT(slotKFindDestroyed()));
+ connect(mFind, TQT_SIGNAL(destroyed()), TQT_SLOT(slotKFindDestroyed()));
mFind->closeFindNextDialog(); // prevent 'Find Next' dialog appearing
}
// Set the starting point for the search
- mStartID = QString::null;
+ mStartID = TQString::null;
mNoCurrentItem = newPattern;
bool checkEnd = false;
if (newPattern)
@@ -363,9 +363,9 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
// No match was found
if (mFound || checkEnd)
{
- QString msg = forward ? i18n("End of alarm list reached.\nContinue from the beginning?")
+ TQString msg = forward ? i18n("End of alarm list reached.\nContinue from the beginning?")
: i18n("Beginning of alarm list reached.\nContinue from the end?");
- if (KMessageBox::questionYesNo(mListView, msg, QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(mListView, msg, TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes)
{
mNoCurrentItem = true;
findNext(forward, false);
@@ -383,7 +383,7 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
*/
EventListViewItemBase* Find::nextItem(EventListViewItemBase* item, bool forward) const
{
- QListViewItem* it;
+ TQListViewItem* it;
if (mOptions & KFindDialog::FindBackwards)
forward = !forward;
if (forward)
diff --git a/kalarm/find.h b/kalarm/find.h
index 1bb4913b1..12e2a520c 100644
--- a/kalarm/find.h
+++ b/kalarm/find.h
@@ -21,9 +21,9 @@
#ifndef FIND_H
#define FIND_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
class QCheckBox;
class KFindDialog;
@@ -54,18 +54,18 @@ class Find : public QObject
EventListViewItemBase* nextItem(EventListViewItemBase*, bool forward) const;
EventListViewBase* mListView; // parent list view
- QGuardedPtr<KFindDialog> mDialog;
- QCheckBox* mExpired;
- QCheckBox* mLive;
+ TQGuardedPtr<KFindDialog> mDialog;
+ TQCheckBox* mExpired;
+ TQCheckBox* mLive;
KSeparator* mActiveExpiredSep;
- QCheckBox* mMessageType;
- QCheckBox* mFileType;
- QCheckBox* mCommandType;
- QCheckBox* mEmailType;
+ TQCheckBox* mMessageType;
+ TQCheckBox* mFileType;
+ TQCheckBox* mCommandType;
+ TQCheckBox* mEmailType;
KFind* mFind;
- QStringList mHistory; // list of history items for Find dialog
- QString mLastPattern; // pattern used in last search
- QString mStartID; // ID of first alarm searched if 'from cursor' was selected
+ TQStringList mHistory; // list of history items for Find dialog
+ TQString mLastPattern; // pattern used in last search
+ TQString mStartID; // ID of first alarm searched if 'from cursor' was selected
long mOptions; // OR of find dialog options
bool mNoCurrentItem; // there is no current item for the purposes of searching
bool mFound; // true if any matches have been found
diff --git a/kalarm/fontcolour.cpp b/kalarm/fontcolour.cpp
index dae2e9856..4273125a3 100644
--- a/kalarm/fontcolour.cpp
+++ b/kalarm/fontcolour.cpp
@@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqobjectlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -38,88 +38,88 @@
#include "fontcolour.moc"
-FontColourChooser::FontColourChooser(QWidget *parent, const char *name,
- bool onlyFixed, const QStringList &fontList,
- const QString& frameLabel, bool editColours, bool fg, bool defaultFont,
+FontColourChooser::FontColourChooser(TQWidget *parent, const char *name,
+ bool onlyFixed, const TQStringList &fontList,
+ const TQString& frameLabel, bool editColours, bool fg, bool defaultFont,
int visibleListSize)
- : QWidget(parent, name),
+ : TQWidget(parent, name),
mFgColourButton(0),
mRemoveColourButton(0),
mColourList(Preferences::messageColours()),
mReadOnly(false)
{
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QWidget* page = this;
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQWidget* page = this;
if (!frameLabel.isNull())
{
- page = new QGroupBox(frameLabel, this);
+ page = new TQGroupBox(frameLabel, this);
topLayout->addWidget(page);
- topLayout = new QVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint());
+ topLayout = new TQVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint());
topLayout->addSpacing(fontMetrics().height() - KDialog::marginHint() + KDialog::spacingHint());
}
- QHBoxLayout* hlayout = new QHBoxLayout(topLayout);
- QVBoxLayout* colourLayout = new QVBoxLayout(hlayout);
+ TQHBoxLayout* hlayout = new TQHBoxLayout(topLayout);
+ TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout);
if (fg)
{
- QHBox* box = new QHBox(page); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label = new QLabel(i18n("&Foreground color:"), box);
- box->setStretchFactor(new QWidget(box), 0);
+ TQLabel* label = new TQLabel(i18n("&Foreground color:"), box);
+ box->setStretchFactor(new TQWidget(box), 0);
mFgColourButton = new ColourCombo(box);
- connect(mFgColourButton, SIGNAL(activated(const QString&)), SLOT(setSampleColour()));
+ connect(mFgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour()));
label->setBuddy(mFgColourButton);
- QWhatsThis::add(box, i18n("Select the alarm message foreground color"));
+ TQWhatsThis::add(box, i18n("Select the alarm message foreground color"));
}
- QHBox* box = new QHBox(page); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label = new QLabel(i18n("&Background color:"), box);
- box->setStretchFactor(new QWidget(box), 0);
+ TQLabel* label = new TQLabel(i18n("&Background color:"), box);
+ box->setStretchFactor(new TQWidget(box), 0);
mBgColourButton = new ColourCombo(box);
- connect(mBgColourButton, SIGNAL(activated(const QString&)), SLOT(setSampleColour()));
+ connect(mBgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour()));
label->setBuddy(mBgColourButton);
- QWhatsThis::add(box, i18n("Select the alarm message background color"));
+ TQWhatsThis::add(box, i18n("Select the alarm message background color"));
hlayout->addStretch();
if (editColours)
{
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
- QPushButton* button = new QPushButton(i18n("Add Co&lor..."), page);
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
+ TQPushButton* button = new TQPushButton(i18n("Add Co&lor..."), page);
button->setFixedSize(button->sizeHint());
- connect(button, SIGNAL(clicked()), SLOT(slotAddColour()));
- QWhatsThis::add(button, i18n("Choose a new color to add to the color selection list."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddColour()));
+ TQWhatsThis::add(button, i18n("Choose a new color to add to the color selection list."));
layout->addWidget(button);
- mRemoveColourButton = new QPushButton(i18n("&Remove Color"), page);
+ mRemoveColourButton = new TQPushButton(i18n("&Remove Color"), page);
mRemoveColourButton->setFixedSize(mRemoveColourButton->sizeHint());
- connect(mRemoveColourButton, SIGNAL(clicked()), SLOT(slotRemoveColour()));
- QWhatsThis::add(mRemoveColourButton,
+ connect(mRemoveColourButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveColour()));
+ TQWhatsThis::add(mRemoveColourButton,
i18n("Remove the color currently shown in the background color chooser, from the color selection list."));
layout->addWidget(mRemoveColourButton);
}
if (defaultFont)
{
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
mDefaultFont = new CheckBox(i18n("Use &default font"), page);
mDefaultFont->setMinimumSize(mDefaultFont->sizeHint());
- connect(mDefaultFont, SIGNAL(toggled(bool)), SLOT(slotDefaultFontToggled(bool)));
- QWhatsThis::add(mDefaultFont,
+ connect(mDefaultFont, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDefaultFontToggled(bool)));
+ TQWhatsThis::add(mDefaultFont,
i18n("Check to use the default font current at the time the alarm is displayed."));
layout->addWidget(mDefaultFont);
- layout->addWidget(new QWidget(page)); // left adjust the widget
+ layout->addWidget(new TQWidget(page)); // left adjust the widget
}
else
mDefaultFont = 0;
mFontChooser = new KFontChooser(page, name, onlyFixed, fontList, false, visibleListSize);
mFontChooser->installEventFilter(this); // for read-only mode
- const QObjectList* kids = mFontChooser->queryList();
- for (QObjectList::ConstIterator it = kids->constBegin(); it != kids->constEnd(); ++it)
+ const TQObjectList* kids = mFontChooser->queryList();
+ for (TQObjectList::ConstIterator it = kids->constBegin(); it != kids->constEnd(); ++it)
(*it)->installEventFilter(this);
topLayout->addWidget(mFontChooser);
@@ -132,7 +132,7 @@ void FontColourChooser::setDefaultFont()
mDefaultFont->setChecked(true);
}
-void FontColourChooser::setFont(const QFont& font, bool onlyFixed)
+void FontColourChooser::setFont(const TQFont& font, bool onlyFixed)
{
if (mDefaultFont)
mDefaultFont->setChecked(false);
@@ -144,12 +144,12 @@ bool FontColourChooser::defaultFont() const
return mDefaultFont ? mDefaultFont->isChecked() : false;
}
-QFont FontColourChooser::font() const
+TQFont FontColourChooser::font() const
{
- return (mDefaultFont && mDefaultFont->isChecked()) ? QFont() : mFontChooser->font();
+ return (mDefaultFont && mDefaultFont->isChecked()) ? TQFont() : mFontChooser->font();
}
-void FontColourChooser::setBgColour(const QColor& colour)
+void FontColourChooser::setBgColour(const TQColor& colour)
{
mBgColourButton->setColor(colour);
mFontChooser->setBackgroundColor(colour);
@@ -157,42 +157,42 @@ void FontColourChooser::setBgColour(const QColor& colour)
void FontColourChooser::setSampleColour()
{
- QColor bg = mBgColourButton->color();
+ TQColor bg = mBgColourButton->color();
mFontChooser->setBackgroundColor(bg);
- QColor fg = fgColour();
+ TQColor fg = fgColour();
mFontChooser->setColor(fg);
if (mRemoveColourButton)
mRemoveColourButton->setEnabled(!mBgColourButton->isCustomColour()); // no deletion of custom colour
}
-QColor FontColourChooser::bgColour() const
+TQColor FontColourChooser::bgColour() const
{
return mBgColourButton->color();
}
-QColor FontColourChooser::fgColour() const
+TQColor FontColourChooser::fgColour() const
{
if (mFgColourButton)
return mFgColourButton->color();
else
{
- QColor bg = mBgColourButton->color();
- QPalette pal(bg, bg);
- return pal.color(QPalette::Active, QColorGroup::Text);
+ TQColor bg = mBgColourButton->color();
+ TQPalette pal(bg, bg);
+ return pal.color(TQPalette::Active, TQColorGroup::Text);
}
}
-QString FontColourChooser::sampleText() const
+TQString FontColourChooser::sampleText() const
{
return mFontChooser->sampleText();
}
-void FontColourChooser::setSampleText(const QString& text)
+void FontColourChooser::setSampleText(const TQString& text)
{
mFontChooser->setSampleText(text);
}
-void FontColourChooser::setFgColour(const QColor& colour)
+void FontColourChooser::setFgColour(const TQColor& colour)
{
if (mFgColourButton)
{
@@ -213,17 +213,17 @@ void FontColourChooser::setReadOnly(bool ro)
}
}
-bool FontColourChooser::eventFilter(QObject*, QEvent* e)
+bool FontColourChooser::eventFilter(TQObject*, TQEvent* e)
{
if (mReadOnly)
{
switch (e->type())
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
return true; // prevent the event being handled
default:
break;
@@ -246,8 +246,8 @@ void FontColourChooser::setColours(const ColourList& colours)
void FontColourChooser::slotAddColour()
{
- QColor colour;
- if (KColorDialog::getColor(colour, this) == QDialog::Accepted)
+ TQColor colour;
+ if (KColorDialog::getColor(colour, this) == TQDialog::Accepted)
{
mColourList.insert(colour);
mBgColourButton->setColours(mColourList);
diff --git a/kalarm/fontcolour.h b/kalarm/fontcolour.h
index 1e37b3836..091e6bd7a 100644
--- a/kalarm/fontcolour.h
+++ b/kalarm/fontcolour.h
@@ -22,8 +22,8 @@
#define FONTCOLOUR_H
#include <kdeversion.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kfontdialog.h>
#include "colourlist.h"
@@ -36,28 +36,28 @@ class FontColourChooser : public QWidget
{
Q_OBJECT
public:
- explicit FontColourChooser(QWidget* parent = 0, const char* name = 0,
+ explicit FontColourChooser(TQWidget* parent = 0, const char* name = 0,
bool onlyFixed = false,
- const QStringList& fontList = QStringList(),
- const QString& frameLabel = i18n("Requested font"),
+ const TQStringList& fontList = TQStringList(),
+ const TQString& frameLabel = i18n("Requested font"),
bool editColours = false, bool fg = true, bool defaultFont = false,
int visibleListSize = 8);
void setDefaultFont();
- void setFont(const QFont&, bool onlyFixed = false);
+ void setFont(const TQFont&, bool onlyFixed = false);
bool defaultFont() const;
- QFont font() const;
- QColor fgColour() const;
- QColor bgColour() const;
+ TQFont font() const;
+ TQColor fgColour() const;
+ TQColor bgColour() const;
const ColourList& colours() const { return mColourList; }
- void setFgColour(const QColor&);
- void setBgColour(const QColor&);
+ void setFgColour(const TQColor&);
+ void setBgColour(const TQColor&);
void setColours(const ColourList&);
- QString sampleText() const;
- void setSampleText(const QString& text);
+ TQString sampleText() const;
+ void setSampleText(const TQString& text);
bool isReadOnly() const { return mReadOnly; }
void setReadOnly(bool);
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
private slots:
void setSampleColour();
@@ -68,7 +68,7 @@ private slots:
private:
ColourCombo* mFgColourButton; // or null
ColourCombo* mBgColourButton;
- QPushButton* mRemoveColourButton;
+ TQPushButton* mRemoveColourButton;
KFontChooser* mFontChooser;
CheckBox* mDefaultFont; // or null
ColourList mColourList;
diff --git a/kalarm/fontcolourbutton.cpp b/kalarm/fontcolourbutton.cpp
index b3a55359a..48d0f9220 100644
--- a/kalarm/fontcolourbutton.cpp
+++ b/kalarm/fontcolourbutton.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,28 +38,28 @@
= Font/colour selection button.
=============================================================================*/
-FontColourButton::FontColourButton(QWidget* parent, const char* name)
- : QFrame(parent, name),
+FontColourButton::FontColourButton(TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReadOnly(false)
{
setFrameStyle(NoFrame);
- QHBoxLayout* layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
mButton = new PushButton(i18n("Font && Co&lor..."), this);
mButton->setFixedSize(mButton->sizeHint());
- connect(mButton, SIGNAL(clicked()), SLOT(slotButtonPressed()));
- QWhatsThis::add(mButton,
+ connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonPressed()));
+ TQWhatsThis::add(mButton,
i18n("Choose the font, and foreground and background color, for the alarm message."));
layout->addWidget(mButton);
// Font and colour sample display
- mSample = new QLineEdit(this);
+ mSample = new TQLineEdit(this);
mSample->setMinimumHeight(QMAX(mSample->fontMetrics().lineSpacing(), mButton->height()*3/2));
- mSample->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::MinimumExpanding);
+ mSample->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::MinimumExpanding);
mSample->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
mSample->setCursorPosition(0);
mSample->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(mSample,
+ TQWhatsThis::add(mSample,
i18n("This sample text illustrates the current font and color settings. "
"You may edit it to test special characters."));
layout->addWidget(mSample);
@@ -71,20 +71,20 @@ void FontColourButton::setDefaultFont()
mSample->setFont(Preferences::messageFont());
}
-void FontColourButton::setFont(const QFont& font)
+void FontColourButton::setFont(const TQFont& font)
{
mDefaultFont = false;
mFont = font;
mSample->setFont(mFont);
}
-void FontColourButton::setBgColour(const QColor& colour)
+void FontColourButton::setBgColour(const TQColor& colour)
{
mBgColour = colour;
mSample->setPaletteBackgroundColor(mBgColour);
}
-void FontColourButton::setFgColour(const QColor& colour)
+void FontColourButton::setFgColour(const TQColor& colour)
{
mFgColour = colour;
mSample->setPaletteForegroundColor(mFgColour);
@@ -99,7 +99,7 @@ void FontColourButton::slotButtonPressed()
FontColourDlg dlg(mBgColour, mFgColour, mFont, mDefaultFont,
i18n("Choose Alarm Font & Color"), this, "fontColourDlg");
dlg.setReadOnly(mReadOnly);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
mDefaultFont = dlg.defaultFont();
mFont = dlg.font();
@@ -118,15 +118,15 @@ void FontColourButton::slotButtonPressed()
= Font/colour selection dialog.
=============================================================================*/
-FontColourDlg::FontColourDlg(const QColor& bgColour, const QColor& fgColour, const QFont& font,
- bool defaultFont, const QString& caption, QWidget* parent, const char* name)
+FontColourDlg::FontColourDlg(const TQColor& bgColour, const TQColor& fgColour, const TQFont& font,
+ bool defaultFont, const TQString& caption, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false),
mReadOnly(false)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
- mChooser = new FontColourChooser(page, 0, false, QStringList(), QString::null, false, true, true);
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
+ mChooser = new FontColourChooser(page, 0, false, TQStringList(), TQString::null, false, true, true);
mChooser->setBgColour(bgColour);
mChooser->setFgColour(fgColour);
if (defaultFont)
diff --git a/kalarm/fontcolourbutton.h b/kalarm/fontcolourbutton.h
index 9bbe3d8db..1b78c434a 100644
--- a/kalarm/fontcolourbutton.h
+++ b/kalarm/fontcolourbutton.h
@@ -21,9 +21,9 @@
#ifndef FONTCOLOURBUTTON_H
#define FONTCOLOURBUTTON_H
-#include <qfont.h>
-#include <qcolor.h>
-#include <qframe.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqframe.h>
#include <kdialogbase.h>
class QLineEdit;
@@ -35,15 +35,15 @@ class FontColourButton : public QFrame
{
Q_OBJECT
public:
- FontColourButton(QWidget* parent = 0, const char* name = 0);
+ FontColourButton(TQWidget* parent = 0, const char* name = 0);
void setDefaultFont();
- void setFont(const QFont&);
- void setBgColour(const QColor&);
- void setFgColour(const QColor&);
+ void setFont(const TQFont&);
+ void setBgColour(const TQColor&);
+ void setFgColour(const TQColor&);
bool defaultFont() const { return mDefaultFont; }
- QFont font() const { return mFont; }
- QColor bgColour() const { return mBgColour; }
- QColor fgColour() const { return mFgColour; }
+ TQFont font() const { return mFont; }
+ TQColor bgColour() const { return mBgColour; }
+ TQColor fgColour() const { return mFgColour; }
virtual void setReadOnly(bool ro) { mReadOnly = ro; }
virtual bool isReadOnly() const { return mReadOnly; }
@@ -55,9 +55,9 @@ class FontColourButton : public QFrame
private:
PushButton* mButton;
- QColor mBgColour, mFgColour;
- QFont mFont;
- QLineEdit* mSample;
+ TQColor mBgColour, mFgColour;
+ TQFont mFont;
+ TQLineEdit* mSample;
bool mDefaultFont;
bool mReadOnly;
};
@@ -68,12 +68,12 @@ class FontColourDlg : public KDialogBase
{
Q_OBJECT
public:
- FontColourDlg(const QColor& bg, const QColor& fg, const QFont&, bool defaultFont,
- const QString& caption, QWidget* parent = 0, const char* name = 0);
+ FontColourDlg(const TQColor& bg, const TQColor& fg, const TQFont&, bool defaultFont,
+ const TQString& caption, TQWidget* parent = 0, const char* name = 0);
bool defaultFont() const { return mDefaultFont; }
- QFont font() const { return mFont; }
- QColor bgColour() const { return mBgColour; }
- QColor fgColour() const { return mFgColour; }
+ TQFont font() const { return mFont; }
+ TQColor bgColour() const { return mBgColour; }
+ TQColor fgColour() const { return mFgColour; }
void setReadOnly(bool);
bool isReadOnly() const { return mReadOnly; }
@@ -82,8 +82,8 @@ class FontColourDlg : public KDialogBase
private:
FontColourChooser* mChooser;
- QColor mBgColour, mFgColour;
- QFont mFont;
+ TQColor mBgColour, mFgColour;
+ TQFont mFont;
bool mDefaultFont;
bool mReadOnly;
};
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index dd83fea43..45537e3d9 100644
--- a/kalarm/functions.cpp
+++ b/kalarm/functions.cpp
@@ -34,9 +34,9 @@
#include "templatelistview.h"
#include "templatemenuaction.h"
-#include <qdeepcopy.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdeepcopy.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kaction.h>
@@ -61,14 +61,14 @@
namespace
{
bool resetDaemonQueued = false;
-QCString korganizerName = "korganizer";
-QString korgStartError;
+TQCString korganizerName = "korganizer";
+TQString korgStartError;
#define KORG_DCOP_OBJECT "KOrganizerIface"
const char* KORG_DCOP_WINDOW = "KOrganizer MainWindow";
const char* KMAIL_DCOP_WINDOW = "kmail-mainwindow#1";
bool sendToKOrganizer(const KAEvent&);
-bool deleteFromKOrganizer(const QString& eventID);
+bool deleteFromKOrganizer(const TQString& eventID);
bool runKOrganizer();
}
#ifdef HAVE_XTEST
@@ -82,7 +82,7 @@ namespace KAlarm
/******************************************************************************
* Display a main window with the specified event selected.
*/
-MainWindow* displayMainWindowSelected(const QString& eventID)
+MainWindow* displayMainWindowSelected(const TQString& eventID)
{
MainWindow* win = MainWindow::firstWindow();
if (!win)
@@ -112,7 +112,7 @@ MainWindow* displayMainWindowSelected(const QString& eventID)
/******************************************************************************
* Create a New Alarm KAction.
*/
-KAction* createNewAlarmAction(const QString& label, QObject* receiver, const char* slot, KActionCollection* actions, const char* name)
+KAction* createNewAlarmAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection* actions, const char* name)
{
return new KAction(label, "filenew", KStdAccel::openNew(), receiver, slot, actions, name);
}
@@ -120,7 +120,7 @@ KAction* createNewAlarmAction(const QString& label, QObject* receiver, const cha
/******************************************************************************
* Create a New From Template KAction.
*/
-TemplateMenuAction* createNewFromTemplateAction(const QString& label, QObject* receiver, const char* slot, KActionCollection* actions, const char* name)
+TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection* actions, const char* name)
{
return new TemplateMenuAction(label, "new_from_template", receiver, slot, actions, name);
}
@@ -132,7 +132,7 @@ TemplateMenuAction* createNewFromTemplateAction(const QString& label, QObject* r
* event in that listView instance.
* 'event' is updated with the actual event ID.
*/
-UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, QWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate)
+UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate)
{
kdDebug(5950) << "KAlarm::addEvent(): " << event.id() << endl;
UpdateStatus status = UPDATE_OK;
@@ -177,7 +177,7 @@ bool addExpiredEvent(KAEvent& event)
return false;
bool archiving = (KAEvent::uidStatus(event.id()) == KAEvent::ACTIVE);
if (archiving)
- event.setSaveDateTime(QDateTime::currentDateTime()); // time stamp to control purging
+ event.setSaveDateTime(TQDateTime::currentDateTime()); // time stamp to control purging
KCal::Event* kcalEvent = cal->addEvent(event);
cal->save();
@@ -196,7 +196,7 @@ bool addExpiredEvent(KAEvent& event)
* event in that listView instance.
* 'event' is updated with the actual event ID.
*/
-UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, QWidget* errmsgParent)
+UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
{
kdDebug(5950) << "KAlarm::addTemplate(): " << event.id() << endl;
UpdateStatus status = UPDATE_OK;
@@ -228,7 +228,7 @@ UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, QWidge
* If 'selectionView' is non-null, the selection highlight is moved to the
* modified event in that listView instance.
*/
-UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, QWidget* errmsgParent)
+UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent)
{
kdDebug(5950) << "KAlarm::modifyEvent(): '" << oldEvent.id() << endl;
@@ -283,7 +283,7 @@ UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListVi
* The event is not updated in KOrganizer, since this function is called when an
* existing alarm is rescheduled (due to recurrence or deferral).
*/
-UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, QWidget* errmsgParent, bool archiveOnDelete, bool incRevision)
+UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision)
{
kdDebug(5950) << "KAlarm::updateEvent(): " << event.id() << endl;
@@ -314,7 +314,7 @@ UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, QWidget*
* If 'selectionView' is non-null, the selection highlight is moved to the
* updated event in that listView instance.
*/
-UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, QWidget* errmsgParent)
+UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
{
UpdateStatus status = UPDATE_OK;
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
@@ -341,9 +341,9 @@ UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionVie
* Delete an alarm from the calendar file and from every main window instance.
* If the event is archived, the event's ID is changed to an expired ID if necessary.
*/
-UpdateStatus deleteEvent(KAEvent& event, bool archive, QWidget* errmsgParent)
+UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent)
{
- QString id = event.id();
+ TQString id = event.id();
kdDebug(5950) << "KAlarm::deleteEvent(): " << id << endl;
// Update the window lists
@@ -388,7 +388,7 @@ UpdateStatus deleteEvent(KAEvent& event, bool archive, QWidget* errmsgParent)
*/
UpdateStatus deleteTemplate(const KAEvent& event)
{
- QString id = event.id();
+ TQString id = event.id();
// Delete the template from the calendar file
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
@@ -406,7 +406,7 @@ UpdateStatus deleteTemplate(const KAEvent& event)
/******************************************************************************
* Delete an alarm from the display calendar.
*/
-void deleteDisplayEvent(const QString& eventID)
+void deleteDisplayEvent(const TQString& eventID)
{
kdDebug(5950) << "KAlarm::deleteDisplayEvent(" << eventID << ")\n";
@@ -426,13 +426,13 @@ void deleteDisplayEvent(const QString& eventID)
*/
UpdateStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID)
{
- QString id = event.id();
+ TQString id = event.id();
kdDebug(5950) << "KAlarm::reactivateEvent(): " << id << endl;
// Delete the event from the expired calendar file
if (KAEvent::uidStatus(id) == KAEvent::EXPIRED)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (event.occursAfter(now, true))
{
if (event.recurs() || event.repeatCount())
@@ -501,9 +501,9 @@ UpdateStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enab
/******************************************************************************
* Display an error message about an error saving an event.
*/
-void displayUpdateError(QWidget* parent, UpdateStatus, UpdateError code, int nAlarms)
+void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError code, int nAlarms)
{
- QString errmsg;
+ TQString errmsg;
switch (code)
{
case ERR_ADD:
@@ -528,9 +528,9 @@ void displayUpdateError(QWidget* parent, UpdateStatus, UpdateError code, int nAl
/******************************************************************************
* Display an error message corresponding to a specified alarm update error code.
*/
-void displayKOrgUpdateError(QWidget* parent, KOrgUpdateError code, int nAlarms)
+void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError code, int nAlarms)
{
- QString errmsg;
+ TQString errmsg;
switch (code)
{
case KORG_ERR_ADD:
@@ -551,7 +551,7 @@ void displayKOrgUpdateError(QWidget* parent, KOrgUpdateError code, int nAlarms)
/******************************************************************************
* Display the alarm edit dialogue to edit a specified alarm.
*/
-bool edit(const QString& eventID)
+bool edit(const TQString& eventID)
{
AlarmCalendar* cal;
switch (KAEvent::uidStatus(eventID))
@@ -581,7 +581,7 @@ bool edit(const QString& eventID)
* Display the alarm edit dialogue to edit a new alarm, optionally preset with
* a template.
*/
-bool editNew(const QString& templateName)
+bool editNew(const TQString& templateName)
{
bool result = true;
if (!templateName.isEmpty())
@@ -607,9 +607,9 @@ bool editNew(const QString& templateName)
* Returns a list of all alarm templates.
* If shell commands are disabled, command alarm templates are omitted.
*/
-QValueList<KAEvent> templateList()
+TQValueList<KAEvent> templateList()
{
- QValueList<KAEvent> templates;
+ TQValueList<KAEvent> templates;
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
if (cal)
{
@@ -631,7 +631,7 @@ QValueList<KAEvent> templateList()
* Prompt the user to re-enable alarms if they are currently disabled, and if
* it's an email alarm, warn if no 'From' email address is configured.
*/
-void outputAlarmWarnings(QWidget* parent, const KAEvent* event)
+void outputAlarmWarnings(TQWidget* parent, const KAEvent* event)
{
if (event && event->action() == KAEvent::EMAIL
&& Preferences::emailAddress().isEmpty())
@@ -641,8 +641,8 @@ void outputAlarmWarnings(QWidget* parent, const KAEvent* event)
if (!Daemon::monitoringAlarms())
{
if (KMessageBox::warningYesNo(parent, i18n("Alarms are currently disabled.\nDo you want to enable alarms now?"),
- QString::null, i18n("Enable"), i18n("Keep Disabled"),
- QString::fromLatin1("EditEnableAlarms"))
+ TQString::null, i18n("Enable"), i18n("Keep Disabled"),
+ TQString::fromLatin1("EditEnableAlarms"))
== KMessageBox::Yes)
Daemon::setAlarmsEnabled();
}
@@ -703,13 +703,13 @@ void resetDaemonIfQueued()
* Reply = reason for failure to run KMail (which may be the empty string)
* = null string if success.
*/
-QString runKMail(bool minimise)
+TQString runKMail(bool minimise)
{
- QCString dcopName;
- QString errmsg;
+ TQCString dcopName;
+ TQString errmsg;
if (!runProgram("kmail", (minimise ? KMAIL_DCOP_WINDOW : ""), dcopName, errmsg))
return i18n("Unable to start KMail\n(%1)").arg(errmsg);
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -719,12 +719,12 @@ QString runKMail(bool minimise)
* 'errorMessage' contains an error message if failure.
* Reply = true if the program is now running.
*/
-bool runProgram(const QCString& program, const QCString& windowName, QCString& dcopName, QString& errorMessage)
+bool runProgram(const TQCString& program, const TQCString& windowName, TQCString& dcopName, TQString& errorMessage)
{
if (!kapp->dcopClient()->isApplicationRegistered(program))
{
// KOrganizer is not already running, so start it
- if (KApplication::startServiceByDesktopName(QString::fromLatin1(program), QString::null, &errorMessage, &dcopName))
+ if (KApplication::startServiceByDesktopName(TQString::fromLatin1(program), TQString::null, &errorMessage, &dcopName))
{
kdError(5950) << "runProgram(): couldn't start " << program << " (" << errorMessage << ")\n";
return false;
@@ -732,11 +732,11 @@ bool runProgram(const QCString& program, const QCString& windowName, QCString& d
// Minimise its window - don't use hide() since this would remove all
// trace of it from the panel if it is not configured to be docked in
// the system tray.
- kapp->dcopClient()->send(dcopName, windowName, "minimize()", QString::null);
+ kapp->dcopClient()->send(dcopName, windowName, "minimize()", TQString::null);
}
else if (dcopName.isEmpty())
dcopName = program;
- errorMessage = QString::null;
+ errorMessage = TQString::null;
return true;
}
@@ -746,13 +746,13 @@ bool runProgram(const QCString& program, const QCString& windowName, QCString& d
* Reply = true if size set in the config file, in which case 'result' is set
* = false if no size is set, in which case 'result' is unchanged.
*/
-bool readConfigWindowSize(const char* window, QSize& result)
+bool readConfigWindowSize(const char* window, TQSize& result)
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::fromLatin1(window));
- QWidget* desktop = KApplication::desktop();
- QSize s = QSize(config->readNumEntry(QString::fromLatin1("Width %1").arg(desktop->width()), 0),
- config->readNumEntry(QString::fromLatin1("Height %1").arg(desktop->height()), 0));
+ config->setGroup(TQString::fromLatin1(window));
+ TQWidget* desktop = KApplication::desktop();
+ TQSize s = TQSize(config->readNumEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), 0),
+ config->readNumEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), 0));
if (s.isEmpty())
return false;
result = s;
@@ -763,13 +763,13 @@ bool readConfigWindowSize(const char* window, QSize& result)
* Write the size for the specified window to the config file, for the
* current screen resolution.
*/
-void writeConfigWindowSize(const char* window, const QSize& size)
+void writeConfigWindowSize(const char* window, const TQSize& size)
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::fromLatin1(window));
- QWidget* desktop = KApplication::desktop();
- config->writeEntry(QString::fromLatin1("Width %1").arg(desktop->width()), size.width());
- config->writeEntry(QString::fromLatin1("Height %1").arg(desktop->height()), size.height());
+ config->setGroup(TQString::fromLatin1(window));
+ TQWidget* desktop = KApplication::desktop();
+ config->writeEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), size.width());
+ config->writeEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), size.height());
config->sync();
}
@@ -790,12 +790,12 @@ int Version()
* e.g. 010203 for 1.2.3
* = 0 if invalid version string.
*/
-int getVersionNumber(const QString& version, QString* subVersion)
+int getVersionNumber(const TQString& version, TQString* subVersion)
{
// N.B. Remember to change Version(int major, int minor, int rev)
// if the representation returned by this method changes.
if (subVersion)
- *subVersion = QString::null;
+ *subVersion = TQString::null;
int count = version.contains('.') + 1;
if (count < 2)
return 0;
@@ -810,7 +810,7 @@ int getVersionNumber(const QString& version, QString* subVersion)
if (count >= 3)
{
// Issue number: allow other characters to follow the last digit
- QString issue = version.section('.', 2);
+ TQString issue = version.section('.', 2);
if (!issue.at(0).isDigit())
return 0;
int n = issue.length();
@@ -829,7 +829,7 @@ int getVersionNumber(const QString& version, QString* subVersion)
* If a text file, its type is distinguished.
* Reply = file type.
*/
-FileType fileType(const QString& mimetype)
+FileType fileType(const TQString& mimetype)
{
static const char* applicationTypes[] = {
"x-shellscript", "x-nawk", "x-awk", "x-perl", "x-python",
@@ -837,20 +837,20 @@ FileType fileType(const QString& mimetype)
static const char* formattedTextTypes[] = {
"html", "xml", 0 };
- if (mimetype.startsWith(QString::fromLatin1("image/")))
+ if (mimetype.startsWith(TQString::fromLatin1("image/")))
return Image;
int slash = mimetype.find('/');
if (slash < 0)
return Unknown;
- QString type = mimetype.mid(slash + 1);
+ TQString type = mimetype.mid(slash + 1);
const char* typel = type.latin1();
- if (mimetype.startsWith(QString::fromLatin1("application")))
+ if (mimetype.startsWith(TQString::fromLatin1("application")))
{
for (int i = 0; applicationTypes[i]; ++i)
if (!strcmp(typel, applicationTypes[i]))
return TextApplication;
}
- else if (mimetype.startsWith(QString::fromLatin1("text")))
+ else if (mimetype.startsWith(TQString::fromLatin1("text")))
{
for (int i = 0; formattedTextTypes[i]; ++i)
if (!strcmp(typel, formattedTextTypes[i]))
@@ -870,20 +870,20 @@ FileType fileType(const QString& mimetype)
* @param mode OR of KFile::Mode values, e.g. ExistingOnly, LocalOnly.
* Reply = URL selected. If none is selected, URL.isEmpty() is true.
*/
-QString browseFile(const QString& caption, QString& defaultDir, const QString& initialFile,
- const QString& filter, int mode, QWidget* parent, const char* name)
+TQString browseFile(const TQString& caption, TQString& defaultDir, const TQString& initialFile,
+ const TQString& filter, int mode, TQWidget* parent, const char* name)
{
- QString initialDir = !initialFile.isEmpty() ? QString(initialFile).remove(QRegExp("/[^/]*$"))
+ TQString initialDir = !initialFile.isEmpty() ? TQString(initialFile).remove(TQRegExp("/[^/]*$"))
: !defaultDir.isEmpty() ? defaultDir
- : QDir::homeDirPath();
+ : TQDir::homeDirPath();
KFileDialog fileDlg(initialDir, filter, parent, name, true);
fileDlg.setOperationMode(mode & KFile::ExistingOnly ? KFileDialog::Opening : KFileDialog::Saving);
fileDlg.setMode(KFile::File | mode);
fileDlg.setCaption(caption);
if (!initialFile.isEmpty())
fileDlg.setSelection(initialFile);
- if (fileDlg.exec() != QDialog::Accepted)
- return QString::null;
+ if (fileDlg.exec() != TQDialog::Accepted)
+ return TQString::null;
KURL url = fileDlg.selectedURL();
defaultDir = url.path();
return (mode & KFile::LocalOnly) ? url.path() : url.prettyURL();
@@ -904,13 +904,13 @@ int localeFirstDayOfWeek()
/******************************************************************************
* Return the supplied string with any accelerator code stripped out.
*/
-QString stripAccel(const QString& text)
+TQString stripAccel(const TQString& text)
{
unsigned len = text.length();
- QString out = QDeepCopy<QString>(text);
- QChar *corig = (QChar*)out.unicode();
- QChar *cout = corig;
- QChar *cin = cout;
+ TQString out = TQDeepCopy<TQString>(text);
+ TQChar *corig = (TQChar*)out.unicode();
+ TQChar *cout = corig;
+ TQChar *cin = cout;
while (len)
{
if ( *cin == '&' )
@@ -955,10 +955,10 @@ namespace {
bool sendToKOrganizer(const KAEvent& event)
{
KCal::Event* kcalEvent = event.event();
- QString uid = KAEvent::uid(event.id(), KAEvent::KORGANIZER);
+ TQString uid = KAEvent::uid(event.id(), KAEvent::KORGANIZER);
kcalEvent->setUid(uid);
kcalEvent->clearAlarms();
- QString userEmail;
+ TQString userEmail;
switch (event.action())
{
case KAEvent::MESSAGE:
@@ -969,37 +969,37 @@ bool sendToKOrganizer(const KAEvent& event)
break;
case KAEvent::EMAIL:
{
- QString from = event.emailFromId()
+ TQString from = event.emailFromId()
? KAMail::identityManager()->identityForUoid(event.emailFromId()).fullEmailAddr()
: Preferences::emailAddress();
AlarmText atext;
- atext.setEmail(event.emailAddresses(", "), from, QString::null, QString::null, event.emailSubject(), QString::null);
+ atext.setEmail(event.emailAddresses(", "), from, TQString::null, TQString::null, event.emailSubject(), TQString::null);
kcalEvent->setSummary(atext.displayText());
userEmail = from;
break;
}
}
- kcalEvent->setOrganizer(KCal::Person(QString::null, userEmail));
+ kcalEvent->setOrganizer(KCal::Person(TQString::null, userEmail));
// Translate the event into string format
KCal::ICalFormat format;
- format.setTimeZone(QString::null, false);
- QString iCal = format.toICalString(kcalEvent);
+ format.setTimeZone(TQString::null, false);
+ TQString iCal = format.toICalString(kcalEvent);
kdDebug(5950)<<"Korg->"<<iCal<<endl;
delete kcalEvent;
// Send the event to KOrganizer
if (!runKOrganizer()) // start KOrganizer if it isn't already running
return false;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << iCal;
- if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "addIncidence(QString)", data, replyType, replyData)
+ if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "addIncidence(TQString)", data, replyType, replyData)
&& replyType == "bool")
{
bool result;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> result;
if (result)
{
@@ -1014,20 +1014,20 @@ kdDebug(5950)<<"Korg->"<<iCal<<endl;
/******************************************************************************
* Tell KOrganizer to delete an event from its calendar.
*/
-bool deleteFromKOrganizer(const QString& eventID)
+bool deleteFromKOrganizer(const TQString& eventID)
{
if (!runKOrganizer()) // start KOrganizer if it isn't already running
return false;
- QString newID = KAEvent::uid(eventID, KAEvent::KORGANIZER);
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQString newID = KAEvent::uid(eventID, KAEvent::KORGANIZER);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << newID << true;
- if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "deleteIncidence(QString,bool)", data, replyType, replyData)
+ if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "deleteIncidence(TQString,bool)", data, replyType, replyData)
&& replyType == "bool")
{
bool result;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> result;
if (result)
{
@@ -1044,9 +1044,9 @@ bool deleteFromKOrganizer(const QString& eventID)
*/
bool runKOrganizer()
{
- QString error;
- QCString dcopService;
- int result = KDCOPServiceStarter::self()->findServiceFor("DCOP/Organizer", QString::null, QString::null, &error, &dcopService);
+ TQString error;
+ TQCString dcopService;
+ int result = KDCOPServiceStarter::self()->findServiceFor("DCOP/Organizer", TQString::null, TQString::null, &error, &dcopService);
if (result)
{
kdDebug(5950) << "Unable to start DCOP/Organizer: " << dcopService << " " << error << endl;
@@ -1055,8 +1055,8 @@ bool runKOrganizer()
// If Kontact is running, there is be a load() method which needs to be called
// to load KOrganizer into Kontact. But if KOrganizer is running independently,
// the load() method doesn't exist.
- QCString dummy;
- if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", QByteArray(), dummy, dummy))
+ TQCString dummy;
+ if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", TQByteArray(), dummy, dummy))
{
DCOPRef ref(dcopService, dcopService); // talk to the KUniqueApplication or its Kontact wrapper
DCOPReply reply = ref.call("load()");
@@ -1065,7 +1065,7 @@ bool runKOrganizer()
kdWarning(5950) << "Error loading " << dcopService << endl;
return false;
}
- if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", QByteArray(), dummy, dummy))
+ if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", TQByteArray(), dummy, dummy))
{
kdWarning(5950) << "Unable to access KOrganizer's "KORG_DCOP_OBJECT" DCOP object" << endl;
return false;
@@ -1079,7 +1079,7 @@ bool runKOrganizer()
#ifdef HAVE_XTEST
#include <X11/keysym.h>
#include <X11/extensions/XTest.h>
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
/******************************************************************************
* Cancel the screen saver, in case it is active.
diff --git a/kalarm/functions.h b/kalarm/functions.h
index c5337cc48..359eca65d 100644
--- a/kalarm/functions.h
+++ b/kalarm/functions.h
@@ -23,8 +23,8 @@
/** @file functions.h - miscellaneous functions */
-#include <qsize.h>
-#include <qstring.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include "alarmevent.h"
@@ -62,54 +62,54 @@ enum KOrgUpdateError { KORG_ERR_ADD, KORG_ERR_MODIFY, KORG_ERR_DELETE };
/** Display a main window with the specified event selected */
-MainWindow* displayMainWindowSelected(const QString& eventID = QString::null);
-bool readConfigWindowSize(const char* window, QSize&);
-void writeConfigWindowSize(const char* window, const QSize&);
+MainWindow* displayMainWindowSelected(const TQString& eventID = TQString::null);
+bool readConfigWindowSize(const char* window, TQSize&);
+void writeConfigWindowSize(const char* window, const TQSize&);
/** Check from its mime type whether a file appears to be a text or image file.
* If a text file, its type is distinguished.
*/
-FileType fileType(const QString& mimetype);
+FileType fileType(const TQString& mimetype);
/** Return current KAlarm version number */
int Version();
inline int Version(int major, int minor, int rev) { return major*10000 + minor*100 + rev; }
-int getVersionNumber(const QString& version, QString* subVersion = 0);
+int getVersionNumber(const TQString& version, TQString* subVersion = 0);
/** Return which version of KAlarm was the first to use the current calendar/event format */
inline int currentCalendarVersion() { return KAEvent::calVersion(); }
-inline QString currentCalendarVersionString() { return KAEvent::calVersionString(); }
-QString browseFile(const QString& caption, QString& defaultDir, const QString& initialFile = QString::null,
- const QString& filter = QString::null, int mode = 0, QWidget* parent = 0, const char* name = 0);
-bool edit(const QString& eventID);
-bool editNew(const QString& templateName = QString::null);
+inline TQString currentCalendarVersionString() { return KAEvent::calVersionString(); }
+TQString browseFile(const TQString& caption, TQString& defaultDir, const TQString& initialFile = TQString::null,
+ const TQString& filter = TQString::null, int mode = 0, TQWidget* parent = 0, const char* name = 0);
+bool edit(const TQString& eventID);
+bool editNew(const TQString& templateName = TQString::null);
/** Create a "New Alarm" KAction */
-KAction* createNewAlarmAction(const QString& label, QObject* receiver, const char* slot, KActionCollection*, const char* name);
+KAction* createNewAlarmAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection*, const char* name);
/** Create a "New From Template" KAction */
-TemplateMenuAction* createNewFromTemplateAction(const QString& label, QObject* receiver, const char* slot, KActionCollection*, const char* name);
+TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection*, const char* name);
/** Returns a list of all alarm templates.
* If shell commands are disabled, command alarm templates are omitted.
*/
-QValueList<KAEvent> templateList();
-void outputAlarmWarnings(QWidget* parent, const KAEvent* = 0);
+TQValueList<KAEvent> templateList();
+void outputAlarmWarnings(TQWidget* parent, const KAEvent* = 0);
void resetDaemon();
void resetDaemonIfQueued(); // must only be called from KAlarmApp::processQueue()
-QString runKMail(bool minimise);
-bool runProgram(const QCString& program, const QCString& windowName, QCString& dcopName, QString& errorMessage);
+TQString runKMail(bool minimise);
+bool runProgram(const TQCString& program, const TQCString& windowName, TQCString& dcopName, TQString& errorMessage);
-UpdateStatus addEvent(KAEvent&, AlarmListView* selectionView, QWidget* errmsgParent = 0, bool useEventID = false, bool allowKOrgUpdate = true);
+UpdateStatus addEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool useEventID = false, bool allowKOrgUpdate = true);
bool addExpiredEvent(KAEvent&);
-UpdateStatus addTemplate(KAEvent&, TemplateListView* selectionView, QWidget* errmsgParent = 0);
-UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, QWidget* errmsgParent = 0);
-UpdateStatus updateEvent(KAEvent&, AlarmListView* selectionView, QWidget* errmsgParent = 0, bool archiveOnDelete = true, bool incRevision = true);
-UpdateStatus updateTemplate(const KAEvent&, TemplateListView* selectionView, QWidget* errmsgParent = 0);
-UpdateStatus deleteEvent(KAEvent&, bool archive = true, QWidget* errmsgParent = 0);
+UpdateStatus addTemplate(KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0);
+UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent = 0);
+UpdateStatus updateEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool archiveOnDelete = true, bool incRevision = true);
+UpdateStatus updateTemplate(const KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0);
+UpdateStatus deleteEvent(KAEvent&, bool archive = true, TQWidget* errmsgParent = 0);
UpdateStatus deleteTemplate(const KAEvent&);
-void deleteDisplayEvent(const QString& eventID);
+void deleteDisplayEvent(const TQString& eventID);
UpdateStatus reactivateEvent(KAEvent&, AlarmListView* selectionView, bool useEventID = false);
UpdateStatus enableEvent(KAEvent&, AlarmListView* selectionView, bool enable);
-void displayUpdateError(QWidget* parent, UpdateStatus, UpdateError, int nAlarms);
-void displayKOrgUpdateError(QWidget* parent, KOrgUpdateError, int nAlarms);
+void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError, int nAlarms);
+void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError, int nAlarms);
void cancelScreenSaver();
-QString stripAccel(const QString&);
+TQString stripAccel(const TQString&);
int localeFirstDayOfWeek();
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index b222eeece..f4daec9c2 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());
}
diff --git a/kalarm/kalarmapp.h b/kalarm/kalarmapp.h
index 22c7649b3..3f33bfa51 100644
--- a/kalarm/kalarmapp.h
+++ b/kalarm/kalarmapp.h
@@ -23,7 +23,7 @@
/** @file kalarmapp.h - the KAlarm application object */
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class QTimer;
class QDateTime;
@@ -61,8 +61,8 @@ class KAlarmApp : public KUniqueApplication
bool restoreSession();
bool sessionClosingDown() const { return mSessionClosingDown; }
void quitIf() { quitIf(0); }
- void doQuit(QWidget* parent);
- static void displayFatalError(const QString& message);
+ void doQuit(TQWidget* parent);
+ static void displayFatalError(const TQString& message);
void addWindow(TrayWindow* w) { mTrayWindow = w; }
void removeWindow(TrayWindow*);
TrayWindow* trayWindow() const { return mTrayWindow; }
@@ -75,20 +75,20 @@ class KAlarmApp : public KUniqueApplication
void* execAlarm(KAEvent&, const KAAlarm&, bool reschedule, bool allowDefer = true, bool noPreAction = false);
void alarmShowing(KAEvent&, KAAlarm::Type, const DateTime&);
void alarmCompleted(const KAEvent&);
- bool deleteEvent(const QString& eventID) { return handleEvent(eventID, EVENT_CANCEL); }
- void commandMessage(ShellProcess*, QWidget* parent);
+ bool deleteEvent(const TQString& eventID) { return handleEvent(eventID, EVENT_CANCEL); }
+ void commandMessage(ShellProcess*, TQWidget* parent);
// Methods called indirectly by the DCOP interface
- bool scheduleEvent(KAEvent::Action, const QString& text, const QDateTime&,
- int lateCancel, int flags, const QColor& bg, const QColor& fg,
- const QFont&, const QString& audioFile, float audioVolume,
+ bool scheduleEvent(KAEvent::Action, const TQString& text, const TQDateTime&,
+ int lateCancel, int flags, const TQColor& bg, const TQColor& fg,
+ const TQFont&, const TQString& audioFile, float audioVolume,
int reminderMinutes, const KARecurrence& recurrence,
int repeatInterval, int repeatCount,
uint mailFromID = 0, const EmailAddressList& mailAddresses = EmailAddressList(),
- const QString& mailSubject = QString::null,
- const QStringList& mailAttachments = QStringList());
- bool handleEvent(const QString& calendarFile, const QString& eventID) { return handleEvent(calendarFile, eventID, EVENT_HANDLE); }
- bool triggerEvent(const QString& calendarFile, const QString& eventID) { return handleEvent(calendarFile, eventID, EVENT_TRIGGER); }
- bool deleteEvent(const QString& calendarFile, const QString& eventID) { return handleEvent(calendarFile, eventID, EVENT_CANCEL); }
+ const TQString& mailSubject = TQString::null,
+ const TQStringList& mailAttachments = TQStringList());
+ bool handleEvent(const TQString& calendarFile, const TQString& eventID) { return handleEvent(calendarFile, eventID, EVENT_HANDLE); }
+ bool triggerEvent(const TQString& calendarFile, const TQString& eventID) { return handleEvent(calendarFile, eventID, EVENT_TRIGGER); }
+ bool deleteEvent(const TQString& calendarFile, const TQString& eventID) { return handleEvent(calendarFile, eventID, EVENT_CANCEL); }
public slots:
void processQueue();
signals:
@@ -123,20 +123,20 @@ class KAlarmApp : public KUniqueApplication
bool tempFile() const { return flags & TEMP_FILE; }
bool execInXterm() const { return flags & EXEC_IN_XTERM; }
ShellProcess* process;
- QGuardedPtr<ShellProcess> logProcess;
+ TQGuardedPtr<ShellProcess> logProcess;
KAEvent* event;
KAAlarm* alarm;
- QGuardedPtr<QWidget> messageBoxParent;
- QStringList tempFiles;
+ TQGuardedPtr<TQWidget> messageBoxParent;
+ TQStringList tempFiles;
int flags;
};
struct DcopQEntry
{
- DcopQEntry(EventFunc f, const QString& id) : function(f), eventId(id) { }
+ DcopQEntry(EventFunc f, const TQString& id) : function(f), eventId(id) { }
DcopQEntry(const KAEvent& e, EventFunc f = EVENT_HANDLE) : function(f), event(e) { }
DcopQEntry() { }
EventFunc function;
- QString eventId;
+ TQString eventId;
KAEvent event;
};
@@ -146,29 +146,29 @@ class KAlarmApp : public KUniqueApplication
bool checkSystemTray();
void changeStartOfDay();
void setUpDcop();
- bool handleEvent(const QString& calendarFile, const QString& eventID, EventFunc);
- bool handleEvent(const QString& eventID, EventFunc);
+ bool handleEvent(const TQString& calendarFile, const TQString& eventID, EventFunc);
+ bool handleEvent(const TQString& eventID, EventFunc);
void rescheduleAlarm(KAEvent&, const KAAlarm&, bool updateCalAndDisplay);
void cancelAlarm(KAEvent&, KAAlarm::Type, bool updateCalAndDisplay);
- ShellProcess* doShellCommand(const QString& command, const KAEvent&, const KAAlarm*, int flags = 0);
- QString createTempScriptFile(const QString& command, bool insertShell, const KAEvent&, const KAAlarm&);
+ ShellProcess* doShellCommand(const TQString& command, const KAEvent&, const KAAlarm*, int flags = 0);
+ TQString createTempScriptFile(const TQString& command, bool insertShell, const KAEvent&, const KAAlarm&);
void commandErrorMsg(const ShellProcess*, const KAEvent&, const KAAlarm*, int flags = 0);
static KAlarmApp* theInstance; // the one and only KAlarmApp instance
static int mActiveCount; // number of active instances without main windows
static int mFatalError; // a fatal error has occurred - just wait to exit
- static QString mFatalMessage; // fatal error message to output
+ static TQString mFatalMessage; // fatal error message to output
bool mInitialised; // initialisation complete: ready to handle DCOP calls
DcopHandler* mDcopHandler; // the parent of the main DCOP receiver object
#ifdef OLD_DCOP
DcopHandlerOld* mDcopHandlerOld; // the parent of the old main DCOP receiver object
#endif
TrayWindow* mTrayWindow; // active system tray icon
- QTime mStartOfDay; // start-of-day time currently in use
- QColor mPrefsExpiredColour; // expired alarms text colour
+ TQTime mStartOfDay; // start-of-day time currently in use
+ TQColor mPrefsExpiredColour; // expired alarms text colour
int mPrefsExpiredKeepDays;// how long expired alarms are being kept
- QValueList<ProcData*> mCommandProcesses; // currently active command alarm processes
- QValueList<DcopQEntry> mDcopQueue; // DCOP command queue
+ TQValueList<ProcData*> mCommandProcesses; // currently active command alarm processes
+ TQValueList<DcopQEntry> mDcopQueue; // DCOP command queue
int mPendingQuitCode; // exit code for a pending quit
bool mPendingQuit; // quit once the DCOP command and shell command queues have been processed
bool mProcessingQueue; // a mDcopQueue entry is currently being processed
diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp
index 8af97cc0b..1f325be48 100644
--- a/kalarm/kalarmd/adcalendar.cpp
+++ b/kalarm/kalarmd/adcalendar.cpp
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempfile.h>
#include <kio/job.h>
@@ -30,14 +30,14 @@
#include "adcalendar.moc"
-QValueList<ADCalendar*> ADCalendar::mCalendars;
+TQValueList<ADCalendar*> ADCalendar::mCalendars;
ADCalendar::EventsMap ADCalendar::mEventsHandled;
ADCalendar::EventsMap ADCalendar::mEventsPending;
-QStringList ADCalendar::mCalendarUrls; // never delete or reorder anything in this list!
+TQStringList ADCalendar::mCalendarUrls; // never delete or reorder anything in this list!
-ADCalendar::ADCalendar(const QString& url, const QCString& appname)
- : KCal::CalendarLocal(QString::fromLatin1("UTC")),
+ADCalendar::ADCalendar(const TQString& url, const TQCString& appname)
+ : KCal::CalendarLocal(TQString::fromLatin1("UTC")),
mUrlString(url),
mAppName(appname),
mLoaded(false),
@@ -96,7 +96,7 @@ bool ADCalendar::loadFile(bool reset)
KURL dest;
dest.setPath(mTempFileName);
KIO::FileCopyJob* job = KIO::file_copy(url, dest, -1, true);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotDownloadJobResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotDownloadJobResult(KIO::Job*)));
}
return true;
}
@@ -114,12 +114,12 @@ void ADCalendar::slotDownloadJobResult(KIO::Job *job)
kdDebug(5900) << "--- Downloaded to " << mTempFileName << endl;
loadLocalFile(mTempFileName);
}
- unlink(QFile::encodeName(mTempFileName));
- mTempFileName = QString::null;
+ unlink(TQFile::encodeName(mTempFileName));
+ mTempFileName = TQString::null;
emit loaded(this, mLoaded);
}
-void ADCalendar::loadLocalFile(const QString& filename)
+void ADCalendar::loadLocalFile(const TQString& filename)
{
mLoaded = load(filename);
if (!mLoaded)
@@ -140,7 +140,7 @@ bool ADCalendar::setLoadedConnected()
* Check whether all the alarms for the event with the given ID have already
* been handled.
*/
-bool ADCalendar::eventHandled(const KCal::Event* event, const QValueList<QDateTime>& alarmtimes)
+bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList<TQDateTime>& alarmtimes)
{
EventsMap::ConstIterator it = mEventsHandled.find(EventKey(event->uid(), mUrlIndex));
if (it == mEventsHandled.end())
@@ -164,7 +164,7 @@ bool ADCalendar::eventHandled(const KCal::Event* event, const QValueList<QDateTi
* Remember that the event with the given ID has been handled.
* It must already be in the pending list.
*/
-void ADCalendar::setEventHandled(const QString& eventID)
+void ADCalendar::setEventHandled(const TQString& eventID)
{
kdDebug(5900) << "ADCalendar::setEventHandled(" << eventID << ")\n";
EventKey key(eventID, mUrlIndex);
@@ -182,7 +182,7 @@ void ADCalendar::setEventHandled(const QString& eventID)
* Remember that the specified alarms for the event with the given ID have been
* notified to KAlarm, but no reply has come back yet.
*/
-void ADCalendar::setEventPending(const KCal::Event* event, const QValueList<QDateTime>& alarmtimes)
+void ADCalendar::setEventPending(const KCal::Event* event, const TQValueList<TQDateTime>& alarmtimes)
{
if (event)
{
@@ -195,7 +195,7 @@ void ADCalendar::setEventPending(const KCal::Event* event, const QValueList<QDat
/******************************************************************************
* Add a specified entry to the events pending or handled list.
*/
-void ADCalendar::setEventInMap(EventsMap& map, const EventKey& key, const QValueList<QDateTime>& alarmtimes, int sequence)
+void ADCalendar::setEventInMap(EventsMap& map, const EventKey& key, const TQValueList<TQDateTime>& alarmtimes, int sequence)
{
EventsMap::Iterator it = map.find(key);
if (it != map.end())
@@ -239,7 +239,7 @@ void ADCalendar::clearEventMap(EventsMap& map, bool nonexistentOnly)
/******************************************************************************
* Look up the calendar with the specified full calendar URL.
*/
-ADCalendar* ADCalendar::getCalendar(const QString& calendarURL)
+ADCalendar* ADCalendar::getCalendar(const TQString& calendarURL)
{
if (!calendarURL.isEmpty())
{
diff --git a/kalarm/kalarmd/adcalendar.h b/kalarm/kalarmd/adcalendar.h
index 656070bef..67e2fac92 100644
--- a/kalarm/kalarmd/adcalendar.h
+++ b/kalarm/kalarmd/adcalendar.h
@@ -31,12 +31,12 @@ class ADCalendar : public KCal::CalendarLocal
{
Q_OBJECT
public:
- typedef QValueList<ADCalendar*>::ConstIterator ConstIterator;
+ typedef TQValueList<ADCalendar*>::ConstIterator ConstIterator;
~ADCalendar();
- const QString& urlString() const { return mUrlString; }
- const QCString& appName() const { return mAppName; }
+ const TQString& urlString() const { return mUrlString; }
+ const TQCString& appName() const { return mAppName; }
void setEnabled(bool enabled) { mEnabled = enabled; }
bool enabled() const { return mEnabled && !unregistered(); }
@@ -47,10 +47,10 @@ class ADCalendar : public KCal::CalendarLocal
void setUnregistered(bool u) { mUnregistered = u; }
bool unregistered() const { return mUnregistered; }
- void setEventPending(const KCal::Event*, const QValueList<QDateTime>&);
- void setEventHandled(const QString& eventID);
+ void setEventPending(const KCal::Event*, const TQValueList<TQDateTime>&);
+ void setEventHandled(const TQString& eventID);
void clearEventsHandled(bool nonexistentOnly = false);
- bool eventHandled(const KCal::Event*, const QValueList<QDateTime>&);
+ bool eventHandled(const KCal::Event*, const TQValueList<TQDateTime>&);
bool loadFile(bool reset);
bool setLoadedConnected(); // check status of mLoadedConnected and set it to true
@@ -60,7 +60,7 @@ class ADCalendar : public KCal::CalendarLocal
static ConstIterator begin() { return mCalendars.begin(); }
static ConstIterator end() { return mCalendars.end(); }
- static ADCalendar* getCalendar(const QString& calendarURL);
+ static ADCalendar* getCalendar(const TQString& calendarURL);
signals:
void loaded(ADCalendar*, bool success);
@@ -68,7 +68,7 @@ class ADCalendar : public KCal::CalendarLocal
protected:
// Only ClientInfo can construct ADCalendar objects
friend class ClientInfo;
- ADCalendar(const QString& url, const QCString& appname);
+ ADCalendar(const TQString& url, const TQCString& appname);
private slots:
void slotDownloadJobResult(KIO::Job*);
@@ -77,39 +77,39 @@ class ADCalendar : public KCal::CalendarLocal
struct EventKey
{
EventKey() : calendarIndex(-1) { }
- EventKey(const QString& id, int cal) : eventID(id), calendarIndex(cal) { }
+ EventKey(const TQString& id, int cal) : eventID(id), calendarIndex(cal) { }
bool operator<(const EventKey& k) const
{ return (calendarIndex == k.calendarIndex)
? (eventID < k.eventID) : (calendarIndex < k.calendarIndex);
}
- QString eventID;
+ TQString eventID;
int calendarIndex;
};
struct EventItem
{
EventItem() : eventSequence(0) { }
- EventItem(int seqno, const QValueList<QDateTime>& alarmtimes)
+ EventItem(int seqno, const TQValueList<TQDateTime>& alarmtimes)
: eventSequence(seqno), alarmTimes(alarmtimes) {}
int eventSequence;
- QValueList<QDateTime> alarmTimes;
+ TQValueList<TQDateTime> alarmTimes;
};
- typedef QMap<EventKey, EventItem> EventsMap; // calendar/event ID, event sequence num
+ typedef TQMap<EventKey, EventItem> EventsMap; // calendar/event ID, event sequence num
static EventsMap mEventsHandled; // IDs of already triggered events which have been processed by KAlarm
static EventsMap mEventsPending; // IDs of already triggered events not yet processed by KAlarm
- static QStringList mCalendarUrls; // URLs of all calendars ever opened
- static QValueList<ADCalendar*> mCalendars; // list of all constructed calendars
+ static TQStringList mCalendarUrls; // URLs of all calendars ever opened
+ static TQValueList<ADCalendar*> mCalendars; // list of all constructed calendars
ADCalendar(const ADCalendar&); // prohibit copying
ADCalendar& operator=(const ADCalendar&); // prohibit copying
- void loadLocalFile(const QString& filename);
+ void loadLocalFile(const TQString& filename);
void clearEventMap(EventsMap&, bool nonexistentOnly);
- void setEventInMap(EventsMap&, const EventKey&, const QValueList<QDateTime>& alarmtimes, int sequence);
+ void setEventInMap(EventsMap&, const EventKey&, const TQValueList<TQDateTime>& alarmtimes, int sequence);
- QString mUrlString; // calendar file URL
- QCString mAppName; // name of application owning this calendar
- QString mTempFileName; // temporary file used if currently downloading, else null
+ TQString mUrlString; // calendar file URL
+ TQCString mAppName; // name of application owning this calendar
+ TQString mTempFileName; // temporary file used if currently downloading, else null
int mUrlIndex; // unique index to URL in mCalendarUrls
bool mLoaded; // true if calendar file is currently loaded
bool mLoadedConnected; // true if the loaded() signal has been connected to AlarmDaemon
diff --git a/kalarm/kalarmd/adconfigdata.cpp b/kalarm/kalarmd/adconfigdata.cpp
index 11dc6bf67..c8c5dd355 100644
--- a/kalarm/kalarmd/adconfigdata.cpp
+++ b/kalarm/kalarmd/adconfigdata.cpp
@@ -20,8 +20,8 @@
#include "kalarmd.h"
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kstandarddirs.h>
@@ -31,13 +31,13 @@
#include "adconfigdata.h"
// Config file key strings
-const QString CLIENT_GROUP(QString::fromLatin1("Client "));
-const QRegExp CLIENT_GROUP_SEARCH("^Client ");
+const TQString CLIENT_GROUP(TQString::fromLatin1("Client "));
+const TQRegExp CLIENT_GROUP_SEARCH("^Client ");
// Client data file key strings
-const QString CALENDAR_KEY(QString::fromLatin1("Calendar"));
-const QString TITLE_KEY(QString::fromLatin1("Title"));
-const QString DCOP_OBJECT_KEY(QString::fromLatin1("DCOP object"));
-const QString START_CLIENT_KEY(QString::fromLatin1("Start"));
+const TQString CALENDAR_KEY(TQString::fromLatin1("Calendar"));
+const TQString TITLE_KEY(TQString::fromLatin1("Title"));
+const TQString DCOP_OBJECT_KEY(TQString::fromLatin1("DCOP object"));
+const TQString START_CLIENT_KEY(TQString::fromLatin1("Start"));
/******************************************************************************
@@ -49,17 +49,17 @@ void ADConfigData::readConfig()
kdDebug(5900) << "ADConfigData::readConfig()" << endl;
ClientInfo::clear();
KConfig* config = KGlobal::config();
- QStringList clients = config->groupList().grep(CLIENT_GROUP_SEARCH);
- for (QStringList::Iterator cl = clients.begin(); cl != clients.end(); ++cl)
+ TQStringList clients = config->groupList().grep(CLIENT_GROUP_SEARCH);
+ for (TQStringList::Iterator cl = clients.begin(); cl != clients.end(); ++cl)
{
// Read this client's configuration
config->setGroup(*cl);
- QString client = *cl;
+ TQString client = *cl;
client.remove(CLIENT_GROUP_SEARCH);
- QString title = config->readEntry(TITLE_KEY, client); // read app title (default = app name)
- QCString dcopObject = config->readEntry(DCOP_OBJECT_KEY).local8Bit();
+ TQString title = config->readEntry(TITLE_KEY, client); // read app title (default = app name)
+ TQCString dcopObject = config->readEntry(DCOP_OBJECT_KEY).local8Bit();
bool startClient = config->readBoolEntry(START_CLIENT_KEY, false);
- QString calendar = config->readPathEntry(CALENDAR_KEY);
+ TQString calendar = config->readPathEntry(CALENDAR_KEY);
// Verify the configuration
bool ok = false;
@@ -99,12 +99,12 @@ void ADConfigData::readConfig()
/******************************************************************************
* Write a client application's details to the config file.
*/
-void ADConfigData::writeClient(const QCString& appName, const ClientInfo* cinfo)
+void ADConfigData::writeClient(const TQCString& appName, const ClientInfo* cinfo)
{
KConfig* config = KGlobal::config();
- config->setGroup(CLIENT_GROUP + QString::fromLocal8Bit(appName));
+ config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->writeEntry(TITLE_KEY, cinfo->title());
- config->writeEntry(DCOP_OBJECT_KEY, QString::fromLocal8Bit(cinfo->dcopObject()));
+ config->writeEntry(DCOP_OBJECT_KEY, TQString::fromLocal8Bit(cinfo->dcopObject()));
config->writeEntry(START_CLIENT_KEY, cinfo->startClient());
config->writePathEntry(CALENDAR_KEY, cinfo->calendar()->urlString());
config->sync();
@@ -113,20 +113,20 @@ void ADConfigData::writeClient(const QCString& appName, const ClientInfo* cinfo)
/******************************************************************************
* Remove a client application's details from the config file.
*/
-void ADConfigData::removeClient(const QCString& appName)
+void ADConfigData::removeClient(const TQCString& appName)
{
KConfig* config = KGlobal::config();
- config->deleteGroup(CLIENT_GROUP + QString::fromLocal8Bit(appName));
+ config->deleteGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->sync();
}
/******************************************************************************
* Set the calendar file URL for a specified application.
*/
-void ADConfigData::setCalendar(const QCString& appName, ADCalendar* cal)
+void ADConfigData::setCalendar(const TQCString& appName, ADCalendar* cal)
{
KConfig* config = KGlobal::config();
- config->setGroup(CLIENT_GROUP + QString::fromLocal8Bit(appName));
+ config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->writePathEntry(CALENDAR_KEY, cal->urlString());
config->sync();
}
@@ -139,8 +139,8 @@ void ADConfigData::enableAutoStart(bool on)
kdDebug(5900) << "ADConfigData::enableAutoStart(" << on << ")\n";
KConfig* config = KGlobal::config();
config->reparseConfiguration();
- config->setGroup(QString::fromLatin1(DAEMON_AUTOSTART_SECTION));
- config->writeEntry(QString::fromLatin1(DAEMON_AUTOSTART_KEY), on);
+ config->setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ config->writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), on);
config->sync();
}
diff --git a/kalarm/kalarmd/adconfigdata.h b/kalarm/kalarmd/adconfigdata.h
index 2c841fdff..4b7dddbe1 100644
--- a/kalarm/kalarmd/adconfigdata.h
+++ b/kalarm/kalarmd/adconfigdata.h
@@ -32,9 +32,9 @@ class ADConfigData
{
public:
static void readConfig();
- static void writeClient(const QCString& appName, const ClientInfo*);
- static void removeClient(const QCString& appName);
- static void setCalendar(const QCString& appName, ADCalendar*);
+ static void writeClient(const TQCString& appName, const ClientInfo*);
+ static void removeClient(const TQCString& appName);
+ static void setCalendar(const TQCString& appName, ADCalendar*);
static void enableAutoStart(bool);
};
diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp
index 576678574..d8bcf83a2 100644
--- a/kalarm/kalarmd/alarmdaemon.cpp
+++ b/kalarm/kalarmd/alarmdaemon.cpp
@@ -24,9 +24,9 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -54,13 +54,13 @@ static const int KALARM_AUTOSTART_TIMEOUT = 30;
static const int SECS_PER_DAY = 3600 * 24;
// KAlarm config file keys
-static const QString START_OF_DAY(QString::fromLatin1("StartOfDay"));
-static const QString AUTOSTART_TRAY(QString::fromLatin1("AutostartTray"));
+static const TQString START_OF_DAY(TQString::fromLatin1("StartOfDay"));
+static const TQString AUTOSTART_TRAY(TQString::fromLatin1("AutostartTray"));
-AlarmDaemon::AlarmDaemon(bool autostart, QObject *parent, const char *name)
+AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name)
: DCOPObject(name),
- QObject(parent, name),
+ TQObject(parent, name),
mAlarmTimer(0)
{
kdDebug(5900) << "AlarmDaemon::AlarmDaemon()" << endl;
@@ -84,12 +84,12 @@ AlarmDaemon::AlarmDaemon(bool autostart, QObject *parent, const char *name)
* itself and instead will simply open a new window.
*/
KConfig kaconfig(locate("config", "kalarmrc"));
- kaconfig.setGroup(QString::fromLatin1("General"));
+ kaconfig.setGroup(TQString::fromLatin1("General"));
autostart = kaconfig.readBoolEntry(AUTOSTART_TRAY, false);
if (autostart)
{
kdDebug(5900) << "AlarmDaemon::AlarmDaemon(): wait to autostart KAlarm\n";
- QTimer::singleShot(KALARM_AUTOSTART_TIMEOUT * 1000, this, SLOT(autostartKAlarm()));
+ TQTimer::singleShot(KALARM_AUTOSTART_TIMEOUT * 1000, this, TQT_SLOT(autostartKAlarm()));
}
}
if (!autostart)
@@ -118,9 +118,9 @@ void AlarmDaemon::autostartKAlarm()
return; // KAlarm has already registered with us
}
kdDebug(5900) << "AlarmDaemon::autostartKAlarm(): starting KAlarm\n";
- QStringList args;
- args << QString::fromLatin1("--tray");
- int ret = KApplication::kdeinitExec(QString::fromLatin1("kalarm"), args);
+ TQStringList args;
+ args << TQString::fromLatin1("--tray");
+ int ret = KApplication::kdeinitExec(TQString::fromLatin1("kalarm"), args);
if (ret)
kdError(5900) << "AlarmDaemon::autostartKAlarm(): error=" << ret << endl;
else
@@ -136,8 +136,8 @@ void AlarmDaemon::autostartKAlarm()
void AlarmDaemon::startMonitoring()
{
// Set up the alarm timer
- mAlarmTimer = new QTimer(this);
- connect(mAlarmTimer, SIGNAL(timeout()), SLOT(checkAlarmsSlot()));
+ mAlarmTimer = new TQTimer(this);
+ connect(mAlarmTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarmsSlot()));
setTimerStatus();
// Start monitoring calendar files.
@@ -149,7 +149,7 @@ void AlarmDaemon::startMonitoring()
/******************************************************************************
* DCOP call to enable or disable monitoring of a calendar.
*/
-void AlarmDaemon::enableCal(const QString& urlString, bool enable)
+void AlarmDaemon::enableCal(const TQString& urlString, bool enable)
{
kdDebug(5900) << "AlarmDaemon::enableCal(" << urlString << ")" << endl;
ADCalendar* cal = ADCalendar::getCalendar(urlString);
@@ -163,7 +163,7 @@ void AlarmDaemon::enableCal(const QString& urlString, bool enable)
/******************************************************************************
* DCOP call to reload, and optionally reset, the specified calendar.
*/
-void AlarmDaemon::reloadCal(const QCString& appname, const QString& urlString, bool reset)
+void AlarmDaemon::reloadCal(const TQCString& appname, const TQString& urlString, bool reset)
{
kdDebug(5900) << "AlarmDaemon::reloadCal(" << urlString << ")" << endl;
ADCalendar* cal = ADCalendar::getCalendar(urlString);
@@ -185,7 +185,7 @@ void AlarmDaemon::reloadCal(ADCalendar* cal, bool reset)
{
cal->close();
if (!cal->setLoadedConnected())
- connect(cal, SIGNAL(loaded(ADCalendar*, bool)), SLOT(calendarLoaded(ADCalendar*, bool)));
+ connect(cal, TQT_SIGNAL(loaded(ADCalendar*, bool)), TQT_SLOT(calendarLoaded(ADCalendar*, bool)));
cal->loadFile(reset);
}
else if (reset)
@@ -205,9 +205,9 @@ void AlarmDaemon::calendarLoaded(ADCalendar* cal, bool success)
* DCOP call to notify the daemon that an event has been handled, and optionally
* to tell it to reload the calendar.
*/
-void AlarmDaemon::eventHandled(const QCString& appname, const QString& calendarUrl, const QString& eventID, bool reload)
+void AlarmDaemon::eventHandled(const TQCString& appname, const TQString& calendarUrl, const TQString& eventID, bool reload)
{
- QString urlString = expandURL(calendarUrl);
+ TQString urlString = expandURL(calendarUrl);
kdDebug(5900) << "AlarmDaemon::eventHandled(" << urlString << (reload ? "): reload" : ")") << endl;
ADCalendar* cal = ADCalendar::getCalendar(urlString);
if (!cal || cal->appName() != appname)
@@ -224,8 +224,8 @@ void AlarmDaemon::eventHandled(const QCString& appname, const QString& calendarU
* a hang if the daemon happens to send a notification to KAlarm at the
* same time as KAlarm calls this DCCOP method.
*/
-void AlarmDaemon::registerApp(const QCString& appName, const QString& appTitle,
- const QCString& dcopObject, const QString& calendarUrl,
+void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle,
+ const TQCString& dcopObject, const TQString& calendarUrl,
bool startClient)
{
kdDebug(5900) << "AlarmDaemon::registerApp(" << appName << ", " << appTitle << ", "
@@ -280,7 +280,7 @@ void AlarmDaemon::registerApp(const QCString& appName, const QString& appTitle,
* a hang if the daemon happens to send a notification to KAlarm at the
* same time as KAlarm calls this DCCOP method.
*/
-void AlarmDaemon::registerChange(const QCString& appName, bool startClient)
+void AlarmDaemon::registerChange(const TQCString& appName, bool startClient)
{
kdDebug(5900) << "AlarmDaemon::registerChange(" << appName << ", " << startClient << ")" << endl;
KAlarmd::RegisterResult result;
@@ -330,7 +330,7 @@ void AlarmDaemon::checkAlarmsSlot()
}
else if (--mAlarmTimerSyncCount <= 0)
{
- int interval = DAEMON_CHECK_INTERVAL + 1 - QTime::currentTime().second();
+ int interval = DAEMON_CHECK_INTERVAL + 1 - TQTime::currentTime().second();
if (interval < DAEMON_CHECK_INTERVAL - 1)
{
// Need to re-synch to 1 second past the minute
@@ -365,59 +365,59 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
if (!cal->loaded() || !cal->enabled())
return;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
kdDebug(5901) << " To: " << now.toString() << endl;
- QValueList<KCal::Alarm*> alarms = cal->alarmsTo(now);
+ TQValueList<KCal::Alarm*> alarms = cal->alarmsTo(now);
if (!alarms.count())
return;
- QValueList<KCal::Event*> eventsDone;
- for (QValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it)
+ TQValueList<KCal::Event*> eventsDone;
+ for (TQValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it)
{
KCal::Event* event = dynamic_cast<KCal::Event*>((*it)->parent());
if (!event || eventsDone.find(event) != eventsDone.end())
continue; // either not an event, or the event has already been processed
eventsDone += event;
- const QString& eventID = event->uid();
+ const TQString& eventID = event->uid();
kdDebug(5901) << "AlarmDaemon::checkAlarms(): event " << eventID << endl;
// Check which of the alarms for this event are due.
// The times in 'alarmtimes' corresponding to due alarms are set.
// The times for non-due alarms are set invalid in 'alarmtimes'.
bool recurs = event->doesRecur();
- const QStringList cats = event->categories();
- bool floats = (cats.find(QString::fromLatin1("DATE")) != cats.end());
- QDateTime nextDateTime = event->dtStart();
+ const TQStringList cats = event->categories();
+ bool floats = (cats.find(TQString::fromLatin1("DATE")) != cats.end());
+ TQDateTime nextDateTime = event->dtStart();
if (recurs)
{
- QString prop = event->customProperty("KALARM", "NEXTRECUR");
+ TQString prop = event->customProperty("KALARM", "NEXTRECUR");
if (prop.length() >= 8)
{
// The next due recurrence time is specified
- QDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
+ TQDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
if (d.isValid())
{
if (floats && prop.length() == 8)
nextDateTime = d;
- else if (!floats && prop.length() == 15 && prop[8] == QChar('T'))
+ else if (!floats && prop.length() == 15 && prop[8] == TQChar('T'))
{
- QTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
+ TQTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
if (t.isValid())
- nextDateTime = QDateTime(d, t);
+ nextDateTime = TQDateTime(d, t);
}
}
}
}
if (floats)
nextDateTime.setTime(mStartOfDay);
- QValueList<QDateTime> alarmtimes;
+ TQValueList<TQDateTime> alarmtimes;
KCal::Alarm::List alarms = event->alarms();
for (KCal::Alarm::List::ConstIterator al = alarms.begin(); al != alarms.end(); ++al)
{
KCal::Alarm* alarm = *al;
- QDateTime dt;
+ TQDateTime dt;
if (alarm->enabled())
{
- QDateTime dt1;
+ TQDateTime dt1;
if (!alarm->hasTime())
{
// Find the latest recurrence for the alarm.
@@ -429,7 +429,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
{
dt1 = nextDateTime.addSecs(floats ? (offset/SECS_PER_DAY)*SECS_PER_DAY : offset);
if (dt1 > now)
- dt1 = QDateTime();
+ dt1 = TQDateTime();
}
}
// Get latest due repetition, or the recurrence time if none
@@ -438,7 +438,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
{
int snoozeSecs = alarm->snoozeTime() * 60;
int offset = alarm->repeatCount() * snoozeSecs;
- QDateTime lastRepetition = nextDateTime.addSecs(floats ? (offset/SECS_PER_DAY)*SECS_PER_DAY : offset);
+ TQDateTime lastRepetition = nextDateTime.addSecs(floats ? (offset/SECS_PER_DAY)*SECS_PER_DAY : offset);
if (lastRepetition <= now)
dt = lastRepetition;
else
@@ -466,11 +466,11 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
* Send a DCOP message to KAlarm telling it that an alarm should now be handled.
* Reply = false if the event should be held pending until KAlarm can be started.
*/
-bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const QString& eventID)
+bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID)
{
if (!calendar)
return true;
- QCString appname = calendar->appName();
+ TQCString appname = calendar->appName();
const ClientInfo* client = ClientInfo::get(appname);
if (!client)
{
@@ -478,7 +478,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const QString& eventID)
return false;
}
kdDebug(5900) << "AlarmDaemon::notifyEvent(" << appname << ", " << eventID << "): notification type=" << client->startClient() << endl;
- QString id = QString::fromLatin1("ad:") + eventID; // prefix to indicate that the notification if from the daemon
+ TQString id = TQString::fromLatin1("ad:") + eventID; // prefix to indicate that the notification if from the daemon
// Check if the client application is running and ready to receive notification
bool registered = kapp->dcopClient()->isApplicationRegistered(static_cast<const char*>(appname));
@@ -504,7 +504,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const QString& eventID)
// Start KAlarm, using the command line to specify the alarm
KProcess p;
- QString cmd = locate("exe", appname);
+ TQString cmd = locate("exe", appname);
if (cmd.isEmpty())
{
kdDebug(5900) << "AlarmDaemon::notifyEvent(): '" << appname << "' not found" << endl;
@@ -553,7 +553,7 @@ void AlarmDaemon::setTimerStatus()
{
// Timeout every minute.
// But first synchronise to one second after the minute boundary.
- int firstInterval = DAEMON_CHECK_INTERVAL + 1 - QTime::currentTime().second();
+ int firstInterval = DAEMON_CHECK_INTERVAL + 1 - TQTime::currentTime().second();
mAlarmTimer->start(1000 * firstInterval);
mAlarmTimerSyncing = (firstInterval != DAEMON_CHECK_INTERVAL);
kdDebug(5900) << "Started alarm timer" << endl;
@@ -574,7 +574,7 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
ClientInfo* client = ClientInfo::get(cal);
if (!client)
return;
- QCString appname = client->appName();
+ TQCString appname = client->appName();
if (kapp->dcopClient()->isApplicationRegistered(static_cast<const char*>(appname)))
{
KAlarmd::CalendarStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED)
@@ -595,8 +595,8 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
void AlarmDaemon::readKAlarmConfig()
{
KConfig config(locate("config", "kalarmrc"));
- config.setGroup(QString::fromLatin1("General"));
- QDateTime defTime(QDate(1900,1,1), QTime());
+ config.setGroup(TQString::fromLatin1("General"));
+ TQDateTime defTime(TQDate(1900,1,1), TQTime());
mStartOfDay = config.readDateTimeEntry(START_OF_DAY, &defTime).time();
kdDebug(5900) << "AlarmDaemon::readKAlarmConfig()" << endl;
}
@@ -606,9 +606,9 @@ void AlarmDaemon::readKAlarmConfig()
* (We must store full URLs in the calendar data since otherwise later calls to
* reload or remove calendars won't necessarily find a match.)
*/
-QString AlarmDaemon::expandURL(const QString& urlString)
+TQString AlarmDaemon::expandURL(const TQString& urlString)
{
if (urlString.isEmpty())
- return QString();
+ return TQString();
return KURL(urlString).url();
}
diff --git a/kalarm/kalarmd/alarmdaemon.h b/kalarm/kalarmd/alarmdaemon.h
index 6ab5d0f9a..54e7980a2 100644
--- a/kalarm/kalarmd/alarmdaemon.h
+++ b/kalarm/kalarmd/alarmdaemon.h
@@ -29,11 +29,11 @@
class ADCalendar;
-class AlarmDaemon : public QObject, virtual public AlarmDaemonIface
+class AlarmDaemon : public TQObject, virtual public AlarmDaemonIface
{
Q_OBJECT
public:
- AlarmDaemon(bool autostart, QObject* parent = 0, const char* name = 0);
+ AlarmDaemon(bool autostart, TQObject* parent = 0, const char* name = 0);
private slots:
//#ifdef AUTOSTART_KALARM
@@ -46,34 +46,34 @@ class AlarmDaemon : public QObject, virtual public AlarmDaemonIface
private:
// DCOP interface
void enableAutoStart(bool enable);
- void enableCalendar(const QString& urlString, bool enable)
+ void enableCalendar(const TQString& urlString, bool enable)
{ enableCal(expandURL(urlString), enable); }
- void reloadCalendar(const QCString& appname, const QString& urlString)
+ void reloadCalendar(const TQCString& appname, const TQString& urlString)
{ reloadCal(appname, expandURL(urlString), false); }
- void resetCalendar(const QCString& appname, const QString& urlString)
+ void resetCalendar(const TQCString& appname, const TQString& urlString)
{ reloadCal(appname, expandURL(urlString), true); }
- void registerApp(const QCString& appName, const QString& appTitle, const QCString& dcopObject,
- const QString& calendarUrl, bool startClient);
- void registerChange(const QCString& appName, bool startClient);
- void eventHandled(const QCString& appname, const QString& calendarURL, const QString& eventID, bool reload);
+ void registerApp(const TQCString& appName, const TQString& appTitle, const TQCString& dcopObject,
+ const TQString& calendarUrl, bool startClient);
+ void registerChange(const TQCString& appName, bool startClient);
+ void eventHandled(const TQCString& appname, const TQString& calendarURL, const TQString& eventID, bool reload);
void timeConfigChanged() { readKAlarmConfig(); }
void quit();
// Other methods
void readKAlarmConfig();
void startMonitoring();
- void enableCal(const QString& urlString, bool enable);
- void reloadCal(const QCString& appname, const QString& urlString, bool reset);
+ void enableCal(const TQString& urlString, bool enable);
+ void reloadCal(const TQCString& appname, const TQString& urlString, bool reset);
void reloadCal(ADCalendar*, bool reset);
void checkAlarms(ADCalendar*);
- bool notifyEvent(ADCalendar*, const QString& eventID);
+ bool notifyEvent(ADCalendar*, const TQString& eventID);
void notifyCalStatus(const ADCalendar*);
void setTimerStatus();
- static QString expandURL(const QString& urlString);
+ static TQString expandURL(const TQString& urlString);
- QTimer* mAlarmTimer;
+ TQTimer* mAlarmTimer;
int mAlarmTimerSyncCount; // countdown to re-synching the alarm timer
bool mAlarmTimerSyncing; // true while alarm timer interval < 1 minute
- QTime mStartOfDay; // start of day for date-only alarms
+ TQTime mStartOfDay; // start of day for date-only alarms
};
#endif // ALARMDAEMON_H
diff --git a/kalarm/kalarmd/alarmdaemoniface.h b/kalarm/kalarmd/alarmdaemoniface.h
index 708f5b281..75723ce60 100644
--- a/kalarm/kalarmd/alarmdaemoniface.h
+++ b/kalarm/kalarmd/alarmdaemoniface.h
@@ -31,13 +31,13 @@ class AlarmDaemonIface : virtual public DCOPObject
K_DCOP
k_dcop:
virtual ASYNC enableAutoStart(bool enable) = 0;
- virtual ASYNC enableCalendar(const QString& urlString, bool enable) = 0;
- virtual ASYNC reloadCalendar(const QCString& appname, const QString& urlString) = 0;
- virtual ASYNC resetCalendar(const QCString& appname, const QString& urlString) = 0;
- virtual ASYNC registerApp(const QCString& appName, const QString& appTitle, const QCString& dcopObject,
- const QString& calendarUrl, bool startClient) = 0;
- virtual ASYNC registerChange(const QCString& appName, bool startClient) = 0;
- virtual ASYNC eventHandled(const QCString& appname, const QString& calendarURL, const QString& eventID, bool reload) = 0;
+ virtual ASYNC enableCalendar(const TQString& urlString, bool enable) = 0;
+ virtual ASYNC reloadCalendar(const TQCString& appname, const TQString& urlString) = 0;
+ virtual ASYNC resetCalendar(const TQCString& appname, const TQString& urlString) = 0;
+ virtual ASYNC registerApp(const TQCString& appName, const TQString& appTitle, const TQCString& dcopObject,
+ const TQString& calendarUrl, bool startClient) = 0;
+ virtual ASYNC registerChange(const TQCString& appName, bool startClient) = 0;
+ virtual ASYNC eventHandled(const TQCString& appname, const TQString& calendarURL, const TQString& eventID, bool reload) = 0;
virtual ASYNC timeConfigChanged() = 0;
virtual ASYNC quit() = 0;
};
diff --git a/kalarm/kalarmd/alarmguiiface.h b/kalarm/kalarmd/alarmguiiface.h
index 7e98c831d..d221fd345 100644
--- a/kalarm/kalarmd/alarmguiiface.h
+++ b/kalarm/kalarmd/alarmguiiface.h
@@ -55,11 +55,11 @@ class AlarmGuiIface : virtual public DCOPObject
/** Called to notify a change in status of the calendar.
@param calendarStatus new calendar status. Value is of type CalendarStatus.
*/
- virtual ASYNC alarmDaemonUpdate(int calendarStatus, const QString& calendarURL) = 0;
+ virtual ASYNC alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL) = 0;
/** Called to notify that an alarm is due.
*/
- virtual ASYNC handleEvent(const QString& calendarURL, const QString& eventID) = 0;
+ virtual ASYNC handleEvent(const TQString& calendarURL, const TQString& eventID) = 0;
/** Called to indicate success/failure of (re)register() call.
@param result success/failure code. Value is of type RegisterResult.
diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp
index 21889082e..e8c5ea6c7 100644
--- a/kalarm/kalarmd/clientinfo.cpp
+++ b/kalarm/kalarmd/clientinfo.cpp
@@ -21,11 +21,11 @@
#include "adcalendar.h"
#include "clientinfo.h"
-QMap<QCString, ClientInfo*> ClientInfo::mClients;
+TQMap<TQCString, ClientInfo*> ClientInfo::mClients;
-ClientInfo::ClientInfo(const QCString& appName, const QString& title,
- const QCString& dcopObj, const QString& calendar, bool startClient)
+ClientInfo::ClientInfo(const TQCString& appName, const TQString& title,
+ const TQCString& dcopObj, const TQString& calendar, bool startClient)
: mAppName(appName),
mTitle(title),
mDcopObject(dcopObj),
@@ -35,8 +35,8 @@ ClientInfo::ClientInfo(const QCString& appName, const QString& title,
mClients[mAppName] = this;
}
-ClientInfo::ClientInfo(const QCString& appName, const QString& title,
- const QCString& dcopObj, ADCalendar* calendar, bool startClient)
+ClientInfo::ClientInfo(const TQCString& appName, const TQString& title,
+ const TQCString& dcopObj, ADCalendar* calendar, bool startClient)
: mAppName(appName),
mTitle(title),
mDcopObject(dcopObj),
@@ -55,7 +55,7 @@ ClientInfo::~ClientInfo()
/******************************************************************************
* Set a new calendar for the specified client application.
*/
-ADCalendar* ClientInfo::setCalendar(const QString& url)
+ADCalendar* ClientInfo::setCalendar(const TQString& url)
{
if (url != mCalendar->urlString())
{
@@ -68,11 +68,11 @@ ADCalendar* ClientInfo::setCalendar(const QString& url)
/******************************************************************************
* Return the ClientInfo object for the specified client application.
*/
-ClientInfo* ClientInfo::get(const QCString& appName)
+ClientInfo* ClientInfo::get(const TQCString& appName)
{
if (appName.isEmpty())
return 0;
- QMap<QCString, ClientInfo*>::ConstIterator it = mClients.find(appName);
+ TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.find(appName);
if (it == mClients.end())
return 0;
return it.data();
@@ -94,7 +94,7 @@ ClientInfo* ClientInfo::get(const ADCalendar* cal)
*/
void ClientInfo::clear()
{
- QMap<QCString, ClientInfo*>::Iterator it;
+ TQMap<TQCString, ClientInfo*>::Iterator it;
while ((it = mClients.begin()) != mClients.end())
delete it.data();
}
@@ -102,9 +102,9 @@ void ClientInfo::clear()
/******************************************************************************
* Delete the client with the specified name.
*/
-void ClientInfo::remove(const QCString& appName)
+void ClientInfo::remove(const TQCString& appName)
{
- QMap<QCString, ClientInfo*>::Iterator it = mClients.find(appName);
+ TQMap<TQCString, ClientInfo*>::Iterator it = mClients.find(appName);
if (it != mClients.end())
delete it.data();
}
diff --git a/kalarm/kalarmd/clientinfo.h b/kalarm/kalarmd/clientinfo.h
index fe6491d7e..d679669ec 100644
--- a/kalarm/kalarmd/clientinfo.h
+++ b/kalarm/kalarmd/clientinfo.h
@@ -22,9 +22,9 @@
#ifndef _CALCLIENT_H
#define _CALCLIENT_H
-#include <qcstring.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqmap.h>
class ADCalendar;
@@ -36,35 +36,35 @@ class ADCalendar;
class ClientInfo
{
public:
- typedef QMap<QCString, ClientInfo*>::ConstIterator ConstIterator;
+ typedef TQMap<TQCString, ClientInfo*>::ConstIterator ConstIterator;
- ClientInfo(const QCString &appName, const QString &title, const QCString &dcopObj,
- const QString& calendar, bool startClient);
- ClientInfo(const QCString &appName, const QString &title, const QCString &dcopObj,
+ ClientInfo(const TQCString &appName, const TQString &title, const TQCString &dcopObj,
+ const TQString& calendar, bool startClient);
+ ClientInfo(const TQCString &appName, const TQString &title, const TQCString &dcopObj,
ADCalendar* calendar, bool startClient);
~ClientInfo();
- ADCalendar* setCalendar(const QString& url);
+ ADCalendar* setCalendar(const TQString& url);
void detachCalendar() { mCalendar = 0; }
void setStartClient(bool start) { mStartClient = start; }
- QCString appName() const { return mAppName; }
- QString title() const { return mTitle; }
- QCString dcopObject() const { return mDcopObject; }
+ TQCString appName() const { return mAppName; }
+ TQString title() const { return mTitle; }
+ TQCString dcopObject() const { return mDcopObject; }
ADCalendar* calendar() const { return mCalendar; }
bool startClient() const { return mStartClient; }
static ConstIterator begin() { return mClients.begin(); }
static ConstIterator end() { return mClients.end(); }
- static ClientInfo* get(const QCString& appName);
+ static ClientInfo* get(const TQCString& appName);
static ClientInfo* get(const ADCalendar*);
- static void remove(const QCString& appName);
+ static void remove(const TQCString& appName);
static void clear();
private:
- static QMap<QCString, ClientInfo*> mClients; // list of all constructed clients
- QCString mAppName; // client's executable and DCOP name
- QString mTitle; // application title for display purposes
- QCString mDcopObject; // object to receive DCOP messages
+ static TQMap<TQCString, ClientInfo*> mClients; // list of all constructed clients
+ TQCString mAppName; // client's executable and DCOP name
+ TQString mTitle; // application title for display purposes
+ TQCString mDcopObject; // object to receive DCOP messages
ADCalendar* mCalendar; // this client's event calendar
bool mStartClient; // whether to notify events via command line if client app isn't running
};
diff --git a/kalarm/kalarmiface.h b/kalarm/kalarmiface.h
index cd3aaf0cc..2654072ee 100644
--- a/kalarm/kalarmiface.h
+++ b/kalarm/kalarmiface.h
@@ -26,7 +26,7 @@
// No forward declarations - dcopidl2cpp won't work
#include <dcopobject.h>
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QString;
/** KAlarmIface provides a DCOP interface for other applications to request
@@ -88,7 +88,7 @@ class KAlarmIface : virtual public DCOPObject
* current calendar file.
* @param eventId - The unique ID of the event to be cancelled, as stored in the calendar file @p url.
*/
- virtual bool cancelEvent(const QString& url, const QString& eventId) = 0;
+ virtual bool cancelEvent(const TQString& url, const TQString& eventId) = 0;
/** Trigger the immediate display or execution of an alarm, regardless of what time it is scheduled for.
* @param url - The URL (not path) of the calendar file containing the event to be triggered.
@@ -96,22 +96,22 @@ class KAlarmIface : virtual public DCOPObject
* current calendar file.
* @param eventId - The unique ID of the event to be triggered, as stored in the calendar file @p url.
*/
- virtual bool triggerEvent(const QString& url, const QString& eventId) = 0;
+ virtual bool triggerEvent(const TQString& url, const TQString& eventId) = 0;
/** Schedule a message display alarm.
* @param message The text of the message to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param fgColor The foreground colour for the alarm message, or QString::null for the current
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param fgColor The foreground colour for the alarm message, or TQString::null for the current
* default foreground colour. The format of the string is the same as for @p bgColor.
- * @param font The font for the alarm message, or QString::null for the default message font
+ * @param font The font for the alarm message, or TQString::null for the default message font
* current at the time the message is displayed. The string should be in format
- * returned by QFont::toString().
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * returned by TQFont::toString().
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param recurrence Recurrence specification using iCalendar syntax (defined in RFC2445).
@@ -119,24 +119,24 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int repeatInterval, int repeatCount) = 0;
/** Schedule a message display alarm.
* @param message The text of the message to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param fgColor The foreground colour for the alarm message, or QString::null for the current
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param fgColor The foreground colour for the alarm message, or TQString::null for the current
* default foreground colour. The format of the string is the same as for @p bgColor.
- * @param font The font for the alarm message, or QString::null for the default message font
+ * @param font The font for the alarm message, or TQString::null for the default message font
* current at the time the message is displayed. The string should be in format
- * returned by QFont::toString().
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * returned by TQFont::toString().
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -146,8 +146,8 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule a message display alarm.
@@ -155,15 +155,15 @@ class KAlarmIface : virtual public DCOPObject
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param fgColor The foreground colour for the alarm message, or QString::null for the current
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param fgColor The foreground colour for the alarm message, or TQString::null for the current
* default foreground colour. The format of the string is the same as for @p bgColor.
- * @param font The font for the alarm message, or QString::null for the default message font
+ * @param font The font for the alarm message, or TQString::null for the default message font
* current at the time the message is displayed. The string should be in format
- * returned by QFont::toString().
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * returned by TQFont::toString().
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -173,20 +173,20 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Schedule a file display alarm.
* @param file The text or image file to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param recurrence Recurrence specification using iCalendar syntax (defined in RFC2445).
@@ -194,18 +194,18 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int repeatInterval, int repeatCount) = 0;
/** Schedule a file display alarm.
* @param file The text or image file to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -215,17 +215,17 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule a file display alarm.
* @param file The text or image file to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -235,9 +235,9 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Schedule a command execution alarm.
* @param commandLine The command line or command script to execute.
@@ -249,8 +249,8 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int repeatInterval, int repeatCount) = 0;
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int repeatInterval, int repeatCount) = 0;
/** Schedule a command execution alarm.
* @param commandLine The command line or command script to execute.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
@@ -263,7 +263,7 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule a command execution alarm.
* @param commandLine The command line or command script to execute.
@@ -277,11 +277,11 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Schedule an email alarm.
- * @param fromID The KMail identity to use as the sender of the email, or QString::null to use KAlarm's default sender ID.
+ * @param fromID The KMail identity to use as the sender of the email, or TQString::null to use KAlarm's default sender ID.
* @param addresses Comma-separated list of addresses to send the email to.
* @param subject Subject line of the email.
* @param message Email message's body text.
@@ -295,11 +295,11 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int repeatInterval, int repeatCount) = 0;
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int repeatInterval, int repeatCount) = 0;
/** Schedule an email alarm.
- * @param fromID The KMail identity to use as the sender of the email, or QString::null to use KAlarm's default sender ID.
+ * @param fromID The KMail identity to use as the sender of the email, or TQString::null to use KAlarm's default sender ID.
* @param addresses Comma-separated list of addresses to send the email to.
* @param subject Subject line of the email.
* @param message Email message's body text.
@@ -315,11 +315,11 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule an email alarm.
- * @param fromID The KMail identity to use as the sender of the email, or QString::null to use KAlarm's default sender ID.
+ * @param fromID The KMail identity to use as the sender of the email, or TQString::null to use KAlarm's default sender ID.
* @param addresses Comma-separated list of addresses to send the email to.
* @param subject Subject line of the email.
* @param message Email message's body text.
@@ -335,21 +335,21 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Open the alarm edit dialog to edit an existing alarm.
- * @param eventId The unique ID of the event to be edited, or QString::null to create a new alarm.
+ * @param eventId The unique ID of the event to be edited, or TQString::null to create a new alarm.
* @return false if the alarm could not be found or is read-only, true otherwise.
*/
- virtual bool edit(const QString& eventID) = 0;
+ virtual bool edit(const TQString& eventID) = 0;
/** Open the alarm edit dialog to edit a new alarm.
- * @param templateName Name of the alarm template to base the new alarm on, or QString::null if none.
+ * @param templateName Name of the alarm template to base the new alarm on, or TQString::null if none.
* If a template is specified but cannot be found, the alarm edit dialog is still
* opened but is (obviously) not preset with the template.
* @return false if an alarm template was specified but could not be found, true otherwise.
*/
- virtual bool editNew(const QString& templateName) = 0;
+ virtual bool editNew(const TQString& templateName) = 0;
};
#endif // KALARMIFACE_H
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp
index 3042a270f..18bb03945 100644
--- a/kalarm/kamail.cpp
+++ b/kalarm/kamail.cpp
@@ -27,8 +27,8 @@
#include <sys/time.h>
#include <pwd.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kstandarddirs.h>
#include <dcopclient.h>
@@ -63,29 +63,29 @@ namespace HeaderParsing
bool parseAddress( const char* & scursor, const char * const send,
KMime::Types::Address & result, bool isCRLF=false );
bool parseAddressList( const char* & scursor, const char * const send,
- QValueList<KMime::Types::Address> & result, bool isCRLF=false );
+ TQValueList<KMime::Types::Address> & result, bool isCRLF=false );
}
namespace
{
-QString getHostName();
+TQString getHostName();
}
struct KAMailData
{
- KAMailData(const KAEvent& e, const QString& fr, const QString& bc, bool allownotify)
+ KAMailData(const KAEvent& e, const TQString& fr, const TQString& bc, bool allownotify)
: event(e), from(fr), bcc(bc), allowNotify(allownotify) { }
const KAEvent& event;
- QString from;
- QString bcc;
+ TQString from;
+ TQString bcc;
bool allowNotify;
};
-QString KAMail::i18n_NeedFromEmailAddress()
+TQString KAMail::i18n_NeedFromEmailAddress()
{ return i18n("A 'From' email address must be configured in order to execute email alarms."); }
-QString KAMail::i18n_sent_mail()
+TQString KAMail::i18n_sent_mail()
{ return i18n("KMail folder name: this should be translated the same as in kmail", "sent-mail"); }
KPIM::IdentityManager* KAMail::mIdentityManager = 0;
@@ -102,10 +102,10 @@ KPIM::IdentityManager* KAMail::identityManager()
* Reply = true if the message was sent - 'errmsgs' may contain copy error messages.
* = false if the message was not sent - 'errmsgs' contains the error messages.
*/
-bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
+bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
{
- QString err;
- QString from;
+ TQString err;
+ TQString from;
KPIM::Identity identity;
if (!event.emailFromId())
from = Preferences::emailAddress();
@@ -144,7 +144,7 @@ bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
return false;
}
KAMailData data(event, from,
- (event.emailBcc() ? Preferences::emailBccAddress() : QString::null),
+ (event.emailBcc() ? Preferences::emailBccAddress() : TQString::null),
allowNotify);
kdDebug(5950) << "KAlarmApp::sendEmail(): To: " << event.emailAddresses(", ")
<< "\nSubject: " << event.emailSubject() << endl;
@@ -152,31 +152,31 @@ bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
if (Preferences::emailClient() == Preferences::SENDMAIL)
{
// Use sendmail to send the message
- QString textComplete;
- QString command = KStandardDirs::findExe(QString::fromLatin1("sendmail"),
- QString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
+ TQString textComplete;
+ TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"),
+ TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
if (!command.isNull())
{
- command += QString::fromLatin1(" -f ");
+ command += TQString::fromLatin1(" -f ");
command += KPIM::getEmailAddress(from);
- command += QString::fromLatin1(" -oi -t ");
+ command += TQString::fromLatin1(" -oi -t ");
textComplete = initHeaders(data, false);
}
else
{
- command = KStandardDirs::findExe(QString::fromLatin1("mail"));
+ command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
if (command.isNull())
{
- errmsgs = errors(i18n("%1 not found").arg(QString::fromLatin1("sendmail"))); // give up
+ errmsgs = errors(i18n("%1 not found").arg(TQString::fromLatin1("sendmail"))); // give up
return false;
}
- command += QString::fromLatin1(" -s ");
+ command += TQString::fromLatin1(" -s ");
command += KShellProcess::quote(event.emailSubject());
if (!data.bcc.isEmpty())
{
- command += QString::fromLatin1(" -b ");
+ command += TQString::fromLatin1(" -b ");
command += KShellProcess::quote(data.bcc);
}
@@ -233,29 +233,29 @@ bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
* Reply = reason for failure (which may be the empty string)
* = null string if success.
*/
-QString KAMail::sendKMail(const KAMailData& data)
+TQString KAMail::sendKMail(const KAMailData& data)
{
- QString err = KAlarm::runKMail(true);
+ TQString err = KAlarm::runKMail(true);
if (!err.isNull())
return err;
// KMail is now running. Determine which DCOP call to use.
bool useSend = false;
- QCString sendFunction = "sendMessage(QString,QString,QString,QString,QString,QString,KURL::List)";
+ TQCString sendFunction = "sendMessage(TQString,TQString,TQString,TQString,TQString,TQString,KURL::List)";
QCStringList funcs = kapp->dcopClient()->remoteFunctions("kmail", "MailTransportServiceIface");
for (QCStringList::Iterator it=funcs.begin(); it != funcs.end() && !useSend; ++it)
{
- QCString func = DCOPClient::normalizeFunctionSignature(*it);
+ TQCString func = DCOPClient::normalizeFunctionSignature(*it);
if (func.left(5) == "bool ")
{
func = func.mid(5);
- func.replace(QRegExp(" [0-9A-Za-z_:]+"), "");
+ func.replace(TQRegExp(" [0-9A-Za-z_:]+"), "");
useSend = (func == sendFunction);
}
}
- QByteArray callData;
- QDataStream arg(callData, IO_WriteOnly);
+ TQByteArray callData;
+ TQDataStream arg(callData, IO_WriteOnly);
kdDebug(5950) << "KAMail::sendKMail(): using " << (useSend ? "sendMessage()" : "dcopAddMessage()") << endl;
if (useSend)
{
@@ -281,7 +281,7 @@ QString KAMail::sendKMail(const KAMailData& data)
}
if (data.allowNotify)
notifyQueued(data.event);
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -289,14 +289,14 @@ QString KAMail::sendKMail(const KAMailData& data)
* Reply = reason for failure (which may be the empty string)
* = null string if success.
*/
-QString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bool checkKmailRunning)
+TQString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bool checkKmailRunning)
{
- QString err;
+ TQString err;
if (checkKmailRunning)
err = KAlarm::runKMail(true);
if (err.isNull())
{
- QString message = initHeaders(data, true);
+ TQString message = initHeaders(data, true);
err = appendBodyAttachments(message, data.event);
if (!err.isNull())
return err;
@@ -304,26 +304,26 @@ QString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, boo
// Write to a temporary file for feeding to KMail
KTempFile tmpFile;
tmpFile.setAutoDelete(true); // delete file when it is destructed
- QTextStream* stream = tmpFile.textStream();
+ TQTextStream* stream = tmpFile.textStream();
if (!stream)
{
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): Unable to open a temporary mail file" << endl;
- return QString("");
+ return TQString("");
}
*stream << message;
tmpFile.close();
if (tmpFile.status())
{
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): Error " << tmpFile.status() << " writing to temporary mail file" << endl;
- return QString("");
+ return TQString("");
}
// Notify KMail of the message in the temporary file
- QByteArray callData;
- QDataStream arg(callData, IO_WriteOnly);
- arg << QString::fromLatin1(folder) << tmpFile.name();
- if (callKMail(callData, "KMailIface", "dcopAddMessage(QString,QString)", "int"))
- return QString::null;
+ TQByteArray callData;
+ TQDataStream arg(callData, IO_WriteOnly);
+ arg << TQString::fromLatin1(folder) << tmpFile.name();
+ if (callKMail(callData, "KMailIface", "dcopAddMessage(TQString,TQString)", "int"))
+ return TQString::null;
err = i18n("Error calling KMail");
}
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): " << err << endl;
@@ -333,21 +333,21 @@ QString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, boo
/******************************************************************************
* Call KMail via DCOP. The DCOP function must return an 'int'.
*/
-bool KAMail::callKMail(const QByteArray& callData, const QCString& iface, const QCString& function, const QCString& funcType)
+bool KAMail::callKMail(const TQByteArray& callData, const TQCString& iface, const TQCString& function, const TQCString& funcType)
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (!kapp->dcopClient()->call("kmail", iface, function, callData, replyType, replyData)
|| replyType != funcType)
{
- QCString funcname = function;
- funcname.replace(QRegExp("(.+$"), "()");
+ TQCString funcname = function;
+ funcname.replace(TQRegExp("(.+$"), "()");
kdError(5950) << "KAMail::callKMail(): kmail " << funcname << " call failed\n";;
return false;
}
- QDataStream replyStream(replyData, IO_ReadOnly);
- QCString funcname = function;
- funcname.replace(QRegExp("(.+$"), "()");
+ TQDataStream replyStream(replyData, IO_ReadOnly);
+ TQCString funcname = function;
+ funcname.replace(TQRegExp("(.+$"), "()");
if (replyType == "int")
{
int result;
@@ -374,9 +374,9 @@ bool KAMail::callKMail(const QByteArray& callData, const QCString& iface, const
/******************************************************************************
* Create the headers part of the email.
*/
-QString KAMail::initHeaders(const KAMailData& data, bool dateId)
+TQString KAMail::initHeaders(const KAMailData& data, bool dateId)
{
- QString message;
+ TQString message;
if (dateId)
{
struct timeval tod;
@@ -384,17 +384,17 @@ QString KAMail::initHeaders(const KAMailData& data, bool dateId)
time_t timenow = tod.tv_sec;
char buff[64];
strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow));
- QString from = data.from;
- from.replace(QRegExp("^.*<"), QString::null).replace(QRegExp(">.*$"), QString::null);
- message = QString::fromLatin1(buff);
- message += QString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from);
+ TQString from = data.from;
+ from.replace(TQRegExp("^.*<"), TQString::null).replace(TQRegExp(">.*$"), TQString::null);
+ message = TQString::fromLatin1(buff);
+ message += TQString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from);
}
- message += QString::fromLatin1("From: ") + data.from;
- message += QString::fromLatin1("\nTo: ") + data.event.emailAddresses(", ");
+ message += TQString::fromLatin1("From: ") + data.from;
+ message += TQString::fromLatin1("\nTo: ") + data.event.emailAddresses(", ");
if (!data.bcc.isEmpty())
- message += QString::fromLatin1("\nBcc: ") + data.bcc;
- message += QString::fromLatin1("\nSubject: ") + data.event.emailSubject();
- message += QString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName());
+ message += TQString::fromLatin1("\nBcc: ") + data.bcc;
+ message += TQString::fromLatin1("\nSubject: ") + data.event.emailSubject();
+ message += TQString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName());
return message;
}
@@ -403,7 +403,7 @@ QString KAMail::initHeaders(const KAMailData& data, bool dateId)
* Reply = reason for error
* = 0 if successful.
*/
-QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
+TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
{
static const char* textMimeTypes[] = {
"application/x-sh", "application/x-csh", "application/x-shellscript",
@@ -411,7 +411,7 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
"application/x-perl", "application/x-desktop",
0
};
- QStringList attachments = event.emailAttachments();
+ TQStringList attachments = event.emailAttachments();
if (!attachments.count())
{
// There are no attachments, so simply append the message body
@@ -424,23 +424,23 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
// Create a boundary string
time_t timenow;
time(&timenow);
- QCString boundary;
+ TQCString boundary;
boundary.sprintf("------------_%lu_-%lx=", 2*timenow, timenow);
- message += QString::fromLatin1("\nMIME-Version: 1.0");
- message += QString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary);
+ message += TQString::fromLatin1("\nMIME-Version: 1.0");
+ message += TQString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary);
if (!event.message().isEmpty())
{
// There is a message body
- message += QString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary);
+ message += TQString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary);
message += event.message();
}
// Append each attachment in turn
- QString attachError = i18n("Error attaching file:\n%1");
- for (QStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at)
+ TQString attachError = i18n("Error attaching file:\n%1");
+ for (TQStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at)
{
- QString attachment = (*at).local8Bit();
+ TQString attachment = (*at).local8Bit();
KURL url(attachment);
url.cleanPath();
KIO::UDSEntry uds;
@@ -455,7 +455,7 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
}
// Check if the attachment is a text file
- QString mimeType = fi.mimetype();
+ TQString mimeType = fi.mimetype();
bool text = mimeType.startsWith("text/");
if (!text)
{
@@ -463,29 +463,29 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
text = (mimeType == textMimeTypes[i]);
}
- message += QString::fromLatin1("\n--%1").arg(boundary);
- message += QString::fromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text());
- message += QString::fromLatin1("\nContent-Transfer-Encoding: %1").arg(QString::fromLatin1(text ? "8bit" : "BASE64"));
- message += QString::fromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text());
+ message += TQString::fromLatin1("\n--%1").arg(boundary);
+ message += TQString::fromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text());
+ message += TQString::fromLatin1("\nContent-Transfer-Encoding: %1").arg(TQString::fromLatin1(text ? "8bit" : "BASE64"));
+ message += TQString::fromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text());
// Read the file contents
- QString tmpFile;
+ TQString tmpFile;
if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) {
kdError(5950) << "KAMail::appendBodyAttachments(): load failure: " << attachment << endl;
return attachError.arg(attachment);
}
- QFile file(tmpFile);
+ TQFile file(tmpFile);
if (!file.open(IO_ReadOnly) ) {
kdDebug(5950) << "KAMail::appendBodyAttachments() tmp load error: " << attachment << endl;
return attachError.arg(attachment);
}
- QIODevice::Offset size = file.size();
+ TQIODevice::Offset size = file.size();
char* contents = new char [size + 1];
Q_LONG bytes = file.readBlock(contents, size);
file.close();
contents[size] = 0;
bool atterror = false;
- if (bytes == -1 || (QIODevice::Offset)bytes < size) {
+ if (bytes == -1 || (TQIODevice::Offset)bytes < size) {
kdDebug(5950) << "KAMail::appendBodyAttachments() read error: " << attachment << endl;
atterror = true;
}
@@ -497,23 +497,23 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
else
{
// Convert the attachment to BASE64 encoding
- QIODevice::Offset base64Size;
+ TQIODevice::Offset base64Size;
char* base64 = base64Encode(contents, size, base64Size);
- if (base64Size == (QIODevice::Offset)-1) {
+ if (base64Size == (TQIODevice::Offset)-1) {
kdDebug(5950) << "KAMail::appendBodyAttachments() base64 buffer overflow: " << attachment << endl;
atterror = true;
}
else
- message += QString::fromLatin1(base64, base64Size);
+ message += TQString::fromLatin1(base64, base64Size);
delete[] base64;
}
delete[] contents;
if (atterror)
return attachError.arg(attachment);
}
- message += QString::fromLatin1("\n--%1--\n.\n").arg(boundary);
+ message += TQString::fromLatin1("\n--%1--\n.\n").arg(boundary);
}
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -523,23 +523,23 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
void KAMail::notifyQueued(const KAEvent& event)
{
KMime::Types::Address addr;
- QString localhost = QString::fromLatin1("localhost");
- QString hostname = getHostName();
+ TQString localhost = TQString::fromLatin1("localhost");
+ TQString hostname = getHostName();
const EmailAddressList& addresses = event.emailAddresses();
- for (QValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
+ for (TQValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
{
- QCString email = (*it).email().local8Bit();
+ TQCString email = (*it).email().local8Bit();
const char* em = email;
if (!email.isEmpty()
&& HeaderParsing::parseAddress(em, em + email.length(), addr))
{
- QString domain = addr.mailboxList.first().addrSpec.domain;
+ TQString domain = addr.mailboxList.first().addrSpec.domain;
if (!domain.isEmpty() && domain != localhost && domain != hostname)
{
- QString text = (Preferences::emailClient() == Preferences::KMAIL)
+ TQString text = (Preferences::emailClient() == Preferences::KMAIL)
? i18n("An email has been queued to be sent by KMail")
: i18n("An email has been queued to be sent");
- KMessageBox::information(0, text, QString::null, Preferences::EMAIL_QUEUED_NOTIFY);
+ KMessageBox::information(0, text, TQString::null, Preferences::EMAIL_QUEUED_NOTIFY);
return;
}
}
@@ -558,7 +558,7 @@ bool KAMail::identitiesExist()
/******************************************************************************
* Fetch the uoid of an email identity name or uoid string.
*/
-uint KAMail::identityUoid(const QString& identityUoidOrName)
+uint KAMail::identityUoid(const TQString& identityUoidOrName)
{
bool ok;
uint id = identityUoidOrName.toUInt(&ok);
@@ -581,7 +581,7 @@ uint KAMail::identityUoid(const QString& identityUoidOrName)
/******************************************************************************
* Fetch the user's email address configured in the KDE Control Centre.
*/
-QString KAMail::controlCentreAddress()
+TQString KAMail::controlCentreAddress()
{
KEMailSettings e;
return e.getSetting(KEMailSettings::EmailAddress);
@@ -592,26 +592,26 @@ QString KAMail::controlCentreAddress()
* entered by the user.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAddresses(const QString& items, EmailAddressList& list)
+TQString KAMail::convertAddresses(const TQString& items, EmailAddressList& list)
{
list.clear();
- QCString addrs = items.local8Bit();
+ TQCString addrs = items.local8Bit();
const char* ad = static_cast<const char*>(addrs);
// parse an address-list
- QValueList<KMime::Types::Address> maybeAddressList;
+ TQValueList<KMime::Types::Address> maybeAddressList;
if (!HeaderParsing::parseAddressList(ad, ad + addrs.length(), maybeAddressList))
- return QString::fromLocal8Bit(ad); // return the address in error
+ return TQString::fromLocal8Bit(ad); // return the address in error
// extract the mailboxes and complain if there are groups
- for (QValueList<KMime::Types::Address>::ConstIterator it = maybeAddressList.begin();
+ for (TQValueList<KMime::Types::Address>::ConstIterator it = maybeAddressList.begin();
it != maybeAddressList.end(); ++it)
{
- QString bad = convertAddress(*it, list);
+ TQString bad = convertAddress(*it, list);
if (!bad.isEmpty())
return bad;
}
- return QString::null;
+ return TQString::null;
}
#if 0
@@ -620,9 +620,9 @@ QString KAMail::convertAddresses(const QString& items, EmailAddressList& list)
* user, and append it to the specified list.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAddress(const QString& item, EmailAddressList& list)
+TQString KAMail::convertAddress(const TQString& item, EmailAddressList& list)
{
- QCString addr = item.local8Bit();
+ TQCString addr = item.local8Bit();
const char* ad = static_cast<const char*>(addr);
KMime::Types::Address maybeAddress;
if (!HeaderParsing::parseAddress(ad, ad + addr.length(), maybeAddress))
@@ -635,33 +635,33 @@ QString KAMail::convertAddress(const QString& item, EmailAddressList& list)
* Convert a single KMime::Types address to a KCal::Person instance and append
* it to the specified list.
*/
-QString KAMail::convertAddress(KMime::Types::Address addr, EmailAddressList& list)
+TQString KAMail::convertAddress(KMime::Types::Address addr, EmailAddressList& list)
{
if (!addr.displayName.isEmpty())
{
kdDebug(5950) << "mailbox groups not allowed! Name: \"" << addr.displayName << "\"" << endl;
return addr.displayName;
}
- const QValueList<KMime::Types::Mailbox>& mblist = addr.mailboxList;
- for (QValueList<KMime::Types::Mailbox>::ConstIterator mb = mblist.begin();
+ const TQValueList<KMime::Types::Mailbox>& mblist = addr.mailboxList;
+ for (TQValueList<KMime::Types::Mailbox>::ConstIterator mb = mblist.begin();
mb != mblist.end(); ++mb)
{
- QString addrPart = (*mb).addrSpec.localPart;
+ TQString addrPart = (*mb).addrSpec.localPart;
if (!(*mb).addrSpec.domain.isEmpty())
{
- addrPart += QChar('@');
+ addrPart += TQChar('@');
addrPart += (*mb).addrSpec.domain;
}
list += KCal::Person((*mb).displayName, addrPart);
}
- return QString::null;
+ return TQString::null;
}
/*
-QString KAMail::convertAddresses(const QString& items, QStringList& list)
+TQString KAMail::convertAddresses(const TQString& items, TQStringList& list)
{
EmailAddressList addrs;
- QString item = convertAddresses(items, addrs);
+ TQString item = convertAddresses(items, addrs);
if (!item.isEmpty())
return item;
for (EmailAddressList::Iterator ad = addrs.begin(); ad != addrs.end(); ++ad)
@@ -678,7 +678,7 @@ QString KAMail::convertAddresses(const QString& items, QStringList& list)
return item;
}
}
- return QString::null;
+ return TQString::null;
}*/
/******************************************************************************
@@ -687,7 +687,7 @@ QString KAMail::convertAddresses(const QString& items, QStringList& list)
* email address rules, only some basic checks are made.
* Reply = 1 if alright, 0 if empty, -1 if error.
*/
-int KAMail::checkAddress(QString& address)
+int KAMail::checkAddress(TQString& address)
{
address = address.stripWhiteSpace();
// Check that there are no list separator characters present
@@ -733,10 +733,10 @@ int KAMail::checkAddress(QString& address)
/******************************************************************************
* Convert a comma or semicolon delimited list of attachments into a
-* QStringList. The items are checked for validity.
+* TQStringList. The items are checked for validity.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAttachments(const QString& items, QStringList& list)
+TQString KAMail::convertAttachments(const TQString& items, TQStringList& list)
{
KURL url;
list.clear();
@@ -752,7 +752,7 @@ QString KAMail::convertAttachments(const QString& items, QStringList& list)
sc = items.length();
if (sc < i)
i = sc;
- QString item = items.mid(next, i - next).stripWhiteSpace();
+ TQString item = items.mid(next, i - next).stripWhiteSpace();
switch (checkAttachment(item))
{
case 1: list += item; break;
@@ -762,7 +762,7 @@ QString KAMail::convertAttachments(const QString& items, QStringList& list)
}
next = i + 1;
}
- return QString::null;
+ return TQString::null;
}
#if 0
@@ -771,11 +771,11 @@ QString KAMail::convertAttachments(const QString& items, QStringList& list)
* KURL::List. The items are checked for validity.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAttachments(const QString& items, KURL::List& list)
+TQString KAMail::convertAttachments(const TQString& items, KURL::List& list)
{
KURL url;
list.clear();
- QCString addrs = items.local8Bit();
+ TQCString addrs = items.local8Bit();
int length = items.length();
for (int next = 0; next < length; )
{
@@ -788,7 +788,7 @@ QString KAMail::convertAttachments(const QString& items, KURL::List& list)
sc = items.length();
if (sc < i)
i = sc;
- QString item = items.mid(next, i - next);
+ TQString item = items.mid(next, i - next);
switch (checkAttachment(item, &url))
{
case 1: list += url; break;
@@ -798,7 +798,7 @@ QString KAMail::convertAttachments(const QString& items, KURL::List& list)
}
next = i + 1;
}
- return QString::null;
+ return TQString::null;
}
#endif
@@ -809,7 +809,7 @@ QString KAMail::convertAttachments(const QString& items, KURL::List& list)
* = 0 if null name
* = -1 if doesn't exist.
*/
-int KAMail::checkAttachment(QString& attachment, KURL* url)
+int KAMail::checkAttachment(TQString& attachment, KURL* url)
{
attachment = attachment.stripWhiteSpace();
if (attachment.isEmpty())
@@ -847,7 +847,7 @@ bool KAMail::checkAttachment(const KURL& url)
* -1 if overflow.
* Reply = BASE64 buffer, which the caller must delete[] afterwards.
*/
-char* KAMail::base64Encode(const char* in, QIODevice::Offset size, QIODevice::Offset& outSize)
+char* KAMail::base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::Offset& outSize)
{
const int MAX_LINELEN = 72;
static unsigned char dtable[65] =
@@ -856,10 +856,10 @@ char* KAMail::base64Encode(const char* in, QIODevice::Offset size, QIODevice::Of
"0123456789+/";
char* out = new char [2*size + 5];
- outSize = (QIODevice::Offset)-1;
- QIODevice::Offset outIndex = 0;
+ outSize = (TQIODevice::Offset)-1;
+ TQIODevice::Offset outIndex = 0;
int lineLength = 0;
- for (QIODevice::Offset inIndex = 0; inIndex < size; )
+ for (TQIODevice::Offset inIndex = 0; inIndex < size; )
{
unsigned char igroup[3];
int n;
@@ -919,13 +919,13 @@ char* KAMail::base64Encode(const char* in, QIODevice::Offset size, QIODevice::Of
/******************************************************************************
* Set the appropriate error messages for a given error string.
*/
-QStringList KAMail::errors(const QString& err, bool sendfail)
+TQStringList KAMail::errors(const TQString& err, bool sendfail)
{
- QString error1 = sendfail ? i18n("Failed to send email")
+ TQString error1 = sendfail ? i18n("Failed to send email")
: i18n("Error copying sent email to KMail %1 folder").arg(i18n_sent_mail());
if (err.isEmpty())
- return QStringList(error1);
- QStringList errs(QString::fromLatin1("%1:").arg(error1));
+ return TQStringList(error1);
+ TQStringList errs(TQString::fromLatin1("%1:").arg(error1));
errs += err;
return errs;
}
@@ -933,20 +933,20 @@ QStringList KAMail::errors(const QString& err, bool sendfail)
/******************************************************************************
* Get the body of an email, given its serial number.
*/
-QString KAMail::getMailBody(Q_UINT32 serialNumber)
+TQString KAMail::getMailBody(Q_UINT32 serialNumber)
{
// Get the body of the email from KMail
- QCString replyType;
- QByteArray replyData;
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQCString replyType;
+ TQByteArray replyData;
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << serialNumber;
arg << (int)0;
- QString body;
+ TQString body;
if (kapp->dcopClient()->call("kmail", "KMailIface", "getDecodedBodyPart(Q_UINT32,int)", data, replyType, replyData)
- && replyType == "QString")
+ && replyType == "TQString")
{
- QDataStream reply_stream(replyData, IO_ReadOnly);
+ TQDataStream reply_stream(replyData, IO_ReadOnly);
reply_stream >> body;
}
else
@@ -959,12 +959,12 @@ namespace
/******************************************************************************
* Get the local system's host name.
*/
-QString getHostName()
+TQString getHostName()
{
char hname[256];
if (gethostname(hname, sizeof(hname)))
- return QString::null;
- return QString::fromLocal8Bit(hname);
+ return TQString::null;
+ return TQString::fromLocal8Bit(hname);
}
}
@@ -987,10 +987,10 @@ using namespace KMime::HeaderParsing;
* Allow a local user name to be specified as an email address.
*/
bool parseUserName( const char* & scursor, const char * const send,
- QString & result, bool isCRLF ) {
+ TQString & result, bool isCRLF ) {
- QString maybeLocalPart;
- QString tmp;
+ TQString maybeLocalPart;
+ TQString tmp;
if ( scursor != send ) {
// first, eat any whitespace
@@ -1005,7 +1005,7 @@ bool parseUserName( const char* & scursor, const char * const send,
default: // atom
scursor--; // re-set scursor to point to ch again
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseAtom( scursor, send, result, false /* no 8bit */ ) ) {
if (getpwnam(result.local8Bit()))
return true;
@@ -1033,7 +1033,7 @@ bool parseAddress( const char* & scursor, const char * const send,
const char * oldscursor = scursor;
if ( parseMailbox( scursor, send, maybeMailbox, isCRLF ) ) {
// yes, it is:
- result.displayName = QString::null;
+ result.displayName = TQString::null;
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1041,13 +1041,13 @@ bool parseAddress( const char* & scursor, const char * const send,
// KAlarm: Allow a local user name to be specified
// no, it's not a single mailbox. Try if it's a local user name:
- QString maybeUserName;
+ TQString maybeUserName;
if ( parseUserName( scursor, send, maybeUserName, isCRLF ) ) {
// yes, it is:
- maybeMailbox.displayName = QString::null;
+ maybeMailbox.displayName = TQString::null;
maybeMailbox.addrSpec.localPart = maybeUserName;
- maybeMailbox.addrSpec.domain = QString::null;
- result.displayName = QString::null;
+ maybeMailbox.addrSpec.domain = TQString::null;
+ result.displayName = TQString::null;
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1071,7 +1071,7 @@ bool parseAddress( const char* & scursor, const char * const send,
* Allow either ',' or ';' to be used as an email address separator.
*/
bool parseAddressList( const char* & scursor, const char * const send,
- QValueList<Address> & result, bool isCRLF ) {
+ TQValueList<Address> & result, bool isCRLF ) {
while ( scursor != send ) {
eatCFWS( scursor, send, isCRLF );
// end of header: this is OK.
diff --git a/kalarm/kamail.h b/kalarm/kamail.h
index 86c0482a5..3ef561506 100644
--- a/kalarm/kamail.h
+++ b/kalarm/kamail.h
@@ -21,8 +21,8 @@
#ifndef KAMAIL_H
#define KAMAIL_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KURL;
class KAEvent;
class EmailAddressList;
@@ -35,31 +35,31 @@ struct KAMailData;
class KAMail
{
public:
- static bool send(const KAEvent&, QStringList& errmsgs, bool allowNotify = true);
- static int checkAddress(QString& address);
- static int checkAttachment(QString& attachment, KURL* = 0);
+ static bool send(const KAEvent&, TQStringList& errmsgs, bool allowNotify = true);
+ static int checkAddress(TQString& address);
+ static int checkAttachment(TQString& attachment, KURL* = 0);
static bool checkAttachment(const KURL&);
- static QString convertAddresses(const QString& addresses, EmailAddressList&);
- static QString convertAttachments(const QString& attachments, QStringList& list);
+ static TQString convertAddresses(const TQString& addresses, EmailAddressList&);
+ static TQString convertAttachments(const TQString& attachments, TQStringList& list);
static KPIM::IdentityManager* identityManager();
static bool identitiesExist();
- static uint identityUoid(const QString& identityUoidOrName);
- static QString controlCentreAddress();
- static QString getMailBody(Q_UINT32 serialNumber);
- static QString i18n_NeedFromEmailAddress();
- static QString i18n_sent_mail();
+ static uint identityUoid(const TQString& identityUoidOrName);
+ static TQString controlCentreAddress();
+ static TQString getMailBody(Q_UINT32 serialNumber);
+ static TQString i18n_NeedFromEmailAddress();
+ static TQString i18n_sent_mail();
private:
static KPIM::IdentityManager* mIdentityManager; // KMail identity manager
- static QString sendKMail(const KAMailData&);
- static QString initHeaders(const KAMailData&, bool dateId);
- static QString appendBodyAttachments(QString& message, const KAEvent&);
- static QString addToKMailFolder(const KAMailData&, const char* folder, bool checkKmailRunning);
- static bool callKMail(const QByteArray& callData, const QCString& iface, const QCString& function, const QCString& funcType);
- static QString convertAddress(KMime::Types::Address, EmailAddressList&);
+ static TQString sendKMail(const KAMailData&);
+ static TQString initHeaders(const KAMailData&, bool dateId);
+ static TQString appendBodyAttachments(TQString& message, const KAEvent&);
+ static TQString addToKMailFolder(const KAMailData&, const char* folder, bool checkKmailRunning);
+ static bool callKMail(const TQByteArray& callData, const TQCString& iface, const TQCString& function, const TQCString& funcType);
+ static TQString convertAddress(KMime::Types::Address, EmailAddressList&);
static void notifyQueued(const KAEvent&);
- static char* base64Encode(const char* in, QIODevice::Offset size, QIODevice::Offset& outSize);
- static QStringList errors(const QString& error = QString::null, bool sendfail = true);
+ static char* base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::Offset& outSize);
+ static TQStringList errors(const TQString& error = TQString::null, bool sendfail = true);
};
#endif // KAMAIL_H
diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp
index 9461d71ec..8b7e9068f 100644
--- a/kalarm/karecurrence.cpp
+++ b/kalarm/karecurrence.cpp
@@ -20,7 +20,7 @@
#include "kalarm.h"
-#include <qbitarray.h>
+#include <tqbitarray.h>
#include <kdebug.h>
#include <libkcal/icalformat.h>
@@ -57,7 +57,7 @@ KARecurrence::Feb29Type KARecurrence::mDefaultFeb29 = KARecurrence::FEB29_FEB29;
* Only a restricted subset of recurrence types is allowed.
* Reply = true if successful.
*/
-bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateTime& start, const QDateTime& end)
+bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateTime& start, const TQDateTime& end)
{
mCachedType = -1;
RecurrenceRule::PeriodType rrtype;
@@ -78,7 +78,7 @@ bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateT
{
case WEEKLY:
{
- QBitArray days(7);
+ TQBitArray days(7);
days.setBit(start.date().dayOfWeek() - 1);
addWeeklyDays(days);
break;
@@ -101,7 +101,7 @@ bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateT
* Reply = true if successful.
*/
bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int count, int f29, const DateTime& start,
- const QDateTime& end)
+ const TQDateTime& end)
{
mCachedType = -1;
Feb29Type feb29Type = (f29 == -1) ? mDefaultFeb29 : static_cast<Feb29Type>(f29);
@@ -133,12 +133,12 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
setEndDate(end.date());
else
setEndDateTime(end);
- QDateTime startdt = start.dateTime();
+ TQDateTime startdt = start.dateTime();
if (recurType == RecurrenceRule::rYearly
&& feb29Type == FEB29_FEB28 || feb29Type == FEB29_MAR1)
{
int year = startdt.date().year();
- if (!QDate::leapYear(year)
+ if (!TQDate::leapYear(year)
&& startdt.date().dayOfYear() == (feb29Type == FEB29_MAR1 ? 60 : 59))
{
/* The event start date is February 28th or March 1st, but it
@@ -148,8 +148,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
* This is necessary because KARecurrence represents all types
* of 29th February recurrences by a simple 29th February.
*/
- while (!QDate::leapYear(--year)) ;
- startdt.setDate(QDate(year, 2, 29));
+ while (!TQDate::leapYear(--year)) ;
+ startdt.setDate(TQDate(year, 2, 29));
}
mFeb29Type = feb29Type;
}
@@ -163,9 +163,9 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
/******************************************************************************
* Initialise the recurrence from an iCalendar RRULE string.
*/
-bool KARecurrence::set(const QString& icalRRULE)
+bool KARecurrence::set(const TQString& icalRRULE)
{
- static QString RRULE = QString::fromLatin1("RRULE:");
+ static TQString RRULE = TQString::fromLatin1("RRULE:");
mCachedType = -1;
clear();
if (icalRRULE.isEmpty())
@@ -237,7 +237,7 @@ void KARecurrence::fix()
|| rrule->startDt() != rrules[0]->startDt())
break;
}
- QValueList<int> ds = rrule->byYearDays();
+ TQValueList<int> ds = rrule->byYearDays();
if (!ds.isEmpty() && ds.first() == 60)
{
++convert; // this rule needs to be converted
@@ -249,7 +249,7 @@ void KARecurrence::fix()
}
case rYearlyMonth:
{
- QValueList<int> ds = rrule->byMonthDays();
+ TQValueList<int> ds = rrule->byMonthDays();
if (!ds.isEmpty())
{
int day = ds.first();
@@ -271,7 +271,7 @@ void KARecurrence::fix()
if (day == -1)
{
// Last day of the month - only combine if it's February
- QValueList<int> months = rrule->byMonths();
+ TQValueList<int> months = rrule->byMonths();
if (months.count() != 1 || months.first() != 2)
day = 0;
}
@@ -301,9 +301,9 @@ void KARecurrence::fix()
delete *rr;
}
- QDate end;
+ TQDate end;
int count;
- QValueList<int> months;
+ TQValueList<int> months;
if (convert == 2)
{
// There are two yearly recurrence rules to combine into a February 29th recurrence.
@@ -344,7 +344,7 @@ void KARecurrence::fix()
RecurrenceRule* rrule = defaultRRule();
months.append(2);
rrule->setByMonths(months);
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(29);
rrule->setByMonthDays(ds);
if (count)
@@ -356,7 +356,7 @@ void KARecurrence::fix()
/******************************************************************************
* Get the next time the recurrence occurs, strictly after a specified time.
*/
-QDateTime KARecurrence::getNextDateTime(const QDateTime& preDateTime) const
+TQDateTime KARecurrence::getNextDateTime(const TQDateTime& preDateTime) const
{
switch (type())
{
@@ -375,7 +375,7 @@ QDateTime KARecurrence::getNextDateTime(const QDateTime& preDateTime) const
/******************************************************************************
* Get the previous time the recurrence occurred, strictly before a specified time.
*/
-QDateTime KARecurrence::getPreviousDateTime(const QDateTime& afterDateTime) const
+TQDateTime KARecurrence::getPreviousDateTime(const TQDateTime& afterDateTime) const
{
switch (type())
{
@@ -430,8 +430,8 @@ void KARecurrence::writeRecurrence(KCal::Recurrence& recur) const
break;
case ANNUAL_DATE:
{
- QValueList<int> months = rrule->byMonths();
- QValueList<int> days = monthDays();
+ TQValueList<int> months = rrule->byMonths();
+ TQValueList<int> days = monthDays();
bool special = (mFeb29Type != FEB29_FEB29 && !days.isEmpty()
&& days.first() == 29 && months.remove(2));
RecurrenceRule* rrule1 = recur.defaultRRule();
@@ -451,16 +451,16 @@ void KARecurrence::writeRecurrence(KCal::Recurrence& recur) const
rrule2->setEndDt(endDateTime());
if (mFeb29Type == FEB29_MAR1)
{
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(60);
rrule2->setByYearDays(ds);
}
else
{
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(-1);
rrule2->setByMonthDays(ds);
- QValueList<int> ms;
+ TQValueList<int> ms;
ms.append(2);
rrule2->setByMonths(ms);
}
@@ -492,7 +492,7 @@ void KARecurrence::writeRecurrence(KCal::Recurrence& recur) const
* all. In that case, retain it so that the February 29th characteristic
* is not lost should the user later change the recurrence count.
*/
- QDateTime end = endDateTime();
+ TQDateTime end = endDateTime();
kdDebug()<<"29th recurrence: count="<<count<<", end date="<<end.toString()<<endl;
int count1 = rrule1->durationTo(end)
- (rrule1->recursOn(startDate()) ? 0 : 1);
@@ -520,7 +520,7 @@ kdDebug()<<"29th recurrence: count="<<count<<", end date="<<end.toString()<<endl
/******************************************************************************
* Return the date/time of the last recurrence.
*/
-QDateTime KARecurrence::endDateTime() const
+TQDateTime KARecurrence::endDateTime() const
{
if (mFeb29Type == FEB29_FEB29 || duration() <= 1)
{
@@ -539,8 +539,8 @@ QDateTime KARecurrence::endDateTime() const
*/
RecurrenceRule* rrule = new RecurrenceRule();
rrule->setRecurrenceType(RecurrenceRule::rYearly);
- QDateTime dt = startDateTime();
- QDate d = dt.date();
+ TQDateTime dt = startDateTime();
+ TQDate d = dt.date();
switch (d.day())
{
case 29:
@@ -549,14 +549,14 @@ QDateTime KARecurrence::endDateTime() const
d.setYMD(d.year(), d.month(), 28);
break;
case 28:
- if (d.month() != 2 || mFeb29Type != FEB29_FEB28 || QDate::leapYear(d.year()))
+ if (d.month() != 2 || mFeb29Type != FEB29_FEB28 || TQDate::leapYear(d.year()))
{
// Start date is not a recurrence date, so shift it to 27th
d.setYMD(d.year(), d.month(), 27);
}
break;
case 1:
- if (d.month() == 3 && mFeb29Type == FEB29_MAR1 && !QDate::leapYear(d.year()))
+ if (d.month() == 3 && mFeb29Type == FEB29_MAR1 && !TQDate::leapYear(d.year()))
{
// Start date is a March 1st recurrence date, so shift
// start date to the temporary recurrence date of the 28th
@@ -571,7 +571,7 @@ QDateTime KARecurrence::endDateTime() const
rrule->setFloats(doesFloat());
rrule->setFrequency(frequency());
rrule->setDuration(duration());
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(28);
rrule->setByMonthDays(ds);
rrule->setByMonths(defaultRRuleConst()->byMonths());
@@ -580,7 +580,7 @@ QDateTime KARecurrence::endDateTime() const
// We've found the end date for a recurrence on the 28th. Unless that date
// is a real February 28th recurrence, adjust to the actual recurrence date.
- if (mFeb29Type == FEB29_FEB28 && dt.date().month() == 2 && !QDate::leapYear(dt.date().year()))
+ if (mFeb29Type == FEB29_FEB28 && dt.date().month() == 2 && !TQDate::leapYear(dt.date().year()))
return dt;
return dt.addDays(1);
}
@@ -588,17 +588,17 @@ QDateTime KARecurrence::endDateTime() const
/******************************************************************************
* Return the date/time of the last recurrence.
*/
-QDate KARecurrence::endDate() const
+TQDate KARecurrence::endDate() const
{
- QDateTime end = endDateTime();
- return end.isValid() ? end.date() : QDate();
+ TQDateTime end = endDateTime();
+ return end.isValid() ? end.date() : TQDate();
}
/******************************************************************************
* Return whether the event will recur on the specified date.
* The start date only returns true if it matches the recurrence rules.
*/
-bool KARecurrence::recursOn(const QDate& dt) const
+bool KARecurrence::recursOn(const TQDate& dt) const
{
if (!Recurrence::recursOn(dt))
return false;
@@ -623,7 +623,7 @@ bool KARecurrence::recursOn(const QDate& dt) const
* Find the duration of two RRULEs combined.
* Use the shorter of the two if they differ.
*/
-int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const RecurrenceRule* rrule2, QDate& end) const
+int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const RecurrenceRule* rrule2, TQDate& end) const
{
int count1 = rrule1->duration();
int count2 = rrule2->duration();
@@ -644,8 +644,8 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
if (!count1 || !count2)
count1 = count2 = 0;
// Get the two rules sorted by end date.
- QDateTime end1 = rrule1->endDt();
- QDateTime end2 = rrule2->endDt();
+ TQDateTime end1 = rrule1->endDt();
+ TQDateTime end2 = rrule2->endDt();
if (end1.date() == end2.date())
{
end = end1.date();
@@ -659,7 +659,7 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
// Swap the two rules to make rr1 have the earlier end date
rr1 = rrule2;
rr2 = rrule1;
- QDateTime e = end1;
+ TQDateTime e = end1;
end1 = end2;
end2 = e;
}
@@ -672,7 +672,7 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
// Get the date of the next occurrence after the end of the earlier ending rule
RecurrenceRule rr(*rr1);
rr.setDuration(-1);
- QDateTime next1(rr.getNextDate(end1).date());
+ TQDateTime next1(rr.getNextDate(end1).date());
if (!next1.isValid())
end = end1.date();
else
@@ -685,7 +685,7 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
end = end2.date();
return count1 + count2;
}
- QDate prev2 = rr2->getPreviousDate(next1).date();
+ TQDate prev2 = rr2->getPreviousDate(next1).date();
end = (prev2 > end1.date()) ? prev2 : end1.date();
}
if (count2)
@@ -707,14 +707,14 @@ int KARecurrence::longestInterval() const
case DAILY:
{
- QValueList<RecurrenceRule::WDayPos> days = defaultRRuleConst()->byDays();
+ TQValueList<RecurrenceRule::WDayPos> days = defaultRRuleConst()->byDays();
if (days.isEmpty())
return freq * 1440;
// It recurs only on certain days of the week, so the maximum interval
// may be greater than the frequency.
bool ds[7] = { false, false, false, false, false, false, false };
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
if ((*it).pos() == 0)
ds[(*it).day() - 1] = true;
if (freq % 7)
@@ -751,7 +751,7 @@ int KARecurrence::longestInterval() const
{
// Find which days of the week it recurs on, and if on more than
// one, reduce the maximum interval accordingly.
- QBitArray ds = days();
+ TQBitArray ds = days();
int first = -1;
int last = -1;
int maxgap = 1;
@@ -784,7 +784,7 @@ int KARecurrence::longestInterval() const
{
// Find which months of the year it recurs on, and if on more than
// one, reduce the maximum interval accordingly.
- const QValueList<int> months = yearMonths(); // month list is sorted
+ const TQValueList<int> months = yearMonths(); // month list is sorted
if (months.isEmpty())
break; // no months recur
if (months.count() == 1)
@@ -792,19 +792,19 @@ int KARecurrence::longestInterval() const
int first = -1;
int last = -1;
int maxgap = 0;
- for (QValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
+ for (TQValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
{
if (first < 0)
first = *it;
else
{
- int span = QDate(2001, last, 1).daysTo(QDate(2001, *it, 1));
+ int span = TQDate(2001, last, 1).daysTo(TQDate(2001, *it, 1));
if (span > maxgap)
maxgap = span;
}
last = *it;
}
- int span = QDate(2001, first, 1).daysTo(QDate(2001, last, 1));
+ int span = TQDate(2001, first, 1).daysTo(TQDate(2001, last, 1));
if (freq > 1)
return (freq*365 - span) * 1440;
if (365 - span > maxgap)
@@ -860,12 +860,12 @@ bool KARecurrence::dailyType(const RecurrenceRule* rrule)
|| !rrule->bySetPos().isEmpty()
|| !rrule->byYearDays().isEmpty())
return false;
- QValueList<RecurrenceRule::WDayPos> days = rrule->byDays();
+ TQValueList<RecurrenceRule::WDayPos> days = rrule->byDays();
if (days.isEmpty())
return true;
// Check that all the positions are zero (i.e. every time)
bool found = false;
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
{
if ((*it).pos() != 0)
return false;
diff --git a/kalarm/karecurrence.h b/kalarm/karecurrence.h
index ed0fc2fc9..f574cd59a 100644
--- a/kalarm/karecurrence.h
+++ b/kalarm/karecurrence.h
@@ -51,22 +51,22 @@ class KARecurrence : public KCal::Recurrence
KARecurrence() : KCal::Recurrence(), mFeb29Type(FEB29_FEB29), mCachedType(-1) { }
KARecurrence(const KCal::Recurrence& r) : KCal::Recurrence(r) { fix(); }
KARecurrence(const KARecurrence& r) : KCal::Recurrence(r), mFeb29Type(r.mFeb29Type), mCachedType(r.mCachedType) { }
- bool set(const QString& icalRRULE);
- bool set(Type t, int freq, int count, const DateTime& start, const QDateTime& end)
+ bool set(const TQString& icalRRULE);
+ bool set(Type t, int freq, int count, const DateTime& start, const TQDateTime& end)
{ return set(t, freq, count, -1, start, end); }
- bool set(Type t, int freq, int count, const DateTime& start, const QDateTime& end, Feb29Type f29)
+ bool set(Type t, int freq, int count, const DateTime& start, const TQDateTime& end, Feb29Type f29)
{ return set(t, freq, count, f29, start, end); }
- bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const QDateTime& end)
+ bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const TQDateTime& end)
{ return init(t, freq, count, -1, start, end); }
- bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const QDateTime& end, Feb29Type f29)
+ bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const TQDateTime& end, Feb29Type f29)
{ return init(t, freq, count, f29, start, end); }
void fix();
void writeRecurrence(KCal::Recurrence&) const;
- QDateTime endDateTime() const;
- QDate endDate() const;
- bool recursOn(const QDate&) const;
- QDateTime getNextDateTime(const QDateTime& preDateTime) const;
- QDateTime getPreviousDateTime(const QDateTime& afterDateTime) const;
+ TQDateTime endDateTime() const;
+ TQDate endDate() const;
+ bool recursOn(const TQDate&) const;
+ TQDateTime getNextDateTime(const TQDateTime& preDateTime) const;
+ TQDateTime getPreviousDateTime(const TQDateTime& afterDateTime) const;
int longestInterval() const;
Type type() const;
static Type type(const KCal::RecurrenceRule*);
@@ -76,10 +76,10 @@ class KARecurrence : public KCal::Recurrence
static void setDefaultFeb29Type(Feb29Type t) { mDefaultFeb29 = t; }
private:
- bool set(Type, int freq, int count, int feb29Type, const DateTime& start, const QDateTime& end);
- bool init(KCal::RecurrenceRule::PeriodType, int freq, int count, int feb29Type, const DateTime& start, const QDateTime& end);
- int combineDurations(const KCal::RecurrenceRule*, const KCal::RecurrenceRule*, QDate& end) const;
- int longestWeeklyInterval(const QBitArray& days, int frequency);
+ bool set(Type, int freq, int count, int feb29Type, const DateTime& start, const TQDateTime& end);
+ bool init(KCal::RecurrenceRule::PeriodType, int freq, int count, int feb29Type, const DateTime& start, const TQDateTime& end);
+ int combineDurations(const KCal::RecurrenceRule*, const KCal::RecurrenceRule*, TQDate& end) const;
+ int longestWeeklyInterval(const TQBitArray& days, int frequency);
static Feb29Type mDefaultFeb29;
Feb29Type mFeb29Type; // yearly recurrence on Feb 29th (leap years) / Mar 1st (non-leap years)
diff --git a/kalarm/latecancel.cpp b/kalarm/latecancel.cpp
index ed5563b1d..3c7fab3b2 100644
--- a/kalarm/latecancel.cpp
+++ b/kalarm/latecancel.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdialog.h>
@@ -32,55 +32,55 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString LateCancelSelector::i18n_CancelIfLate() { return i18n("Cancel if late"); }
-QString LateCancelSelector::i18n_n_CancelIfLate() { return i18n("Ca&ncel if late"); }
-QString LateCancelSelector::i18n_AutoCloseWin() { return i18n("Auto-close window after this time"); }
-QString LateCancelSelector::i18n_AutoCloseWinLC() { return i18n("Auto-close window after late-cancelation time"); }
-QString LateCancelSelector::i18n_i_AutoCloseWinLC() { return i18n("Auto-close w&indow after late-cancelation time"); }
+TQString LateCancelSelector::i18n_CancelIfLate() { return i18n("Cancel if late"); }
+TQString LateCancelSelector::i18n_n_CancelIfLate() { return i18n("Ca&ncel if late"); }
+TQString LateCancelSelector::i18n_AutoCloseWin() { return i18n("Auto-close window after this time"); }
+TQString LateCancelSelector::i18n_AutoCloseWinLC() { return i18n("Auto-close window after late-cancelation time"); }
+TQString LateCancelSelector::i18n_i_AutoCloseWinLC() { return i18n("Auto-close w&indow after late-cancelation time"); }
-LateCancelSelector::LateCancelSelector(bool allowHourMinute, QWidget* parent, const char* name)
- : QFrame(parent, name),
+LateCancelSelector::LateCancelSelector(bool allowHourMinute, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mDateOnly(false),
mReadOnly(false),
mAutoCloseShown(false)
{
- QString whatsThis = i18n("If checked, the alarm will be canceled if it cannot be triggered within the "
+ TQString whatsThis = i18n("If checked, the alarm will be canceled if it cannot be triggered within the "
"specified period after its scheduled time. Possible reasons for not triggering "
"include your being logged off, X not running, or the alarm daemon not running.\n\n"
"If unchecked, the alarm will be triggered at the first opportunity after "
"its scheduled time, regardless of how late it is.");
- setFrameStyle(QFrame::NoFrame);
- mLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ setFrameStyle(TQFrame::NoFrame);
+ mLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- mStack = new QWidgetStack(this);
- mCheckboxFrame = new QFrame(mStack);
- mCheckboxFrame->setFrameStyle(QFrame::NoFrame);
+ mStack = new TQWidgetStack(this);
+ mCheckboxFrame = new TQFrame(mStack);
+ mCheckboxFrame->setFrameStyle(TQFrame::NoFrame);
mStack->addWidget(mCheckboxFrame, 1);
- QBoxLayout* layout = new QVBoxLayout(mCheckboxFrame, 0, 0);
+ TQBoxLayout* layout = new TQVBoxLayout(mCheckboxFrame, 0, 0);
mCheckbox = new CheckBox(i18n_n_CancelIfLate(), mCheckboxFrame);
mCheckbox->setFixedSize(mCheckbox->sizeHint());
- connect(mCheckbox, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
- QWhatsThis::add(mCheckbox, whatsThis);
+ connect(mCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
+ TQWhatsThis::add(mCheckbox, whatsThis);
layout->addWidget(mCheckbox, 0, Qt::AlignAuto);
- mTimeSelectorFrame = new QFrame(mStack);
- mTimeSelectorFrame->setFrameStyle(QFrame::NoFrame);
+ mTimeSelectorFrame = new TQFrame(mStack);
+ mTimeSelectorFrame->setFrameStyle(TQFrame::NoFrame);
mStack->addWidget(mTimeSelectorFrame, 2);
- layout = new QVBoxLayout(mTimeSelectorFrame, 0, 0);
- mTimeSelector = new TimeSelector(i18n("Cancel if late by 10 minutes", "Ca&ncel if late by"), QString::null,
+ layout = new TQVBoxLayout(mTimeSelectorFrame, 0, 0);
+ mTimeSelector = new TimeSelector(i18n("Cancel if late by 10 minutes", "Ca&ncel if late by"), TQString::null,
whatsThis, i18n("Enter how late will cause the alarm to be canceled"),
allowHourMinute, mTimeSelectorFrame);
- connect(mTimeSelector, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
+ connect(mTimeSelector, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
layout->addWidget(mTimeSelector);
mLayout->addWidget(mStack);
- layout = new QHBoxLayout(mLayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(mLayout, KDialog::spacingHint());
layout->addSpacing(3*KDialog::spacingHint());
mAutoClose = new CheckBox(i18n_AutoCloseWin(), this);
mAutoClose->setFixedSize(mAutoClose->sizeHint());
- QWhatsThis::add(mAutoClose, i18n("Automatically close the alarm window after the expiry of the late-cancelation period"));
+ TQWhatsThis::add(mAutoClose, i18n("Automatically close the alarm window after the expiry of the late-cancelation period"));
layout->addWidget(mAutoClose);
layout->addStretch();
diff --git a/kalarm/latecancel.h b/kalarm/latecancel.h
index ccbc389b3..ff20866bd 100644
--- a/kalarm/latecancel.h
+++ b/kalarm/latecancel.h
@@ -21,7 +21,7 @@
#ifndef LATECANCEL_H
#define LATECANCEL_H
-#include <qframe.h>
+#include <tqframe.h>
#include "timeperiod.h"
#include "timeselector.h"
@@ -34,7 +34,7 @@ class LateCancelSelector : public QFrame
{
Q_OBJECT
public:
- LateCancelSelector(bool allowHourMinute, QWidget* parent, const char* name = 0);
+ LateCancelSelector(bool allowHourMinute, TQWidget* parent, const char* name = 0);
int minutes() const;
void setMinutes(int Minutes, bool dateOnly, TimePeriod::Units defaultUnits);
void setDateOnly(bool dateOnly);
@@ -44,21 +44,21 @@ class LateCancelSelector : public QFrame
bool isReadOnly() const { return mReadOnly; }
void setReadOnly(bool);
- static QString i18n_CancelIfLate(); // plain text of 'Cancel if late' checkbox
- static QString i18n_n_CancelIfLate(); // text of 'Cancel if late' checkbox, with 'N' shortcut
- static QString i18n_AutoCloseWin(); // plain text of 'Auto-close window after this time' checkbox
- static QString i18n_AutoCloseWinLC(); // plain text of 'Auto-close window after late-cancelation time' checkbox
- static QString i18n_i_AutoCloseWinLC(); // text of 'Auto-close window after late-cancelation time' checkbox, with 'I' shortcut
+ static TQString i18n_CancelIfLate(); // plain text of 'Cancel if late' checkbox
+ static TQString i18n_n_CancelIfLate(); // text of 'Cancel if late' checkbox, with 'N' shortcut
+ static TQString i18n_AutoCloseWin(); // plain text of 'Auto-close window after this time' checkbox
+ static TQString i18n_AutoCloseWinLC(); // plain text of 'Auto-close window after late-cancelation time' checkbox
+ static TQString i18n_i_AutoCloseWinLC(); // text of 'Auto-close window after late-cancelation time' checkbox, with 'I' shortcut
private slots:
void slotToggled(bool);
private:
- QBoxLayout* mLayout; // overall layout for the widget
- QWidgetStack* mStack; // contains mCheckboxFrame and mTimeSelectorFrame
- QFrame* mCheckboxFrame;
+ TQBoxLayout* mLayout; // overall layout for the widget
+ TQWidgetStack* mStack; // contains mCheckboxFrame and mTimeSelectorFrame
+ TQFrame* mCheckboxFrame;
CheckBox* mCheckbox; // displayed when late cancellation is not selected
- QFrame* mTimeSelectorFrame;
+ TQFrame* mTimeSelectorFrame;
TimeSelector* mTimeSelector; // displayed when late cancellation is selected
CheckBox* mAutoClose;
bool mDateOnly; // hours/minutes units not allowed
diff --git a/kalarm/lib/buttongroup.cpp b/kalarm/lib/buttongroup.cpp
index b448df48a..018640123 100644
--- a/kalarm/lib/buttongroup.cpp
+++ b/kalarm/lib/buttongroup.cpp
@@ -1,5 +1,5 @@
/*
- * buttongroup.cpp - QButtonGroup with an extra signal and KDE 2 compatibility
+ * buttongroup.cpp - TQButtonGroup with an extra signal and KDE 2 compatibility
* Program: kalarm
* Copyright (c) 2002, 2004 by David Jarvie <software@astrojar.org.uk>
*
@@ -19,45 +19,45 @@
*/
#include "kalarm.h"
-#include <qlayout.h>
-#include <qbutton.h>
+#include <tqlayout.h>
+#include <tqbutton.h>
#include <kdialog.h>
#include "buttongroup.moc"
-ButtonGroup::ButtonGroup(QWidget* parent, const char* name)
- : QButtonGroup(parent, name)
+ButtonGroup::ButtonGroup(TQWidget* parent, const char* name)
+ : TQButtonGroup(parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(const QString& title, QWidget* parent, const char* name)
- : QButtonGroup(title, parent, name)
+ButtonGroup::ButtonGroup(const TQString& title, TQWidget* parent, const char* name)
+ : TQButtonGroup(title, parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, QWidget* parent, const char* name)
- : QButtonGroup(strips, orient, parent, name)
+ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, TQWidget* parent, const char* name)
+ : TQButtonGroup(strips, orient, parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const QString& title, QWidget* parent, const char* name)
- : QButtonGroup(strips, orient, title, parent, name)
+ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* parent, const char* name)
+ : TQButtonGroup(strips, orient, title, parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
/******************************************************************************
* Inserts a button in the group.
* This should really be a virtual method...
*/
-int ButtonGroup::insert(QButton* button, int id)
+int ButtonGroup::insert(TQButton* button, int id)
{
- id = QButtonGroup::insert(button, id);
- connect(button, SIGNAL(toggled(bool)), SLOT(slotButtonToggled(bool)));
+ id = TQButtonGroup::insert(button, id);
+ connect(button, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotButtonToggled(bool)));
return id;
}
diff --git a/kalarm/lib/buttongroup.h b/kalarm/lib/buttongroup.h
index 1d647b420..8fbadae77 100644
--- a/kalarm/lib/buttongroup.h
+++ b/kalarm/lib/buttongroup.h
@@ -1,5 +1,5 @@
/*
- * buttongroup.h - QButtonGroup with an extra signal and Qt 2 compatibility
+ * buttongroup.h - TQButtonGroup with an extra signal and Qt 2 compatibility
* Program: kalarm
* Copyright © 2002,2004,2006 by David Jarvie <software@astrojar.org.uk>
*
@@ -20,17 +20,17 @@
#ifndef BUTTONGROUP_H
#define BUTTONGROUP_H
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
/**
- * @short A QButtonGroup with signal on new selection, plus Qt 2 compatibility.
+ * @short A TQButtonGroup with signal on new selection, plus Qt 2 compatibility.
*
- * The ButtonGroup class provides an enhanced version of the QButtonGroup class.
+ * The ButtonGroup class provides an enhanced version of the TQButtonGroup class.
*
* It emits an additional signal, buttonSet(int), whenever any of its buttons
* changes state, for whatever reason, including programmatic control. (The
- * QButtonGroup class only emits signals when buttons are clicked on by the user.)
+ * TQButtonGroup class only emits signals when buttons are clicked on by the user.)
* The class also provides Qt 2 compatibility.
*
* @author David Jarvie <software@astrojar.org.uk>
@@ -43,20 +43,20 @@ class ButtonGroup : public QButtonGroup
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit ButtonGroup(QWidget* parent, const char* name = 0);
+ explicit ButtonGroup(TQWidget* parent, const char* name = 0);
/** Constructor.
* @param title The title displayed for this button group.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(const QString& title, QWidget* parent, const char* name = 0);
+ ButtonGroup(const TQString& title, TQWidget* parent, const char* name = 0);
/** Constructor.
* @param strips The number of rows or columns of buttons.
* @param orient The orientation (Qt::Horizontal or Qt::Vertical) of the button group.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(int strips, Qt::Orientation orient, QWidget* parent, const char* name = 0);
+ ButtonGroup(int strips, Qt::Orientation orient, TQWidget* parent, const char* name = 0);
/** Constructor.
* @param strips The number of rows or columns of buttons.
* @param orient The orientation (Qt::Horizontal or Qt::Vertical) of the button group.
@@ -64,19 +64,19 @@ class ButtonGroup : public QButtonGroup
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(int strips, Qt::Orientation orient, const QString& title, QWidget* parent, const char* name = 0);
+ ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* parent, const char* name = 0);
/** Inserts a button in the group.
- * This overrides the insert() method of QButtonGroup, which should really be a virtual method...
+ * This overrides the insert() method of TQButtonGroup, which should really be a virtual method...
* @param button The button to insert.
* @param id The identifier for the button.
* @return The identifier of the inserted button.
*/
- int insert(QButton* button, int id = -1);
+ int insert(TQButton* button, int id = -1);
/** Sets the button with the specified identifier to be on. If this is an exclusive group,
* all other buttons in the group will be set off. The buttonSet() signal is emitted.
* @param id The identifier of the button to set on.
*/
- virtual void setButton(int id) { QButtonGroup::setButton(id); emit buttonSet(id); }
+ virtual void setButton(int id) { TQButtonGroup::setButton(id); emit buttonSet(id); }
private slots:
void slotButtonToggled(bool);
signals:
diff --git a/kalarm/lib/checkbox.cpp b/kalarm/lib/checkbox.cpp
index c600a4950..dde0d10ff 100644
--- a/kalarm/lib/checkbox.cpp
+++ b/kalarm/lib/checkbox.cpp
@@ -21,15 +21,15 @@
#include "checkbox.moc"
-CheckBox::CheckBox(QWidget* parent, const char* name)
- : QCheckBox(parent, name),
+CheckBox::CheckBox(TQWidget* parent, const char* name)
+ : TQCheckBox(parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
{ }
-CheckBox::CheckBox(const QString& text, QWidget* parent, const char* name)
- : QCheckBox(text, parent, name),
+CheckBox::CheckBox(const TQString& text, TQWidget* parent, const char* name)
+ : TQCheckBox(text, parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
@@ -44,7 +44,7 @@ void CheckBox::setReadOnly(bool ro)
if ((int)ro != (int)mReadOnly)
{
mReadOnly = ro;
- setFocusPolicy(ro ? QWidget::NoFocus : mFocusPolicy);
+ setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy);
if (ro)
clearFocus();
}
@@ -53,14 +53,14 @@ void CheckBox::setReadOnly(bool ro)
/******************************************************************************
* Specify a widget to receive focus when the checkbox is clicked on.
*/
-void CheckBox::setFocusWidget(QWidget* w, bool enable)
+void CheckBox::setFocusWidget(TQWidget* w, bool enable)
{
mFocusWidget = w;
mFocusWidgetEnable = enable;
if (w)
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()));
else
- disconnect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ disconnect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
}
/******************************************************************************
@@ -81,7 +81,7 @@ void CheckBox::slotClicked()
* Event handlers to intercept events if in read-only mode.
* Any events which could change the checkbox state are discarded.
*/
-void CheckBox::mousePressEvent(QMouseEvent* e)
+void CheckBox::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -89,10 +89,10 @@ void CheckBox::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QCheckBox::mousePressEvent(e);
+ TQCheckBox::mousePressEvent(e);
}
-void CheckBox::mouseReleaseEvent(QMouseEvent* e)
+void CheckBox::mouseReleaseEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -100,16 +100,16 @@ void CheckBox::mouseReleaseEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QCheckBox::mouseReleaseEvent(e);
+ TQCheckBox::mouseReleaseEvent(e);
}
-void CheckBox::mouseMoveEvent(QMouseEvent* e)
+void CheckBox::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QCheckBox::mouseMoveEvent(e);
+ TQCheckBox::mouseMoveEvent(e);
}
-void CheckBox::keyPressEvent(QKeyEvent* e)
+void CheckBox::keyPressEvent(TQKeyEvent* e)
{
if (mReadOnly)
switch (e->key())
@@ -123,11 +123,11 @@ void CheckBox::keyPressEvent(QKeyEvent* e)
default:
return;
}
- QCheckBox::keyPressEvent(e);
+ TQCheckBox::keyPressEvent(e);
}
-void CheckBox::keyReleaseEvent(QKeyEvent* e)
+void CheckBox::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QCheckBox::keyReleaseEvent(e);
+ TQCheckBox::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h
index 72ad4aee3..fc7f82cbd 100644
--- a/kalarm/lib/checkbox.h
+++ b/kalarm/lib/checkbox.h
@@ -21,13 +21,13 @@
#ifndef CHECKBOX_H
#define CHECKBOX_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
/**
- * @short A QCheckBox with focus widget and read-only options.
+ * @short A TQCheckBox with focus widget and read-only options.
*
- * The CheckBox class is a QCheckBox with the ability to transfer focus to another
+ * The CheckBox class is a TQCheckBox with the ability to transfer focus to another
* widget when checked, and with a read-only option.
*
* Another widget may be specified as the focus widget for the check box. Whenever
@@ -47,13 +47,13 @@ class CheckBox : public QCheckBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit CheckBox(QWidget* parent, const char* name = 0);
+ explicit CheckBox(TQWidget* parent, const char* name = 0);
/** Constructor.
* @param text Text to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- CheckBox(const QString& text, QWidget* parent, const char* name = 0);
+ CheckBox(const TQString& text, TQWidget* parent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the check box is read-only for the user. If read-only,
@@ -62,25 +62,25 @@ class CheckBox : public QCheckBox
*/
virtual void setReadOnly(bool readOnly);
/** Returns the widget which receives focus when the user selects the check box by clicking on it. */
- QWidget* focusWidget() const { return mFocusWidget; }
+ TQWidget* focusWidget() const { return mFocusWidget; }
/** Specifies a widget to receive focus when the user selects the check box by clicking on it.
* @param widget Widget to receive focus.
* @param enable If true, @p widget will be enabled before receiving focus. If
* false, the enabled state of @p widget will be left unchanged when
* the check box is clicked.
*/
- void setFocusWidget(QWidget* widget, bool enable = true);
+ void setFocusWidget(TQWidget* widget, bool enable = true);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
protected slots:
void slotClicked();
private:
- QWidget::FocusPolicy mFocusPolicy; // default focus policy for the QCheckBox
- QWidget* mFocusWidget; // widget to receive focus when button is clicked on
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QCheckBox
+ TQWidget* mFocusWidget; // widget to receive focus when button is clicked on
bool mFocusWidgetEnable; // enable focus widget before setting focus
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp
index d5fa052ac..9cf09ce13 100644
--- a/kalarm/lib/colourcombo.cpp
+++ b/kalarm/lib/colourcombo.cpp
@@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kcolordialog.h>
@@ -30,8 +30,8 @@
#include "colourcombo.moc"
-ColourCombo::ColourCombo(QWidget* parent, const char* name, const QColor& defaultColour)
- : QComboBox(parent, name),
+ColourCombo::ColourCombo(TQWidget* parent, const char* name, const TQColor& defaultColour)
+ : TQComboBox(parent, name),
mColourList(Preferences::messageColours()),
mSelectedColour(defaultColour),
mCustomColour(255, 255, 255),
@@ -39,12 +39,12 @@ ColourCombo::ColourCombo(QWidget* parent, const char* name, const QColor& defaul
mDisabled(false)
{
addColours();
- connect(this, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- connect(this, SIGNAL(highlighted(int)), SLOT(slotHighlighted(int)));
- Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPreferencesChanged()));
+ connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotHighlighted(int)));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPreferencesChanged()));
}
-void ColourCombo::setColour(const QColor& colour)
+void ColourCombo::setColour(const TQColor& colour)
{
mSelectedColour = colour;
addColours();
@@ -94,14 +94,14 @@ void ColourCombo::setEnabled(bool enable)
if (end > 1)
{
// Add a dialog background colour item
- QPixmap pm = *pixmap(1);
+ TQPixmap pm = *pixmap(1);
pm.fill(paletteBackgroundColor());
insertItem(pm);
setCurrentItem(end);
}
mDisabled = true;
}
- QComboBox::setEnabled(enable);
+ TQComboBox::setEnabled(enable);
}
void ColourCombo::slotActivated(int index)
@@ -110,9 +110,9 @@ void ColourCombo::slotActivated(int index)
mSelectedColour = mColourList[index - 1];
else
{
- if (KColorDialog::getColor(mCustomColour, this) == QDialog::Accepted)
+ if (KColorDialog::getColor(mCustomColour, this) == TQDialog::Accepted)
{
- QRect rect;
+ TQRect rect;
drawCustomItem(rect, false);
}
mSelectedColour = mCustomColour;
@@ -144,16 +144,16 @@ void ColourCombo::addColours()
break;
}
- QRect rect;
+ TQRect rect;
drawCustomItem(rect, true);
- QPainter painter;
- QPixmap pixmap(rect.width(), rect.height());
+ TQPainter painter;
+ TQPixmap pixmap(rect.width(), rect.height());
int i = 1;
for (ColourList::const_iterator it = mColourList.begin(); it != mColourList.end(); ++i, ++it)
{
painter.begin(&pixmap);
- QBrush brush(*it);
+ TQBrush brush(*it);
painter.fillRect(rect, brush);
painter.end();
@@ -165,21 +165,21 @@ void ColourCombo::addColours()
}
}
-void ColourCombo::drawCustomItem(QRect& rect, bool insert)
+void ColourCombo::drawCustomItem(TQRect& rect, bool insert)
{
- QPen pen;
+ TQPen pen;
if (qGray(mCustomColour.rgb()) < 128)
pen.setColor(Qt::white);
else
pen.setColor(Qt::black);
- QPainter painter;
- QFontMetrics fm = QFontMetrics(painter.font());
+ TQPainter painter;
+ TQFontMetrics fm = TQFontMetrics(painter.font());
rect.setRect(0, 0, width(), fm.height() + 4);
- QPixmap pixmap(rect.width(), rect.height());
+ TQPixmap pixmap(rect.width(), rect.height());
painter.begin(&pixmap);
- QBrush brush(mCustomColour);
+ TQBrush brush(mCustomColour);
painter.fillRect(rect, brush);
painter.setPen(pen);
painter.drawText(2, fm.ascent() + 2, i18n("Custom..."));
@@ -197,13 +197,13 @@ void ColourCombo::setReadOnly(bool ro)
mReadOnly = ro;
}
-void ColourCombo::resizeEvent(QResizeEvent* re)
+void ColourCombo::resizeEvent(TQResizeEvent* re)
{
- QComboBox::resizeEvent(re);
+ TQComboBox::resizeEvent(re);
addColours();
}
-void ColourCombo::mousePressEvent(QMouseEvent* e)
+void ColourCombo::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -211,29 +211,29 @@ void ColourCombo::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QComboBox::mousePressEvent(e);
+ TQComboBox::mousePressEvent(e);
}
-void ColourCombo::mouseReleaseEvent(QMouseEvent* e)
+void ColourCombo::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseReleaseEvent(e);
+ TQComboBox::mouseReleaseEvent(e);
}
-void ColourCombo::mouseMoveEvent(QMouseEvent* e)
+void ColourCombo::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseMoveEvent(e);
+ TQComboBox::mouseMoveEvent(e);
}
-void ColourCombo::keyPressEvent(QKeyEvent* e)
+void ColourCombo::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
- QComboBox::keyPressEvent(e);
+ TQComboBox::keyPressEvent(e);
}
-void ColourCombo::keyReleaseEvent(QKeyEvent* e)
+void ColourCombo::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QComboBox::keyReleaseEvent(e);
+ TQComboBox::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/colourcombo.h b/kalarm/lib/colourcombo.h
index f3e4ebca6..b05f78823 100644
--- a/kalarm/lib/colourcombo.h
+++ b/kalarm/lib/colourcombo.h
@@ -21,7 +21,7 @@
#ifndef COLOURCOMBO_H
#define COLOURCOMBO_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "colourlist.h"
@@ -43,22 +43,22 @@
class ColourCombo : public QComboBox
{
Q_OBJECT
- Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(TQColor color READ color WRITE setColor)
public:
/** Constructor.
* @param parent The parent object of this widget.
* @param name The name of this widget.
* @param defaultColour The colour which is selected by default.
*/
- explicit ColourCombo(QWidget* parent = 0, const char* name = 0, const QColor& defaultColour = 0xFFFFFF);
+ explicit ColourCombo(TQWidget* parent = 0, const char* name = 0, const TQColor& defaultColour = 0xFFFFFF);
/** Returns the selected colour. */
- QColor color() const { return mSelectedColour; }
+ TQColor color() const { return mSelectedColour; }
/** Returns the selected colour. */
- QColor colour() const { return mSelectedColour; }
+ TQColor colour() const { return mSelectedColour; }
/** Sets the selected colour to @p c. */
- void setColor(const QColor& c) { setColour(c); }
+ void setColor(const TQColor& c) { setColour(c); }
/** Sets the selected colour to @p c. */
- void setColour(const QColor& c);
+ void setColour(const TQColor& c);
/** Initialises the list of colours to @p list. */
void setColours(const ColourList& list);
/** Returns true if the first entry in the list, i.e. the custom colour, is selected. */
@@ -71,30 +71,30 @@ class ColourCombo : public QComboBox
virtual void setReadOnly(bool readOnly);
signals:
/** Signal emitted when a new colour has been selected. */
- void activated(const QColor&); // a new colour box has been selected
+ void activated(const TQColor&); // a new colour box has been selected
/** Signal emitted when a new colour has been highlighted. */
- void highlighted(const QColor&); // a new item has been highlighted
+ void highlighted(const TQColor&); // a new item has been highlighted
public slots:
/** Enables or disables the widget. */
virtual void setEnabled(bool enabled);
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private slots:
void slotActivated(int index);
void slotHighlighted(int index);
void slotPreferencesChanged();
private:
void addColours();
- void drawCustomItem(QRect&, bool insert);
+ void drawCustomItem(TQRect&, bool insert);
ColourList mColourList; // the sorted colours to display
- QColor mSelectedColour; // currently selected colour
- QColor mCustomColour; // current colour of the Custom item
+ TQColor mSelectedColour; // currently selected colour
+ TQColor mCustomColour; // current colour of the Custom item
bool mReadOnly; // value cannot be changed
bool mDisabled;
};
diff --git a/kalarm/lib/colourlist.cpp b/kalarm/lib/colourlist.cpp
index e02a64466..93886b5fa 100644
--- a/kalarm/lib/colourlist.cpp
+++ b/kalarm/lib/colourlist.cpp
@@ -21,16 +21,16 @@
#include "colourlist.h"
-ColourList::ColourList(const QColor* colours)
+ColourList::ColourList(const TQColor* colours)
{
while (colours->isValid())
mList.append((*colours++).rgb());
}
-void ColourList::insert(const QColor& colour)
+void ColourList::insert(const TQColor& colour)
{
QRgb rgb = colour.rgb();
- for (QValueListIterator<QRgb> it = mList.begin(); it != mList.end(); ++it)
+ for (TQValueListIterator<QRgb> it = mList.begin(); it != mList.end(); ++it)
{
if (rgb <= *it)
{
diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h
index ef641c04a..a20a44d6a 100644
--- a/kalarm/lib/colourlist.h
+++ b/kalarm/lib/colourlist.h
@@ -21,9 +21,9 @@
#ifndef COLOURLIST_H
#define COLOURLIST_H
-#include <qtl.h>
-#include <qcolor.h>
-#include <qvaluelist.h>
+#include <tqtl.h>
+#include <tqcolor.h>
+#include <tqvaluelist.h>
/**
@@ -31,8 +31,8 @@
*
* The ColourList class holds a list of colours, sorted in RGB value order.
*
- * It provides a sorted QValueList of colours in RGB value order, with iterators
- * and other access methods which return either QRgb or QColor objects.
+ * It provides a sorted TQValueList of colours in RGB value order, with iterators
+ * and other access methods which return either QRgb or TQColor objects.
*
* @author David Jarvie <software@astrojar.org.uk>
*/
@@ -40,30 +40,30 @@ class ColourList
{
public:
typedef size_t size_type;
- typedef QValueListConstIterator<QRgb> const_iterator;
+ typedef TQValueListConstIterator<QRgb> const_iterator;
/** Constructs an empty list. */
ColourList() { }
/** Copy constructor. */
ColourList(const ColourList& l) : mList(l.mList) { }
/** Constructs a list whose values are preset to the colours in @p list. */
- ColourList(const QValueList<QRgb>& list) : mList(list) { qHeapSort(mList); }
+ ColourList(const TQValueList<QRgb>& list) : mList(list) { qHeapSort(mList); }
/** Constructs a list whose values are preset to the colours in the @p list.
* Terminate @p list by an invalid colour.
*/
- ColourList(const QColor* list);
+ ColourList(const TQColor* list);
/** Assignment operator. */
ColourList& operator=(const ColourList& l) { mList = l.mList; return *this; }
/** Sets the list to comprise the colours in @p list. */
- ColourList& operator=(const QValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; }
+ ColourList& operator=(const TQValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; }
/** Removes all values from the list. */
void clear() { mList.clear(); }
/** Adds the specified colour @p c to the list. */
- void insert(const QColor& c);
+ void insert(const TQColor& c);
/** Removes the colour @p c from the list. */
- void remove(const QColor& c) { mList.remove(c.rgb()); }
+ void remove(const TQColor& c) { mList.remove(c.rgb()); }
/** Adds the specified colour @p c to the list. */
- ColourList& operator+=(const QColor& c) { insert(c); return *this; }
+ ColourList& operator+=(const TQColor& c) { insert(c); return *this; }
/** Adds the colours in @p list to this list. */
ColourList& operator+=(const ColourList& list) { mList += list.mList; qHeapSort(mList); return *this; }
/** Returns true if the colours in the two lists are the same. */
@@ -83,28 +83,28 @@ class ColourList
/** Returns an iterator pointing to the colour at position @p i in the list. */
const_iterator at(size_type i) const { return mList.at(i); }
/** Returns true if the list contains the colour @p c. */
- size_type contains(const QColor& c) const { return mList.contains(c.rgb()); }
+ size_type contains(const TQColor& c) const { return mList.contains(c.rgb()); }
/** Returns an iterator pointing to the first occurrence of colour @p c in the list.
* Returns end() if colour @p c is not in the list.
*/
- const_iterator find(const QColor& c) const { return mList.find(c.rgb()); }
+ const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); }
/** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting.
* from position @p it. Returns end() if colour @p c is not in the list.
*/
- const_iterator find(const_iterator it, const QColor& c) const { return mList.find(it, c.rgb()); }
+ const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); }
/** Returns the index to the first occurrence of colour @p c in the list.
* Returns -1 if colour @p c is not in the list.
*/
- int findIndex(const QColor& c) const { return mList.findIndex(c.rgb()); }
+ int findIndex(const TQColor& c) const { return mList.findIndex(c.rgb()); }
/** Returns the first colour in the list. If the list is empty, the result is undefined. */
- QColor first() const { return QColor(mList.first()); }
+ TQColor first() const { return TQColor(mList.first()); }
/** Returns the last colour in the list. If the list is empty, the result is undefined. */
- QColor last() const { return QColor(mList.last()); }
+ TQColor last() const { return TQColor(mList.last()); }
/** Returns the colour at position @p i in the list. If the item does not exist, the result is undefined. */
- QColor operator[](size_type i) const { return QColor(mList[i]); }
+ TQColor operator[](size_type i) const { return TQColor(mList[i]); }
private:
void sort();
- QValueList<QRgb> mList;
+ TQValueList<QRgb> mList;
};
#endif // COLOURLIST_H
diff --git a/kalarm/lib/combobox.cpp b/kalarm/lib/combobox.cpp
index 7e0bea4bd..bb232ffe5 100644
--- a/kalarm/lib/combobox.cpp
+++ b/kalarm/lib/combobox.cpp
@@ -18,17 +18,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "combobox.moc"
-ComboBox::ComboBox(QWidget* parent, const char* name)
- : QComboBox(parent, name),
+ComboBox::ComboBox(TQWidget* parent, const char* name)
+ : TQComboBox(parent, name),
mReadOnly(false)
{ }
-ComboBox::ComboBox(bool rw, QWidget* parent, const char* name)
- : QComboBox(rw, parent, name),
+ComboBox::ComboBox(bool rw, TQWidget* parent, const char* name)
+ : TQComboBox(rw, parent, name),
mReadOnly(false)
{ }
@@ -42,7 +42,7 @@ void ComboBox::setReadOnly(bool ro)
}
}
-void ComboBox::mousePressEvent(QMouseEvent* e)
+void ComboBox::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -50,29 +50,29 @@ void ComboBox::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QComboBox::mousePressEvent(e);
+ TQComboBox::mousePressEvent(e);
}
-void ComboBox::mouseReleaseEvent(QMouseEvent* e)
+void ComboBox::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseReleaseEvent(e);
+ TQComboBox::mouseReleaseEvent(e);
}
-void ComboBox::mouseMoveEvent(QMouseEvent* e)
+void ComboBox::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseMoveEvent(e);
+ TQComboBox::mouseMoveEvent(e);
}
-void ComboBox::keyPressEvent(QKeyEvent* e)
+void ComboBox::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
- QComboBox::keyPressEvent(e);
+ TQComboBox::keyPressEvent(e);
}
-void ComboBox::keyReleaseEvent(QKeyEvent* e)
+void ComboBox::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QComboBox::keyReleaseEvent(e);
+ TQComboBox::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/combobox.h b/kalarm/lib/combobox.h
index d33ac147e..3f33a63db 100644
--- a/kalarm/lib/combobox.h
+++ b/kalarm/lib/combobox.h
@@ -21,13 +21,13 @@
#ifndef COMBOBOX_H
#define COMBOBOX_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
/**
- * @short A QComboBox with read-only option.
+ * @short A TQComboBox with read-only option.
*
- * The ComboBox class is a QComboBox with a read-only option.
+ * The ComboBox class is a TQComboBox with a read-only option.
*
* The widget may be set as read-only. This has the same effect as disabling it, except
* that its appearance is unchanged.
@@ -42,13 +42,13 @@ class ComboBox : public QComboBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit ComboBox(QWidget* parent = 0, const char* name = 0);
+ explicit ComboBox(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param rw True for a read-write combo box, false for a read-only combo box.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit ComboBox(bool rw, QWidget* parent = 0, const char* name = 0);
+ explicit ComboBox(bool rw, TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the combo box is read-only for the user. If read-only,
@@ -57,11 +57,11 @@ class ComboBox : public QComboBox
*/
virtual void setReadOnly(bool readOnly);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/dateedit.cpp b/kalarm/lib/dateedit.cpp
index 71553d704..2fef25de5 100644
--- a/kalarm/lib/dateedit.cpp
+++ b/kalarm/lib/dateedit.cpp
@@ -25,13 +25,13 @@
#include "dateedit.moc"
-DateEdit::DateEdit(QWidget* parent, const char* name)
+DateEdit::DateEdit(TQWidget* parent, const char* name)
: KDateEdit(parent, name)
{
- connect(this, SIGNAL(dateEntered(const QDate&)), SLOT(newDateEntered(const QDate&)));
+ connect(this, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(newDateEntered(const TQDate&)));
}
-void DateEdit::setMinDate(const QDate& d, const QString& errorDate)
+void DateEdit::setMinDate(const TQDate& d, const TQString& errorDate)
{
mMinDate = d;
if (mMinDate.isValid() && date().isValid() && date() < mMinDate)
@@ -39,7 +39,7 @@ void DateEdit::setMinDate(const QDate& d, const QString& errorDate)
mMinDateErrString = errorDate;
}
-void DateEdit::setMaxDate(const QDate& d, const QString& errorDate)
+void DateEdit::setMaxDate(const TQDate& d, const TQString& errorDate)
{
mMaxDate = d;
if (mMaxDate.isValid() && date().isValid() && date() > mMaxDate)
@@ -49,11 +49,11 @@ void DateEdit::setMaxDate(const QDate& d, const QString& errorDate)
void DateEdit::setInvalid()
{
- setDate(QDate());
+ setDate(TQDate());
}
// Check a new date against any minimum or maximum date.
-void DateEdit::newDateEntered(const QDate& newDate)
+void DateEdit::newDateEntered(const TQDate& newDate)
{
if (newDate.isValid())
{
@@ -72,12 +72,12 @@ void DateEdit::newDateEntered(const QDate& newDate)
}
}
-void DateEdit::pastLimitMessage(const QDate& limit, const QString& error, const QString& defaultError)
+void DateEdit::pastLimitMessage(const TQDate& limit, const TQString& error, const TQString& defaultError)
{
- QString errString = error;
+ TQString errString = error;
if (errString.isNull())
{
- if (limit == QDate::currentDate())
+ if (limit == TQDate::currentDate())
errString = i18n("today");
else
errString = KGlobal::locale()->formatDate(limit, true);
@@ -86,7 +86,7 @@ void DateEdit::pastLimitMessage(const QDate& limit, const QString& error, const
KMessageBox::sorry(this, errString);
}
-void DateEdit::mousePressEvent(QMouseEvent *e)
+void DateEdit::mousePressEvent(TQMouseEvent *e)
{
if (isReadOnly())
{
@@ -97,25 +97,25 @@ void DateEdit::mousePressEvent(QMouseEvent *e)
KDateEdit::mousePressEvent(e);
}
-void DateEdit::mouseReleaseEvent(QMouseEvent* e)
+void DateEdit::mouseReleaseEvent(TQMouseEvent* e)
{
if (!isReadOnly())
KDateEdit::mouseReleaseEvent(e);
}
-void DateEdit::mouseMoveEvent(QMouseEvent* e)
+void DateEdit::mouseMoveEvent(TQMouseEvent* e)
{
if (!isReadOnly())
KDateEdit::mouseMoveEvent(e);
}
-void DateEdit::keyPressEvent(QKeyEvent* e)
+void DateEdit::keyPressEvent(TQKeyEvent* e)
{
if (!isReadOnly())
KDateEdit::keyPressEvent(e);
}
-void DateEdit::keyReleaseEvent(QKeyEvent* e)
+void DateEdit::keyReleaseEvent(TQKeyEvent* e)
{
if (!isReadOnly())
KDateEdit::keyReleaseEvent(e);
diff --git a/kalarm/lib/dateedit.h b/kalarm/lib/dateedit.h
index 031a96741..c7c015785 100644
--- a/kalarm/lib/dateedit.h
+++ b/kalarm/lib/dateedit.h
@@ -42,49 +42,49 @@ class DateEdit : public KDateEdit
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit DateEdit(QWidget* parent = 0, const char* name = 0);
+ explicit DateEdit(TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget contains a valid date. */
bool isValid() const { return date().isValid(); }
/** Returns the earliest date which can be entered.
* If there is no minimum date, returns an invalid date.
*/
- const QDate& minDate() const { return mMinDate; }
+ const TQDate& minDate() const { return mMinDate; }
/** Returns the latest date which can be entered.
* If there is no maximum date, returns an invalid date.
*/
- const QDate& maxDate() const { return mMaxDate; }
+ const TQDate& maxDate() const { return mMaxDate; }
/** Sets the earliest date which can be entered.
* @param date Earliest date allowed. If invalid, any minimum limit is removed.
* @param errorDate Error message to be displayed when a date earlier than
- * @p date is entered. Set to QString::null to use the default error message.
+ * @p date is entered. Set to TQString::null to use the default error message.
*/
- void setMinDate(const QDate& date, const QString& errorDate = QString::null);
+ void setMinDate(const TQDate& date, const TQString& errorDate = TQString::null);
/** Sets the latest date which can be entered.
* @param date Latest date allowed. If invalid, any maximum limit is removed.
* @param errorDate Error message to be displayed when a date later than
- * @p date is entered. Set to QString::null to use the default error message.
+ * @p date is entered. Set to TQString::null to use the default error message.
*/
- void setMaxDate(const QDate& date, const QString& errorDate = QString::null);
+ void setMaxDate(const TQDate& date, const TQString& errorDate = TQString::null);
/** Sets the date held in the widget to an invalid date. */
void setInvalid();
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private slots:
- void newDateEntered(const QDate&);
+ void newDateEntered(const TQDate&);
private:
- void pastLimitMessage(const QDate& limit, const QString& error, const QString& defaultError);
+ void pastLimitMessage(const TQDate& limit, const TQString& error, const TQString& defaultError);
- QDate mMinDate; // minimum allowed date, or invalid for no minimum
- QDate mMaxDate; // maximum allowed date, or invalid for no maximum
- QString mMinDateErrString; // error message when entered date < mMinDate
- QString mMaxDateErrString; // error message when entered date > mMaxDate
+ TQDate mMinDate; // minimum allowed date, or invalid for no minimum
+ TQDate mMaxDate; // maximum allowed date, or invalid for no maximum
+ TQString mMinDateErrString; // error message when entered date < mMinDate
+ TQString mMaxDateErrString; // error message when entered date > mMaxDate
};
#endif // DATEEDIT_H
diff --git a/kalarm/lib/datetime.cpp b/kalarm/lib/datetime.cpp
index d7f5ee862..3ebaccd30 100644
--- a/kalarm/lib/datetime.cpp
+++ b/kalarm/lib/datetime.cpp
@@ -24,26 +24,26 @@
#include "datetime.h"
-QTime DateTime::mStartOfDay;
+TQTime DateTime::mStartOfDay;
-QTime DateTime::time() const
+TQTime DateTime::time() const
{
return mDateOnly ? mStartOfDay : mDateTime.time();
}
-QDateTime DateTime::dateTime() const
+TQDateTime DateTime::dateTime() const
{
- return mDateOnly ? QDateTime(mDateTime.date(), mStartOfDay) : mDateTime;
+ return mDateOnly ? TQDateTime(mDateTime.date(), mStartOfDay) : mDateTime;
}
-QString DateTime::formatLocale(bool shortFormat) const
+TQString DateTime::formatLocale(bool shortFormat) const
{
if (mDateOnly)
return KGlobal::locale()->formatDate(mDateTime.date(), shortFormat);
else if (mTimeValid)
return KGlobal::locale()->formatDateTime(mDateTime, shortFormat);
else
- return QString::null;
+ return TQString::null;
}
bool operator==(const DateTime& dt1, const DateTime& dt2)
@@ -73,7 +73,7 @@ bool operator<(const DateTime& dt1, const DateTime& dt2)
return false;
if (!dt1.mDateOnly && !dt2.mDateOnly)
return dt1.mDateTime.time() < dt2.mDateTime.time();
- QTime t = DateTime::startOfDay();
+ TQTime t = DateTime::startOfDay();
if (dt1.mDateOnly)
return t < dt2.mDateTime.time();
return dt1.mDateTime.time() < t;
diff --git a/kalarm/lib/datetime.h b/kalarm/lib/datetime.h
index 3b0831918..eb40d6b5c 100644
--- a/kalarm/lib/datetime.h
+++ b/kalarm/lib/datetime.h
@@ -20,15 +20,15 @@
#ifndef DATETIME_H
#define DATETIME_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
/**
- * @short A QDateTime with date-only option.
+ * @short A TQDateTime with date-only option.
*
* The DateTime class holds a date, with or without a time.
*
- * DateTime is very similar to the QDateTime class, with the additional option to
+ * DateTime is very similar to the TQDateTime class, with the additional option to
* hold a date-only value. This allows a single date-time representation to be used
* for both an event having a specific date and time, and an all-day event.
*
@@ -44,17 +44,17 @@ class DateTime
*/
DateTime() : mDateOnly(false), mTimeValid(false) { }
/** Constructor for a date-only value. */
- DateTime(const QDate& d) : mDateTime(d), mDateOnly(true) { }
+ DateTime(const TQDate& d) : mDateTime(d), mDateOnly(true) { }
/** Constructor for a date-time value. */
- DateTime(const QDate& d, const QTime& t)
+ DateTime(const TQDate& d, const TQTime& t)
: mDateTime(d, t), mDateOnly(false), mTimeValid(true) { }
/** Constructor for a date-time or date-only value.
* @param dt the date and time to use.
* @param dateOnly True to construct a date-only value; false to construct a date-time value.
*/
- DateTime(const QDateTime& dt, bool dateOnly = false)
+ DateTime(const TQDateTime& dt, bool dateOnly = false)
: mDateTime(dt), mDateOnly(dateOnly), mTimeValid(true)
- { if (dateOnly) mDateTime.setTime(QTime()); }
+ { if (dateOnly) mDateTime.setTime(TQTime()); }
/** Assignment operator.
* Sets the value to a specified date-time or date-only value.
*/
@@ -63,13 +63,13 @@ class DateTime
/** Assignment operator.
* Sets the value to a specified date-time.
*/
- DateTime& operator=(const QDateTime& dt)
+ DateTime& operator=(const TQDateTime& dt)
{ mDateTime = dt; mDateOnly = false; mTimeValid = true; return *this; }
/** Assignment operator.
* Sets the value to a specified date-only value.
*/
- DateTime& operator=(const QDate& d)
- { mDateTime.setDate(d); mDateTime.setTime(QTime()); mDateOnly = true; return *this; }
+ DateTime& operator=(const TQDate& d)
+ { mDateTime.setDate(d); mDateTime.setTime(TQTime()); mDateOnly = true; return *this; }
/** Returns true if the date is null and, if it is a date-time value, the time is also null. */
bool isNull() const { return mDateTime.date().isNull() && (mDateOnly || mDateTime.time().isNull()); }
/** Returns true if the date is valid and, if it is a date-time value, the time is also valid. */
@@ -79,44 +79,44 @@ class DateTime
/** Sets the value to be either date-only or date-time.
* @param d True to set the value to be date-only; false to set it to a date-time value.
*/
- void setDateOnly(bool d) { if (d) mDateTime.setTime(QTime());
+ void setDateOnly(bool d) { if (d) mDateTime.setTime(TQTime());
else if (mDateOnly) mTimeValid = false;
mDateOnly = d;
}
/** Returns the date part of the value. */
- QDate date() const { return mDateTime.date(); }
+ TQDate date() const { return mDateTime.date(); }
/** Returns the time part of the value.
* If the value is date-only, the time returned is the start-of-day time set by setStartOfDay().
*/
- QTime time() const;
+ TQTime time() const;
/** Returns the date and time of the value.
* If the value is date-only, the time part returned is equal to the start-of-day time set
* by setStartOfDay().
*/
- QDateTime dateTime() const;
+ TQDateTime dateTime() const;
/** Returns the date and time of the value.
* if the value is date-only, the time part returned is 00:00:00.
*/
- QDateTime rawDateTime() const { return mDateTime; }
+ TQDateTime rawDateTime() const { return mDateTime; }
/** Sets a date-time or date-only value.
* @param dt the date-time to use.
* @param dateOnly True to set a date-only value; false to set a date-time value.
*/
- void set(const QDateTime& dt, bool dateOnly = false)
+ void set(const TQDateTime& dt, bool dateOnly = false)
{
mDateTime = dt;
mDateOnly = dateOnly;
if (dateOnly)
- mDateTime.setTime(QTime());
+ mDateTime.setTime(TQTime());
mTimeValid = true;
}
/** Sets a date-time value. */
- void set(const QDate& d, const QTime& t)
+ void set(const TQDate& d, const TQTime& t)
{ mDateTime.setDate(d); mDateTime.setTime(t); mDateOnly = false; mTimeValid = true; }
/** Sets the time component of the value.
* The value is converted if necessary to be a date-time value.
*/
- void setTime(const QTime& t) { mDateTime.setTime(t); mDateOnly = false; mTimeValid = true; }
+ void setTime(const TQTime& t) { mDateTime.setTime(t); mDateOnly = false; mTimeValid = true; }
/** Sets the value to a specified date-time value.
* @param secs The time_t date-time value, expressed as the number of seconds elapsed
* since 1970-01-01 00:00:00 UTC.
@@ -169,46 +169,46 @@ class DateTime
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- QString toString(Qt::DateFormat f = Qt::TextDate) const
+ TQString toString(Qt::DateFormat f = Qt::TextDate) const
{
if (mDateOnly)
return mDateTime.date().toString(f);
else if (mTimeValid)
return mDateTime.toString(f);
else
- return QString::null;
+ return TQString::null;
}
/** Returns the value as a string.
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- QString toString(const QString& format) const
+ TQString toString(const TQString& format) const
{
if (mDateOnly)
return mDateTime.date().toString(format);
else if (mTimeValid)
return mDateTime.toString(format);
else
- return QString::null;
+ return TQString::null;
}
/** Returns the value as a string, formatted according to the user's locale.
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- QString formatLocale(bool shortFormat = true) const;
+ TQString formatLocale(bool shortFormat = true) const;
/** Sets the start-of-day time.
* The default value is midnight (0000 hrs).
*/
- static void setStartOfDay(const QTime& sod) { mStartOfDay = sod; }
+ static void setStartOfDay(const TQTime& sod) { mStartOfDay = sod; }
/** Returns the start-of-day time. */
- static QTime startOfDay() { return mStartOfDay; }
+ static TQTime startOfDay() { return mStartOfDay; }
friend bool operator==(const DateTime& dt1, const DateTime& dt2);
friend bool operator<(const DateTime& dt1, const DateTime& dt2);
private:
- static QTime mStartOfDay;
- QDateTime mDateTime;
+ static TQTime mStartOfDay;
+ TQDateTime mDateTime;
bool mDateOnly;
bool mTimeValid; // whether the time is potentially valid - applicable only if mDateOnly false
};
diff --git a/kalarm/lib/label.cpp b/kalarm/lib/label.cpp
index c61ce76ad..69cef7544 100644
--- a/kalarm/lib/label.cpp
+++ b/kalarm/lib/label.cpp
@@ -19,24 +19,24 @@
*/
#include "kalarm.h"
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include "label.moc"
-Label::Label(QWidget* parent, const char* name, WFlags f)
- : QLabel(parent, name, f),
+Label::Label(TQWidget* parent, const char* name, WFlags f)
+ : TQLabel(parent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
-Label::Label(const QString& text, QWidget* parent, const char* name, WFlags f)
- : QLabel(text, parent, name, f),
+Label::Label(const TQString& text, TQWidget* parent, const char* name, WFlags f)
+ : TQLabel(text, parent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
-Label::Label(QWidget* buddy, const QString& text, QWidget* parent, const char* name, WFlags f)
- : QLabel(buddy, text, parent, name, f),
+Label::Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name, WFlags f)
+ : TQLabel(buddy, text, parent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
@@ -47,22 +47,22 @@ Label::Label(QWidget* buddy, const QString& text, QWidget* parent, const char* n
* When the accelerator key is pressed, the focus widget then receives focus.
* That event triggers the selection of the radio button.
*/
-void Label::setBuddy(QWidget* bud)
+void Label::setBuddy(TQWidget* bud)
{
if (mRadioButton)
- disconnect(mRadioButton, SIGNAL(destroyed()), this, SLOT(buddyDead()));
- QWidget* w = bud;
+ disconnect(mRadioButton, TQT_SIGNAL(destroyed()), this, TQT_SLOT(buddyDead()));
+ TQWidget* w = bud;
if (w)
{
while (w->focusProxy())
w = w->focusProxy();
- if (!w->inherits("QRadioButton"))
+ if (!w->inherits("TQRadioButton"))
w = 0;
}
if (!w)
{
// The buddy widget isn't a radio button
- QLabel::setBuddy(bud);
+ TQLabel::setBuddy(bud);
delete mFocusWidget;
mFocusWidget = 0;
mRadioButton = 0;
@@ -72,9 +72,9 @@ void Label::setBuddy(QWidget* bud)
// The buddy widget is a radio button, so set a different buddy
if (!mFocusWidget)
mFocusWidget = new LabelFocusWidget(this);
- QLabel::setBuddy(mFocusWidget);
- mRadioButton = (QRadioButton*)bud;
- connect(mRadioButton, SIGNAL(destroyed()), this, SLOT(buddyDead()));
+ TQLabel::setBuddy(mFocusWidget);
+ mRadioButton = (TQRadioButton*)bud;
+ connect(mRadioButton, TQT_SIGNAL(destroyed()), this, TQT_SLOT(buddyDead()));
}
}
@@ -103,14 +103,14 @@ void Label::activated()
* Class: LabelFocusWidget
=============================================================================*/
-LabelFocusWidget::LabelFocusWidget(QWidget* parent, const char* name)
- : QWidget(parent, name)
+LabelFocusWidget::LabelFocusWidget(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
setFocusPolicy(ClickFocus);
- setFixedSize(QSize(1,1));
+ setFixedSize(TQSize(1,1));
}
-void LabelFocusWidget::focusInEvent(QFocusEvent*)
+void LabelFocusWidget::focusInEvent(TQFocusEvent*)
{
Label* parent = (Label*)parentWidget();
parent->activated();
diff --git a/kalarm/lib/label.h b/kalarm/lib/label.h
index c65a7fcd6..4c0d74216 100644
--- a/kalarm/lib/label.h
+++ b/kalarm/lib/label.h
@@ -21,12 +21,12 @@
#ifndef LABEL_H
#define LABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
class QRadioButton;
class LabelFocusWidget;
/**
- * @short A QLabel with option for a buddy radio button.
+ * @short A TQLabel with option for a buddy radio button.
*
* The Label class provides a text display, with special behaviour when a radio
* button is set as a buddy.
@@ -34,7 +34,7 @@ class LabelFocusWidget;
* The Label object in effect acts as if it were part of the buddy radio button,
* in that when the label's accelerator key is pressed, the radio button receives
* focus and is switched on. When a non-radio button is specified as a buddy, the
- * behaviour is the same as for QLabel.
+ * behaviour is the same as for TQLabel.
*
* @author David Jarvie <software@astrojar.org.uk>
*/
@@ -46,16 +46,16 @@ class Label : public QLabel
/** Constructs an empty label.
* @param parent The parent object of this widget.
* @param name The name of this widget.
- * @param f Flags. See QWidget constructor for details.
+ * @param f Flags. See TQWidget constructor for details.
*/
- explicit Label(QWidget* parent, const char* name = 0, WFlags f = 0);
+ explicit Label(TQWidget* parent, const char* name = 0, WFlags f = 0);
/** Constructs a label that displays @p text.
* @param text Text string to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
- * @param f Flags. See QWidget constructor for details.
+ * @param f Flags. See TQWidget constructor for details.
*/
- Label(const QString& text, QWidget* parent, const char* name = 0, WFlags f = 0);
+ Label(const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
/** Constructs a label, with a buddy widget, that displays @p text.
* @param buddy Buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio
@@ -64,21 +64,21 @@ class Label : public QLabel
* @param text Text string to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
- * @param f Flags. See QWidget constructor for details.
+ * @param f Flags. See TQWidget constructor for details.
*/
- Label(QWidget* buddy, const QString& text, QWidget* parent, const char* name = 0, WFlags f = 0);
+ Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
/** Sets the label's buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio button,
* @p buddy is in addition selected when the accelerator key is pressed.
*/
- virtual void setBuddy(QWidget* buddy);
+ virtual void setBuddy(TQWidget* buddy);
protected:
- virtual void drawContents(QPainter* p) { QLabel::drawContents(p); }
+ virtual void drawContents(TQPainter* p) { TQLabel::drawContents(p); }
private slots:
void buddyDead();
private:
void activated();
- QRadioButton* mRadioButton; // buddy widget if it's a radio button, else 0
+ TQRadioButton* mRadioButton; // buddy widget if it's a radio button, else 0
LabelFocusWidget* mFocusWidget;
};
@@ -88,9 +88,9 @@ class LabelFocusWidget : public QWidget
{
Q_OBJECT
public:
- LabelFocusWidget(QWidget* parent, const char* name = 0);
+ LabelFocusWidget(TQWidget* parent, const char* name = 0);
protected:
- virtual void focusInEvent(QFocusEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
};
#endif // LABEL_H
diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp
index 943d7b2d0..64c79ea7b 100644
--- a/kalarm/lib/lineedit.cpp
+++ b/kalarm/lib/lineedit.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qregexp.h>
-#include <qdragobject.h>
+#include <tqregexp.h>
+#include <tqdragobject.h>
#include <kurldrag.h>
#include <kurlcompletion.h>
@@ -39,7 +39,7 @@
* It has an option to prevent its contents being selected when it receives
= focus.
=============================================================================*/
-LineEdit::LineEdit(Type type, QWidget* parent, const char* name)
+LineEdit::LineEdit(Type type, TQWidget* parent, const char* name)
: KLineEdit(parent, name),
mType(type),
mNoSelect(false),
@@ -48,7 +48,7 @@ LineEdit::LineEdit(Type type, QWidget* parent, const char* name)
init();
}
-LineEdit::LineEdit(QWidget* parent, const char* name)
+LineEdit::LineEdit(TQWidget* parent, const char* name)
: KLineEdit(parent, name),
mType(Text),
mNoSelect(false),
@@ -75,39 +75,39 @@ void LineEdit::init()
* Called when the line edit receives focus.
* If 'noSelect' is true, prevent the contents being selected.
*/
-void LineEdit::focusInEvent(QFocusEvent* e)
+void LineEdit::focusInEvent(TQFocusEvent* e)
{
if (mNoSelect)
- QFocusEvent::setReason(QFocusEvent::Other);
+ TQFocusEvent::setReason(TQFocusEvent::Other);
KLineEdit::focusInEvent(e);
if (mNoSelect)
{
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
mNoSelect = false;
}
}
-void LineEdit::setText(const QString& text)
+void LineEdit::setText(const TQString& text)
{
KLineEdit::setText(text);
setCursorPosition(mSetCursorAtEnd ? text.length() : 0);
}
-void LineEdit::dragEnterEvent(QDragEnterEvent* e)
+void LineEdit::dragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(false); // don't accept "text/calendar" objects
- e->accept(QTextDrag::canDecode(e)
+ e->accept(TQTextDrag::canDecode(e)
|| KURLDrag::canDecode(e)
|| mType != Url && KPIM::MailListDrag::canDecode(e)
|| mType == Emails && KVCardDrag::canDecode(e));
}
-void LineEdit::dropEvent(QDropEvent* e)
+void LineEdit::dropEvent(TQDropEvent* e)
{
- QString newText;
- QStringList newEmails;
- QString txt;
+ TQString newText;
+ TQStringList newEmails;
+ TQString txt;
KPIM::MailList mailList;
KURL::List files;
KABC::Addressee::List addrList;
@@ -132,7 +132,7 @@ void LineEdit::dropEvent(QDropEvent* e)
// KAddressBook entries
for (KABC::Addressee::List::Iterator it = addrList.begin(); it != addrList.end(); ++it)
{
- QString em((*it).fullEmail());
+ TQString em((*it).fullEmail());
if (!em.isEmpty())
newEmails.append(em);
}
@@ -149,7 +149,7 @@ void LineEdit::dropEvent(QDropEvent* e)
case Emails:
{
// Email entry field - ignore all but mailto: URLs
- QString mailto = QString::fromLatin1("mailto");
+ TQString mailto = TQString::fromLatin1("mailto");
for (KURL::List::Iterator it = files.begin(); it != files.end(); ++it)
{
if ((*it).protocol() == mailto)
@@ -162,15 +162,15 @@ void LineEdit::dropEvent(QDropEvent* e)
break;
}
}
- else if (QTextDrag::decode(e, txt))
+ else if (TQTextDrag::decode(e, txt))
{
// Plain text
if (mType == Emails)
{
// Remove newlines from a list of email addresses, and allow an eventual mailto: protocol
- QString mailto = QString::fromLatin1("mailto:");
- newEmails = QStringList::split(QRegExp("[\r\n]+"), txt);
- for (QStringList::Iterator it = newEmails.begin(); it != newEmails.end(); ++it)
+ TQString mailto = TQString::fromLatin1("mailto:");
+ newEmails = TQStringList::split(TQRegExp("[\r\n]+"), txt);
+ for (TQStringList::Iterator it = newEmails.begin(); it != newEmails.end(); ++it)
{
if ((*it).startsWith(mailto))
{
diff --git a/kalarm/lib/lineedit.h b/kalarm/lib/lineedit.h
index 57f8378ee..612b12a33 100644
--- a/kalarm/lib/lineedit.h
+++ b/kalarm/lib/lineedit.h
@@ -64,12 +64,12 @@ class LineEdit : public KLineEdit
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit LineEdit(Type type, QWidget* parent = 0, const char* name = 0);
+ explicit LineEdit(Type type, TQWidget* parent = 0, const char* name = 0);
/** Constructs a line edit whose content type is Text.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit LineEdit(QWidget* parent = 0, const char* name = 0);
+ explicit LineEdit(TQWidget* parent = 0, const char* name = 0);
/** Prevents the line edit's contents being selected when the widget receives focus. */
void setNoSelect() { mNoSelect = true; }
/** Sets whether the cursor should be set at the beginning or end of the text when
@@ -78,11 +78,11 @@ class LineEdit : public KLineEdit
void setCursorAtEnd(bool end = true) { mSetCursorAtEnd = end; }
public slots:
/** Sets the contents of the line edit to be @p str. */
- virtual void setText(const QString& str);
+ virtual void setText(const TQString& str);
protected:
- virtual void focusInEvent(QFocusEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dropEvent(QDropEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
+ virtual void dropEvent(TQDropEvent*);
private:
void init();
diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp
index 514b45bc2..48c18f1cd 100644
--- a/kalarm/lib/messagebox.cpp
+++ b/kalarm/lib/messagebox.cpp
@@ -24,14 +24,14 @@
KConfig* MessageBox::mConfig = 0;
-QMap<QString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
+TQMap<TQString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
/******************************************************************************
* Set the default button for continue/cancel message boxes with the specified
* 'dontAskAgainName'.
*/
-void MessageBox::setContinueDefault(const QString& dontAskAgainName, ButtonCode defaultButton)
+void MessageBox::setContinueDefault(const TQString& dontAskAgainName, ButtonCode defaultButton)
{
mContinueDefaults[dontAskAgainName] = (defaultButton == Cancel ? Cancel : Continue);
}
@@ -40,12 +40,12 @@ void MessageBox::setContinueDefault(const QString& dontAskAgainName, ButtonCode
* Get the default button for continue/cancel message boxes with the specified
* 'dontAskAgainName'.
*/
-KMessageBox::ButtonCode MessageBox::getContinueDefault(const QString& dontAskAgainName)
+KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAgainName)
{
ButtonCode defaultButton = Continue;
if (!dontAskAgainName.isEmpty())
{
- QMap<QString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
+ TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
if (it != mContinueDefaults.end())
defaultButton = it.data();
}
@@ -60,8 +60,8 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const QString& dontAskAga
* warningContinueCancel() for that 'dontAskAgainName' value. If neither method
* has set a default button, Continue is the default.
*/
-int MessageBox::warningContinueCancel(QWidget* parent, const QString& text, const QString& caption,
- const KGuiItem& buttonContinue, const QString& dontAskAgainName)
+int MessageBox::warningContinueCancel(TQWidget* parent, const TQString& text, const TQString& caption,
+ const KGuiItem& buttonContinue, const TQString& dontAskAgainName)
{
ButtonCode defaultButton = getContinueDefault(dontAskAgainName);
return warningContinueCancel(parent, defaultButton, text, caption, buttonContinue, dontAskAgainName);
@@ -72,9 +72,9 @@ int MessageBox::warningContinueCancel(QWidget* parent, const QString& text, cons
* If 'dontAskAgainName' is specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
-int MessageBox::warningContinueCancel(QWidget* parent, ButtonCode defaultButton, const QString& text,
- const QString& caption, const KGuiItem& buttonContinue,
- const QString& dontAskAgainName)
+int MessageBox::warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
+ const TQString& caption, const KGuiItem& buttonContinue,
+ const TQString& dontAskAgainName)
{
setContinueDefault(dontAskAgainName, defaultButton);
if (defaultButton != Cancel)
@@ -103,13 +103,13 @@ int MessageBox::warningContinueCancel(QWidget* parent, ButtonCode defaultButton,
* previously to set this for this 'dontShowAgainName' value.
* Reply = true if 'defaultShow' was written.
*/
-bool MessageBox::setDefaultShouldBeShownContinue(const QString& dontShowAgainName, bool defaultShow)
+bool MessageBox::setDefaultShouldBeShownContinue(const TQString& dontShowAgainName, bool defaultShow)
{
if (dontShowAgainName.isEmpty())
return false;
// First check whether there is an existing setting
KConfig* config = mConfig ? mConfig : KGlobal::config();
- config->setGroup(QString::fromLatin1("Notification Messages"));
+ config->setGroup(TQString::fromLatin1("Notification Messages"));
if (config->hasKey(dontShowAgainName))
return false;
@@ -124,7 +124,7 @@ bool MessageBox::setDefaultShouldBeShownContinue(const QString& dontShowAgainNam
* or warningContinueCancel() must have been called previously to set this for this
* 'dontShowAgainName' value.
*/
-bool MessageBox::shouldBeShownContinue(const QString& dontShowAgainName)
+bool MessageBox::shouldBeShownContinue(const TQString& dontShowAgainName)
{
if (getContinueDefault(dontShowAgainName) != Cancel)
return KMessageBox::shouldBeShownContinue(dontShowAgainName);
@@ -139,7 +139,7 @@ bool MessageBox::shouldBeShownContinue(const QString& dontShowAgainName)
* If 'dontShow' is true, the message box will be suppressed and it will return
* 'result'.
*/
-void MessageBox::saveDontShowAgainYesNo(const QString& dontShowAgainName, bool dontShow, ButtonCode result)
+void MessageBox::saveDontShowAgainYesNo(const TQString& dontShowAgainName, bool dontShow, ButtonCode result)
{
saveDontShowAgain(dontShowAgainName, true, dontShow, (result == Yes ? "yes" : "no"));
}
@@ -152,7 +152,7 @@ void MessageBox::saveDontShowAgainYesNo(const QString& dontShowAgainName, bool d
* or warningContinueCancel() must have been called previously to set this for this
* 'dontShowAgainName' value.
*/
-void MessageBox::saveDontShowAgainContinue(const QString& dontShowAgainName, bool dontShow)
+void MessageBox::saveDontShowAgainContinue(const TQString& dontShowAgainName, bool dontShow)
{
if (getContinueDefault(dontShowAgainName) == Cancel)
saveDontShowAgainYesNo(dontShowAgainName, dontShow, Yes);
@@ -163,15 +163,15 @@ void MessageBox::saveDontShowAgainContinue(const QString& dontShowAgainName, boo
/******************************************************************************
* Save whether the message box should not be shown again.
*/
-void MessageBox::saveDontShowAgain(const QString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult)
+void MessageBox::saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult)
{
if (dontShowAgainName.isEmpty())
return;
KConfig* config = mConfig ? mConfig : KGlobal::config();
- config->setGroup(QString::fromLatin1("Notification Messages"));
+ config->setGroup(TQString::fromLatin1("Notification Messages"));
bool global = (dontShowAgainName[0] == ':');
if (yesno)
- config->writeEntry(dontShowAgainName, QString::fromLatin1(dontShow ? yesnoResult : ""), true, global);
+ config->writeEntry(dontShowAgainName, TQString::fromLatin1(dontShow ? yesnoResult : ""), true, global);
else
config->writeEntry(dontShowAgainName, !dontShow, true, global);
config->sync();
diff --git a/kalarm/lib/messagebox.h b/kalarm/lib/messagebox.h
index 32e0d7325..6d65b0934 100644
--- a/kalarm/lib/messagebox.h
+++ b/kalarm/lib/messagebox.h
@@ -50,13 +50,13 @@ class MessageBox : public KMessageBox
* "don't ask again" name.
* @param dontAskAgainName The identifier controlling whether the message box is suppressed.
*/
- static ButtonCode getContinueDefault(const QString& dontAskAgainName);
+ static ButtonCode getContinueDefault(const TQString& dontAskAgainName);
/** Sets the default button for the Continue/Cancel message box with the specified
* "don't ask again" name.
* @param dontAskAgainName The identifier controlling whether the message box is suppressed.
* @param defaultButton The default button for the message box. Valid values are Continue or Cancel.
*/
- static void setContinueDefault(const QString& dontAskAgainName, ButtonCode defaultButton);
+ static void setContinueDefault(const TQString& dontAskAgainName, ButtonCode defaultButton);
/** Displays a Continue/Cancel message box with the option as to which button is the default.
* @param parent Parent widget
* @param defaultButton The default button for the message box. Valid values are Continue or Cancel.
@@ -66,10 +66,10 @@ class MessageBox : public KMessageBox
* @param dontAskAgainName If specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
- static int warningContinueCancel(QWidget* parent, ButtonCode defaultButton, const QString& text,
- const QString& caption = QString::null,
+ static int warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
+ const TQString& caption = TQString::null,
const KGuiItem& buttonContinue = KStdGuiItem::cont(),
- const QString& dontAskAgainName = QString::null);
+ const TQString& dontAskAgainName = TQString::null);
/** Displays a Continue/Cancel message box.
* @param parent Parent widget
* @param text Message string
@@ -81,9 +81,9 @@ class MessageBox : public KMessageBox
* @p dontAskAgainName value. If neither method has been used to set a default button,
* Continue is the default.
*/
- static int warningContinueCancel(QWidget* parent, const QString& text, const QString& caption = QString::null,
+ static int warningContinueCancel(TQWidget* parent, const TQString& text, const TQString& caption = TQString::null,
const KGuiItem& buttonContinue = KStdGuiItem::cont(),
- const QString& dontAskAgainName = QString::null);
+ const TQString& dontAskAgainName = TQString::null);
/** If there is no current setting for whether a non-Yes/No message box should be
* shown, sets it to @p defaultShow.
* If a Continue/Cancel message box has Cancel as the default button, either
@@ -91,20 +91,20 @@ class MessageBox : public KMessageBox
* previously to set this for the specified @p dontShowAgainName value.
* @return true if @p defaultShow was written.
*/
- static bool setDefaultShouldBeShownContinue(const QString& dontShowAgainName, bool defaultShow);
+ static bool setDefaultShouldBeShownContinue(const TQString& dontShowAgainName, bool defaultShow);
/** Returns whether a non-Yes/No message box should be shown.
* If the message box has Cancel as the default button, either setContinueDefault()
* or warningContinueCancel() must have been called previously to set this for the
* specified @p dontShowAgainName value.
* @param dontShowAgainName The identifier controlling whether the message box is suppressed.
*/
- static bool shouldBeShownContinue(const QString& dontShowAgainName);
+ static bool shouldBeShownContinue(const TQString& dontShowAgainName);
/** Stores whether the Yes/No message box should or should not be shown again.
* @param dontShowAgainName The identifier controlling whether the message box is suppressed.
* @param dontShow If true, the message box will be suppressed and will return @p result.
* @param result The button code to return if the message box is suppressed.
*/
- static void saveDontShowAgainYesNo(const QString& dontShowAgainName, bool dontShow = true, ButtonCode result = No);
+ static void saveDontShowAgainYesNo(const TQString& dontShowAgainName, bool dontShow = true, ButtonCode result = No);
/** Stores whether a non-Yes/No message box should or should not be shown again.
* If the message box has Cancel as the default button, either setContinueDefault()
* or warningContinueCancel() must have been called previously to set this for the
@@ -112,14 +112,14 @@ class MessageBox : public KMessageBox
* @param dontShowAgainName The identifier controlling whether the message box is suppressed.
* @param dontShow If true, the message box will be suppressed and will return Continue.
*/
- static void saveDontShowAgainContinue(const QString& dontShowAgainName, bool dontShow = true);
+ static void saveDontShowAgainContinue(const TQString& dontShowAgainName, bool dontShow = true);
/** Sets the KConfig object to be used by the MessageBox class. */
static void setDontShowAskAgainConfig(KConfig* cfg) { mConfig = cfg; }
private:
- static void saveDontShowAgain(const QString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = 0);
+ static void saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = 0);
static KConfig* mConfig;
- static QMap<QString, ButtonCode> mContinueDefaults;
+ static TQMap<TQString, ButtonCode> mContinueDefaults;
};
#endif
diff --git a/kalarm/lib/pushbutton.cpp b/kalarm/lib/pushbutton.cpp
index 8b279082c..ed8440a05 100644
--- a/kalarm/lib/pushbutton.cpp
+++ b/kalarm/lib/pushbutton.cpp
@@ -21,20 +21,20 @@
#include "pushbutton.moc"
-PushButton::PushButton(QWidget* parent, const char* name)
- : QPushButton(parent, name),
+PushButton::PushButton(TQWidget* parent, const char* name)
+ : TQPushButton(parent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
-PushButton::PushButton(const QString& text, QWidget* parent, const char* name)
- : QPushButton(text, parent, name),
+PushButton::PushButton(const TQString& text, TQWidget* parent, const char* name)
+ : TQPushButton(text, parent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
-PushButton::PushButton(const QIconSet& icon, const QString& text, QWidget* parent, const char* name)
- : QPushButton(icon, text, parent, name),
+PushButton::PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name)
+ : TQPushButton(icon, text, parent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
@@ -44,13 +44,13 @@ void PushButton::setReadOnly(bool ro)
if ((int)ro != (int)mReadOnly)
{
mReadOnly = ro;
- setFocusPolicy(ro ? QWidget::NoFocus : mFocusPolicy);
+ setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy);
if (ro)
clearFocus();
}
}
-void PushButton::mousePressEvent(QMouseEvent* e)
+void PushButton::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -58,10 +58,10 @@ void PushButton::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QPushButton::mousePressEvent(e);
+ TQPushButton::mousePressEvent(e);
}
-void PushButton::mouseReleaseEvent(QMouseEvent* e)
+void PushButton::mouseReleaseEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -69,16 +69,16 @@ void PushButton::mouseReleaseEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QPushButton::mouseReleaseEvent(e);
+ TQPushButton::mouseReleaseEvent(e);
}
-void PushButton::mouseMoveEvent(QMouseEvent* e)
+void PushButton::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QPushButton::mouseMoveEvent(e);
+ TQPushButton::mouseMoveEvent(e);
}
-void PushButton::keyPressEvent(QKeyEvent* e)
+void PushButton::keyPressEvent(TQKeyEvent* e)
{
if (mReadOnly)
switch (e->key())
@@ -92,11 +92,11 @@ void PushButton::keyPressEvent(QKeyEvent* e)
default:
return;
}
- QPushButton::keyPressEvent(e);
+ TQPushButton::keyPressEvent(e);
}
-void PushButton::keyReleaseEvent(QKeyEvent* e)
+void PushButton::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QPushButton::keyReleaseEvent(e);
+ TQPushButton::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/pushbutton.h b/kalarm/lib/pushbutton.h
index 6ef0f3a2a..8d82ac96e 100644
--- a/kalarm/lib/pushbutton.h
+++ b/kalarm/lib/pushbutton.h
@@ -21,13 +21,13 @@
#ifndef PUSHBUTTON_H
#define PUSHBUTTON_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
/**
- * @short A QPushButton with read-only option.
+ * @short A TQPushButton with read-only option.
*
- * The PushButton class is a QPushButton with a read-only option.
+ * The PushButton class is a TQPushButton with a read-only option.
*
* The widget may be set as read-only. This has the same effect as disabling it, except
* that its appearance is unchanged.
@@ -43,20 +43,20 @@ class PushButton : public QPushButton
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit PushButton(QWidget* parent, const char* name = 0);
+ explicit PushButton(TQWidget* parent, const char* name = 0);
/** Constructor for a push button which displays a text.
* @param text The text to show on the button.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- PushButton(const QString& text, QWidget* parent, const char* name = 0);
+ PushButton(const TQString& text, TQWidget* parent, const char* name = 0);
/** Constructor for a push button which displays an icon and a text.
* @param icon The icon to show on the button.
* @param text The text to show on the button.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- PushButton(const QIconSet& icon, const QString& text, QWidget* parent, const char* name = 0);
+ PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name = 0);
/** Sets whether the push button is read-only for the user.
* @param readOnly True to set the widget read-only, false to enable its action.
*/
@@ -64,13 +64,13 @@ class PushButton : public QPushButton
/** Returns true if the widget is read only. */
virtual bool isReadOnly() const { return mReadOnly; }
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
- QWidget::FocusPolicy mFocusPolicy; // default focus policy for the QPushButton
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QPushButton
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/radiobutton.cpp b/kalarm/lib/radiobutton.cpp
index d66911eeb..7cf58f082 100644
--- a/kalarm/lib/radiobutton.cpp
+++ b/kalarm/lib/radiobutton.cpp
@@ -21,15 +21,15 @@
#include "radiobutton.moc"
-RadioButton::RadioButton(QWidget* parent, const char* name)
- : QRadioButton(parent, name),
+RadioButton::RadioButton(TQWidget* parent, const char* name)
+ : TQRadioButton(parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
{ }
-RadioButton::RadioButton(const QString& text, QWidget* parent, const char* name)
- : QRadioButton(text, parent, name),
+RadioButton::RadioButton(const TQString& text, TQWidget* parent, const char* name)
+ : TQRadioButton(text, parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
@@ -44,7 +44,7 @@ void RadioButton::setReadOnly(bool ro)
if ((int)ro != (int)mReadOnly)
{
mReadOnly = ro;
- setFocusPolicy(ro ? QWidget::NoFocus : mFocusPolicy);
+ setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy);
if (ro)
clearFocus();
}
@@ -53,14 +53,14 @@ void RadioButton::setReadOnly(bool ro)
/******************************************************************************
* Specify a widget to receive focus when the button is clicked on.
*/
-void RadioButton::setFocusWidget(QWidget* w, bool enable)
+void RadioButton::setFocusWidget(TQWidget* w, bool enable)
{
mFocusWidget = w;
mFocusWidgetEnable = enable;
if (w)
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()));
else
- disconnect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ disconnect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
}
/******************************************************************************
@@ -81,7 +81,7 @@ void RadioButton::slotClicked()
* Event handlers to intercept events if in read-only mode.
* Any events which could change the button state are discarded.
*/
-void RadioButton::mousePressEvent(QMouseEvent* e)
+void RadioButton::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -89,10 +89,10 @@ void RadioButton::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QRadioButton::mousePressEvent(e);
+ TQRadioButton::mousePressEvent(e);
}
-void RadioButton::mouseReleaseEvent(QMouseEvent* e)
+void RadioButton::mouseReleaseEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -100,16 +100,16 @@ void RadioButton::mouseReleaseEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QRadioButton::mouseReleaseEvent(e);
+ TQRadioButton::mouseReleaseEvent(e);
}
-void RadioButton::mouseMoveEvent(QMouseEvent* e)
+void RadioButton::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QRadioButton::mouseMoveEvent(e);
+ TQRadioButton::mouseMoveEvent(e);
}
-void RadioButton::keyPressEvent(QKeyEvent* e)
+void RadioButton::keyPressEvent(TQKeyEvent* e)
{
if (mReadOnly)
switch (e->key())
@@ -124,11 +124,11 @@ void RadioButton::keyPressEvent(QKeyEvent* e)
default:
return;
}
- QRadioButton::keyPressEvent(e);
+ TQRadioButton::keyPressEvent(e);
}
-void RadioButton::keyReleaseEvent(QKeyEvent* e)
+void RadioButton::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QRadioButton::keyReleaseEvent(e);
+ TQRadioButton::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/radiobutton.h b/kalarm/lib/radiobutton.h
index 96bca04dd..c87ef97b8 100644
--- a/kalarm/lib/radiobutton.h
+++ b/kalarm/lib/radiobutton.h
@@ -21,13 +21,13 @@
#ifndef RADIOBUTTON_H
#define RADIOBUTTON_H
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
/**
- * @short A QRadioButton with focus widget and read-only options.
+ * @short A TQRadioButton with focus widget and read-only options.
*
- * The RadioButton class is a QRadioButton with the ability to transfer focus to
+ * The RadioButton class is a TQRadioButton with the ability to transfer focus to
* another widget when checked, and with a read-only option.
*
* Another widget may be specified as the focus widget for the radio button. Whenever
@@ -47,13 +47,13 @@ class RadioButton : public QRadioButton
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit RadioButton(QWidget* parent, const char* name = 0);
+ explicit RadioButton(TQWidget* parent, const char* name = 0);
/** Constructor.
* @param text Text to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- RadioButton(const QString& text, QWidget* parent, const char* name = 0);
+ RadioButton(const TQString& text, TQWidget* parent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the radio button is read-only for the user. If read-only,
@@ -62,25 +62,25 @@ class RadioButton : public QRadioButton
*/
virtual void setReadOnly(bool readOnly);
/** Returns the widget which receives focus when the button is clicked. */
- QWidget* focusWidget() const { return mFocusWidget; }
+ TQWidget* focusWidget() const { return mFocusWidget; }
/** Specifies a widget to receive focus when the button is clicked.
* @param widget Widget to receive focus.
* @param enable If true, @p widget will be enabled before receiving focus. If
* false, the enabled state of @p widget will be left unchanged when
* the radio button is clicked.
*/
- void setFocusWidget(QWidget* widget, bool enable = true);
+ void setFocusWidget(TQWidget* widget, bool enable = true);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
protected slots:
void slotClicked();
private:
- QWidget::FocusPolicy mFocusPolicy; // default focus policy for the QRadioButton
- QWidget* mFocusWidget; // widget to receive focus when button is clicked on
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QRadioButton
+ TQWidget* mFocusWidget; // widget to receive focus when button is clicked on
bool mFocusWidgetEnable; // enable focus widget before setting focus
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp
index 1e37d2e74..209f1aad8 100644
--- a/kalarm/lib/shellprocess.cpp
+++ b/kalarm/lib/shellprocess.cpp
@@ -31,13 +31,13 @@
#include "shellprocess.moc"
-QCString ShellProcess::mShellName;
-QCString ShellProcess::mShellPath;
+TQCString ShellProcess::mShellName;
+TQCString ShellProcess::mShellPath;
bool ShellProcess::mInitialised = false;
bool ShellProcess::mAuthorised = false;
-ShellProcess::ShellProcess(const QString& command)
+ShellProcess::ShellProcess(const TQString& command)
: KShellProcess(shellName()),
mCommand(command),
mStatus(INACTIVE),
@@ -56,8 +56,8 @@ bool ShellProcess::start(Communication comm)
return false;
}
KShellProcess::operator<<(mCommand);
- connect(this, SIGNAL(wroteStdin(KProcess*)), SLOT(writtenStdin(KProcess*)));
- connect(this, SIGNAL(processExited(KProcess*)), SLOT(slotExited(KProcess*)));
+ connect(this, TQT_SIGNAL(wroteStdin(KProcess*)), TQT_SLOT(writtenStdin(KProcess*)));
+ connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExited(KProcess*)));
if (!KShellProcess::start(KProcess::NotifyOnExit, comm))
{
mStatus = START_FAIL;
@@ -101,7 +101,7 @@ void ShellProcess::slotExited(KProcess* proc)
*/
void ShellProcess::writeStdin(const char* buffer, int bufflen)
{
- QCString scopy(buffer, bufflen+1); // construct a deep copy
+ TQCString scopy(buffer, bufflen+1); // construct a deep copy
bool write = mStdinQueue.isEmpty();
mStdinQueue.append(scopy);
if (write)
@@ -138,7 +138,7 @@ void ShellProcess::stdinExit()
* Return the error message corresponding to the command exit status.
* Reply = null string if not yet exited, or if command successful.
*/
-QString ShellProcess::errorMessage() const
+TQString ShellProcess::errorMessage() const
{
switch (mStatus)
{
@@ -153,7 +153,7 @@ QString ShellProcess::errorMessage() const
case RUNNING:
case SUCCESS:
default:
- return QString::null;
+ return TQString::null;
}
}
@@ -162,13 +162,13 @@ QString ShellProcess::errorMessage() const
* This is a duplication of what KShellProcess does, but we need to know
* which shell is used in order to decide what its exit code means.
*/
-const QCString& ShellProcess::shellPath()
+const TQCString& ShellProcess::shellPath()
{
if (mShellPath.isEmpty())
{
// Get the path to the shell
mShellPath = "/bin/sh";
- QCString envshell = QCString(getenv("SHELL")).stripWhiteSpace();
+ TQCString envshell = TQCString(getenv("SHELL")).stripWhiteSpace();
if (!envshell.isEmpty())
{
struct stat fileinfo;
diff --git a/kalarm/lib/shellprocess.h b/kalarm/lib/shellprocess.h
index 06a262a8d..a3b8a574b 100644
--- a/kalarm/lib/shellprocess.h
+++ b/kalarm/lib/shellprocess.h
@@ -72,7 +72,7 @@ class ShellProcess : public KShellProcess
/** Constructor.
* @param command The command line to be run when start() is called.
*/
- explicit ShellProcess(const QString& command);
+ explicit ShellProcess(const TQString& command);
/** Executes the configured command.
* @param comm Which communication links should be established to the child process
* (stdin/stdout/stderr).
@@ -85,12 +85,12 @@ class ShellProcess : public KShellProcess
*/
bool normalExit() const { return mStatus == SUCCESS; }
/** Returns the command configured to be run. */
- const QString& command() const { return mCommand; }
+ const TQString& command() const { return mCommand; }
/** Returns the error message corresponding to the command exit status.
* @return Error message if an error occurred. Null string if the command has not yet
* exited, or if the command ran successfully.
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
/** Writes a string to the process's STDIN. */
void writeStdin(const char* buffer, int bufflen);
/** Tell the process to exit once any outstanding STDIN strings have been written. */
@@ -102,11 +102,11 @@ class ShellProcess : public KShellProcess
/** Determines which shell to use.
* @return file name of shell, excluding path.
*/
- static const QCString& shellName() { shellPath(); return mShellName; }
+ static const TQCString& shellName() { shellPath(); return mShellName; }
/** Determines which shell to use.
* @return path name of shell.
*/
- static const QCString& shellPath();
+ static const TQCString& shellPath();
signals:
/** Signal emitted when the shell process execution completes. It is not emitted
@@ -120,17 +120,17 @@ class ShellProcess : public KShellProcess
private:
// Prohibit the following inherited methods
- ShellProcess& operator<<(const QString&);
- ShellProcess& operator<<(const QCString&);
- ShellProcess& operator<<(const QStringList&);
+ ShellProcess& operator<<(const TQString&);
+ ShellProcess& operator<<(const TQCString&);
+ ShellProcess& operator<<(const TQStringList&);
ShellProcess& operator<<(const char*);
- static QCString mShellName; // name of shell to be used
- static QCString mShellPath; // path of shell to be used
+ static TQCString mShellName; // name of shell to be used
+ static TQCString mShellPath; // path of shell to be used
static bool mInitialised; // true once static data has been initialised
static bool mAuthorised; // true if shell commands are authorised
- QString mCommand; // copy of command to be executed
- QValueList<QCString> mStdinQueue; // queued strings to send to STDIN
+ TQString mCommand; // copy of command to be executed
+ TQValueList<TQCString> mStdinQueue; // queued strings to send to STDIN
Status mStatus; // current execution status
bool mStdinExit; // exit once STDIN queue has been written
};
diff --git a/kalarm/lib/slider.cpp b/kalarm/lib/slider.cpp
index 1a0999645..afe7d679c 100644
--- a/kalarm/lib/slider.cpp
+++ b/kalarm/lib/slider.cpp
@@ -21,18 +21,18 @@
#include "slider.moc"
-Slider::Slider(QWidget* parent, const char* name)
- : QSlider(parent, name),
+Slider::Slider(TQWidget* parent, const char* name)
+ : TQSlider(parent, name),
mReadOnly(false)
{ }
-Slider::Slider(Orientation o, QWidget* parent, const char* name)
- : QSlider(o, parent, name),
+Slider::Slider(Orientation o, TQWidget* parent, const char* name)
+ : TQSlider(o, parent, name),
mReadOnly(false)
{ }
-Slider::Slider(int minval, int maxval, int pageStep, int value, Orientation o, QWidget* parent, const char* name)
- : QSlider(minval, maxval, pageStep, value, o, parent, name),
+Slider::Slider(int minval, int maxval, int pageStep, int value, Orientation o, TQWidget* parent, const char* name)
+ : TQSlider(minval, maxval, pageStep, value, o, parent, name),
mReadOnly(false)
{ }
@@ -49,7 +49,7 @@ void Slider::setReadOnly(bool ro)
* Event handlers to intercept events if in read-only mode.
* Any events which could change the slider value are discarded.
*/
-void Slider::mousePressEvent(QMouseEvent* e)
+void Slider::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -57,29 +57,29 @@ void Slider::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QSlider::mousePressEvent(e);
+ TQSlider::mousePressEvent(e);
}
-void Slider::mouseReleaseEvent(QMouseEvent* e)
+void Slider::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QSlider::mouseReleaseEvent(e);
+ TQSlider::mouseReleaseEvent(e);
}
-void Slider::mouseMoveEvent(QMouseEvent* e)
+void Slider::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QSlider::mouseMoveEvent(e);
+ TQSlider::mouseMoveEvent(e);
}
-void Slider::keyPressEvent(QKeyEvent* e)
+void Slider::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
- QSlider::keyPressEvent(e);
+ TQSlider::keyPressEvent(e);
}
-void Slider::keyReleaseEvent(QKeyEvent* e)
+void Slider::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QSlider::keyReleaseEvent(e);
+ TQSlider::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/slider.h b/kalarm/lib/slider.h
index 17635e68a..8fa54d452 100644
--- a/kalarm/lib/slider.h
+++ b/kalarm/lib/slider.h
@@ -21,13 +21,13 @@
#ifndef SLIDER_H
#define SLIDER_H
-#include <qslider.h>
+#include <tqslider.h>
/**
- * @short A QSlider with read-only option.
+ * @short A TQSlider with read-only option.
*
- * The Slider class is a QSlider with a read-only option.
+ * The Slider class is a TQSlider with a read-only option.
*
* The widget may be set as read-only. This has the same effect as disabling it, except
* that its appearance is unchanged.
@@ -43,13 +43,13 @@ class Slider : public QSlider
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit Slider(QWidget* parent = 0, const char* name = 0);
+ explicit Slider(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param orient The orientation of the slider, either Qt::Horizonal or Qt::Vertical.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit Slider(Orientation orient, QWidget* parent = 0, const char* name = 0);
+ explicit Slider(Orientation orient, TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the slider can have.
* @param maxValue The maximum value which the slider can have.
@@ -60,7 +60,7 @@ class Slider : public QSlider
* @param name The name of this widget.
*/
Slider(int minValue, int maxValue, int pageStep, int value, Orientation orient,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
/** Returns true if the slider is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the slider is read-only for the user.
@@ -68,11 +68,11 @@ class Slider : public QSlider
*/
virtual void setReadOnly(bool readOnly);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
bool mReadOnly; // value cannot be changed by the user
};
diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp
index bb9ef2441..6145114a3 100644
--- a/kalarm/lib/spinbox.cpp
+++ b/kalarm/lib/spinbox.cpp
@@ -19,21 +19,21 @@
*/
#include <kdeversion.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
#include "spinbox.moc"
-SpinBox::SpinBox(QWidget* parent, const char* name)
- : QSpinBox(0, 99999, 1, parent, name),
- mMinValue(QSpinBox::minValue()),
- mMaxValue(QSpinBox::maxValue())
+SpinBox::SpinBox(TQWidget* parent, const char* name)
+ : TQSpinBox(0, 99999, 1, parent, name),
+ mMinValue(TQSpinBox::minValue()),
+ mMaxValue(TQSpinBox::maxValue())
{
init();
}
-SpinBox::SpinBox(int minValue, int maxValue, int step, QWidget* parent, const char* name)
- : QSpinBox(minValue, maxValue, step, parent, name),
+SpinBox::SpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name)
+ : TQSpinBox(minValue, maxValue, step, parent, name),
mMinValue(minValue),
mMaxValue(maxValue)
{
@@ -42,7 +42,7 @@ SpinBox::SpinBox(int minValue, int maxValue, int step, QWidget* parent, const ch
void SpinBox::init()
{
- int step = QSpinBox::lineStep();
+ int step = TQSpinBox::lineStep();
mLineStep = step;
mLineShiftStep = step;
mCurrentButton = NO_BUTTON;
@@ -56,8 +56,8 @@ void SpinBox::init()
// Find the spin widgets which are part of the spin boxes, in order to
// handle their shift-button presses.
- QObjectList* spinwidgets = queryList("QSpinWidget", 0, false, true);
- QSpinWidget* spin = (QSpinWidget*)spinwidgets->getFirst();
+ TQObjectList* spinwidgets = queryList("TQSpinWidget", 0, false, true);
+ TQSpinWidget* spin = (TQSpinWidget*)spinwidgets->getFirst();
if (spin)
spin->installEventFilter(this); // handle shift-button presses
delete spinwidgets;
@@ -65,7 +65,7 @@ void SpinBox::init()
#if KDE_IS_VERSION(3,1,90)
// Detect when the text field is edited
- connect(editor(), SIGNAL(textChanged(const QString&)), SLOT(textEdited()));
+ connect(editor(), TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textEdited()));
#endif
}
@@ -88,14 +88,14 @@ int SpinBox::bound(int val) const
void SpinBox::setMinValue(int val)
{
mMinValue = val;
- QSpinBox::setMinValue(val);
+ TQSpinBox::setMinValue(val);
mShiftMinBound = false;
}
void SpinBox::setMaxValue(int val)
{
mMaxValue = val;
- QSpinBox::setMaxValue(val);
+ TQSpinBox::setMaxValue(val);
mShiftMaxBound = false;
}
@@ -103,26 +103,26 @@ void SpinBox::setLineStep(int step)
{
mLineStep = step;
if (!mShiftMouse)
- QSpinBox::setLineStep(step);
+ TQSpinBox::setLineStep(step);
}
void SpinBox::setLineShiftStep(int step)
{
mLineShiftStep = step;
if (mShiftMouse)
- QSpinBox::setLineStep(step);
+ TQSpinBox::setLineStep(step);
}
void SpinBox::stepUp()
{
- int step = QSpinBox::lineStep();
+ int step = TQSpinBox::lineStep();
addValue(step);
emit stepped(step);
}
void SpinBox::stepDown()
{
- int step = -QSpinBox::lineStep();
+ int step = -TQSpinBox::lineStep();
addValue(step);
emit stepped(step);
}
@@ -135,8 +135,8 @@ void SpinBox::stepDown()
void SpinBox::addValue(int change, bool current)
{
int newval = value() + change;
- int maxval = current ? QSpinBox::maxValue() : mMaxValue;
- int minval = current ? QSpinBox::minValue() : mMinValue;
+ int maxval = current ? TQSpinBox::maxValue() : mMaxValue;
+ int minval = current ? TQSpinBox::minValue() : mMinValue;
if (wrapping())
{
int range = maxval - minval + 1;
@@ -163,20 +163,20 @@ void SpinBox::valueChange()
if (mShiftMinBound && val >= mMinValue)
{
// Reinstate the minimum bound now that the value has returned to the normal range.
- QSpinBox::setMinValue(mMinValue);
+ TQSpinBox::setMinValue(mMinValue);
mShiftMinBound = false;
}
if (mShiftMaxBound && val <= mMaxValue)
{
// Reinstate the maximum bound now that the value has returned to the normal range.
- QSpinBox::setMaxValue(mMaxValue);
+ TQSpinBox::setMaxValue(mMaxValue);
mShiftMaxBound = false;
}
bool focus = !mSelectOnStep && hasFocus();
if (focus)
clearFocus(); // prevent selection of the spin box text
- QSpinBox::valueChange();
+ TQSpinBox::valueChange();
if (focus)
setFocus();
}
@@ -193,13 +193,13 @@ void SpinBox::textEdited()
void SpinBox::updateDisplay()
{
mEdited = false;
- QSpinBox::updateDisplay();
+ TQSpinBox::updateDisplay();
}
/******************************************************************************
* Receives events destined for the spin widget or for the edit field.
*/
-bool SpinBox::eventFilter(QObject* obj, QEvent* e)
+bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
{
if (obj == editor())
{
@@ -207,10 +207,10 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
bool shift = false;
switch (e->type())
{
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
// Up and down arrow keys step the value
- QKeyEvent* ke = (QKeyEvent*)e;
+ TQKeyEvent* ke = (TQKeyEvent*)e;
int key = ke->key();
if (key == Qt::Key_Up)
step = 1;
@@ -219,15 +219,15 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
shift = ((ke->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton);
break;
}
- case QEvent::Wheel:
+ case TQEvent::Wheel:
{
- QWheelEvent* we = (QWheelEvent*)e;
+ TQWheelEvent* we = (TQWheelEvent*)e;
step = (we->delta() > 0) ? 1 : -1;
shift = ((we->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton);
break;
}
#if KDE_IS_VERSION(3,1,90)
- case QEvent::Leave:
+ case TQEvent::Leave:
if (mEdited)
interpretText();
break;
@@ -259,10 +259,10 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
int etype = e->type(); // avoid switch compile warnings
switch (etype)
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick:
{
- QMouseEvent* me = (QMouseEvent*)e;
+ TQMouseEvent* me = (TQMouseEvent*)e;
if (me->button() == Qt::LeftButton)
{
// It's a left button press. Set normal or shift stepping as appropriate.
@@ -278,9 +278,9 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
break;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
{
- QMouseEvent* me = (QMouseEvent*)e;
+ TQMouseEvent* me = (TQMouseEvent*)e;
if (me->button() == Qt::LeftButton && mShiftMouse)
{
setShiftStepping(false, mCurrentButton); // cancel shift stepping
@@ -288,9 +288,9 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
break;
}
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
- QMouseEvent* me = (QMouseEvent*)e;
+ TQMouseEvent* me = (TQMouseEvent*)e;
if (me->state() & Qt::LeftButton)
{
// The left button is down. Track which spin button it's in.
@@ -310,19 +310,19 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
break;
}
- case QEvent::Wheel:
+ case TQEvent::Wheel:
{
- QWheelEvent* we = (QWheelEvent*)e;
+ TQWheelEvent* we = (TQWheelEvent*)e;
bool shift = (we->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton;
if (setShiftStepping(shift, (we->delta() > 0 ? UP : DOWN)))
return true; // hide the event from the spin widget
return false; // forward event to the destination widget
}
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::AccelOverride: // this is needed to receive Shift presses!
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::AccelOverride: // this is needed to receive Shift presses!
{
- QKeyEvent* ke = (QKeyEvent*)e;
+ TQKeyEvent* ke = (TQKeyEvent*)e;
int key = ke->key();
int state = ke->state();
if ((state & Qt::LeftButton)
@@ -345,7 +345,7 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
}
}
- return QSpinBox::eventFilter(obj, e);
+ return TQSpinBox::eventFilter(obj, e);
}
/******************************************************************************
@@ -389,7 +389,7 @@ bool SpinBox::setShiftStepping(bool shift, int currentButton)
newval = mMinValue;
else
newval = (newval <= minval) ? minval : mMaxValue;
- QSpinBox::setValue(newval);
+ TQSpinBox::setValue(newval);
emit stepped(step);
return true;
}
@@ -399,12 +399,12 @@ bool SpinBox::setShiftStepping(bool shift, int currentButton)
int tempval = val + adjust;
if (tempval < mMinValue)
{
- QSpinBox::setMinValue(tempval);
+ TQSpinBox::setMinValue(tempval);
mShiftMinBound = true;
}
else if (tempval > mMaxValue)
{
- QSpinBox::setMaxValue(tempval);
+ TQSpinBox::setMaxValue(tempval);
mShiftMaxBound = true;
}
}
@@ -417,14 +417,14 @@ bool SpinBox::setShiftStepping(bool shift, int currentButton)
blockSignals(blocked);
mSuppressSignals = false;
}
- QSpinBox::setLineStep(mLineShiftStep);
+ TQSpinBox::setLineStep(mLineShiftStep);
}
else if (!shift && mShiftMouse)
{
// Reinstate to normal (non-shift) stepping
- QSpinBox::setLineStep(mLineStep);
- QSpinBox::setMinValue(mMinValue);
- QSpinBox::setMaxValue(mMaxValue);
+ TQSpinBox::setLineStep(mLineStep);
+ TQSpinBox::setMinValue(mMinValue);
+ TQSpinBox::setMaxValue(mMaxValue);
mShiftMinBound = mShiftMaxBound = false;
mShiftMouse = false;
}
@@ -466,7 +466,7 @@ int SpinBox::shiftStepAdjustment(int oldValue, int shiftStep)
/******************************************************************************
* Find which spin widget button a mouse event is in.
*/
-int SpinBox::whichButton(const QPoint& pos)
+int SpinBox::whichButton(const TQPoint& pos)
{
if (upRect().contains(pos))
return UP;
diff --git a/kalarm/lib/spinbox.h b/kalarm/lib/spinbox.h
index 0df910233..cf74e9deb 100644
--- a/kalarm/lib/spinbox.h
+++ b/kalarm/lib/spinbox.h
@@ -21,13 +21,13 @@
#ifndef SPINBOX_H
#define SPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
/**
* @short Spin box with accelerated shift key stepping and read-only option.
*
- * The SpinBox class provides a QSpinBox with accelerated stepping using the shift key.
+ * The SpinBox class provides a TQSpinBox with accelerated stepping using the shift key.
*
* A separate step increment may optionally be specified for use when the shift key is
* held down. Typically this would be larger than the normal step. Then, when the user
@@ -47,7 +47,7 @@ class SpinBox : public QSpinBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit SpinBox(QWidget* parent = 0, const char* name = 0);
+ explicit SpinBox(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
@@ -55,7 +55,7 @@ class SpinBox : public QSpinBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- SpinBox(int minValue, int maxValue, int step = 1, QWidget* parent = 0, const char* name = 0);
+ SpinBox(int minValue, int maxValue, int step = 1, TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the spin box can be changed by the user.
@@ -123,8 +123,8 @@ class SpinBox : public QSpinBox
*/
virtual int shiftStepAdjustment(int oldValue, int shiftStep);
/** Receives events destined for the spin widget or for the edit field. */
- virtual bool eventFilter(QObject*, QEvent*);
- /** Updates the contents of the embedded QLineEdit to reflect the current value
+ virtual bool eventFilter(TQObject*, TQEvent*);
+ /** Updates the contents of the embedded TQLineEdit to reflect the current value
* using mapValueToText(). Also enables/disables the up/down push buttons accordingly.
*/
virtual void updateDisplay();
@@ -134,7 +134,7 @@ class SpinBox : public QSpinBox
private:
void init();
void addValue(int change, bool current);
- int whichButton(const QPoint&);
+ int whichButton(const TQPoint&);
bool setShiftStepping(bool, int currentButton);
enum { NO_BUTTON, UP, DOWN };
diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp
index 313d3eb56..48b88d51c 100644
--- a/kalarm/lib/spinbox2.cpp
+++ b/kalarm/lib/spinbox2.cpp
@@ -18,17 +18,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qglobal.h>
+#include <tqglobal.h>
#include <stdlib.h>
-#include <qstyle.h>
-#include <qobjectlist.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qwmatrix.h>
+#include <tqstyle.h>
+#include <tqobjectlist.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqwmatrix.h>
#include "spinbox2.moc"
#include "spinbox2private.moc"
@@ -43,29 +43,29 @@ static const char* mirrorStyles[] = {
"PlastikStyle",
0 // list terminator
};
-static bool mirrorStyle(const QStyle&);
+static bool mirrorStyle(const TQStyle&);
int SpinBox2::mReverseLayout = -1;
-SpinBox2::SpinBox2(QWidget* parent, const char* name)
- : QFrame(parent, name),
+SpinBox2::SpinBox2(TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReverseWithLayout(true)
{
- mUpdown2Frame = new QFrame(this);
- mSpinboxFrame = new QFrame(this);
+ mUpdown2Frame = new TQFrame(this);
+ mSpinboxFrame = new TQFrame(this);
mUpdown2 = new ExtraSpinBox(mUpdown2Frame, "updown2");
// mSpinbox = new MainSpinBox(0, 1, 1, this, mSpinboxFrame);
mSpinbox = new MainSpinBox(this, mSpinboxFrame);
init();
}
-SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, QWidget* parent, const char* name)
- : QFrame(parent, name),
+SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReverseWithLayout(true)
{
- mUpdown2Frame = new QFrame(this);
- mSpinboxFrame = new QFrame(this);
+ mUpdown2Frame = new TQFrame(this);
+ mSpinboxFrame = new TQFrame(this);
mUpdown2 = new ExtraSpinBox(minValue, maxValue, step2, mUpdown2Frame, "updown2");
mSpinbox = new MainSpinBox(minValue, maxValue, step, this, mSpinboxFrame);
setSteps(step, step2);
@@ -75,7 +75,7 @@ SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, QWidget* par
void SpinBox2::init()
{
if (mReverseLayout < 0)
- mReverseLayout = QApplication::reverseLayout() ? 1 : 0;
+ mReverseLayout = TQApplication::reverseLayout() ? 1 : 0;
mMinValue = mSpinbox->minValue();
mMaxValue = mSpinbox->maxValue();
mLineStep = mSpinbox->lineStep();
@@ -85,15 +85,15 @@ void SpinBox2::init()
mSpinbox->setSelectOnStep(false); // default
mUpdown2->setSelectOnStep(false); // always false
setFocusProxy(mSpinbox);
- mUpdown2->setFocusPolicy(QWidget::NoFocus);
+ mUpdown2->setFocusPolicy(TQWidget::NoFocus);
mSpinMirror = new SpinMirror(mUpdown2, mUpdown2Frame, this);
if (!mirrorStyle(style()))
mSpinMirror->hide(); // hide mirrored spin buttons when they are inappropriate
- connect(mSpinbox, SIGNAL(valueChanged(int)), SLOT(valueChange()));
- connect(mSpinbox, SIGNAL(valueChanged(int)), SIGNAL(valueChanged(int)));
- connect(mSpinbox, SIGNAL(valueChanged(const QString&)), SIGNAL(valueChanged(const QString&)));
- connect(mUpdown2, SIGNAL(stepped(int)), SLOT(stepPage(int)));
- connect(mUpdown2, SIGNAL(styleUpdated()), SLOT(updateMirror()));
+ connect(mSpinbox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(valueChange()));
+ connect(mSpinbox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(valueChanged(int)));
+ connect(mSpinbox, TQT_SIGNAL(valueChanged(const TQString&)), TQT_SIGNAL(valueChanged(const TQString&)));
+ connect(mUpdown2, TQT_SIGNAL(stepped(int)), TQT_SLOT(stepPage(int)));
+ connect(mUpdown2, TQT_SIGNAL(styleUpdated()), TQT_SLOT(updateMirror()));
}
void SpinBox2::setReadOnly(bool ro)
@@ -118,7 +118,7 @@ void SpinBox2::setReverseWithLayout(bool reverse)
void SpinBox2::setEnabled(bool enabled)
{
- QFrame::setEnabled(enabled);
+ TQFrame::setEnabled(enabled);
updateMirror();
}
@@ -128,12 +128,12 @@ void SpinBox2::setWrapping(bool on)
mUpdown2->setWrapping(on);
}
-QRect SpinBox2::up2Rect() const
+TQRect SpinBox2::up2Rect() const
{
return mUpdown2->upRect();
}
-QRect SpinBox2::down2Rect() const
+TQRect SpinBox2::down2Rect() const
{
return mUpdown2->downRect();
}
@@ -179,7 +179,7 @@ void SpinBox2::setShiftSteps(int line, int page)
}
}
-void SpinBox2::setButtonSymbols(QSpinBox::ButtonSymbols newSymbols)
+void SpinBox2::setButtonSymbols(TQSpinBox::ButtonSymbols newSymbols)
{
if (mSpinbox->buttonSymbols() == newSymbols)
return;
@@ -220,28 +220,28 @@ void SpinBox2::valueChange()
* (At construction time, the spin button widths cannot be determined correctly,
* so we need to wait until now to definitively rearrange the widget.)
*/
-void SpinBox2::showEvent(QShowEvent*)
+void SpinBox2::showEvent(TQShowEvent*)
{
arrange();
}
-QSize SpinBox2::sizeHint() const
+TQSize SpinBox2::sizeHint() const
{
getMetrics();
- QSize size = mSpinbox->sizeHint();
+ TQSize size = mSpinbox->sizeHint();
size.setWidth(size.width() - xSpinbox + wUpdown2 + wGap);
return size;
}
-QSize SpinBox2::minimumSizeHint() const
+TQSize SpinBox2::minimumSizeHint() const
{
getMetrics();
- QSize size = mSpinbox->minimumSizeHint();
+ TQSize size = mSpinbox->minimumSizeHint();
size.setWidth(size.width() - xSpinbox + wUpdown2 + wGap);
return size;
}
-void SpinBox2::styleChange(QStyle&)
+void SpinBox2::styleChange(TQStyle&)
{
if (mirrorStyle(style()))
mSpinMirror->show(); // show rounded corners with Plastik etc.
@@ -256,7 +256,7 @@ void SpinBox2::styleChange(QStyle&)
*/
void SpinBox2::updateMirror()
{
- mSpinMirror->setNormalButtons(QPixmap::grabWidget(mUpdown2Frame, 0, 0));
+ mSpinMirror->setNormalButtons(TQPixmap::grabWidget(mUpdown2Frame, 0, 0));
}
/******************************************************************************
@@ -265,15 +265,15 @@ void SpinBox2::updateMirror()
void SpinBox2::arrange()
{
getMetrics();
- QRect arrowRect = QStyle::visualRect(QRect(0, 0, wUpdown2, height()), this);
+ TQRect arrowRect = TQStyle::visualRect(TQRect(0, 0, wUpdown2, height()), this);
mUpdown2Frame->setGeometry(arrowRect);
mUpdown2->setGeometry(-xUpdown2, 0, mUpdown2->width(), height());
- mSpinboxFrame->setGeometry(QStyle::visualRect(QRect(wUpdown2 + wGap, 0, width() - wUpdown2 - wGap, height()), this));
+ mSpinboxFrame->setGeometry(TQStyle::visualRect(TQRect(wUpdown2 + wGap, 0, width() - wUpdown2 - wGap, height()), this));
mSpinbox->setGeometry(-xSpinbox, 0, mSpinboxFrame->width() + xSpinbox, height());
mSpinMirror->resize(wUpdown2, mUpdown2->height());
mSpinMirror->setGeometry(arrowRect);
-//mSpinMirror->setGeometry(QStyle::visualRect(QRect(0, 11, wUpdown2, height()), this));
- mSpinMirror->setNormalButtons(QPixmap::grabWidget(mUpdown2Frame, 0, 0));
+//mSpinMirror->setGeometry(TQStyle::visualRect(TQRect(0, 11, wUpdown2, height()), this));
+ mSpinMirror->setNormalButtons(TQPixmap::grabWidget(mUpdown2Frame, 0, 0));
}
/******************************************************************************
@@ -282,16 +282,16 @@ void SpinBox2::arrange()
*/
void SpinBox2::getMetrics() const
{
- QRect rect = mUpdown2->style().querySubControlMetrics(QStyle::CC_SpinWidget, mUpdown2, QStyle::SC_SpinWidgetButtonField);
+ TQRect rect = mUpdown2->style().querySubControlMetrics(TQStyle::CC_SpinWidget, mUpdown2, TQStyle::SC_SpinWidgetButtonField);
if (style().inherits("PlastikStyle"))
rect.setLeft(rect.left() - 1); // Plastik excludes left border from spin widget rectangle
xUpdown2 = mReverseLayout ? 0 : rect.left();
wUpdown2 = mUpdown2->width() - rect.left();
- xSpinbox = mSpinbox->style().querySubControlMetrics(QStyle::CC_SpinWidget, mSpinbox, QStyle::SC_SpinWidgetEditField).left();
+ xSpinbox = mSpinbox->style().querySubControlMetrics(TQStyle::CC_SpinWidget, mSpinbox, TQStyle::SC_SpinWidgetEditField).left();
wGap = 0;
// Make style-specific adjustments for a better appearance
- if (style().inherits("QMotifPlusStyle"))
+ if (style().inherits("TQMotifPlusStyle"))
{
xSpinbox = 0; // show the edit control left border
wGap = 2; // leave a space to the right of the left-hand pair of spin buttons
@@ -334,7 +334,7 @@ void SpinBox2::stepPage(int step)
mSpinbox->selectAll();
// Make the covering arrows image show the pressed arrow
- mSpinMirror->redraw(QPixmap::grabWidget(mUpdown2Frame, 0, 0));
+ mSpinMirror->redraw(TQPixmap::grabWidget(mUpdown2Frame, 0, 0));
}
@@ -376,7 +376,7 @@ int SpinBox2::MainSpinBox::shiftStepAdjustment(int oldValue, int shiftStep)
* presumably reasonable assumption that when a style change occurs, the spin
* buttons are unpressed.
*/
-void ExtraSpinBox::paintEvent(QPaintEvent* e)
+void ExtraSpinBox::paintEvent(TQPaintEvent* e)
{
SpinBox::paintEvent(e);
if (mNewStylePending)
@@ -391,24 +391,24 @@ void ExtraSpinBox::paintEvent(QPaintEvent* e)
= Class SpinMirror
=============================================================================*/
-SpinMirror::SpinMirror(SpinBox* spinbox, QFrame* spinFrame, QWidget* parent, const char* name)
- : QCanvasView(new QCanvas, parent, name),
+SpinMirror::SpinMirror(SpinBox* spinbox, TQFrame* spinFrame, TQWidget* parent, const char* name)
+ : TQCanvasView(new TQCanvas, parent, name),
mSpinbox(spinbox),
mSpinFrame(spinFrame),
mReadOnly(false)
{
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
+ setVScrollBarMode(TQScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
+ setFrameStyle(TQFrame::NoFrame);
// Find the spin widget which is part of the spin box, in order to
// pass on its shift-button presses.
- QObjectList* spinwidgets = spinbox->queryList("QSpinWidget", 0, false, true);
+ TQObjectList* spinwidgets = spinbox->queryList("TQSpinWidget", 0, false, true);
mSpinWidget = (SpinBox*)spinwidgets->getFirst();
delete spinwidgets;
}
-void SpinMirror::setNormalButtons(const QPixmap& px)
+void SpinMirror::setNormalButtons(const TQPixmap& px)
{
mNormalButtons = px;
redraw(mNormalButtons);
@@ -416,12 +416,12 @@ void SpinMirror::setNormalButtons(const QPixmap& px)
void SpinMirror::redraw()
{
- redraw(QPixmap::grabWidget(mSpinFrame, 0, 0));
+ redraw(TQPixmap::grabWidget(mSpinFrame, 0, 0));
}
-void SpinMirror::redraw(const QPixmap& px)
+void SpinMirror::redraw(const TQPixmap& px)
{
- QCanvas* c = canvas();
+ TQCanvas* c = canvas();
c->setBackgroundPixmap(px);
c->setAllChanged();
c->update();
@@ -430,28 +430,28 @@ void SpinMirror::redraw(const QPixmap& px)
void SpinMirror::resize(int w, int h)
{
canvas()->resize(w, h);
- QCanvasView::resize(w, h);
+ TQCanvasView::resize(w, h);
resizeContents(w, h);
- setWorldMatrix(QWMatrix(-1, 0, 0, 1, w - 1, 0)); // mirror left to right
+ setWorldMatrix(TQWMatrix(-1, 0, 0, 1, w - 1, 0)); // mirror left to right
}
/******************************************************************************
* Pass on all mouse events to the spinbox which we're covering up.
*/
-void SpinMirror::contentsMouseEvent(QMouseEvent* e)
+void SpinMirror::contentsMouseEvent(TQMouseEvent* e)
{
if (mReadOnly)
return;
- QPoint pt = contentsToViewport(e->pos());
+ TQPoint pt = contentsToViewport(e->pos());
pt.setX(pt.x() + mSpinbox->upRect().left());
- QApplication::postEvent(mSpinWidget, new QMouseEvent(e->type(), pt, e->button(), e->state()));
+ TQApplication::postEvent(mSpinWidget, new TQMouseEvent(e->type(), pt, e->button(), e->state()));
// If the mouse button has been pressed or released, refresh the spin buttons
switch (e->type())
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- QTimer::singleShot(0, this, SLOT(redraw()));
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ TQTimer::singleShot(0, this, TQT_SLOT(redraw()));
break;
default:
break;
@@ -461,36 +461,36 @@ void SpinMirror::contentsMouseEvent(QMouseEvent* e)
/******************************************************************************
* Pass on all mouse events to the spinbox which we're covering up.
*/
-void SpinMirror::contentsWheelEvent(QWheelEvent* e)
+void SpinMirror::contentsWheelEvent(TQWheelEvent* e)
{
if (mReadOnly)
return;
- QPoint pt = contentsToViewport(e->pos());
+ TQPoint pt = contentsToViewport(e->pos());
pt.setX(pt.x() + mSpinbox->upRect().left());
- QApplication::postEvent(mSpinWidget, new QWheelEvent(pt, e->delta(), e->state(), e->orientation()));
+ TQApplication::postEvent(mSpinWidget, new TQWheelEvent(pt, e->delta(), e->state(), e->orientation()));
}
/******************************************************************************
* Pass on to the main spinbox events which are needed to activate mouseover and
* other graphic effects when the mouse cursor enters and leaves the widget.
*/
-bool SpinMirror::event(QEvent* e)
+bool SpinMirror::event(TQEvent* e)
{
switch (e->type())
{
- case QEvent::Leave:
- case QEvent::Enter:
- QApplication::postEvent(mSpinWidget, new QEvent(e->type()));
- QTimer::singleShot(0, this, SLOT(redraw()));
+ case TQEvent::Leave:
+ case TQEvent::Enter:
+ TQApplication::postEvent(mSpinWidget, new TQEvent(e->type()));
+ TQTimer::singleShot(0, this, TQT_SLOT(redraw()));
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
mSpinbox->setFocus();
- QTimer::singleShot(0, this, SLOT(redraw()));
+ TQTimer::singleShot(0, this, TQT_SLOT(redraw()));
break;
default:
break;
}
- return QCanvasView::event(e);
+ return TQCanvasView::event(e);
}
@@ -502,7 +502,7 @@ bool SpinMirror::event(QEvent* e)
* Determine whether the extra pair of spin buttons needs to be mirrored
* left-to-right in the specified style.
*/
-static bool mirrorStyle(const QStyle& style)
+static bool mirrorStyle(const TQStyle& style)
{
for (const char** s = mirrorStyles; *s; ++s)
if (style.inherits(*s))
diff --git a/kalarm/lib/spinbox2.h b/kalarm/lib/spinbox2.h
index 772eaee70..06a48d1af 100644
--- a/kalarm/lib/spinbox2.h
+++ b/kalarm/lib/spinbox2.h
@@ -21,8 +21,8 @@
#ifndef SPINBOX2_H
#define SPINBOX2_H
-#include <qglobal.h>
-#include <qlineedit.h>
+#include <tqglobal.h>
+#include <tqlineedit.h>
class SpinMirror;
class ExtraSpinBox;
@@ -61,7 +61,7 @@ class SpinBox2 : public QFrame
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit SpinBox2(QWidget* parent = 0, const char* name = 0);
+ explicit SpinBox2(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
@@ -71,7 +71,7 @@ class SpinBox2 : public QFrame
* @param name The name of this widget.
*/
SpinBox2(int minValue, int maxValue, int step = 1, int step2 = 1,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
/** Sets whether the spin box can be changed by the user.
* @param readOnly True to set the widget read-only, false to set it read-write.
*/
@@ -88,22 +88,22 @@ class SpinBox2 : public QFrame
bool reverseButtons() const { return mReverseLayout && !mReverseWithLayout; }
/** Returns the spin box's text, including any prefix() and suffix(). */
- QString text() const { return mSpinbox->text(); }
+ TQString text() const { return mSpinbox->text(); }
/** Returns the prefix for the spin box's text. */
- virtual QString prefix() const { return mSpinbox->prefix(); }
+ virtual TQString prefix() const { return mSpinbox->prefix(); }
/** Returns the suffix for the spin box's text. */
- virtual QString suffix() const { return mSpinbox->suffix(); }
+ virtual TQString suffix() const { return mSpinbox->suffix(); }
/** Returns the spin box's text with no prefix(), suffix() or leading or trailing whitespace. */
- virtual QString cleanText() const { return mSpinbox->cleanText(); }
+ virtual TQString cleanText() const { return mSpinbox->cleanText(); }
/** Sets the special-value text which, if non-null, is displayed instead of a numeric
* value when the current value is equal to minValue().
*/
- virtual void setSpecialValueText(const QString& text) { mSpinbox->setSpecialValueText(text); }
+ virtual void setSpecialValueText(const TQString& text) { mSpinbox->setSpecialValueText(text); }
/** Returns the special-value text which, if non-null, is displayed instead of a numeric
* value when the current value is equal to minValue().
*/
- QString specialValueText() const { return mSpinbox->specialValueText(); }
+ TQString specialValueText() const { return mSpinbox->specialValueText(); }
/** Sets whether it is possible to step the value from the highest value to the
* lowest value and vice versa.
@@ -117,21 +117,21 @@ class SpinBox2 : public QFrame
/** Set the text alignment of the widget */
void setAlignment(int a) { mSpinbox->setAlignment(a); }
/** Sets the button symbols to use (arrows or plus/minus). */
- virtual void setButtonSymbols(QSpinBox::ButtonSymbols);
+ virtual void setButtonSymbols(TQSpinBox::ButtonSymbols);
/** Returns the button symbols currently in use (arrows or plus/minus). */
- QSpinBox::ButtonSymbols buttonSymbols() const { return mSpinbox->buttonSymbols(); }
+ TQSpinBox::ButtonSymbols buttonSymbols() const { return mSpinbox->buttonSymbols(); }
/** Sets the validator to @p v. The validator controls what keyboard input is accepted
* when the user is editing the value field.
*/
- virtual void setValidator(const QValidator* v) { mSpinbox->setValidator(v); }
+ virtual void setValidator(const TQValidator* v) { mSpinbox->setValidator(v); }
/** Returns the current validator. The validator controls what keyboard input is accepted
* when the user is editing the value field.
*/
- const QValidator* validator() const { return mSpinbox->validator(); }
+ const TQValidator* validator() const { return mSpinbox->validator(); }
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/** Returns the minimum value of the spin box. */
int minValue() const { return mMinValue; }
@@ -149,13 +149,13 @@ class SpinBox2 : public QFrame
int bound(int val) const;
/** Returns the geometry of the right-hand "up" button. */
- QRect upRect() const { return mSpinbox->upRect(); }
+ TQRect upRect() const { return mSpinbox->upRect(); }
/** Returns the geometry of the right-hand "down" button. */
- QRect downRect() const { return mSpinbox->downRect(); }
+ TQRect downRect() const { return mSpinbox->downRect(); }
/** Returns the geometry of the left-hand "up" button. */
- QRect up2Rect() const;
+ TQRect up2Rect() const;
/** Returns the geometry of the left-hand "down" button. */
- QRect down2Rect() const;
+ TQRect down2Rect() const;
/** Returns the unshifted step increment for the right-hand spin buttons,
* i.e. the amount by which the spin box value changes when a right-hand
@@ -220,9 +220,9 @@ class SpinBox2 : public QFrame
/** Sets the current value to @p val. */
virtual void setValue(int val) { mSpinbox->setValue(val); }
/** Sets the prefix which is prepended to the start of the displayed text. */
- virtual void setPrefix(const QString& text) { mSpinbox->setPrefix(text); }
+ virtual void setPrefix(const TQString& text) { mSpinbox->setPrefix(text); }
/** Sets the suffix which is prepended to the start of the displayed text. */
- virtual void setSuffix(const QString& text) { mSpinbox->setSuffix(text); }
+ virtual void setSuffix(const TQString& text) { mSpinbox->setSuffix(text); }
/** Increments the current value by adding the unshifted step increment for
* the right-hand spin buttons.
*/
@@ -248,14 +248,14 @@ class SpinBox2 : public QFrame
/** Signal which is emitted whenever the value of the spin box changes. */
void valueChanged(int value);
/** Signal which is emitted whenever the value of the spin box changes. */
- void valueChanged(const QString& valueText);
+ void valueChanged(const TQString& valueText);
protected:
- virtual QString mapValueToText(int v) { return mSpinbox->mapValToText(v); }
+ virtual TQString mapValueToText(int v) { return mSpinbox->mapValToText(v); }
virtual int mapTextToValue(bool* ok) { return mSpinbox->mapTextToVal(ok); }
- virtual void resizeEvent(QResizeEvent*) { arrange(); }
- virtual void showEvent(QShowEvent*);
- virtual void styleChange(QStyle&);
+ virtual void resizeEvent(TQResizeEvent*) { arrange(); }
+ virtual void showEvent(TQShowEvent*);
+ virtual void styleChange(TQStyle&);
virtual void getMetrics() const;
mutable int wUpdown2; // width of second spin widget
@@ -273,7 +273,7 @@ class SpinBox2 : public QFrame
private:
void init();
void arrange();
- int whichButton(QObject* spinWidget, const QPoint&);
+ int whichButton(TQObject* spinWidget, const TQPoint&);
void setShiftStepping(bool on);
// Visible spin box class.
@@ -281,14 +281,14 @@ class SpinBox2 : public QFrame
class MainSpinBox : public SpinBox
{
public:
- MainSpinBox(SpinBox2* sb2, QWidget* parent, const char* name = 0)
+ MainSpinBox(SpinBox2* sb2, TQWidget* parent, const char* name = 0)
: SpinBox(parent, name), owner(sb2) { }
- MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, QWidget* parent, const char* name = 0)
+ MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* parent, const char* name = 0)
: SpinBox(minValue, maxValue, step, parent, name), owner(sb2) { }
void setAlignment(int a) { editor()->setAlignment(a); }
- virtual QString mapValueToText(int v) { return owner->mapValueToText(v); }
+ virtual TQString mapValueToText(int v) { return owner->mapValueToText(v); }
virtual int mapTextToValue(bool* ok) { return owner->mapTextToValue(ok); }
- QString mapValToText(int v) { return SpinBox::mapValueToText(v); }
+ TQString mapValToText(int v) { return SpinBox::mapValueToText(v); }
int mapTextToVal(bool* ok) { return SpinBox::mapTextToValue(ok); }
virtual int shiftStepAdjustment(int oldValue, int shiftStep);
private:
@@ -298,8 +298,8 @@ class SpinBox2 : public QFrame
enum { NO_BUTTON = -1, UP, DOWN, UP2, DOWN2 };
static int mReverseLayout; // widgets are mirrored right to left
- QFrame* mUpdown2Frame; // contains visible part of the extra pair of spin buttons
- QFrame* mSpinboxFrame; // contains the main spin box
+ TQFrame* mUpdown2Frame; // contains visible part of the extra pair of spin buttons
+ TQFrame* mSpinboxFrame; // contains the main spin box
ExtraSpinBox* mUpdown2; // the extra pair of spin buttons
MainSpinBox* mSpinbox; // the visible spin box
SpinMirror* mSpinMirror; // image of the extra pair of spin buttons
diff --git a/kalarm/lib/spinbox2private.h b/kalarm/lib/spinbox2private.h
index 74fbeb66c..682c84b8d 100644
--- a/kalarm/lib/spinbox2private.h
+++ b/kalarm/lib/spinbox2private.h
@@ -21,7 +21,7 @@
#ifndef SPINBOX2PRIVATE_H
#define SPINBOX2PRIVATE_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include "spinbox.h"
@@ -35,15 +35,15 @@ class ExtraSpinBox : public SpinBox
{
Q_OBJECT
public:
- explicit ExtraSpinBox(QWidget* parent, const char* name = 0)
+ explicit ExtraSpinBox(TQWidget* parent, const char* name = 0)
: SpinBox(parent, name), mNewStylePending(false) { }
- ExtraSpinBox(int minValue, int maxValue, int step, QWidget* parent, const char* name = 0)
+ ExtraSpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name = 0)
: SpinBox(minValue, maxValue, step, parent, name), mNewStylePending(false) { }
signals:
void styleUpdated();
protected:
- virtual void paintEvent(QPaintEvent*);
- virtual void styleChange(QStyle&) { mNewStylePending = true; }
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void styleChange(TQStyle&) { mNewStylePending = true; }
private:
bool mNewStylePending; // style has changed, but not yet repainted
};
@@ -61,31 +61,31 @@ class SpinMirror : public QCanvasView
{
Q_OBJECT
public:
- explicit SpinMirror(SpinBox*, QFrame* spinFrame, QWidget* parent = 0, const char* name = 0);
+ explicit SpinMirror(SpinBox*, TQFrame* spinFrame, TQWidget* parent = 0, const char* name = 0);
void setReadOnly(bool ro) { mReadOnly = ro; }
bool isReadOnly() const { return mReadOnly; }
- void setNormalButtons(const QPixmap&);
- void redraw(const QPixmap&);
+ void setNormalButtons(const TQPixmap&);
+ void redraw(const TQPixmap&);
public slots:
virtual void resize(int w, int h);
void redraw();
protected:
- virtual void contentsMousePressEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsMouseReleaseEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsMouseMoveEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsMouseDoubleClickEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsWheelEvent(QWheelEvent*);
- virtual bool event(QEvent*);
+ virtual void contentsMousePressEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsWheelEvent(TQWheelEvent*);
+ virtual bool event(TQEvent*);
private:
- void contentsMouseEvent(QMouseEvent*);
+ void contentsMouseEvent(TQMouseEvent*);
SpinBox* mSpinbox; // spinbox whose spin buttons are being mirrored
- QFrame* mSpinFrame; // widget containing mSpinbox's spin buttons
- QWidget* mSpinWidget; // spin buttons in mSpinbox
- QPixmap mNormalButtons; // image of spin buttons in unpressed state
+ TQFrame* mSpinFrame; // widget containing mSpinbox's spin buttons
+ TQWidget* mSpinWidget; // spin buttons in mSpinbox
+ TQPixmap mNormalButtons; // image of spin buttons in unpressed state
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp
index 1b681d6eb..eecef7d4b 100644
--- a/kalarm/lib/synchtimer.cpp
+++ b/kalarm/lib/synchtimer.cpp
@@ -19,7 +19,7 @@
*/
#include "kalarm.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include "synchtimer.moc"
@@ -31,7 +31,7 @@
SynchTimer::SynchTimer()
{
- mTimer = new QTimer(this, "mTimer");
+ mTimer = new TQTimer(this, "mTimer");
}
SynchTimer::~SynchTimer()
@@ -43,16 +43,16 @@ SynchTimer::~SynchTimer()
/******************************************************************************
* Connect to the timer. The timer is started if necessary.
*/
-void SynchTimer::connecT(QObject* receiver, const char* member)
+void SynchTimer::connecT(TQObject* receiver, const char* member)
{
Connection connection(receiver, member);
if (mConnections.find(connection) != mConnections.end())
return; // the slot is already connected, so ignore request
- connect(mTimer, SIGNAL(timeout()), receiver, member);
+ connect(mTimer, TQT_SIGNAL(timeout()), receiver, member);
mConnections.append(connection);
if (!mTimer->isActive())
{
- connect(mTimer, SIGNAL(timeout()), this, SLOT(slotTimer()));
+ connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimer()));
start();
}
}
@@ -60,7 +60,7 @@ void SynchTimer::connecT(QObject* receiver, const char* member)
/******************************************************************************
* Disconnect from the timer. The timer is stopped if no longer needed.
*/
-void SynchTimer::disconnecT(QObject* receiver, const char* member)
+void SynchTimer::disconnecT(TQObject* receiver, const char* member)
{
if (mTimer)
{
@@ -69,7 +69,7 @@ void SynchTimer::disconnecT(QObject* receiver, const char* member)
mConnections.remove(Connection(receiver, member));
else
{
- for (QValueList<Connection>::Iterator it = mConnections.begin(); it != mConnections.end(); )
+ for (TQValueList<Connection>::Iterator it = mConnections.begin(); it != mConnections.end(); )
{
if ((*it).receiver == receiver)
it = mConnections.remove(it);
@@ -109,7 +109,7 @@ MinuteTimer* MinuteTimer::instance()
void MinuteTimer::slotTimer()
{
kdDebug(5950) << "MinuteTimer::slotTimer()" << endl;
- int interval = 62 - QTime::currentTime().second();
+ int interval = 62 - TQTime::currentTime().second();
mTimer->start(interval * 1000, true); // execute a single shot
}
@@ -119,9 +119,9 @@ void MinuteTimer::slotTimer()
= Application-wide timer synchronised to midnight.
=============================================================================*/
-QValueList<DailyTimer*> DailyTimer::mFixedTimers;
+TQValueList<DailyTimer*> DailyTimer::mFixedTimers;
-DailyTimer::DailyTimer(const QTime& timeOfDay, bool fixed)
+DailyTimer::DailyTimer(const TQTime& timeOfDay, bool fixed)
: mTime(timeOfDay),
mFixed(fixed)
{
@@ -135,9 +135,9 @@ DailyTimer::~DailyTimer()
mFixedTimers.remove(this);
}
-DailyTimer* DailyTimer::fixedInstance(const QTime& timeOfDay, bool create)
+DailyTimer* DailyTimer::fixedInstance(const TQTime& timeOfDay, bool create)
{
- for (QValueList<DailyTimer*>::Iterator it = mFixedTimers.begin(); it != mFixedTimers.end(); ++it)
+ for (TQValueList<DailyTimer*>::Iterator it = mFixedTimers.begin(); it != mFixedTimers.end(); ++it)
if ((*it)->mTime == timeOfDay)
return *it;
return create ? new DailyTimer(timeOfDay, true) : 0;
@@ -147,7 +147,7 @@ DailyTimer* DailyTimer::fixedInstance(const QTime& timeOfDay, bool create)
* Disconnect from the timer signal which triggers at the given fixed time of day.
* If there are no remaining connections to that timer, it is destroyed.
*/
-void DailyTimer::disconnect(const QTime& timeOfDay, QObject* receiver, const char* member)
+void DailyTimer::disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member)
{
DailyTimer* timer = fixedInstance(timeOfDay, false);
if (!timer)
@@ -160,7 +160,7 @@ void DailyTimer::disconnect(const QTime& timeOfDay, QObject* receiver, const cha
/******************************************************************************
* Change the time at which the variable timer triggers.
*/
-void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
+void DailyTimer::changeTime(const TQTime& newTimeOfDay, bool triggerMissed)
{
if (mFixed)
return;
@@ -170,7 +170,7 @@ void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
bool triggerNow = false;
if (triggerMissed)
{
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
if (now >= newTimeOfDay && now < mTime)
{
// The trigger time is now earlier and it has already arrived today.
@@ -196,7 +196,7 @@ void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
void DailyTimer::start()
{
// TIMEZONE = local time
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// Find out whether to trigger today or tomorrow.
// In preference, use the last trigger date to determine this, since
// that will avoid possible errors due to daylight savings time changes.
@@ -205,11 +205,11 @@ void DailyTimer::start()
today = (mLastDate < now.date());
else
today = (now.time() < mTime);
- QDateTime next;
+ TQDateTime next;
if (today)
- next = QDateTime(now.date(), mTime);
+ next = TQDateTime(now.date(), mTime);
else
- next = QDateTime(now.date().addDays(1), mTime);
+ next = TQDateTime(now.date().addDays(1), mTime);
uint interval = next.toTime_t() - now.toTime_t();
mTimer->start(interval * 1000, true); // execute a single shot
kdDebug(5950) << "DailyTimer::start(at " << mTime.hour() << ":" << mTime.minute() << "): interval = " << interval/3600 << ":" << (interval/60)%60 << ":" << interval%60 << endl;
@@ -224,9 +224,9 @@ void DailyTimer::start()
void DailyTimer::slotTimer()
{
// TIMEZONE = local time
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mLastDate = now.date();
- QDateTime next = QDateTime(mLastDate.addDays(1), mTime);
+ TQDateTime next = TQDateTime(mLastDate.addDays(1), mTime);
uint interval = next.toTime_t() - now.toTime_t();
mTimer->start(interval * 1000, true); // execute a single shot
kdDebug(5950) << "DailyTimer::slotTimer(at " << mTime.hour() << ":" << mTime.minute() << "): interval = " << interval/3600 << ":" << (interval/60)%60 << ":" << interval%60 << endl;
diff --git a/kalarm/lib/synchtimer.h b/kalarm/lib/synchtimer.h
index 551fd1687..1860815e7 100644
--- a/kalarm/lib/synchtimer.h
+++ b/kalarm/lib/synchtimer.h
@@ -23,10 +23,10 @@
/* @file synchtimer.h - timers which synchronise to time boundaries */
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
class QTimer;
/** SynchTimer is a virtual base class for application-wide timers synchronised
@@ -43,29 +43,29 @@ class SynchTimer : public QObject
struct Connection
{
Connection() { }
- Connection(QObject* r, const char* s) : receiver(r), slot(s) { }
+ Connection(TQObject* r, const char* s) : receiver(r), slot(s) { }
bool operator==(const Connection& c) const { return receiver == c.receiver && slot == c.slot; }
- QObject* receiver;
- const QCString slot;
+ TQObject* receiver;
+ const TQCString slot;
};
protected:
SynchTimer();
virtual void start() = 0;
- void connecT(QObject* receiver, const char* member);
- void disconnecT(QObject* receiver, const char* member = 0);
+ void connecT(TQObject* receiver, const char* member);
+ void disconnecT(TQObject* receiver, const char* member = 0);
bool hasConnections() const { return !mConnections.isEmpty(); }
- QTimer* mTimer;
+ TQTimer* mTimer;
protected slots:
virtual void slotTimer() = 0;
private slots:
- void slotReceiverGone(QObject* r) { disconnecT(r); }
+ void slotReceiverGone(TQObject* r) { disconnecT(r); }
private:
SynchTimer(const SynchTimer&); // prohibit copying
- QValueList<Connection> mConnections; // list of current clients
+ TQValueList<Connection> mConnections; // list of current clients
};
@@ -82,14 +82,14 @@ class MinuteTimer : public SynchTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
+ static void connect(TQObject* receiver, const char* member)
{ instance()->connecT(receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
+ static void disconnect(TQObject* receiver, const char* member = 0)
{ if (mInstance) mInstance->disconnecT(receiver, member); }
protected:
@@ -123,7 +123,7 @@ class DailyTimer : public SynchTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(const QTime& timeOfDay, QObject* receiver, const char* member)
+ static void connect(const TQTime& timeOfDay, TQObject* receiver, const char* member)
{ fixedInstance(timeOfDay)->connecT(receiver, member); }
/** Disconnect from the timer signal which triggers at the given fixed time of day.
* If there are no remaining connections to that timer, it is destroyed.
@@ -132,16 +132,16 @@ class DailyTimer : public SynchTimer
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(const QTime& timeOfDay, QObject* receiver, const char* member = 0);
+ static void disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member = 0);
/** Change the time at which this variable timer triggers.
* @param newTimeOfDay New time at which the timer should trigger.
* @param triggerMissed If true, and if @p newTimeOfDay < @p oldTimeOfDay, and if the current
* time is between @p newTimeOfDay and @p oldTimeOfDay, the timer will be
* triggered immediately so as to avoid missing today's trigger.
*/
- void changeTime(const QTime& newTimeOfDay, bool triggerMissed = true);
+ void changeTime(const TQTime& newTimeOfDay, bool triggerMissed = true);
/** Return the current time of day at which this variable timer triggers. */
- QTime timeOfDay() const { return mTime; }
+ TQTime timeOfDay() const { return mTime; }
protected:
/** Construct an instance.
@@ -149,7 +149,7 @@ class DailyTimer : public SynchTimer
* can construct instances. This ensures that multiple timers are not created for the same
* use.
*/
- DailyTimer(const QTime&, bool fixed);
+ DailyTimer(const TQTime&, bool fixed);
/** Return the instance which triggers at the specified fixed time of day,
* optionally creating a new instance if necessary.
* @param timeOfDay Time at which the timer triggers.
@@ -157,16 +157,16 @@ class DailyTimer : public SynchTimer
* for @p timeOfDay.
* @return The instance for @p timeOfDay, or 0 if it does not exist.
*/
- static DailyTimer* fixedInstance(const QTime& timeOfDay, bool create = true);
+ static DailyTimer* fixedInstance(const TQTime& timeOfDay, bool create = true);
virtual void start();
protected slots:
virtual void slotTimer();
private:
- static QValueList<DailyTimer*> mFixedTimers; // list of timers whose trigger time is fixed
- QTime mTime;
- QDate mLastDate; // the date on which the timer was last triggered
+ static TQValueList<DailyTimer*> mFixedTimers; // list of timers whose trigger time is fixed
+ TQTime mTime;
+ TQDate mLastDate; // the date on which the timer was last triggered
bool mFixed; // the time at which the timer triggers cannot be changed
};
@@ -182,15 +182,15 @@ class MidnightTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
- { DailyTimer::connect(QTime(0,0), receiver, member); }
+ static void connect(TQObject* receiver, const char* member)
+ { DailyTimer::connect(TQTime(0,0), receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
- { DailyTimer::disconnect(QTime(0,0), receiver, member); }
+ static void disconnect(TQObject* receiver, const char* member = 0)
+ { DailyTimer::disconnect(TQTime(0,0), receiver, member); }
};
diff --git a/kalarm/lib/timeedit.cpp b/kalarm/lib/timeedit.cpp
index 8aabb90b6..01152fcee 100644
--- a/kalarm/lib/timeedit.cpp
+++ b/kalarm/lib/timeedit.cpp
@@ -28,8 +28,8 @@
#include "timeedit.moc"
-TimeEdit::TimeEdit(QWidget* parent, const char* name)
- : QHBox(parent, name),
+TimeEdit::TimeEdit(TQWidget* parent, const char* name)
+ : TQHBox(parent, name),
mAmPm(0),
mAmIndex(-1),
mPmIndex(-1),
@@ -38,13 +38,13 @@ TimeEdit::TimeEdit(QWidget* parent, const char* name)
bool use12hour = KGlobal::locale()->use12Clock();
mSpinBox = new TimeSpinBox(!use12hour, this);
mSpinBox->setFixedSize(mSpinBox->sizeHint());
- connect(mSpinBox, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
if (use12hour)
{
mAmPm = new ComboBox(this);
setAmPmCombo(1, 1); // add "am" and "pm" options to the combo box
mAmPm->setFixedSize(mAmPm->sizeHint());
- connect(mAmPm, SIGNAL(highlighted(int)), SLOT(slotAmPmChanged(int)));
+ connect(mAmPm, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotAmPmChanged(int)));
}
}
diff --git a/kalarm/lib/timeedit.h b/kalarm/lib/timeedit.h
index 5888c7665..9cbfb6f8c 100644
--- a/kalarm/lib/timeedit.h
+++ b/kalarm/lib/timeedit.h
@@ -21,8 +21,8 @@
#ifndef TIMEEDIT_H
#define TIMEEDIT_H
-#include <qdatetime.h>
-#include <qhbox.h>
+#include <tqdatetime.h>
+#include <tqhbox.h>
class ComboBox;
class TimeSpinBox;
@@ -55,7 +55,7 @@ class TimeEdit : public QHBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit TimeEdit(QWidget* parent = 0, const char* name = 0);
+ explicit TimeEdit(TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
@@ -74,8 +74,8 @@ class TimeEdit : public QHBox
void setValid(bool valid);
/** Returns the entered time as a value in minutes. */
int value() const;
- /** Returns the entered time as a QTime value. */
- QTime time() const { int m = value(); return QTime(m/60, m%60); }
+ /** Returns the entered time as a TQTime value. */
+ TQTime time() const { int m = value(); return TQTime(m/60, m%60); }
/** Returns true if it is possible to step the value from the highest value to the lowest value and vice versa. */
bool wrapping() const;
/** Sets whether it is possible to step the value from the highest value to the lowest value and vice versa.
@@ -86,19 +86,19 @@ class TimeEdit : public QHBox
int minValue() const;
/** Returns the maximum value of the widget in minutes. */
int maxValue() const;
- /** Returns the maximum value of the widget as a QTime value. */
- QTime maxTime() const { int mv = maxValue(); return QTime(mv/60, mv%60); }
+ /** Returns the maximum value of the widget as a TQTime value. */
+ TQTime maxTime() const { int mv = maxValue(); return TQTime(mv/60, mv%60); }
/** Sets the minimum value of the widget. */
void setMinValue(int minutes);
/** Sets the maximum value of the widget. */
void setMaxValue(int minutes);
/** Sets the maximum value of the widget. */
- void setMaxValue(const QTime& time) { setMaxValue(time.hour()*60 + time.minute()); }
+ void setMaxValue(const TQTime& time) { setMaxValue(time.hour()*60 + time.minute()); }
public slots:
/** Sets the value of the widget. */
virtual void setValue(int minutes);
/** Sets the value of the widget. */
- void setValue(const QTime& t) { setValue(t.hour()*60 + t.minute()); }
+ void setValue(const TQTime& t) { setValue(t.hour()*60 + t.minute()); }
signals:
/** This signal is emitted every time the value of the widget changes
* (for whatever reason).
diff --git a/kalarm/lib/timeperiod.cpp b/kalarm/lib/timeperiod.cpp
index 22a7c3179..e372615a7 100644
--- a/kalarm/lib/timeperiod.cpp
+++ b/kalarm/lib/timeperiod.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qwidgetstack.h>
-#include <qwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdialog.h>
@@ -34,14 +34,14 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString TimePeriod::i18n_minutes() { return i18n("minutes"); }
-QString TimePeriod::i18n_Minutes() { return i18n("Minutes"); }
-QString TimePeriod::i18n_hours_mins() { return i18n("hours/minutes"); }
-QString TimePeriod::i18n_Hours_Mins() { return i18n("Hours/Minutes"); }
-QString TimePeriod::i18n_days() { return i18n("days"); }
-QString TimePeriod::i18n_Days() { return i18n("Days"); }
-QString TimePeriod::i18n_weeks() { return i18n("weeks"); }
-QString TimePeriod::i18n_Weeks() { return i18n("Weeks"); }
+TQString TimePeriod::i18n_minutes() { return i18n("minutes"); }
+TQString TimePeriod::i18n_Minutes() { return i18n("Minutes"); }
+TQString TimePeriod::i18n_hours_mins() { return i18n("hours/minutes"); }
+TQString TimePeriod::i18n_Hours_Mins() { return i18n("Hours/Minutes"); }
+TQString TimePeriod::i18n_days() { return i18n("days"); }
+TQString TimePeriod::i18n_Days() { return i18n("Days"); }
+TQString TimePeriod::i18n_weeks() { return i18n("weeks"); }
+TQString TimePeriod::i18n_Weeks() { return i18n("Weeks"); }
static const int maxMinutes = 1000*60-1; // absolute maximum value for hours:minutes = 999H59M
@@ -50,25 +50,25 @@ static const int maxMinutes = 1000*60-1; // absolute maximum value for hours:m
= Contains a time unit combo box, plus a time spinbox, to select a time period.
=============================================================================*/
-TimePeriod::TimePeriod(bool allowHourMinute, QWidget* parent, const char* name)
- : QHBox(parent, name),
+TimePeriod::TimePeriod(bool allowHourMinute, TQWidget* parent, const char* name)
+ : TQHBox(parent, name),
mMaxDays(9999),
mNoHourMinute(!allowHourMinute),
mReadOnly(false)
{
setSpacing(KDialog::spacingHint());
- mSpinStack = new QWidgetStack(this);
+ mSpinStack = new TQWidgetStack(this);
mSpinBox = new SpinBox(mSpinStack);
mSpinBox->setLineStep(1);
mSpinBox->setLineShiftStep(10);
mSpinBox->setRange(1, mMaxDays);
- connect(mSpinBox, SIGNAL(valueChanged(int)), SLOT(slotDaysChanged(int)));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDaysChanged(int)));
mSpinStack->addWidget(mSpinBox, 0);
mTimeSpinBox = new TimeSpinBox(0, 99999, mSpinStack);
mTimeSpinBox->setRange(1, maxMinutes); // max 999H59M
- connect(mTimeSpinBox, SIGNAL(valueChanged(int)), SLOT(slotTimeChanged(int)));
+ connect(mTimeSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotTimeChanged(int)));
mSpinStack->addWidget(mTimeSpinBox, 1);
mSpinStack->setFixedSize(mSpinBox->sizeHint().expandedTo(mTimeSpinBox->sizeHint()));
@@ -88,7 +88,7 @@ TimePeriod::TimePeriod(bool allowHourMinute, QWidget* parent, const char* name)
mUnitsCombo->insertItem(i18n_weeks());
mMaxUnitShown = WEEKS;
mUnitsCombo->setFixedSize(mUnitsCombo->sizeHint());
- connect(mUnitsCombo, SIGNAL(activated(int)), SLOT(slotUnitsSelected(int)));
+ connect(mUnitsCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotUnitsSelected(int)));
setFocusProxy(mUnitsCombo);
setTabOrder(mUnitsCombo, mSpinStack);
@@ -376,9 +376,9 @@ void TimePeriod::showHourMin(bool hourMinute)
* If the hours:minutes text is omitted, both spinboxes are set to the same
* WhatsThis text.
*/
-void TimePeriod::setWhatsThis(const QString& units, const QString& dayWeek, const QString& hourMin)
+void TimePeriod::setWhatsThis(const TQString& units, const TQString& dayWeek, const TQString& hourMin)
{
- QWhatsThis::add(mUnitsCombo, units);
- QWhatsThis::add(mSpinBox, dayWeek);
- QWhatsThis::add(mTimeSpinBox, (hourMin.isNull() ? dayWeek : hourMin));
+ TQWhatsThis::add(mUnitsCombo, units);
+ TQWhatsThis::add(mSpinBox, dayWeek);
+ TQWhatsThis::add(mTimeSpinBox, (hourMin.isNull() ? dayWeek : hourMin));
}
diff --git a/kalarm/lib/timeperiod.h b/kalarm/lib/timeperiod.h
index ef1a3b5c3..2f9513dcd 100644
--- a/kalarm/lib/timeperiod.h
+++ b/kalarm/lib/timeperiod.h
@@ -21,8 +21,8 @@
#ifndef TIMEPERIOD_H
#define TIMEPERIOD_H
-#include <qhbox.h>
-#include <qstring.h>
+#include <tqhbox.h>
+#include <tqstring.h>
class QWidgetStack;
class ComboBox;
@@ -67,7 +67,7 @@ class TimePeriod : public QHBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- TimePeriod(bool allowMinute, QWidget* parent, const char* name = 0);
+ TimePeriod(bool allowMinute, TQWidget* parent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
@@ -103,16 +103,16 @@ class TimePeriod : public QHBox
/** Sets separate WhatsThis texts for the count spin boxes and the units combo box.
* If @p hourMin is omitted, both spin boxes are set to the same WhatsThis text.
*/
- void setWhatsThis(const QString& units, const QString& dayWeek, const QString& hourMin = QString::null);
+ void setWhatsThis(const TQString& units, const TQString& dayWeek, const TQString& hourMin = TQString::null);
- static QString i18n_minutes(); // text of 'minutes' units, lower case
- static QString i18n_Minutes(); // text of 'Minutes' units, initial capitals
- static QString i18n_hours_mins(); // text of 'hours/minutes' units, lower case
- static QString i18n_Hours_Mins(); // text of 'Hours/Minutes' units, initial capitals
- static QString i18n_days(); // text of 'days' units, lower case
- static QString i18n_Days(); // text of 'Days' units, initial capital
- static QString i18n_weeks(); // text of 'weeks' units, lower case
- static QString i18n_Weeks(); // text of 'Weeks' units, initial capital
+ static TQString i18n_minutes(); // text of 'minutes' units, lower case
+ static TQString i18n_Minutes(); // text of 'Minutes' units, initial capitals
+ static TQString i18n_hours_mins(); // text of 'hours/minutes' units, lower case
+ static TQString i18n_Hours_Mins(); // text of 'Hours/Minutes' units, initial capitals
+ static TQString i18n_days(); // text of 'days' units, lower case
+ static TQString i18n_Days(); // text of 'Days' units, initial capital
+ static TQString i18n_weeks(); // text of 'weeks' units, lower case
+ static TQString i18n_Weeks(); // text of 'Weeks' units, initial capital
signals:
/** This signal is emitted whenever the value held in the widget changes.
@@ -131,7 +131,7 @@ class TimePeriod : public QHBox
void showHourMin(bool hourMin);
void adjustDayWeekShown();
- QWidgetStack* mSpinStack; // displays either the days/weeks or hours:minutes spinbox
+ TQWidgetStack* mSpinStack; // displays either the days/weeks or hours:minutes spinbox
SpinBox* mSpinBox; // the minutes/days/weeks value spinbox
TimeSpinBox* mTimeSpinBox; // the hours:minutes value spinbox
ComboBox* mUnitsCombo;
diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp
index 7a22cd230..20073d878 100644
--- a/kalarm/lib/timespinbox.cpp
+++ b/kalarm/lib/timespinbox.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qvalidator.h>
-#include <qlineedit.h>
+#include <tqvalidator.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include "timespinbox.moc"
@@ -30,10 +30,10 @@
class TimeSpinBox::TimeValidator : public QValidator
{
public:
- TimeValidator(int minMin, int maxMin, QWidget* parent, const char* name = 0)
- : QValidator(parent, name),
+ TimeValidator(int minMin, int maxMin, TQWidget* parent, const char* name = 0)
+ : TQValidator(parent, name),
minMinute(minMin), maxMinute(maxMin), m12Hour(false), mPm(false) { }
- virtual State validate(QString&, int&) const;
+ virtual State validate(TQString&, int&) const;
int minMinute, maxMinute;
bool m12Hour;
bool mPm;
@@ -54,7 +54,7 @@ class TimeSpinBox::TimeValidator : public QValidator
/******************************************************************************
* Construct a wrapping 00:00 - 23:59, or 12:00 - 11:59 time spin box.
*/
-TimeSpinBox::TimeSpinBox(bool use24hour, QWidget* parent, const char* name)
+TimeSpinBox::TimeSpinBox(bool use24hour, TQWidget* parent, const char* name)
: SpinBox2(0, 1439, 1, 60, parent, name),
mMinimumValue(0),
m12Hour(!use24hour),
@@ -70,13 +70,13 @@ TimeSpinBox::TimeSpinBox(bool use24hour, QWidget* parent, const char* name)
setShiftSteps(5, 360); // shift-left button increments 5 min / 6 hours
setSelectOnStep(false);
setAlignment(Qt::AlignHCenter);
- connect(this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ connect(this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
}
/******************************************************************************
* Construct a non-wrapping time spin box.
*/
-TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, QWidget* parent, const char* name)
+TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent, const char* name)
: SpinBox2(minMinute, maxMinute, 1, 60, parent, name),
mMinimumValue(minMinute),
m12Hour(false),
@@ -88,20 +88,20 @@ TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, QWidget* parent, const ch
setReverseWithLayout(false); // keep buttons the same way round even if right-to-left language
setShiftSteps(5, 300); // shift-left button increments 5 min / 5 hours
setSelectOnStep(false);
- setAlignment(QApplication::reverseLayout() ? Qt::AlignLeft : Qt::AlignRight);
+ setAlignment(TQApplication::reverseLayout() ? Qt::AlignLeft : Qt::AlignRight);
}
-QString TimeSpinBox::shiftWhatsThis()
+TQString TimeSpinBox::shiftWhatsThis()
{
return i18n("Press the Shift key while clicking the spin buttons to adjust the time by a larger step (6 hours / 5 minutes).");
}
-QTime TimeSpinBox::time() const
+TQTime TimeSpinBox::time() const
{
- return QTime(value() / 60, value() % 60);
+ return TQTime(value() / 60, value() % 60);
}
-QString TimeSpinBox::mapValueToText(int v)
+TQString TimeSpinBox::mapValueToText(int v)
{
if (m12Hour)
{
@@ -110,7 +110,7 @@ QString TimeSpinBox::mapValueToText(int v)
else if (v >= 780)
v -= 720; // convert 13 - 23 hours to 1 - 11
}
- QString s;
+ TQString s;
s.sprintf((wrapping() ? "%02d:%02d" : "%d:%02d"), v/60, v%60);
return s;
}
@@ -123,13 +123,13 @@ QString TimeSpinBox::mapValueToText(int v)
*/
int TimeSpinBox::mapTextToValue(bool* ok)
{
- QString text = cleanText();
+ TQString text = cleanText();
int colon = text.find(':');
if (colon >= 0)
{
// [h]:m format for any time value
- QString hour = text.left(colon).stripWhiteSpace();
- QString minute = text.mid(colon + 1).stripWhiteSpace();
+ TQString hour = text.left(colon).stripWhiteSpace();
+ TQString minute = text.mid(colon + 1).stripWhiteSpace();
if (!minute.isEmpty())
{
bool okmin;
@@ -204,14 +204,14 @@ void TimeSpinBox::setValid(bool valid)
mInvalid = false;
if (value() < mMinimumValue)
SpinBox2::setValue(mMinimumValue);
- setSpecialValueText(QString());
+ setSpecialValueText(TQString());
SpinBox2::setMinValue(mMinimumValue);
}
else if (!valid && !mInvalid)
{
mInvalid = true;
SpinBox2::setMinValue(mMinimumValue - 1);
- setSpecialValueText(QString::fromLatin1("**:**"));
+ setSpecialValueText(TQString::fromLatin1("**:**"));
SpinBox2::setValue(mMinimumValue - 1);
}
}
@@ -241,7 +241,7 @@ void TimeSpinBox::setValue(int minutes)
if (mInvalid)
{
mInvalid = false;
- setSpecialValueText(QString());
+ setSpecialValueText(TQString());
SpinBox2::setMinValue(mMinimumValue);
}
SpinBox2::setValue(minutes);
@@ -280,18 +280,18 @@ void TimeSpinBox::slotValueChanged(int value)
mPm = mValidator->mPm = (value >= 720);
}
-QSize TimeSpinBox::sizeHint() const
+TQSize TimeSpinBox::sizeHint() const
{
- QSize sz = SpinBox2::sizeHint();
- QFontMetrics fm(font());
- return QSize(sz.width() + fm.width(":"), sz.height());
+ TQSize sz = SpinBox2::sizeHint();
+ TQFontMetrics fm(font());
+ return TQSize(sz.width() + fm.width(":"), sz.height());
}
-QSize TimeSpinBox::minimumSizeHint() const
+TQSize TimeSpinBox::minimumSizeHint() const
{
- QSize sz = SpinBox2::minimumSizeHint();
- QFontMetrics fm(font());
- return QSize(sz.width() + fm.width(":"), sz.height());
+ TQSize sz = SpinBox2::minimumSizeHint();
+ TQFontMetrics fm(font());
+ return TQSize(sz.width() + fm.width(":"), sz.height());
}
/******************************************************************************
@@ -299,24 +299,24 @@ QSize TimeSpinBox::minimumSizeHint() const
* The entered time must either be 4 digits, or it must contain a colon, but
* hours may be blank.
*/
-QValidator::State TimeSpinBox::TimeValidator::validate(QString& text, int& /*cursorPos*/) const
+TQValidator::State TimeSpinBox::TimeValidator::validate(TQString& text, int& /*cursorPos*/) const
{
- QString cleanText = text.stripWhiteSpace();
+ TQString cleanText = text.stripWhiteSpace();
if (cleanText.isEmpty())
- return QValidator::Intermediate;
- QValidator::State state = QValidator::Acceptable;
- QString hour;
+ return TQValidator::Intermediate;
+ TQValidator::State state = TQValidator::Acceptable;
+ TQString hour;
bool ok;
int hr = 0;
int mn = 0;
int colon = cleanText.find(':');
if (colon >= 0)
{
- QString minute = cleanText.mid(colon + 1);
+ TQString minute = cleanText.mid(colon + 1);
if (minute.isEmpty())
- state = QValidator::Intermediate;
+ state = TQValidator::Intermediate;
else if ((mn = minute.toUInt(&ok)) >= 60 || !ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
hour = cleanText.left(colon);
}
@@ -324,19 +324,19 @@ QValidator::State TimeSpinBox::TimeValidator::validate(QString& text, int& /*cur
{
// The hhmm form of entry is only allowed for time-of-day, i.e. <= 2359
hour = cleanText;
- state = QValidator::Intermediate;
+ state = TQValidator::Intermediate;
}
else
{
if (cleanText.length() > 4)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if (cleanText.length() < 4)
- state = QValidator::Intermediate;
+ state = TQValidator::Intermediate;
hour = cleanText.left(2);
- QString minute = cleanText.mid(2);
+ TQString minute = cleanText.mid(2);
if (!minute.isEmpty()
&& ((mn = minute.toUInt(&ok)) >= 60 || !ok))
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
if (!hour.isEmpty())
@@ -352,13 +352,13 @@ QValidator::State TimeSpinBox::TimeValidator::validate(QString& text, int& /*cur
hr += 12; // convert to PM
}
if (!ok || hr > maxMinute/60)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
- if (state == QValidator::Acceptable)
+ if (state == TQValidator::Acceptable)
{
int t = hr * 60 + mn;
if (t < minMinute || t > maxMinute)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
return state;
}
diff --git a/kalarm/lib/timespinbox.h b/kalarm/lib/timespinbox.h
index 275fdf309..909541ad9 100644
--- a/kalarm/lib/timespinbox.h
+++ b/kalarm/lib/timespinbox.h
@@ -21,7 +21,7 @@
#ifndef TIMESPINBOX_H
#define TIMESPINBOX_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "spinbox2.h"
@@ -52,14 +52,14 @@ class TimeSpinBox : public SpinBox2
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit TimeSpinBox(bool use24hour, QWidget* parent = 0, const char* name = 0);
+ explicit TimeSpinBox(bool use24hour, TQWidget* parent = 0, const char* name = 0);
/** Constructor for a non-wrapping time spin box which can be used to enter a length of time.
* @param minMinute The minimum value which the spin box can hold, in minutes.
* @param maxMinute The maximum value which the spin box can hold, in minutes.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- TimeSpinBox(int minMinute, int maxMinute, QWidget* parent = 0, const char* name = 0);
+ TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent = 0, const char* name = 0);
/** Returns true if the spin box holds a valid value.
* An invalid value is displayed as asterisks.
*/
@@ -72,7 +72,7 @@ class TimeSpinBox : public SpinBox2
/** Returns the current value held in the spin box.
* If an invalid value is displayed, returns a value lower than the minimum value.
*/
- QTime time() const;
+ TQTime time() const;
/** Sets the maximum value which can be held in the spin box.
* @param minutes The maximum value expressed in minutes.
*/
@@ -82,16 +82,16 @@ class TimeSpinBox : public SpinBox2
*/
virtual void setMaxValue(int minutes) { SpinBox2::setMaxValue(minutes); }
/** Sets the maximum value which can be held in the spin box. */
- void setMaxValue(const QTime& t) { SpinBox2::setMaxValue(t.hour()*60 + t.minute()); }
+ void setMaxValue(const TQTime& t) { SpinBox2::setMaxValue(t.hour()*60 + t.minute()); }
/** Returns the maximum value which can be held in the spin box. */
- QTime maxTime() const { int mv = maxValue(); return QTime(mv/60, mv%60); }
+ TQTime maxTime() const { int mv = maxValue(); return TQTime(mv/60, mv%60); }
/** Returns a text describing use of the shift key as an accelerator for
* the spin buttons, designed for incorporation into WhatsThis texts.
*/
- static QString shiftWhatsThis();
+ static TQString shiftWhatsThis();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
/** Sets the value of the spin box.
@@ -99,7 +99,7 @@ class TimeSpinBox : public SpinBox2
*/
virtual void setValue(int minutes);
/** Sets the value of the spin box. */
- void setValue(const QTime& t) { setValue(t.hour()*60 + t.minute()); }
+ void setValue(const TQTime& t) { setValue(t.hour()*60 + t.minute()); }
/** Increments the spin box value.
* If the value was previously invalid, the spin box is set to the minimum value.
*/
@@ -110,7 +110,7 @@ class TimeSpinBox : public SpinBox2
virtual void stepDown();
protected:
- virtual QString mapValueToText(int v);
+ virtual TQString mapValueToText(int v);
virtual int mapTextToValue(bool* ok);
private slots:
void slotValueChanged(int value);
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp
index 01ddc83d3..a3e8e423f 100644
--- a/kalarm/mainwindow.cpp
+++ b/kalarm/mainwindow.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qiconset.h>
-#include <qdragobject.h>
-#include <qheader.h>
+#include <tqiconset.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
#include <kmenubar.h>
#include <ktoolbar.h>
@@ -71,19 +71,19 @@ using namespace KCal;
static const char* UI_FILE = "kalarmui.rc";
static const char* WINDOW_NAME = "MainWindow";
-static const QString VIEW_GROUP = QString::fromLatin1("View");
-static const QString SHOW_TIME_KEY = QString::fromLatin1("ShowAlarmTime");
-static const QString SHOW_TIME_TO_KEY = QString::fromLatin1("ShowTimeToAlarm");
-static const QString SHOW_ARCHIVED_KEY = QString::fromLatin1("ShowArchivedAlarms");
-static const QString SHOW_RESOURCES_KEY = QString::fromLatin1("ShowResources");
+static const TQString VIEW_GROUP = TQString::fromLatin1("View");
+static const TQString SHOW_TIME_KEY = TQString::fromLatin1("ShowAlarmTime");
+static const TQString SHOW_TIME_TO_KEY = TQString::fromLatin1("ShowTimeToAlarm");
+static const TQString SHOW_ARCHIVED_KEY = TQString::fromLatin1("ShowArchivedAlarms");
+static const TQString SHOW_RESOURCES_KEY = TQString::fromLatin1("ShowResources");
-static QString undoText;
-static QString undoTextStripped;
-static QString undoIcon;
+static TQString undoText;
+static TQString undoTextStripped;
+static TQString undoIcon;
static KShortcut undoShortcut;
-static QString redoText;
-static QString redoTextStripped;
-static QString redoIcon;
+static TQString redoText;
+static TQString redoTextStripped;
+static TQString redoIcon;
static KShortcut redoShortcut;
@@ -96,14 +96,14 @@ TemplateDlg* MainWindow::mTemplateDlg = 0;
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString MainWindow::i18n_a_ShowAlarmTimes() { return i18n("Show &Alarm Times"); }
-QString MainWindow::i18n_m_ShowAlarmTime() { return i18n("Show alarm ti&me"); }
-QString MainWindow::i18n_o_ShowTimeToAlarms() { return i18n("Show Time t&o Alarms"); }
-QString MainWindow::i18n_l_ShowTimeToAlarm() { return i18n("Show time unti&l alarm"); }
-QString MainWindow::i18n_ShowExpiredAlarms() { return i18n("Show Expired Alarms"); }
-QString MainWindow::i18n_e_ShowExpiredAlarms() { return i18n("Show &Expired Alarms"); }
-QString MainWindow::i18n_HideExpiredAlarms() { return i18n("Hide Expired Alarms"); }
-QString MainWindow::i18n_e_HideExpiredAlarms() { return i18n("Hide &Expired Alarms"); }
+TQString MainWindow::i18n_a_ShowAlarmTimes() { return i18n("Show &Alarm Times"); }
+TQString MainWindow::i18n_m_ShowAlarmTime() { return i18n("Show alarm ti&me"); }
+TQString MainWindow::i18n_o_ShowTimeToAlarms() { return i18n("Show Time t&o Alarms"); }
+TQString MainWindow::i18n_l_ShowTimeToAlarm() { return i18n("Show time unti&l alarm"); }
+TQString MainWindow::i18n_ShowExpiredAlarms() { return i18n("Show Expired Alarms"); }
+TQString MainWindow::i18n_e_ShowExpiredAlarms() { return i18n("Show &Expired Alarms"); }
+TQString MainWindow::i18n_HideExpiredAlarms() { return i18n("Hide Expired Alarms"); }
+TQString MainWindow::i18n_e_HideExpiredAlarms() { return i18n("Hide &Expired Alarms"); }
/******************************************************************************
@@ -123,7 +123,7 @@ MainWindow::MainWindow(bool restored)
mHiddenTrayParent(false)
{
kdDebug(5950) << "MainWindow::MainWindow()\n";
- setAutoSaveSettings(QString::fromLatin1(WINDOW_NAME)); // save window sizes etc.
+ setAutoSaveSettings(TQString::fromLatin1(WINDOW_NAME)); // save window sizes etc.
setPlainCaption(kapp->aboutData()->programName());
KConfig* config = KGlobal::config();
config->setGroup(VIEW_GROUP);
@@ -132,12 +132,12 @@ MainWindow::MainWindow(bool restored)
mShowTimeTo = config->readBoolEntry(SHOW_TIME_TO_KEY, false);
if (!restored)
{
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(WINDOW_NAME, s))
resize(s);
}
- config->setGroup(QString::fromLatin1(WINDOW_NAME));
- QValueList<int> order = config->readIntListEntry(QString::fromLatin1("ColumnOrder"));
+ config->setGroup(TQString::fromLatin1(WINDOW_NAME));
+ TQValueList<int> order = config->readIntListEntry(TQString::fromLatin1("ColumnOrder"));
setAcceptDrops(true); // allow drag-and-drop onto this window
if (!mShowTimeTo)
@@ -149,14 +149,14 @@ MainWindow::MainWindow(bool restored)
mListView->refresh(); // populate the alarm list
mListView->clearSelection();
- connect(mListView, SIGNAL(itemDeleted()), SLOT(slotDeletion()));
- connect(mListView, SIGNAL(selectionChanged()), SLOT(slotSelection()));
- connect(mListView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)),
- SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int)));
- connect(mListView, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int)),
- SLOT(slotMouseClicked(int, QListViewItem*, const QPoint&, int)));
- connect(mListView, SIGNAL(executed(QListViewItem*)), SLOT(slotDoubleClicked(QListViewItem*)));
- connect(mListView->header(), SIGNAL(indexChange(int, int, int)), SLOT(columnsReordered()));
+ connect(mListView, TQT_SIGNAL(itemDeleted()), TQT_SLOT(slotDeletion()));
+ connect(mListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelection()));
+ connect(mListView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int)));
+ connect(mListView, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
+ connect(mListView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(slotDoubleClicked(TQListViewItem*)));
+ connect(mListView->header(), TQT_SIGNAL(indexChange(int, int, int)), TQT_SLOT(columnsReordered()));
initActions();
mWindowList.append(this);
@@ -201,10 +201,10 @@ MainWindow::~MainWindow()
*/
void MainWindow::saveProperties(KConfig* config)
{
- config->writeEntry(QString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden());
- config->writeEntry(QString::fromLatin1("ShowExpired"), mShowExpired);
- config->writeEntry(QString::fromLatin1("ShowTime"), mShowTime);
- config->writeEntry(QString::fromLatin1("ShowTimeTo"), mShowTimeTo);
+ config->writeEntry(TQString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden());
+ config->writeEntry(TQString::fromLatin1("ShowExpired"), mShowExpired);
+ config->writeEntry(TQString::fromLatin1("ShowTime"), mShowTime);
+ config->writeEntry(TQString::fromLatin1("ShowTimeTo"), mShowTimeTo);
}
/******************************************************************************
@@ -214,10 +214,10 @@ void MainWindow::saveProperties(KConfig* config)
*/
void MainWindow::readProperties(KConfig* config)
{
- mHiddenTrayParent = config->readBoolEntry(QString::fromLatin1("HiddenTrayParent"));
- mShowExpired = config->readBoolEntry(QString::fromLatin1("ShowExpired"));
- mShowTime = config->readBoolEntry(QString::fromLatin1("ShowTime"));
- mShowTimeTo = config->readBoolEntry(QString::fromLatin1("ShowTimeTo"));
+ mHiddenTrayParent = config->readBoolEntry(TQString::fromLatin1("HiddenTrayParent"));
+ mShowExpired = config->readBoolEntry(TQString::fromLatin1("ShowExpired"));
+ mShowTime = config->readBoolEntry(TQString::fromLatin1("ShowTime"));
+ mShowTimeTo = config->readBoolEntry(TQString::fromLatin1("ShowTimeTo"));
}
/******************************************************************************
@@ -263,7 +263,7 @@ void MainWindow::closeAll()
* edge of the list view.
* Records the new size in the config file.
*/
-void MainWindow::resizeEvent(QResizeEvent* re)
+void MainWindow::resizeEvent(TQResizeEvent* re)
{
// Save the window's new size only if it's the first main window
if (mainMainWindow() == this)
@@ -276,7 +276,7 @@ void MainWindow::resizeEvent(QResizeEvent* re)
* Sets the last column in the list view to extend at least to the right hand
* edge of the list view.
*/
-void MainWindow::showEvent(QShowEvent* se)
+void MainWindow::showEvent(TQShowEvent* se)
{
setUpdateTimer();
slotUpdateTimeTo();
@@ -294,7 +294,7 @@ void MainWindow::show()
// Show error message now that the main window has been displayed.
// Waiting until now lets the user easily associate the message with
// the main window which is faulty.
- KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(QString::fromLatin1(UI_FILE)));
+ KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(TQString::fromLatin1(UI_FILE)));
mMenuError = false;
}
}
@@ -302,7 +302,7 @@ void MainWindow::show()
/******************************************************************************
* Called after the window is hidden.
*/
-void MainWindow::hideEvent(QHideEvent* he)
+void MainWindow::hideEvent(TQHideEvent* he)
{
setUpdateTimer();
MainWindowBase::hideEvent(he);
@@ -315,8 +315,8 @@ void MainWindow::hideEvent(QHideEvent* he)
void MainWindow::columnsReordered()
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::fromLatin1(WINDOW_NAME));
- config->writeEntry(QString::fromLatin1("ColumnOrder"), mListView->columnOrder());
+ config->setGroup(TQString::fromLatin1(WINDOW_NAME));
+ config->writeEntry(TQString::fromLatin1("ColumnOrder"), mListView->columnOrder());
config->sync();
}
@@ -326,27 +326,27 @@ void MainWindow::columnsReordered()
void MainWindow::initActions()
{
KActionCollection* actions = actionCollection();
- mActionTemplates = new KAction(i18n("&Templates..."), 0, this, SLOT(slotTemplates()), actions, "templates");
- mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, SLOT(slotNew()), actions, "new");
- mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
- mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, SLOT(slotNewTemplate()), actions, "createTemplate");
- mActionCopy = new KAction(i18n("&Copy..."), "editcopy", Qt::SHIFT+Qt::Key_Insert, this, SLOT(slotCopy()), actions, "copy");
- mActionModify = new KAction(i18n("&Edit..."), "edit", Qt::CTRL+Qt::Key_E, this, SLOT(slotModify()), actions, "modify");
- mActionDelete = new KAction(i18n("&Delete"), "editdelete", Qt::Key_Delete, this, SLOT(slotDelete()), actions, "delete");
- mActionReactivate = new KAction(i18n("Reac&tivate"), 0, Qt::CTRL+Qt::Key_R, this, SLOT(slotReactivate()), actions, "undelete");
- mActionEnable = new KAction(QString::null, 0, Qt::CTRL+Qt::Key_B, this, SLOT(slotEnable()), actions, "disable");
- mActionView = new KAction(i18n("&View"), "viewmag", Qt::CTRL+Qt::Key_W, this, SLOT(slotView()), actions, "view");
- mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), Qt::CTRL+Qt::Key_M, this, SLOT(slotShowTime()), actions, "showAlarmTimes");
+ mActionTemplates = new KAction(i18n("&Templates..."), 0, this, TQT_SLOT(slotTemplates()), actions, "templates");
+ mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, TQT_SLOT(slotNew()), actions, "new");
+ mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
+ mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, TQT_SLOT(slotNewTemplate()), actions, "createTemplate");
+ mActionCopy = new KAction(i18n("&Copy..."), "editcopy", Qt::SHIFT+Qt::Key_Insert, this, TQT_SLOT(slotCopy()), actions, "copy");
+ mActionModify = new KAction(i18n("&Edit..."), "edit", Qt::CTRL+Qt::Key_E, this, TQT_SLOT(slotModify()), actions, "modify");
+ mActionDelete = new KAction(i18n("&Delete"), "editdelete", Qt::Key_Delete, this, TQT_SLOT(slotDelete()), actions, "delete");
+ mActionReactivate = new KAction(i18n("Reac&tivate"), 0, Qt::CTRL+Qt::Key_R, this, TQT_SLOT(slotReactivate()), actions, "undelete");
+ mActionEnable = new KAction(TQString::null, 0, Qt::CTRL+Qt::Key_B, this, TQT_SLOT(slotEnable()), actions, "disable");
+ mActionView = new KAction(i18n("&View"), "viewmag", Qt::CTRL+Qt::Key_W, this, TQT_SLOT(slotView()), actions, "view");
+ mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), Qt::CTRL+Qt::Key_M, this, TQT_SLOT(slotShowTime()), actions, "showAlarmTimes");
mActionShowTime->setCheckedState(i18n("Hide &Alarm Times"));
- mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), Qt::CTRL+Qt::Key_I, this, SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
+ mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), Qt::CTRL+Qt::Key_I, this, TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
mActionShowTimeTo->setCheckedState(i18n("Hide Time t&o Alarms"));
- mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", Qt::CTRL+Qt::Key_P, this, SLOT(slotShowExpired()), actions, "showExpiredAlarms");
+ mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", Qt::CTRL+Qt::Key_P, this, TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms");
mActionShowExpired->setCheckedState(i18n_e_HideExpiredAlarms());
- mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
+ mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
mActionToggleTrayIcon->setCheckedState(i18n("Hide From System &Tray"));
- new KAction(i18n("Import &Alarms..."), 0, this, SLOT(slotImportAlarms()), actions, "importAlarms");
- new KAction(i18n("Import &Birthdays..."), 0, this, SLOT(slotBirthdays()), actions, "importBirthdays");
- new KAction(i18n("&Refresh Alarms"), "reload", 0, this, SLOT(slotResetDaemon()), actions, "refreshAlarms");
+ new KAction(i18n("Import &Alarms..."), 0, this, TQT_SLOT(slotImportAlarms()), actions, "importAlarms");
+ new KAction(i18n("Import &Birthdays..."), 0, this, TQT_SLOT(slotBirthdays()), actions, "importBirthdays");
+ new KAction(i18n("&Refresh Alarms"), "reload", 0, this, TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms");
Daemon::createAlarmEnableAction(actions, "alarmEnable");
if (undoText.isNull())
{
@@ -364,32 +364,32 @@ void MainWindow::initActions()
redoTextStripped = KAlarm::stripAccel(redoText);
delete act;
}
- mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, SLOT(slotUndo()), actions, "edit_undo");
- mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, SLOT(slotRedo()), actions, "edit_redo");
- KStdAction::find(mListView, SLOT(slotFind()), actions);
- mActionFindNext = KStdAction::findNext(mListView, SLOT(slotFindNext()), actions);
- mActionFindPrev = KStdAction::findPrev(mListView, SLOT(slotFindPrev()), actions);
- KStdAction::selectAll(mListView, SLOT(slotSelectAll()), actions);
- KStdAction::deselect(mListView, SLOT(slotDeselect()), actions);
- KStdAction::quit(this, SLOT(slotQuit()), actions);
- KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actions);
- KStdAction::configureToolbars(this, SLOT(slotConfigureToolbar()), actions);
- KStdAction::preferences(this, SLOT(slotPreferences()), actions);
+ mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, TQT_SLOT(slotUndo()), actions, "edit_undo");
+ mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, TQT_SLOT(slotRedo()), actions, "edit_redo");
+ KStdAction::find(mListView, TQT_SLOT(slotFind()), actions);
+ mActionFindNext = KStdAction::findNext(mListView, TQT_SLOT(slotFindNext()), actions);
+ mActionFindPrev = KStdAction::findPrev(mListView, TQT_SLOT(slotFindPrev()), actions);
+ KStdAction::selectAll(mListView, TQT_SLOT(slotSelectAll()), actions);
+ KStdAction::deselect(mListView, TQT_SLOT(slotDeselect()), actions);
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actions);
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actions);
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbar()), actions);
+ KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actions);
setStandardToolBarMenuEnabled(true);
createGUI(UI_FILE);
mContextMenu = static_cast<KPopupMenu*>(factory()->container("listContext", this));
mActionsMenu = static_cast<KPopupMenu*>(factory()->container("actions", this));
mMenuError = (!mContextMenu || !mActionsMenu);
- connect(mActionsMenu, SIGNAL(aboutToShow()), SLOT(updateActionsMenu()));
- connect(mActionUndo->popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitUndoMenu()));
- connect(mActionUndo->popupMenu(), SIGNAL(activated(int)), SLOT(slotUndoItem(int)));
- connect(mActionRedo->popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitRedoMenu()));
- connect(mActionRedo->popupMenu(), SIGNAL(activated(int)), SLOT(slotRedoItem(int)));
- connect(Undo::instance(), SIGNAL(changed(const QString&, const QString&)), SLOT(slotUndoStatus(const QString&, const QString&)));
- connect(mListView, SIGNAL(findActive(bool)), SLOT(slotFindActive(bool)));
- Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPrefsChanged()));
- connect(theApp(), SIGNAL(trayIconToggled()), SLOT(updateTrayIconAction()));
+ connect(mActionsMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(updateActionsMenu()));
+ connect(mActionUndo->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitUndoMenu()));
+ connect(mActionUndo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotUndoItem(int)));
+ connect(mActionRedo->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitRedoMenu()));
+ connect(mActionRedo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotRedoItem(int)));
+ connect(Undo::instance(), TQT_SIGNAL(changed(const TQString&, const TQString&)), TQT_SLOT(slotUndoStatus(const TQString&, const TQString&)));
+ connect(mListView, TQT_SIGNAL(findActive(bool)), TQT_SLOT(slotFindActive(bool)));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPrefsChanged()));
+ connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction()));
// Set menu item states
setEnableText(true);
@@ -485,7 +485,7 @@ void MainWindow::setUpdateTimer()
{
// Timeout every minute.
needTimer->mMinuteTimerActive = true;
- MinuteTimer::connect(needTimer, SLOT(slotUpdateTimeTo()));
+ MinuteTimer::connect(needTimer, TQT_SLOT(slotUpdateTimeTo()));
kdDebug(5950) << "MainWindow::setUpdateTimer(): started timer" << endl;
}
else if (!needTimer && timerWindow)
@@ -512,7 +512,7 @@ void MainWindow::slotUpdateTimeTo()
/******************************************************************************
* Select an alarm in the displayed list.
*/
-void MainWindow::selectEvent(const QString& eventID)
+void MainWindow::selectEvent(const TQString& eventID)
{
mListView->clearSelection();
AlarmListViewItem* item = mListView->getEntry(eventID);
@@ -541,7 +541,7 @@ void MainWindow::executeNew(MainWindow* win, const KAEvent* evnt, KAEvent::Actio
EditAlarmDlg editDlg(false, i18n("New Alarm"), win, 0, evnt);
if (!text.isEmpty())
editDlg.setAction(action, text);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent event;
editDlg.getEvent(event);
@@ -609,7 +609,7 @@ void MainWindow::slotModify()
void MainWindow::executeEdit(KAEvent& event, MainWindow* win)
{
EditAlarmDlg editDlg(false, i18n("Edit Alarm"), win, 0, &event);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent newEvent;
bool changeDeferral = !editDlg.getEvent(newEvent);
@@ -656,12 +656,12 @@ void MainWindow::slotView()
*/
void MainWindow::slotDelete()
{
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
// Copy the events to be deleted, in case any are deleted by being
// triggered while the confirmation prompt is displayed.
- QValueList<KAEvent> events;
- QValueList<KAEvent> origEvents;
- for (QValueList<EventListViewItemBase*>::Iterator iit = items.begin(); iit != items.end(); ++iit)
+ TQValueList<KAEvent> events;
+ TQValueList<KAEvent> origEvents;
+ for (TQValueList<EventListViewItemBase*>::Iterator iit = items.begin(); iit != items.end(); ++iit)
{
AlarmListViewItem* item = (AlarmListViewItem*)(*iit);
events.append(item->event());
@@ -683,7 +683,7 @@ void MainWindow::slotDelete()
int warnKOrg = 0;
AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished
AlarmCalendar::expiredCalendar()->startUpdate();
- for (QValueList<KAEvent>::Iterator it = events.begin(); it != events.end(); ++it)
+ for (TQValueList<KAEvent>::Iterator it = events.begin(); it != events.end(); ++it)
{
// Delete the event from the calendar and displays
switch (KAlarm::deleteEvent(*it))
@@ -719,12 +719,12 @@ void MainWindow::slotReactivate()
{
int warnErr = 0;
int warnKOrg = 0;
- QValueList<KAEvent> events;
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<KAEvent> events;
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
mListView->clearSelection();
AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished
AlarmCalendar::expiredCalendar()->startUpdate();
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
// Add the alarm to the displayed lists and to the calendar file
AlarmListViewItem* item = (AlarmListViewItem*)(*it);
@@ -763,9 +763,9 @@ void MainWindow::slotEnable()
{
bool enable = mActionEnableEnable; // save since changed in response to KAlarm::enableEvent()
int warnErr = 0;
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
AlarmListViewItem* item = (AlarmListViewItem*)(*it);
KAEvent event = item->event();
@@ -851,15 +851,15 @@ void MainWindow::slotImportAlarms()
void MainWindow::slotBirthdays()
{
BirthdayDlg dlg(this);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
- QValueList<KAEvent> events = dlg.events();
+ TQValueList<KAEvent> events = dlg.events();
if (events.count())
{
mListView->clearSelection();
int warnErr = 0;
int warnKOrg = 0;
- for (QValueList<KAEvent>::Iterator ev = events.begin(); ev != events.end(); ++ev)
+ for (TQValueList<KAEvent>::Iterator ev = events.begin(); ev != events.end(); ++ev)
{
// Add alarm to the displayed lists and to the calendar file
switch (KAlarm::addEvent(*ev, mListView))
@@ -895,7 +895,7 @@ void MainWindow::slotTemplates()
{
mTemplateDlg = TemplateDlg::create(this);
enableTemplateMenuItem(false); // disable menu item in all windows
- connect(mTemplateDlg, SIGNAL(finished()), SLOT(slotTemplatesEnd()));
+ connect(mTemplateDlg, TQT_SIGNAL(finished()), TQT_SLOT(slotTemplatesEnd()));
mTemplateDlg->show();
}
}
@@ -1015,14 +1015,14 @@ void MainWindow::slotInitRedoMenu()
void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type)
{
menu->clear();
- const QString& action = (type == Undo::UNDO) ? undoTextStripped : redoTextStripped;
- QValueList<int> ids = Undo::ids(type);
- for (QValueList<int>::ConstIterator it = ids.begin(); it != ids.end(); ++it)
+ const TQString& action = (type == Undo::UNDO) ? undoTextStripped : redoTextStripped;
+ TQValueList<int> ids = Undo::ids(type);
+ for (TQValueList<int>::ConstIterator it = ids.begin(); it != ids.end(); ++it)
{
int id = *it;
- QString actText = Undo::actionText(type, id);
- QString descrip = Undo::description(type, id);
- QString text = descrip.isEmpty()
+ TQString actText = Undo::actionText(type, id);
+ TQString descrip = Undo::description(type, id);
+ TQString text = descrip.isEmpty()
? i18n("Undo/Redo [action]", "%1 %2").arg(action).arg(actText)
: i18n("Undo [action]: message", "%1 %2: %3").arg(action).arg(actText).arg(descrip);
menu->insertItem(text, id);
@@ -1033,7 +1033,7 @@ void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type)
* Called when the status of the Undo or Redo list changes.
* Change the Undo or Redo text to include the action which would be undone/redone.
*/
-void MainWindow::slotUndoStatus(const QString& undo, const QString& redo)
+void MainWindow::slotUndoStatus(const TQString& undo, const TQString& redo)
{
if (undo.isNull())
{
@@ -1043,7 +1043,7 @@ void MainWindow::slotUndoStatus(const QString& undo, const QString& redo)
else
{
mActionUndo->setEnabled(true);
- mActionUndo->setText(QString("%1 %2").arg(undoText).arg(undo));
+ mActionUndo->setText(TQString("%1 %2").arg(undoText).arg(undo));
}
if (redo.isNull())
{
@@ -1053,7 +1053,7 @@ void MainWindow::slotUndoStatus(const QString& undo, const QString& redo)
else
{
mActionRedo->setEnabled(true);
- mActionRedo->setText(QString("%1 %2").arg(redoText).arg(redo));
+ mActionRedo->setText(TQString("%1 %2").arg(redoText).arg(redo));
}
}
@@ -1088,7 +1088,7 @@ void MainWindow::slotConfigureToolbar()
{
saveMainWindowSettings(KGlobal::config(), WINDOW_NAME);
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -1113,7 +1113,7 @@ void MainWindow::slotQuit()
/******************************************************************************
* Called when the user or the session manager attempts to close the window.
*/
-void MainWindow::closeEvent(QCloseEvent* ce)
+void MainWindow::closeEvent(TQCloseEvent* ce)
{
if (!theApp()->sessionClosingDown() && isTrayParent())
{
@@ -1150,7 +1150,7 @@ void MainWindow::slotDeletion()
/******************************************************************************
* Called when the drag cursor enters the window.
*/
-void MainWindow::dragEnterEvent(QDragEnterEvent* e)
+void MainWindow::dragEnterEvent(TQDragEnterEvent* e)
{
executeDragEnterEvent(e);
}
@@ -1159,12 +1159,12 @@ void MainWindow::dragEnterEvent(QDragEnterEvent* e)
* Called when the drag cursor enters a main or system tray window, to accept
* or reject the dragged object.
*/
-void MainWindow::executeDragEnterEvent(QDragEnterEvent* e)
+void MainWindow::executeDragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(!AlarmListView::dragging()); // don't accept "text/calendar" objects from KAlarm
else
- e->accept(QTextDrag::canDecode(e)
+ e->accept(TQTextDrag::canDecode(e)
|| KURLDrag::canDecode(e)
|| KPIM::MailListDrag::canDecode(e));
}
@@ -1173,33 +1173,33 @@ void MainWindow::executeDragEnterEvent(QDragEnterEvent* e)
* Called when an object is dropped on the window.
* If the object is recognised, the edit alarm dialog is opened appropriately.
*/
-void MainWindow::dropEvent(QDropEvent* e)
+void MainWindow::dropEvent(TQDropEvent* e)
{
executeDropEvent(this, e);
}
-static QString getMailHeader(const char* header, KMime::Content& content)
+static TQString getMailHeader(const char* header, KMime::Content& content)
{
KMime::Headers::Base* hd = content.getHeaderByType(header);
- return hd ? hd->asUnicodeString() : QString::null;
+ return hd ? hd->asUnicodeString() : TQString::null;
}
/******************************************************************************
* Called when an object is dropped on a main or system tray window, to
* evaluate the action required and extract the text.
*/
-void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
+void MainWindow::executeDropEvent(MainWindow* win, TQDropEvent* e)
{
KAEvent::Action action = KAEvent::MESSAGE;
- QString text;
- QByteArray bytes;
+ TQString text;
+ TQByteArray bytes;
AlarmText alarmText;
KPIM::MailList mailList;
KURL::List files;
- KCal::CalendarLocal calendar(QString::fromLatin1("UTC"));
+ KCal::CalendarLocal calendar(TQString::fromLatin1("UTC"));
calendar.setLocalTime(); // default to local time (i.e. no time zone)
#ifndef NDEBUG
- QCString fmts;
+ TQCString fmts;
for (int idbg = 0; e->format(idbg); ++idbg)
{
if (idbg) fmts += ", ";
@@ -1217,11 +1217,11 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
{
// Email message(s). Ignore all but the first.
kdDebug(5950) << "MainWindow::executeDropEvent(email)" << endl;
- QCString mails(bytes.data(), bytes.size());
+ TQCString mails(bytes.data(), bytes.size());
KMime::Content content;
content.setContent(mails);
content.parse();
- QString body;
+ TQString body;
if (content.textContent())
content.textContent()->decodedText(body, true, true); // strip trailing newlines & spaces
unsigned long sernum = 0;
@@ -1254,10 +1254,10 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
if (!mailList.count())
return;
KPIM::MailSummary& summary = mailList.first();
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(summary.date());
- QString body = KAMail::getMailBody(summary.serialNumber());
- alarmText.setEmail(summary.to(), summary.from(), QString::null,
+ TQString body = KAMail::getMailBody(summary.serialNumber());
+ alarmText.setEmail(summary.to(), summary.from(), TQString::null,
KGlobal::locale()->formatDateTime(dt), summary.subject(),
body, summary.serialNumber());
}
@@ -1273,7 +1273,7 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
}
return;
}
- else if (QTextDrag::decode(e, text))
+ else if (TQTextDrag::decode(e, text))
{
kdDebug(5950) << "MainWindow::executeDropEvent(text)" << endl;
alarmText.setText(text);
@@ -1292,15 +1292,15 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
void MainWindow::slotSelection()
{
// Find which item has been selected, and whether more than one is selected
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
int count = items.count();
AlarmListViewItem* item = (AlarmListViewItem*)((count == 1) ? items.first() : 0);
bool enableReactivate = true;
bool enableEnableDisable = true;
bool enableEnable = false;
bool enableDisable = false;
- QDateTime now = QDateTime::currentDateTime();
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ TQDateTime now = TQDateTime::currentDateTime();
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
const KAEvent& event = ((AlarmListViewItem*)(*it))->event();
if (enableReactivate
@@ -1336,7 +1336,7 @@ void MainWindow::slotSelection()
* Called when a context menu is requested either by a mouse click or by a
* key press.
*/
-void MainWindow::slotContextMenuRequested(QListViewItem* item, const QPoint& pt, int)
+void MainWindow::slotContextMenuRequested(TQListViewItem* item, const TQPoint& pt, int)
{
kdDebug(5950) << "MainWindow::slotContextMenuRequested()" << endl;
if (mContextMenu)
@@ -1348,7 +1348,7 @@ void MainWindow::slotContextMenuRequested(QListViewItem* item, const QPoint& pt,
* Deselects the current item and disables the actions if appropriate.
* Note that if a right button click is handled by slotContextMenuRequested().
*/
-void MainWindow::slotMouseClicked(int button, QListViewItem* item, const QPoint& pt, int)
+void MainWindow::slotMouseClicked(int button, TQListViewItem* item, const TQPoint& pt, int)
{
if (button != Qt::RightButton && !item)
{
@@ -1368,7 +1368,7 @@ void MainWindow::slotMouseClicked(int button, QListViewItem* item, const QPoint&
* Called when the mouse is double clicked on the ListView.
* Displays the Edit Alarm dialog, for the clicked item if applicable.
*/
-void MainWindow::slotDoubleClicked(QListViewItem* item)
+void MainWindow::slotDoubleClicked(TQListViewItem* item)
{
kdDebug(5950) << "MainWindow::slotDoubleClicked()\n";
if (item)
diff --git a/kalarm/mainwindow.h b/kalarm/mainwindow.h
index 7a11b8b86..21e47e05e 100644
--- a/kalarm/mainwindow.h
+++ b/kalarm/mainwindow.h
@@ -49,7 +49,7 @@ class MainWindow : public MainWindowBase
bool isTrayParent() const;
bool isHiddenTrayParent() const { return mHiddenTrayParent; }
bool showingExpired() const { return mShowExpired; }
- void selectEvent(const QString& eventID);
+ void selectEvent(const TQString& eventID);
static void refresh();
static void updateExpired();
@@ -59,33 +59,33 @@ class MainWindow : public MainWindowBase
static void executeNew(const KAEvent& e, MainWindow* w = 0)
{ executeNew(w, &e); }
static void executeEdit(KAEvent&, MainWindow* = 0);
- static void executeDragEnterEvent(QDragEnterEvent*);
- static void executeDropEvent(MainWindow*, QDropEvent*);
+ static void executeDragEnterEvent(TQDragEnterEvent*);
+ static void executeDropEvent(MainWindow*, TQDropEvent*);
static void closeAll();
static MainWindow* toggleWindow(MainWindow*);
static MainWindow* mainMainWindow();
static MainWindow* firstWindow() { return mWindowList.first(); }
static int count() { return mWindowList.count(); }
- static QString i18n_a_ShowAlarmTimes(); // text of 'Show Alarm Times' checkbox, with 'A' shortcut
- static QString i18n_m_ShowAlarmTime(); // text of 'Show alarm time' checkbox, with 'M' shortcut
- static QString i18n_o_ShowTimeToAlarms(); // text of 'Show Time to Alarms' checkbox, with 'O' shortcut
- static QString i18n_l_ShowTimeToAlarm(); // text of 'Show time until alarm' checkbox, with 'L' shortcut
- static QString i18n_ShowExpiredAlarms(); // plain text of 'Show Expired Alarms' action
- static QString i18n_e_ShowExpiredAlarms(); // text of 'Show Expired Alarms' checkbox, with 'E' shortcut
- static QString i18n_HideExpiredAlarms(); // plain text of 'Hide Expired Alarms' action
- static QString i18n_e_HideExpiredAlarms(); // text of 'Hide Expired Alarms' action, with 'E' shortcut
+ static TQString i18n_a_ShowAlarmTimes(); // text of 'Show Alarm Times' checkbox, with 'A' shortcut
+ static TQString i18n_m_ShowAlarmTime(); // text of 'Show alarm time' checkbox, with 'M' shortcut
+ static TQString i18n_o_ShowTimeToAlarms(); // text of 'Show Time to Alarms' checkbox, with 'O' shortcut
+ static TQString i18n_l_ShowTimeToAlarm(); // text of 'Show time until alarm' checkbox, with 'L' shortcut
+ static TQString i18n_ShowExpiredAlarms(); // plain text of 'Show Expired Alarms' action
+ static TQString i18n_e_ShowExpiredAlarms(); // text of 'Show Expired Alarms' checkbox, with 'E' shortcut
+ static TQString i18n_HideExpiredAlarms(); // plain text of 'Hide Expired Alarms' action
+ static TQString i18n_e_HideExpiredAlarms(); // text of 'Hide Expired Alarms' action, with 'E' shortcut
public slots:
virtual void show();
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void showEvent(QShowEvent*);
- virtual void hideEvent(QHideEvent*);
- virtual void closeEvent(QCloseEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dropEvent(QDropEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void hideEvent(TQHideEvent*);
+ virtual void closeEvent(TQCloseEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
+ virtual void dropEvent(TQDropEvent*);
virtual void saveProperties(KConfig*);
virtual void readProperties(KConfig*);
@@ -112,9 +112,9 @@ class MainWindow : public MainWindowBase
void slotQuit();
void slotDeletion();
void slotSelection();
- void slotContextMenuRequested(QListViewItem*, const QPoint&, int);
- void slotMouseClicked(int button, QListViewItem*, const QPoint&, int);
- void slotDoubleClicked(QListViewItem*);
+ void slotContextMenuRequested(TQListViewItem*, const TQPoint&, int);
+ void slotMouseClicked(int button, TQListViewItem*, const TQPoint&, int);
+ void slotDoubleClicked(TQListViewItem*);
void slotShowTime();
void slotShowTimeTo();
void slotShowExpired();
@@ -125,7 +125,7 @@ class MainWindow : public MainWindowBase
void slotRedoItem(int id);
void slotInitUndoMenu();
void slotInitRedoMenu();
- void slotUndoStatus(const QString&, const QString&);
+ void slotUndoStatus(const TQString&, const TQString&);
void slotFindActive(bool);
void slotPrefsChanged();
void updateTrayIconAction();
@@ -133,13 +133,13 @@ class MainWindow : public MainWindowBase
void columnsReordered();
private:
- typedef QValueList<MainWindow*> WindowList;
+ typedef TQValueList<MainWindow*> WindowList;
MainWindow(bool restored);
void createListView(bool recreate);
void initActions();
void setEnableText(bool enable);
- static KAEvent::Action getDropAction(QDropEvent*, QString& text);
+ static KAEvent::Action getDropAction(TQDropEvent*, TQString& text);
static void executeNew(MainWindow*, const KAEvent*, KAEvent::Action = KAEvent::MESSAGE, const AlarmText& = AlarmText());
static void initUndoMenu(KPopupMenu*, Undo::Type);
static void setUpdateTimer();
diff --git a/kalarm/mainwindowbase.cpp b/kalarm/mainwindowbase.cpp
index 2f0cfa16b..80c68c532 100644
--- a/kalarm/mainwindowbase.cpp
+++ b/kalarm/mainwindowbase.cpp
@@ -28,7 +28,7 @@
* Called when a close event is received.
* Only quits the application if there is no system tray icon displayed.
*/
-void MainWindowBase::closeEvent(QCloseEvent* ce)
+void MainWindowBase::closeEvent(TQCloseEvent* ce)
{
disableQuit = theApp()->trayIconDisplayed();
KMainWindow::closeEvent(ce);
diff --git a/kalarm/mainwindowbase.h b/kalarm/mainwindowbase.h
index 32e339738..63467258e 100644
--- a/kalarm/mainwindowbase.h
+++ b/kalarm/mainwindowbase.h
@@ -36,11 +36,11 @@ class MainWindowBase : public KMainWindow
Q_OBJECT
public:
- explicit MainWindowBase(QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel | WDestructiveClose)
+ explicit MainWindowBase(TQWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel | WDestructiveClose)
: KMainWindow(parent, name, f), disableQuit(false) { }
protected:
- virtual void closeEvent(QCloseEvent*);
+ virtual void closeEvent(TQCloseEvent*);
virtual bool queryExit();
private:
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index acee6b9b3..35d769c50 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -23,16 +23,16 @@
#include <stdlib.h>
#include <string.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qdragobject.h>
-#include <qtextedit.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqdragobject.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
#include <kstandarddirs.h>
#include <kaction.h>
@@ -93,32 +93,32 @@ static bool wantModal();
class MessageText : public QTextEdit
{
public:
- MessageText(const QString& text, const QString& context = QString::null, QWidget* parent = 0, const char* name = 0)
- : QTextEdit(text, context, parent, name)
+ MessageText(const TQString& text, const TQString& context = TQString::null, TQWidget* parent = 0, const char* name = 0)
+ : TQTextEdit(text, context, parent, name)
{
setReadOnly(true);
- setWordWrap(QTextEdit::NoWrap);
+ setWordWrap(TQTextEdit::NoWrap);
}
int scrollBarHeight() const { return horizontalScrollBar()->height(); }
int scrollBarWidth() const { return verticalScrollBar()->width(); }
- virtual QSize sizeHint() const { return QSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); }
+ virtual TQSize sizeHint() const { return TQSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); }
};
class MWMimeSourceFactory : public QMimeSourceFactory
{
public:
- MWMimeSourceFactory(const QString& absPath, KTextBrowser*);
+ MWMimeSourceFactory(const TQString& absPath, KTextBrowser*);
virtual ~MWMimeSourceFactory();
- virtual const QMimeSource* data(const QString& abs_name) const;
+ virtual const TQMimeSource* data(const TQString& abs_name) const;
private:
// Prohibit the following methods
- virtual void setData(const QString&, QMimeSource*) {}
- virtual void setExtensionType(const QString&, const char*) {}
+ virtual void setData(const TQString&, TQMimeSource*) {}
+ virtual void setExtensionType(const TQString&, const char*) {}
- QString mTextFile;
- QCString mMimeType;
- mutable const QMimeSource* mLast;
+ TQString mTextFile;
+ TQCString mMimeType;
+ mutable const TQMimeSource* mLast;
};
@@ -133,8 +133,8 @@ enum {
};
-QValueList<MessageWin*> MessageWin::mWindowList;
-QMap<QString, unsigned> MessageWin::mErrorMessages;
+TQValueList<MessageWin*> MessageWin::mWindowList;
+TQMap<TQString, unsigned> MessageWin::mErrorMessages;
/******************************************************************************
@@ -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(QString::fromLatin1("MessageWin"), false);
+ setAutoSaveSettings(TQString::fromLatin1("MessageWin"), false);
initView();
mWindowList.append(this);
if (event.autoClose())
@@ -201,7 +201,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 QStringList& errmsgs)
+MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, const TQStringList& errmsgs)
: MainWindowBase(0, "MessageWin", WFLAGS | Qt::WGroupLeader | Qt::WStyle_ContextHelp),
mMessage(event.cleanText()),
mDateTime(alarmDateTime),
@@ -290,38 +290,38 @@ void MessageWin::initView()
bool reminder = (!mErrorWindow && (mAlarmType & KAAlarm::REMINDER_ALARM));
int leading = fontMetrics().leading();
setCaption((mAlarmType & KAAlarm::REMINDER_ALARM) ? i18n("Reminder") : i18n("Message"));
- QWidget* topWidget = new QWidget(this, "messageWinTop");
+ TQWidget* topWidget = new TQWidget(this, "messageWinTop");
setCentralWidget(topWidget);
- QVBoxLayout* topLayout = new QVBoxLayout(topWidget, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(topWidget, KDialog::marginHint(), KDialog::spacingHint());
if (mDateTime.isValid())
{
// Show the alarm date/time, together with an "Advance reminder" text where appropriate
- QFrame* frame = 0;
- QVBoxLayout* layout = topLayout;
+ TQFrame* frame = 0;
+ TQVBoxLayout* layout = topLayout;
if (reminder)
{
- frame = new QFrame(topWidget);
- frame->setFrameStyle(QFrame::Box | QFrame::Raised);
+ frame = new TQFrame(topWidget);
+ frame->setFrameStyle(TQFrame::Box | TQFrame::Raised);
topLayout->addWidget(frame, 0, Qt::AlignHCenter);
- layout = new QVBoxLayout(frame, leading + frame->frameWidth(), leading);
+ layout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading);
}
// Alarm date/time
- QLabel* label = new QLabel(frame ? frame : topWidget);
+ TQLabel* label = new TQLabel(frame ? frame : topWidget);
label->setText(mDateTime.isDateOnly()
? KGlobal::locale()->formatDate(mDateTime.date(), true)
: KGlobal::locale()->formatDateTime(mDateTime.dateTime()));
if (!frame)
- label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setFixedSize(label->sizeHint());
layout->addWidget(label, 0, Qt::AlignHCenter);
- QWhatsThis::add(label,
+ TQWhatsThis::add(label,
i18n("The scheduled date/time for the message (as opposed to the actual time of display)."));
if (frame)
{
- label = new QLabel(frame);
+ label = new TQLabel(frame);
label->setText(i18n("Reminder"));
label->setFixedSize(label->sizeHint());
layout->addWidget(label, 0, Qt::AlignHCenter);
@@ -337,21 +337,21 @@ void MessageWin::initView()
case KAEvent::FILE:
{
// Display the file name
- QLabel* label = new QLabel(mMessage, topWidget);
- label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ TQLabel* label = new TQLabel(mMessage, topWidget);
+ label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setFixedSize(label->sizeHint());
- QWhatsThis::add(label, i18n("The file whose contents are displayed below"));
+ TQWhatsThis::add(label, i18n("The file whose contents are displayed below"));
topLayout->addWidget(label, 0, Qt::AlignHCenter);
// Display contents of file
bool opened = false;
bool dir = false;
- QString tmpFile;
+ TQString tmpFile;
KURL url(mMessage);
if (KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow()))
{
- QFile qfile(tmpFile);
- QFileInfo info(qfile);
+ TQFile qfile(tmpFile);
+ TQFileInfo info(qfile);
if (!(dir = info.isDir()))
{
opened = true;
@@ -365,8 +365,8 @@ 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(QSize(h, h).expandedTo(view->sizeHint()));
- QWhatsThis::add(view, i18n("The contents of the file to be displayed"));
+ view->resize(TQSize(h, h).expandedTo(view->sizeHint()));
+ TQWhatsThis::add(view, i18n("The contents of the file to be displayed"));
}
KIO::NetAccess::removeTempFile(tmpFile);
}
@@ -381,19 +381,19 @@ void MessageWin::initView()
case KAEvent::MESSAGE:
{
// Message label
- // Using MessageText instead of QLabel allows scrolling and mouse copying
- MessageText* text = new MessageText(mMessage, QString::null, topWidget);
- text->setFrameStyle(QFrame::NoFrame);
+ // Using MessageText instead of TQLabel allows scrolling and mouse copying
+ MessageText* text = new MessageText(mMessage, TQString::null, topWidget);
+ text->setFrameStyle(TQFrame::NoFrame);
text->setPaper(mBgColour);
text->setPaletteForegroundColor(mFgColour);
text->setFont(mFont);
int lineSpacing = text->fontMetrics().lineSpacing();
- QSize s = text->sizeHint();
+ TQSize s = text->sizeHint();
int h = s.height();
text->setMaximumHeight(h + text->scrollBarHeight());
text->setMinimumHeight(QMIN(h, lineSpacing*4));
text->setMaximumWidth(s.width() + text->scrollBarWidth());
- QWhatsThis::add(text, i18n("The alarm message"));
+ TQWhatsThis::add(text, i18n("The alarm message"));
int vspace = lineSpacing/2;
int hspace = lineSpacing - KDialog::marginHint();
topLayout->addSpacing(vspace);
@@ -405,7 +405,7 @@ void MessageWin::initView()
topLayout->addWidget(text, 1, Qt::AlignHCenter);
else
{
- QBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout);
layout->addSpacing(hspace);
layout->addWidget(text, 1, Qt::AlignHCenter);
layout->addSpacing(hspace);
@@ -423,18 +423,18 @@ void MessageWin::initView()
if (reminder)
{
// Reminder: show remaining time until the actual alarm
- mRemainingText = new QLabel(topWidget);
- mRemainingText->setFrameStyle(QFrame::Box | QFrame::Raised);
+ mRemainingText = new TQLabel(topWidget);
+ mRemainingText->setFrameStyle(TQFrame::Box | TQFrame::Raised);
mRemainingText->setMargin(leading);
- if (mDateTime.isDateOnly() || QDate::currentDate().daysTo(mDateTime.date()) > 0)
+ if (mDateTime.isDateOnly() || TQDate::currentDate().daysTo(mDateTime.date()) > 0)
{
setRemainingTextDay();
- MidnightTimer::connect(this, SLOT(setRemainingTextDay())); // update every day
+ MidnightTimer::connect(this, TQT_SLOT(setRemainingTextDay())); // update every day
}
else
{
setRemainingTextMinute();
- MinuteTimer::connect(this, SLOT(setRemainingTextMinute())); // update every minute
+ MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute
}
topLayout->addWidget(mRemainingText, 0, Qt::AlignHCenter);
topLayout->addSpacing(KDialog::spacingHint());
@@ -449,23 +449,23 @@ void MessageWin::initView()
case KAEvent::EMAIL:
{
// Display the email addresses and subject.
- QFrame* frame = new QFrame(topWidget);
- frame->setFrameStyle(QFrame::Box | QFrame::Raised);
- QWhatsThis::add(frame, i18n("The email to send"));
+ 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);
- QGridLayout* grid = new QGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Email addressee", "To:"), frame);
+ TQLabel* label = new TQLabel(i18n("Email addressee", "To:"), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0, Qt::AlignLeft);
- label = new QLabel(mEvent.emailAddresses("\n"), frame);
+ label = new TQLabel(mEvent.emailAddresses("\n"), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 1, Qt::AlignLeft);
- label = new QLabel(i18n("Email subject", "Subject:"), frame);
+ label = new TQLabel(i18n("Email subject", "Subject:"), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 0, Qt::AlignLeft);
- label = new QLabel(mEvent.emailSubject(), frame);
+ label = new TQLabel(mEvent.emailSubject(), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 1, Qt::AlignLeft);
break;
@@ -484,24 +484,24 @@ void MessageWin::initView()
else
{
setCaption(i18n("Error"));
- QBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout);
layout->setMargin(2*KDialog::marginHint());
layout->addStretch();
- QLabel* label = new QLabel(topWidget);
+ TQLabel* label = new TQLabel(topWidget);
label->setPixmap(DesktopIcon("error"));
label->setFixedSize(label->sizeHint());
layout->addWidget(label, 0, Qt::AlignRight);
- QBoxLayout* vlayout = new QVBoxLayout(layout);
- for (QStringList::Iterator it = mErrorMsgs.begin(); it != mErrorMsgs.end(); ++it)
+ TQBoxLayout* vlayout = new TQVBoxLayout(layout);
+ for (TQStringList::Iterator it = mErrorMsgs.begin(); it != mErrorMsgs.end(); ++it)
{
- label = new QLabel(*it, topWidget);
+ label = new TQLabel(*it, topWidget);
label->setFixedSize(label->sizeHint());
vlayout->addWidget(label, 0, Qt::AlignLeft);
}
layout->addStretch();
}
- QGridLayout* grid = new QGridLayout(1, 4);
+ TQGridLayout* grid = new TQGridLayout(1, 4);
topLayout->addLayout(grid);
grid->setColStretch(0, 1); // keep the buttons right-adjusted in the window
int gridIndex = 1;
@@ -510,32 +510,32 @@ 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(QWidget::ClickFocus); // don't allow keyboard selection
+ mOkButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection
mOkButton->setFixedSize(mOkButton->sizeHint());
- connect(mOkButton, SIGNAL(clicked()), SLOT(close()));
+ connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close()));
grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter);
- QWhatsThis::add(mOkButton, i18n("Acknowledge the alarm"));
+ TQWhatsThis::add(mOkButton, i18n("Acknowledge the alarm"));
if (mShowEdit)
{
// Edit button
- mEditButton = new QPushButton(i18n("&Edit..."), topWidget);
- mEditButton->setFocusPolicy(QWidget::ClickFocus); // don't allow keyboard selection
+ mEditButton = new TQPushButton(i18n("&Edit..."), topWidget);
+ mEditButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection
mEditButton->setFixedSize(mEditButton->sizeHint());
- connect(mEditButton, SIGNAL(clicked()), SLOT(slotEdit()));
+ connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter);
- QWhatsThis::add(mEditButton, i18n("Edit the alarm."));
+ TQWhatsThis::add(mEditButton, i18n("Edit the alarm."));
}
if (!mNoDefer)
{
// Defer button
- mDeferButton = new QPushButton(i18n("&Defer..."), topWidget);
- mDeferButton->setFocusPolicy(QWidget::ClickFocus); // don't allow keyboard selection
+ mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget);
+ mDeferButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection
mDeferButton->setFixedSize(mDeferButton->sizeHint());
- connect(mDeferButton, SIGNAL(clicked()), SLOT(slotDefer()));
+ connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer()));
grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter);
- QWhatsThis::add(mDeferButton,
+ TQWhatsThis::add(mDeferButton,
i18n("Defer the alarm until later.\n"
"You will be prompted to specify when the alarm should be redisplayed."));
@@ -546,14 +546,14 @@ void MessageWin::initView()
if (!mAudioFile.isEmpty() && (mVolume || mFadeVolume > 0))
{
// Silence button to stop sound repetition
- QPixmap pixmap = MainBarIcon("player_stop");
- mSilenceButton = new QPushButton(topWidget);
+ TQPixmap pixmap = MainBarIcon("player_stop");
+ mSilenceButton = new TQPushButton(topWidget);
mSilenceButton->setPixmap(pixmap);
mSilenceButton->setFixedSize(mSilenceButton->sizeHint());
- connect(mSilenceButton, SIGNAL(clicked()), SLOT(stopPlay()));
+ connect(mSilenceButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopPlay()));
grid->addWidget(mSilenceButton, 0, gridIndex++, AlignHCenter);
- QToolTip::add(mSilenceButton, i18n("Stop sound"));
- QWhatsThis::add(mSilenceButton, i18n("Stop playing the sound"));
+ TQToolTip::add(mSilenceButton, i18n("Stop sound"));
+ TQWhatsThis::add(mSilenceButton, i18n("Stop playing the sound"));
// To avoid getting in a mess, disable the button until sound playing has been set up
mSilenceButton->setEnabled(false);
}
@@ -563,28 +563,28 @@ void MessageWin::initView()
if (mKMailSerialNumber)
{
// KMail button
- QPixmap pixmap = iconLoader.loadIcon(QString::fromLatin1("kmail"), KIcon::MainToolbar);
- mKMailButton = new QPushButton(topWidget);
+ TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1("kmail"), KIcon::MainToolbar);
+ mKMailButton = new TQPushButton(topWidget);
mKMailButton->setPixmap(pixmap);
mKMailButton->setFixedSize(mKMailButton->sizeHint());
- connect(mKMailButton, SIGNAL(clicked()), SLOT(slotShowKMailMessage()));
+ connect(mKMailButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowKMailMessage()));
grid->addWidget(mKMailButton, 0, gridIndex++, AlignHCenter);
- QToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail"));
- QWhatsThis::add(mKMailButton, i18n("Locate and highlight this email in KMail"));
+ TQToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail"));
+ TQWhatsThis::add(mKMailButton, i18n("Locate and highlight this email in KMail"));
}
else
mKMailButton = 0;
// KAlarm button
- QPixmap pixmap = iconLoader.loadIcon(QString::fromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar);
- mKAlarmButton = new QPushButton(topWidget);
+ TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar);
+ mKAlarmButton = new TQPushButton(topWidget);
mKAlarmButton->setPixmap(pixmap);
mKAlarmButton->setFixedSize(mKAlarmButton->sizeHint());
- connect(mKAlarmButton, SIGNAL(clicked()), SLOT(displayMainWindow()));
+ connect(mKAlarmButton, TQT_SIGNAL(clicked()), TQT_SLOT(displayMainWindow()));
grid->addWidget(mKAlarmButton, 0, gridIndex++, AlignHCenter);
- QString actKAlarm = i18n("Activate KAlarm");
- QToolTip::add(mKAlarmButton, actKAlarm);
- QWhatsThis::add(mKAlarmButton, actKAlarm);
+ TQString actKAlarm = i18n("Activate KAlarm");
+ TQToolTip::add(mKAlarmButton, actKAlarm);
+ TQWhatsThis::add(mKAlarmButton, actKAlarm);
// Disable all buttons initially, to prevent accidental clicking on if they happen to be
// under the mouse just as the window appears.
@@ -598,7 +598,7 @@ void MessageWin::initView()
mKAlarmButton->setEnabled(false);
topLayout->activate();
- setMinimumSize(QSize(grid->sizeHint().width() + 2*KDialog::marginHint(), sizeHint().height()));
+ setMinimumSize(TQSize(grid->sizeHint().width() + 2*KDialog::marginHint(), sizeHint().height()));
bool modal = !(getWFlags() & Qt::WX11BypassWM);
@@ -614,14 +614,14 @@ void MessageWin::initView()
*/
void MessageWin::setRemainingTextDay()
{
- QString text;
- int days = QDate::currentDate().daysTo(mDateTime.date());
+ TQString text;
+ int days = TQDate::currentDate().daysTo(mDateTime.date());
if (days <= 0 && !mDateTime.isDateOnly())
{
// The alarm is due today, so start refreshing every minute
- MidnightTimer::disconnect(this, SLOT(setRemainingTextDay()));
+ MidnightTimer::disconnect(this, TQT_SLOT(setRemainingTextDay()));
setRemainingTextMinute();
- MinuteTimer::connect(this, SLOT(setRemainingTextMinute())); // update every minute
+ MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute
}
else
{
@@ -641,8 +641,8 @@ void MessageWin::setRemainingTextDay()
*/
void MessageWin::setRemainingTextMinute()
{
- QString text;
- int mins = (QDateTime::currentDateTime().secsTo(mDateTime.dateTime()) + 59) / 60;
+ TQString text;
+ int mins = (TQDateTime::currentDateTime().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(QString::fromLatin1("EventID"), mEventID);
- config->writeEntry(QString::fromLatin1("AlarmType"), mAlarmType);
- config->writeEntry(QString::fromLatin1("Message"), mMessage);
- config->writeEntry(QString::fromLatin1("Type"), mAction);
- config->writeEntry(QString::fromLatin1("Font"), mFont);
- config->writeEntry(QString::fromLatin1("BgColour"), mBgColour);
- config->writeEntry(QString::fromLatin1("FgColour"), mFgColour);
- config->writeEntry(QString::fromLatin1("ConfirmAck"), mConfirmAck);
+ 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);
if (mDateTime.isValid())
{
- config->writeEntry(QString::fromLatin1("Time"), mDateTime.dateTime());
- config->writeEntry(QString::fromLatin1("DateOnly"), mDateTime.isDateOnly());
+ config->writeEntry(TQString::fromLatin1("Time"), mDateTime.dateTime());
+ config->writeEntry(TQString::fromLatin1("DateOnly"), mDateTime.isDateOnly());
}
if (mCloseTime.isValid())
- config->writeEntry(QString::fromLatin1("Expiry"), mCloseTime);
+ config->writeEntry(TQString::fromLatin1("Expiry"), mCloseTime);
#ifndef WITHOUT_ARTS
if (mAudioRepeat && mSilenceButton && mSilenceButton->isEnabled())
{
// Only need to restart sound file playing if it's being repeated
- config->writePathEntry(QString::fromLatin1("AudioFile"), mAudioFile);
- config->writeEntry(QString::fromLatin1("Volume"), static_cast<int>(mVolume * 100));
+ config->writePathEntry(TQString::fromLatin1("AudioFile"), mAudioFile);
+ config->writeEntry(TQString::fromLatin1("Volume"), static_cast<int>(mVolume * 100));
}
#endif
- config->writeEntry(QString::fromLatin1("Speak"), mSpeak);
- config->writeEntry(QString::fromLatin1("Height"), height());
- config->writeEntry(QString::fromLatin1("DeferMins"), mDefaultDeferMinutes);
- config->writeEntry(QString::fromLatin1("NoDefer"), mNoDefer);
- config->writeEntry(QString::fromLatin1("NoPostAction"), mNoPostAction);
- config->writeEntry(QString::fromLatin1("KMailSerial"), mKMailSerialNumber);
+ 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);
}
else
- config->writeEntry(QString::fromLatin1("Invalid"), true);
+ config->writeEntry(TQString::fromLatin1("Invalid"), true);
}
/******************************************************************************
@@ -703,34 +703,34 @@ void MessageWin::saveProperties(KConfig* config)
*/
void MessageWin::readProperties(KConfig* config)
{
- mInvalid = config->readBoolEntry(QString::fromLatin1("Invalid"), false);
- mEventID = config->readEntry(QString::fromLatin1("EventID"));
- mAlarmType = KAAlarm::Type(config->readNumEntry(QString::fromLatin1("AlarmType")));
- mMessage = config->readEntry(QString::fromLatin1("Message"));
- mAction = KAEvent::Action(config->readNumEntry(QString::fromLatin1("Type")));
- mFont = config->readFontEntry(QString::fromLatin1("Font"));
- mBgColour = config->readColorEntry(QString::fromLatin1("BgColour"));
- mFgColour = config->readColorEntry(QString::fromLatin1("FgColour"));
- mConfirmAck = config->readBoolEntry(QString::fromLatin1("ConfirmAck"));
- QDateTime invalidDateTime;
- QDateTime dt = config->readDateTimeEntry(QString::fromLatin1("Time"), &invalidDateTime);
- bool dateOnly = config->readBoolEntry(QString::fromLatin1("DateOnly"));
+ 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"));
+ TQDateTime invalidDateTime;
+ TQDateTime dt = config->readDateTimeEntry(TQString::fromLatin1("Time"), &invalidDateTime);
+ bool dateOnly = config->readBoolEntry(TQString::fromLatin1("DateOnly"));
mDateTime.set(dt, dateOnly);
- mCloseTime = config->readDateTimeEntry(QString::fromLatin1("Expiry"), &invalidDateTime);
+ mCloseTime = config->readDateTimeEntry(TQString::fromLatin1("Expiry"), &invalidDateTime);
#ifndef WITHOUT_ARTS
- mAudioFile = config->readPathEntry(QString::fromLatin1("AudioFile"));
- mVolume = static_cast<float>(config->readNumEntry(QString::fromLatin1("Volume"))) / 100;
+ mAudioFile = config->readPathEntry(TQString::fromLatin1("AudioFile"));
+ mVolume = static_cast<float>(config->readNumEntry(TQString::fromLatin1("Volume"))) / 100;
mFadeVolume = -1;
mFadeSeconds = 0;
if (!mAudioFile.isEmpty())
mAudioRepeat = true;
#endif
- mSpeak = config->readBoolEntry(QString::fromLatin1("Speak"));
- mRestoreHeight = config->readNumEntry(QString::fromLatin1("Height"));
- mDefaultDeferMinutes = config->readNumEntry(QString::fromLatin1("DeferMins"));
- mNoDefer = config->readBoolEntry(QString::fromLatin1("NoDefer"));
- mNoPostAction = config->readBoolEntry(QString::fromLatin1("NoPostAction"));
- mKMailSerialNumber = config->readUnsignedLongNumEntry(QString::fromLatin1("KMailSerial"));
+ 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"));
mShowEdit = false;
kdDebug(5950) << "MessageWin::readProperties(" << mEventID << ")" << endl;
if (mAlarmType != KAAlarm::INVALID_ALARM)
@@ -761,9 +761,9 @@ void MessageWin::readProperties(KConfig* config)
* Returns the existing message window (if any) which is displaying the event
* with the specified ID.
*/
-MessageWin* MessageWin::findEvent(const QString& eventID)
+MessageWin* MessageWin::findEvent(const TQString& eventID)
{
- for (QValueList<MessageWin*>::Iterator it = mWindowList.begin(); it != mWindowList.end(); ++it)
+ for (TQValueList<MessageWin*>::Iterator it = mWindowList.begin(); it != mWindowList.end(); ++it)
{
MessageWin* w = *it;
if (w->mEventID == eventID && !w->mErrorWindow)
@@ -781,29 +781,29 @@ void MessageWin::playAudio()
{
// Beep using two methods, in case the sound card/speakers are switched off or not working
KNotifyClient::beep(); // beep through the sound card & speakers
- QApplication::beep(); // beep through the internal speaker
+ TQApplication::beep(); // beep through the internal speaker
}
if (!mAudioFile.isEmpty())
{
if (!mVolume && mFadeVolume <= 0)
return; // ensure zero volume doesn't play anything
#ifdef WITHOUT_ARTS
- QString play = mAudioFile;
- QString file = QString::fromLatin1("file:");
+ TQString play = mAudioFile;
+ TQString file = TQString::fromLatin1("file:");
if (mAudioFile.startsWith(file))
play = mAudioFile.mid(file.length());
- KAudioPlayer::play(QFile::encodeName(play));
+ KAudioPlayer::play(TQFile::encodeName(play));
#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.
- QTimer::singleShot(0, this, SLOT(slotPlayAudio()));
+ TQTimer::singleShot(0, this, TQT_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.
- QTimer::singleShot(0, this, SLOT(slotSpeak()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSpeak()));
}
}
@@ -817,8 +817,8 @@ void MessageWin::slotSpeak()
if (!client->isApplicationRegistered("kttsd"))
{
// kttsd is not running, so start it
- QString error;
- if (kapp->startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (kapp->startServiceByDesktopName("kttsd", TQStringList(), &error))
{
kdDebug(5950) << "MessageWin::slotSpeak(): failed to start kttsd: " << error << endl;
if (!haveErrorMessage(ErrMsg_Speak))
@@ -829,10 +829,10 @@ void MessageWin::slotSpeak()
return;
}
}
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << mMessage << "";
- if (!client->send("kttsd", "KSpeech", "sayMessage(QString,QString)", data))
+ if (!client->send("kttsd", "KSpeech", "sayMessage(TQString,TQString)", data))
{
kdDebug(5950) << "MessageWin::slotSpeak(): sayMessage() DCOP error" << endl;
if (!haveErrorMessage(ErrMsg_Speak))
@@ -867,11 +867,11 @@ void MessageWin::slotPlayAudio()
if (!mArtsDispatcher)
{
mFadeTimer = 0;
- mPlayTimer = new QTimer(this);
- connect(mPlayTimer, SIGNAL(timeout()), SLOT(checkAudioPlay()));
+ mPlayTimer = new TQTimer(this);
+ connect(mPlayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAudioPlay()));
mArtsDispatcher = new KArtsDispatcher;
mPlayedOnce = false;
- mAudioFileStart = QTime::currentTime();
+ mAudioFileStart = TQTime::currentTime();
initAudio(true);
if (!mPlayObject->object().isNull())
checkAudioPlay();
@@ -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),
- QString::null, QString::fromLatin1("KMixError"));
+ TQString::null, TQString::fromLatin1("KMixError"));
clearErrorMessage(ErrMsg_Volume);
}
}
@@ -935,7 +935,7 @@ void MessageWin::initAudio(bool firstTime)
}
mSilenceButton->setEnabled(true);
mPlayed = false;
- connect(mPlayObject, SIGNAL(playObjectCreated()), SLOT(checkAudioPlay()));
+ connect(mPlayObject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(checkAudioPlay()));
if (!mPlayObject->object().isNull())
checkAudioPlay();
}
@@ -967,7 +967,7 @@ void MessageWin::checkAudioPlay()
if (!mPlayedOnce)
{
// Start playing the file for the first time
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
mAudioFileLoadSecs = mAudioFileStart.secsTo(now);
if (mAudioFileLoadSecs < 0)
mAudioFileLoadSecs += 86400;
@@ -975,8 +975,8 @@ void MessageWin::checkAudioPlay()
{
// Set up volume fade
mAudioFileStart = now;
- mFadeTimer = new QTimer(this);
- connect(mFadeTimer, SIGNAL(timeout()), SLOT(slotFade()));
+ mFadeTimer = new TQTimer(this);
+ connect(mFadeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFade()));
mFadeTimer->start(1000); // adjust volume every second
}
mPlayedOnce = true;
@@ -1058,7 +1058,7 @@ void MessageWin::stopPlay()
if (!mLocalAudioFile.isEmpty())
{
KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
- mLocalAudioFile = QString::null;
+ mLocalAudioFile = TQString::null;
}
if (mSilenceButton)
mSilenceButton->setEnabled(false);
@@ -1071,7 +1071,7 @@ void MessageWin::stopPlay()
void MessageWin::slotFade()
{
#ifndef WITHOUT_ARTS
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
int elapsed = mAudioFileStart.secsTo(now);
if (elapsed < 0)
elapsed += 86400; // it's the next day
@@ -1114,14 +1114,14 @@ int MessageWin::getKMixVolume()
{
if (!KAlarm::runProgram(KMIX_APP_NAME, KMIX_DCOP_WINDOW, mKMixName, mKMixError)) // start KMix if it isn't already running
return -1;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
if (!kapp->dcopClient()->call(mKMixName, KMIX_DCOP_OBJECT, "masterVolume()", data, replyType, replyData)
|| replyType != "int")
return -1;
int result;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> result;
return (result >= 0) ? result : 0;
}
@@ -1135,8 +1135,8 @@ void MessageWin::setKMixVolume(int percent)
return;
if (!KAlarm::runProgram(KMIX_APP_NAME, KMIX_DCOP_WINDOW, mKMixName, mKMixError)) // start KMix if it isn't already running
return;
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << percent;
if (!kapp->dcopClient()->send(mKMixName, KMIX_DCOP_OBJECT, "setMasterVolume(int)", data))
kdError(5950) << "MessageWin::setKMixVolume(): kmix dcop call failed\n";
@@ -1183,10 +1183,10 @@ void MessageWin::show()
if (mCloseTime.isValid())
{
// Set a timer to auto-close the window
- int delay = QDateTime::currentDateTime().secsTo(mCloseTime);
+ int delay = TQDateTime::currentDateTime().secsTo(mCloseTime);
if (delay < 0)
delay = 0;
- QTimer::singleShot(delay * 1000, this, SLOT(close()));
+ TQTimer::singleShot(delay * 1000, this, TQT_SLOT(close()));
if (!delay)
return; // don't show the window if auto-closing is already due
}
@@ -1200,16 +1200,16 @@ void MessageWin::show()
* For message windows, the size if limited to fit inside the working area of
* the desktop.
*/
-QSize MessageWin::sizeHint() const
+TQSize MessageWin::sizeHint() const
{
if (mAction != KAEvent::MESSAGE)
return MainWindowBase::sizeHint();
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
- QSize frame = frameGeometry().size();
- QSize contents = geometry().size();
- QSize desktop = mWinModule->workArea().size();
- QSize maxSize(desktop.width() - (frame.width() - contents.width()),
+ TQSize frame = frameGeometry().size();
+ TQSize contents = geometry().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);
}
@@ -1219,7 +1219,7 @@ QSize MessageWin::sizeHint() const
* The first time, output any required audio notification, and reschedule or
* delete the event from the calendar file.
*/
-void MessageWin::showEvent(QShowEvent* se)
+void MessageWin::showEvent(TQShowEvent* se)
{
MainWindowBase::showEvent(se);
if (!mShown)
@@ -1233,7 +1233,7 @@ void MessageWin::showEvent(QShowEvent* se)
* method is called, so for large windows the size needs to be
* set again later.
*/
- QSize s = sizeHint(); // fit the window round the message
+ TQSize s = sizeHint(); // fit the window round the message
if (mAction == KAEvent::FILE && !mErrorMsgs.count())
KAlarm::readConfigWindowSize("FileMessage", s);
resize(s);
@@ -1258,18 +1258,18 @@ void MessageWin::showEvent(QShowEvent* se)
* message is displayed on a screen other than that currently being
* worked with, it might not be noticed.)
*/
- QPoint cursor = QCursor::pos();
+ TQPoint cursor = TQCursor::pos();
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
- QRect desk = mWinModule->workArea();
- QDesktopWidget* dw = QApplication::desktop();
+ TQRect desk = mWinModule->workArea();
+ TQDesktopWidget* dw = TQApplication::desktop();
if (dw->numScreens() > 1)
desk &= dw->screenGeometry(dw->screenNumber(cursor));
- QRect frame = frameGeometry();
- QRect rect = geometry();
+ TQRect frame = frameGeometry();
+ TQRect rect = geometry();
// Find the offsets from the outside of the frame to the edges of the OK button
- QRect button(mOkButton->mapToParent(QPoint(0, 0)), mOkButton->mapToParent(mOkButton->rect().bottomRight()));
+ TQRect button(mOkButton->mapToParent(TQPoint(0, 0)), mOkButton->mapToParent(mOkButton->rect().bottomRight()));
int buttonLeft = button.left() + rect.left() - frame.left();
int buttonRight = width() - button.right() + frame.right() - rect.right();
int buttonTop = button.top() + rect.top() - frame.top();
@@ -1282,7 +1282,7 @@ void MessageWin::showEvent(QShowEvent* se)
// Find the enclosing rectangle for the new button positions
// and check if the cursor is too near
- QRect buttons = mOkButton->geometry().unite(mKAlarmButton->geometry());
+ TQRect buttons = mOkButton->geometry().unite(mKAlarmButton->geometry());
buttons.moveBy(rect.left() + x - frame.left(), rect.top() + y - frame.top());
int minDistance = proximityMultiple * mOkButton->height();
if ((abs(cursor.x() - buttons.left()) < minDistance
@@ -1302,7 +1302,7 @@ void MessageWin::showEvent(QShowEvent* se)
if (mAction == KAEvent::MESSAGE)
{
// Set the window size once the frame size is known
- QTimer::singleShot(0, this, SLOT(setMaxSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(setMaxSize()));
}
}
mShown = true;
@@ -1312,7 +1312,7 @@ void MessageWin::showEvent(QShowEvent* se)
/******************************************************************************
* Called when the window has been moved.
*/
-void MessageWin::moveEvent(QMoveEvent* e)
+void MessageWin::moveEvent(TQMoveEvent* e)
{
MainWindowBase::moveEvent(e);
if (mPositioning)
@@ -1328,7 +1328,7 @@ void MessageWin::moveEvent(QMoveEvent* e)
*/
void MessageWin::setMaxSize()
{
- QSize s = sizeHint();
+ TQSize s = sizeHint();
if (width() > s.width() || height() > s.height())
resize(s);
}
@@ -1345,7 +1345,7 @@ void MessageWin::displayComplete()
// Enable the window's buttons either now or after the configured delay
if (mButtonDelay > 0)
- QTimer::singleShot(mButtonDelay, this, SLOT(enableButtons()));
+ TQTimer::singleShot(mButtonDelay, this, TQT_SLOT(enableButtons()));
else
enableButtons();
}
@@ -1368,14 +1368,14 @@ void MessageWin::enableButtons()
/******************************************************************************
* Called when the window's size has changed (before it is painted).
*/
-void MessageWin::resizeEvent(QResizeEvent* re)
+void MessageWin::resizeEvent(TQResizeEvent* re)
{
if (mRestoreHeight)
{
// Restore the window height on session restoration
if (mRestoreHeight != re->size().height())
{
- QSize size = re->size();
+ TQSize size = re->size();
size.setHeight(mRestoreHeight);
resize(size);
}
@@ -1394,7 +1394,7 @@ void MessageWin::resizeEvent(QResizeEvent* re)
* Called when a close event is received.
* Only quits the application if there is no system tray icon displayed.
*/
-void MessageWin::closeEvent(QCloseEvent* ce)
+void MessageWin::closeEvent(TQCloseEvent* ce)
{
// Don't prompt or delete the alarm from the display calendar if the session is closing
if (!mErrorWindow && !theApp()->sessionClosingDown())
@@ -1428,21 +1428,21 @@ void MessageWin::slotShowKMailMessage()
kdDebug(5950) << "MessageWin::slotShowKMailMessage()\n";
if (!mKMailSerialNumber)
return;
- QString err = KAlarm::runKMail(false);
+ TQString err = KAlarm::runKMail(false);
if (!err.isNull())
{
KMessageBox::sorry(this, err);
return;
}
- QCString replyType;
- QByteArray data, replyData;
- QDataStream arg(data, IO_WriteOnly);
- arg << (Q_UINT32)mKMailSerialNumber << QString::null;
- if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(Q_UINT32,QString)", data, replyType, replyData)
+ 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)
&& replyType == "bool")
{
bool result;
- QDataStream replyStream(replyData, IO_ReadOnly);
+ TQDataStream replyStream(replyData, IO_ReadOnly);
replyStream >> result;
if (result)
return; // success
@@ -1459,7 +1459,7 @@ void MessageWin::slotEdit()
{
kdDebug(5950) << "MessageWin::slotEdit()" << endl;
EditAlarmDlg editDlg(false, i18n("Edit Alarm"), this, "editDlg", &mEvent);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent event;
editDlg.getEvent(event);
@@ -1497,7 +1497,7 @@ void MessageWin::setDeferralLimit(const KAEvent& event)
if (mDeferButton)
{
mDeferLimit = event.deferralLimit().dateTime();
- MidnightTimer::connect(this, SLOT(checkDeferralLimit())); // check every day
+ MidnightTimer::connect(this, TQT_SLOT(checkDeferralLimit())); // check every day
mDisableDeferral = false;
checkDeferralLimit();
}
@@ -1506,27 +1506,27 @@ void MessageWin::setDeferralLimit(const KAEvent& event)
/******************************************************************************
* Check whether the deferral limit has been reached.
* If so, disable the Defer button.
-* N.B. Ideally, just a single QTimer::singleShot() call would be made to disable
+* N.B. Ideally, just a single TQTimer::singleShot() call would be made to disable
* the defer button at the corret time. But for a 32-bit integer, the
* milliseconds parameter overflows in about 25 days, so instead a daily
* check is done until the day when the deferral limit is reached, followed
-* by a non-overflowing QTimer::singleShot() call.
+* by a non-overflowing TQTimer::singleShot() call.
*/
void MessageWin::checkDeferralLimit()
{
if (!mDeferButton || !mDeferLimit.isValid())
return;
- int n = QDate::currentDate().daysTo(mDeferLimit.date());
+ int n = TQDate::currentDate().daysTo(mDeferLimit.date());
if (n > 0)
return;
- MidnightTimer::disconnect(this, SLOT(checkDeferralLimit()));
+ MidnightTimer::disconnect(this, TQT_SLOT(checkDeferralLimit()));
if (n == 0)
{
// The deferral limit will be reached today
- n = QTime::currentTime().secsTo(mDeferLimit.time());
+ n = TQTime::currentTime().secsTo(mDeferLimit.time());
if (n > 0)
{
- QTimer::singleShot(n * 1000, this, SLOT(checkDeferralLimit()));
+ TQTimer::singleShot(n * 1000, this, TQT_SLOT(checkDeferralLimit()));
return;
}
}
@@ -1540,14 +1540,14 @@ void MessageWin::checkDeferralLimit()
*/
void MessageWin::slotDefer()
{
- mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), QDateTime::currentDateTime().addSecs(60),
+ mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime::currentDateTime().addSecs(60),
false, this, "deferDlg");
if (mDefaultDeferMinutes > 0)
mDeferDlg->setDeferMinutes(mDefaultDeferMinutes);
mDeferDlg->setLimit(mEventID);
if (!Preferences::modalMessages())
lower();
- if (mDeferDlg->exec() == QDialog::Accepted)
+ if (mDeferDlg->exec() == TQDialog::Accepted)
{
DateTime dateTime = mDeferDlg->getDateTime();
int delayMins = mDeferDlg->deferMinutes();
@@ -1664,16 +1664,16 @@ bool wantModal()
/*=============================================================================
= Class MWMimeSourceFactory
* Gets the mime type of a text file from not only its extension (as per
-* QMimeSourceFactory), but also from its contents. This allows the detection
+* TQMimeSourceFactory), but also from its contents. This allows the detection
* of plain text files without file name extensions.
=============================================================================*/
-MWMimeSourceFactory::MWMimeSourceFactory(const QString& absPath, KTextBrowser* view)
- : QMimeSourceFactory(),
+MWMimeSourceFactory::MWMimeSourceFactory(const TQString& absPath, KTextBrowser* view)
+ : TQMimeSourceFactory(),
mMimeType("text/plain"),
mLast(0)
{
view->setMimeSourceFactory(this);
- QString type = KMimeType::findByPath(absPath)->name();
+ TQString type = KMimeType::findByPath(absPath)->name();
switch (KAlarm::fileType(type))
{
case KAlarm::TextPlain:
@@ -1684,18 +1684,18 @@ MWMimeSourceFactory::MWMimeSourceFactory(const QString& absPath, KTextBrowser* v
default:
// It's assumed to be a text file
mTextFile = absPath;
- view->QTextBrowser::setSource(absPath);
+ view->TQTextBrowser::setSource(absPath);
break;
case KAlarm::Image:
// It's an image file
- QString text = "<img source=\"";
+ TQString text = "<img source=\"";
text += absPath;
text += "\">";
view->setText(text);
break;
}
- setFilePath(QFileInfo(absPath).dirPath(true));
+ setFilePath(TQFileInfo(absPath).dirPath(true));
}
MWMimeSourceFactory::~MWMimeSourceFactory()
@@ -1703,19 +1703,19 @@ MWMimeSourceFactory::~MWMimeSourceFactory()
delete mLast;
}
-const QMimeSource* MWMimeSourceFactory::data(const QString& abs_name) const
+const TQMimeSource* MWMimeSourceFactory::data(const TQString& abs_name) const
{
if (abs_name == mTextFile)
{
- QFileInfo fi(abs_name);
+ TQFileInfo fi(abs_name);
if (fi.isReadable())
{
- QFile f(abs_name);
+ TQFile f(abs_name);
if (f.open(IO_ReadOnly) && f.size())
{
- QByteArray ba(f.size());
+ TQByteArray ba(f.size());
f.readBlock(ba.data(), ba.size());
- QStoredDrag* sr = new QStoredDrag(mMimeType);
+ TQStoredDrag* sr = new TQStoredDrag(mMimeType);
sr->setEncodedData(ba);
delete mLast;
mLast = sr;
@@ -1723,5 +1723,5 @@ const QMimeSource* MWMimeSourceFactory::data(const QString& abs_name) const
}
}
}
- return QMimeSourceFactory::data(abs_name);
+ return TQMimeSourceFactory::data(abs_name);
}
diff --git a/kalarm/messagewin.h b/kalarm/messagewin.h
index 0a10b39ce..d8f49ec4b 100644
--- a/kalarm/messagewin.h
+++ b/kalarm/messagewin.h
@@ -23,7 +23,7 @@
/** @file messagewin.h - displays an alarm message */
-#include <qmap.h>
+#include <tqmap.h>
#include "mainwindowbase.h"
#include "alarmevent.h"
@@ -47,7 +47,7 @@ class MessageWin : public MainWindowBase
public:
MessageWin(); // for session management restoration only
MessageWin(const KAEvent&, const KAAlarm&, bool reschedule_event = true, bool allowDefer = true);
- MessageWin(const KAEvent&, const DateTime& alarmDateTime, const QStringList& errmsgs);
+ MessageWin(const KAEvent&, const DateTime& alarmDateTime, const TQStringList& errmsgs);
~MessageWin();
void repeat(const KAAlarm&);
void setRecreating() { mRecreating = true; }
@@ -56,15 +56,15 @@ class MessageWin : public MainWindowBase
bool hasDefer() const { return !!mDeferButton; }
bool isValid() const { return !mInvalid; }
virtual void show();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
static int instanceCount() { return mWindowList.count(); }
- static MessageWin* findEvent(const QString& eventID);
+ static MessageWin* findEvent(const TQString& eventID);
protected:
- virtual void showEvent(QShowEvent*);
- virtual void moveEvent(QMoveEvent*);
- virtual void resizeEvent(QResizeEvent*);
- virtual void closeEvent(QCloseEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void moveEvent(TQMoveEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void closeEvent(TQCloseEvent*);
virtual void saveProperties(KConfig*);
virtual void readProperties(KConfig*);
@@ -97,16 +97,16 @@ class MessageWin : public MainWindowBase
bool haveErrorMessage(unsigned msg) const;
void clearErrorMessage(unsigned msg) const;
- static QValueList<MessageWin*> mWindowList; // list of existing message windows
- static QMap<QString, unsigned> mErrorMessages; // error messages currently displayed, by event ID
+ static TQValueList<MessageWin*> mWindowList; // list of existing message windows
+ static TQMap<TQString, unsigned> mErrorMessages; // error messages currently displayed, by event ID
// Properties needed by readProperties()
- QString mMessage;
- QFont mFont;
- QColor mBgColour, mFgColour;
+ TQString mMessage;
+ TQFont mFont;
+ TQColor mBgColour, mFgColour;
DateTime mDateTime; // date/time displayed in the message window
- QDateTime mCloseTime; // time at which window should be auto-closed
- QString mEventID;
- QString mAudioFile;
+ TQDateTime mCloseTime; // time at which window should be auto-closed
+ TQString mEventID;
+ TQString mAudioFile;
float mVolume;
float mFadeVolume;
int mFadeSeconds;
@@ -114,7 +114,7 @@ class MessageWin : public MainWindowBase
KAAlarm::Type mAlarmType;
KAEvent::Action mAction;
unsigned long mKMailSerialNumber; // if email text, message's KMail serial number, else 0
- QStringList mErrorMsgs;
+ TQStringList mErrorMsgs;
int mRestoreHeight;
bool mAudioRepeat;
bool mConfirmAck;
@@ -124,27 +124,27 @@ class MessageWin : public MainWindowBase
// Sound file playing
KArtsDispatcher* mArtsDispatcher;
KDE::PlayObject* mPlayObject;
- QCString mKMixName; // DCOP name for KMix
- QString mKMixError; // error message starting KMix
- QTimer* mPlayTimer; // timer for repeating the sound file
- QTimer* mFadeTimer; // timer for fading the sound volume
+ TQCString mKMixName; // DCOP name for KMix
+ TQString mKMixError; // error message starting KMix
+ TQTimer* mPlayTimer; // timer for repeating the sound file
+ TQTimer* mFadeTimer; // timer for fading the sound volume
float mOldVolume; // volume before volume was set for sound file
- QString mLocalAudioFile; // local copy of audio file
- QTime mAudioFileStart; // time when audio file loading first started, or when play first started
+ TQString mLocalAudioFile; // local copy of audio file
+ TQTime mAudioFileStart; // time when audio file loading first started, or when play first started
int mAudioFileLoadSecs; // how many seconds it took to load audio file
bool mPlayedOnce; // the sound file has started playing at least once
bool mPlayed; // the PlayObject->play() has been called
// Miscellaneous
KAEvent mEvent; // the whole event, for updating the calendar file
- QLabel* mRemainingText; // the remaining time (for a reminder window)
+ TQLabel* mRemainingText; // the remaining time (for a reminder window)
KPushButton* mOkButton;
- QPushButton* mEditButton;
- QPushButton* mDeferButton;
- QPushButton* mSilenceButton;
- QPushButton* mKAlarmButton;
- QPushButton* mKMailButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mDeferButton;
+ TQPushButton* mSilenceButton;
+ TQPushButton* mKAlarmButton;
+ TQPushButton* mKMailButton;
DeferAlarmDlg* mDeferDlg;
- QDateTime mDeferLimit; // last time to which the message can currently be deferred
+ TQDateTime mDeferLimit; // last time to which the message can currently be deferred
mutable KWinModule* mWinModule;
int mFlags;
int mLateCancel;
diff --git a/kalarm/pickfileradio.cpp b/kalarm/pickfileradio.cpp
index c00276502..15b56d942 100644
--- a/kalarm/pickfileradio.cpp
+++ b/kalarm/pickfileradio.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -30,7 +30,7 @@
#include "pickfileradio.moc"
-PickFileRadio::PickFileRadio(QPushButton* button, LineEdit* edit, const QString& text, QButtonGroup* parent, const char* name)
+PickFileRadio::PickFileRadio(TQPushButton* button, LineEdit* edit, const TQString& text, TQButtonGroup* parent, const char* name)
: RadioButton(text, parent, name),
mGroup(parent),
mEdit(edit),
@@ -41,13 +41,13 @@ PickFileRadio::PickFileRadio(QPushButton* button, LineEdit* edit, const QString&
Q_ASSERT(parent);
Q_ASSERT(button);
mButton->setEnabled(false);
- connect(mButton, SIGNAL(clicked()), SLOT(slotPickFile()));
+ connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
if (mEdit)
mEdit->setEnabled(false);
- connect(mGroup, SIGNAL(buttonSet(int)), SLOT(slotSelectionChanged(int)));
+ connect(mGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotSelectionChanged(int)));
}
-PickFileRadio::PickFileRadio(const QString& text, QButtonGroup* parent, const char* name)
+PickFileRadio::PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name)
: RadioButton(text, parent, name),
mGroup(parent),
mEdit(0),
@@ -58,16 +58,16 @@ PickFileRadio::PickFileRadio(const QString& text, QButtonGroup* parent, const ch
Q_ASSERT(parent);
}
-void PickFileRadio::init(QPushButton* button, LineEdit* edit)
+void PickFileRadio::init(TQPushButton* button, LineEdit* edit)
{
Q_ASSERT(button);
mEdit = edit;
mButton = button;
mButton->setEnabled(false);
- connect(mButton, SIGNAL(clicked()), SLOT(slotPickFile()));
+ connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
if (mEdit)
mEdit->setEnabled(false);
- connect(mGroup, SIGNAL(buttonSet(int)), SLOT(slotSelectionChanged(int)));
+ connect(mGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotSelectionChanged(int)));
setReadOnly(RadioButton::isReadOnly());
}
@@ -85,12 +85,12 @@ void PickFileRadio::setReadOnly(bool ro)
}
}
-void PickFileRadio::setFile(const QString& file)
+void PickFileRadio::setFile(const TQString& file)
{
mFile = file;
}
-QString PickFileRadio::file() const
+TQString PickFileRadio::file() const
{
return mEdit ? mEdit->text() : mFile;
}
@@ -165,7 +165,7 @@ void PickFileRadio::slotPickFile()
// No file is selected, so revert to the previous radio button selection.
// But wait a moment before setting the radio button, or it won't work.
mRevertId = true; // prevent picker dialogue popping up twice
- QTimer::singleShot(0, this, SLOT(setLastId()));
+ TQTimer::singleShot(0, this, TQT_SLOT(setLastId()));
}
}
diff --git a/kalarm/pickfileradio.h b/kalarm/pickfileradio.h
index 5486a8a6e..974d55023 100644
--- a/kalarm/pickfileradio.h
+++ b/kalarm/pickfileradio.h
@@ -58,19 +58,19 @@ class PickFileRadio : public RadioButton
* @param parent Button group which is to be the parent object for the radio button.
* @param name The name of this widget.
*/
- PickFileRadio(QPushButton* button, LineEdit* edit, const QString& text, QButtonGroup* parent, const char* name = 0);
+ PickFileRadio(TQPushButton* button, LineEdit* edit, const TQString& text, TQButtonGroup* parent, const char* name = 0);
/** Constructor.
* The init() method must be called before the widget can be used.
* @param text Radio button's text.
* @param parent Button group which is to be the parent object for the radio button.
* @param name The name of this widget.
*/
- PickFileRadio(const QString& text, QButtonGroup* parent, const char* name = 0);
+ PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0);
/** Initialises the widget.
* @param button Push button to invoke the file picker dialogue.
* @param edit File name edit widget, or null if there is none.
*/
- void init(QPushButton* button, LineEdit* edit = 0);
+ void init(TQPushButton* button, LineEdit* edit = 0);
/** Sets whether the radio button and associated widgets are read-only for the user.
* If read-only, their states cannot be changed by the user.
* @param readOnly True to set the widgets read-only, false to set them read-write.
@@ -79,21 +79,21 @@ class PickFileRadio : public RadioButton
/** Chooses a file, for example by displaying a file selection dialogue.
* This method is called when the push button is clicked - the client
* should not activate a file selection dialogue directly.
- * @return Selected file name, or QString::null if no selection made.
+ * @return Selected file name, or TQString::null if no selection made.
*/
- virtual QString pickFile() = 0;
+ virtual TQString pickFile() = 0;
/** Notifies the widget of the currently selected file name.
* This should only be used when no file name edit box is used.
* It should be called to initialise the widget's data, and also any time the file
* name is changed without using the push button.
*/
- void setFile(const QString& file);
+ void setFile(const TQString& file);
/** Returns the currently selected file name. */
- QString file() const;
+ TQString file() const;
/** Returns the associated file name edit widget, or null if none. */
LineEdit* fileEdit() const { return mEdit; }
/** Returns the associated file browse push button. */
- QPushButton* pushButton() const { return mButton; }
+ TQPushButton* pushButton() const { return mButton; }
public slots:
/** Enables or disables the radio button, and adjusts the enabled state of the
@@ -109,10 +109,10 @@ class PickFileRadio : public RadioButton
private:
bool pickFileIfNone();
- QButtonGroup* mGroup; // button group which radio button is in
+ TQButtonGroup* mGroup; // button group which radio button is in
LineEdit* mEdit; // file name edit box, or null if none
- QPushButton* mButton; // push button to pick a file
- QString mFile; // saved file name (if mEdit is null)
+ TQPushButton* mButton; // push button to pick a file
+ TQString mFile; // saved file name (if mEdit is null)
int mLastId; // previous radio button selected
bool mRevertId; // true to revert to the previous radio button selection
};
diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp
index 2b07c4995..ff312416d 100644
--- a/kalarm/prefdlg.cpp
+++ b/kalarm/prefdlg.cpp
@@ -20,18 +20,18 @@
#include "kalarm.h"
-#include <qobjectlist.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqobjectlist.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -80,14 +80,14 @@
// %w = command to execute in terminal, with 'sleep 86400' appended
// %C = temporary command file to execute in terminal
// %W = temporary command file to execute in terminal, with 'sleep 86400' appended
-static QString xtermCommands[] = {
- QString::fromLatin1("xterm -sb -hold -title %t -e %c"),
- QString::fromLatin1("konsole --noclose -T %t -e ${SHELL:-sh} -c %c"),
- QString::fromLatin1("gnome-terminal -t %t -e %W"),
- QString::fromLatin1("eterm --pause -T %t -e %C"), // some systems use eterm...
- QString::fromLatin1("Eterm --pause -T %t -e %C"), // while some use Eterm
- QString::fromLatin1("rxvt -title %t -e ${SHELL:-sh} -c %w"),
- QString::null // end of list indicator - don't change!
+static TQString xtermCommands[] = {
+ TQString::fromLatin1("xterm -sb -hold -title %t -e %c"),
+ TQString::fromLatin1("konsole --noclose -T %t -e ${SHELL:-sh} -c %c"),
+ TQString::fromLatin1("gnome-terminal -t %t -e %W"),
+ TQString::fromLatin1("eterm --pause -T %t -e %C"), // some systems use eterm...
+ TQString::fromLatin1("Eterm --pause -T %t -e %C"), // while some use Eterm
+ TQString::fromLatin1("rxvt -title %t -e ${SHELL:-sh} -c %w"),
+ TQString::null // end of list indicator - don't change!
};
@@ -122,7 +122,7 @@ KAlarmPrefDlg::KAlarmPrefDlg()
setWFlags(Qt::WDestructiveClose);
setIconListAllVisible(true);
- QVBox* frame = addVBoxPage(i18n("General"), i18n("General"), DesktopIcon("misc"));
+ TQVBox* frame = addVBoxPage(i18n("General"), i18n("General"), DesktopIcon("misc"));
mMiscPage = new MiscPrefTab(frame);
frame = addVBoxPage(i18n("Email"), i18n("Email Alarm Settings"), DesktopIcon("mail_generic"));
@@ -166,7 +166,7 @@ void KAlarmPrefDlg::slotHelp()
void KAlarmPrefDlg::slotApply()
{
kdDebug(5950) << "KAlarmPrefDlg::slotApply()" << endl;
- QString errmsg = mEmailPage->validate();
+ TQString errmsg = mEmailPage->validate();
if (!errmsg.isEmpty())
{
showPage(pageIndex(mEmailPage->parentWidget()));
@@ -228,12 +228,12 @@ void KAlarmPrefDlg::restore()
=============================================================================*/
int PrefsTabBase::mIndentWidth = 0;
-PrefsTabBase::PrefsTabBase(QVBox* frame)
- : QWidget(frame),
+PrefsTabBase::PrefsTabBase(TQVBox* frame)
+ : TQWidget(frame),
mPage(frame)
{
if (!mIndentWidth)
- mIndentWidth = style().subRect(QStyle::SR_RadioButtonIndicator, this).width();
+ mIndentWidth = style().subRect(TQStyle::SR_RadioButtonIndicator, this).width();
}
void PrefsTabBase::apply(bool syncToDisc)
@@ -247,24 +247,24 @@ void PrefsTabBase::apply(bool syncToDisc)
= Class MiscPrefTab
=============================================================================*/
-MiscPrefTab::MiscPrefTab(QVBox* frame)
+MiscPrefTab::MiscPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
- QGroupBox* group = new QButtonGroup(i18n("Run Mode"), mPage, "modeGroup");
- QGridLayout* grid = new QGridLayout(group, 6, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQButtonGroup(i18n("Run Mode"), mPage, "modeGroup");
+ TQGridLayout* grid = new TQGridLayout(group, 6, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->setColStretch(2, 1);
grid->addColSpacing(0, indentWidth());
grid->addColSpacing(1, indentWidth());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
// Run-on-demand radio button
- mRunOnDemand = new QRadioButton(i18n("&Run only on demand"), group, "runDemand");
+ mRunOnDemand = new TQRadioButton(i18n("&Run only on demand"), group, "runDemand");
mRunOnDemand->setFixedSize(mRunOnDemand->sizeHint());
- connect(mRunOnDemand, SIGNAL(toggled(bool)), SLOT(slotRunModeToggled(bool)));
- QWhatsThis::add(mRunOnDemand,
+ connect(mRunOnDemand, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotRunModeToggled(bool)));
+ TQWhatsThis::add(mRunOnDemand,
i18n("Check to run KAlarm only when required.\n\n"
"Notes:\n"
"1. Alarms are displayed even when KAlarm is not running, since alarm monitoring is done by the alarm daemon.\n"
@@ -272,10 +272,10 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
grid->addMultiCellWidget(mRunOnDemand, 1, 1, 0, 2, alignment);
// Run-in-system-tray radio button
- mRunInSystemTray = new QRadioButton(i18n("Run continuously in system &tray"), group, "runTray");
+ mRunInSystemTray = new TQRadioButton(i18n("Run continuously in system &tray"), group, "runTray");
mRunInSystemTray->setFixedSize(mRunInSystemTray->sizeHint());
- connect(mRunInSystemTray, SIGNAL(toggled(bool)), SLOT(slotRunModeToggled(bool)));
- QWhatsThis::add(mRunInSystemTray,
+ connect(mRunInSystemTray, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotRunModeToggled(bool)));
+ TQWhatsThis::add(mRunInSystemTray,
i18n("Check to run KAlarm continuously in the KDE system tray.\n\n"
"Notes:\n"
"1. With this option selected, closing the system tray icon will quit KAlarm.\n"
@@ -284,117 +284,117 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
grid->addMultiCellWidget(mRunInSystemTray, 2, 2, 0, 2, alignment);
// Run continuously options
- mDisableAlarmsIfStopped = new QCheckBox(i18n("Disa&ble alarms while not running"), group, "disableAl");
+ mDisableAlarmsIfStopped = new TQCheckBox(i18n("Disa&ble alarms while not running"), group, "disableAl");
mDisableAlarmsIfStopped->setFixedSize(mDisableAlarmsIfStopped->sizeHint());
- connect(mDisableAlarmsIfStopped, SIGNAL(toggled(bool)), SLOT(slotDisableIfStoppedToggled(bool)));
- QWhatsThis::add(mDisableAlarmsIfStopped,
+ connect(mDisableAlarmsIfStopped, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDisableIfStoppedToggled(bool)));
+ TQWhatsThis::add(mDisableAlarmsIfStopped,
i18n("Check to disable alarms whenever KAlarm is not running. Alarms will only appear while the system tray icon is visible."));
grid->addMultiCellWidget(mDisableAlarmsIfStopped, 3, 3, 1, 2, alignment);
- mQuitWarn = new QCheckBox(i18n("Warn before &quitting"), group, "disableAl");
+ mQuitWarn = new TQCheckBox(i18n("Warn before &quitting"), group, "disableAl");
mQuitWarn->setFixedSize(mQuitWarn->sizeHint());
- QWhatsThis::add(mQuitWarn,
+ TQWhatsThis::add(mQuitWarn,
i18n("Check to display a warning prompt before quitting KAlarm."));
grid->addWidget(mQuitWarn, 4, 2, alignment);
- mAutostartTrayIcon = new QCheckBox(i18n("Autostart at &login"), group, "autoTray");
+ mAutostartTrayIcon = new TQCheckBox(i18n("Autostart at &login"), group, "autoTray");
#ifdef AUTOSTART_BY_KALARMD
- connect(mAutostartTrayIcon, SIGNAL(toggled(bool)), SLOT(slotAutostartToggled(bool)));
+ connect(mAutostartTrayIcon, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutostartToggled(bool)));
#endif
grid->addMultiCellWidget(mAutostartTrayIcon, 5, 5, 0, 2, alignment);
// Autostart alarm daemon
- mAutostartDaemon = new QCheckBox(i18n("Start alarm monitoring at lo&gin"), group, "startDaemon");
+ mAutostartDaemon = new TQCheckBox(i18n("Start alarm monitoring at lo&gin"), group, "startDaemon");
mAutostartDaemon->setFixedSize(mAutostartDaemon->sizeHint());
- connect(mAutostartDaemon, SIGNAL(clicked()), SLOT(slotAutostartDaemonClicked()));
- QWhatsThis::add(mAutostartDaemon,
+ connect(mAutostartDaemon, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutostartDaemonClicked()));
+ TQWhatsThis::add(mAutostartDaemon,
i18n("Automatically start alarm monitoring whenever you start KDE, by running the alarm daemon (%1).\n\n"
"This option should always be checked unless you intend to discontinue use of KAlarm.")
- .arg(QString::fromLatin1(DAEMON_APP_NAME)));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME)));
grid->addMultiCellWidget(mAutostartDaemon, 6, 6, 0, 2, alignment);
group->setFixedHeight(group->sizeHint().height());
// Start-of-day time
- QHBox* itemBox = new QHBox(mPage);
- QHBox* box = new QHBox(itemBox); // this is to control the QWhatsThis text display area
+ TQHBox* itemBox = new TQHBox(mPage);
+ TQHBox* box = new TQHBox(itemBox); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("&Start of day for date-only alarms:"), box);
+ TQLabel* label = new TQLabel(i18n("&Start of day for date-only alarms:"), box);
mStartOfDay = new TimeEdit(box);
mStartOfDay->setFixedSize(mStartOfDay->sizeHint());
label->setBuddy(mStartOfDay);
- static const QString startOfDayText = i18n("The earliest time of day at which a date-only alarm (i.e. "
+ static const TQString startOfDayText = i18n("The earliest time of day at which a date-only alarm (i.e. "
"an alarm with \"any time\" specified) will be triggered.");
- QWhatsThis::add(box, QString("%1\n\n%2").arg(startOfDayText).arg(TimeSpinBox::shiftWhatsThis()));
- itemBox->setStretchFactor(new QWidget(itemBox), 1); // left adjust the controls
+ TQWhatsThis::add(box, TQString("%1\n\n%2").arg(startOfDayText).arg(TimeSpinBox::shiftWhatsThis()));
+ itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls
itemBox->setFixedHeight(box->sizeHint().height());
// Confirm alarm deletion?
- itemBox = new QHBox(mPage); // this is to allow left adjustment
- mConfirmAlarmDeletion = new QCheckBox(i18n("Con&firm alarm deletions"), itemBox, "confirmDeletion");
+ itemBox = new TQHBox(mPage); // this is to allow left adjustment
+ mConfirmAlarmDeletion = new TQCheckBox(i18n("Con&firm alarm deletions"), itemBox, "confirmDeletion");
mConfirmAlarmDeletion->setMinimumSize(mConfirmAlarmDeletion->sizeHint());
- QWhatsThis::add(mConfirmAlarmDeletion,
+ TQWhatsThis::add(mConfirmAlarmDeletion,
i18n("Check to be prompted for confirmation each time you delete an alarm."));
- itemBox->setStretchFactor(new QWidget(itemBox), 1); // left adjust the controls
+ itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls
itemBox->setFixedHeight(itemBox->sizeHint().height());
// Expired alarms
- group = new QGroupBox(i18n("Expired Alarms"), mPage);
- grid = new QGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ group = new TQGroupBox(i18n("Expired Alarms"), mPage);
+ grid = new TQGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->setColStretch(1, 1);
grid->addColSpacing(0, indentWidth());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- mKeepExpired = new QCheckBox(i18n("Keep alarms after e&xpiry"), group, "keepExpired");
+ mKeepExpired = new TQCheckBox(i18n("Keep alarms after e&xpiry"), group, "keepExpired");
mKeepExpired->setFixedSize(mKeepExpired->sizeHint());
- connect(mKeepExpired, SIGNAL(toggled(bool)), SLOT(slotExpiredToggled(bool)));
- QWhatsThis::add(mKeepExpired,
+ connect(mKeepExpired, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotExpiredToggled(bool)));
+ TQWhatsThis::add(mKeepExpired,
i18n("Check to store alarms after expiry or deletion (except deleted alarms which were never triggered)."));
grid->addMultiCellWidget(mKeepExpired, 1, 1, 0, 1, alignment);
- box = new QHBox(group);
+ box = new TQHBox(group);
box->setSpacing(KDialog::spacingHint());
- mPurgeExpired = new QCheckBox(i18n("Discard ex&pired alarms after:"), box, "purgeExpired");
+ mPurgeExpired = new TQCheckBox(i18n("Discard ex&pired alarms after:"), box, "purgeExpired");
mPurgeExpired->setMinimumSize(mPurgeExpired->sizeHint());
- connect(mPurgeExpired, SIGNAL(toggled(bool)), SLOT(slotExpiredToggled(bool)));
+ connect(mPurgeExpired, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotExpiredToggled(bool)));
mPurgeAfter = new SpinBox(box);
mPurgeAfter->setMinValue(1);
mPurgeAfter->setLineShiftStep(10);
mPurgeAfter->setMinimumSize(mPurgeAfter->sizeHint());
- mPurgeAfterLabel = new QLabel(i18n("da&ys"), box);
+ mPurgeAfterLabel = new TQLabel(i18n("da&ys"), box);
mPurgeAfterLabel->setMinimumSize(mPurgeAfterLabel->sizeHint());
mPurgeAfterLabel->setBuddy(mPurgeAfter);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Uncheck to store expired alarms indefinitely. Check to enter how long expired alarms should be stored."));
grid->addWidget(box, 2, 1, alignment);
- mClearExpired = new QPushButton(i18n("Clear Expired Alar&ms"), group);
+ mClearExpired = new TQPushButton(i18n("Clear Expired Alar&ms"), group);
mClearExpired->setFixedSize(mClearExpired->sizeHint());
- connect(mClearExpired, SIGNAL(clicked()), SLOT(slotClearExpired()));
- QWhatsThis::add(mClearExpired,
+ connect(mClearExpired, TQT_SIGNAL(clicked()), TQT_SLOT(slotClearExpired()));
+ TQWhatsThis::add(mClearExpired,
i18n("Delete all existing expired alarms."));
grid->addWidget(mClearExpired, 3, 1, alignment);
group->setFixedHeight(group->sizeHint().height());
// Terminal window to use for command alarms
- group = new QGroupBox(i18n("Terminal for Command Alarms"), mPage);
- QWhatsThis::add(group,
+ group = new TQGroupBox(i18n("Terminal for Command Alarms"), mPage);
+ TQWhatsThis::add(group,
i18n("Choose which application to use when a command alarm is executed in a terminal window"));
- grid = new QGridLayout(group, 1, 3, KDialog::marginHint(), KDialog::spacingHint());
+ grid = new TQGridLayout(group, 1, 3, KDialog::marginHint(), KDialog::spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
int row = 0;
- mXtermType = new QButtonGroup(group);
+ mXtermType = new TQButtonGroup(group);
mXtermType->hide();
- QString whatsThis = i18n("The parameter is a command line, e.g. 'xterm -e'", "Check to execute command alarms in a terminal window by '%1'");
+ TQString whatsThis = i18n("The parameter is a command line, e.g. 'xterm -e'", "Check to execute command alarms in a terminal window by '%1'");
int index = 0;
mXtermFirst = -1;
for (mXtermCount = 0; !xtermCommands[mXtermCount].isNull(); ++mXtermCount)
{
- QString cmd = xtermCommands[mXtermCount];
- QStringList args = KShell::splitArgs(cmd);
+ TQString cmd = xtermCommands[mXtermCount];
+ TQStringList args = KShell::splitArgs(cmd);
if (args.isEmpty() || KStandardDirs::findExe(args[0]).isEmpty())
continue;
- QRadioButton* radio = new QRadioButton(args[0], group);
+ TQRadioButton* radio = new TQRadioButton(args[0], group);
radio->setMinimumSize(radio->sizeHint());
mXtermType->insert(radio, mXtermCount);
if (mXtermFirst < 0)
@@ -404,26 +404,26 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
cmd.replace("%w", "<command; sleep>");
cmd.replace("%C", "[command]");
cmd.replace("%W", "[command; sleep]");
- QWhatsThis::add(radio, whatsThis.arg(cmd));
+ TQWhatsThis::add(radio, whatsThis.arg(cmd));
grid->addWidget(radio, (row = index/3 + 1), index % 3, Qt::AlignAuto);
++index;
}
- box = new QHBox(group);
+ box = new TQHBox(group);
grid->addMultiCellWidget(box, row + 1, row + 1, 0, 2, Qt::AlignAuto);
- QRadioButton* radio = new QRadioButton(i18n("Other:"), box);
+ TQRadioButton* radio = new TQRadioButton(i18n("Other:"), box);
radio->setFixedSize(radio->sizeHint());
- connect(radio, SIGNAL(toggled(bool)), SLOT(slotOtherTerminalToggled(bool)));
+ connect(radio, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotOtherTerminalToggled(bool)));
mXtermType->insert(radio, mXtermCount);
if (mXtermFirst < 0)
mXtermFirst = mXtermCount; // note the id of the first button
- mXtermCommand = new QLineEdit(box);
- QWhatsThis::add(box,
+ mXtermCommand = new TQLineEdit(box);
+ TQWhatsThis::add(box,
i18n("Enter the full command line needed to execute a command in your chosen terminal window. "
"By default the alarm's command string will be appended to what you enter here. "
"See the KAlarm Handbook for details of special codes to tailor the command line."));
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void MiscPrefTab::restore()
@@ -438,7 +438,7 @@ void MiscPrefTab::restore()
mConfirmAlarmDeletion->setChecked(Preferences::confirmAlarmDeletion());
mStartOfDay->setValue(Preferences::mStartOfDay);
setExpiredControls(Preferences::mExpiredKeepDays);
- QString xtermCmd = Preferences::cmdXTermCommand();
+ TQString xtermCmd = Preferences::cmdXTermCommand();
int id = mXtermFirst;
if (!xtermCmd.isEmpty())
{
@@ -460,13 +460,13 @@ void MiscPrefTab::apply(bool syncToDisc)
int xtermID = mXtermType->selectedId();
if (xtermID >= mXtermCount)
{
- QString cmd = mXtermCommand->text();
+ TQString cmd = mXtermCommand->text();
if (cmd.isEmpty())
xtermID = -1; // 'Other' is only acceptable if it's non-blank
else
{
- QStringList args = KShell::splitArgs(cmd);
- cmd = args.isEmpty() ? QString::null : args[0];
+ TQStringList args = KShell::splitArgs(cmd);
+ cmd = args.isEmpty() ? TQString::null : args[0];
if (KStandardDirs::findExe(cmd).isEmpty())
{
mXtermCommand->setFocus();
@@ -526,7 +526,7 @@ void MiscPrefTab::slotAutostartDaemonClicked()
if (!mAutostartDaemon->isChecked()
&& KMessageBox::warningYesNo(this,
i18n("You should not uncheck this option unless you intend to discontinue use of KAlarm"),
- QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()
+ TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()
) != KMessageBox::Yes)
mAutostartDaemon->setChecked(true);
}
@@ -535,7 +535,7 @@ void MiscPrefTab::slotRunModeToggled(bool)
{
bool systray = mRunInSystemTray->isOn();
mAutostartTrayIcon->setText(systray ? i18n("Autostart at &login") : i18n("Autostart system tray &icon at login"));
- QWhatsThis::add(mAutostartTrayIcon, (systray ? i18n("Check to run KAlarm whenever you start KDE.")
+ TQWhatsThis::add(mAutostartTrayIcon, (systray ? i18n("Check to run KAlarm whenever you start KDE.")
: i18n("Check to display the system tray icon whenever you start KDE.")));
mDisableAlarmsIfStopped->setEnabled(systray);
slotDisableIfStoppedToggled(true);
@@ -593,14 +593,14 @@ void MiscPrefTab::slotOtherTerminalToggled(bool on)
= Class EmailPrefTab
=============================================================================*/
-EmailPrefTab::EmailPrefTab(QVBox* frame)
+EmailPrefTab::EmailPrefTab(TQVBox* frame)
: PrefsTabBase(frame),
mAddressChanged(false),
mBccAddressChanged(false)
{
- QHBox* box = new QHBox(mPage);
+ TQHBox* box = new TQHBox(mPage);
box->setSpacing(2*KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Email client:"), box);
+ TQLabel* label = new TQLabel(i18n("Email client:"), box);
mEmailClient = new ButtonGroup(box);
mEmailClient->hide();
RadioButton* radio = new RadioButton(i18n("&KMail"), box, "kmail");
@@ -609,25 +609,25 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("&Sendmail"), box, "sendmail");
radio->setMinimumSize(radio->sizeHint());
mEmailClient->insert(radio, Preferences::SENDMAIL);
- connect(mEmailClient, SIGNAL(buttonSet(int)), SLOT(slotEmailClientChanged(int)));
+ connect(mEmailClient, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotEmailClientChanged(int)));
box->setFixedHeight(box->sizeHint().height());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Choose how to send email when an email alarm is triggered.\n"
"KMail: The email is sent automatically via KMail. KMail is started first if necessary.\n"
"Sendmail: The email is sent automatically. This option will only work if "
"your system is configured to use sendmail or a sendmail compatible mail transport agent."));
- box = new QHBox(mPage); // this is to allow left adjustment
- mEmailCopyToKMail = new QCheckBox(i18n("Co&py sent emails into KMail's %1 folder").arg(KAMail::i18n_sent_mail()), box);
+ box = new TQHBox(mPage); // this is to allow left adjustment
+ mEmailCopyToKMail = new TQCheckBox(i18n("Co&py sent emails into KMail's %1 folder").arg(KAMail::i18n_sent_mail()), box);
mEmailCopyToKMail->setFixedSize(mEmailCopyToKMail->sizeHint());
- QWhatsThis::add(mEmailCopyToKMail,
+ TQWhatsThis::add(mEmailCopyToKMail,
i18n("After sending an email, store a copy in KMail's %1 folder").arg(KAMail::i18n_sent_mail()));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
// Your Email Address group box
- QGroupBox* group = new QGroupBox(i18n("Your Email Address"), mPage);
- QGridLayout* grid = new QGridLayout(group, 6, 3, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("Your Email Address"), mPage);
+ TQGridLayout* grid = new TQGridLayout(group, 6, 3, KDialog::marginHint(), KDialog::spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
grid->setColStretch(1, 1);
@@ -637,7 +637,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
grid->addWidget(label, 1, 0);
mFromAddressGroup = new ButtonGroup(group);
mFromAddressGroup->hide();
- connect(mFromAddressGroup, SIGNAL(buttonSet(int)), SLOT(slotFromAddrChanged(int)));
+ connect(mFromAddressGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotFromAddrChanged(int)));
// Line edit to enter a 'From' email address
radio = new RadioButton(group);
@@ -645,11 +645,11 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio->setFixedSize(radio->sizeHint());
label->setBuddy(radio);
grid->addWidget(radio, 1, 1);
- mEmailAddress = new QLineEdit(group);
- connect(mEmailAddress, SIGNAL(textChanged(const QString&)), SLOT(slotAddressChanged()));
- QString whatsThis = i18n("Your email address, used to identify you as the sender when sending email alarms.");
- QWhatsThis::add(radio, whatsThis);
- QWhatsThis::add(mEmailAddress, whatsThis);
+ mEmailAddress = new TQLineEdit(group);
+ connect(mEmailAddress, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotAddressChanged()));
+ TQString whatsThis = i18n("Your email address, used to identify you as the sender when sending email alarms.");
+ TQWhatsThis::add(radio, whatsThis);
+ TQWhatsThis::add(mEmailAddress, whatsThis);
radio->setFocusWidget(mEmailAddress);
grid->addWidget(mEmailAddress, 1, 2);
@@ -657,7 +657,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("&Use address from Control Center"), group);
radio->setFixedSize(radio->sizeHint());
mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_CONTROL_CENTRE);
- QWhatsThis::add(radio,
+ TQWhatsThis::add(radio,
i18n("Check to use the email address set in the KDE Control Center, to identify you as the sender when sending email alarms."));
grid->addMultiCellWidget(radio, 2, 2, 1, 2, Qt::AlignAuto);
@@ -665,7 +665,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("Use KMail &identities"), group);
radio->setFixedSize(radio->sizeHint());
mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_KMAIL);
- QWhatsThis::add(radio,
+ TQWhatsThis::add(radio,
i18n("Check to use KMail's email identities to identify you as the sender when sending email alarms. "
"For existing email alarms, KMail's default identity will be used. "
"For new email alarms, you will be able to pick which of KMail's identities to use."));
@@ -678,7 +678,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
grid->addWidget(label, 5, 0);
mBccAddressGroup = new ButtonGroup(group);
mBccAddressGroup->hide();
- connect(mBccAddressGroup, SIGNAL(buttonSet(int)), SLOT(slotBccAddrChanged(int)));
+ connect(mBccAddressGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotBccAddrChanged(int)));
// Line edit to enter a 'Bcc' email address
radio = new RadioButton(group);
@@ -686,11 +686,11 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
mBccAddressGroup->insert(radio, Preferences::MAIL_FROM_ADDR);
label->setBuddy(radio);
grid->addWidget(radio, 5, 1);
- mEmailBccAddress = new QLineEdit(group);
+ mEmailBccAddress = new TQLineEdit(group);
whatsThis = i18n("Your email address, used for blind copying email alarms to yourself. "
"If you want blind copies to be sent to your account on the computer which KAlarm runs on, you can simply enter your user login name.");
- QWhatsThis::add(radio, whatsThis);
- QWhatsThis::add(mEmailBccAddress, whatsThis);
+ TQWhatsThis::add(radio, whatsThis);
+ TQWhatsThis::add(mEmailBccAddress, whatsThis);
radio->setFocusWidget(mEmailBccAddress);
grid->addWidget(mEmailBccAddress, 5, 2);
@@ -698,22 +698,22 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("Us&e address from Control Center"), group);
radio->setFixedSize(radio->sizeHint());
mBccAddressGroup->insert(radio, Preferences::MAIL_FROM_CONTROL_CENTRE);
- QWhatsThis::add(radio,
+ TQWhatsThis::add(radio,
i18n("Check to use the email address set in the KDE Control Center, for blind copying email alarms to yourself."));
grid->addMultiCellWidget(radio, 6, 6, 1, 2, Qt::AlignAuto);
group->setFixedHeight(group->sizeHint().height());
- box = new QHBox(mPage); // this is to allow left adjustment
- mEmailQueuedNotify = new QCheckBox(i18n("&Notify when remote emails are queued"), box);
+ box = new TQHBox(mPage); // this is to allow left adjustment
+ mEmailQueuedNotify = new TQCheckBox(i18n("&Notify when remote emails are queued"), box);
mEmailQueuedNotify->setFixedSize(mEmailQueuedNotify->sizeHint());
- QWhatsThis::add(mEmailQueuedNotify,
+ TQWhatsThis::add(mEmailQueuedNotify,
i18n("Display a notification message whenever an email alarm has queued an email for sending to a remote system. "
"This could be useful if, for example, you have a dial-up connection, so that you can then ensure that the email is actually transmitted."));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void EmailPrefTab::restore()
@@ -745,16 +745,16 @@ void EmailPrefTab::setDefaults()
mEmailQueuedNotify->setChecked(Preferences::default_emailQueuedNotify);
}
-void EmailPrefTab::setEmailAddress(Preferences::MailFrom from, const QString& address)
+void EmailPrefTab::setEmailAddress(Preferences::MailFrom from, const TQString& address)
{
mFromAddressGroup->setButton(from);
- mEmailAddress->setText(from == Preferences::MAIL_FROM_ADDR ? address.stripWhiteSpace() : QString());
+ mEmailAddress->setText(from == Preferences::MAIL_FROM_ADDR ? address.stripWhiteSpace() : TQString());
}
-void EmailPrefTab::setEmailBccAddress(bool useControlCentre, const QString& address)
+void EmailPrefTab::setEmailBccAddress(bool useControlCentre, const TQString& address)
{
mBccAddressGroup->setButton(useControlCentre ? Preferences::MAIL_FROM_CONTROL_CENTRE : Preferences::MAIL_FROM_ADDR);
- mEmailBccAddress->setText(useControlCentre ? QString() : address.stripWhiteSpace());
+ mEmailBccAddress->setText(useControlCentre ? TQString() : address.stripWhiteSpace());
}
void EmailPrefTab::slotEmailClientChanged(int id)
@@ -774,12 +774,12 @@ void EmailPrefTab::slotBccAddrChanged(int id)
mBccAddressChanged = true;
}
-QString EmailPrefTab::validate()
+TQString EmailPrefTab::validate()
{
if (mAddressChanged)
{
mAddressChanged = false;
- QString errmsg = validateAddr(mFromAddressGroup, mEmailAddress, KAMail::i18n_NeedFromEmailAddress());
+ TQString errmsg = validateAddr(mFromAddressGroup, mEmailAddress, KAMail::i18n_NeedFromEmailAddress());
if (!errmsg.isEmpty())
return errmsg;
}
@@ -788,27 +788,27 @@ QString EmailPrefTab::validate()
mBccAddressChanged = false;
return validateAddr(mBccAddressGroup, mEmailBccAddress, i18n("No valid 'Bcc' email address is specified."));
}
- return QString::null;
+ return TQString::null;
}
-QString EmailPrefTab::validateAddr(ButtonGroup* group, QLineEdit* addr, const QString& msg)
+TQString EmailPrefTab::validateAddr(ButtonGroup* group, TQLineEdit* addr, const TQString& msg)
{
- QString errmsg = i18n("%1\nAre you sure you want to save your changes?").arg(msg);
+ TQString errmsg = i18n("%1\nAre you sure you want to save your changes?").arg(msg);
switch (group->selectedId())
{
case Preferences::MAIL_FROM_CONTROL_CENTRE:
if (!KAMail::controlCentreAddress().isEmpty())
- return QString::null;
+ return TQString::null;
errmsg = i18n("No email address is currently set in the KDE Control Center. %1").arg(errmsg);
break;
case Preferences::MAIL_FROM_KMAIL:
if (KAMail::identitiesExist())
- return QString::null;
+ return TQString::null;
errmsg = i18n("No KMail identities currently exist. %1").arg(errmsg);
break;
case Preferences::MAIL_FROM_ADDR:
if (!addr->text().stripWhiteSpace().isEmpty())
- return QString::null;
+ return TQString::null;
break;
}
return errmsg;
@@ -819,35 +819,35 @@ QString EmailPrefTab::validateAddr(ButtonGroup* group, QLineEdit* addr, const QS
= Class FontColourPrefTab
=============================================================================*/
-FontColourPrefTab::FontColourPrefTab(QVBox* frame)
+FontColourPrefTab::FontColourPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- mFontChooser = new FontColourChooser(mPage, 0, false, QStringList(), i18n("Message Font && Color"), true, false);
+ mFontChooser = new FontColourChooser(mPage, 0, false, TQStringList(), i18n("Message Font && Color"), true, false);
mPage->setStretchFactor(mFontChooser, 1);
- QFrame* layoutBox = new QFrame(mPage);
- QHBoxLayout* hlayout = new QHBoxLayout(layoutBox);
- QVBoxLayout* colourLayout = new QVBoxLayout(hlayout, KDialog::spacingHint());
+ TQFrame* layoutBox = new TQFrame(mPage);
+ TQHBoxLayout* hlayout = new TQHBoxLayout(layoutBox);
+ TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout, KDialog::spacingHint());
hlayout->addStretch();
- QHBox* box = new QHBox(layoutBox); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(layoutBox); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label1 = new QLabel(i18n("Di&sabled alarm color:"), box);
- box->setStretchFactor(new QWidget(box), 1);
+ TQLabel* label1 = new TQLabel(i18n("Di&sabled alarm color:"), box);
+ box->setStretchFactor(new TQWidget(box), 1);
mDisabledColour = new KColorCombo(box);
label1->setBuddy(mDisabledColour);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Choose the text color in the alarm list for disabled alarms."));
- box = new QHBox(layoutBox); // to group widgets for QWhatsThis text
+ box = new TQHBox(layoutBox); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label2 = new QLabel(i18n("E&xpired alarm color:"), box);
- box->setStretchFactor(new QWidget(box), 1);
+ TQLabel* label2 = new TQLabel(i18n("E&xpired alarm color:"), box);
+ box->setStretchFactor(new TQWidget(box), 1);
mExpiredColour = new KColorCombo(box);
label2->setBuddy(mExpiredColour);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Choose the text color in the alarm list for expired alarms."));
}
@@ -884,140 +884,140 @@ void FontColourPrefTab::setDefaults()
= Class EditPrefTab
=============================================================================*/
-EditPrefTab::EditPrefTab(QVBox* frame)
+EditPrefTab::EditPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- // Get alignment to use in QLabel::setAlignment(alignment | Qt::WordBreak)
+ // Get alignment to use in TQLabel::setAlignment(alignment | Qt::WordBreak)
// (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
int groupTopMargin = fontMetrics().lineSpacing()/2;
- QString defsetting = i18n("The default setting for \"%1\" in the alarm edit dialog.");
- QString soundSetting = i18n("Check to select %1 as the default setting for \"%2\" in the alarm edit dialog.");
+ TQString defsetting = i18n("The default setting for \"%1\" in the alarm edit dialog.");
+ TQString soundSetting = i18n("Check to select %1 as the default setting for \"%2\" in the alarm edit dialog.");
// DISPLAY ALARMS
- QGroupBox* group = new QGroupBox(i18n("Display Alarms"), mPage);
- QBoxLayout* layout = new QVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("Display Alarms"), mPage);
+ TQBoxLayout* layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
- mConfirmAck = new QCheckBox(EditAlarmDlg::i18n_k_ConfirmAck(), group, "defConfAck");
+ mConfirmAck = new TQCheckBox(EditAlarmDlg::i18n_k_ConfirmAck(), group, "defConfAck");
mConfirmAck->setMinimumSize(mConfirmAck->sizeHint());
- QWhatsThis::add(mConfirmAck, defsetting.arg(EditAlarmDlg::i18n_ConfirmAck()));
+ TQWhatsThis::add(mConfirmAck, defsetting.arg(EditAlarmDlg::i18n_ConfirmAck()));
layout->addWidget(mConfirmAck, 0, Qt::AlignAuto);
- mAutoClose = new QCheckBox(LateCancelSelector::i18n_i_AutoCloseWinLC(), group, "defAutoClose");
+ mAutoClose = new TQCheckBox(LateCancelSelector::i18n_i_AutoCloseWinLC(), group, "defAutoClose");
mAutoClose->setMinimumSize(mAutoClose->sizeHint());
- QWhatsThis::add(mAutoClose, defsetting.arg(LateCancelSelector::i18n_AutoCloseWin()));
+ TQWhatsThis::add(mAutoClose, defsetting.arg(LateCancelSelector::i18n_AutoCloseWin()));
layout->addWidget(mAutoClose, 0, Qt::AlignAuto);
- QHBox* box = new QHBox(group);
+ TQHBox* box = new TQHBox(group);
box->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
- QLabel* label = new QLabel(i18n("Reminder &units:"), box);
+ TQLabel* label = new TQLabel(i18n("Reminder &units:"), box);
label->setFixedSize(label->sizeHint());
- mReminderUnits = new QComboBox(box, "defWarnUnits");
+ mReminderUnits = new TQComboBox(box, "defWarnUnits");
mReminderUnits->insertItem(TimePeriod::i18n_Minutes(), TimePeriod::MINUTES);
mReminderUnits->insertItem(TimePeriod::i18n_Hours_Mins(), TimePeriod::HOURS_MINUTES);
mReminderUnits->insertItem(TimePeriod::i18n_Days(), TimePeriod::DAYS);
mReminderUnits->insertItem(TimePeriod::i18n_Weeks(), TimePeriod::WEEKS);
mReminderUnits->setFixedSize(mReminderUnits->sizeHint());
label->setBuddy(mReminderUnits);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("The default units for the reminder in the alarm edit dialog."));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the control
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the control
mSpecialActionsButton = new SpecialActionsButton(EditAlarmDlg::i18n_SpecialActions(), box);
mSpecialActionsButton->setFixedSize(mSpecialActionsButton->sizeHint());
// SOUND
- QButtonGroup* bgroup = new QButtonGroup(SoundPicker::i18n_Sound(), mPage, "soundGroup");
- layout = new QVBoxLayout(bgroup, KDialog::marginHint(), KDialog::spacingHint());
+ TQButtonGroup* bgroup = new TQButtonGroup(SoundPicker::i18n_Sound(), mPage, "soundGroup");
+ layout = new TQVBoxLayout(bgroup, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
- QBoxLayout* hlayout = new QHBoxLayout(layout, KDialog::spacingHint());
- mSound = new QComboBox(false, bgroup, "defSound");
+ TQBoxLayout* hlayout = new TQHBoxLayout(layout, KDialog::spacingHint());
+ mSound = new TQComboBox(false, bgroup, "defSound");
mSound->insertItem(SoundPicker::i18n_None()); // index 0
mSound->insertItem(SoundPicker::i18n_Beep()); // index 1
mSound->insertItem(SoundPicker::i18n_File()); // index 2
if (theApp()->speechEnabled())
mSound->insertItem(SoundPicker::i18n_Speak()); // index 3
mSound->setMinimumSize(mSound->sizeHint());
- QWhatsThis::add(mSound, defsetting.arg(SoundPicker::i18n_Sound()));
+ TQWhatsThis::add(mSound, defsetting.arg(SoundPicker::i18n_Sound()));
hlayout->addWidget(mSound);
hlayout->addStretch(1);
#ifndef WITHOUT_ARTS
- mSoundRepeat = new QCheckBox(i18n("Repea&t sound file"), bgroup, "defRepeatSound");
+ mSoundRepeat = new TQCheckBox(i18n("Repea&t sound file"), bgroup, "defRepeatSound");
mSoundRepeat->setMinimumSize(mSoundRepeat->sizeHint());
- QWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").arg(SoundDlg::i18n_Repeat()));
+ TQWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").arg(SoundDlg::i18n_Repeat()));
hlayout->addWidget(mSoundRepeat);
#endif
- box = new QHBox(bgroup); // this is to control the QWhatsThis text display area
+ box = new TQHBox(bgroup); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mSoundFileLabel = new QLabel(i18n("Sound &file:"), box);
+ mSoundFileLabel = new TQLabel(i18n("Sound &file:"), box);
mSoundFileLabel->setFixedSize(mSoundFileLabel->sizeHint());
- mSoundFile = new QLineEdit(box);
+ mSoundFile = new TQLineEdit(box);
mSoundFileLabel->setBuddy(mSoundFile);
- mSoundFileBrowse = new QPushButton(box);
+ mSoundFileBrowse = new TQPushButton(box);
mSoundFileBrowse->setPixmap(SmallIcon("fileopen"));
mSoundFileBrowse->setFixedSize(mSoundFileBrowse->sizeHint());
- connect(mSoundFileBrowse, SIGNAL(clicked()), SLOT(slotBrowseSoundFile()));
- QToolTip::add(mSoundFileBrowse, i18n("Choose a sound file"));
- QWhatsThis::add(box,
+ connect(mSoundFileBrowse, TQT_SIGNAL(clicked()), TQT_SLOT(slotBrowseSoundFile()));
+ TQToolTip::add(mSoundFileBrowse, i18n("Choose a sound file"));
+ TQWhatsThis::add(box,
i18n("Enter the default sound file to use in the alarm edit dialog."));
box->setFixedHeight(box->sizeHint().height());
layout->addWidget(box);
bgroup->setFixedHeight(bgroup->sizeHint().height());
// COMMAND ALARMS
- group = new QGroupBox(i18n("Command Alarms"), mPage);
- layout = new QVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
+ group = new TQGroupBox(i18n("Command Alarms"), mPage);
+ layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
- layout = new QHBoxLayout(layout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(layout, KDialog::spacingHint());
- mCmdScript = new QCheckBox(EditAlarmDlg::i18n_p_EnterScript(), group, "defCmdScript");
+ mCmdScript = new TQCheckBox(EditAlarmDlg::i18n_p_EnterScript(), group, "defCmdScript");
mCmdScript->setMinimumSize(mCmdScript->sizeHint());
- QWhatsThis::add(mCmdScript, defsetting.arg(EditAlarmDlg::i18n_EnterScript()));
+ TQWhatsThis::add(mCmdScript, defsetting.arg(EditAlarmDlg::i18n_EnterScript()));
layout->addWidget(mCmdScript);
layout->addStretch();
- mCmdXterm = new QCheckBox(EditAlarmDlg::i18n_w_ExecInTermWindow(), group, "defCmdXterm");
+ mCmdXterm = new TQCheckBox(EditAlarmDlg::i18n_w_ExecInTermWindow(), group, "defCmdXterm");
mCmdXterm->setMinimumSize(mCmdXterm->sizeHint());
- QWhatsThis::add(mCmdXterm, defsetting.arg(EditAlarmDlg::i18n_ExecInTermWindow()));
+ TQWhatsThis::add(mCmdXterm, defsetting.arg(EditAlarmDlg::i18n_ExecInTermWindow()));
layout->addWidget(mCmdXterm);
// EMAIL ALARMS
- group = new QGroupBox(i18n("Email Alarms"), mPage);
- layout = new QVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
+ group = new TQGroupBox(i18n("Email Alarms"), mPage);
+ layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
// BCC email to sender
- mEmailBcc = new QCheckBox(EditAlarmDlg::i18n_e_CopyEmailToSelf(), group, "defEmailBcc");
+ mEmailBcc = new TQCheckBox(EditAlarmDlg::i18n_e_CopyEmailToSelf(), group, "defEmailBcc");
mEmailBcc->setMinimumSize(mEmailBcc->sizeHint());
- QWhatsThis::add(mEmailBcc, defsetting.arg(EditAlarmDlg::i18n_CopyEmailToSelf()));
+ TQWhatsThis::add(mEmailBcc, defsetting.arg(EditAlarmDlg::i18n_CopyEmailToSelf()));
layout->addWidget(mEmailBcc, 0, Qt::AlignAuto);
// MISCELLANEOUS
// Show in KOrganizer
- mCopyToKOrganizer = new QCheckBox(EditAlarmDlg::i18n_g_ShowInKOrganizer(), mPage, "defShowKorg");
+ mCopyToKOrganizer = new TQCheckBox(EditAlarmDlg::i18n_g_ShowInKOrganizer(), mPage, "defShowKorg");
mCopyToKOrganizer->setMinimumSize(mCopyToKOrganizer->sizeHint());
- QWhatsThis::add(mCopyToKOrganizer, defsetting.arg(EditAlarmDlg::i18n_ShowInKOrganizer()));
+ TQWhatsThis::add(mCopyToKOrganizer, defsetting.arg(EditAlarmDlg::i18n_ShowInKOrganizer()));
// Late cancellation
- box = new QHBox(mPage);
+ box = new TQHBox(mPage);
box->setSpacing(KDialog::spacingHint());
- mLateCancel = new QCheckBox(LateCancelSelector::i18n_n_CancelIfLate(), box, "defCancelLate");
+ mLateCancel = new TQCheckBox(LateCancelSelector::i18n_n_CancelIfLate(), box, "defCancelLate");
mLateCancel->setMinimumSize(mLateCancel->sizeHint());
- QWhatsThis::add(mLateCancel, defsetting.arg(LateCancelSelector::i18n_CancelIfLate()));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the control
+ TQWhatsThis::add(mLateCancel, defsetting.arg(LateCancelSelector::i18n_CancelIfLate()));
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the control
// Recurrence
- QHBox* itemBox = new QHBox(box); // this is to control the QWhatsThis text display area
+ TQHBox* itemBox = new TQHBox(box); // this is to control the TQWhatsThis text display area
itemBox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("&Recurrence:"), itemBox);
+ label = new TQLabel(i18n("&Recurrence:"), itemBox);
label->setFixedSize(label->sizeHint());
- mRecurPeriod = new QComboBox(itemBox, "defRecur");
+ mRecurPeriod = new TQComboBox(itemBox, "defRecur");
mRecurPeriod->insertItem(RecurrenceEdit::i18n_NoRecur());
mRecurPeriod->insertItem(RecurrenceEdit::i18n_AtLogin());
mRecurPeriod->insertItem(RecurrenceEdit::i18n_HourlyMinutely());
@@ -1027,36 +1027,36 @@ EditPrefTab::EditPrefTab(QVBox* frame)
mRecurPeriod->insertItem(RecurrenceEdit::i18n_Yearly());
mRecurPeriod->setFixedSize(mRecurPeriod->sizeHint());
label->setBuddy(mRecurPeriod);
- QWhatsThis::add(itemBox,
+ TQWhatsThis::add(itemBox,
i18n("The default setting for the recurrence rule in the alarm edit dialog."));
box->setFixedHeight(itemBox->sizeHint().height());
// How to handle February 29th in yearly recurrences
- QVBox* vbox = new QVBox(mPage); // this is to control the QWhatsThis text display area
+ TQVBox* vbox = new TQVBox(mPage); // this is to control the TQWhatsThis text display area
vbox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("In non-leap years, repeat yearly February 29th alarms on:"), vbox);
+ label = new TQLabel(i18n("In non-leap years, repeat yearly February 29th alarms on:"), vbox);
label->setAlignment(alignment | Qt::WordBreak);
- itemBox = new QHBox(vbox);
+ itemBox = new TQHBox(vbox);
itemBox->setSpacing(2*KDialog::spacingHint());
- mFeb29 = new QButtonGroup(itemBox);
+ mFeb29 = new TQButtonGroup(itemBox);
mFeb29->hide();
- QWidget* widget = new QWidget(itemBox);
+ TQWidget* widget = new TQWidget(itemBox);
widget->setFixedWidth(3*KDialog::spacingHint());
- QRadioButton* radio = new QRadioButton(i18n("February 2&8th"), itemBox);
+ TQRadioButton* radio = new TQRadioButton(i18n("February 2&8th"), itemBox);
radio->setMinimumSize(radio->sizeHint());
mFeb29->insert(radio, KARecurrence::FEB29_FEB28);
- radio = new QRadioButton(i18n("March &1st"), itemBox);
+ radio = new TQRadioButton(i18n("March &1st"), itemBox);
radio->setMinimumSize(radio->sizeHint());
mFeb29->insert(radio, KARecurrence::FEB29_MAR1);
- radio = new QRadioButton(i18n("Do &not repeat"), itemBox);
+ radio = new TQRadioButton(i18n("Do &not repeat"), itemBox);
radio->setMinimumSize(radio->sizeHint());
mFeb29->insert(radio, KARecurrence::FEB29_FEB29);
itemBox->setFixedHeight(itemBox->sizeHint().height());
- QWhatsThis::add(vbox,
+ TQWhatsThis::add(vbox,
i18n("For yearly recurrences, choose what date, if any, alarms due on February 29th should occur in non-leap years.\n"
"Note that the next scheduled occurrence of existing alarms is not re-evaluated when you change this setting."));
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void EditPrefTab::restore()
@@ -1141,8 +1141,8 @@ void EditPrefTab::setDefaults()
void EditPrefTab::slotBrowseSoundFile()
{
- QString defaultDir;
- QString url = SoundPicker::browseFile(defaultDir, mSoundFile->text());
+ TQString defaultDir;
+ TQString url = SoundPicker::browseFile(defaultDir, mSoundFile->text());
if (!url.isEmpty())
mSoundFile->setText(url);
}
@@ -1174,14 +1174,14 @@ int EditPrefTab::recurIndex(RecurrenceEdit::RepeatType type)
}
}
-QString EditPrefTab::validate()
+TQString EditPrefTab::validate()
{
if (mSound->currentItem() == SoundPicker::PLAY_FILE && mSoundFile->text().isEmpty())
{
mSoundFile->setFocus();
return i18n("You must enter a sound file when %1 is selected as the default sound type").arg(SoundPicker::i18n_File());;
}
- return QString::null;
+ return TQString::null;
}
@@ -1189,85 +1189,85 @@ QString EditPrefTab::validate()
= Class ViewPrefTab
=============================================================================*/
-ViewPrefTab::ViewPrefTab(QVBox* frame)
+ViewPrefTab::ViewPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- QGroupBox* group = new QGroupBox(i18n("System Tray Tooltip"), mPage);
- QGridLayout* grid = new QGridLayout(group, 5, 3, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("System Tray Tooltip"), mPage);
+ TQGridLayout* grid = new TQGridLayout(group, 5, 3, KDialog::marginHint(), KDialog::spacingHint());
grid->setColStretch(2, 1);
grid->addColSpacing(0, indentWidth());
grid->addColSpacing(1, indentWidth());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- mTooltipShowAlarms = new QCheckBox(i18n("Show next &24 hours' alarms"), group, "tooltipShow");
+ mTooltipShowAlarms = new TQCheckBox(i18n("Show next &24 hours' alarms"), group, "tooltipShow");
mTooltipShowAlarms->setMinimumSize(mTooltipShowAlarms->sizeHint());
- connect(mTooltipShowAlarms, SIGNAL(toggled(bool)), SLOT(slotTooltipAlarmsToggled(bool)));
- QWhatsThis::add(mTooltipShowAlarms,
+ connect(mTooltipShowAlarms, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipAlarmsToggled(bool)));
+ TQWhatsThis::add(mTooltipShowAlarms,
i18n("Specify whether to include in the system tray tooltip, a summary of alarms due in the next 24 hours"));
grid->addMultiCellWidget(mTooltipShowAlarms, 1, 1, 0, 2, Qt::AlignAuto);
- QHBox* box = new QHBox(group);
+ TQHBox* box = new TQHBox(group);
box->setSpacing(KDialog::spacingHint());
- mTooltipMaxAlarms = new QCheckBox(i18n("Ma&ximum number of alarms to show:"), box, "tooltipMax");
+ mTooltipMaxAlarms = new TQCheckBox(i18n("Ma&ximum number of alarms to show:"), box, "tooltipMax");
mTooltipMaxAlarms->setMinimumSize(mTooltipMaxAlarms->sizeHint());
- connect(mTooltipMaxAlarms, SIGNAL(toggled(bool)), SLOT(slotTooltipMaxToggled(bool)));
+ connect(mTooltipMaxAlarms, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipMaxToggled(bool)));
mTooltipMaxAlarmCount = new SpinBox(1, 99, 1, box);
mTooltipMaxAlarmCount->setLineShiftStep(5);
mTooltipMaxAlarmCount->setMinimumSize(mTooltipMaxAlarmCount->sizeHint());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Uncheck to display all of the next 24 hours' alarms in the system tray tooltip. "
"Check to enter an upper limit on the number to be displayed."));
grid->addMultiCellWidget(box, 2, 2, 1, 2, Qt::AlignAuto);
- mTooltipShowTime = new QCheckBox(MainWindow::i18n_m_ShowAlarmTime(), group, "tooltipTime");
+ mTooltipShowTime = new TQCheckBox(MainWindow::i18n_m_ShowAlarmTime(), group, "tooltipTime");
mTooltipShowTime->setMinimumSize(mTooltipShowTime->sizeHint());
- connect(mTooltipShowTime, SIGNAL(toggled(bool)), SLOT(slotTooltipTimeToggled(bool)));
- QWhatsThis::add(mTooltipShowTime,
+ connect(mTooltipShowTime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipTimeToggled(bool)));
+ TQWhatsThis::add(mTooltipShowTime,
i18n("Specify whether to show in the system tray tooltip, the time at which each alarm is due"));
grid->addMultiCellWidget(mTooltipShowTime, 3, 3, 1, 2, Qt::AlignAuto);
- mTooltipShowTimeTo = new QCheckBox(MainWindow::i18n_l_ShowTimeToAlarm(), group, "tooltipTimeTo");
+ mTooltipShowTimeTo = new TQCheckBox(MainWindow::i18n_l_ShowTimeToAlarm(), group, "tooltipTimeTo");
mTooltipShowTimeTo->setMinimumSize(mTooltipShowTimeTo->sizeHint());
- connect(mTooltipShowTimeTo, SIGNAL(toggled(bool)), SLOT(slotTooltipTimeToToggled(bool)));
- QWhatsThis::add(mTooltipShowTimeTo,
+ connect(mTooltipShowTimeTo, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipTimeToToggled(bool)));
+ TQWhatsThis::add(mTooltipShowTimeTo,
i18n("Specify whether to show in the system tray tooltip, how long until each alarm is due"));
grid->addMultiCellWidget(mTooltipShowTimeTo, 4, 4, 1, 2, Qt::AlignAuto);
- box = new QHBox(group); // this is to control the QWhatsThis text display area
+ box = new TQHBox(group); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mTooltipTimeToPrefixLabel = new QLabel(i18n("&Prefix:"), box);
+ mTooltipTimeToPrefixLabel = new TQLabel(i18n("&Prefix:"), box);
mTooltipTimeToPrefixLabel->setFixedSize(mTooltipTimeToPrefixLabel->sizeHint());
- mTooltipTimeToPrefix = new QLineEdit(box);
+ mTooltipTimeToPrefix = new TQLineEdit(box);
mTooltipTimeToPrefixLabel->setBuddy(mTooltipTimeToPrefix);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Enter the text to be displayed in front of the time until the alarm, in the system tray tooltip"));
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 5, 2, Qt::AlignAuto);
group->setMaximumHeight(group->sizeHint().height());
- mModalMessages = new QCheckBox(i18n("Message &windows have a title bar and take keyboard focus"), mPage, "modalMsg");
+ mModalMessages = new TQCheckBox(i18n("Message &windows have a title bar and take keyboard focus"), mPage, "modalMsg");
mModalMessages->setMinimumSize(mModalMessages->sizeHint());
- QWhatsThis::add(mModalMessages,
+ TQWhatsThis::add(mModalMessages,
i18n("Specify the characteristics of alarm message windows:\n"
"- If checked, the window is a normal window with a title bar, which grabs keyboard input when it is displayed.\n"
"- If unchecked, the window does not interfere with your typing when "
"it is displayed, but it has no title bar and cannot be moved or resized."));
- QHBox* itemBox = new QHBox(mPage); // this is to control the QWhatsThis text display area
- box = new QHBox(itemBox);
+ TQHBox* itemBox = new TQHBox(mPage); // this is to control the TQWhatsThis text display area
+ box = new TQHBox(itemBox);
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("System tray icon &update interval:"), box);
+ TQLabel* label = new TQLabel(i18n("System tray icon &update interval:"), box);
mDaemonTrayCheckInterval = new SpinBox(1, 9999, 1, box, "daemonCheck");
mDaemonTrayCheckInterval->setLineShiftStep(10);
mDaemonTrayCheckInterval->setMinimumSize(mDaemonTrayCheckInterval->sizeHint());
label->setBuddy(mDaemonTrayCheckInterval);
- label = new QLabel(i18n("seconds"), box);
- QWhatsThis::add(box,
+ label = new TQLabel(i18n("seconds"), box);
+ TQWhatsThis::add(box,
i18n("How often to update the system tray icon to indicate whether or not the Alarm Daemon is monitoring alarms."));
- itemBox->setStretchFactor(new QWidget(itemBox), 1); // left adjust the controls
+ itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls
itemBox->setFixedHeight(box->sizeHint().height());
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void ViewPrefTab::restore()
@@ -1304,7 +1304,7 @@ void ViewPrefTab::setDefaults()
mDaemonTrayCheckInterval->setValue(Preferences::default_daemonTrayCheckInterval);
}
-void ViewPrefTab::setTooltip(int maxAlarms, bool time, bool timeTo, const QString& prefix)
+void ViewPrefTab::setTooltip(int maxAlarms, bool time, bool timeTo, const TQString& prefix)
{
if (!timeTo)
time = true; // ensure that at least one time option is ticked
diff --git a/kalarm/prefdlg.h b/kalarm/prefdlg.h
index a5f1ee9a1..5eec5f224 100644
--- a/kalarm/prefdlg.h
+++ b/kalarm/prefdlg.h
@@ -21,8 +21,8 @@
#ifndef PREFDLG_H
#define PREFDLG_H
-#include <qsize.h>
-#include <qdatetime.h>
+#include <tqsize.h>
+#include <tqdatetime.h>
#include <ktabctl.h>
#include <kdialogbase.h>
@@ -84,7 +84,7 @@ class PrefsTabBase : public QWidget
{
Q_OBJECT
public:
- PrefsTabBase(QVBox*);
+ PrefsTabBase(TQVBox*);
void setPreferences();
virtual void restore() = 0;
@@ -93,7 +93,7 @@ class PrefsTabBase : public QWidget
static int indentWidth() { return mIndentWidth; }
protected:
- QVBox* mPage;
+ TQVBox* mPage;
private:
static int mIndentWidth; // indent width for checkboxes etc.
@@ -105,7 +105,7 @@ class MiscPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- MiscPrefTab(QVBox*);
+ MiscPrefTab(TQVBox*);
virtual void restore();
virtual void apply(bool syncToDisc);
@@ -125,21 +125,21 @@ class MiscPrefTab : public PrefsTabBase
private:
void setExpiredControls(int purgeDays);
- QCheckBox* mAutostartDaemon;
- QRadioButton* mRunInSystemTray;
- QRadioButton* mRunOnDemand;
- QCheckBox* mDisableAlarmsIfStopped;
- QCheckBox* mQuitWarn;
- QCheckBox* mAutostartTrayIcon;
- QCheckBox* mConfirmAlarmDeletion;
- QCheckBox* mKeepExpired;
- QCheckBox* mPurgeExpired;
+ TQCheckBox* mAutostartDaemon;
+ TQRadioButton* mRunInSystemTray;
+ TQRadioButton* mRunOnDemand;
+ TQCheckBox* mDisableAlarmsIfStopped;
+ TQCheckBox* mQuitWarn;
+ TQCheckBox* mAutostartTrayIcon;
+ TQCheckBox* mConfirmAlarmDeletion;
+ TQCheckBox* mKeepExpired;
+ TQCheckBox* mPurgeExpired;
SpinBox* mPurgeAfter;
- QLabel* mPurgeAfterLabel;
- QPushButton* mClearExpired;
+ TQLabel* mPurgeAfterLabel;
+ TQPushButton* mClearExpired;
TimeEdit* mStartOfDay;
- QButtonGroup* mXtermType;
- QLineEdit* mXtermCommand;
+ TQButtonGroup* mXtermType;
+ TQLineEdit* mXtermCommand;
int mXtermFirst; // id of first terminal window radio button
int mXtermCount; // number of terminal window types
};
@@ -150,9 +150,9 @@ class EmailPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- EmailPrefTab(QVBox*);
+ EmailPrefTab(TQVBox*);
- QString validate();
+ TQString validate();
virtual void restore();
virtual void apply(bool syncToDisc);
virtual void setDefaults();
@@ -164,17 +164,17 @@ class EmailPrefTab : public PrefsTabBase
void slotAddressChanged() { mAddressChanged = true; }
private:
- void setEmailAddress(Preferences::MailFrom, const QString& address);
- void setEmailBccAddress(bool useControlCentre, const QString& address);
- QString validateAddr(ButtonGroup*, QLineEdit* addr, const QString& msg);
+ void setEmailAddress(Preferences::MailFrom, const TQString& address);
+ void setEmailBccAddress(bool useControlCentre, const TQString& address);
+ TQString validateAddr(ButtonGroup*, TQLineEdit* addr, const TQString& msg);
ButtonGroup* mEmailClient;
ButtonGroup* mFromAddressGroup;
- QLineEdit* mEmailAddress;
+ TQLineEdit* mEmailAddress;
ButtonGroup* mBccAddressGroup;
- QLineEdit* mEmailBccAddress;
- QCheckBox* mEmailQueuedNotify;
- QCheckBox* mEmailCopyToKMail;
+ TQLineEdit* mEmailBccAddress;
+ TQCheckBox* mEmailQueuedNotify;
+ TQCheckBox* mEmailCopyToKMail;
bool mAddressChanged;
bool mBccAddressChanged;
};
@@ -185,9 +185,9 @@ class EditPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- EditPrefTab(QVBox*);
+ EditPrefTab(TQVBox*);
- QString validate();
+ TQString validate();
virtual void restore();
virtual void apply(bool syncToDisc);
virtual void setDefaults();
@@ -196,22 +196,22 @@ class EditPrefTab : public PrefsTabBase
void slotBrowseSoundFile();
private:
- QCheckBox* mAutoClose;
- QCheckBox* mConfirmAck;
- QComboBox* mReminderUnits;
+ TQCheckBox* mAutoClose;
+ TQCheckBox* mConfirmAck;
+ TQComboBox* mReminderUnits;
SpecialActionsButton* mSpecialActionsButton;
- QCheckBox* mCmdScript;
- QCheckBox* mCmdXterm;
- QCheckBox* mEmailBcc;
- QComboBox* mSound;
- QLabel* mSoundFileLabel;
- QLineEdit* mSoundFile;
- QPushButton* mSoundFileBrowse;
- QCheckBox* mSoundRepeat;
- QCheckBox* mCopyToKOrganizer;
- QCheckBox* mLateCancel;
- QComboBox* mRecurPeriod;
- QButtonGroup* mFeb29;
+ TQCheckBox* mCmdScript;
+ TQCheckBox* mCmdXterm;
+ TQCheckBox* mEmailBcc;
+ TQComboBox* mSound;
+ TQLabel* mSoundFileLabel;
+ TQLineEdit* mSoundFile;
+ TQPushButton* mSoundFileBrowse;
+ TQCheckBox* mSoundRepeat;
+ TQCheckBox* mCopyToKOrganizer;
+ TQCheckBox* mLateCancel;
+ TQComboBox* mRecurPeriod;
+ TQButtonGroup* mFeb29;
static int soundIndex(SoundPicker::Type);
static int recurIndex(RecurrenceEdit::RepeatType);
@@ -223,7 +223,7 @@ class ViewPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- ViewPrefTab(QVBox*);
+ ViewPrefTab(TQVBox*);
virtual void restore();
virtual void apply(bool syncToDisc);
@@ -236,16 +236,16 @@ class ViewPrefTab : public PrefsTabBase
void slotTooltipTimeToToggled(bool);
private:
- void setTooltip(int maxAlarms, bool time, bool timeTo, const QString& prefix);
+ void setTooltip(int maxAlarms, bool time, bool timeTo, const TQString& prefix);
- QCheckBox* mTooltipShowAlarms;
- QCheckBox* mTooltipMaxAlarms;
+ TQCheckBox* mTooltipShowAlarms;
+ TQCheckBox* mTooltipMaxAlarms;
SpinBox* mTooltipMaxAlarmCount;
- QCheckBox* mTooltipShowTime;
- QCheckBox* mTooltipShowTimeTo;
- QLineEdit* mTooltipTimeToPrefix;
- QLabel* mTooltipTimeToPrefixLabel;
- QCheckBox* mModalMessages;
+ TQCheckBox* mTooltipShowTime;
+ TQCheckBox* mTooltipShowTimeTo;
+ TQLineEdit* mTooltipTimeToPrefix;
+ TQLabel* mTooltipTimeToPrefixLabel;
+ TQCheckBox* mModalMessages;
SpinBox* mDaemonTrayCheckInterval;
};
@@ -255,7 +255,7 @@ class FontColourPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- FontColourPrefTab(QVBox*);
+ FontColourPrefTab(TQVBox*);
virtual void restore();
virtual void apply(bool syncToDisc);
diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp
index ad96098e0..3c2b5f185 100644
--- a/kalarm/preferences.cpp
+++ b/kalarm/preferences.cpp
@@ -37,17 +37,17 @@
#include "preferences.moc"
-static QString translateXTermPath(KConfig*, const QString& cmdline, bool write);
+static TQString translateXTermPath(KConfig*, const TQString& cmdline, bool write);
Preferences* Preferences::mInstance = 0;
// Default config file settings
-QColor defaultMessageColours[] = { Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::white, Qt::lightGray, Qt::black, QColor() };
+TQColor defaultMessageColours[] = { Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::white, Qt::lightGray, Qt::black, TQColor() };
const ColourList Preferences::default_messageColours(defaultMessageColours);
-const QColor Preferences::default_defaultBgColour(Qt::red);
-const QColor Preferences::default_defaultFgColour(Qt::black);
-QFont Preferences::mDefault_messageFont; // initialised in constructor
-const QTime Preferences::default_startOfDay(0, 0);
+const TQColor Preferences::default_defaultBgColour(Qt::red);
+const TQColor Preferences::default_defaultFgColour(Qt::black);
+TQFont Preferences::mDefault_messageFont; // initialised in constructor
+const TQTime Preferences::default_startOfDay(0, 0);
const bool Preferences::default_runInSystemTray = true;
const bool Preferences::default_disableAlarmsIfStopped = true;
const bool Preferences::default_quitWarn = true;
@@ -58,14 +58,14 @@ const int Preferences::default_messageButtonDelay =
const int Preferences::default_tooltipAlarmCount = 5;
const bool Preferences::default_showTooltipAlarmTime = true;
const bool Preferences::default_showTooltipTimeToAlarm = true;
-const QString Preferences::default_tooltipTimeToPrefix = QString::fromLatin1("+");
+const TQString Preferences::default_tooltipTimeToPrefix = TQString::fromLatin1("+");
const int Preferences::default_daemonTrayCheckInterval = 10; // (seconds)
const bool Preferences::default_emailCopyToKMail = false;
const bool Preferences::default_emailQueuedNotify = false;
-const QColor Preferences::default_disabledColour(Qt::lightGray);
-const QColor Preferences::default_expiredColour(Qt::darkRed);
+const TQColor Preferences::default_disabledColour(Qt::lightGray);
+const TQColor Preferences::default_expiredColour(Qt::darkRed);
const int Preferences::default_expiredKeepDays = 7;
-const QString Preferences::default_defaultSoundFile = QString::null;
+const TQString Preferences::default_defaultSoundFile = TQString::null;
const float Preferences::default_defaultSoundVolume = -1;
const int Preferences::default_defaultLateCancel = 0;
const bool Preferences::default_defaultAutoClose = false;
@@ -76,15 +76,15 @@ const bool Preferences::default_defaultConfirmAck =
const bool Preferences::default_defaultCmdScript = false;
const EditAlarmDlg::CmdLogType Preferences::default_defaultCmdLogType = EditAlarmDlg::DISCARD_OUTPUT;
const bool Preferences::default_defaultEmailBcc = false;
-const QString Preferences::default_emailAddress = QString::null;
-const QString Preferences::default_emailBccAddress = QString::null;
+const TQString Preferences::default_emailAddress = TQString::null;
+const TQString Preferences::default_emailBccAddress = TQString::null;
const Preferences::MailClient Preferences::default_emailClient = KMAIL;
const Preferences::MailFrom Preferences::default_emailBccFrom = MAIL_FROM_CONTROL_CENTRE;
const RecurrenceEdit::RepeatType Preferences::default_defaultRecurPeriod = RecurrenceEdit::NO_RECUR;
const KARecurrence::Feb29Type Preferences::default_defaultFeb29Type = KARecurrence::FEB29_MAR1;
const TimePeriod::Units Preferences::default_defaultReminderUnits = TimePeriod::HOURS_MINUTES;
-const QString Preferences::default_defaultPreAction;
-const QString Preferences::default_defaultPostAction;
+const TQString Preferences::default_defaultPreAction;
+const TQString Preferences::default_defaultPostAction;
Preferences::MailFrom Preferences::default_emailFrom()
{
@@ -93,9 +93,9 @@ Preferences::MailFrom Preferences::default_emailFrom()
// Active config file settings
ColourList Preferences::mMessageColours;
-QColor Preferences::mDefaultBgColour;
-QFont Preferences::mMessageFont;
-QTime Preferences::mStartOfDay;
+TQColor Preferences::mDefaultBgColour;
+TQFont Preferences::mMessageFont;
+TQTime Preferences::mStartOfDay;
bool Preferences::mRunInSystemTray;
bool Preferences::mDisableAlarmsIfStopped;
bool Preferences::mAutostartTrayIcon;
@@ -105,20 +105,20 @@ int Preferences::mMessageButtonDelay;
int Preferences::mTooltipAlarmCount;
bool Preferences::mShowTooltipAlarmTime;
bool Preferences::mShowTooltipTimeToAlarm;
-QString Preferences::mTooltipTimeToPrefix;
+TQString Preferences::mTooltipTimeToPrefix;
int Preferences::mDaemonTrayCheckInterval;
-QString Preferences::mEmailAddress;
-QString Preferences::mEmailBccAddress;
+TQString Preferences::mEmailAddress;
+TQString Preferences::mEmailBccAddress;
Preferences::MailClient Preferences::mEmailClient;
Preferences::MailFrom Preferences::mEmailFrom;
Preferences::MailFrom Preferences::mEmailBccFrom;
bool Preferences::mEmailCopyToKMail;
-QString Preferences::mCmdXTermCommand;
-QColor Preferences::mDisabledColour;
-QColor Preferences::mExpiredColour;
+TQString Preferences::mCmdXTermCommand;
+TQColor Preferences::mDisabledColour;
+TQColor Preferences::mExpiredColour;
int Preferences::mExpiredKeepDays;
// Default settings for Edit Alarm dialog
-QString Preferences::mDefaultSoundFile;
+TQString Preferences::mDefaultSoundFile;
float Preferences::mDefaultSoundVolume;
int Preferences::mDefaultLateCancel;
bool Preferences::mDefaultAutoClose;
@@ -129,82 +129,82 @@ bool Preferences::mDefaultConfirmAck;
bool Preferences::mDefaultEmailBcc;
bool Preferences::mDefaultCmdScript;
EditAlarmDlg::CmdLogType Preferences::mDefaultCmdLogType;
-QString Preferences::mDefaultCmdLogFile;
+TQString Preferences::mDefaultCmdLogFile;
RecurrenceEdit::RepeatType Preferences::mDefaultRecurPeriod;
TimePeriod::Units Preferences::mDefaultReminderUnits;
-QString Preferences::mDefaultPreAction;
-QString Preferences::mDefaultPostAction;
+TQString Preferences::mDefaultPreAction;
+TQString Preferences::mDefaultPostAction;
// Change tracking
-QTime Preferences::mOldStartOfDay;
+TQTime Preferences::mOldStartOfDay;
bool Preferences::mStartOfDayChanged;
-static const QString defaultFeb29RecurType = QString::fromLatin1("Mar1");
-static const QString defaultEmailClient = QString::fromLatin1("kmail");
+static const TQString defaultFeb29RecurType = TQString::fromLatin1("Mar1");
+static const TQString defaultEmailClient = TQString::fromLatin1("kmail");
// Config file entry names
-static const QString GENERAL_SECTION = QString::fromLatin1("General");
-static const QString VERSION_NUM = QString::fromLatin1("Version");
-static const QString MESSAGE_COLOURS = QString::fromLatin1("MessageColours");
-static const QString MESSAGE_BG_COLOUR = QString::fromLatin1("MessageBackgroundColour");
-static const QString MESSAGE_FONT = QString::fromLatin1("MessageFont");
-static const QString RUN_IN_SYSTEM_TRAY = QString::fromLatin1("RunInSystemTray");
-static const QString DISABLE_IF_STOPPED = QString::fromLatin1("DisableAlarmsIfStopped");
-static const QString AUTOSTART_TRAY = QString::fromLatin1("AutostartTray");
-static const QString FEB29_RECUR_TYPE = QString::fromLatin1("Feb29Recur");
-static const QString MODAL_MESSAGES = QString::fromLatin1("ModalMessages");
-static const QString MESSAGE_BUTTON_DELAY = QString::fromLatin1("MessageButtonDelay");
-static const QString TOOLTIP_ALARM_COUNT = QString::fromLatin1("TooltipAlarmCount");
-static const QString TOOLTIP_ALARM_TIME = QString::fromLatin1("ShowTooltipAlarmTime");
-static const QString TOOLTIP_TIME_TO_ALARM = QString::fromLatin1("ShowTooltipTimeToAlarm");
-static const QString TOOLTIP_TIME_TO_PREFIX = QString::fromLatin1("TooltipTimeToPrefix");
-static const QString DAEMON_TRAY_INTERVAL = QString::fromLatin1("DaemonTrayCheckInterval");
-static const QString EMAIL_CLIENT = QString::fromLatin1("EmailClient");
-static const QString EMAIL_COPY_TO_KMAIL = QString::fromLatin1("EmailCopyToKMail");
-static const QString EMAIL_FROM = QString::fromLatin1("EmailFrom");
-static const QString EMAIL_BCC_ADDRESS = QString::fromLatin1("EmailBccAddress");
-static const QString CMD_XTERM_COMMAND = QString::fromLatin1("CmdXTerm");
-static const QString START_OF_DAY = QString::fromLatin1("StartOfDay");
-static const QString START_OF_DAY_CHECK = QString::fromLatin1("Sod");
-static const QString DISABLED_COLOUR = QString::fromLatin1("DisabledColour");
-static const QString EXPIRED_COLOUR = QString::fromLatin1("ExpiredColour");
-static const QString EXPIRED_KEEP_DAYS = QString::fromLatin1("ExpiredKeepDays");
-static const QString DEFAULTS_SECTION = QString::fromLatin1("Defaults");
-static const QString DEF_LATE_CANCEL = QString::fromLatin1("DefLateCancel");
-static const QString DEF_AUTO_CLOSE = QString::fromLatin1("DefAutoClose");
-static const QString DEF_CONFIRM_ACK = QString::fromLatin1("DefConfirmAck");
-static const QString DEF_COPY_TO_KORG = QString::fromLatin1("DefCopyKOrg");
-static const QString DEF_SOUND_TYPE = QString::fromLatin1("DefSoundType");
-static const QString DEF_SOUND_FILE = QString::fromLatin1("DefSoundFile");
-static const QString DEF_SOUND_VOLUME = QString::fromLatin1("DefSoundVolume");
-static const QString DEF_SOUND_REPEAT = QString::fromLatin1("DefSoundRepeat");
-static const QString DEF_CMD_SCRIPT = QString::fromLatin1("DefCmdScript");
-static const QString DEF_CMD_LOG_TYPE = QString::fromLatin1("DefCmdLogType");
-static const QString DEF_LOG_FILE = QString::fromLatin1("DefLogFile");
-static const QString DEF_EMAIL_BCC = QString::fromLatin1("DefEmailBcc");
-static const QString DEF_RECUR_PERIOD = QString::fromLatin1("DefRecurPeriod");
-static const QString DEF_REMIND_UNITS = QString::fromLatin1("RemindUnits");
-static const QString DEF_PRE_ACTION = QString::fromLatin1("DefPreAction");
-static const QString DEF_POST_ACTION = QString::fromLatin1("DefPostAction");
+static const TQString GENERAL_SECTION = TQString::fromLatin1("General");
+static const TQString VERSION_NUM = TQString::fromLatin1("Version");
+static const TQString MESSAGE_COLOURS = TQString::fromLatin1("MessageColours");
+static const TQString MESSAGE_BG_COLOUR = TQString::fromLatin1("MessageBackgroundColour");
+static const TQString MESSAGE_FONT = TQString::fromLatin1("MessageFont");
+static const TQString RUN_IN_SYSTEM_TRAY = TQString::fromLatin1("RunInSystemTray");
+static const TQString DISABLE_IF_STOPPED = TQString::fromLatin1("DisableAlarmsIfStopped");
+static const TQString AUTOSTART_TRAY = TQString::fromLatin1("AutostartTray");
+static const TQString FEB29_RECUR_TYPE = TQString::fromLatin1("Feb29Recur");
+static const TQString MODAL_MESSAGES = TQString::fromLatin1("ModalMessages");
+static const TQString MESSAGE_BUTTON_DELAY = TQString::fromLatin1("MessageButtonDelay");
+static const TQString TOOLTIP_ALARM_COUNT = TQString::fromLatin1("TooltipAlarmCount");
+static const TQString TOOLTIP_ALARM_TIME = TQString::fromLatin1("ShowTooltipAlarmTime");
+static const TQString TOOLTIP_TIME_TO_ALARM = TQString::fromLatin1("ShowTooltipTimeToAlarm");
+static const TQString TOOLTIP_TIME_TO_PREFIX = TQString::fromLatin1("TooltipTimeToPrefix");
+static const TQString DAEMON_TRAY_INTERVAL = TQString::fromLatin1("DaemonTrayCheckInterval");
+static const TQString EMAIL_CLIENT = TQString::fromLatin1("EmailClient");
+static const TQString EMAIL_COPY_TO_KMAIL = TQString::fromLatin1("EmailCopyToKMail");
+static const TQString EMAIL_FROM = TQString::fromLatin1("EmailFrom");
+static const TQString EMAIL_BCC_ADDRESS = TQString::fromLatin1("EmailBccAddress");
+static const TQString CMD_XTERM_COMMAND = TQString::fromLatin1("CmdXTerm");
+static const TQString START_OF_DAY = TQString::fromLatin1("StartOfDay");
+static const TQString START_OF_DAY_CHECK = TQString::fromLatin1("Sod");
+static const TQString DISABLED_COLOUR = TQString::fromLatin1("DisabledColour");
+static const TQString EXPIRED_COLOUR = TQString::fromLatin1("ExpiredColour");
+static const TQString EXPIRED_KEEP_DAYS = TQString::fromLatin1("ExpiredKeepDays");
+static const TQString DEFAULTS_SECTION = TQString::fromLatin1("Defaults");
+static const TQString DEF_LATE_CANCEL = TQString::fromLatin1("DefLateCancel");
+static const TQString DEF_AUTO_CLOSE = TQString::fromLatin1("DefAutoClose");
+static const TQString DEF_CONFIRM_ACK = TQString::fromLatin1("DefConfirmAck");
+static const TQString DEF_COPY_TO_KORG = TQString::fromLatin1("DefCopyKOrg");
+static const TQString DEF_SOUND_TYPE = TQString::fromLatin1("DefSoundType");
+static const TQString DEF_SOUND_FILE = TQString::fromLatin1("DefSoundFile");
+static const TQString DEF_SOUND_VOLUME = TQString::fromLatin1("DefSoundVolume");
+static const TQString DEF_SOUND_REPEAT = TQString::fromLatin1("DefSoundRepeat");
+static const TQString DEF_CMD_SCRIPT = TQString::fromLatin1("DefCmdScript");
+static const TQString DEF_CMD_LOG_TYPE = TQString::fromLatin1("DefCmdLogType");
+static const TQString DEF_LOG_FILE = TQString::fromLatin1("DefLogFile");
+static const TQString DEF_EMAIL_BCC = TQString::fromLatin1("DefEmailBcc");
+static const TQString DEF_RECUR_PERIOD = TQString::fromLatin1("DefRecurPeriod");
+static const TQString DEF_REMIND_UNITS = TQString::fromLatin1("RemindUnits");
+static const TQString DEF_PRE_ACTION = TQString::fromLatin1("DefPreAction");
+static const TQString DEF_POST_ACTION = TQString::fromLatin1("DefPostAction");
// Config file entry name for temporary use
-static const QString TEMP = QString::fromLatin1("Temp");
+static const TQString TEMP = TQString::fromLatin1("Temp");
// Values for EmailFrom entry
-static const QString FROM_CONTROL_CENTRE = QString::fromLatin1("@ControlCenter");
-static const QString FROM_KMAIL = QString::fromLatin1("@KMail");
+static const TQString FROM_CONTROL_CENTRE = TQString::fromLatin1("@ControlCenter");
+static const TQString FROM_KMAIL = TQString::fromLatin1("@KMail");
// Config file entry names for notification messages
-const QString Preferences::QUIT_WARN = QString::fromLatin1("QuitWarn");
-const QString Preferences::CONFIRM_ALARM_DELETION = QString::fromLatin1("ConfirmAlarmDeletion");
-const QString Preferences::EMAIL_QUEUED_NOTIFY = QString::fromLatin1("EmailQueuedNotify");
+const TQString Preferences::QUIT_WARN = TQString::fromLatin1("QuitWarn");
+const TQString Preferences::CONFIRM_ALARM_DELETION = TQString::fromLatin1("ConfirmAlarmDeletion");
+const TQString Preferences::EMAIL_QUEUED_NOTIFY = TQString::fromLatin1("EmailQueuedNotify");
static const int SODxor = 0x82451630;
inline int Preferences::startOfDayCheck()
{
// Combine with a 'random' constant to prevent 'clever' people fiddling the
// value, and thereby screwing things up.
- return QTime().msecsTo(mStartOfDay) ^ SODxor;
+ return TQTime().msecsTo(mStartOfDay) ^ SODxor;
}
@@ -214,7 +214,7 @@ void Preferences::initialise()
{
// Initialise static variables here to avoid static initialisation
// sequencing errors.
- mDefault_messageFont = QFont(KGlobalSettings::generalFont().family(), 16, QFont::Bold);
+ mDefault_messageFont = TQFont(KGlobalSettings::generalFont().family(), 16, TQFont::Bold);
mInstance = new Preferences;
@@ -229,10 +229,10 @@ void Preferences::initialise()
}
}
-void Preferences::connect(const char* signal, const QObject* receiver, const char* member)
+void Preferences::connect(const char* signal, const TQObject* receiver, const char* member)
{
initialise();
- QObject::connect(mInstance, signal, receiver, member);
+ TQObject::connect(mInstance, signal, receiver, member);
}
void Preferences::emitStartOfDayChanged()
@@ -254,15 +254,15 @@ void Preferences::read()
KConfig* config = KGlobal::config();
config->setGroup(GENERAL_SECTION);
- QStringList cols = config->readListEntry(MESSAGE_COLOURS);
+ TQStringList cols = config->readListEntry(MESSAGE_COLOURS);
if (!cols.count())
mMessageColours = default_messageColours;
else
{
mMessageColours.clear();
- for (QStringList::Iterator it = cols.begin(); it != cols.end(); ++it)
+ for (TQStringList::Iterator it = cols.begin(); it != cols.end(); ++it)
{
- QColor c((*it));
+ TQColor c((*it));
if (c.isValid())
mMessageColours.insert(c);
}
@@ -287,12 +287,12 @@ void Preferences::read()
mDaemonTrayCheckInterval = static_cast<int>(config->readUnsignedNumEntry(DAEMON_TRAY_INTERVAL, default_daemonTrayCheckInterval));
if (mDaemonTrayCheckInterval < 1)
mDaemonTrayCheckInterval = 1;
- QCString client = config->readEntry(EMAIL_CLIENT, defaultEmailClient).local8Bit(); // don't use readPathEntry() here (values are hard-coded)
+ TQCString client = config->readEntry(EMAIL_CLIENT, defaultEmailClient).local8Bit(); // don't use readPathEntry() here (values are hard-coded)
mEmailClient = (client == "sendmail" ? SENDMAIL : KMAIL);
mEmailCopyToKMail = config->readBoolEntry(EMAIL_COPY_TO_KMAIL, default_emailCopyToKMail);
- QString from = config->readEntry(EMAIL_FROM, emailFrom(default_emailFrom(), false, false));
+ TQString from = config->readEntry(EMAIL_FROM, emailFrom(default_emailFrom(), false, false));
mEmailFrom = emailFrom(from);
- QString bccFrom = config->readEntry(EMAIL_BCC_ADDRESS, emailFrom(default_emailBccFrom, false, true));
+ TQString bccFrom = config->readEntry(EMAIL_BCC_ADDRESS, emailFrom(default_emailBccFrom, false, true));
mEmailBccFrom = emailFrom(bccFrom);
if (mEmailFrom == MAIL_FROM_CONTROL_CENTRE || mEmailBccFrom == MAIL_FROM_CONTROL_CENTRE)
mEmailAddress = mEmailBccAddress = KAMail::controlCentreAddress();
@@ -301,7 +301,7 @@ void Preferences::read()
if (mEmailBccFrom == MAIL_FROM_ADDR)
mEmailBccAddress = bccFrom;
mCmdXTermCommand = translateXTermPath(config, config->readEntry(CMD_XTERM_COMMAND), false);
- QDateTime defStartOfDay(QDate(1900,1,1), default_startOfDay);
+ TQDateTime defStartOfDay(TQDate(1900,1,1), default_startOfDay);
mStartOfDay = config->readDateTimeEntry(START_OF_DAY, &defStartOfDay).time();
mOldStartOfDay.setHMS(0,0,0);
int sod = config->readNumEntry(START_OF_DAY_CHECK, 0);
@@ -335,13 +335,13 @@ void Preferences::read()
int recurPeriod = config->readNumEntry(DEF_RECUR_PERIOD, default_defaultRecurPeriod);
mDefaultRecurPeriod = (recurPeriod < RecurrenceEdit::SUBDAILY || recurPeriod > RecurrenceEdit::ANNUAL)
? default_defaultRecurPeriod : (RecurrenceEdit::RepeatType)recurPeriod;
- QCString feb29 = config->readEntry(FEB29_RECUR_TYPE, defaultFeb29RecurType).local8Bit();
+ TQCString feb29 = config->readEntry(FEB29_RECUR_TYPE, defaultFeb29RecurType).local8Bit();
mDefaultFeb29Type = (feb29 == "Mar1") ? KARecurrence::FEB29_MAR1 : (feb29 == "Feb28") ? KARecurrence::FEB29_FEB28 : KARecurrence::FEB29_FEB29;
- QString remindUnits = config->readEntry(DEF_REMIND_UNITS);
- mDefaultReminderUnits = (remindUnits == QString::fromLatin1("Minutes")) ? TimePeriod::MINUTES
- : (remindUnits == QString::fromLatin1("HoursMinutes")) ? TimePeriod::HOURS_MINUTES
- : (remindUnits == QString::fromLatin1("Days")) ? TimePeriod::DAYS
- : (remindUnits == QString::fromLatin1("Weeks")) ? TimePeriod::WEEKS : default_defaultReminderUnits;
+ TQString remindUnits = config->readEntry(DEF_REMIND_UNITS);
+ mDefaultReminderUnits = (remindUnits == TQString::fromLatin1("Minutes")) ? TimePeriod::MINUTES
+ : (remindUnits == TQString::fromLatin1("HoursMinutes")) ? TimePeriod::HOURS_MINUTES
+ : (remindUnits == TQString::fromLatin1("Days")) ? TimePeriod::DAYS
+ : (remindUnits == TQString::fromLatin1("Weeks")) ? TimePeriod::WEEKS : default_defaultReminderUnits;
mDefaultPreAction = config->readEntry(DEF_PRE_ACTION, default_defaultPreAction);
mDefaultPostAction = config->readEntry(DEF_POST_ACTION, default_defaultPostAction);
mInstance->emitPreferencesChanged();
@@ -361,9 +361,9 @@ void Preferences::save(bool syncToDisc)
KConfig* config = KGlobal::config();
config->setGroup(GENERAL_SECTION);
config->writeEntry(VERSION_NUM, KALARM_VERSION);
- QStringList colours;
+ TQStringList colours;
for (ColourList::const_iterator it = mMessageColours.begin(); it != mMessageColours.end(); ++it)
- colours.append(QColor(*it).name());
+ colours.append(TQColor(*it).name());
config->writeEntry(MESSAGE_COLOURS, colours);
config->writeEntry(MESSAGE_BG_COLOUR, mDefaultBgColour);
config->writeEntry(MESSAGE_FONT, mMessageFont);
@@ -382,7 +382,7 @@ void Preferences::save(bool syncToDisc)
config->writeEntry(EMAIL_FROM, emailFrom(mEmailFrom, true, false));
config->writeEntry(EMAIL_BCC_ADDRESS, emailFrom(mEmailBccFrom, true, true));
config->writeEntry(CMD_XTERM_COMMAND, translateXTermPath(config, mCmdXTermCommand, true));
- config->writeEntry(START_OF_DAY, QDateTime(QDate(1900,1,1), mStartOfDay));
+ config->writeEntry(START_OF_DAY, TQDateTime(TQDate(1900,1,1), mStartOfDay));
// Start-of-day check value is only written once the start-of-day time has been processed.
config->writeEntry(DISABLED_COLOUR, mDisabledColour);
config->writeEntry(EXPIRED_COLOUR, mExpiredColour);
@@ -403,14 +403,14 @@ void Preferences::save(bool syncToDisc)
config->writeEntry(DEF_EMAIL_BCC, mDefaultEmailBcc);
config->writeEntry(DEF_RECUR_PERIOD, mDefaultRecurPeriod);
config->writeEntry(FEB29_RECUR_TYPE, (mDefaultFeb29Type == KARecurrence::FEB29_MAR1 ? "Mar1" : mDefaultFeb29Type == KARecurrence::FEB29_FEB28 ? "Feb28" : "None"));
- QString value;
+ TQString value;
switch (mDefaultReminderUnits)
{
- case TimePeriod::MINUTES: value = QString::fromLatin1("Minutes"); break;
- case TimePeriod::HOURS_MINUTES: value = QString::fromLatin1("HoursMinutes"); break;
- case TimePeriod::DAYS: value = QString::fromLatin1("Days"); break;
- case TimePeriod::WEEKS: value = QString::fromLatin1("Weeks"); break;
- default: value = QString::null; break;
+ case TimePeriod::MINUTES: value = TQString::fromLatin1("Minutes"); break;
+ case TimePeriod::HOURS_MINUTES: value = TQString::fromLatin1("HoursMinutes"); break;
+ case TimePeriod::DAYS: value = TQString::fromLatin1("Days"); break;
+ case TimePeriod::WEEKS: value = TQString::fromLatin1("Weeks"); break;
+ default: value = TQString::null; break;
}
config->writeEntry(DEF_REMIND_UNITS, value);
config->writeEntry(DEF_PRE_ACTION, mDefaultPreAction);
@@ -440,7 +440,7 @@ void Preferences::updateStartOfDayCheck()
mStartOfDayChanged = false;
}
-QString Preferences::emailFrom(Preferences::MailFrom from, bool useAddress, bool bcc)
+TQString Preferences::emailFrom(Preferences::MailFrom from, bool useAddress, bool bcc)
{
switch (from)
{
@@ -449,13 +449,13 @@ QString Preferences::emailFrom(Preferences::MailFrom from, bool useAddress, bool
case MAIL_FROM_CONTROL_CENTRE:
return FROM_CONTROL_CENTRE;
case MAIL_FROM_ADDR:
- return useAddress ? (bcc ? mEmailBccAddress : mEmailAddress) : QString::null;
+ return useAddress ? (bcc ? mEmailBccAddress : mEmailAddress) : TQString::null;
default:
- return QString::null;
+ return TQString::null;
}
}
-Preferences::MailFrom Preferences::emailFrom(const QString& str)
+Preferences::MailFrom Preferences::emailFrom(const TQString& str)
{
if (str == FROM_KMAIL)
return MAIL_FROM_KMAIL;
@@ -467,7 +467,7 @@ Preferences::MailFrom Preferences::emailFrom(const QString& str)
/******************************************************************************
* Get user's default 'From' email address.
*/
-QString Preferences::emailAddress()
+TQString Preferences::emailAddress()
{
switch (mEmailFrom)
{
@@ -478,11 +478,11 @@ QString Preferences::emailAddress()
case MAIL_FROM_ADDR:
return mEmailAddress;
default:
- return QString::null;
+ return TQString::null;
}
}
-QString Preferences::emailBccAddress()
+TQString Preferences::emailBccAddress()
{
switch (mEmailBccFrom)
{
@@ -491,11 +491,11 @@ QString Preferences::emailBccAddress()
case MAIL_FROM_ADDR:
return mEmailBccAddress;
default:
- return QString::null;
+ return TQString::null;
}
}
-void Preferences::setEmailAddress(Preferences::MailFrom from, const QString& address)
+void Preferences::setEmailAddress(Preferences::MailFrom from, const TQString& address)
{
switch (from)
{
@@ -513,7 +513,7 @@ void Preferences::setEmailAddress(Preferences::MailFrom from, const QString& add
mEmailFrom = from;
}
-void Preferences::setEmailBccAddress(bool useControlCentre, const QString& address)
+void Preferences::setEmailBccAddress(bool useControlCentre, const TQString& address)
{
if (useControlCentre)
mEmailBccAddress = KAMail::controlCentreAddress();
@@ -526,7 +526,7 @@ void Preferences::setEmailBccAddress(bool useControlCentre, const QString& addre
* Called to allow or suppress output of the specified message dialog, where the
* dialog has a checkbox to turn notification off.
*/
-void Preferences::setNotify(const QString& messageID, bool notify)
+void Preferences::setNotify(const TQString& messageID, bool notify)
{
MessageBox::saveDontShowAgainContinue(messageID, !notify);
}
@@ -538,7 +538,7 @@ void Preferences::setNotify(const QString& messageID, bool notify)
* "don't ask again")
* = true in all other cases.
*/
-bool Preferences::notifying(const QString& messageID)
+bool Preferences::notifying(const TQString& messageID)
{
return MessageBox::shouldBeShownContinue(messageID);
}
@@ -558,12 +558,12 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,21))
{
// Convert KAlarm 1.4.21 preferences
- static const QString OLD_REMIND_UNITS = QString::fromLatin1("DefRemindUnits");
+ static const TQString OLD_REMIND_UNITS = TQString::fromLatin1("DefRemindUnits");
config->setGroup(DEFAULTS_SECTION);
int intUnit = config->readNumEntry(OLD_REMIND_UNITS, 0);
- QString strUnit = (intUnit == 1) ? QString::fromLatin1("Days")
- : (intUnit == 2) ? QString::fromLatin1("Weeks")
- : QString::fromLatin1("HoursMinutes");
+ TQString strUnit = (intUnit == 1) ? TQString::fromLatin1("Days")
+ : (intUnit == 2) ? TQString::fromLatin1("Weeks")
+ : TQString::fromLatin1("HoursMinutes");
config->deleteEntry(OLD_REMIND_UNITS);
config->writeEntry(DEF_REMIND_UNITS, strUnit);
}
@@ -571,11 +571,11 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,20))
{
// Convert KAlarm 1.4.20 preferences
- static const QString VIEW_SECTION = QString::fromLatin1("View");
- static const QString SHOW_ARCHIVED_ALARMS = QString::fromLatin1("ShowArchivedAlarms");
- static const QString SHOW_EXPIRED_ALARMS = QString::fromLatin1("ShowExpiredAlarms");
- static const QString SHOW_ALARM_TIME = QString::fromLatin1("ShowAlarmTime");
- static const QString SHOW_TIME_TO_ALARM = QString::fromLatin1("ShowTimeToAlarm");
+ static const TQString VIEW_SECTION = TQString::fromLatin1("View");
+ static const TQString SHOW_ARCHIVED_ALARMS = TQString::fromLatin1("ShowArchivedAlarms");
+ static const TQString SHOW_EXPIRED_ALARMS = TQString::fromLatin1("ShowExpiredAlarms");
+ static const TQString SHOW_ALARM_TIME = TQString::fromLatin1("ShowAlarmTime");
+ static const TQString SHOW_TIME_TO_ALARM = TQString::fromLatin1("ShowTimeToAlarm");
config->setGroup(GENERAL_SECTION);
bool showExpired = config->readBoolEntry(SHOW_EXPIRED_ALARMS, false);
bool showTime = config->readBoolEntry(SHOW_ALARM_TIME, true);
@@ -592,7 +592,7 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,5))
{
// Convert KAlarm 1.4.5 preferences
- static const QString DEF_SOUND = QString::fromLatin1("DefSound");
+ static const TQString DEF_SOUND = TQString::fromLatin1("DefSound");
config->setGroup(DEFAULTS_SECTION);
bool sound = config->readBoolEntry(DEF_SOUND, false);
if (!sound)
@@ -603,10 +603,10 @@ void Preferences::convertOldPrefs()
if (version < KAlarm::Version(1,3,0))
{
// Convert KAlarm pre-1.3 preferences
- static const QString EMAIL_ADDRESS = QString::fromLatin1("EmailAddress");
- static const QString EMAIL_USE_CTRL_CENTRE = QString::fromLatin1("EmailUseControlCenter");
- static const QString EMAIL_BCC_USE_CTRL_CENTRE = QString::fromLatin1("EmailBccUseControlCenter");
- QMap<QString, QString> entries = config->entryMap(GENERAL_SECTION);
+ static const TQString EMAIL_ADDRESS = TQString::fromLatin1("EmailAddress");
+ static const TQString EMAIL_USE_CTRL_CENTRE = TQString::fromLatin1("EmailUseControlCenter");
+ static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::fromLatin1("EmailBccUseControlCenter");
+ TQMap<TQString, TQString> entries = config->entryMap(GENERAL_SECTION);
if (entries.find(EMAIL_FROM) == entries.end()
&& entries.find(EMAIL_USE_CTRL_CENTRE) != entries.end())
{
@@ -628,7 +628,7 @@ void Preferences::convertOldPrefs()
config->deleteEntry(EMAIL_USE_CTRL_CENTRE);
}
// Convert KAlarm 1.2 preferences
- static const QString DEF_CMD_XTERM = QString::fromLatin1("DefCmdXterm");
+ static const TQString DEF_CMD_XTERM = TQString::fromLatin1("DefCmdXterm");
config->setGroup(DEFAULTS_SECTION);
if (config->hasKey(DEF_CMD_XTERM))
{
@@ -651,14 +651,14 @@ void Preferences::convertOldPrefs()
* causes a crash on some systems, so it's necessary to extract the
* executable path first before processing.
*/
-QString translateXTermPath(KConfig* config, const QString& cmdline, bool write)
+TQString translateXTermPath(KConfig* config, const TQString& cmdline, bool write)
{
- QString params;
- QString cmd = cmdline;
+ TQString params;
+ TQString cmd = cmdline;
if (cmdline.isEmpty())
return cmdline;
// Strip any leading quote
- QChar quote = cmdline[0];
+ TQChar quote = cmdline[0];
char q = static_cast<char>(quote);
bool quoted = (q == '"' || q == '\'');
if (quoted)
diff --git a/kalarm/preferences.h b/kalarm/preferences.h
index f0eeb4ea6..38cf9ad8a 100644
--- a/kalarm/preferences.h
+++ b/kalarm/preferences.h
@@ -23,11 +23,11 @@
#include "kalarm.h"
-#include <qobject.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
class QWidget;
#include "colourlist.h"
@@ -51,14 +51,14 @@ class Preferences : public QObject
static void save(bool syncToDisc = true);
static void syncToDisc();
static void updateStartOfDayCheck();
- static void connect(const char* signal, const QObject* receiver, const char* member);
+ static void connect(const char* signal, const TQObject* receiver, const char* member);
// Access to settings
static const ColourList& messageColours() { return mMessageColours; }
- static QColor defaultBgColour() { return mDefaultBgColour; }
- static QColor defaultFgColour() { return default_defaultFgColour; }
- static const QFont& messageFont() { return mMessageFont; }
- static const QTime& startOfDay() { return mStartOfDay; }
+ static TQColor defaultBgColour() { return mDefaultBgColour; }
+ static TQColor defaultFgColour() { return default_defaultFgColour; }
+ static const TQFont& messageFont() { return mMessageFont; }
+ static const TQTime& startOfDay() { return mStartOfDay; }
static bool hasStartOfDayChanged() { return mStartOfDayChanged; }
static bool runInSystemTray() { return mRunInSystemTray; }
static bool disableAlarmsIfStopped() { return mDisableAlarmsIfStopped; }
@@ -72,7 +72,7 @@ class Preferences : public QObject
static int tooltipAlarmCount() { return mTooltipAlarmCount; }
static bool showTooltipAlarmTime() { return mShowTooltipAlarmTime; }
static bool showTooltipTimeToAlarm() { return mShowTooltipTimeToAlarm; }
- static const QString& tooltipTimeToPrefix() { return mTooltipTimeToPrefix; }
+ static const TQString& tooltipTimeToPrefix() { return mTooltipTimeToPrefix; }
static int daemonTrayCheckInterval() { return mDaemonTrayCheckInterval; }
static MailClient emailClient() { return mEmailClient; }
static bool emailCopyToKMail() { return mEmailCopyToKMail && mEmailClient == SENDMAIL; }
@@ -80,14 +80,14 @@ class Preferences : public QObject
static void setEmailQueuedNotify(bool yes) { setNotify(EMAIL_QUEUED_NOTIFY, yes); }
static MailFrom emailFrom() { return mEmailFrom; }
static bool emailBccUseControlCentre() { return mEmailBccFrom == MAIL_FROM_CONTROL_CENTRE; }
- static QString emailAddress();
- static QString emailBccAddress();
- static QString cmdXTermCommand() { return mCmdXTermCommand; }
- static QColor disabledColour() { return mDisabledColour; }
- static QColor expiredColour() { return mExpiredColour; }
+ static TQString emailAddress();
+ static TQString emailBccAddress();
+ static TQString cmdXTermCommand() { return mCmdXTermCommand; }
+ static TQColor disabledColour() { return mDisabledColour; }
+ static TQColor expiredColour() { return mExpiredColour; }
static int expiredKeepDays() { return mExpiredKeepDays; }
static SoundPicker::Type defaultSoundType() { return mDefaultSoundType; }
- static const QString& defaultSoundFile() { return mDefaultSoundFile; }
+ static const TQString& defaultSoundFile() { return mDefaultSoundFile; }
static float defaultSoundVolume() { return mDefaultSoundVolume; }
static bool defaultSoundRepeat() { return mDefaultSoundRepeat; }
static int defaultLateCancel() { return mDefaultLateCancel; }
@@ -97,27 +97,27 @@ class Preferences : public QObject
static bool defaultCmdScript() { return mDefaultCmdScript; }
static EditAlarmDlg::CmdLogType
defaultCmdLogType() { return mDefaultCmdLogType; }
- static QString defaultCmdLogFile() { return mDefaultCmdLogFile; }
+ static TQString defaultCmdLogFile() { return mDefaultCmdLogFile; }
static bool defaultEmailBcc() { return mDefaultEmailBcc; }
static RecurrenceEdit::RepeatType
defaultRecurPeriod() { return mDefaultRecurPeriod; }
static KARecurrence::Feb29Type
defaultFeb29Type() { return mDefaultFeb29Type; }
static TimePeriod::Units defaultReminderUnits() { return mDefaultReminderUnits; }
- static const QString& defaultPreAction() { return mDefaultPreAction; }
- static const QString& defaultPostAction() { return mDefaultPostAction; }
+ static const TQString& defaultPreAction() { return mDefaultPreAction; }
+ static const TQString& defaultPostAction() { return mDefaultPostAction; }
// Config file entry names for notification messages
- static const QString QUIT_WARN;
- static const QString CONFIRM_ALARM_DELETION;
- static const QString EMAIL_QUEUED_NOTIFY;
+ static const TQString QUIT_WARN;
+ static const TQString CONFIRM_ALARM_DELETION;
+ static const TQString EMAIL_QUEUED_NOTIFY;
// Default values for settings
static const ColourList default_messageColours;
- static const QColor default_defaultBgColour;
- static const QColor default_defaultFgColour;
- static const QFont& default_messageFont() { return mDefault_messageFont; };
- static const QTime default_startOfDay;
+ static const TQColor default_defaultBgColour;
+ static const TQColor default_defaultFgColour;
+ static const TQFont& default_messageFont() { return mDefault_messageFont; };
+ static const TQTime default_startOfDay;
static const bool default_runInSystemTray;
static const bool default_disableAlarmsIfStopped;
static const bool default_quitWarn;
@@ -128,19 +128,19 @@ class Preferences : public QObject
static const int default_tooltipAlarmCount;
static const bool default_showTooltipAlarmTime;
static const bool default_showTooltipTimeToAlarm;
- static const QString default_tooltipTimeToPrefix;
+ static const TQString default_tooltipTimeToPrefix;
static const int default_daemonTrayCheckInterval;
static const MailClient default_emailClient;
static const bool default_emailCopyToKMail;
static MailFrom default_emailFrom();
static const bool default_emailQueuedNotify;
static const MailFrom default_emailBccFrom;
- static const QString default_emailAddress;
- static const QString default_emailBccAddress;
- static const QColor default_disabledColour;
- static const QColor default_expiredColour;
+ static const TQString default_emailAddress;
+ static const TQString default_emailBccAddress;
+ static const TQColor default_disabledColour;
+ static const TQColor default_expiredColour;
static const int default_expiredKeepDays;
- static const QString default_defaultSoundFile;
+ static const TQString default_defaultSoundFile;
static const float default_defaultSoundVolume;
static const int default_defaultLateCancel;
static const bool default_defaultAutoClose;
@@ -154,12 +154,12 @@ class Preferences : public QObject
static const RecurrenceEdit::RepeatType default_defaultRecurPeriod;
static const KARecurrence::Feb29Type default_defaultFeb29Type;
static const TimePeriod::Units default_defaultReminderUnits;
- static const QString default_defaultPreAction;
- static const QString default_defaultPostAction;
+ static const TQString default_defaultPreAction;
+ static const TQString default_defaultPostAction;
signals:
void preferencesChanged();
- void startOfDayChanged(const QTime& oldStartOfDay);
+ void startOfDayChanged(const TQTime& oldStartOfDay);
private:
Preferences() { } // only one instance allowed
@@ -170,14 +170,14 @@ class Preferences : public QObject
static void convertOldPrefs();
static int startOfDayCheck();
static QString emailFrom(MailFrom, bool useAddress, bool bcc);
- static MailFrom emailFrom(const QString&);
- static void setNotify(const QString& messageID, bool notify);
- static bool notifying(const QString& messageID);
+ static MailFrom emailFrom(const TQString&);
+ static void setNotify(const TQString& messageID, bool notify);
+ static bool notifying(const TQString& messageID);
static Preferences* mInstance;
- static QFont mDefault_messageFont;
- static QString mEmailAddress;
- static QString mEmailBccAddress;
+ static TQFont mDefault_messageFont;
+ static TQString mEmailAddress;
+ static TQString mEmailBccAddress;
// All the following members are accessed by the Preferences dialog classes
friend class MiscPrefTab;
@@ -185,12 +185,12 @@ class Preferences : public QObject
friend class ViewPrefTab;
friend class FontColourPrefTab;
friend class EmailPrefTab;
- static void setEmailAddress(MailFrom, const QString& address);
- static void setEmailBccAddress(bool useControlCentre, const QString& address);
+ static void setEmailAddress(MailFrom, const TQString& address);
+ static void setEmailBccAddress(bool useControlCentre, const TQString& address);
static ColourList mMessageColours;
- static QColor mDefaultBgColour;
- static QFont mMessageFont;
- static QTime mStartOfDay;
+ static TQColor mDefaultBgColour;
+ static TQFont mMessageFont;
+ static TQTime mStartOfDay;
static bool mRunInSystemTray;
static bool mDisableAlarmsIfStopped;
static bool mAutostartTrayIcon;
@@ -199,18 +199,18 @@ class Preferences : public QObject
static int mTooltipAlarmCount;
static bool mShowTooltipAlarmTime;
static bool mShowTooltipTimeToAlarm;
- static QString mTooltipTimeToPrefix;
+ static TQString mTooltipTimeToPrefix;
static int mDaemonTrayCheckInterval;
static MailClient mEmailClient;
static MailFrom mEmailFrom;
static MailFrom mEmailBccFrom;
static bool mEmailCopyToKMail;
- static QString mCmdXTermCommand;
- static QColor mDisabledColour;
- static QColor mExpiredColour;
+ static TQString mCmdXTermCommand;
+ static TQColor mDisabledColour;
+ static TQColor mExpiredColour;
static int mExpiredKeepDays; // 0 = don't keep, -1 = keep indefinitely
// Default settings for Edit Alarm dialog
- static QString mDefaultSoundFile;
+ static TQString mDefaultSoundFile;
static float mDefaultSoundVolume;
static int mDefaultLateCancel;
static bool mDefaultAutoClose;
@@ -221,14 +221,14 @@ class Preferences : public QObject
static bool mDefaultEmailBcc;
static bool mDefaultCmdScript;
static EditAlarmDlg::CmdLogType mDefaultCmdLogType;
- static QString mDefaultCmdLogFile;
+ static TQString mDefaultCmdLogFile;
static RecurrenceEdit::RepeatType mDefaultRecurPeriod;
static KARecurrence::Feb29Type mDefaultFeb29Type;
static TimePeriod::Units mDefaultReminderUnits;
- static QString mDefaultPreAction;
- static QString mDefaultPostAction;
+ static TQString mDefaultPreAction;
+ static TQString mDefaultPostAction;
// Change tracking
- static QTime mOldStartOfDay; // previous start-of-day time
+ static TQTime mOldStartOfDay; // previous start-of-day time
static bool mStartOfDayChanged; // start-of-day check value doesn't tally with mStartOfDay
};
diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp
index c7aef494b..bc70e4fe0 100644
--- a/kalarm/recurrenceedit.cpp
+++ b/kalarm/recurrenceedit.cpp
@@ -23,16 +23,16 @@
#include "kalarm.h"
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
-#include <qlistbox.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
+#include <tqlistbox.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -66,24 +66,24 @@ using namespace KCal;
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString RecurrenceEdit::i18n_Norecur() { return i18n("No recurrence"); }
-QString RecurrenceEdit::i18n_NoRecur() { return i18n("No Recurrence"); }
-QString RecurrenceEdit::i18n_AtLogin() { return i18n("At Login"); }
-QString RecurrenceEdit::i18n_l_Atlogin() { return i18n("At &login"); }
-QString RecurrenceEdit::i18n_HourlyMinutely() { return i18n("Hourly/Minutely"); }
-QString RecurrenceEdit::i18n_u_HourlyMinutely() { return i18n("Ho&urly/Minutely"); }
-QString RecurrenceEdit::i18n_Daily() { return i18n("Daily"); }
-QString RecurrenceEdit::i18n_d_Daily() { return i18n("&Daily"); }
-QString RecurrenceEdit::i18n_Weekly() { return i18n("Weekly"); }
-QString RecurrenceEdit::i18n_w_Weekly() { return i18n("&Weekly"); }
-QString RecurrenceEdit::i18n_Monthly() { return i18n("Monthly"); }
-QString RecurrenceEdit::i18n_m_Monthly() { return i18n("&Monthly"); }
-QString RecurrenceEdit::i18n_Yearly() { return i18n("Yearly"); }
-QString RecurrenceEdit::i18n_y_Yearly() { return i18n("&Yearly"); }
-
-
-RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
- : QFrame(parent, name),
+TQString RecurrenceEdit::i18n_Norecur() { return i18n("No recurrence"); }
+TQString RecurrenceEdit::i18n_NoRecur() { return i18n("No Recurrence"); }
+TQString RecurrenceEdit::i18n_AtLogin() { return i18n("At Login"); }
+TQString RecurrenceEdit::i18n_l_Atlogin() { return i18n("At &login"); }
+TQString RecurrenceEdit::i18n_HourlyMinutely() { return i18n("Hourly/Minutely"); }
+TQString RecurrenceEdit::i18n_u_HourlyMinutely() { return i18n("Ho&urly/Minutely"); }
+TQString RecurrenceEdit::i18n_Daily() { return i18n("Daily"); }
+TQString RecurrenceEdit::i18n_d_Daily() { return i18n("&Daily"); }
+TQString RecurrenceEdit::i18n_Weekly() { return i18n("Weekly"); }
+TQString RecurrenceEdit::i18n_w_Weekly() { return i18n("&Weekly"); }
+TQString RecurrenceEdit::i18n_Monthly() { return i18n("Monthly"); }
+TQString RecurrenceEdit::i18n_m_Monthly() { return i18n("&Monthly"); }
+TQString RecurrenceEdit::i18n_Yearly() { return i18n("Yearly"); }
+TQString RecurrenceEdit::i18n_y_Yearly() { return i18n("&Yearly"); }
+
+
+RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mRule(0),
mRuleButtonType(INVALID_RECUR),
mDailyShown(false),
@@ -93,8 +93,8 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mNoEmitTypeChanged(true),
mReadOnly(readOnly)
{
- QBoxLayout* layout;
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQBoxLayout* layout;
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
/* Create the recurrence rule Group box which holds the recurrence period
* selection buttons, and the weekly, monthly and yearly recurrence rule
@@ -103,61 +103,61 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
* selection of its corresponding radio button.
*/
- QGroupBox* recurGroup = new QGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup");
+ TQGroupBox* recurGroup = new TQGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup");
topLayout->addWidget(recurGroup);
- QFrame* ruleFrame = new QFrame(recurGroup, "ruleFrame");
- layout = new QVBoxLayout(ruleFrame, 0);
+ TQFrame* ruleFrame = new TQFrame(recurGroup, "ruleFrame");
+ layout = new TQVBoxLayout(ruleFrame, 0);
layout->addSpacing(KDialog::spacingHint()/2);
- layout = new QHBoxLayout(layout, 0);
- QBoxLayout* lay = new QVBoxLayout(layout, 0);
+ layout = new TQHBoxLayout(layout, 0);
+ TQBoxLayout* lay = new TQVBoxLayout(layout, 0);
mRuleButtonGroup = new ButtonGroup(1, Qt::Horizontal, ruleFrame);
mRuleButtonGroup->setInsideMargin(0);
- mRuleButtonGroup->setFrameStyle(QFrame::NoFrame);
+ mRuleButtonGroup->setFrameStyle(TQFrame::NoFrame);
lay->addWidget(mRuleButtonGroup);
lay->addStretch(); // top-adjust the interval radio buttons
- connect(mRuleButtonGroup, SIGNAL(buttonSet(int)), SLOT(periodClicked(int)));
+ connect(mRuleButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(periodClicked(int)));
mNoneButton = new RadioButton(i18n_Norecur(), mRuleButtonGroup);
mNoneButton->setFixedSize(mNoneButton->sizeHint());
mNoneButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm"));
+ TQWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm"));
mAtLoginButton = new RadioButton(i18n_l_Atlogin(), mRuleButtonGroup);
mAtLoginButton->setFixedSize(mAtLoginButton->sizeHint());
mAtLoginButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mAtLoginButton,
+ TQWhatsThis::add(mAtLoginButton,
i18n("Trigger the alarm at the specified date/time and at every login until then.\n"
"Note that it will also be triggered any time the alarm daemon is restarted."));
mSubDailyButton = new RadioButton(i18n_u_HourlyMinutely(), mRuleButtonGroup);
mSubDailyButton->setFixedSize(mSubDailyButton->sizeHint());
mSubDailyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mSubDailyButton,
+ TQWhatsThis::add(mSubDailyButton,
i18n("Repeat the alarm at hourly/minutely intervals"));
mDailyButton = new RadioButton(i18n_d_Daily(), mRuleButtonGroup);
mDailyButton->setFixedSize(mDailyButton->sizeHint());
mDailyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mDailyButton,
+ TQWhatsThis::add(mDailyButton,
i18n("Repeat the alarm at daily intervals"));
mWeeklyButton = new RadioButton(i18n_w_Weekly(), mRuleButtonGroup);
mWeeklyButton->setFixedSize(mWeeklyButton->sizeHint());
mWeeklyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mWeeklyButton,
+ TQWhatsThis::add(mWeeklyButton,
i18n("Repeat the alarm at weekly intervals"));
mMonthlyButton = new RadioButton(i18n_m_Monthly(), mRuleButtonGroup);
mMonthlyButton->setFixedSize(mMonthlyButton->sizeHint());
mMonthlyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mMonthlyButton,
+ TQWhatsThis::add(mMonthlyButton,
i18n("Repeat the alarm at monthly intervals"));
mYearlyButton = new RadioButton(i18n_y_Yearly(), mRuleButtonGroup);
mYearlyButton->setFixedSize(mYearlyButton->sizeHint());
mYearlyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mYearlyButton,
+ TQWhatsThis::add(mYearlyButton,
i18n("Repeat the alarm at annual intervals"));
mNoneButtonId = mRuleButtonGroup->id(mNoneButton);
@@ -172,20 +172,20 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), true, ruleFrame);
mSubRepetition->setFixedSize(mSubRepetition->sizeHint());
mSubRepetition->setReadOnly(mReadOnly);
- connect(mSubRepetition, SIGNAL(needsInitialisation()), SIGNAL(repeatNeedsInitialisation()));
- connect(mSubRepetition, SIGNAL(changed()), SIGNAL(frequencyChanged()));
- QWhatsThis::add(mSubRepetition, i18n("Set up a repetition within the recurrence, to trigger the alarm multiple times each time the recurrence is due."));
+ connect(mSubRepetition, TQT_SIGNAL(needsInitialisation()), TQT_SIGNAL(repeatNeedsInitialisation()));
+ connect(mSubRepetition, TQT_SIGNAL(changed()), TQT_SIGNAL(frequencyChanged()));
+ TQWhatsThis::add(mSubRepetition, i18n("Set up a repetition within the recurrence, to trigger the alarm multiple times each time the recurrence is due."));
lay->addSpacing(KDialog::spacingHint());
lay->addWidget(mSubRepetition);
- lay = new QVBoxLayout(layout);
+ lay = new TQVBoxLayout(layout);
lay->addStretch();
- layout = new QHBoxLayout(lay);
+ layout = new TQHBoxLayout(lay);
layout->addSpacing(KDialog::marginHint());
- QFrame* divider = new QFrame(ruleFrame);
- divider->setFrameStyle(QFrame::VLine | QFrame::Sunken);
+ TQFrame* divider = new TQFrame(ruleFrame);
+ divider->setFrameStyle(TQFrame::VLine | TQFrame::Sunken);
layout->addWidget(divider);
layout->addSpacing(KDialog::marginHint());
@@ -196,13 +196,13 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mMonthlyRule = new MonthlyRule(mReadOnly, ruleFrame, "monthFrame");
mYearlyRule = new YearlyRule(mReadOnly, ruleFrame, "yearFrame");
- connect(mSubDailyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mDailyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mWeeklyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mMonthlyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mYearlyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
+ connect(mSubDailyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mDailyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mWeeklyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mMonthlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mYearlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
- mRuleStack = new QWidgetStack(ruleFrame);
+ mRuleStack = new TQWidgetStack(ruleFrame);
layout->addWidget(mRuleStack);
layout->addStretch(1);
mRuleStack->addWidget(mNoRule, 0);
@@ -217,33 +217,33 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
// which specify how long the recurrence is to last.
mRangeButtonGroup = new ButtonGroup(i18n("Recurrence End"), this, "mRangeButtonGroup");
- connect(mRangeButtonGroup, SIGNAL(buttonSet(int)), SLOT(rangeTypeClicked()));
+ connect(mRangeButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(rangeTypeClicked()));
topLayout->addWidget(mRangeButtonGroup);
- QVBoxLayout* vlayout = new QVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* vlayout = new TQVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint());
vlayout->addSpacing(fontMetrics().lineSpacing()/2);
mNoEndDateButton = new RadioButton(i18n("No &end"), mRangeButtonGroup);
mNoEndDateButton->setFixedSize(mNoEndDateButton->sizeHint());
mNoEndDateButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely"));
+ TQWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely"));
vlayout->addWidget(mNoEndDateButton, 1, Qt::AlignAuto);
- QSize size = mNoEndDateButton->size();
+ TQSize size = mNoEndDateButton->size();
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
mRepeatCountButton = new RadioButton(i18n("End a&fter:"), mRangeButtonGroup);
mRepeatCountButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mRepeatCountButton,
+ TQWhatsThis::add(mRepeatCountButton,
i18n("Repeat the alarm for the number of times specified"));
mRepeatCountEntry = new SpinBox(1, 9999, 1, mRangeButtonGroup);
mRepeatCountEntry->setFixedSize(mRepeatCountEntry->sizeHint());
mRepeatCountEntry->setLineShiftStep(10);
mRepeatCountEntry->setSelectOnStep(false);
mRepeatCountEntry->setReadOnly(mReadOnly);
- connect(mRepeatCountEntry, SIGNAL(valueChanged(int)), SLOT(repeatCountChanged(int)));
- QWhatsThis::add(mRepeatCountEntry,
+ connect(mRepeatCountEntry, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(repeatCountChanged(int)));
+ TQWhatsThis::add(mRepeatCountEntry,
i18n("Enter the total number of times to trigger the alarm"));
mRepeatCountButton->setFocusWidget(mRepeatCountEntry);
- mRepeatCountLabel = new QLabel(i18n("occurrence(s)"), mRangeButtonGroup);
+ mRepeatCountLabel = new TQLabel(i18n("occurrence(s)"), mRangeButtonGroup);
mRepeatCountLabel->setFixedSize(mRepeatCountLabel->sizeHint());
layout->addWidget(mRepeatCountButton);
layout->addSpacing(KDialog::spacingHint());
@@ -252,28 +252,28 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
layout->addStretch();
size = size.expandedTo(mRepeatCountButton->sizeHint());
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
mEndDateButton = new RadioButton(i18n("End &by:"), mRangeButtonGroup);
mEndDateButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mEndDateButton,
+ TQWhatsThis::add(mEndDateButton,
i18n("Repeat the alarm until the date/time specified.\n\n"
"Note: This applies to the main recurrence only. It does not limit any sub-repetition which will occur regardless after the last main recurrence."));
mEndDateEdit = new DateEdit(mRangeButtonGroup);
mEndDateEdit->setFixedSize(mEndDateEdit->sizeHint());
mEndDateEdit->setReadOnly(mReadOnly);
- QWhatsThis::add(mEndDateEdit,
+ TQWhatsThis::add(mEndDateEdit,
i18n("Enter the last date to repeat the alarm"));
mEndDateButton->setFocusWidget(mEndDateEdit);
mEndTimeEdit = new TimeEdit(mRangeButtonGroup);
mEndTimeEdit->setFixedSize(mEndTimeEdit->sizeHint());
mEndTimeEdit->setReadOnly(mReadOnly);
- static const QString lastTimeText = i18n("Enter the last time to repeat the alarm.");
- QWhatsThis::add(mEndTimeEdit, QString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis()));
+ static const TQString lastTimeText = i18n("Enter the last time to repeat the alarm.");
+ TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis()));
mEndAnyTimeCheckBox = new CheckBox(i18n("Any time"), mRangeButtonGroup);
mEndAnyTimeCheckBox->setFixedSize(mEndAnyTimeCheckBox->sizeHint());
mEndAnyTimeCheckBox->setReadOnly(mReadOnly);
- connect(mEndAnyTimeCheckBox, SIGNAL(toggled(bool)), SLOT(slotAnyTimeToggled(bool)));
- QWhatsThis::add(mEndAnyTimeCheckBox,
+ connect(mEndAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
+ TQWhatsThis::add(mEndAnyTimeCheckBox,
i18n("Stop repeating the alarm after your first login on or after the specified end date"));
layout->addWidget(mEndDateButton);
layout->addSpacing(KDialog::spacingHint());
@@ -290,18 +290,18 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
// Create the exceptions group which specifies dates to be excluded
// from the recurrence.
- mExceptionGroup = new QGroupBox(i18n("E&xceptions"), this, "mExceptionGroup");
+ mExceptionGroup = new TQGroupBox(i18n("E&xceptions"), this, "mExceptionGroup");
topLayout->addWidget(mExceptionGroup);
topLayout->setStretchFactor(mExceptionGroup, 2);
- vlayout = new QVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint());
+ vlayout = new TQVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint());
vlayout->addSpacing(fontMetrics().lineSpacing()/2);
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
- vlayout = new QVBoxLayout(layout);
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
+ vlayout = new TQVBoxLayout(layout);
- mExceptionDateList = new QListBox(mExceptionGroup);
- mExceptionDateList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- connect(mExceptionDateList, SIGNAL(selectionChanged()), SLOT(enableExceptionButtons()));
- QWhatsThis::add(mExceptionDateList,
+ mExceptionDateList = new TQListBox(mExceptionGroup);
+ mExceptionDateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ connect(mExceptionDateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(enableExceptionButtons()));
+ TQWhatsThis::add(mExceptionDateList,
i18n("The list of exceptions, i.e. dates/times excluded from the recurrence"));
vlayout->addWidget(mExceptionDateList);
@@ -313,34 +313,34 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
}
else
{
- vlayout = new QVBoxLayout(layout);
+ vlayout = new TQVBoxLayout(layout);
mExceptionDateEdit = new DateEdit(mExceptionGroup);
mExceptionDateEdit->setFixedSize(mExceptionDateEdit->sizeHint());
- mExceptionDateEdit->setDate(QDate::currentDate());
- QWhatsThis::add(mExceptionDateEdit,
+ mExceptionDateEdit->setDate(TQDate::currentDate());
+ TQWhatsThis::add(mExceptionDateEdit,
i18n("Enter a date to insert in the exceptions list. "
"Use in conjunction with the Add or Change button below."));
vlayout->addWidget(mExceptionDateEdit);
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
- QPushButton* button = new QPushButton(i18n("Add"), mExceptionGroup);
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
+ TQPushButton* button = new TQPushButton(i18n("Add"), mExceptionGroup);
button->setFixedSize(button->sizeHint());
- connect(button, SIGNAL(clicked()), SLOT(addException()));
- QWhatsThis::add(button,
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(addException()));
+ TQWhatsThis::add(button,
i18n("Add the date entered above to the exceptions list"));
layout->addWidget(button);
- mChangeExceptionButton = new QPushButton(i18n("Change"), mExceptionGroup);
+ mChangeExceptionButton = new TQPushButton(i18n("Change"), mExceptionGroup);
mChangeExceptionButton->setFixedSize(mChangeExceptionButton->sizeHint());
- connect(mChangeExceptionButton, SIGNAL(clicked()), SLOT(changeException()));
- QWhatsThis::add(mChangeExceptionButton,
+ connect(mChangeExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(changeException()));
+ TQWhatsThis::add(mChangeExceptionButton,
i18n("Replace the currently highlighted item in the exceptions list with the date entered above"));
layout->addWidget(mChangeExceptionButton);
- mDeleteExceptionButton = new QPushButton(i18n("Delete"), mExceptionGroup);
+ mDeleteExceptionButton = new TQPushButton(i18n("Delete"), mExceptionGroup);
mDeleteExceptionButton->setFixedSize(mDeleteExceptionButton->sizeHint());
- connect(mDeleteExceptionButton, SIGNAL(clicked()), SLOT(deleteException()));
- QWhatsThis::add(mDeleteExceptionButton,
+ connect(mDeleteExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteException()));
+ TQWhatsThis::add(mDeleteExceptionButton,
i18n("Remove the currently highlighted item from the exceptions list"));
layout->addWidget(mDeleteExceptionButton);
}
@@ -352,19 +352,19 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
* Verify the consistency of the entered data.
* Reply = widget to receive focus on error, or 0 if no error.
*/
-QWidget* RecurrenceEdit::checkData(const QDateTime& startDateTime, QString& errorMessage) const
+TQWidget* RecurrenceEdit::checkData(const TQDateTime& startDateTime, TQString& errorMessage) const
{
if (mAtLoginButton->isOn())
return 0;
const_cast<RecurrenceEdit*>(this)->mCurrStartDateTime = startDateTime;
if (mEndDateButton->isChecked())
{
- QWidget* errWidget = 0;
+ TQWidget* errWidget = 0;
bool noTime = !mEndTimeEdit->isEnabled();
- QDate endDate = mEndDateEdit->date();
+ TQDate endDate = mEndDateEdit->date();
if (endDate < startDateTime.date())
errWidget = mEndDateEdit;
- else if (!noTime && QDateTime(endDate, mEndTimeEdit->time()) < startDateTime)
+ else if (!noTime && TQDateTime(endDate, mEndTimeEdit->time()) < startDateTime)
errWidget = mEndTimeEdit;
if (errWidget)
{
@@ -452,7 +452,7 @@ void RecurrenceEdit::periodClicked(int id)
void RecurrenceEdit::slotAnyTimeToggled(bool on)
{
- QButton* button = mRuleButtonGroup->selected();
+ TQButton* button = mRuleButtonGroup->selected();
mEndTimeEdit->setEnabled(button == mAtLoginButton && !on
|| button == mSubDailyButton && mEndDateButton->isChecked());
}
@@ -472,7 +472,7 @@ void RecurrenceEdit::rangeTypeClicked()
mRepeatCountLabel->setEnabled(repeatCount);
}
-void RecurrenceEdit::showEvent(QShowEvent*)
+void RecurrenceEdit::showEvent(TQShowEvent*)
{
if (mRule)
mRule->setFrequencyFocus();
@@ -548,8 +548,8 @@ void RecurrenceEdit::addException()
{
if (!mExceptionDateEdit || !mExceptionDateEdit->isValid())
return;
- QDate date = mExceptionDateEdit->date();
- QValueList<QDate>::Iterator it;
+ TQDate date = mExceptionDateEdit->date();
+ TQValueList<TQDate>::Iterator it;
int index = 0;
bool insert = true;
for (it = mExceptionDates.begin(); it != mExceptionDates.end(); ++index, ++it)
@@ -580,8 +580,8 @@ void RecurrenceEdit::changeException()
int index = mExceptionDateList->currentItem();
if (index >= 0 && mExceptionDateList->isSelected(index))
{
- QDate olddate = mExceptionDates[index];
- QDate newdate = mExceptionDateEdit->date();
+ TQDate olddate = mExceptionDates[index];
+ TQDate newdate = mExceptionDateEdit->date();
if (newdate != olddate)
{
mExceptionDates.remove(mExceptionDates.at(index));
@@ -619,13 +619,13 @@ void RecurrenceEdit::enableExceptionButtons()
mChangeExceptionButton->setEnabled(enable);
// Prevent the exceptions list box receiving keyboard focus is it's empty
- mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? QWidget::WheelFocus : QWidget::NoFocus);
+ mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? TQWidget::WheelFocus : TQWidget::NoFocus);
}
/******************************************************************************
* Notify this instance of a change in the alarm start date.
*/
-void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
+void RecurrenceEdit::setStartDate(const TQDate& start, const TQDate& today)
{
if (!mReadOnly)
{
@@ -638,7 +638,7 @@ void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
}
else
{
- const QString startString = i18n("Date cannot be earlier than start date", "start date");
+ const TQString startString = i18n("Date cannot be earlier than start date", "start date");
mEndDateEdit->setMinDate(start, startString);
if (mExceptionDateEdit)
mExceptionDateEdit->setMinDate(start, startString);
@@ -649,7 +649,7 @@ void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
/******************************************************************************
* Specify the default recurrence end date.
*/
-void RecurrenceEdit::setDefaultEndDate(const QDate& end)
+void RecurrenceEdit::setDefaultEndDate(const TQDate& end)
{
if (!mEndDateButton->isOn())
mEndDateEdit->setDate(end);
@@ -673,10 +673,10 @@ DateTime RecurrenceEdit::endDateTime() const
/******************************************************************************
* Set all controls to their default values.
*/
-void RecurrenceEdit::setDefaults(const QDateTime& from)
+void RecurrenceEdit::setDefaults(const TQDateTime& from)
{
mCurrStartDateTime = from;
- QDate fromDate = from.date();
+ TQDate fromDate = from.date();
mNoEndDateButton->setChecked(true);
mSubDailyRule->setFrequency(1);
@@ -716,7 +716,7 @@ void RecurrenceEdit::setDefaults(const QDateTime& from)
* Set the controls for weekly, monthly and yearly rules which have not so far
* been shown, to their default values, depending on the recurrence start date.
*/
-void RecurrenceEdit::setRuleDefaults(const QDate& fromDate)
+void RecurrenceEdit::setRuleDefaults(const TQDate& fromDate)
{
int day = fromDate.day();
int dayOfWeek = fromDate.dayOfWeek();
@@ -759,7 +759,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::DAILY:
{
mRuleButtonGroup->setButton(mDailyButtonId);
- QBitArray rDays = recurrence->days();
+ TQBitArray rDays = recurrence->days();
bool set = false;
for (int i = 0; i < 7 && !set; ++i)
set = rDays.testBit(i);
@@ -772,13 +772,13 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::WEEKLY:
{
mRuleButtonGroup->setButton(mWeeklyButtonId);
- QBitArray rDays = recurrence->days();
+ TQBitArray rDays = recurrence->days();
mWeeklyRule->setDays(rDays);
break;
}
case KARecurrence::MONTHLY_POS: // on nth (Tuesday) of the month
{
- QValueList<RecurrenceRule::WDayPos> posns = recurrence->monthPositions();
+ TQValueList<RecurrenceRule::WDayPos> posns = recurrence->monthPositions();
int i = posns.first().pos();
if (!i)
{
@@ -786,8 +786,8 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
// (but ignoring any non-every xxxDay positions).
mRuleButtonGroup->setButton(mWeeklyButtonId);
mWeeklyRule->setFrequency(recurrence->frequency());
- QBitArray rDays(7);
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = posns.begin(); it != posns.end(); ++it)
+ TQBitArray rDays(7);
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = posns.begin(); it != posns.end(); ++it)
{
if (!(*it).pos())
rDays.setBit((*it).day() - 1, 1);
@@ -802,7 +802,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::MONTHLY_DAY: // on nth day of the month
{
mRuleButtonGroup->setButton(mMonthlyButtonId);
- QValueList<int> rmd = recurrence->monthDays();
+ TQValueList<int> rmd = recurrence->monthDays();
int day = (rmd.isEmpty()) ? event.mainDate().day() : rmd.first();
mMonthlyRule->setDate(day);
break;
@@ -813,7 +813,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
if (rtype == KARecurrence::ANNUAL_DATE)
{
mRuleButtonGroup->setButton(mYearlyButtonId);
- const QValueList<int> rmd = recurrence->monthDays();
+ const TQValueList<int> rmd = recurrence->monthDays();
int day = (rmd.isEmpty()) ? event.mainDate().day() : rmd.first();
mYearlyRule->setDate(day);
mYearlyRule->setFeb29Type(recurrence->feb29Type());
@@ -821,7 +821,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
else if (rtype == KARecurrence::ANNUAL_POS)
{
mRuleButtonGroup->setButton(mYearlyButtonId);
- QValueList<RecurrenceRule::WDayPos> posns = recurrence->yearPositions();
+ TQValueList<RecurrenceRule::WDayPos> posns = recurrence->yearPositions();
mYearlyRule->setPosition(posns.first().pos(), posns.first().day());
}
mYearlyRule->setMonths(recurrence->yearMonths());
@@ -834,7 +834,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
mRule->setFrequency(recurrence->frequency());
// Get range information
- QDateTime endtime = mCurrStartDateTime;
+ TQDateTime endtime = mCurrStartDateTime;
int duration = recurrence->duration();
if (duration == -1)
mNoEndDateButton->setChecked(true);
@@ -875,8 +875,8 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
{
// Get end date and repeat count, common to all types of recurring events
- QDate endDate;
- QTime endTime;
+ TQDate endDate;
+ TQTime endTime;
int repeatCount;
if (mNoEndDateButton->isChecked())
repeatCount = -1;
@@ -890,12 +890,12 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
}
// Set up the recurrence according to the type selected
- QButton* button = mRuleButtonGroup->selected();
+ TQButton* button = mRuleButtonGroup->selected();
event.setRepeatAtLogin(button == mAtLoginButton);
int frequency = mRule ? mRule->frequency() : 0;
if (button == mSubDailyButton)
{
- QDateTime endDateTime(endDate, endTime);
+ TQDateTime endDateTime(endDate, endTime);
event.setRecurMinutely(frequency, repeatCount, endDateTime);
}
else if (button == mDailyButton)
@@ -915,7 +915,7 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
pos.days.fill(false);
pos.days.setBit(mMonthlyRule->dayOfWeek() - 1);
pos.weeknum = mMonthlyRule->week();
- QValueList<KAEvent::MonthPos> poses;
+ TQValueList<KAEvent::MonthPos> poses;
poses.append(pos);
event.setRecurMonthlyByPos(frequency, poses, repeatCount, endDate);
}
@@ -923,14 +923,14 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
{
// It's by day
int daynum = mMonthlyRule->date();
- QValueList<int> daynums;
+ TQValueList<int> daynums;
daynums.append(daynum);
event.setRecurMonthlyByDate(frequency, daynums, repeatCount, endDate);
}
}
else if (button == mYearlyButton)
{
- QValueList<int> months = mYearlyRule->months();
+ TQValueList<int> months = mYearlyRule->months();
if (mYearlyRule->type() == YearlyRule::POS)
{
// It's by position
@@ -938,7 +938,7 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
pos.days.fill(false);
pos.days.setBit(mYearlyRule->dayOfWeek() - 1);
pos.weeknum = mYearlyRule->week();
- QValueList<KAEvent::MonthPos> poses;
+ TQValueList<KAEvent::MonthPos> poses;
poses.append(pos);
event.setRecurAnnualByPos(frequency, poses, months, repeatCount, endDate);
}
@@ -984,7 +984,7 @@ void RecurrenceEdit::saveState()
if (mSavedRangeButton == mRepeatCountButton)
mSavedRecurCount = mRepeatCountEntry->value();
else if (mSavedRangeButton == mEndDateButton)
- mSavedEndDateTime.set(QDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked());
+ mSavedEndDateTime.set(TQDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked());
mSavedExceptionDates = mExceptionDates;
mSavedRepeatInterval = mSubRepetition->interval();
mSavedRepeatCount = mSubRepetition->count();
@@ -1003,7 +1003,7 @@ bool RecurrenceEdit::stateChanged() const
&& mSavedRecurCount != mRepeatCountEntry->value())
return true;
if (mSavedRangeButton == mEndDateButton
- && mSavedEndDateTime != DateTime(QDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked()))
+ && mSavedEndDateTime != DateTime(TQDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked()))
return true;
if (mSavedExceptionDates != mExceptionDates
|| mSavedRepeatInterval != mSubRepetition->interval()
@@ -1019,16 +1019,16 @@ bool RecurrenceEdit::stateChanged() const
= Base class for rule widgets, including recurrence frequency.
=============================================================================*/
-Rule::Rule(const QString& freqText, const QString& freqWhatsThis, bool time, bool readOnly, QWidget* parent, const char* name)
+Rule::Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly, TQWidget* parent, const char* name)
: NoRule(parent, name)
{
- mLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBox* freqBox = new QHBox(this);
+ mLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBox* freqBox = new TQHBox(this);
mLayout->addWidget(freqBox);
- QHBox* box = new QHBox(freqBox); // this is to control the QWhatsThis text display area
+ TQHBox* box = new TQHBox(freqBox); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Recur e&very"), box);
+ TQLabel* label = new TQLabel(i18n("Recur e&very"), box);
label->setFixedSize(label->sizeHint());
if (time)
{
@@ -1044,14 +1044,14 @@ Rule::Rule(const QString& freqText, const QString& freqWhatsThis, bool time, boo
mIntSpinBox->setFixedSize(mIntSpinBox->sizeHint());
mIntSpinBox->setReadOnly(readOnly);
}
- connect(mSpinBox, SIGNAL(valueChanged(int)), SIGNAL(frequencyChanged()));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(frequencyChanged()));
label->setBuddy(mSpinBox);
- label = new QLabel(freqText, box);
+ label = new TQLabel(freqText, box);
label->setFixedSize(label->sizeHint());
box->setFixedSize(sizeHint());
- QWhatsThis::add(box, freqWhatsThis);
+ TQWhatsThis::add(box, freqWhatsThis);
- new QWidget(freqBox); // left adjust the visible widgets
+ new TQWidget(freqBox); // left adjust the visible widgets
freqBox->setFixedHeight(freqBox->sizeHint().height());
freqBox->setFocusProxy(mSpinBox);
}
@@ -1095,7 +1095,7 @@ bool Rule::stateChanged() const
= Sub-daily rule widget.
=============================================================================*/
-SubDailyRule::SubDailyRule(bool readOnly, QWidget* parent, const char* name)
+SubDailyRule::SubDailyRule(bool readOnly, TQWidget* parent, const char* name)
: Rule(i18n("hours:minutes"),
i18n("Enter the number of hours and minutes between repetitions of the alarm"),
true, readOnly, parent, name)
@@ -1107,23 +1107,23 @@ SubDailyRule::SubDailyRule(bool readOnly, QWidget* parent, const char* name)
= Daily/weekly rule widget base class.
=============================================================================*/
-DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis, const QString& daysWhatsThis,
- bool readOnly, QWidget* parent, const char* name)
+DayWeekRule::DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
+ bool readOnly, TQWidget* parent, const char* name)
: Rule(freqText, freqWhatsThis, false, readOnly, parent, name),
mSavedDays(7)
{
- QGridLayout* grid = new QGridLayout(layout(), 1, 4, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(layout(), 1, 4, KDialog::spacingHint());
grid->setRowStretch(0, 1);
- QLabel* label = new QLabel(i18n("On: Tuesday", "O&n:"), this);
+ TQLabel* label = new TQLabel(i18n("On: Tuesday", "O&n:"), this);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0, Qt::AlignRight | Qt::AlignTop);
grid->addColSpacing(1, KDialog::spacingHint());
// List the days of the week starting at the user's start day of the week.
// Save the first day of the week, just in case it changes while the dialog is open.
- QWidget* box = new QWidget(this); // this is to control the QWhatsThis text display area
- QGridLayout* dgrid = new QGridLayout(box, 4, 2, 0, KDialog::spacingHint());
+ TQWidget* box = new TQWidget(this); // this is to control the TQWhatsThis text display area
+ TQGridLayout* dgrid = new TQGridLayout(box, 4, 2, 0, KDialog::spacingHint());
const KCalendarSystem* calendar = KGlobal::locale()->calendar();
for (int i = 0; i < 7; ++i)
{
@@ -1134,7 +1134,7 @@ DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis,
dgrid->addWidget(mDayBox[i], i%4, i/4, Qt::AlignAuto);
}
box->setFixedSize(box->sizeHint());
- QWhatsThis::add(box, daysWhatsThis);
+ TQWhatsThis::add(box, daysWhatsThis);
grid->addWidget(box, 0, 2, Qt::AlignAuto);
label->setBuddy(mDayBox[0]);
grid->setColStretch(3, 1);
@@ -1143,9 +1143,9 @@ DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis,
/******************************************************************************
* Fetch which days of the week have been ticked.
*/
-QBitArray DayWeekRule::days() const
+TQBitArray DayWeekRule::days() const
{
- QBitArray ds(7);
+ TQBitArray ds(7);
ds.fill(false);
for (int i = 0; i < 7; ++i)
if (mDayBox[i]->isChecked())
@@ -1165,7 +1165,7 @@ void DayWeekRule::setDays(bool tick)
/******************************************************************************
* Tick/untick each day of the week according to the specified bits.
*/
-void DayWeekRule::setDays(const QBitArray& days)
+void DayWeekRule::setDays(const TQBitArray& days)
{
for (int i = 0; i < 7; ++i)
{
@@ -1188,7 +1188,7 @@ void DayWeekRule::setDay(int dayOfWeek)
/******************************************************************************
* Validate: check that at least one day is selected.
*/
-QWidget* DayWeekRule::validate(QString& errorMessage)
+TQWidget* DayWeekRule::validate(TQString& errorMessage)
{
for (int i = 0; i < 7; ++i)
if (mDayBox[i]->isChecked())
@@ -1221,7 +1221,7 @@ bool DayWeekRule::stateChanged() const
= Daily rule widget.
=============================================================================*/
-DailyRule::DailyRule(bool readOnly, QWidget* parent, const char* name)
+DailyRule::DailyRule(bool readOnly, TQWidget* parent, const char* name)
: DayWeekRule(i18n("day(s)"),
i18n("Enter the number of days between repetitions of the alarm"),
i18n("Select the days of the week on which the alarm is allowed to occur"),
@@ -1234,7 +1234,7 @@ DailyRule::DailyRule(bool readOnly, QWidget* parent, const char* name)
= Weekly rule widget.
=============================================================================*/
-WeeklyRule::WeeklyRule(bool readOnly, QWidget* parent, const char* name)
+WeeklyRule::WeeklyRule(bool readOnly, TQWidget* parent, const char* name)
: DayWeekRule(i18n("week(s)"),
i18n("Enter the number of weeks between repetitions of the alarm"),
i18n("Select the days of the week on which to repeat the alarm"),
@@ -1247,8 +1247,8 @@ WeeklyRule::WeeklyRule(bool readOnly, QWidget* parent, const char* name)
= Monthly/yearly rule widget base class.
=============================================================================*/
-MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsThis, bool allowEveryWeek,
- bool readOnly, QWidget* parent, const char* name)
+MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhatsThis, bool allowEveryWeek,
+ bool readOnly, TQWidget* parent, const char* name)
: Rule(freqText, freqWhatsThis, false, readOnly, parent, name),
mEveryWeek(allowEveryWeek)
{
@@ -1256,7 +1256,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mButtonGroup->hide();
// Month day selector
- QHBox* box = new QHBox(this);
+ TQHBox* box = new TQHBox(this);
box->setSpacing(KDialog::spacingHint());
layout()->addWidget(box);
@@ -1264,24 +1264,24 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayButton->setFixedSize(mDayButton->sizeHint());
mDayButton->setReadOnly(readOnly);
mDayButtonId = mButtonGroup->insert(mDayButton);
- QWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month"));
+ TQWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month"));
mDayCombo = new ComboBox(false, box);
mDayCombo->setSizeLimit(11);
for (int i = 0; i < 31; ++i)
- mDayCombo->insertItem(QString::number(i + 1));
+ mDayCombo->insertItem(TQString::number(i + 1));
mDayCombo->insertItem(i18n("Last day of month", "Last"));
mDayCombo->setFixedSize(mDayCombo->sizeHint());
mDayCombo->setReadOnly(readOnly);
- QWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm"));
+ TQWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm"));
mDayButton->setFocusWidget(mDayCombo);
- connect(mDayCombo, SIGNAL(activated(int)), SLOT(slotDaySelected(int)));
+ connect(mDayCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotDaySelected(int)));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
// Month position selector
- box = new QHBox(this);
+ box = new TQHBox(this);
box->setSpacing(KDialog::spacingHint());
layout()->addWidget(box);
@@ -1289,7 +1289,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mPosButton->setFixedSize(mPosButton->sizeHint());
mPosButton->setReadOnly(readOnly);
mPosButtonId = mButtonGroup->insert(mPosButton);
- QWhatsThis::add(mPosButton,
+ TQWhatsThis::add(mPosButton,
i18n("Repeat the alarm on one day of the week, in the selected week of the month"));
mWeekCombo = new ComboBox(false, box);
@@ -1308,7 +1308,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mWeekCombo->insertItem(i18n("Every (Monday...) in month", "Every"));
mWeekCombo->setSizeLimit(11);
}
- QWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm"));
+ TQWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm"));
mWeekCombo->setFixedSize(mWeekCombo->sizeHint());
mWeekCombo->setReadOnly(readOnly);
mPosButton->setFocusWidget(mWeekCombo);
@@ -1321,11 +1321,11 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayOfWeekCombo->insertItem(calendar->weekDayName(day));
}
mDayOfWeekCombo->setReadOnly(readOnly);
- QWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm"));
+ TQWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm"));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
- connect(mButtonGroup, SIGNAL(buttonSet(int)), SLOT(clicked(int)));
+ connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(clicked(int)));
}
MonthYearRule::DayPosType MonthYearRule::type() const
@@ -1438,7 +1438,7 @@ bool MonthYearRule::stateChanged() const
= Monthly rule widget.
=============================================================================*/
-MonthlyRule::MonthlyRule(bool readOnly, QWidget* parent, const char* name)
+MonthlyRule::MonthlyRule(bool readOnly, TQWidget* parent, const char* name)
: MonthYearRule(i18n("month(s)"),
i18n("Enter the number of months between repetitions of the alarm"),
false, readOnly, parent, name)
@@ -1450,23 +1450,23 @@ MonthlyRule::MonthlyRule(bool readOnly, QWidget* parent, const char* name)
= Yearly rule widget.
=============================================================================*/
-YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
+YearlyRule::YearlyRule(bool readOnly, TQWidget* parent, const char* name)
: MonthYearRule(i18n("year(s)"),
i18n("Enter the number of years between repetitions of the alarm"),
true, readOnly, parent, name)
{
// Set up the month selection widgets
- QBoxLayout* hlayout = new QHBoxLayout(layout(), KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("List of months to select", "Months:"), this);
+ TQBoxLayout* hlayout = new TQHBoxLayout(layout(), KDialog::spacingHint());
+ TQLabel* label = new TQLabel(i18n("List of months to select", "Months:"), this);
label->setFixedSize(label->sizeHint());
hlayout->addWidget(label, 0, Qt::AlignAuto | Qt::AlignTop);
// List the months of the year.
- QWidget* w = new QWidget(this); // this is to control the QWhatsThis text display area
+ TQWidget* w = new TQWidget(this); // this is to control the TQWhatsThis text display area
hlayout->addWidget(w, 1, Qt::AlignAuto);
- QGridLayout* grid = new QGridLayout(w, 4, 3, 0, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(w, 4, 3, 0, KDialog::spacingHint());
const KCalendarSystem* calendar = KGlobal::locale()->calendar();
- int year = QDate::currentDate().year();
+ int year = TQDate::currentDate().year();
for (int i = 0; i < 12; ++i)
{
mMonthBox[i] = new CheckBox(calendar->monthName(i + 1, year, true), w);
@@ -1474,16 +1474,16 @@ YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
mMonthBox[i]->setReadOnly(readOnly);
grid->addWidget(mMonthBox[i], i%3, i/3, Qt::AlignAuto);
}
- connect(mMonthBox[1], SIGNAL(toggled(bool)), SLOT(enableFeb29()));
+ connect(mMonthBox[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(enableFeb29()));
w->setFixedHeight(w->sizeHint().height());
- QWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm"));
+ TQWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm"));
// February 29th handling option
- QHBox* f29box = new QHBox(this);
+ TQHBox* f29box = new TQHBox(this);
layout()->addWidget(f29box);
- QHBox* box = new QHBox(f29box); // this is to control the QWhatsThis text display area
+ TQHBox* box = new TQHBox(f29box); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mFeb29Label = new QLabel(i18n("February 2&9th alarm in non-leap years:"), box);
+ mFeb29Label = new TQLabel(i18n("February 2&9th alarm in non-leap years:"), box);
mFeb29Label->setFixedSize(mFeb29Label->sizeHint());
mFeb29Combo = new ComboBox(false, box);
mFeb29Combo->insertItem(i18n("No date", "None"));
@@ -1493,9 +1493,9 @@ YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
mFeb29Combo->setReadOnly(readOnly);
mFeb29Label->setBuddy(mFeb29Combo);
box->setFixedSize(box->sizeHint());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Select which date, if any, the February 29th alarm should trigger in non-leap years"));
- new QWidget(f29box); // left adjust the visible widgets
+ new TQWidget(f29box); // left adjust the visible widgets
f29box->setFixedHeight(f29box->sizeHint().height());
}
@@ -1513,9 +1513,9 @@ void YearlyRule::setDefaultValues(int dayOfMonth, int dayOfWeek, int month)
* Fetch which months have been checked (1 - 12).
* Reply = true if February has been checked.
*/
-QValueList<int> YearlyRule::months() const
+TQValueList<int> YearlyRule::months() const
{
- QValueList<int> mnths;
+ TQValueList<int> mnths;
for (int i = 0; i < 12; ++i)
if (mMonthBox[i]->isChecked() && mMonthBox[i]->isEnabled())
mnths.append(i + 1);
@@ -1525,12 +1525,12 @@ QValueList<int> YearlyRule::months() const
/******************************************************************************
* Check/uncheck each month of the year according to the specified list.
*/
-void YearlyRule::setMonths(const QValueList<int>& mnths)
+void YearlyRule::setMonths(const TQValueList<int>& mnths)
{
bool checked[12];
for (int i = 0; i < 12; ++i)
checked[i] = false;
- for (QValueListConstIterator<int> it = mnths.begin(); it != mnths.end(); ++it)
+ for (TQValueListConstIterator<int> it = mnths.begin(); it != mnths.end(); ++it)
checked[(*it) - 1] = true;
for (int i = 0; i < 12; ++i)
mMonthBox[i]->setChecked(checked[i]);
@@ -1573,7 +1573,7 @@ void YearlyRule::setFeb29Type(KARecurrence::Feb29Type type)
/******************************************************************************
* Validate: check that at least one month is selected.
*/
-QWidget* YearlyRule::validate(QString& errorMessage)
+TQWidget* YearlyRule::validate(TQString& errorMessage)
{
for (int i = 0; i < 12; ++i)
if (mMonthBox[i]->isChecked() && mMonthBox[i]->isEnabled())
diff --git a/kalarm/recurrenceedit.h b/kalarm/recurrenceedit.h
index f366978db..7700877aa 100644
--- a/kalarm/recurrenceedit.h
+++ b/kalarm/recurrenceedit.h
@@ -24,9 +24,9 @@
#ifndef RECURRENCEEDIT_H
#define RECURRENCEEDIT_H
-#include <qframe.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include "datetime.h"
class QWidgetStack;
@@ -60,44 +60,44 @@ class RecurrenceEdit : public QFrame
// Don't alter the order of these recurrence types
enum RepeatType { INVALID_RECUR = -1, NO_RECUR, AT_LOGIN, SUBDAILY, DAILY, WEEKLY, MONTHLY, ANNUAL };
- RecurrenceEdit(bool readOnly, QWidget* parent, const char* name = 0);
+ RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name = 0);
virtual ~RecurrenceEdit() { }
/** Set widgets to default values */
- void setDefaults(const QDateTime& from);
+ void setDefaults(const TQDateTime& from);
/** Initialise according to a specified event */
void set(const KAEvent&, bool keepDuration);
/** Write recurrence settings into an event */
void updateEvent(KAEvent&, bool adjustStart);
- QWidget* checkData(const QDateTime& startDateTime, QString& errorMessage) const;
+ TQWidget* checkData(const TQDateTime& startDateTime, TQString& errorMessage) const;
RepeatType repeatType() const { return mRuleButtonType; }
bool isTimedRepeatType() const { return mRuleButtonType >= SUBDAILY; }
int subRepeatCount(int* subRepeatInterval = 0) const;
void setSubRepetition(int reminderMinutes, bool dateOnly);
- void setStartDate(const QDate&, const QDate& today);
- void setDefaultEndDate(const QDate&);
+ void setStartDate(const TQDate&, const TQDate& today);
+ void setDefaultEndDate(const TQDate&);
void setEndDateTime(const DateTime&);
DateTime endDateTime() const;
bool stateChanged() const;
void activateSubRepetition();
- static QString i18n_Norecur(); // text of 'No recurrence' selection, lower case
- static QString i18n_NoRecur(); // text of 'No Recurrence' selection, initial capitals
- static QString i18n_AtLogin(); // text of 'At Login' selection
- static QString i18n_l_Atlogin(); // text of 'At &login' selection, with 'L' shortcut
- static QString i18n_HourlyMinutely(); // text of 'Hourly/Minutely'
- static QString i18n_u_HourlyMinutely(); // text of 'Ho&urly/Minutely' selection, with 'U' shortcut
- static QString i18n_Daily(); // text of 'Daily' selection
- static QString i18n_d_Daily(); // text of '&Daily' selection, with 'D' shortcut
- static QString i18n_Weekly(); // text of 'Weekly' selection
- static QString i18n_w_Weekly(); // text of '&Weekly' selection, with 'W' shortcut
- static QString i18n_Monthly(); // text of 'Monthly' selection
- static QString i18n_m_Monthly(); // text of '&Monthly' selection, with 'M' shortcut
- static QString i18n_Yearly(); // text of 'Yearly' selection
- static QString i18n_y_Yearly(); // text of '&Yearly' selection, with 'Y' shortcut
+ static TQString i18n_Norecur(); // text of 'No recurrence' selection, lower case
+ static TQString i18n_NoRecur(); // text of 'No Recurrence' selection, initial capitals
+ static TQString i18n_AtLogin(); // text of 'At Login' selection
+ static TQString i18n_l_Atlogin(); // text of 'At &login' selection, with 'L' shortcut
+ static TQString i18n_HourlyMinutely(); // text of 'Hourly/Minutely'
+ static TQString i18n_u_HourlyMinutely(); // text of 'Ho&urly/Minutely' selection, with 'U' shortcut
+ static TQString i18n_Daily(); // text of 'Daily' selection
+ static TQString i18n_d_Daily(); // text of '&Daily' selection, with 'D' shortcut
+ static TQString i18n_Weekly(); // text of 'Weekly' selection
+ static TQString i18n_w_Weekly(); // text of '&Weekly' selection, with 'W' shortcut
+ static TQString i18n_Monthly(); // text of 'Monthly' selection
+ static TQString i18n_m_Monthly(); // text of '&Monthly' selection, with 'M' shortcut
+ static TQString i18n_Yearly(); // text of 'Yearly' selection
+ static TQString i18n_y_Yearly(); // text of '&Yearly' selection, with 'Y' shortcut
public slots:
- void setDateTime(const QDateTime& start) { mCurrStartDateTime = start; }
+ void setDateTime(const TQDateTime& start) { mCurrStartDateTime = start; }
signals:
void shown();
@@ -106,7 +106,7 @@ class RecurrenceEdit : public QFrame
void repeatNeedsInitialisation();
protected:
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
private slots:
void periodClicked(int);
@@ -119,11 +119,11 @@ class RecurrenceEdit : public QFrame
void enableExceptionButtons();
private:
- void setRuleDefaults(const QDate& start);
+ void setRuleDefaults(const TQDate& start);
void saveState();
// Main rule box and choices
- QWidgetStack* mRuleStack;
+ TQWidgetStack* mRuleStack;
Rule* mRule; // current rule widget, or 0 if NoRule
NoRule* mNoRule;
SubDailyRule* mSubDailyRule;
@@ -158,32 +158,32 @@ class RecurrenceEdit : public QFrame
RadioButton* mNoEndDateButton;
RadioButton* mRepeatCountButton;
SpinBox* mRepeatCountEntry;
- QLabel* mRepeatCountLabel;
+ TQLabel* mRepeatCountLabel;
RadioButton* mEndDateButton;
DateEdit* mEndDateEdit;
TimeEdit* mEndTimeEdit;
CheckBox* mEndAnyTimeCheckBox;
// Exceptions
- QGroupBox* mExceptionGroup;
- QListBox* mExceptionDateList;
+ TQGroupBox* mExceptionGroup;
+ TQListBox* mExceptionDateList;
DateEdit* mExceptionDateEdit;
- QPushButton* mChangeExceptionButton;
- QPushButton* mDeleteExceptionButton;
- QValueList<QDate> mExceptionDates;
+ TQPushButton* mChangeExceptionButton;
+ TQPushButton* mDeleteExceptionButton;
+ TQValueList<TQDate> mExceptionDates;
// Current start date and time
- QDateTime mCurrStartDateTime;
+ TQDateTime mCurrStartDateTime;
RepetitionButton* mSubRepetition;
bool mNoEmitTypeChanged; // suppress typeChanged() signal
bool mReadOnly;
// Initial state of non-rule controls
- QButton* mSavedRuleButton; // which rule button was selected
- QButton* mSavedRangeButton; // which range button was selected
+ TQButton* mSavedRuleButton; // which rule button was selected
+ TQButton* mSavedRangeButton; // which range button was selected
int mSavedRecurCount; // recurrence repeat count
DateTime mSavedEndDateTime; // end date/time
- QValueList<QDate> mSavedExceptionDates; // exception dates
+ TQValueList<TQDate> mSavedExceptionDates; // exception dates
int mSavedRepeatInterval; // sub-repetition interval (via mSubRepetition button)
int mSavedRepeatCount; // sub-repetition count (via mSubRepetition button)
};
diff --git a/kalarm/recurrenceeditprivate.h b/kalarm/recurrenceeditprivate.h
index 1210f95c6..b9a1fced5 100644
--- a/kalarm/recurrenceeditprivate.h
+++ b/kalarm/recurrenceeditprivate.h
@@ -21,9 +21,9 @@
#ifndef RECURRENCEEDITPRIVATE_H
#define RECURRENCEEDITPRIVATE_H
-#include <qframe.h>
-#include <qvaluelist.h>
-#include <qbitarray.h>
+#include <tqframe.h>
+#include <tqvaluelist.h>
+#include <tqbitarray.h>
class QWidget;
class QVBoxLayout;
@@ -39,8 +39,8 @@ class QString;
class NoRule : public QFrame
{
public:
- NoRule(QWidget* parent, const char* name = 0) : QFrame(parent, name)
- { setFrameStyle(QFrame::NoFrame); }
+ NoRule(TQWidget* parent, const char* name = 0) : TQFrame(parent, name)
+ { setFrameStyle(TQFrame::NoFrame); }
virtual int frequency() const { return 0; }
};
@@ -48,22 +48,22 @@ class Rule : public NoRule
{
Q_OBJECT
public:
- Rule(const QString& freqText, const QString& freqWhatsThis, bool time, bool readOnly,
- QWidget* parent, const char* name = 0);
+ Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly,
+ TQWidget* parent, const char* name = 0);
int frequency() const;
void setFrequency(int);
virtual void setFrequencyFocus() { mSpinBox->setFocus(); }
- QVBoxLayout* layout() const { return mLayout; }
- virtual QWidget* validate(QString&) { return 0; }
+ TQVBoxLayout* layout() const { return mLayout; }
+ virtual TQWidget* validate(TQString&) { return 0; }
virtual void saveState();
virtual bool stateChanged() const;
signals:
void frequencyChanged();
private:
- QWidget* mSpinBox;
+ TQWidget* mSpinBox;
SpinBox* mIntSpinBox;
TimeSpinBox* mTimeSpinBox;
- QVBoxLayout* mLayout;
+ TQVBoxLayout* mLayout;
// Saved state of all controls
int mSavedFrequency; // frequency for the selected rule
};
@@ -73,7 +73,7 @@ class SubDailyRule : public Rule
{
Q_OBJECT
public:
- SubDailyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ SubDailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Daily/weekly rule choices base class
@@ -81,33 +81,33 @@ class DayWeekRule : public Rule
{
Q_OBJECT
public:
- DayWeekRule(const QString& freqText, const QString& freqWhatsThis, const QString& daysWhatsThis,
- bool readOnly, QWidget* parent, const char* name = 0);
- QBitArray days() const;
+ DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
+ bool readOnly, TQWidget* parent, const char* name = 0);
+ TQBitArray days() const;
void setDays(bool);
- void setDays(const QBitArray& days);
+ void setDays(const TQBitArray& days);
void setDay(int dayOfWeek);
- virtual QWidget* validate(QString& errorMessage);
+ virtual TQWidget* validate(TQString& errorMessage);
virtual void saveState();
virtual bool stateChanged() const;
private:
CheckBox* mDayBox[7];
// Saved state of all controls
- QBitArray mSavedDays; // ticked days for weekly rule
+ TQBitArray mSavedDays; // ticked days for weekly rule
};
// Daily rule choices
class DailyRule : public DayWeekRule
{
public:
- DailyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ DailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Weekly rule choices
class WeeklyRule : public DayWeekRule
{
public:
- WeeklyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ WeeklyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Monthly/yearly rule choices base class
@@ -117,8 +117,8 @@ class MonthYearRule : public Rule
public:
enum DayPosType { DATE, POS };
- MonthYearRule(const QString& freqText, const QString& freqWhatsThis, bool allowEveryWeek,
- bool readOnly, QWidget* parent, const char* name = 0);
+ MonthYearRule(const TQString& freqText, const TQString& freqWhatsThis, bool allowEveryWeek,
+ bool readOnly, TQWidget* parent, const char* name = 0);
DayPosType type() const;
int date() const; // if date in month is selected
int week() const; // if position is selected
@@ -161,7 +161,7 @@ class MonthYearRule : public Rule
class MonthlyRule : public MonthYearRule
{
public:
- MonthlyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ MonthlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Yearly rule choices
@@ -169,13 +169,13 @@ class YearlyRule : public MonthYearRule
{
Q_OBJECT
public:
- YearlyRule(bool readOnly, QWidget* parent, const char* name = 0);
- QValueList<int> months() const;
- void setMonths(const QValueList<int>& months);
+ YearlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+ TQValueList<int> months() const;
+ void setMonths(const TQValueList<int>& months);
void setDefaultValues(int dayOfMonth, int dayOfWeek, int month);
KARecurrence::Feb29Type feb29Type() const;
void setFeb29Type(KARecurrence::Feb29Type);
- virtual QWidget* validate(QString& errorMessage);
+ virtual TQWidget* validate(TQString& errorMessage);
virtual void saveState();
virtual bool stateChanged() const;
protected:
@@ -186,10 +186,10 @@ class YearlyRule : public MonthYearRule
void enableFeb29();
private:
CheckBox* mMonthBox[12];
- QLabel* mFeb29Label;
+ TQLabel* mFeb29Label;
ComboBox* mFeb29Combo;
// Saved state of all controls
- QValueList<int> mSavedMonths; // ticked months for yearly rule
+ TQValueList<int> mSavedMonths; // ticked months for yearly rule
int mSavedFeb29Type; // February 29th recurrence type
};
diff --git a/kalarm/reminder.cpp b/kalarm/reminder.cpp
index f31a2d0dd..60c603368 100644
--- a/kalarm/reminder.cpp
+++ b/kalarm/reminder.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -36,32 +36,32 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString Reminder::i18n_first_recurrence_only() { return i18n("Reminder for first recurrence only"); }
-QString Reminder::i18n_u_first_recurrence_only() { return i18n("Reminder for first rec&urrence only"); }
+TQString Reminder::i18n_first_recurrence_only() { return i18n("Reminder for first recurrence only"); }
+TQString Reminder::i18n_u_first_recurrence_only() { return i18n("Reminder for first rec&urrence only"); }
-Reminder::Reminder(const QString& caption, const QString& reminderWhatsThis, const QString& valueWhatsThis,
- bool allowHourMinute, bool showOnceOnly, QWidget* parent, const char* name)
- : QFrame(parent, name),
+Reminder::Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
+ bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReadOnly(false),
mOnceOnlyEnabled(showOnceOnly)
{
- setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
mTime = new TimeSelector(caption, i18n("in advance"), reminderWhatsThis,
valueWhatsThis, allowHourMinute, this, "timeOption");
mTime->setFixedSize(mTime->sizeHint());
- connect(mTime, SIGNAL(toggled(bool)), SLOT(slotReminderToggled(bool)));
+ connect(mTime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotReminderToggled(bool)));
topLayout->addWidget(mTime);
if (showOnceOnly)
{
- QBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
layout->addSpacing(3*KDialog::spacingHint());
mOnceOnly = new CheckBox(i18n_u_first_recurrence_only(), this);
mOnceOnly->setFixedSize(mOnceOnly->sizeHint());
- QWhatsThis::add(mOnceOnly, i18n("Display the reminder only before the first time the alarm is scheduled"));
+ TQWhatsThis::add(mOnceOnly, i18n("Display the reminder only before the first time the alarm is scheduled"));
layout->addWidget(mOnceOnly);
layout->addStretch();
}
diff --git a/kalarm/reminder.h b/kalarm/reminder.h
index 1403621d2..2470a0c3d 100644
--- a/kalarm/reminder.h
+++ b/kalarm/reminder.h
@@ -21,7 +21,7 @@
#ifndef REMINDER_H
#define REMINDER_H
-#include <qframe.h>
+#include <tqframe.h>
class TimeSelector;
class CheckBox;
@@ -31,8 +31,8 @@ class Reminder : public QFrame
{
Q_OBJECT
public:
- Reminder(const QString& caption, const QString& reminderWhatsThis, const QString& valueWhatsThis,
- bool allowHourMinute, bool showOnceOnly, QWidget* parent, const char* name = 0);
+ Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
+ bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name = 0);
bool isReminder() const;
bool isOnceOnly() const;
int minutes() const;
@@ -44,8 +44,8 @@ class Reminder : public QFrame
void setOnceOnly(bool);
void enableOnceOnly(bool enable);
- static QString i18n_first_recurrence_only(); // plain text of 'Reminder for first recurrence only' checkbox
- static QString i18n_u_first_recurrence_only(); // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
+ static TQString i18n_first_recurrence_only(); // plain text of 'Reminder for first recurrence only' checkbox
+ static TQString i18n_u_first_recurrence_only(); // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
protected slots:
void slotReminderToggled(bool);
diff --git a/kalarm/repetition.cpp b/kalarm/repetition.cpp
index dc6613ee8..2df201300 100644
--- a/kalarm/repetition.cpp
+++ b/kalarm/repetition.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -40,8 +40,8 @@
= Button to display the Alarm Sub-Repetition dialogue.
=============================================================================*/
-RepetitionButton::RepetitionButton(const QString& caption, bool waitForInitialisation, QWidget* parent, const char* name)
- : QPushButton(caption, parent, name),
+RepetitionButton::RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name)
+ : TQPushButton(caption, parent, name),
mDialog(0),
mInterval(0),
mCount(0),
@@ -52,7 +52,7 @@ RepetitionButton::RepetitionButton(const QString& caption, bool waitForInitialis
{
setToggleButton(true);
setOn(false);
- connect(this, SIGNAL(clicked()), SLOT(slotPressed()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotPressed()));
}
void RepetitionButton::set(int interval, int count)
@@ -127,7 +127,7 @@ void RepetitionButton::displayDialog()
mDialog->setReadOnly(true);
mDialog->exec();
}
- else if (mDialog->exec() == QDialog::Accepted)
+ else if (mDialog->exec() == TQDialog::Accepted)
{
mCount = mDialog->count();
mInterval = mDialog->interval();
@@ -149,59 +149,59 @@ void RepetitionButton::displayDialog()
static const int MAX_COUNT = 9999; // maximum range for count spinbox
-RepetitionDlg::RepetitionDlg(const QString& caption, bool readOnly, QWidget* parent, const char* name)
+RepetitionDlg::RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel),
mMaxDuration(-1),
mDateOnly(false),
mReadOnly(readOnly)
{
int spacing = spacingHint();
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* topLayout = new QVBoxLayout(page, 0, spacing);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(page, 0, spacing);
- mTimeSelector = new TimeSelector(i18n("Repeat every 10 minutes", "&Repeat every"), QString::null,
+ mTimeSelector = new TimeSelector(i18n("Repeat every 10 minutes", "&Repeat every"), TQString::null,
i18n("Instead of the alarm triggering just once at each recurrence, "
"checking this option makes the alarm trigger multiple times at each recurrence."),
i18n("Enter the time between repetitions of the alarm"),
true, page);
mTimeSelector->setFixedSize(mTimeSelector->sizeHint());
- connect(mTimeSelector, SIGNAL(valueChanged(int)), SLOT(intervalChanged(int)));
- connect(mTimeSelector, SIGNAL(toggled(bool)), SLOT(repetitionToggled(bool)));
+ connect(mTimeSelector, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(intervalChanged(int)));
+ connect(mTimeSelector, TQT_SIGNAL(toggled(bool)), TQT_SLOT(repetitionToggled(bool)));
topLayout->addWidget(mTimeSelector, 0, Qt::AlignAuto);
mButtonGroup = new ButtonGroup(page, "buttonGroup");
- connect(mButtonGroup, SIGNAL(buttonSet(int)), SLOT(typeClicked()));
+ connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(typeClicked()));
topLayout->addWidget(mButtonGroup);
- QBoxLayout* vlayout = new QVBoxLayout(mButtonGroup, marginHint(), spacing);
- QBoxLayout* layout = new QHBoxLayout(vlayout, spacing);
+ TQBoxLayout* vlayout = new TQVBoxLayout(mButtonGroup, marginHint(), spacing);
+ TQBoxLayout* layout = new TQHBoxLayout(vlayout, spacing);
mCountButton = new RadioButton(i18n("&Number of repetitions:"), mButtonGroup);
mCountButton->setFixedSize(mCountButton->sizeHint());
- QWhatsThis::add(mCountButton,
+ TQWhatsThis::add(mCountButton,
i18n("Check to specify the number of times the alarm should repeat after each recurrence"));
layout->addWidget(mCountButton);
mCount = new SpinBox(1, MAX_COUNT, 1, mButtonGroup);
mCount->setFixedSize(mCount->sizeHint());
mCount->setLineShiftStep(10);
mCount->setSelectOnStep(false);
- connect(mCount, SIGNAL(valueChanged(int)), SLOT(countChanged(int)));
- QWhatsThis::add(mCount,
+ connect(mCount, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(countChanged(int)));
+ TQWhatsThis::add(mCount,
i18n("Enter the number of times to trigger the alarm after its initial occurrence"));
layout->addWidget(mCount);
mCountButton->setFocusWidget(mCount);
layout->addStretch();
- layout = new QHBoxLayout(vlayout, spacing);
+ layout = new TQHBoxLayout(vlayout, spacing);
mDurationButton = new RadioButton(i18n("&Duration:"), mButtonGroup);
mDurationButton->setFixedSize(mDurationButton->sizeHint());
- QWhatsThis::add(mDurationButton,
+ TQWhatsThis::add(mDurationButton,
i18n("Check to specify how long the alarm is to be repeated"));
layout->addWidget(mDurationButton);
mDuration = new TimePeriod(true, mButtonGroup);
mDuration->setFixedSize(mDuration->sizeHint());
- connect(mDuration, SIGNAL(valueChanged(int)), SLOT(durationChanged(int)));
- QWhatsThis::add(mDuration,
+ connect(mDuration, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(durationChanged(int)));
+ TQWhatsThis::add(mDuration,
i18n("Enter the length of time to repeat the alarm"));
layout->addWidget(mDuration);
mDurationButton->setFocusWidget(mDuration);
diff --git a/kalarm/repetition.h b/kalarm/repetition.h
index 64837b875..c8a32ce88 100644
--- a/kalarm/repetition.h
+++ b/kalarm/repetition.h
@@ -21,7 +21,7 @@
#ifndef REPETITION_H
#define REPETITION_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdialogbase.h>
class ButtonGroup;
@@ -36,7 +36,7 @@ class RepetitionButton : public QPushButton
{
Q_OBJECT
public:
- RepetitionButton(const QString& caption, bool waitForInitialisation, QWidget* parent, const char* name = 0);
+ RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name = 0);
void set(int interval, int count);
void set(int interval, int count, bool dateOnly, int maxDuration = -1);
void initialise(int interval, int count, bool dateOnly, int maxDuration = -1); // use only after needsInitialisation() signal
@@ -71,7 +71,7 @@ class RepetitionDlg : public KDialogBase
{
Q_OBJECT
public:
- RepetitionDlg(const QString& caption, bool readOnly, QWidget* parent = 0, const char* name = 0);
+ RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* parent = 0, const char* name = 0);
void setReadOnly(bool);
void set(int interval, int count, bool dateOnly = false, int maxDuration = -1);
int interval() const; // get the interval between repetitions, in minutes
diff --git a/kalarm/sounddlg.cpp b/kalarm/sounddlg.cpp
index fe1df0bad..2df7542b1 100644
--- a/kalarm/sounddlg.cpp
+++ b/kalarm/sounddlg.cpp
@@ -22,14 +22,14 @@
#include "kalarm.h"
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -37,7 +37,7 @@
#ifdef WITHOUT_ARTS
#include <kaudioplayer.h>
#else
-#include <qtimer.h>
+#include <tqtimer.h>
#include <arts/kartsdispatcher.h>
#include <arts/kartsserver.h>
#include <arts/kplayobjectfactory.h>
@@ -60,123 +60,123 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString SoundDlg::i18n_SetVolume() { return i18n("Set volume"); }
-QString SoundDlg::i18n_v_SetVolume() { return i18n("Set &volume"); }
-QString SoundDlg::i18n_Repeat() { return i18n("Repeat"); }
-QString SoundDlg::i18n_p_Repeat() { return i18n("Re&peat"); }
+TQString SoundDlg::i18n_SetVolume() { return i18n("Set volume"); }
+TQString SoundDlg::i18n_v_SetVolume() { return i18n("Set &volume"); }
+TQString SoundDlg::i18n_Repeat() { return i18n("Repeat"); }
+TQString SoundDlg::i18n_p_Repeat() { return i18n("Re&peat"); }
static const char SOUND_DIALOG_NAME[] = "SoundDialog";
-SoundDlg::SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
- const QString& caption, QWidget* parent, const char* name)
+SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
+ const TQString& caption, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false),
mReadOnly(false),
mArtsDispatcher(0),
mPlayObject(0),
mPlayTimer(0)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
// File play button
- QHBox* box = new QHBox(page);
+ TQHBox* box = new TQHBox(page);
layout->addWidget(box);
- mFilePlay = new QPushButton(box);
+ mFilePlay = new TQPushButton(box);
mFilePlay->setPixmap(SmallIcon("player_play"));
mFilePlay->setFixedSize(mFilePlay->sizeHint());
- connect(mFilePlay, SIGNAL(clicked()), SLOT(playSound()));
- QToolTip::add(mFilePlay, i18n("Test the sound"));
- QWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
+ connect(mFilePlay, TQT_SIGNAL(clicked()), TQT_SLOT(playSound()));
+ TQToolTip::add(mFilePlay, i18n("Test the sound"));
+ TQWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
// File name edit box
mFileEdit = new LineEdit(LineEdit::Url, box);
mFileEdit->setAcceptDrops(true);
- QWhatsThis::add(mFileEdit, i18n("Enter the name or URL of a sound file to play."));
+ TQWhatsThis::add(mFileEdit, i18n("Enter the name or URL of a sound file to play."));
// File browse button
mFileBrowseButton = new PushButton(box);
mFileBrowseButton->setPixmap(SmallIcon("fileopen"));
mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint());
- connect(mFileBrowseButton, SIGNAL(clicked()), SLOT(slotPickFile()));
- QToolTip::add(mFileBrowseButton, i18n("Choose a file"));
- QWhatsThis::add(mFileBrowseButton, i18n("Select a sound file to play."));
+ connect(mFileBrowseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
+ TQToolTip::add(mFileBrowseButton, i18n("Choose a file"));
+ TQWhatsThis::add(mFileBrowseButton, i18n("Select a sound file to play."));
// Sound repetition checkbox
mRepeatCheckbox = new CheckBox(i18n_p_Repeat(), page);
mRepeatCheckbox->setFixedSize(mRepeatCheckbox->sizeHint());
- QWhatsThis::add(mRepeatCheckbox,
+ TQWhatsThis::add(mRepeatCheckbox,
i18n("If checked, the sound file will be played repeatedly for as long as the message is displayed."));
layout->addWidget(mRepeatCheckbox);
// Volume
- QGroupBox* group = new QGroupBox(i18n("Volume"), page);
+ TQGroupBox* group = new TQGroupBox(i18n("Volume"), page);
layout->addWidget(group);
- QGridLayout* grid = new QGridLayout(group, 4, 3, marginHint(), spacingHint());
+ TQGridLayout* grid = new TQGridLayout(group, 4, 3, marginHint(), spacingHint());
grid->addRowSpacing(0, fontMetrics().height() - marginHint() + spacingHint());
grid->setColStretch(2, 1);
int indentWidth = 3 * KDialog::spacingHint();
grid->addColSpacing(0, indentWidth);
grid->addColSpacing(1, indentWidth);
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
// 'Set volume' checkbox
- box = new QHBox(group);
+ box = new TQHBox(group);
box->setSpacing(spacingHint());
grid->addMultiCellWidget(box, 1, 1, 0, 2);
mVolumeCheckbox = new CheckBox(i18n_v_SetVolume(), box);
mVolumeCheckbox->setFixedSize(mVolumeCheckbox->sizeHint());
- connect(mVolumeCheckbox, SIGNAL(toggled(bool)), SLOT(slotVolumeToggled(bool)));
- QWhatsThis::add(mVolumeCheckbox,
+ connect(mVolumeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotVolumeToggled(bool)));
+ TQWhatsThis::add(mVolumeCheckbox,
i18n("Select to choose the volume for playing the sound file."));
// Volume slider
mVolumeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, box);
- mVolumeSlider->setTickmarks(QSlider::Below);
+ mVolumeSlider->setTickmarks(TQSlider::Below);
mVolumeSlider->setTickInterval(10);
- mVolumeSlider->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- QWhatsThis::add(mVolumeSlider, i18n("Choose the volume for playing the sound file."));
+ mVolumeSlider->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
+ TQWhatsThis::add(mVolumeSlider, i18n("Choose the volume for playing the sound file."));
mVolumeCheckbox->setFocusWidget(mVolumeSlider);
// Fade checkbox
mFadeCheckbox = new CheckBox(i18n("Fade"), group);
mFadeCheckbox->setFixedSize(mFadeCheckbox->sizeHint());
- connect(mFadeCheckbox, SIGNAL(toggled(bool)), SLOT(slotFadeToggled(bool)));
- QWhatsThis::add(mFadeCheckbox,
+ connect(mFadeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFadeToggled(bool)));
+ TQWhatsThis::add(mFadeCheckbox,
i18n("Select to fade the volume when the sound file first starts to play."));
grid->addMultiCellWidget(mFadeCheckbox, 2, 2, 1, 2, alignment);
// Fade time
- mFadeBox = new QHBox(group);
+ mFadeBox = new TQHBox(group);
mFadeBox->setSpacing(spacingHint());
grid->addWidget(mFadeBox, 3, 2, alignment);
- QLabel* label = new QLabel(i18n("Time period over which to fade the sound", "Fade time:"), mFadeBox);
+ TQLabel* label = new TQLabel(i18n("Time period over which to fade the sound", "Fade time:"), mFadeBox);
label->setFixedSize(label->sizeHint());
mFadeTime = new SpinBox(1, 999, 1, mFadeBox);
mFadeTime->setLineShiftStep(10);
mFadeTime->setFixedSize(mFadeTime->sizeHint());
label->setBuddy(mFadeTime);
- label = new QLabel(i18n("seconds"), mFadeBox);
+ label = new TQLabel(i18n("seconds"), mFadeBox);
label->setFixedSize(label->sizeHint());
- QWhatsThis::add(mFadeBox, i18n("Enter how many seconds to fade the sound before reaching the set volume."));
+ TQWhatsThis::add(mFadeBox, i18n("Enter how many seconds to fade the sound before reaching the set volume."));
// Fade slider
- mFadeVolumeBox = new QHBox(group);
+ mFadeVolumeBox = new TQHBox(group);
mFadeVolumeBox->setSpacing(spacingHint());
grid->addWidget(mFadeVolumeBox, 4, 2);
- label = new QLabel(i18n("Initial volume:"), mFadeVolumeBox);
+ label = new TQLabel(i18n("Initial volume:"), mFadeVolumeBox);
label->setFixedSize(label->sizeHint());
mFadeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, mFadeVolumeBox);
- mFadeSlider->setTickmarks(QSlider::Below);
+ mFadeSlider->setTickmarks(TQSlider::Below);
mFadeSlider->setTickInterval(10);
- mFadeSlider->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ mFadeSlider->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
label->setBuddy(mFadeSlider);
- QWhatsThis::add(mFadeVolumeBox, i18n("Choose the initial volume for playing the sound file."));
+ TQWhatsThis::add(mFadeVolumeBox, i18n("Choose the initial volume for playing the sound file."));
// Restore the dialogue size from last time
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(SOUND_DIALOG_NAME, s))
resize(s);
@@ -241,7 +241,7 @@ bool SoundDlg::getSettings(float& volume, float& fadeVolume, int& fadeSeconds) c
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void SoundDlg::resizeEvent(QResizeEvent* re)
+void SoundDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(SOUND_DIALOG_NAME, re->size());
@@ -249,7 +249,7 @@ void SoundDlg::resizeEvent(QResizeEvent* re)
KDialog::resizeEvent(re);
}
-void SoundDlg::showEvent(QShowEvent* se)
+void SoundDlg::showEvent(TQShowEvent* se)
{
mVolumeSlider->resize(mFadeSlider->size());
KDialog::showEvent(se);
@@ -272,7 +272,7 @@ void SoundDlg::slotOk()
*/
void SoundDlg::slotPickFile()
{
- QString url = SoundPicker::browseFile(mDefaultDir, mFileEdit->text());
+ TQString url = SoundPicker::browseFile(mDefaultDir, mFileEdit->text());
if (!url.isEmpty())
mFileEdit->setText(url);
}
@@ -284,7 +284,7 @@ void SoundDlg::playSound()
{
#ifdef WITHOUT_ARTS
if (checkFile())
- KAudioPlayer::play(QFile::encodeName(mFileName));
+ KAudioPlayer::play(TQFile::encodeName(mFileName));
#else
if (mPlayObject)
{
@@ -302,8 +302,8 @@ void SoundDlg::playSound()
KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mFileName));
return;
}
- mPlayTimer = new QTimer(this);
- connect(mPlayTimer, SIGNAL(timeout()), SLOT(checkAudioPlay()));
+ mPlayTimer = new TQTimer(this);
+ connect(mPlayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAudioPlay()));
mArtsDispatcher = new KArtsDispatcher;
mPlayStarted = false;
KArtsServer aserver;
@@ -311,9 +311,9 @@ void SoundDlg::playSound()
KDE::PlayObjectFactory factory(sserver);
mPlayObject = factory.createPlayObject(mLocalAudioFile, true);
mFilePlay->setPixmap(SmallIcon("player_stop"));
- QToolTip::add(mFilePlay, i18n("Stop sound"));
- QWhatsThis::add(mFilePlay, i18n("Stop playing the sound"));
- connect(mPlayObject, SIGNAL(playObjectCreated()), SLOT(checkAudioPlay()));
+ TQToolTip::add(mFilePlay, i18n("Stop sound"));
+ TQWhatsThis::add(mFilePlay, i18n("Stop playing the sound"));
+ connect(mPlayObject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(checkAudioPlay()));
if (!mPlayObject->object().isNull())
checkAudioPlay();
#endif
@@ -370,11 +370,11 @@ void SoundDlg::stopPlay()
if (!mLocalAudioFile.isEmpty())
{
KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
- mLocalAudioFile = QString::null;
+ mLocalAudioFile = TQString::null;
}
mFilePlay->setPixmap(SmallIcon("player_play"));
- QToolTip::add(mFilePlay, i18n("Test the sound"));
- QWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
+ TQToolTip::add(mFilePlay, i18n("Test the sound"));
+ TQWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
#endif
}
@@ -389,7 +389,7 @@ bool SoundDlg::checkFile()
if (KURL::isRelativeURL(mFileName))
{
// It's not an absolute URL, so check for an absolute path
- QFileInfo f(mFileName);
+ TQFileInfo f(mFileName);
if (!f.isRelative())
url.setPath(mFileName);
}
@@ -413,12 +413,12 @@ bool SoundDlg::checkFile()
{
// It's a relative path.
// Find the first sound resource that contains files.
- QStringList soundDirs = KGlobal::dirs()->resourceDirs("sound");
+ TQStringList soundDirs = KGlobal::dirs()->resourceDirs("sound");
if (!soundDirs.isEmpty())
{
- QDir dir;
- dir.setFilter(QDir::Files | QDir::Readable);
- for (QStringList::ConstIterator it = soundDirs.begin(); it != soundDirs.end(); ++it)
+ TQDir dir;
+ dir.setFilter(TQDir::Files | TQDir::Readable);
+ for (TQStringList::ConstIterator it = soundDirs.begin(); it != soundDirs.end(); ++it)
{
dir = *it;
if (dir.isReadable() && dir.count() > 2)
@@ -433,7 +433,7 @@ bool SoundDlg::checkFile()
}
}
}
- url.setPath(QDir::homeDirPath());
+ url.setPath(TQDir::homeDirPath());
url.addPath(mFileName);
if (KIO::NetAccess::exists(url, true, this))
{
@@ -443,7 +443,7 @@ bool SoundDlg::checkFile()
}
#ifdef WITHOUT_ARTS
KMessageBox::sorry(this, i18n("File not found"));
- mFileName = QString::null;
+ mFileName = TQString::null;
return false;
#else
return true;
diff --git a/kalarm/sounddlg.h b/kalarm/sounddlg.h
index ee4273b5d..6bca01d16 100644
--- a/kalarm/sounddlg.h
+++ b/kalarm/sounddlg.h
@@ -21,8 +21,8 @@
#ifndef SOUNDDLG_H
#define SOUNDDLG_H
-#include <qframe.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqstring.h>
#include <kdialogbase.h>
class QHBox;
@@ -40,23 +40,23 @@ class SoundDlg : public KDialogBase
{
Q_OBJECT
public:
- SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
- const QString& caption, QWidget* parent, const char* name = 0);
+ SoundDlg(const TQString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
+ const TQString& caption, TQWidget* parent, const char* name = 0);
~SoundDlg();
void setReadOnly(bool);
bool isReadOnly() const { return mReadOnly; }
- QString getFile() const { return mFileName; }
+ TQString getFile() const { return mFileName; }
bool getSettings(float& volume, float& fadeVolume, int& fadeSeconds) const;
- QString defaultDir() const { return mDefaultDir; }
+ TQString defaultDir() const { return mDefaultDir; }
- static QString i18n_SetVolume(); // plain text of Set volume checkbox
- static QString i18n_v_SetVolume(); // text of Set volume checkbox, with 'V' shortcut
- static QString i18n_Repeat(); // plain text of Repeat checkbox
- static QString i18n_p_Repeat(); // text of Repeat checkbox, with 'P' shortcut
+ static TQString i18n_SetVolume(); // plain text of Set volume checkbox
+ static TQString i18n_v_SetVolume(); // text of Set volume checkbox, with 'V' shortcut
+ static TQString i18n_Repeat(); // plain text of Repeat checkbox
+ static TQString i18n_p_Repeat(); // text of Repeat checkbox, with 'P' shortcut
protected:
- virtual void showEvent(QShowEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
protected slots:
virtual void slotOk();
@@ -72,25 +72,25 @@ class SoundDlg : public KDialogBase
void stopPlay();
bool checkFile();
- QPushButton* mFilePlay;
+ TQPushButton* mFilePlay;
LineEdit* mFileEdit;
PushButton* mFileBrowseButton;
CheckBox* mRepeatCheckbox;
CheckBox* mVolumeCheckbox;
Slider* mVolumeSlider;
CheckBox* mFadeCheckbox;
- QHBox* mFadeBox;
+ TQHBox* mFadeBox;
SpinBox* mFadeTime;
- QHBox* mFadeVolumeBox;
+ TQHBox* mFadeVolumeBox;
Slider* mFadeSlider;
- QString mDefaultDir; // current default directory for mFileEdit
- QString mFileName;
+ TQString mDefaultDir; // current default directory for mFileEdit
+ TQString mFileName;
bool mReadOnly;
// Sound file playing
KArtsDispatcher* mArtsDispatcher;
KDE::PlayObject* mPlayObject;
- QTimer* mPlayTimer; // timer for playing the sound file
- QString mLocalAudioFile; // local copy of audio file
+ TQTimer* mPlayTimer; // timer for playing the sound file
+ TQString mLocalAudioFile; // local copy of audio file
bool mPlayStarted; // the sound file has started playing
};
diff --git a/kalarm/soundpicker.cpp b/kalarm/soundpicker.cpp
index 0e0626de9..cd40a778f 100644
--- a/kalarm/soundpicker.cpp
+++ b/kalarm/soundpicker.cpp
@@ -20,13 +20,13 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -48,22 +48,22 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString SoundPicker::i18n_Sound() { return i18n("An audio sound", "Sound"); }
-QString SoundPicker::i18n_None() { return i18n("None"); }
-QString SoundPicker::i18n_Beep() { return i18n("Beep"); }
-QString SoundPicker::i18n_Speak() { return i18n("Speak"); }
-QString SoundPicker::i18n_File() { return i18n("Sound file"); }
+TQString SoundPicker::i18n_Sound() { return i18n("An audio sound", "Sound"); }
+TQString SoundPicker::i18n_None() { return i18n("None"); }
+TQString SoundPicker::i18n_Beep() { return i18n("Beep"); }
+TQString SoundPicker::i18n_Speak() { return i18n("Speak"); }
+TQString SoundPicker::i18n_File() { return i18n("Sound file"); }
-SoundPicker::SoundPicker(QWidget* parent, const char* name)
- : QFrame(parent, name)
+SoundPicker::SoundPicker(TQWidget* parent, const char* name)
+ : TQFrame(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- QHBoxLayout* soundLayout = new QHBoxLayout(this, 0, KDialog::spacingHint());
- mTypeBox = new QHBox(this); // this is to control the QWhatsThis text display area
+ setFrameStyle(TQFrame::NoFrame);
+ TQHBoxLayout* soundLayout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+ mTypeBox = new TQHBox(this); // this is to control the TQWhatsThis text display area
mTypeBox->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("An audio sound", "&Sound:"), mTypeBox);
+ TQLabel* label = new TQLabel(i18n("An audio sound", "&Sound:"), mTypeBox);
label->setFixedSize(label->sizeHint());
// Sound type combo box
@@ -74,7 +74,7 @@ SoundPicker::SoundPicker(QWidget* parent, const char* name)
mTypeCombo->insertItem(i18n_File()); // index PLAY_FILE
mSpeakShowing = !theApp()->speechEnabled();
showSpeak(!mSpeakShowing); // index SPEAK (only displayed if appropriate)
- connect(mTypeCombo, SIGNAL(activated(int)), SLOT(slotTypeSelected(int)));
+ connect(mTypeCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeSelected(int)));
label->setBuddy(mTypeCombo);
soundLayout->addWidget(mTypeBox);
@@ -82,9 +82,9 @@ SoundPicker::SoundPicker(QWidget* parent, const char* name)
mFilePicker = new PushButton(this);
mFilePicker->setPixmap(SmallIcon("playsound"));
mFilePicker->setFixedSize(mFilePicker->sizeHint());
- connect(mFilePicker, SIGNAL(clicked()), SLOT(slotPickFile()));
- QToolTip::add(mFilePicker, i18n("Configure sound file"));
- QWhatsThis::add(mFilePicker, i18n("Configure a sound file to play when the alarm is displayed."));
+ connect(mFilePicker, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
+ TQToolTip::add(mFilePicker, i18n("Configure sound file"));
+ TQWhatsThis::add(mFilePicker, i18n("Configure a sound file to play when the alarm is displayed."));
soundLayout->addWidget(mFilePicker);
// Initialise the file picker button state and tooltip
@@ -113,7 +113,7 @@ void SoundPicker::showSpeak(bool show)
show = false; // speech capability is not installed
if (show == mSpeakShowing)
return; // no change
- QString whatsThis = "<p>" + i18n("Choose a sound to play when the message is displayed.")
+ TQString whatsThis = "<p>" + i18n("Choose a sound to play when the message is displayed.")
+ "<br>" + i18n("%1: the message is displayed silently.").arg("<b>" + i18n_None() + "</b>")
+ "<br>" + i18n("%1: a simple beep is sounded.").arg("<b>" + i18n_Beep() + "</b>")
+ "<br>" + i18n("%1: an audio file is played. You will be prompted to choose the file and set play options.").arg("<b>" + i18n_File() + "</b>");
@@ -126,7 +126,7 @@ void SoundPicker::showSpeak(bool show)
mTypeCombo->insertItem(i18n_Speak());
whatsThis += "<br>" + i18n("%1: the message text is spoken.").arg("<b>" + i18n_Speak() + "</b>") + "</p>";
}
- QWhatsThis::add(mTypeBox, whatsThis + "</p>");
+ TQWhatsThis::add(mTypeBox, whatsThis + "</p>");
mSpeakShowing = show;
}
@@ -142,9 +142,9 @@ SoundPicker::Type SoundPicker::sound() const
* Return the selected sound file, if the File option is selected.
* Returns null string if File is not currently selected.
*/
-QString SoundPicker::file() const
+TQString SoundPicker::file() const
{
- return (mTypeCombo->currentItem() == PLAY_FILE) ? mFile : QString::null;
+ return (mTypeCombo->currentItem() == PLAY_FILE) ? mFile : TQString::null;
}
/******************************************************************************
@@ -179,7 +179,7 @@ bool SoundPicker::repeat() const
/******************************************************************************
* Initialise the widget's state.
*/
-void SoundPicker::set(SoundPicker::Type type, const QString& f, float volume, float fadeVolume, int fadeSeconds, bool repeat)
+void SoundPicker::set(SoundPicker::Type type, const TQString& f, float volume, float fadeVolume, int fadeSeconds, bool repeat)
{
if (type == PLAY_FILE && f.isEmpty())
type = BEEP;
@@ -191,9 +191,9 @@ void SoundPicker::set(SoundPicker::Type type, const QString& f, float volume, fl
mTypeCombo->setCurrentItem(type); // this doesn't trigger slotTypeSelected()
mFilePicker->setEnabled(type == PLAY_FILE);
if (type == PLAY_FILE)
- QToolTip::add(mTypeCombo, mFile);
+ TQToolTip::add(mTypeCombo, mFile);
else
- QToolTip::remove(mTypeCombo);
+ TQToolTip::remove(mTypeCombo);
mLastType = type;
}
@@ -205,11 +205,11 @@ void SoundPicker::slotTypeSelected(int id)
Type newType = static_cast<Type>(id);
if (newType == mLastType)
return;
- QString tooltip;
+ TQString tooltip;
if (mLastType == PLAY_FILE)
{
mFilePicker->setEnabled(false);
- QToolTip::remove(mTypeCombo);
+ TQToolTip::remove(mTypeCombo);
}
else if (newType == PLAY_FILE)
{
@@ -220,7 +220,7 @@ void SoundPicker::slotTypeSelected(int id)
return; // revert to previously selected type
}
mFilePicker->setEnabled(true);
- QToolTip::add(mTypeCombo, mFile);
+ TQToolTip::add(mTypeCombo, mFile);
}
mLastType = newType;
}
@@ -231,14 +231,14 @@ void SoundPicker::slotTypeSelected(int id)
void SoundPicker::slotPickFile()
{
#ifdef WITHOUT_ARTS
- QString url = browseFile(mDefaultDir, mFile);
+ TQString url = browseFile(mDefaultDir, mFile);
if (!url.isEmpty())
mFile = url;
#else
- QString file = mFile;
+ TQString file = mFile;
SoundDlg dlg(mFile, mVolume, mFadeVolume, mFadeSeconds, mRepeat, i18n("Sound File"), this, "soundDlg");
dlg.setReadOnly(mReadOnly);
- bool accepted = (dlg.exec() == QDialog::Accepted);
+ bool accepted = (dlg.exec() == TQDialog::Accepted);
if (mReadOnly)
return;
if (accepted)
@@ -261,10 +261,10 @@ void SoundPicker::slotPickFile()
{
// No audio file is selected, so revert to previously selected option
mTypeCombo->setCurrentItem(mLastType);
- QToolTip::remove(mTypeCombo);
+ TQToolTip::remove(mTypeCombo);
}
else
- QToolTip::add(mTypeCombo, mFile);
+ TQToolTip::add(mTypeCombo, mFile);
}
/******************************************************************************
@@ -273,9 +273,9 @@ void SoundPicker::slotPickFile()
* 'defaultDir' is updated to the directory containing the chosen file.
* Reply = URL selected. If none is selected, URL.isEmpty() is true.
*/
-QString SoundPicker::browseFile(QString& defaultDir, const QString& initialFile)
+TQString SoundPicker::browseFile(TQString& defaultDir, const TQString& initialFile)
{
- static QString kdeSoundDir; // directory containing KDE sound files
+ static TQString kdeSoundDir; // directory containing KDE sound files
if (defaultDir.isEmpty())
{
if (kdeSoundDir.isNull())
@@ -283,10 +283,10 @@ QString SoundPicker::browseFile(QString& defaultDir, const QString& initialFile)
defaultDir = kdeSoundDir;
}
#ifdef WITHOUT_ARTS
- QString filter = QString::fromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").arg(i18n("Sound Files")).arg(i18n("All Files"));
+ TQString filter = TQString::fromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").arg(i18n("Sound Files")).arg(i18n("All Files"));
#else
- QStringList filters = KDE::PlayObjectFactory::mimeTypes();
- QString filter = filters.join(" ");
+ TQStringList filters = KDE::PlayObjectFactory::mimeTypes();
+ TQString filter = filters.join(" ");
#endif
return KAlarm::browseFile(i18n("Choose Sound File"), defaultDir, initialFile, filter, KFile::ExistingOnly, 0, "pickSoundFile");
}
diff --git a/kalarm/soundpicker.h b/kalarm/soundpicker.h
index 7cad7f380..b07d63e39 100644
--- a/kalarm/soundpicker.h
+++ b/kalarm/soundpicker.h
@@ -21,8 +21,8 @@
#ifndef SOUNDPICKER_H
#define SOUNDPICKER_H
-#include <qframe.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqstring.h>
#include <kurl.h>
class QHBox;
@@ -45,7 +45,7 @@ class SoundPicker : public QFrame
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit SoundPicker(QWidget* parent, const char* name = 0);
+ explicit SoundPicker(TQWidget* parent, const char* name = 0);
/** Initialises the widget's state.
* @param type The option to select.
* @param filename The full path or URL of the sound file to select. If the 'file' option is
@@ -64,7 +64,7 @@ class SoundPicker : public QFrame
* selected, @p repeat provides the default should 'file' later be selected by
* the user.
*/
- void set(Type type, const QString& filename, float volume, float fadeVolume, int fadeSeconds, bool repeat);
+ void set(Type type, const TQString& filename, float volume, float fadeVolume, int fadeSeconds, bool repeat);
/** Returns true if the widget is read only for the user. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget can be changed the user.
@@ -80,7 +80,7 @@ class SoundPicker : public QFrame
/** If the 'file' option is selected, returns the URL of the chosen file.
* Otherwise returns a null string.
*/
- QString file() const;
+ TQString file() const;
/** Returns the volume and fade characteristics for playing a sound file.
* @param fadeVolume Receives the initial volume if the volume is to be faded, else -1.
* @param fadeSeconds Receives the number of seconds over which the volume is to be faded, else 0.
@@ -92,7 +92,7 @@ class SoundPicker : public QFrame
*/
bool repeat() const;
/** Returns the current file URL regardless of whether the 'file' option is selected. */
- QString fileSetting() const { return mFile; }
+ TQString fileSetting() const { return mFile; }
/** Returns the current file repetition setting regardless of whether the 'file' option is selected. */
bool repeatSetting() const { return mRepeat; }
/** Display a dialogue to choose a sound file, initially highlighting
@@ -103,13 +103,13 @@ class SoundPicker : public QFrame
* If null, no file will be highlighted.
* @return URL selected, in human readable format. If none is selected, URL.isEmpty() is true.
*/
- static QString browseFile(QString& initialDir, const QString& initialFile = QString::null);
+ static TQString browseFile(TQString& initialDir, const TQString& initialFile = TQString::null);
- static QString i18n_Sound(); // plain text of Sound label
- static QString i18n_None(); // plain text of None combo box item
- static QString i18n_Beep(); // plain text of Beep combo box item
- static QString i18n_Speak(); // plain text of Speak combo box item
- static QString i18n_File(); // plain text of File combo box item
+ static TQString i18n_Sound(); // plain text of Sound label
+ static TQString i18n_None(); // plain text of None combo box item
+ static TQString i18n_Beep(); // plain text of Beep combo box item
+ static TQString i18n_Speak(); // plain text of Speak combo box item
+ static TQString i18n_File(); // plain text of File combo box item
private slots:
@@ -119,10 +119,10 @@ class SoundPicker : public QFrame
private:
ComboBox* mTypeCombo;
- QHBox* mTypeBox;
+ TQHBox* mTypeBox;
PushButton* mFilePicker;
- QString mDefaultDir;
- QString mFile; // sound file to play when alarm is triggered
+ TQString mDefaultDir;
+ TQString mFile; // sound file to play when alarm is triggered
float mVolume; // volume for file, or < 0 to not set volume
float mFadeVolume; // initial volume for file, or < 0 for no fading
int mFadeSeconds; // fade interval in seconds
diff --git a/kalarm/specialactions.cpp b/kalarm/specialactions.cpp
index a92166eea..ed8555859 100644
--- a/kalarm/specialactions.cpp
+++ b/kalarm/specialactions.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <kapplication.h>
@@ -40,14 +40,14 @@
= Button to display the Special Alarm Actions dialogue.
=============================================================================*/
-SpecialActionsButton::SpecialActionsButton(const QString& caption, QWidget* parent, const char* name)
- : QPushButton(caption, parent, name),
+SpecialActionsButton::SpecialActionsButton(const TQString& caption, TQWidget* parent, const char* name)
+ : TQPushButton(caption, parent, name),
mReadOnly(false)
{
setToggleButton(true);
setOn(false);
- connect(this, SIGNAL(clicked()), SLOT(slotButtonPressed()));
- QWhatsThis::add(this,
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonPressed()));
+ TQWhatsThis::add(this,
i18n("Specify actions to execute before and after the alarm is displayed."));
}
@@ -55,7 +55,7 @@ SpecialActionsButton::SpecialActionsButton(const QString& caption, QWidget* pare
* Set the pre- and post-alarm actions.
* The button's pressed state is set to reflect whether any actions are set.
*/
-void SpecialActionsButton::setActions(const QString& pre, const QString& post)
+void SpecialActionsButton::setActions(const TQString& pre, const TQString& post)
{
mPreAction = pre;
mPostAction = post;
@@ -71,7 +71,7 @@ void SpecialActionsButton::slotButtonPressed()
SpecialActionsDlg dlg(mPreAction, mPostAction,
i18n("Special Alarm Actions"), this, "actionsDlg");
dlg.setReadOnly(mReadOnly);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
mPreAction = dlg.preAction();
mPostAction = dlg.postAction();
@@ -89,20 +89,20 @@ void SpecialActionsButton::slotButtonPressed()
static const char SPEC_ACT_DIALOG_NAME[] = "SpecialActionsDialog";
-SpecialActionsDlg::SpecialActionsDlg(const QString& preAction, const QString& postAction,
- const QString& caption, QWidget* parent, const char* name)
+SpecialActionsDlg::SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
+ const TQString& caption, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
mActions = new SpecialActions(page);
mActions->setActions(preAction, postAction);
layout->addWidget(mActions);
layout->addSpacing(KDialog::spacingHint());
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(SPEC_ACT_DIALOG_NAME, s))
resize(s);
}
@@ -121,7 +121,7 @@ void SpecialActionsDlg::slotOk()
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void SpecialActionsDlg::resizeEvent(QResizeEvent* re)
+void SpecialActionsDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(SPEC_ACT_DIALOG_NAME, re->size());
@@ -134,20 +134,20 @@ void SpecialActionsDlg::resizeEvent(QResizeEvent* re)
= Pre- and post-alarm actions widget.
=============================================================================*/
-SpecialActions::SpecialActions(QWidget* parent, const char* name)
- : QWidget(parent, name),
+SpecialActions::SpecialActions(TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
mReadOnly(false)
{
- QBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
// Pre-alarm action
- QLabel* label = new QLabel(i18n("Pre-a&larm action:"), this);
+ TQLabel* label = new TQLabel(i18n("Pre-a&larm action:"), this);
label->setFixedSize(label->sizeHint());
topLayout->addWidget(label, 0, Qt::AlignAuto);
mPreAction = new KLineEdit(this);
label->setBuddy(mPreAction);
- QWhatsThis::add(mPreAction,
+ TQWhatsThis::add(mPreAction,
i18n("Enter a shell command to execute before the alarm is displayed.\n"
"Note that it is executed only when the alarm proper is displayed, not when a reminder or deferred alarm is displayed.\n"
"N.B. KAlarm will wait for the command to complete before displaying the alarm."));
@@ -155,31 +155,31 @@ SpecialActions::SpecialActions(QWidget* parent, const char* name)
topLayout->addSpacing(KDialog::spacingHint());
// Post-alarm action
- label = new QLabel(i18n("Post-alar&m action:"), this);
+ label = new TQLabel(i18n("Post-alar&m action:"), this);
label->setFixedSize(label->sizeHint());
topLayout->addWidget(label, 0, Qt::AlignAuto);
mPostAction = new KLineEdit(this);
label->setBuddy(mPostAction);
- QWhatsThis::add(mPostAction,
+ TQWhatsThis::add(mPostAction,
i18n("Enter a shell command to execute after the alarm window is closed.\n"
"Note that it is not executed after closing a reminder window. If you defer "
"the alarm, it is not executed until the alarm is finally acknowledged or closed."));
topLayout->addWidget(mPostAction);
}
-void SpecialActions::setActions(const QString& pre, const QString& post)
+void SpecialActions::setActions(const TQString& pre, const TQString& post)
{
mPreAction->setText(pre);
mPostAction->setText(post);
}
-QString SpecialActions::preAction() const
+TQString SpecialActions::preAction() const
{
return mPreAction->text();
}
-QString SpecialActions::postAction() const
+TQString SpecialActions::postAction() const
{
return mPostAction->text();
}
diff --git a/kalarm/specialactions.h b/kalarm/specialactions.h
index ba1106d04..4cc7b698d 100644
--- a/kalarm/specialactions.h
+++ b/kalarm/specialactions.h
@@ -22,8 +22,8 @@
#define SPECIALACTIONS_H
#include <kdialogbase.h>
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
class KLineEdit;
@@ -32,10 +32,10 @@ class SpecialActionsButton : public QPushButton
{
Q_OBJECT
public:
- SpecialActionsButton(const QString& caption, QWidget* parent = 0, const char* name = 0);
- void setActions(const QString& pre, const QString& post);
- const QString& preAction() const { return mPreAction; }
- const QString& postAction() const { return mPostAction; }
+ SpecialActionsButton(const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+ void setActions(const TQString& pre, const TQString& post);
+ const TQString& preAction() const { return mPreAction; }
+ const TQString& postAction() const { return mPostAction; }
virtual void setReadOnly(bool ro) { mReadOnly = ro; }
virtual bool isReadOnly() const { return mReadOnly; }
@@ -46,8 +46,8 @@ class SpecialActionsButton : public QPushButton
void slotButtonPressed();
private:
- QString mPreAction;
- QString mPostAction;
+ TQString mPreAction;
+ TQString mPostAction;
bool mReadOnly;
};
@@ -57,10 +57,10 @@ class SpecialActions : public QWidget
{
Q_OBJECT
public:
- SpecialActions(QWidget* parent = 0, const char* name = 0);
- void setActions(const QString& pre, const QString& post);
- QString preAction() const;
- QString postAction() const;
+ SpecialActions(TQWidget* parent = 0, const char* name = 0);
+ void setActions(const TQString& pre, const TQString& post);
+ TQString preAction() const;
+ TQString postAction() const;
void setReadOnly(bool);
bool isReadOnly() const { return mReadOnly; }
@@ -76,15 +76,15 @@ class SpecialActionsDlg : public KDialogBase
{
Q_OBJECT
public:
- SpecialActionsDlg(const QString& preAction, const QString& postAction,
- const QString& caption, QWidget* parent = 0, const char* name = 0);
- QString preAction() const { return mActions->preAction(); }
- QString postAction() const { return mActions->postAction(); }
+ SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
+ const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+ TQString preAction() const { return mActions->preAction(); }
+ TQString postAction() const { return mActions->postAction(); }
void setReadOnly(bool ro) { mActions->setReadOnly(ro); }
bool isReadOnly() const { return mActions->isReadOnly(); }
protected:
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
protected slots:
virtual void slotOk();
diff --git a/kalarm/startdaytimer.cpp b/kalarm/startdaytimer.cpp
index 41ee3bc83..84f0096ce 100644
--- a/kalarm/startdaytimer.cpp
+++ b/kalarm/startdaytimer.cpp
@@ -29,7 +29,7 @@ StartOfDayTimer* StartOfDayTimer::mInstance = 0;
StartOfDayTimer::StartOfDayTimer()
: DailyTimer(Preferences::startOfDay(), false)
{
- Preferences::connect(SIGNAL(startOfDayChanged(const QTime&)), this, SLOT(startOfDayChanged(const QTime&)));
+ Preferences::connect(TQT_SIGNAL(startOfDayChanged(const TQTime&)), this, TQT_SLOT(startOfDayChanged(const TQTime&)));
}
StartOfDayTimer* StartOfDayTimer::instance()
@@ -43,7 +43,7 @@ StartOfDayTimer* StartOfDayTimer::instance()
* Called when the start-of-day time has changed.
* The timer is adjusted and if appropriate timer events are triggered now.
*/
-void StartOfDayTimer::startOfDayChanged(const QTime&)
+void StartOfDayTimer::startOfDayChanged(const TQTime&)
{
changeTime(Preferences::startOfDay(), true);
}
diff --git a/kalarm/startdaytimer.h b/kalarm/startdaytimer.h
index 52f50d8cc..d8a305ac9 100644
--- a/kalarm/startdaytimer.h
+++ b/kalarm/startdaytimer.h
@@ -41,14 +41,14 @@ class StartOfDayTimer : public DailyTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
+ static void connect(TQObject* receiver, const char* member)
{ instance()->connecT(receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
+ static void disconnect(TQObject* receiver, const char* member = 0)
{ if (mInstance) mInstance->disconnecT(receiver, member); }
protected:
@@ -56,7 +56,7 @@ class StartOfDayTimer : public DailyTimer
static StartOfDayTimer* instance();
private slots:
- void startOfDayChanged(const QTime& oldTime);
+ void startOfDayChanged(const TQTime& oldTime);
private:
static StartOfDayTimer* mInstance; // exists solely to receive signals
diff --git a/kalarm/templatedlg.cpp b/kalarm/templatedlg.cpp
index 917c1ea9f..f586f2e7b 100644
--- a/kalarm/templatedlg.cpp
+++ b/kalarm/templatedlg.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kguiitem.h>
@@ -43,51 +43,51 @@ static const char TMPL_DIALOG_NAME[] = "TemplateDialog";
TemplateDlg* TemplateDlg::mInstance = 0;
-TemplateDlg::TemplateDlg(QWidget* parent, const char* name)
+TemplateDlg::TemplateDlg(TQWidget* parent, const char* name)
: KDialogBase(KDialogBase::Plain, i18n("Alarm Templates"), Close, Ok, parent, name, false, true)
{
- QWidget* topWidget = plainPage();
- QBoxLayout* topLayout = new QHBoxLayout(topWidget);
+ TQWidget* topWidget = plainPage();
+ TQBoxLayout* topLayout = new TQHBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
- QBoxLayout* layout = new QVBoxLayout(topLayout);
+ TQBoxLayout* layout = new TQVBoxLayout(topLayout);
mTemplateList = new TemplateListView(true, i18n("The list of alarm templates"), topWidget);
- mTemplateList->setSelectionMode(QListView::Extended);
- mTemplateList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- connect(mTemplateList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ mTemplateList->setSelectionMode(TQListView::Extended);
+ mTemplateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ connect(mTemplateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
layout->addWidget(mTemplateList);
- layout = new QVBoxLayout(topLayout);
- QPushButton* button = new QPushButton(i18n("&New..."), topWidget);
- connect(button, SIGNAL(clicked()), SLOT(slotNew()));
- QWhatsThis::add(button, i18n("Create a new alarm template"));
+ layout = new TQVBoxLayout(topLayout);
+ TQPushButton* button = new TQPushButton(i18n("&New..."), topWidget);
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotNew()));
+ TQWhatsThis::add(button, i18n("Create a new alarm template"));
layout->addWidget(button);
- mEditButton = new QPushButton(i18n("&Edit..."), topWidget);
- connect(mEditButton, SIGNAL(clicked()), SLOT(slotEdit()));
- QWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template"));
+ mEditButton = new TQPushButton(i18n("&Edit..."), topWidget);
+ connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
+ TQWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template"));
layout->addWidget(mEditButton);
- mCopyButton = new QPushButton(i18n("Co&py"), topWidget);
- connect(mCopyButton, SIGNAL(clicked()), SLOT(slotCopy()));
- QWhatsThis::add(mCopyButton,
+ mCopyButton = new TQPushButton(i18n("Co&py"), topWidget);
+ connect(mCopyButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotCopy()));
+ TQWhatsThis::add(mCopyButton,
i18n("Create a new alarm template based on a copy of the currently highlighted template"));
layout->addWidget(mCopyButton);
- mDeleteButton = new QPushButton(i18n("&Delete"), topWidget);
- connect(mDeleteButton, SIGNAL(clicked()), SLOT(slotDelete()));
- QWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template"));
+ mDeleteButton = new TQPushButton(i18n("&Delete"), topWidget);
+ connect(mDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelete()));
+ TQWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template"));
layout->addWidget(mDeleteButton);
KAccel* accel = new KAccel(this);
- accel->insert(KStdAccel::SelectAll, mTemplateList, SLOT(slotSelectAll()));
- accel->insert(KStdAccel::Deselect, mTemplateList, SLOT(slotDeselect()));
+ accel->insert(KStdAccel::SelectAll, mTemplateList, TQT_SLOT(slotSelectAll()));
+ accel->insert(KStdAccel::Deselect, mTemplateList, TQT_SLOT(slotDeselect()));
accel->readSettings();
mTemplateList->refresh();
slotSelectionChanged(); // enable/disable buttons as appropriate
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(TMPL_DIALOG_NAME, s))
resize(s);
}
@@ -103,7 +103,7 @@ TemplateDlg::~TemplateDlg()
/******************************************************************************
* Create an instance, if none already exists.
*/
-TemplateDlg* TemplateDlg::create(QWidget* parent, const char* name)
+TemplateDlg* TemplateDlg::create(TQWidget* parent, const char* name)
{
if (mInstance)
return 0;
@@ -138,10 +138,10 @@ void TemplateDlg::slotCopy()
* Create a new template.
* If 'event' is non-zero, base the new template on an existing event or template.
*/
-void TemplateDlg::createTemplate(const KAEvent* event, QWidget* parent, TemplateListView* view)
+void TemplateDlg::createTemplate(const KAEvent* event, TQWidget* parent, TemplateListView* view)
{
EditAlarmDlg editDlg(true, i18n("New Alarm Template"), parent, 0, event);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent event;
editDlg.getEvent(event);
@@ -163,11 +163,11 @@ void TemplateDlg::slotEdit()
{
KAEvent event = item->event();
EditAlarmDlg editDlg(true, i18n("Edit Alarm Template"), this, 0, &event);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent newEvent;
editDlg.getEvent(newEvent);
- QString id = event.id();
+ TQString id = event.id();
newEvent.setEventID(id);
// Update the event in the displays and in the calendar file
@@ -183,7 +183,7 @@ void TemplateDlg::slotEdit()
*/
void TemplateDlg::slotDelete()
{
- QValueList<EventListViewItemBase*> items = mTemplateList->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mTemplateList->selectedItems();
int n = items.count();
if (KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete the selected alarm template?",
"Do you really want to delete the %n selected alarm templates?", n),
@@ -193,9 +193,9 @@ void TemplateDlg::slotDelete()
int warnErr = 0;
KAlarm::UpdateStatus status = KAlarm::UPDATE_OK;
- QValueList<KAEvent> events;
+ TQValueList<KAEvent> events;
AlarmCalendar::templateCalendar()->startUpdate(); // prevent multiple saves of the calendar until we're finished
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
TemplateListViewItem* item = (TemplateListViewItem*)(*it);
events.append(item->event());
@@ -233,7 +233,7 @@ void TemplateDlg::slotSelectionChanged()
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void TemplateDlg::resizeEvent(QResizeEvent* re)
+void TemplateDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(TMPL_DIALOG_NAME, re->size());
diff --git a/kalarm/templatedlg.h b/kalarm/templatedlg.h
index c93359861..f06f0edc4 100644
--- a/kalarm/templatedlg.h
+++ b/kalarm/templatedlg.h
@@ -31,15 +31,15 @@ class TemplateDlg : public KDialogBase
{
Q_OBJECT
public:
- static TemplateDlg* create(QWidget* parent = 0, const char* name = 0);
+ static TemplateDlg* create(TQWidget* parent = 0, const char* name = 0);
~TemplateDlg();
- static void createTemplate(const KAEvent* = 0, QWidget* parent = 0, TemplateListView* = 0);
+ static void createTemplate(const KAEvent* = 0, TQWidget* parent = 0, TemplateListView* = 0);
signals:
void emptyToggled(bool notEmpty);
protected:
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private slots:
void slotNew();
@@ -49,14 +49,14 @@ class TemplateDlg : public KDialogBase
void slotSelectionChanged();
private:
- TemplateDlg(QWidget* parent, const char* name);
+ TemplateDlg(TQWidget* parent, const char* name);
static TemplateDlg* mInstance; // the current instance, to prevent multiple dialogues
TemplateListView* mTemplateList;
- QPushButton* mEditButton;
- QPushButton* mCopyButton;
- QPushButton* mDeleteButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mCopyButton;
+ TQPushButton* mDeleteButton;
};
#endif // TEMPLATEDLG_H
diff --git a/kalarm/templatelistview.cpp b/kalarm/templatelistview.cpp
index bf1e00850..1c0dd504b 100644
--- a/kalarm/templatelistview.cpp
+++ b/kalarm/templatelistview.cpp
@@ -32,21 +32,21 @@
= Class: TemplateListView
= Displays the list of outstanding alarms.
=============================================================================*/
-QValueList<EventListViewBase*> TemplateListView::mInstanceList;
+TQValueList<EventListViewBase*> TemplateListView::mInstanceList;
-TemplateListView::TemplateListView(bool includeCmdAlarms, const QString& whatsThisText, QWidget* parent, const char* name)
+TemplateListView::TemplateListView(bool includeCmdAlarms, const TQString& whatsThisText, TQWidget* parent, const char* name)
: EventListViewBase(parent, name),
mWhatsThisText(whatsThisText),
mIconColumn(0),
mNameColumn(1),
mExcludeCmdAlarms(!includeCmdAlarms)
{
- addColumn(QString::null); // icon column
+ addColumn(TQString::null); // icon column
addLastColumn(i18n("Name"));
setSorting(mNameColumn); // sort initially by name
setColumnAlignment(mIconColumn, Qt::AlignHCenter);
- setColumnWidthMode(mIconColumn, QListView::Maximum);
+ setColumnWidthMode(mIconColumn, TQListView::Maximum);
mInstanceList.append(this);
}
@@ -61,8 +61,8 @@ TemplateListView::~TemplateListView()
*/
void TemplateListView::populate()
{
- QValueList<KAEvent> templates = KAlarm::templateList();
- for (QValueList<KAEvent>::Iterator it = templates.begin(); it != templates.end(); ++it)
+ TQValueList<KAEvent> templates = KAlarm::templateList();
+ for (TQValueList<KAEvent>::Iterator it = templates.begin(); it != templates.end(); ++it)
addEntry(*it);
}
@@ -75,9 +75,9 @@ EventListViewItemBase* TemplateListView::createItem(const KAEvent& event)
}
/******************************************************************************
-* Returns the QWhatsThis text for a specified column.
+* Returns the TQWhatsThis text for a specified column.
*/
-QString TemplateListView::whatsThisText(int column) const
+TQString TemplateListView::whatsThisText(int column) const
{
if (column == mIconColumn)
return i18n("Alarm type");
@@ -113,7 +113,7 @@ TemplateListViewItem::TemplateListViewItem(TemplateListView* parent, const KAEve
/******************************************************************************
* Return the alarm summary text.
*/
-QString TemplateListViewItem::lastColumnText() const
+TQString TemplateListViewItem::lastColumnText() const
{
return event().templateName();
}
@@ -121,7 +121,7 @@ QString TemplateListViewItem::lastColumnText() const
/******************************************************************************
* Return the column sort order for one item in the list.
*/
-QString TemplateListViewItem::key(int column, bool) const
+TQString TemplateListViewItem::key(int column, bool) const
{
TemplateListView* listView = templateListView();
if (column == listView->iconColumn())
diff --git a/kalarm/templatelistview.h b/kalarm/templatelistview.h
index f420641b9..0a629eb36 100644
--- a/kalarm/templatelistview.h
+++ b/kalarm/templatelistview.h
@@ -23,7 +23,7 @@
#include "kalarm.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <klistview.h>
#include "eventlistviewbase.h"
@@ -37,12 +37,12 @@ class TemplateListViewItem : public EventListViewItemBase
TemplateListViewItem(TemplateListView* parent, const KAEvent&);
TemplateListView* templateListView() const { return (TemplateListView*)listView(); }
// Overridden base class methods
- TemplateListViewItem* nextSibling() const { return (TemplateListViewItem*)QListViewItem::nextSibling(); }
- virtual QString key(int column, bool ascending) const;
+ TemplateListViewItem* nextSibling() const { return (TemplateListViewItem*)TQListViewItem::nextSibling(); }
+ virtual TQString key(int column, bool ascending) const;
protected:
- virtual QString lastColumnText() const;
+ virtual TQString lastColumnText() const;
private:
- QString mIconOrder; // controls ordering of icon column
+ TQString mIconOrder; // controls ordering of icon column
};
@@ -50,7 +50,7 @@ class TemplateListView : public EventListViewBase
{
Q_OBJECT
public:
- explicit TemplateListView(bool includeCmdAlarms, const QString& whatsThisText, QWidget* parent = 0, const char* name = 0);
+ explicit TemplateListView(bool includeCmdAlarms, const TQString& whatsThisText, TQWidget* parent = 0, const char* name = 0);
~TemplateListView();
int iconColumn() const { return mIconColumn; }
int nameColumn() const { return mNameColumn; }
@@ -59,26 +59,26 @@ class TemplateListView : public EventListViewBase
{ EventListViewBase::addEvent(e, mInstanceList, v); }
static void modifyEvent(const KAEvent& e, EventListViewBase* v)
{ EventListViewBase::modifyEvent(e.id(), e, mInstanceList, v); }
- static void modifyEvent(const QString& oldEventID, const KAEvent& newEvent, EventListViewBase* v)
+ static void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent, EventListViewBase* v)
{ EventListViewBase::modifyEvent(oldEventID, newEvent, mInstanceList, v); }
- static void deleteEvent(const QString& eventID)
+ static void deleteEvent(const TQString& eventID)
{ EventListViewBase::deleteEvent(eventID, mInstanceList); }
- TemplateListViewItem* getEntry(const QString& eventID) { return (TemplateListViewItem*)EventListViewBase::getEntry(eventID); }
+ TemplateListViewItem* getEntry(const TQString& eventID) { return (TemplateListViewItem*)EventListViewBase::getEntry(eventID); }
TemplateListViewItem* selectedItem() const { return (TemplateListViewItem*)EventListViewBase::selectedItem(); }
TemplateListViewItem* currentItem() const { return (TemplateListViewItem*)EventListViewBase::currentItem(); }
TemplateListViewItem* firstChild() const { return (TemplateListViewItem*)EventListViewBase::firstChild(); }
- virtual void setSelected(QListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
+ virtual void setSelected(TQListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
virtual void setSelected(TemplateListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
- virtual QValueList<EventListViewBase*> instances() { return mInstanceList; }
+ virtual TQValueList<EventListViewBase*> instances() { return mInstanceList; }
protected:
virtual void populate();
EventListViewItemBase* createItem(const KAEvent&);
- virtual QString whatsThisText(int column) const;
+ virtual TQString whatsThisText(int column) const;
private:
- static QValueList<EventListViewBase*> mInstanceList;
- QString mWhatsThisText; // default QWhatsThis text
+ static TQValueList<EventListViewBase*> mInstanceList;
+ TQString mWhatsThisText; // default TQWhatsThis text
int mIconColumn; // index to icon column
int mNameColumn; // index to template name column
bool mExcludeCmdAlarms; // omit command alarms from the list
diff --git a/kalarm/templatemenuaction.cpp b/kalarm/templatemenuaction.cpp
index dae3bc127..7f61d6f9b 100644
--- a/kalarm/templatemenuaction.cpp
+++ b/kalarm/templatemenuaction.cpp
@@ -30,14 +30,14 @@
#include "templatemenuaction.moc"
-TemplateMenuAction::TemplateMenuAction(const QString& label, const QString& icon, QObject* receiver,
+TemplateMenuAction::TemplateMenuAction(const TQString& label, const TQString& icon, TQObject* receiver,
const char* slot, KActionCollection* actions, const char* name)
: KActionMenu(label, icon, actions, name)
{
setDelayed(false);
- connect(popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitMenu()));
- connect(popupMenu(), SIGNAL(activated(int)), SLOT(slotSelected(int)));
- connect(this, SIGNAL(selected(const KAEvent&)), receiver, slot);
+ connect(popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitMenu()));
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotSelected(int)));
+ connect(this, TQT_SIGNAL(selected(const KAEvent&)), receiver, slot);
}
/******************************************************************************
@@ -49,18 +49,18 @@ void TemplateMenuAction::slotInitMenu()
KPopupMenu* menu = popupMenu();
menu->clear();
mOriginalTexts.clear();
- QValueList<KAEvent> templates = KAlarm::templateList();
- for (QValueList<KAEvent>::ConstIterator it = templates.constBegin(); it != templates.constEnd(); ++it)
+ TQValueList<KAEvent> templates = KAlarm::templateList();
+ for (TQValueList<KAEvent>::ConstIterator it = templates.constBegin(); it != templates.constEnd(); ++it)
{
- QString name = (*it).templateName();
+ TQString name = (*it).templateName();
// Insert the template in sorted order
- QStringList::Iterator tit;
+ TQStringList::Iterator tit;
for (tit = mOriginalTexts.begin();
- tit != mOriginalTexts.end() && QString::localeAwareCompare(name, *tit) > 0;
+ tit != mOriginalTexts.end() && TQString::localeAwareCompare(name, *tit) > 0;
++tit);
mOriginalTexts.insert(tit, name);
}
- for (QStringList::ConstIterator tit = mOriginalTexts.constBegin(); tit != mOriginalTexts.constEnd(); ++tit)
+ for (TQStringList::ConstIterator tit = mOriginalTexts.constBegin(); tit != mOriginalTexts.constEnd(); ++tit)
menu->insertItem(*tit);
}
@@ -71,7 +71,7 @@ void TemplateMenuAction::slotInitMenu()
void TemplateMenuAction::slotSelected(int id)
{
KPopupMenu* menu = popupMenu();
- QString item = mOriginalTexts[menu->indexOf(id)];
+ TQString item = mOriginalTexts[menu->indexOf(id)];
if (!item.isEmpty())
{
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
diff --git a/kalarm/templatemenuaction.h b/kalarm/templatemenuaction.h
index 20d9f30a1..de7151982 100644
--- a/kalarm/templatemenuaction.h
+++ b/kalarm/templatemenuaction.h
@@ -29,7 +29,7 @@ class TemplateMenuAction : public KActionMenu
{
Q_OBJECT
public:
- TemplateMenuAction(const QString& label, const QString& icon, QObject* receiver,
+ TemplateMenuAction(const TQString& label, const TQString& icon, TQObject* receiver,
const char* slot, KActionCollection* parent, const char* name = 0);
signals:
@@ -40,7 +40,7 @@ class TemplateMenuAction : public KActionMenu
void slotSelected(int id);
private:
- QStringList mOriginalTexts; // menu item texts without added ampersands
+ TQStringList mOriginalTexts; // menu item texts without added ampersands
};
#endif // TEMPLATEMENUACTION_H
diff --git a/kalarm/templatepickdlg.cpp b/kalarm/templatepickdlg.cpp
index 50ec2b6e9..3df2d8dd7 100644
--- a/kalarm/templatepickdlg.cpp
+++ b/kalarm/templatepickdlg.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
@@ -34,26 +34,26 @@
static const char TMPL_PICK_DIALOG_NAME[] = "TemplatePickDialog";
-TemplatePickDlg::TemplatePickDlg(QWidget* parent, const char* name)
+TemplatePickDlg::TemplatePickDlg(TQWidget* parent, const char* name)
: KDialogBase(KDialogBase::Plain, i18n("Choose Alarm Template"), Ok|Cancel, Ok, parent, name)
{
- QWidget* topWidget = plainPage();
- QBoxLayout* topLayout = new QVBoxLayout(topWidget);
+ TQWidget* topWidget = plainPage();
+ TQBoxLayout* topLayout = new TQVBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
// Display the list of templates, but exclude command alarms if in kiosk mode.
bool includeCmdAlarms = ShellProcess::authorised();
mTemplateList = new TemplateListView(includeCmdAlarms, i18n("Select a template to base the new alarm on."), topWidget, "list");
- mTemplateList->setSelectionMode(QListView::Single);
+ mTemplateList->setSelectionMode(TQListView::Single);
mTemplateList->refresh(); // populate the template list
- connect(mTemplateList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(mTemplateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
// Require a real double click (even if KDE is in single-click mode) to accept the selection
- connect(mTemplateList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), SLOT(slotOk()));
+ connect(mTemplateList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), TQT_SLOT(slotOk()));
topLayout->addWidget(mTemplateList);
slotSelectionChanged(); // enable or disable the OK button
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(TMPL_PICK_DIALOG_NAME, s))
resize(s);
}
@@ -79,7 +79,7 @@ void TemplatePickDlg::slotSelectionChanged()
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void TemplatePickDlg::resizeEvent(QResizeEvent* re)
+void TemplatePickDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(TMPL_PICK_DIALOG_NAME, re->size());
diff --git a/kalarm/templatepickdlg.h b/kalarm/templatepickdlg.h
index 9bc97bfae..2f003d91a 100644
--- a/kalarm/templatepickdlg.h
+++ b/kalarm/templatepickdlg.h
@@ -30,10 +30,10 @@ class TemplatePickDlg : public KDialogBase
{
Q_OBJECT
public:
- TemplatePickDlg(QWidget* parent = 0, const char* name = 0);
+ TemplatePickDlg(TQWidget* parent = 0, const char* name = 0);
const KAEvent* selectedTemplate() const;
protected:
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private slots:
void slotSelectionChanged();
private:
diff --git a/kalarm/timeselector.cpp b/kalarm/timeselector.cpp
index 0bfc142de..9ec5c9813 100644
--- a/kalarm/timeselector.cpp
+++ b/kalarm/timeselector.cpp
@@ -20,10 +20,10 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdialog.h>
@@ -33,35 +33,35 @@
#include "timeselector.moc"
-TimeSelector::TimeSelector(const QString& selectText, const QString& postfix, const QString& selectWhatsThis,
- const QString& valueWhatsThis, bool allowHourMinute, QWidget* parent, const char* name)
- : QFrame(parent, name),
+TimeSelector::TimeSelector(const TQString& selectText, const TQString& postfix, const TQString& selectWhatsThis,
+ const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mLabel(0),
mReadOnly(false)
{
- setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
mSelect = new CheckBox(selectText, this);
mSelect->setFixedSize(mSelect->sizeHint());
- connect(mSelect, SIGNAL(toggled(bool)), SLOT(selectToggled(bool)));
- QWhatsThis::add(mSelect, selectWhatsThis);
+ connect(mSelect, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectToggled(bool)));
+ TQWhatsThis::add(mSelect, selectWhatsThis);
layout->addWidget(mSelect);
- QHBox* box = new QHBox(this); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(this); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
mPeriod = new TimePeriod(allowHourMinute, box);
mPeriod->setFixedSize(mPeriod->sizeHint());
mPeriod->setSelectOnStep(false);
- connect(mPeriod, SIGNAL(valueChanged(int)), SLOT(periodChanged(int)));
+ connect(mPeriod, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(periodChanged(int)));
mSelect->setFocusWidget(mPeriod);
mPeriod->setEnabled(false);
if (!postfix.isEmpty())
{
- mLabel = new QLabel(postfix, box);
- QWhatsThis::add(box, valueWhatsThis);
+ mLabel = new TQLabel(postfix, box);
+ TQWhatsThis::add(box, valueWhatsThis);
mLabel->setEnabled(false);
}
}
diff --git a/kalarm/timeselector.h b/kalarm/timeselector.h
index 9ba66c098..5c9ca7d56 100644
--- a/kalarm/timeselector.h
+++ b/kalarm/timeselector.h
@@ -21,7 +21,7 @@
#ifndef TIMESELECTOR_H
#define TIMESELECTOR_H
-#include <qframe.h>
+#include <tqframe.h>
#include "timeperiod.h"
class QLabel;
@@ -32,8 +32,8 @@ class TimeSelector : public QFrame
{
Q_OBJECT
public:
- TimeSelector(const QString& selectText, const QString& postfix, const QString& selectWhatsThis,
- const QString& valueWhatsThis, bool allowHourMinute, QWidget* parent, const char* name = 0);
+ TimeSelector(const TQString& selectText, const TQString& postfix, const TQString& selectWhatsThis,
+ const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name = 0);
bool isChecked() const;
void setChecked(bool on);
int minutes() const;
@@ -54,7 +54,7 @@ class TimeSelector : public QFrame
private:
CheckBox* mSelect;
TimePeriod* mPeriod;
- QLabel* mLabel;
+ TQLabel* mLabel;
bool mReadOnly; // the widget is read only
};
diff --git a/kalarm/traywindow.cpp b/kalarm/traywindow.cpp
index e968e02ba..14ee6bf4a 100644
--- a/kalarm/traywindow.cpp
+++ b/kalarm/traywindow.cpp
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <klocale.h>
@@ -53,16 +53,16 @@
class TrayTooltip : public QToolTip
{
public:
- TrayTooltip(QWidget* parent) : QToolTip(parent) { }
+ TrayTooltip(TQWidget* parent) : TQToolTip(parent) { }
virtual ~TrayTooltip() {}
protected:
- virtual void maybeTip(const QPoint&);
+ virtual void maybeTip(const TQPoint&);
};
struct TipItem
{
- QDateTime dateTime;
- QString text;
+ TQDateTime dateTime;
+ TQString text;
};
@@ -87,16 +87,16 @@ TrayWindow::TrayWindow(MainWindow* parent, const char* name)
KActionCollection* actcol = actionCollection();
AlarmEnableAction* a = Daemon::createAlarmEnableAction(actcol, "tAlarmEnable");
a->plug(contextMenu());
- connect(a, SIGNAL(switched(bool)), SLOT(setEnabledStatus(bool)));
- KAlarm::createNewAlarmAction(i18n("&New Alarm..."), this, SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu());
- KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), this, SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu());
- KStdAction::preferences(this, SLOT(slotPreferences()), actcol)->plug(contextMenu());
+ connect(a, TQT_SIGNAL(switched(bool)), TQT_SLOT(setEnabledStatus(bool)));
+ KAlarm::createNewAlarmAction(i18n("&New Alarm..."), this, TQT_SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu());
+ KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu());
+ KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actcol)->plug(contextMenu());
// Replace the default handler for the Quit context menu item
const char* quitName = KStdAction::name(KStdAction::Quit);
actcol->remove(actcol->action(quitName));
actcol->accel()->remove(quitName);
- KStdAction::quit(this, SLOT(slotQuit()), actcol);
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actcol);
// Set icon to correspond with the alarms enabled menu status
Daemon::checkStatus();
@@ -171,7 +171,7 @@ void TrayWindow::setEnabledStatus(bool status)
* A left click displays the KAlarm main window.
* A middle button click displays the New Alarm window.
*/
-void TrayWindow::mousePressEvent(QMouseEvent* e)
+void TrayWindow::mousePressEvent(TQMouseEvent* e)
{
if (e->button() == LeftButton && !theApp()->wantRunInSystemTray())
{
@@ -189,7 +189,7 @@ void TrayWindow::mousePressEvent(QMouseEvent* e)
* The main window (if not hidden) is raised and made the active window.
* If this is done in mousePressEvent(), it doesn't work.
*/
-void TrayWindow::mouseReleaseEvent(QMouseEvent* e)
+void TrayWindow::mouseReleaseEvent(TQMouseEvent* e)
{
if (e->button() == LeftButton && mAssocMainWindow && mAssocMainWindow->isVisible())
{
@@ -203,7 +203,7 @@ void TrayWindow::mouseReleaseEvent(QMouseEvent* e)
/******************************************************************************
* Called when the drag cursor enters the panel icon.
*/
-void TrayWindow::dragEnterEvent(QDragEnterEvent* e)
+void TrayWindow::dragEnterEvent(TQDragEnterEvent* e)
{
MainWindow::executeDragEnterEvent(e);
}
@@ -212,7 +212,7 @@ void TrayWindow::dragEnterEvent(QDragEnterEvent* e)
* Called when an object is dropped on the panel icon.
* If the object is recognised, the edit alarm dialog is opened appropriately.
*/
-void TrayWindow::dropEvent(QDropEvent* e)
+void TrayWindow::dropEvent(TQDropEvent* e)
{
MainWindow::executeDropEvent(0, e);
}
@@ -221,16 +221,16 @@ void TrayWindow::dropEvent(QDropEvent* e)
* Return the tooltip text showing alarms due in the next 24 hours.
* The limit of 24 hours is because only times, not dates, are displayed.
*/
-void TrayWindow::tooltipAlarmText(QString& text) const
+void TrayWindow::tooltipAlarmText(TQString& text) const
{
KAEvent event;
- const QString& prefix = Preferences::tooltipTimeToPrefix();
+ const TQString& prefix = Preferences::tooltipTimeToPrefix();
int maxCount = Preferences::tooltipAlarmCount();
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// Get today's and tomorrow's alarms, sorted in time order
- QValueList<TipItem> items;
- QValueList<TipItem>::Iterator iit;
+ TQValueList<TipItem> items;
+ TQValueList<TipItem>::Iterator iit;
KCal::Event::List events = AlarmCalendar::activeCalendar()->eventsWithAlarms(now.date(), now.addDays(1));
for (KCal::Event::List::ConstIterator it = events.begin(); it != events.end(); ++it)
{
@@ -346,10 +346,10 @@ bool TrayWindow::inSystemTray() const
/******************************************************************************
* Displays the appropriate tooltip depending on preference settings.
*/
-void TrayTooltip::maybeTip(const QPoint&)
+void TrayTooltip::maybeTip(const TQPoint&)
{
TrayWindow* parent = (TrayWindow*)parentWidget();
- QString text;
+ TQString text;
if (Daemon::monitoringAlarms())
text = kapp->aboutData()->programName();
else
diff --git a/kalarm/traywindow.h b/kalarm/traywindow.h
index e2e2d5d95..7ca5c6e60 100644
--- a/kalarm/traywindow.h
+++ b/kalarm/traywindow.h
@@ -21,7 +21,7 @@
#ifndef TRAYWINDOW_H
#define TRAYWINDOW_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <ksystemtray.h>
class KPopupMenu;
@@ -39,7 +39,7 @@ class TrayWindow : public KSystemTray
MainWindow* assocMainWindow() const { return mAssocMainWindow; }
void setAssocMainWindow(MainWindow* win) { mAssocMainWindow = win; }
bool inSystemTray() const;
- void tooltipAlarmText(QString& text) const;
+ void tooltipAlarmText(TQString& text) const;
public slots:
void slotQuit();
@@ -49,10 +49,10 @@ class TrayWindow : public KSystemTray
protected:
virtual void contextMenuAboutToShow(KPopupMenu*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dropEvent(QDropEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
+ virtual void dropEvent(TQDropEvent*);
private slots:
void slotNewAlarm();
@@ -64,7 +64,7 @@ class TrayWindow : public KSystemTray
friend class TrayTooltip;
MainWindow* mAssocMainWindow; // main window associated with this, or null
- QPixmap mPixmapEnabled, mPixmapDisabled;
+ TQPixmap mPixmapEnabled, mPixmapDisabled;
TrayTooltip* mTooltip;
};
diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp
index bab085ae3..8d6a46a32 100644
--- a/kalarm/undo.cpp
+++ b/kalarm/undo.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <klocale.h>
@@ -44,18 +44,18 @@ class UndoItem
UndoItem(); // needed by QValueList
virtual ~UndoItem();
virtual Operation operation() const = 0;
- virtual QString actionText() const = 0;
- virtual QString description() const { return QString::null; }
- virtual QString eventID() const { return QString::null; }
- virtual QString oldEventID() const { return QString::null; }
- virtual QString newEventID() const { return QString::null; }
+ virtual TQString actionText() const = 0;
+ virtual TQString description() const { return TQString::null; }
+ virtual TQString eventID() const { return TQString::null; }
+ virtual TQString oldEventID() const { return TQString::null; }
+ virtual TQString newEventID() const { return TQString::null; }
int id() const { return mId; }
Undo::Type type() const { return mType; }
void setType(Undo::Type t) { mType = t; }
KAEvent::Status calendar() const { return mCalendar; }
virtual void setCalendar(KAEvent::Status s) { mCalendar = s; }
virtual UndoItem* restore() = 0;
- virtual bool deleteID(const QString& /*id*/) { return false; }
+ virtual bool deleteID(const TQString& /*id*/) { return false; }
enum Error { ERR_NONE, ERR_PROG, ERR_NOT_FOUND, ERR_CREATE, ERR_TEMPLATE, ERR_EXPIRED };
enum Warning { WARN_NONE, WARN_KORG_ADD, WARN_KORG_MODIFY, WARN_KORG_DELETE };
@@ -66,8 +66,8 @@ class UndoItem
protected:
UndoItem(Undo::Type);
- static QString addDeleteActionText(KAEvent::Status, bool add);
- QString description(const KAEvent&) const;
+ static TQString addDeleteActionText(KAEvent::Status, bool add);
+ TQString description(const KAEvent&) const;
void replaceWith(UndoItem* item) { Undo::replace(this, item); }
int mId; // unique identifier (only for mType = UNDO, REDO)
@@ -89,11 +89,11 @@ class UndoMultiBase : public UndoItem
template <class T> class UndoMulti : public UndoMultiBase
{
public:
- UndoMulti(Undo::Type, const QValueList<KAEvent>&);
+ UndoMulti(Undo::Type, const TQValueList<KAEvent>&);
UndoMulti(Undo::Type t, Undo::List& undos) : UndoMultiBase(t, undos) { }
virtual Operation operation() const { return MULTI; }
virtual UndoItem* restore();
- virtual bool deleteID(const QString& id);
+ virtual bool deleteID(const TQString& id);
virtual UndoItem* createRedo(Undo::List&) = 0;
};
@@ -103,35 +103,35 @@ class UndoAdd : public UndoItem
UndoAdd(Undo::Type, const KAEvent&);
UndoAdd(Undo::Type, const KAEvent&, KAEvent::Status);
virtual Operation operation() const { return ADD; }
- virtual QString actionText() const;
- virtual QString description() const { return mDescription; }
- virtual QString eventID() const { return mEventID; }
- virtual QString newEventID() const { return mEventID; }
+ virtual TQString actionText() const;
+ virtual TQString description() const { return mDescription; }
+ virtual TQString eventID() const { return mEventID; }
+ virtual TQString newEventID() const { return mEventID; }
virtual UndoItem* restore() { return doRestore(); }
protected:
UndoItem* doRestore(bool setArchive = false);
virtual UndoItem* createRedo(const KAEvent&);
private:
- QString mEventID;
- QString mDescription;
+ TQString mEventID;
+ TQString mDescription;
};
class UndoEdit : public UndoItem
{
public:
- UndoEdit(Undo::Type, const KAEvent& oldEvent, const QString& newEventID, const QString& description);
+ UndoEdit(Undo::Type, const KAEvent& oldEvent, const TQString& newEventID, const TQString& description);
~UndoEdit();
virtual Operation operation() const { return EDIT; }
- virtual QString actionText() const;
- virtual QString description() const { return mDescription; }
- virtual QString eventID() const { return mNewEventID; }
- virtual QString oldEventID() const { return mOldEvent->id(); }
- virtual QString newEventID() const { return mNewEventID; }
+ virtual TQString actionText() const;
+ virtual TQString description() const { return mDescription; }
+ virtual TQString eventID() const { return mNewEventID; }
+ virtual TQString oldEventID() const { return mOldEvent->id(); }
+ virtual TQString newEventID() const { return mNewEventID; }
virtual UndoItem* restore();
private:
KAEvent* mOldEvent;
- QString mNewEventID;
- QString mDescription;
+ TQString mNewEventID;
+ TQString mDescription;
};
class UndoDelete : public UndoItem
@@ -140,10 +140,10 @@ class UndoDelete : public UndoItem
UndoDelete(Undo::Type, const KAEvent&);
~UndoDelete();
virtual Operation operation() const { return DELETE; }
- virtual QString actionText() const;
- virtual QString description() const { return UndoItem::description(*mEvent); }
- virtual QString eventID() const { return mEvent->id(); }
- virtual QString oldEventID() const { return mEvent->id(); }
+ virtual TQString actionText() const;
+ virtual TQString description() const { return UndoItem::description(*mEvent); }
+ virtual TQString eventID() const { return mEvent->id(); }
+ virtual TQString oldEventID() const { return mEvent->id(); }
virtual UndoItem* restore();
KAEvent* event() const { return mEvent; }
protected:
@@ -157,7 +157,7 @@ class UndoReactivate : public UndoAdd
public:
UndoReactivate(Undo::Type t, const KAEvent& e) : UndoAdd(t, e, KAEvent::ACTIVE) { }
virtual Operation operation() const { return REACTIVATE; }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* restore();
protected:
virtual UndoItem* createRedo(const KAEvent&);
@@ -168,7 +168,7 @@ class UndoDeactivate : public UndoDelete
public:
UndoDeactivate(Undo::Type t, const KAEvent& e) : UndoDelete(t, e) { }
virtual Operation operation() const { return DEACTIVATE; }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* restore();
protected:
virtual UndoItem* createRedo(const KAEvent&);
@@ -177,22 +177,22 @@ class UndoDeactivate : public UndoDelete
class UndoDeletes : public UndoMulti<UndoDelete>
{
public:
- UndoDeletes(Undo::Type t, const QValueList<KAEvent>& events)
+ UndoDeletes(Undo::Type t, const TQValueList<KAEvent>& events)
: UndoMulti<UndoDelete>(t, events) { } // UNDO only
UndoDeletes(Undo::Type t, Undo::List& undos)
: UndoMulti<UndoDelete>(t, undos) { }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* createRedo(Undo::List&);
};
class UndoReactivates : public UndoMulti<UndoReactivate>
{
public:
- UndoReactivates(Undo::Type t, const QValueList<KAEvent>& events)
+ UndoReactivates(Undo::Type t, const TQValueList<KAEvent>& events)
: UndoMulti<UndoReactivate>(t, events) { } // UNDO only
UndoReactivates(Undo::Type t, Undo::List& undos)
: UndoMulti<UndoReactivate>(t, undos) { }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* createRedo(Undo::List&);
};
@@ -252,7 +252,7 @@ void Undo::saveDelete(const KAEvent& event)
emitChanged();
}
-void Undo::saveDeletes(const QValueList<KAEvent>& events)
+void Undo::saveDeletes(const TQValueList<KAEvent>& events)
{
int count = events.count();
if (count == 1)
@@ -260,7 +260,7 @@ void Undo::saveDeletes(const QValueList<KAEvent>& events)
else if (count > 1)
{
new UndoDeletes(UNDO, events);
- for (QValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
+ for (TQValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
removeRedos((*it).id()); // remove any redos which are made invalid by these deletions
emitChanged();
}
@@ -272,7 +272,7 @@ void Undo::saveReactivate(const KAEvent& event)
emitChanged();
}
-void Undo::saveReactivates(const QValueList<KAEvent>& events)
+void Undo::saveReactivates(const TQValueList<KAEvent>& events)
{
int count = events.count();
if (count == 1)
@@ -287,9 +287,9 @@ void Undo::saveReactivates(const QValueList<KAEvent>& events)
/******************************************************************************
* Remove any redos which are made invalid by a new undo.
*/
-void Undo::removeRedos(const QString& eventID)
+void Undo::removeRedos(const TQString& eventID)
{
- QString id = eventID;
+ TQString id = eventID;
for (Iterator it = mRedoList.begin(); it != mRedoList.end(); )
{
UndoItem* item = *it;
@@ -320,7 +320,7 @@ void Undo::removeRedos(const QString& eventID)
* Undo or redo a specified item.
* Reply = true if success, or if the item no longer exists.
*/
-bool Undo::undo(Undo::Iterator it, Undo::Type type, QWidget* parent, const QString& action)
+bool Undo::undo(Undo::Iterator it, Undo::Type type, TQWidget* parent, const TQString& action)
{
UndoItem::mRestoreError = UndoItem::ERR_NONE;
UndoItem::mRestoreWarning = UndoItem::WARN_NONE;
@@ -332,7 +332,7 @@ bool Undo::undo(Undo::Iterator it, Undo::Type type, QWidget* parent, const QStri
emitChanged();
}
- QString err;
+ TQString err;
switch (UndoItem::mRestoreError)
{
case UndoItem::ERR_NONE:
@@ -416,28 +416,28 @@ void Undo::replace(UndoItem* old, UndoItem* New)
/******************************************************************************
* Return the action description of the latest undo/redo item.
*/
-QString Undo::actionText(Undo::Type type)
+TQString Undo::actionText(Undo::Type type)
{
List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
- return (list && !list->isEmpty()) ? list->first()->actionText() : QString::null;
+ return (list && !list->isEmpty()) ? list->first()->actionText() : TQString::null;
}
/******************************************************************************
* Return the action description of the undo/redo item with the specified ID.
*/
-QString Undo::actionText(Undo::Type type, int id)
+TQString Undo::actionText(Undo::Type type, int id)
{
UndoItem* undo = getItem(id, type);
- return undo ? undo->actionText() : QString::null;
+ return undo ? undo->actionText() : TQString::null;
}
/******************************************************************************
* Return the alarm description of the undo/redo item with the specified ID.
*/
-QString Undo::description(Undo::Type type, int id)
+TQString Undo::description(Undo::Type type, int id)
{
UndoItem* undo = getItem(id, type);
- return undo ? undo->description() : QString::null;
+ return undo ? undo->description() : TQString::null;
}
/******************************************************************************
@@ -446,10 +446,10 @@ QString Undo::description(Undo::Type type, int id)
* listed, to force dependent undos to be executed in their correct order.
* If 'ids' is non-null, also returns a list of their corresponding IDs.
*/
-QValueList<int> Undo::ids(Undo::Type type)
+TQValueList<int> Undo::ids(Undo::Type type)
{
- QValueList<int> ids;
- QStringList ignoreIDs;
+ TQValueList<int> ids;
+ TQStringList ignoreIDs;
//int n=0;
List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
if (!list)
@@ -463,11 +463,11 @@ QValueList<int> Undo::ids(Undo::Type type)
if (item->operation() == UndoItem::MULTI)
{
// If any item in a multi-undo is disqualified, omit the whole multi-undo
- QStringList newIDs;
+ TQStringList newIDs;
const Undo::List& undos = ((UndoMultiBase*)item)->undos();
for (Undo::List::ConstIterator u = undos.begin(); u != undos.end(); ++u)
{
- QString evid = (*u)->eventID();
+ TQString evid = (*u)->eventID();
if (ignoreIDs.find(evid) != ignoreIDs.end())
omit = true;
else if (omit)
@@ -477,7 +477,7 @@ QValueList<int> Undo::ids(Undo::Type type)
}
if (omit)
{
- for (QStringList::ConstIterator i = newIDs.begin(); i != newIDs.end(); ++i)
+ for (TQStringList::ConstIterator i = newIDs.begin(); i != newIDs.end(); ++i)
ignoreIDs.append(*i);
}
}
@@ -578,7 +578,7 @@ UndoItem::~UndoItem()
/******************************************************************************
* Return the description of an event.
*/
-QString UndoItem::description(const KAEvent& event) const
+TQString UndoItem::description(const KAEvent& event) const
{
return (mCalendar == KAEvent::TEMPLATE) ? event.templateName() : AlarmText::summary(event);
}
@@ -586,7 +586,7 @@ QString UndoItem::description(const KAEvent& event) const
/******************************************************************************
* Return the action description of an add or delete Undo/Redo item for displaying.
*/
-QString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
+TQString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
{
switch (calendar)
{
@@ -605,7 +605,7 @@ QString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
default:
break;
}
- return QString::null;
+ return TQString::null;
}
@@ -615,10 +615,10 @@ QString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
=============================================================================*/
template <class T>
-UndoMulti<T>::UndoMulti(Undo::Type type, const QValueList<KAEvent>& events)
+UndoMulti<T>::UndoMulti(Undo::Type type, const TQValueList<KAEvent>& events)
: UndoMultiBase(type) // UNDO only
{
- for (QValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
+ for (TQValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
mUndos.append(new T(Undo::NONE, *it));
}
@@ -659,7 +659,7 @@ UndoItem* UndoMulti<T>::restore()
* = false otherwise.
*/
template <class T>
-bool UndoMulti<T>::deleteID(const QString& id)
+bool UndoMulti<T>::deleteID(const TQString& id)
{
for (Undo::List::Iterator it = mUndos.begin(); it != mUndos.end(); ++it)
{
@@ -776,7 +776,7 @@ UndoItem* UndoAdd::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoAdd::actionText() const
+TQString UndoAdd::actionText() const
{
return addDeleteActionText(calendar(), (type() == Undo::UNDO));
}
@@ -787,7 +787,7 @@ QString UndoAdd::actionText() const
= Undo item for alarm edit.
=============================================================================*/
-UndoEdit::UndoEdit(Undo::Type type, const KAEvent& oldEvent, const QString& newEventID, const QString& description)
+UndoEdit::UndoEdit(Undo::Type type, const KAEvent& oldEvent, const TQString& newEventID, const TQString& description)
: UndoItem(type),
mOldEvent(new KAEvent(oldEvent)),
mNewEventID(newEventID),
@@ -856,7 +856,7 @@ UndoItem* UndoEdit::restore()
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoEdit::actionText() const
+TQString UndoEdit::actionText() const
{
switch (calendar())
{
@@ -867,7 +867,7 @@ QString UndoEdit::actionText() const
default:
break;
}
- return QString::null;
+ return TQString::null;
}
@@ -972,7 +972,7 @@ UndoItem* UndoDelete::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoDelete::actionText() const
+TQString UndoDelete::actionText() const
{
return addDeleteActionText(calendar(), (type() == Undo::REDO));
}
@@ -995,10 +995,10 @@ UndoItem* UndoDeletes::createRedo(Undo::List& undos)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoDeletes::actionText() const
+TQString UndoDeletes::actionText() const
{
if (mUndos.isEmpty())
- return QString::null;
+ return TQString::null;
for (Undo::List::ConstIterator it = mUndos.begin(); it != mUndos.end(); ++it)
{
switch ((*it)->calendar())
@@ -1010,7 +1010,7 @@ QString UndoDeletes::actionText() const
case KAEvent::EXPIRED:
break; // check if they are ALL expired
default:
- return QString::null;
+ return TQString::null;
}
}
return i18n("Delete multiple expired alarms");
@@ -1054,7 +1054,7 @@ UndoItem* UndoReactivate::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoReactivate::actionText() const
+TQString UndoReactivate::actionText() const
{
return i18n("Reactivate alarm");
}
@@ -1098,7 +1098,7 @@ UndoItem* UndoDeactivate::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoDeactivate::actionText() const
+TQString UndoDeactivate::actionText() const
{
return i18n("Reactivate alarm");
}
@@ -1121,7 +1121,7 @@ UndoItem* UndoReactivates::createRedo(Undo::List& undos)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoReactivates::actionText() const
+TQString UndoReactivates::actionText() const
{
return i18n("Reactivate multiple alarms");
}
diff --git a/kalarm/undo.h b/kalarm/undo.h
index 99e06f979..0af181530 100644
--- a/kalarm/undo.h
+++ b/kalarm/undo.h
@@ -23,8 +23,8 @@
/** @file undo.h - undo/redo facility */
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
class KAEvent;
class UndoItem;
@@ -40,31 +40,31 @@ class Undo : public QObject
static void saveAdd(const KAEvent&);
static void saveEdit(const KAEvent& oldEvent, const KAEvent& newEvent);
static void saveDelete(const KAEvent&);
- static void saveDeletes(const QValueList<KAEvent>&);
+ static void saveDeletes(const TQValueList<KAEvent>&);
static void saveReactivate(const KAEvent&);
- static void saveReactivates(const QValueList<KAEvent>&);
- static bool undo(QWidget* parent, const QString& action)
+ static void saveReactivates(const TQValueList<KAEvent>&);
+ static bool undo(TQWidget* parent, const TQString& action)
{ return undo(mUndoList.begin(), UNDO, parent, action); }
- static bool undo(int id, QWidget* parent, const QString& action)
+ static bool undo(int id, TQWidget* parent, const TQString& action)
{ return undo(findItem(id, UNDO), UNDO, parent, action); }
- static bool redo(QWidget* parent, const QString& action)
+ static bool redo(TQWidget* parent, const TQString& action)
{ return undo(mRedoList.begin(), REDO, parent, action); }
- static bool redo(int id, QWidget* parent, const QString& action)
+ static bool redo(int id, TQWidget* parent, const TQString& action)
{ return undo(findItem(id, REDO), REDO, parent, action); }
static void clear();
static bool haveUndo() { return !mUndoList.isEmpty(); }
static bool haveRedo() { return !mRedoList.isEmpty(); }
- static QString actionText(Type);
- static QString actionText(Type, int id);
- static QString description(Type, int id);
- static QValueList<int> ids(Type);
+ static TQString actionText(Type);
+ static TQString actionText(Type, int id);
+ static TQString description(Type, int id);
+ static TQValueList<int> ids(Type);
static void emitChanged();
// Types for use by UndoItem class and its descendants
- typedef QValueList<UndoItem*> List;
+ typedef TQValueList<UndoItem*> List;
signals:
- void changed(const QString& undo, const QString& redo);
+ void changed(const TQString& undo, const TQString& redo);
protected:
// Methods for use by UndoItem class
@@ -73,14 +73,14 @@ class Undo : public QObject
static void replace(UndoItem* old, UndoItem* New);
private:
- typedef QValueList<UndoItem*>::Iterator Iterator;
+ typedef TQValueList<UndoItem*>::Iterator Iterator;
- Undo(QObject* parent) : QObject(parent) { }
- static void removeRedos(const QString& eventID);
- static bool undo(Iterator, Type, QWidget* parent, const QString& action);
+ Undo(TQObject* parent) : TQObject(parent) { }
+ static void removeRedos(const TQString& eventID);
+ static bool undo(Iterator, Type, TQWidget* parent, const TQString& action);
static UndoItem* getItem(int id, Type);
static Iterator findItem(int id, Type);
- void emitChanged(const QString& undo, const QString& redo)
+ void emitChanged(const TQString& undo, const TQString& redo)
{ emit changed(undo, redo); }
static Undo* mInstance; // the one and only Undo instance