summaryrefslogtreecommitdiffstats
path: root/kalarm/preferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/preferences.cpp')
-rw-r--r--kalarm/preferences.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp
index 6488c60c7..95b1b5a69 100644
--- a/kalarm/preferences.cpp
+++ b/kalarm/preferences.cpp
@@ -58,7 +58,7 @@ const int Preferences::default_messageButtonDelay =
const int Preferences::default_tooltipAlarmCount = 5;
const bool Preferences::default_showTooltipAlarmTime = true;
const bool Preferences::default_showTooltipTimeToAlarm = true;
-const TQString Preferences::default_tooltipTimeToPrefix = TQString::fromLatin1("+");
+const TQString Preferences::default_tooltipTimeToPrefix = TQString::tqfromLatin1("+");
const int Preferences::default_daemonTrayCheckInterval = 10; // (seconds)
const bool Preferences::default_emailCopyToKMail = false;
const bool Preferences::default_emailQueuedNotify = false;
@@ -139,65 +139,65 @@ TQTime Preferences::mOldStartOfDay;
bool Preferences::mStartOfDayChanged;
-static const TQString defaultFeb29RecurType = TQString::fromLatin1("Mar1");
-static const TQString defaultEmailClient = TQString::fromLatin1("kmail");
+static const TQString defaultFeb29RecurType = TQString::tqfromLatin1("Mar1");
+static const TQString defaultEmailClient = TQString::tqfromLatin1("kmail");
// Config file entry names
-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");
+static const TQString GENERAL_SECTION = TQString::tqfromLatin1("General");
+static const TQString VERSION_NUM = TQString::tqfromLatin1("Version");
+static const TQString MESSAGE_COLOURS = TQString::tqfromLatin1("MessageColours");
+static const TQString MESSAGE_BG_COLOUR = TQString::tqfromLatin1("MessageBackgroundColour");
+static const TQString MESSAGE_FONT = TQString::tqfromLatin1("MessageFont");
+static const TQString RUN_IN_SYSTEM_TRAY = TQString::tqfromLatin1("RunInSystemTray");
+static const TQString DISABLE_IF_STOPPED = TQString::tqfromLatin1("DisableAlarmsIfStopped");
+static const TQString AUTOSTART_TRAY = TQString::tqfromLatin1("AutostartTray");
+static const TQString FEB29_RECUR_TYPE = TQString::tqfromLatin1("Feb29Recur");
+static const TQString MODAL_MESSAGES = TQString::tqfromLatin1("ModalMessages");
+static const TQString MESSAGE_BUTTON_DELAY = TQString::tqfromLatin1("MessageButtonDelay");
+static const TQString TOOLTIP_ALARM_COUNT = TQString::tqfromLatin1("TooltipAlarmCount");
+static const TQString TOOLTIP_ALARM_TIME = TQString::tqfromLatin1("ShowTooltipAlarmTime");
+static const TQString TOOLTIP_TIME_TO_ALARM = TQString::tqfromLatin1("ShowTooltipTimeToAlarm");
+static const TQString TOOLTIP_TIME_TO_PREFIX = TQString::tqfromLatin1("TooltipTimeToPrefix");
+static const TQString DAEMON_TRAY_INTERVAL = TQString::tqfromLatin1("DaemonTrayCheckInterval");
+static const TQString EMAIL_CLIENT = TQString::tqfromLatin1("EmailClient");
+static const TQString EMAIL_COPY_TO_KMAIL = TQString::tqfromLatin1("EmailCopyToKMail");
+static const TQString EMAIL_FROM = TQString::tqfromLatin1("EmailFrom");
+static const TQString EMAIL_BCC_ADDRESS = TQString::tqfromLatin1("EmailBccAddress");
+static const TQString CMD_XTERM_COMMAND = TQString::tqfromLatin1("CmdXTerm");
+static const TQString START_OF_DAY = TQString::tqfromLatin1("StartOfDay");
+static const TQString START_OF_DAY_CHECK = TQString::tqfromLatin1("Sod");
+static const TQString DISABLED_COLOUR = TQString::tqfromLatin1("DisabledColour");
+static const TQString EXPIRED_COLOUR = TQString::tqfromLatin1("ExpiredColour");
+static const TQString EXPIRED_KEEP_DAYS = TQString::tqfromLatin1("ExpiredKeepDays");
+static const TQString DEFAULTS_SECTION = TQString::tqfromLatin1("Defaults");
+static const TQString DEF_LATE_CANCEL = TQString::tqfromLatin1("DefLateCancel");
+static const TQString DEF_AUTO_CLOSE = TQString::tqfromLatin1("DefAutoClose");
+static const TQString DEF_CONFIRM_ACK = TQString::tqfromLatin1("DefConfirmAck");
+static const TQString DEF_COPY_TO_KORG = TQString::tqfromLatin1("DefCopyKOrg");
+static const TQString DEF_SOUND_TYPE = TQString::tqfromLatin1("DefSoundType");
+static const TQString DEF_SOUND_FILE = TQString::tqfromLatin1("DefSoundFile");
+static const TQString DEF_SOUND_VOLUME = TQString::tqfromLatin1("DefSoundVolume");
+static const TQString DEF_SOUND_REPEAT = TQString::tqfromLatin1("DefSoundRepeat");
+static const TQString DEF_CMD_SCRIPT = TQString::tqfromLatin1("DefCmdScript");
+static const TQString DEF_CMD_LOG_TYPE = TQString::tqfromLatin1("DefCmdLogType");
+static const TQString DEF_LOG_FILE = TQString::tqfromLatin1("DefLogFile");
+static const TQString DEF_EMAIL_BCC = TQString::tqfromLatin1("DefEmailBcc");
+static const TQString DEF_RECUR_PERIOD = TQString::tqfromLatin1("DefRecurPeriod");
+static const TQString DEF_REMIND_UNITS = TQString::tqfromLatin1("RemindUnits");
+static const TQString DEF_PRE_ACTION = TQString::tqfromLatin1("DefPreAction");
+static const TQString DEF_POST_ACTION = TQString::tqfromLatin1("DefPostAction");
// Config file entry name for temporary use
-static const TQString TEMP = TQString::fromLatin1("Temp");
+static const TQString TEMP = TQString::tqfromLatin1("Temp");
// Values for EmailFrom entry
-static const TQString FROM_CONTROL_CENTRE = TQString::fromLatin1("@ControlCenter");
-static const TQString FROM_KMAIL = TQString::fromLatin1("@KMail");
+static const TQString FROM_CONTROL_CENTRE = TQString::tqfromLatin1("@ControlCenter");
+static const TQString FROM_KMAIL = TQString::tqfromLatin1("@KMail");
// Config file entry names for notification messages
-const TQString Preferences::TQUIT_WARN = TQString::fromLatin1("QuitWarn");
-const TQString Preferences::CONFIRM_ALARM_DELETION = TQString::fromLatin1("ConfirmAlarmDeletion");
-const TQString Preferences::EMAIL_TQUEUED_NOTIFY = TQString::fromLatin1("EmailQueuedNotify");
+const TQString Preferences::TQUIT_WARN = TQString::tqfromLatin1("QuitWarn");
+const TQString Preferences::CONFIRM_ALARM_DELETION = TQString::tqfromLatin1("ConfirmAlarmDeletion");
+const TQString Preferences::EMAIL_TQUEUED_NOTIFY = TQString::tqfromLatin1("EmailQueuedNotify");
static const int SODxor = 0x82451630;
inline int Preferences::startOfDayCheck()
@@ -338,10 +338,10 @@ void Preferences::read()
TQCString feb29 = config->readEntry(FEB29_RECUR_TYPE, defaultFeb29RecurType).local8Bit();
mDefaultFeb29Type = (feb29 == "Mar1") ? KARecurrence::FEB29_MAR1 : (feb29 == "Feb28") ? KARecurrence::FEB29_FEB28 : KARecurrence::FEB29_FEB29;
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;
+ mDefaultReminderUnits = (remindUnits == TQString::tqfromLatin1("Minutes")) ? TimePeriod::MINUTES
+ : (remindUnits == TQString::tqfromLatin1("HoursMinutes")) ? TimePeriod::HOURS_MINUTES
+ : (remindUnits == TQString::tqfromLatin1("Days")) ? TimePeriod::DAYS
+ : (remindUnits == TQString::tqfromLatin1("Weeks")) ? TimePeriod::WEEKS : default_defaultReminderUnits;
mDefaultPreAction = config->readEntry(DEF_PRE_ACTION, default_defaultPreAction);
mDefaultPostAction = config->readEntry(DEF_POST_ACTION, default_defaultPostAction);
mInstance->emitPreferencesChanged();
@@ -406,10 +406,10 @@ void Preferences::save(bool syncToDisc)
TQString value;
switch (mDefaultReminderUnits)
{
- 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;
+ case TimePeriod::MINUTES: value = TQString::tqfromLatin1("Minutes"); break;
+ case TimePeriod::HOURS_MINUTES: value = TQString::tqfromLatin1("HoursMinutes"); break;
+ case TimePeriod::DAYS: value = TQString::tqfromLatin1("Days"); break;
+ case TimePeriod::WEEKS: value = TQString::tqfromLatin1("Weeks"); break;
default: value = TQString(); break;
}
config->writeEntry(DEF_REMIND_UNITS, value);
@@ -558,12 +558,12 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,21))
{
// Convert KAlarm 1.4.21 preferences
- static const TQString OLD_REMIND_UNITS = TQString::fromLatin1("DefRemindUnits");
+ static const TQString OLD_REMIND_UNITS = TQString::tqfromLatin1("DefRemindUnits");
config->setGroup(DEFAULTS_SECTION);
int intUnit = config->readNumEntry(OLD_REMIND_UNITS, 0);
- TQString strUnit = (intUnit == 1) ? TQString::fromLatin1("Days")
- : (intUnit == 2) ? TQString::fromLatin1("Weeks")
- : TQString::fromLatin1("HoursMinutes");
+ TQString strUnit = (intUnit == 1) ? TQString::tqfromLatin1("Days")
+ : (intUnit == 2) ? TQString::tqfromLatin1("Weeks")
+ : TQString::tqfromLatin1("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 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");
+ static const TQString VIEW_SECTION = TQString::tqfromLatin1("View");
+ static const TQString SHOW_ARCHIVED_ALARMS = TQString::tqfromLatin1("ShowArchivedAlarms");
+ static const TQString SHOW_EXPIRED_ALARMS = TQString::tqfromLatin1("ShowExpiredAlarms");
+ static const TQString SHOW_ALARM_TIME = TQString::tqfromLatin1("ShowAlarmTime");
+ static const TQString SHOW_TIME_TO_ALARM = TQString::tqfromLatin1("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 TQString DEF_SOUND = TQString::fromLatin1("DefSound");
+ static const TQString DEF_SOUND = TQString::tqfromLatin1("DefSound");
config->setGroup(DEFAULTS_SECTION);
bool sound = config->readBoolEntry(DEF_SOUND, false);
if (!sound)
@@ -603,9 +603,9 @@ void Preferences::convertOldPrefs()
if (version < KAlarm::Version(1,3,0))
{
// Convert KAlarm pre-1.3 preferences
- 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");
+ static const TQString EMAIL_ADDRESS = TQString::tqfromLatin1("EmailAddress");
+ static const TQString EMAIL_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailUseControlCenter");
+ static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::tqfromLatin1("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 TQString DEF_CMD_XTERM = TQString::fromLatin1("DefCmdXterm");
+ static const TQString DEF_CMD_XTERM = TQString::tqfromLatin1("DefCmdXterm");
config->setGroup(DEFAULTS_SECTION);
if (config->hasKey(DEF_CMD_XTERM))
{