summaryrefslogtreecommitdiffstats
path: root/kalarm/preferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/preferences.cpp')
-rw-r--r--kalarm/preferences.cpp272
1 files changed, 136 insertions, 136 deletions
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)