diff options
Diffstat (limited to 'kalarm')
66 files changed, 1188 insertions, 1188 deletions
diff --git a/kalarm/Changelog b/kalarm/Changelog index 2671941a5..a3a1c6590 100644 --- a/kalarm/Changelog +++ b/kalarm/Changelog @@ -142,7 +142,7 @@ KAlarm Change Log - Add context help for sound file fade options. === Version 1.4.5 (KDE 3.5.5) --- 29 September 2006 === -- Improve alarm edit dialogue tqlayout (Reminder controls moved to below Time box). +- Improve alarm edit dialogue layout (Reminder controls moved to below Time box). === Version 1.4.4 --- 11 July 2006 === - Use an alarm's previous deferral time interval as default for its next deferral. @@ -261,7 +261,7 @@ KAlarm Change Log - Fix crash when the last recurrence of an alarm is reached. - Fix random limit on expired alarm discard time if stepping with spinbox buttons. - Fix dialog layouts for right-to-left languages. -- Fix time spin box tqlayout for right-to-left languages. +- Fix time spin box layout for right-to-left languages. === Version 1.2.2 --- 27 November 2004 === - Make alarm daemon (kalarmd) exclusive to KAlarm. diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp index 85bc17392..67cadfe8c 100644 --- a/kalarm/alarmcalendar.cpp +++ b/kalarm/alarmcalendar.cpp @@ -23,7 +23,7 @@ #include <time.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqregexp.h> #include <tqtimer.h> @@ -61,17 +61,17 @@ using namespace KCal; TQString AlarmCalendar::icalProductId() { - return TQString::tqfromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").tqarg(KAlarm::currentCalendarVersionString()); + return TQString::fromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString()); } -static const KAEvent::tqStatus eventTypes[AlarmCalendar::NCALS] = { +static const KAEvent::Status eventTypes[AlarmCalendar::NCALS] = { KAEvent::ACTIVE, KAEvent::EXPIRED, KAEvent::DISPLAYING, KAEvent::TEMPLATE }; static const TQString calendarNames[AlarmCalendar::NCALS] = { - TQString::tqfromLatin1("calendar.ics"), - TQString::tqfromLatin1("expired.ics"), - TQString::tqfromLatin1("displaying.ics"), - TQString::tqfromLatin1("template.ics") + 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,10 +91,10 @@ AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 }; bool AlarmCalendar::initialiseCalendars() { KConfig* config = kapp->config(); - config->setGroup(TQString::tqfromLatin1("General")); - TQString activeKey = TQString::tqfromLatin1("Calendar"); - TQString expiredKey = TQString::tqfromLatin1("ExpiredCalendar"); - TQString templateKey = TQString::tqfromLatin1("TemplateCalendar"); + 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)); @@ -112,7 +112,7 @@ bool AlarmCalendar::initialiseCalendars() { kdError(5950) << "AlarmCalendar::initialiseCalendars(): '" << errorKey1 << "' calendar name = display calendar name\n"; TQString file = config->readPathEntry(errorKey1); - KAlarmApp::displayFatalError(i18n("%1: file name not permitted: %2").tqarg(errorKey1).tqarg(file)); + KAlarmApp::displayFatalError(i18n("%1: file name not permitted: %2").arg(errorKey1).arg(file)); return false; } if (activeCal == expiredCal) @@ -133,14 +133,14 @@ bool AlarmCalendar::initialiseCalendars() if (!errorKey1.isNull()) { kdError(5950) << "AlarmCalendar::initialiseCalendars(): calendar names clash: " << errorKey1 << ", " << errorKey2 << endl; - KAlarmApp::displayFatalError(i18n("%1, %2: file names must be different").tqarg(errorKey1).tqarg(errorKey2)); + KAlarmApp::displayFatalError(i18n("%1, %2: file names must be different").arg(errorKey1).arg(errorKey2)); return false; } if (!mCalendars[ACTIVE]->valid()) { TQString path = mCalendars[ACTIVE]->path(); kdError(5950) << "AlarmCalendar::initialiseCalendars(): invalid name: " << path << endl; - KAlarmApp::displayFatalError(i18n("Invalid calendar file name: %1").tqarg(path)); + KAlarmApp::displayFatalError(i18n("Invalid calendar file name: %1").arg(path)); return false; } return true; @@ -152,8 +152,8 @@ bool AlarmCalendar::initialiseCalendars() */ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQString& writePath, const TQString& configKey) { - static TQRegExp vcsRegExp(TQString::tqfromLatin1("\\.vcs$")); - static TQString ical = TQString::tqfromLatin1(".ics"); + static TQRegExp vcsRegExp(TQString::fromLatin1("\\.vcs$")); + static TQString ical = TQString::fromLatin1(".ics"); if (configKey.isNull()) { @@ -206,7 +206,7 @@ const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID) if (uniqueID.isEmpty()) return 0; CalID calID; - switch (KAEvent::uidtqStatus(uniqueID)) + switch (KAEvent::uidStatus(uniqueID)) { case KAEvent::ACTIVE: calID = ACTIVE; break; case KAEvent::TEMPLATE: calID = TEMPLATE; break; @@ -261,7 +261,7 @@ bool AlarmCalendar::open() kdDebug(5950) << "AlarmCalendar::open(" << mUrl.prettyURL() << ")\n"; if (!mCalendar) - mCalendar = new CalendarLocal(TQString::tqfromLatin1("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, @@ -321,7 +321,7 @@ int AlarmCalendar::load() if (!KIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::load(): Load failure" << endl; - KMessageBox::error(0, i18n("Cannot open calendar:\n%1").tqarg(mUrl.prettyURL())); + KMessageBox::error(0, i18n("Cannot open calendar:\n%1").arg(mUrl.prettyURL())); return -1; } kdDebug(5950) << "AlarmCalendar::load(): --- Downloaded to " << tmpFile << endl; @@ -338,7 +338,7 @@ int AlarmCalendar::load() if (!fi.size()) return 0; // file is zero length kdError(5950) << "AlarmCalendar::load(): Error loading calendar file '" << tmpFile << "'" << endl; - KMessageBox::error(0, i18n("Error loading calendar:\n%1\n\nPlease fix or delete the file.").tqarg(mUrl.prettyURL())); + KMessageBox::error(0, i18n("Error loading calendar:\n%1\n\nPlease fix or delete the file.").arg(mUrl.prettyURL())); // load() could have partially populated the calendar, so clear it out mCalendar->close(); delete mCalendar; @@ -383,7 +383,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile) if (!mCalendar->save(saveFilename, new ICalFormat)) { kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): failed.\n"; - KMessageBox::error(0, i18n("Failed to save calendar to\n'%1'").tqarg(mICalUrl.prettyURL())); + KMessageBox::error(0, i18n("Failed to save calendar to\n'%1'").arg(mICalUrl.prettyURL())); return false; } @@ -392,7 +392,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile) if (!KIO::NetAccess::upload(saveFilename, mICalUrl, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): upload failed.\n"; - KMessageBox::error(0, i18n("Cannot upload calendar to\n'%1'").tqarg(mICalUrl.prettyURL())); + KMessageBox::error(0, i18n("Cannot upload calendar to\n'%1'").arg(mICalUrl.prettyURL())); return false; } } @@ -404,7 +404,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile) if (!mConfigKey.isNull()) { KConfig* config = kapp->config(); - config->setGroup(TQString::tqfromLatin1("General")); + config->setGroup(TQString::fromLatin1("General")); config->writePathEntry(mConfigKey, mICalUrl.path()); config->sync(); } @@ -445,8 +445,8 @@ void AlarmCalendar::close() */ bool AlarmCalendar::importAlarms(TQWidget* parent) { - KURL url = KFileDialog::getOpenURL(TQString::tqfromLatin1(":importalarms"), - TQString::tqfromLatin1("*.vcs *.ics|%1").tqarg(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; @@ -468,7 +468,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent) if (!KStandardDirs::exists(filename)) { kdDebug(5950) << "AlarmCalendar::importAlarms(): File '" << url.prettyURL() << "' not found" << endl; - KMessageBox::error(parent, i18n("Could not load calendar '%1'.").tqarg(url.prettyURL())); + KMessageBox::error(parent, i18n("Could not load calendar '%1'.").arg(url.prettyURL())); return false; } } @@ -477,20 +477,20 @@ bool AlarmCalendar::importAlarms(TQWidget* parent) if (!KIO::NetAccess::download(url, filename, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::importAlarms(): Download failure" << endl; - KMessageBox::error(parent, i18n("Cannot download calendar:\n%1").tqarg(url.prettyURL())); + KMessageBox::error(parent, i18n("Cannot download calendar:\n%1").arg(url.prettyURL())); return false; } kdDebug(5950) << "--- Downloaded to " << filename << endl; } // Read the calendar and add its alarms to the current calendars - CalendarLocal cal(TQString::tqfromLatin1("UTC")); + CalendarLocal cal(TQString::fromLatin1("UTC")); cal.setLocalTime(); // write out using local time (i.e. no time zone) success = cal.load(filename); if (!success) { kdDebug(5950) << "AlarmCalendar::importAlarms(): error loading calendar '" << filename << "'" << endl; - KMessageBox::error(parent, i18n("Could not load calendar '%1'.").tqarg(url.prettyURL())); + KMessageBox::error(parent, i18n("Could not load calendar '%1'.").arg(url.prettyURL())); } else { @@ -508,7 +508,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent) const Event* event = *it; if (event->alarms().isEmpty() || !KAEvent(*event).valid()) continue; // ignore events without alarms, or usable alarms - KAEvent::tqStatus type = KAEvent::uidtqStatus(event->uid()); + KAEvent::Status type = KAEvent::uidStatus(event->uid()); switch (type) { case KAEvent::ACTIVE: @@ -616,7 +616,7 @@ void AlarmCalendar::convertToICal() if (!mConfigKey.isNull()) { KConfig* config = kapp->config(); - config->setGroup(TQString::tqfromLatin1("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; - TQDate cutoff = TQDate::tqcurrentDate().addDays(-mPurgeDaysQueued); + TQDate cutoff = TQDate::currentDate().addDays(-mPurgeDaysQueued); Event::List events = mCalendar->rawEvents(); for (Event::List::ConstIterator it = events.begin(); it != events.end(); ++it) { @@ -807,9 +807,9 @@ bool AlarmCalendar::deleteEvent(const TQString& eventID, bool saveit) /****************************************************************************** * Emit a signal to indicate whether the calendar is empty. */ -void AlarmCalendar::emitEmptytqStatus() +void AlarmCalendar::emitEmptyStatus() { - emit emptytqStatus(events().isEmpty()); + emit emptyStatus(events().isEmpty()); } /****************************************************************************** diff --git a/kalarm/alarmcalendar.h b/kalarm/alarmcalendar.h index 47d59f3ed..1b7ffc029 100644 --- a/kalarm/alarmcalendar.h +++ b/kalarm/alarmcalendar.h @@ -40,7 +40,7 @@ class AlarmCalendar : public TQObject public: virtual ~AlarmCalendar(); bool valid() const { return mUrl.isValid(); } - KAEvent::tqStatus type() const { return mType; } + KAEvent::Status type() const { return mType; } bool open(); int load(); bool reload(); @@ -54,7 +54,7 @@ class AlarmCalendar : public TQObject KCal::Event* addEvent(KAEvent&, bool useEventID = false); void updateEvent(const KAEvent&); bool deleteEvent(const TQString& eventID, bool save = false); - void emitEmptytqStatus(); + void emitEmptyStatus(); void purgeAll() { purge(0); } void setPurgeDays(int days); void purgeIfQueued(); // must only be called from KAlarmApp::processQueue() @@ -81,7 +81,7 @@ class AlarmCalendar : public TQObject signals: void calendarSaved(AlarmCalendar*); void purged(); - void emptytqStatus(bool empty); + void emptyStatus(bool empty); private slots: void slotPurge(); @@ -103,7 +103,7 @@ class AlarmCalendar : public TQObject KURL mICalUrl; // URL of iCalendar file TQString mLocalFile; // calendar file, or local copy if it's a remote file TQString mConfigKey; // config file key for this calendar's URL - KAEvent::tqStatus mType; // what type of events the calendar file is for + 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 int mPurgeDaysQueued; // >= 0 to purge the calendar when called from KAlarmApp::processLoop() diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index c5e487caa..d39567938 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -44,7 +44,7 @@ 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. -TQString KAEvent::calVersionString() { return TQString::tqfromLatin1("1.5.0"); } +TQString KAEvent::calVersionString() { return TQString::fromLatin1("1.5.0"); } int KAEvent::calVersion() { return KAlarm::Version(1,5,0); } // Custom calendar properties. @@ -54,16 +54,16 @@ static const TQCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEX static const TQCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property // - General alarm properties static const TQCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property -static const TQString FILE_TYPE = TQString::tqfromLatin1("FILE"); -static const TQString AT_LOGIN_TYPE = TQString::tqfromLatin1("LOGIN"); -static const TQString REMINDER_TYPE = TQString::tqfromLatin1("REMINDER"); -static const TQString REMINDER_ONCE_TYPE = TQString::tqfromLatin1("REMINDER_ONCE"); -static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::tqfromLatin1("ONCE"); -static const TQString TIME_DEFERRAL_TYPE = TQString::tqfromLatin1("DEFERRAL"); -static const TQString DATE_DEFERRAL_TYPE = TQString::tqfromLatin1("DATE_DEFERRAL"); -static const TQString DISPLAYING_TYPE = TQString::tqfromLatin1("DISPLAYING"); // used only in displaying calendar -static const TQString PRE_ACTION_TYPE = TQString::tqfromLatin1("PRE"); -static const TQString POST_ACTION_TYPE = TQString::tqfromLatin1("POST"); +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 TQCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property @@ -74,27 +74,27 @@ static const TQCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOL static const TQCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property // Event categories -static const TQString DATE_ONLY_CATEGORY = TQString::tqfromLatin1("DATE"); -static const TQString EMAIL_BCC_CATEGORY = TQString::tqfromLatin1("BCC"); -static const TQString CONFIRM_ACK_CATEGORY = TQString::tqfromLatin1("ACKCONF"); -static const TQString LATE_CANCEL_CATEGORY = TQString::tqfromLatin1("LATECANCEL;"); -static const TQString AUTO_CLOSE_CATEGORY = TQString::tqfromLatin1("LATECLOSE;"); -static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::tqfromLatin1("TMPLAFTTIME;"); -static const TQString KMAIL_SERNUM_CATEGORY = TQString::tqfromLatin1("KMAIL:"); -static const TQString KORGANIZER_CATEGORY = TQString::tqfromLatin1("KORG"); -static const TQString DEFER_CATEGORY = TQString::tqfromLatin1("DEFER;"); -static const TQString ARCHIVE_CATEGORY = TQString::tqfromLatin1("SAVE"); -static const TQString ARCHIVE_CATEGORIES = TQString::tqfromLatin1("SAVE:"); -static const TQString LOG_CATEGORY = TQString::tqfromLatin1("LOG:"); -static const TQString xtermURL = TQString::tqfromLatin1("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 TQString DISABLED_STATUS = TQString::tqfromLatin1("DISABLED"); +static const TQString DISABLED_STATUS = TQString::fromLatin1("DISABLED"); -static const TQString EXPIRED_UID = TQString::tqfromLatin1("-exp-"); -static const TQString DISPLAYING_UID = TQString::tqfromLatin1("-disp-"); -static const TQString TEMPLATE_UID = TQString::tqfromLatin1("-tmpl-"); -static const TQString KORGANIZER_UID = TQString::tqfromLatin1("-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 { @@ -334,7 +334,7 @@ void KAEvent::set(const Event& event) } mNextMainDateTime = readDateTime(event, dateOnly, mStartDateTime); mSaveDateTime = event.created(); - if (uidtqStatus() == TEMPLATE) + if (uidStatus() == TEMPLATE) mTemplateName = event.summary(); if (event.statusStr() == DISABLED_STATUS) mEnabled = false; @@ -885,38 +885,38 @@ DateTime KAEvent::displayDateTime() const /****************************************************************************** * Convert a unique ID to indicate that the event is in a specified calendar file. */ -TQString KAEvent::uid(const TQString& id, tqStatus status) +TQString KAEvent::uid(const TQString& id, Status status) { TQString result = id; - tqStatus oldtqStatus; + Status oldStatus; int i, len; if ((i = result.find(EXPIRED_UID)) > 0) { - oldtqStatus = EXPIRED; + oldStatus = EXPIRED; len = EXPIRED_UID.length(); } else if ((i = result.find(DISPLAYING_UID)) > 0) { - oldtqStatus = DISPLAYING; + oldStatus = DISPLAYING; len = DISPLAYING_UID.length(); } else if ((i = result.find(TEMPLATE_UID)) > 0) { - oldtqStatus = TEMPLATE; + oldStatus = TEMPLATE; len = TEMPLATE_UID.length(); } else if ((i = result.find(KORGANIZER_UID)) > 0) { - oldtqStatus = KORGANIZER; + oldStatus = KORGANIZER; len = KORGANIZER_UID.length(); } else { - oldtqStatus = ACTIVE; + oldStatus = ACTIVE; i = result.findRev('-'); len = 1; } - if (status != oldtqStatus && i > 0) + if (status != oldStatus && i > 0) { TQString part; switch (status) @@ -935,7 +935,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) /****************************************************************************** * Get the calendar type for a unique ID. */ -KAEvent::tqStatus KAEvent::uidtqStatus(const TQString& uid) +KAEvent::Status KAEvent::uidStatus(const TQString& uid) { if (uid.find(EXPIRED_UID) > 0) return EXPIRED; @@ -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(TQString("%1%2").tqarg(KMAIL_SERNUM_CATEGORY).tqarg(mKMailSerialNumber)); + cats.append(TQString("%1%2").arg(KMAIL_SERNUM_CATEGORY).arg(mKMailSerialNumber)); if (mCopyToKOrganizer) cats.append(KORGANIZER_CATEGORY); if (mCommandXterm) @@ -1008,11 +1008,11 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc else if (!mLogFile.isEmpty()) cats.append(LOG_CATEGORY + mLogFile); if (mLateCancel) - cats.append(TQString("%1%2").tqarg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).tqarg(mLateCancel)); + cats.append(TQString("%1%2").arg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).arg(mLateCancel)); if (mDeferDefaultMinutes) - cats.append(TQString("%1%2").tqarg(DEFER_CATEGORY).tqarg(mDeferDefaultMinutes)); + cats.append(TQString("%1%2").arg(DEFER_CATEGORY).arg(mDeferDefaultMinutes)); if (!mTemplateName.isEmpty() && mTemplateAfterTime >= 0) - cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(mTemplateAfterTime)); + cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(mTemplateAfterTime)); if (mArchive && !original) { TQStringList params; @@ -1032,21 +1032,21 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc unit = 'H'; count /= 60; } - params += TQString("%1%2").tqarg(count).tqarg(unit); + params += TQString("%1%2").arg(count).arg(unit); } if (mArchiveRepeatAtLogin) params += AT_LOGIN_TYPE; if (params.count() > 0) { TQString cat = ARCHIVE_CATEGORIES; - cat += params.join(TQString::tqfromLatin1(";")); + cat += params.join(TQString::fromLatin1(";")); cats.append(cat); } else cats.append(ARCHIVE_CATEGORY); } ev.setCategories(cats); - ev.setCustomtqStatus(mEnabled ? TQString() : DISABLED_STATUS); + ev.setCustomStatus(mEnabled ? TQString() : DISABLED_STATUS); ev.setRevision(mRevision); ev.clearAlarms(); @@ -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. - TQString param = TQString("%1:%2").tqarg(mRepeatInterval).tqarg(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 = TQDate::tqcurrentDate().addDays(-1); + dtl = TQDate::currentDate().addDays(-1); else - dtl = TQDateTime::tqcurrentDateTime(); + dtl = TQDateTime::currentDateTime(); initKCalAlarm(ev, dtl, AT_LOGIN_TYPE); if (!ancillaryType && dtl.isValid()) { @@ -1243,7 +1243,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case KAAlarm::AUDIO_ALARM: alarm->setAudioAlarm(mAudioFile); // empty for a beep or for speaking if (mSpeak) - alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::tqfromLatin1("Y")); + alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::fromLatin1("Y")); if (mRepeatSound) { alarm->setRepeatCount(-1); @@ -1251,9 +1251,9 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL } if (!mAudioFile.isEmpty() && mSoundVolume >= 0) alarm->setCustomProperty(APPNAME, VOLUME_PROPERTY, - TQString::tqfromLatin1("%1;%2;%3").tqarg(TQString::number(mSoundVolume, 'f', 2)) - .tqarg(TQString::number(mFadeVolume, 'f', 2)) - .tqarg(mFadeSeconds)); + 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: setProcedureAlarm(alarm, mPreAction); @@ -1277,9 +1277,9 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case T_MESSAGE: alarm->setDisplayAlarm(AlarmText::toCalendarText(mText)); alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::tqfromLatin1("%1;%2;%3").tqarg(mBgColour.name()) - .tqarg(mFgColour.name()) - .tqarg(mDefaultFont ? TQString() : mFont.toString())); + TQString::fromLatin1("%1;%2;%3").arg(mBgColour.name()) + .arg(mFgColour.name()) + .arg(mDefaultFont ? TQString() : mFont.toString())); break; case T_COMMAND: if (mCommandScript) @@ -1601,7 +1601,7 @@ bool KAEvent::defer(const DateTime& dateTime, bool reminder, bool adjustRecurren set_deferral(NORMAL_DEFERRAL); if (adjustRecurrence) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + 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(TQDateTime::tqcurrentDateTime(), 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; - TQDateTime now = TQDateTime::tqcurrentDateTime(); + 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) - && TQDateTime::tqcurrentDateTime() < 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; @@ -2093,7 +2093,7 @@ TQString KAEvent::recurrenceText(bool brief) const else { TQString mins; - return i18n("Hours and Minutes", "%1H %2M").tqarg(TQString::number(frequency/60)).tqarg(mins.sprintf("%02d", frequency%60)); + 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); @@ -2125,7 +2125,7 @@ TQString KAEvent::repetitionText(bool brief) const if (mRepeatInterval % 60 == 0) return i18n("1 Hour", "%n Hours", mRepeatInterval/60); TQString mins; - return i18n("Hours and Minutes", "%1H %2M").tqarg(TQString::number(mRepeatInterval/60)).tqarg(mins.sprintf("%02d", mRepeatInterval%60)); + 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); @@ -2633,21 +2633,21 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju 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::tqfromLatin1("TEXT:"); - static const TQString FILE_PREFIX = TQString::tqfromLatin1("FILE:"); - static const TQString COMMAND_PREFIX = TQString::tqfromLatin1("CMD:"); + 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 TQString BEEP_CATEGORY = TQString::tqfromLatin1("BEEP"); + static const TQString BEEP_CATEGORY = TQString::fromLatin1("BEEP"); // KAlarm pre-1.1.1 LATECANCEL category with no parameter - static const TQString LATE_CANCEL_CAT = TQString::tqfromLatin1("LATECANCEL"); + static const TQString LATE_CANCEL_CAT = TQString::fromLatin1("LATECANCEL"); // KAlarm pre-1.3.0 TMPLDEFTIME category with no parameter - static const TQString TEMPL_DEF_TIME_CAT = TQString::tqfromLatin1("TMPLDEFTIME"); + static const TQString TEMPL_DEF_TIME_CAT = TQString::fromLatin1("TMPLDEFTIME"); // KAlarm pre-1.3.1 XTERM category - static const TQString EXEC_IN_XTERM_CAT = TQString::tqfromLatin1("XTERM"); + static const TQString EXEC_IN_XTERM_CAT = TQString::fromLatin1("XTERM"); // KAlarm pre-1.4.22 properties static const TQCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property @@ -2818,7 +2818,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * X-KDE-KALARM-FONTCOLOUR property. * Convert BEEP category into an audio alarm with no audio file. */ - if (uidtqStatus(event->uid()) == EXPIRED) + if (uidStatus(event->uid()) == EXPIRED) event->setCreated(event->dtEnd()); TQDateTime start = event->dtStart(); if (event->doesFloat()) @@ -2844,7 +2844,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju Alarm* alarm = *alit; if (alarm->type() == Alarm::Display) alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::tqfromLatin1("%1;;").tqarg(cats[0])); + TQString::fromLatin1("%1;;").arg(cats[0])); } cats.remove(cats.begin()); } @@ -2918,7 +2918,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end()) { cats.remove(it); - cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(0)); + cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0)); } } @@ -2937,7 +2937,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju } if (addLateCancel) - cats.append(TQString("%1%2").tqarg(LATE_CANCEL_CATEGORY).tqarg(1)); + cats.append(TQString("%1%2").arg(LATE_CANCEL_CATEGORY).arg(1)); event->setCategories(cats); diff --git a/kalarm/alarmevent.h b/kalarm/alarmevent.h index b5bc41e2e..20f870b64 100644 --- a/kalarm/alarmevent.h +++ b/kalarm/alarmevent.h @@ -266,7 +266,7 @@ class KAEvent : public KAAlarmEventBase READ_ONLY_FLAGS = 0xF0000 // mask for all read-only internal values }; /** The category of an event, indicated by the middle part of its UID. */ - enum tqStatus + enum Status { ACTIVE, // the event is currently active EXPIRED, // the event has expired @@ -331,7 +331,7 @@ class KAEvent : public KAAlarmEventBase 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(tqStatus s) { mEventID = uid(mEventID, s); mUpdated = true; } + void setUid(Status s) { mEventID = uid(mEventID, s); mUpdated = true; } void setKMailSerialNumber(unsigned long n) { mKMailSerialNumber = n; } void setLogFile(const TQString& logfile); void setReminder(int minutes, bool onceOnly); @@ -408,10 +408,10 @@ class KAEvent : public KAAlarmEventBase bool enabled() const { return mEnabled; } bool updated() const { return mUpdated; } bool mainExpired() const { return mMainExpired; } - bool expired() const { return mDisplaying && mMainExpired || uidtqStatus(mEventID) == EXPIRED; } - tqStatus uidtqStatus() const { return uidtqStatus(mEventID); } - static tqStatus uidtqStatus(const TQString& uid); - static TQString uid(const TQString& id, tqStatus); + bool expired() const { return mDisplaying && mMainExpired || uidStatus(mEventID) == EXPIRED; } + Status uidStatus() const { return uidStatus(mEventID); } + static Status uidStatus(const TQString& uid); + static TQString uid(const TQString& id, Status); static KAEvent findTemplateName(AlarmCalendar&, const TQString& name); struct MonthPos diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp index 355cc4e3e..3e3db18d4 100644 --- a/kalarm/alarmlistview.cpp +++ b/kalarm/alarmlistview.cpp @@ -167,7 +167,7 @@ void AlarmListView::populate() KAEvent event; KCal::Event::List events; KCal::Event::List::ConstIterator it; - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (mShowExpired) { AlarmCalendar* cal = AlarmCalendar::expiredCalendarOpen(); @@ -257,7 +257,7 @@ void AlarmListView::updateTimeToAlarms(bool forceDisplay) { if (forceDisplay || columnWidth(mColumn[TIME_TO_COLUMN])) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + 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) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); for (InstanceListConstIterator it = mInstanceList.begin(); it != mInstanceList.end(); ++it) static_cast<AlarmListView*>(*it)->addEntry(event, now, true, (*it == view)); } @@ -290,7 +290,7 @@ AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const TQDateTim */ EventListViewItemBase* AlarmListView::createItem(const KAEvent& event) { - return new AlarmListViewItem(this, event, TQDateTime::tqcurrentDateTime()); + return new AlarmListViewItem(this, event, TQDateTime::currentDateTime()); } /****************************************************************************** @@ -373,7 +373,7 @@ void AlarmListView::contentsMouseMoveEvent(TQMouseEvent* e) // Create a calendar object containing all the currently selected alarms kdDebug(5950) << "AlarmListView::contentsMouseMoveEvent(): drag started" << endl; mMousePressed = false; - KCal::CalendarLocal cal(TQString::tqfromLatin1("UTC")); + KCal::CalendarLocal cal(TQString::fromLatin1("UTC")); cal.setLocalTime(); // write out using local time (i.e. no time zone) TQValueList<EventListViewItemBase*> items = selectedItems(); if (!items.count()) @@ -503,7 +503,7 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const { // 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 = tqalignment isn't possible/sensible + mTimeHourPos = -1; // default = alignment isn't possible/sensible if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages { TQString fmt = locale->timeFormat(); @@ -514,7 +514,7 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const } if (mTimeHourPos >= 0 && (int)time.length() > mTimeHourPos + 1 && time[mTimeHourPos].isDigit() && !time[mTimeHourPos + 1].isDigit()) - dateTimeText += '~'; // improve tqalignment of times with no leading zeroes + dateTimeText += '~'; // improve alignment of times with no leading zeroes dateTimeText += time; } return dateTimeText + ' '; @@ -531,7 +531,7 @@ TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const if (dateTime.isDateOnly()) { int days = now.date().daysTo(dateTime.date()); - return i18n("n days", " %1d ").tqarg(days); + return i18n("n days", " %1d ").arg(days); } int mins = (now.secsTo(dateTime.dateTime()) + 59) / 60; if (mins < 0) @@ -540,10 +540,10 @@ TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const minutes[0] = (mins%60) / 10 + '0'; minutes[1] = (mins%60) % 10 + '0'; if (mins < 24*60) - return i18n("hours:minutes", " %1:%2 ").tqarg(mins/60).tqarg(minutes); + return i18n("hours:minutes", " %1:%2 ").arg(mins/60).arg(minutes); int days = mins / (24*60); mins = mins % (24*60); - return i18n("days hours:minutes", " %1d %2:%3 ").tqarg(days).tqarg(mins/60).tqarg(minutes); + return i18n("days hours:minutes", " %1d %2:%3 ").arg(days).arg(mins/60).arg(minutes); } /****************************************************************************** @@ -652,7 +652,7 @@ void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, in */ int AlarmListViewItem::typeIconWidth(AlarmListView* v) { - return iconWidth() + 2 * v->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + return iconWidth() + 2 * v->tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth); } /****************************************************************************** @@ -700,7 +700,7 @@ void AlarmListTooltip::maybeTip(const TQPoint& pt) if (columnX + widthNeeded <= listView->viewport()->width()) return; } - TQRect rect = listView->tqitemRect(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 f88ea4a85..7e78cbd5c 100644 --- a/kalarm/alarmlistview.h +++ b/kalarm/alarmlistview.h @@ -108,7 +108,7 @@ class AlarmListView : public EventListViewBase 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, TQDateTime::tqcurrentDateTime(), 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(TQMouseEvent*); diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp index 8bd1d6847..c030c384f 100644 --- a/kalarm/alarmtext.cpp +++ b/kalarm/alarmtext.cpp @@ -32,17 +32,17 @@ TQString AlarmText::mToPrefix; TQString AlarmText::mCcPrefix; TQString AlarmText::mDatePrefix; TQString AlarmText::mSubjectPrefix; -TQString AlarmText::mFromPrefixEn = TQString::tqfromLatin1("From:"); -TQString AlarmText::mToPrefixEn = TQString::tqfromLatin1("To:"); -TQString AlarmText::mCcPrefixEn = TQString::tqfromLatin1("Cc:"); -TQString AlarmText::mDatePrefixEn = TQString::tqfromLatin1("Date:"); -TQString AlarmText::mSubjectPrefixEn = TQString::tqfromLatin1("Subject:"); +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 TQString& text) { mBody = text; - mIsScript = text.startsWith(TQString::tqfromLatin1("#!")); + mIsScript = text.startsWith(TQString::fromLatin1("#!")); mIsEmail = false; mTo = mFrom = mCc = mTime = mSubject = TQString(); mKMailSerialNum = 0; @@ -284,5 +284,5 @@ TQString 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)) + TQString::tqfromLatin1("..."); + return text.left(newline + (maxLines <= 1 ? 0 : 1)) + TQString::fromLatin1("..."); } diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp index 2b907d9a1..e650072ec 100644 --- a/kalarm/alarmtimewidget.cpp +++ b/kalarm/alarmtimewidget.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqhbox.h> #include <tqpushbutton.h> @@ -93,30 +93,30 @@ 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->tqsizeHint()); + mAtTimeRadio->setFixedSize(mAtTimeRadio->sizeHint()); 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->tqsizeHint()); + mDateEdit->setFixedSize(mDateEdit->sizeHint()); 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").tqarg(enterDateText).tqarg(recurText))); + : TQString("%1\n%2").arg(enterDateText).arg(recurText))); mAtTimeRadio->setFocusWidget(mDateEdit); // Time edit box and Any time checkbox TQHBox* timeBox = new TQHBox(this); timeBox->setSpacing(2*KDialog::spacingHint()); mTimeEdit = new TimeEdit(timeBox); - mTimeEdit->setFixedSize(mTimeEdit->tqsizeHint()); + mTimeEdit->setFixedSize(mTimeEdit->sizeHint()); 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").tqarg(enterTimeText).tqarg(TimeSpinBox::shiftWhatsThis()) - : TQString("%1\n%2\n\n%3").tqarg(enterTimeText).tqarg(recurText).tqarg(TimeSpinBox::shiftWhatsThis()))); + ((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) @@ -128,7 +128,7 @@ void AlarmTimeWidget::init(int mode) { mAnyTimeAllowed = true; mAnyTimeCheckBox = new CheckBox(i18n("An&y time"), timeBox); - mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->tqsizeHint()); + mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->sizeHint()); connect(mAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool))); TQWhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day")); } @@ -136,7 +136,7 @@ void AlarmTimeWidget::init(int mode) // '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->tqsizeHint()); + mAfterTimeRadio->setFixedSize(mAfterTimeRadio->sizeHint()); 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."))); @@ -144,14 +144,14 @@ void AlarmTimeWidget::init(int mode) // Delay time spin box mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, this); mDelayTimeEdit->setValue(maxDelayTime); - mDelayTimeEdit->setFixedSize(mDelayTimeEdit->tqsizeHint()); + mDelayTimeEdit->setFixedSize(mDelayTimeEdit->sizeHint()); connect(mDelayTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(delayTimeChanged(int))); TQWhatsThis::add(mDelayTimeEdit, - ((mode & DEFER_TIME) ? TQString("%1\n\n%2").tqarg(i18n_TimeAfterPeriod()).tqarg(TimeSpinBox::shiftWhatsThis()) - : TQString("%1\n%2\n\n%3").tqarg(i18n_TimeAfterPeriod()).tqarg(recurText).tqarg(TimeSpinBox::shiftWhatsThis()))); + ((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 tqlayout, either narrow or wide + // Set up the layout, either narrow or wide if (mode & NARROW) { TQGridLayout* grid = new TQGridLayout(topLayout, 2, 2, KDialog::spacingHint()); @@ -160,10 +160,10 @@ void AlarmTimeWidget::init(int mode) grid->addWidget(timeBox, 1, 1, TQt::AlignAuto); grid->setColStretch(2, 1); topLayout->addStretch(); - TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); - tqlayout->addWidget(mAfterTimeRadio); - tqlayout->addWidget(mDelayTimeEdit); - tqlayout->addStretch(); + TQBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); + layout->addWidget(mAfterTimeRadio); + layout->addWidget(mDelayTimeEdit); + layout->addStretch(); } else { @@ -226,7 +226,7 @@ DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool if (errorWidget) *errorWidget = 0; TQTime nowt = TQTime::currentTime(); - TQDateTime now(TQDate::tqcurrentDate(), TQTime(nowt.hour(), nowt.minute())); + TQDateTime now(TQDate::currentDate(), TQTime(nowt.hour(), nowt.minute())); if (mAtTimeRadio->isOn()) { bool anyTime = mAnyTimeAllowed && mAnyTimeCheckBox && mAnyTimeCheckBox->isChecked(); @@ -328,7 +328,7 @@ void AlarmTimeWidget::setMinDateTimeIsCurrent() { mMinDateTimeIsNow = true; mMinDateTime = TQDateTime(); - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); mDateEdit->setMinDate(now.date()); setMaxMinTimeIf(now); } @@ -342,7 +342,7 @@ void AlarmTimeWidget::setMinDateTime(const TQDateTime& dt) mMinDateTimeIsNow = false; mMinDateTime = dt; mDateEdit->setMinDate(dt.date()); - setMaxMinTimeIf(TQDateTime::tqcurrentDateTime()); + setMaxMinTimeIf(TQDateTime::currentDateTime()); } /****************************************************************************** @@ -357,7 +357,7 @@ void AlarmTimeWidget::setMaxDateTime(const DateTime& dt) else mMaxDateTime = dt.dateTime(); mDateEdit->setMaxDate(mMaxDateTime.date()); - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); setMaxMinTimeIf(now); setMaxDelayTime(now); } @@ -452,13 +452,13 @@ void AlarmTimeWidget::slotTimer() if (mMinDateTimeIsNow) { // Make sure that the minimum date is updated when the day changes - now = TQDateTime::tqcurrentDateTime(); + now = TQDateTime::currentDateTime(); mDateEdit->setMinDate(now.date()); } if (mMaxDateTime.isValid()) { if (!now.isValid()) - now = TQDateTime::tqcurrentDateTime(); + now = TQDateTime::currentDateTime(); if (!mPastMax) { // Check whether the maximum date/time has now been reached @@ -502,7 +502,7 @@ void AlarmTimeWidget::slotButtonSet(int) mAnyTimeCheckBox->setEnabled(at && mAnyTimeAllowed); // Ensure that the value of the delay edit box is > 0. TQDateTime dt(mDateEdit->date(), mTimeEdit->time()); - int minutes = (TQDateTime::tqcurrentDateTime().secsTo(dt) + 59) / 60; + int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60; if (minutes <= 0) mDelayTimeEdit->setValid(true); mDelayTimeEdit->setEnabled(!at); @@ -525,7 +525,7 @@ void AlarmTimeWidget::slotAnyTimeToggled(bool on) void AlarmTimeWidget::dateTimeChanged() { TQDateTime dt(mDateEdit->date(), mTimeEdit->time()); - int minutes = (TQDateTime::tqcurrentDateTime().secsTo(dt) + 59) / 60; + 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()) { - TQDateTime dt = TQDateTime::tqcurrentDateTime().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 a4f438578..3525acf62 100644 --- a/kalarm/alarmtimewidget.h +++ b/kalarm/alarmtimewidget.h @@ -53,7 +53,7 @@ class AlarmTimeWidget : public ButtonGroup bool anyTime() const { return mAnyTime; } void enableAnyTime(bool enable); void selectTimeFromNow(int minutes = 0); - TQSize tqsizeHint() const { return tqminimumSizeHint(); } + TQSize sizeHint() const { return minimumSizeHint(); } static TQString i18n_w_TimeFromNow(); // text of 'Time from now:' radio button, with 'w' shortcut static TQString i18n_TimeAfterPeriod(); diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp index 97e7bc6f7..a9364967c 100644 --- a/kalarm/birthdaydlg.cpp +++ b/kalarm/birthdaydlg.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqgroupbox.h> #include <tqhbox.h> #include <tqlabel.h> @@ -81,15 +81,15 @@ BirthdayDlg::BirthdayDlg(TQWidget* parent) // 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(TQString::tqfromLatin1("General")); - mPrefixText = config->readEntry(TQString::tqfromLatin1("BirthdayPrefix"), i18n("Birthday: ")); - mSuffixText = config->readEntry(TQString::tqfromLatin1("BirthdaySuffix")); + config->setGroup(TQString::fromLatin1("General")); + mPrefixText = config->readEntry(TQString::fromLatin1("BirthdayPrefix"), i18n("Birthday: ")); + mSuffixText = config->readEntry(TQString::fromLatin1("BirthdaySuffix")); TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget); topLayout->addWidget(textGroup); TQLabel* label = new TQLabel(i18n("Pre&fix:"), textGroup); mPrefix = new BLineEdit(mPrefixText, textGroup); - mPrefix->setMinimumSize(mPrefix->tqsizeHint()); + mPrefix->setMinimumSize(mPrefix->sizeHint()); label->setBuddy(mPrefix); connect(mPrefix, TQT_SIGNAL(focusLost()), TQT_SLOT(slotTextLostFocus())); TQWhatsThis::add(mPrefix, @@ -98,7 +98,7 @@ BirthdayDlg::BirthdayDlg(TQWidget* parent) label = new TQLabel(i18n("S&uffix:"), textGroup); mSuffix = new BLineEdit(mSuffixText, textGroup); - mSuffix->setMinimumSize(mSuffix->tqsizeHint()); + mSuffix->setMinimumSize(mSuffix->sizeHint()); label->setBuddy(mSuffix); connect(mSuffix, TQT_SIGNAL(focusLost()), TQT_SLOT(slotTextLostFocus())); TQWhatsThis::add(mSuffix, @@ -128,12 +128,12 @@ BirthdayDlg::BirthdayDlg(TQWidget* parent) // Font and colour choice button and sample text mFontColourButton = new FontColourButton(group); - mFontColourButton->setMaximumHeight(mFontColourButton->tqsizeHint().height() * 3/2); + mFontColourButton->setMaximumHeight(mFontColourButton->sizeHint().height() * 3/2); groupLayout->addWidget(mFontColourButton); // Sound checkbox and file selector mSoundPicker = new SoundPicker(group); - mSoundPicker->setFixedSize(mSoundPicker->tqsizeHint()); + mSoundPicker->setFixedSize(mSoundPicker->sizeHint()); groupLayout->addWidget(mSoundPicker, 0, TQt::AlignAuto); // How much to advance warning to give @@ -142,36 +142,36 @@ BirthdayDlg::BirthdayDlg(TQWidget* parent) i18n("Enter the number of days before each birthday to display a reminder. " "This is in addition to the alarm which is displayed on the birthday."), false, false, group); - mReminder->setFixedSize(mReminder->tqsizeHint()); + mReminder->setFixedSize(mReminder->sizeHint()); mReminder->setMaximum(0, 364); mReminder->setMinutes(0, true); groupLayout->addWidget(mReminder, 0, TQt::AlignAuto); // Acknowledgement confirmation required - default = no confirmation - TQHBoxLayout* tqlayout = new TQHBoxLayout(groupLayout, 2*spacingHint()); + TQHBoxLayout* layout = new TQHBoxLayout(groupLayout, 2*spacingHint()); mConfirmAck = EditAlarmDlg::createConfirmAckCheckbox(group); - tqlayout->addWidget(mConfirmAck); - tqlayout->addSpacing(2*spacingHint()); - tqlayout->addStretch(); + layout->addWidget(mConfirmAck); + layout->addSpacing(2*spacingHint()); + layout->addStretch(); if (ShellProcess::authorised()) // don't display if shell commands not allowed (e.g. kiosk mode) { // Special actions button mSpecialActionsButton = new SpecialActionsButton(i18n("Special Actions..."), group); - tqlayout->addWidget(mSpecialActionsButton); + layout->addWidget(mSpecialActionsButton); } // Late display checkbox - default = allow late display - tqlayout = new TQHBoxLayout(groupLayout, 2*spacingHint()); + layout = new TQHBoxLayout(groupLayout, 2*spacingHint()); mLateCancel = new LateCancelSelector(false, group); - tqlayout->addWidget(mLateCancel); - tqlayout->addStretch(); + layout->addWidget(mLateCancel); + layout->addStretch(); // Sub-repetition button mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), false, group); mSubRepetition->set(0, 0, true, 364*24*60); TQWhatsThis::add(mSubRepetition, i18n("Set up an additional alarm repetition")); - tqlayout->addWidget(mSubRepetition); + layout->addWidget(mSubRepetition); // Set the values to their defaults mFontColourButton->setDefaultFont(); @@ -295,7 +295,7 @@ void BirthdayDlg::updateSelectionList() TQValueList<KAEvent> BirthdayDlg::events() const { TQValueList<KAEvent> list; - TQDate today = TQDate::tqcurrentDate(); + TQDate today = TQDate::currentDate(); TQDateTime todayNoon(today, TQTime(12, 0, 0)); int thisYear = today.year(); int reminder = mReminder->minutes(); @@ -344,9 +344,9 @@ void BirthdayDlg::slotOk() { // Save prefix and suffix texts to use as future defaults KConfig* config = kapp->config(); - config->setGroup(TQString::tqfromLatin1("General")); - config->writeEntry(TQString::tqfromLatin1("BirthdayPrefix"), mPrefix->text()); - config->writeEntry(TQString::tqfromLatin1("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) diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp index 0d049fed0..877084970 100644 --- a/kalarm/calendarcompat.cpp +++ b/kalarm/calendarcompat.cpp @@ -21,7 +21,7 @@ #include "kalarm.h" #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqstringlist.h> #include <kapplication.h> @@ -80,7 +80,7 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVer const TQString& prodid = calendar.productId(); // Find the KAlarm identifier - TQString progname = TQString::tqfromLatin1(" KAlarm "); + TQString progname = TQString::fromLatin1(" KAlarm "); int i = prodid.find(progname, 0, false); if (i < 0) { @@ -124,9 +124,9 @@ bool CalendarCompat::isUTC(const TQString& localFile) file.close(); // Extract the CREATED property for the first VEVENT from the calendar - TQString VCALENDAR = TQString::tqfromLatin1("BEGIN:VCALENDAR"); - TQString VEVENT = TQString::tqfromLatin1("BEGIN:VEVENT"); - TQString CREATED = TQString::tqfromLatin1("CREATED:"); + 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) { diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp index 1f8820bff..4ad785552 100644 --- a/kalarm/daemon.cpp +++ b/kalarm/daemon.cpp @@ -58,7 +58,7 @@ class NotificationHandler : public TQObject, virtual public AlarmGuiIface NotificationHandler(); private: // DCOP interface - void alarmDaemonUpdate(int calendartqStatus, const TQString& calendarURL); + void alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL); void handleEvent(const TQString& calendarURL, const TQString& eventID); void registered(bool reregister, int result, int version); }; @@ -74,7 +74,7 @@ TQTimer* Daemon::mStatusTimer = 0; int Daemon::mStatusTimerCount = 0; int Daemon::mStatusTimerInterval; int Daemon::mStartTimeout = 0; -Daemon::tqStatus Daemon::mtqStatus = Daemon::STOPPED; +Daemon::Status Daemon::mStatus = Daemon::STOPPED; bool Daemon::mRunning = false; bool Daemon::mCalendarDisabled = false; bool Daemon::mEnableCalPending = false; @@ -125,8 +125,8 @@ void Daemon::createDcopHandler() bool Daemon::start() { kdDebug(5950) << "Daemon::start()\n"; - updateRegisteredtqStatus(); - switch (mtqStatus) + updateRegisteredStatus(); + switch (mStatus) { case STOPPED: { @@ -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. - TQString execStr = locate("exe", TQString::tqfromLatin1(DAEMON_APP_NAME)); + TQString execStr = locate("exe", TQString::fromLatin1(DAEMON_APP_NAME)); if (execStr.isEmpty()) { KMessageBox::error(0, i18n("Alarm daemon not found.")); @@ -173,7 +173,7 @@ bool Daemon::registerWith(bool reregister) { if (mRegisterTimer) return true; - switch (mtqStatus) + switch (mStatus) { case STOPPED: case RUNNING: @@ -221,7 +221,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) 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.") - .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)); + .arg(TQString::fromLatin1(DAEMON_APP_NAME)); } else { @@ -236,8 +236,8 @@ 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.)") - .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)) - .tqarg(kapp->aboutData()->appName())); + .arg(TQString::fromLatin1(DAEMON_APP_NAME)) + .arg(kapp->aboutData()->appName())); break; case KAlarmd::FAILURE: default: @@ -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)") - .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)); + .arg(TQString::fromLatin1(DAEMON_APP_NAME)); } break; } @@ -258,8 +258,8 @@ void Daemon::registrationResult(bool reregister, int result, int version) { if (!errmsg.isEmpty()) { - if (mtqStatus == REGISTERED) - mtqStatus = READY; + if (mStatus == REGISTERED) + mStatus = READY; if (!mRegisterFailMsg) { mRegisterFailMsg = true; @@ -272,7 +272,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) if (!reregister) { // The alarm daemon has loaded the calendar - mtqStatus = REGISTERED; + mStatus = REGISTERED; mRegisterFailMsg = false; kdDebug(5950) << "Daemon::start(): daemon startup complete" << endl; } @@ -283,9 +283,9 @@ void Daemon::registrationResult(bool reregister, int result, int version) */ void Daemon::checkIfStarted() { - updateRegisteredtqStatus(); + updateRegisteredStatus(); bool err = false; - switch (mtqStatus) + switch (mStatus) { case STOPPED: if (--mStartTimeout > 0) @@ -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)").tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))); + KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::fromLatin1(DAEMON_APP_NAME))); } } @@ -312,27 +312,27 @@ void Daemon::checkIfStarted() * Check whether the alarm daemon has started yet, and if so, whether it is * ready to accept DCOP calls. */ -void Daemon::updateRegisteredtqStatus(bool timeout) +void Daemon::updateRegisteredStatus(bool timeout) { if (!kapp->dcopClient()->isApplicationRegistered(DAEMON_APP_NAME)) { - mtqStatus = STOPPED; + mStatus = STOPPED; mRegisterFailMsg = false; } else { - switch (mtqStatus) + switch (mStatus) { case STOPPED: // The daemon has newly been detected as registered with DCOP. // Wait for a short time to ensure that it is ready for DCOP calls. - mtqStatus = RUNNING; + mStatus = RUNNING; TQTimer::singleShot(startCheckInterval, mInstance, TQT_SLOT(slotStarted())); break; case RUNNING: if (timeout) { - mtqStatus = READY; + mStatus = READY; start(); } break; @@ -341,7 +341,7 @@ void Daemon::updateRegisteredtqStatus(bool timeout) break; } } - kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mtqStatus << endl; + kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mStatus << 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(TQString::tqfromLatin1(DAEMON_AUTOSTART_SECTION)); - adconfig.writeEntry(TQString::tqfromLatin1(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(TQString::tqfromLatin1(DAEMON_AUTOSTART_SECTION)); - return adconfig.readBoolEntry(TQString::tqfromLatin1(DAEMON_AUTOSTART_KEY), true); + adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION)); + return adconfig.readBoolEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), true); } /****************************************************************************** @@ -491,8 +491,8 @@ bool Daemon::monitoringAlarms() bool Daemon::isRunning(bool startdaemon) { static bool runState = false; - updateRegisteredtqStatus(); - bool newRunState = (mtqStatus == READY || mtqStatus == REGISTERED); + updateRegisteredStatus(); + bool newRunState = (mStatus == READY || mStatus == REGISTERED); if (newRunState != runState) { // Daemon's status has changed @@ -500,7 +500,7 @@ bool Daemon::isRunning(bool startdaemon) if (runState && startdaemon) start(); // re-register with the daemon } - return runState && (mtqStatus == REGISTERED); + return runState && (mStatus == REGISTERED); } /****************************************************************************** @@ -666,10 +666,10 @@ 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 calendartqStatus, const TQString& calendarURL) +void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL) { - kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendartqStatus << ")\n"; - KAlarmd::CalendartqStatus status = KAlarmd::CalendartqStatus(calendartqStatus); + kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendarStatus << ")\n"; + KAlarmd::CalendarStatus status = KAlarmd::CalendarStatus(calendarStatus); if (expandURL(calendarURL) != AlarmCalendar::activeCalendar()->urlString()) return; // it's not a notification about KAlarm's calendar bool enabled = false; @@ -700,7 +700,7 @@ void NotificationHandler::alarmDaemonUpdate(int calendartqStatus, const TQString void NotificationHandler::handleEvent(const TQString& url, const TQString& eventId) { TQString id = eventId; - if (id.startsWith(TQString::tqfromLatin1("ad:"))) + if (id.startsWith(TQString::fromLatin1("ad:"))) { // It's a notification from the alarm deamon id = id.mid(3); diff --git a/kalarm/daemon.h b/kalarm/daemon.h index df3fdd4d2..a43d7a42e 100644 --- a/kalarm/daemon.h +++ b/kalarm/daemon.h @@ -51,11 +51,11 @@ class Daemon : public TQObject static void enableAutoStart(bool enable); static void notifyTimeChanged(); static void setAlarmsEnabled() { mInstance->setAlarmsEnabled(true); } - static void checktqStatus() { checkIfRunning(); } + static void checkStatus() { checkIfRunning(); } static bool monitoringAlarms(); static bool isRunning(bool startDaemon = true); static int maxTimeSinceCheck(); - static bool isRegistered() { return mtqStatus == REGISTERED; } + static bool isRegistered() { return mStatus == REGISTERED; } static void allowRegisterFailMsg() { mRegisterFailMsg = false; } static void queueEvent(const TQString& eventID); @@ -68,15 +68,15 @@ class Daemon : public TQObject private slots: void slotCalendarSaved(AlarmCalendar*); void checkIfStarted(); - void slotStarted() { updateRegisteredtqStatus(true); } - void registerTimerExpired() { registrationResult((mtqStatus == REGISTERED), KAlarmd::FAILURE); } + void slotStarted() { updateRegisteredStatus(true); } + void registerTimerExpired() { registrationResult((mStatus == REGISTERED), KAlarmd::FAILURE); } void setAlarmsEnabled(bool enable); void timerCheckIfRunning(); void slotPreferencesChanged(); private: - enum tqStatus // daemon status. KEEP IN THIS ORDER!! + enum Status // daemon status. KEEP IN THIS ORDER!! { STOPPED, // daemon is not registered with DCOP RUNNING, // daemon is newly registered with DCOP @@ -88,7 +88,7 @@ class Daemon : public TQObject static void registrationResult(bool reregister, int result, int version = 0); static void reload(); static void notifyEventHandled(const TQString& eventID, bool reloadCal); - static void updateRegisteredtqStatus(bool timeout = false); + static void updateRegisteredStatus(bool timeout = false); static void enableCalendar(bool enable); static void calendarIsEnabled(bool enabled); static bool checkIfRunning(); @@ -104,7 +104,7 @@ class Daemon : public TQObject 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 - static tqStatus mtqStatus; // daemon status + static Status mStatus; // daemon status static bool mRunning; // whether the alarm daemon is currently running static bool mCalendarDisabled; // monitoring of calendar is currently disabled by daemon static bool mEnableCalPending; // waiting to tell daemon to enable calendar diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp index f1a08df8a..5fa716e16 100644 --- a/kalarm/dcophandler.cpp +++ b/kalarm/dcophandler.cpp @@ -342,7 +342,7 @@ DateTime DcopHandler::convertStartDateTime(const TQString& startDateTime) else { // It's a time, so use today as the date - start.set(TQDate::tqcurrentDate(), TQTime::fromString(t, Qt::ISODate)); + start.set(TQDate::currentDate(), TQTime::fromString(t, Qt::ISODate)); } } if (!start.isValid()) diff --git a/kalarm/deferdlg.cpp b/kalarm/deferdlg.cpp index 8c7edd3ce..059d7a79b 100644 --- a/kalarm/deferdlg.cpp +++ b/kalarm/deferdlg.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <kglobal.h> #include <klocale.h> @@ -48,14 +48,14 @@ DeferAlarmDlg::DeferAlarmDlg(const TQString& caption, const DateTime& initialDT, TQWidget* page = new TQWidget(this); setMainWidget(page); - TQVBoxLayout* tqlayout = new TQVBoxLayout(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, TQT_SIGNAL(pastMax()), TQT_SLOT(slotPastLimit())); - tqlayout->addWidget(mTimeWidget); - tqlayout->addSpacing(spacingHint()); + layout->addWidget(mTimeWidget); + layout->addSpacing(spacingHint()); setButtonWhatsThis(Ok, i18n("Defer the alarm until the specified time.")); setButtonWhatsThis(User1, i18n("Cancel the deferred alarm. This does not affect future recurrences.")); @@ -107,7 +107,7 @@ void DeferAlarmDlg::slotOk() case KAEvent::LIMIT_NONE: break; // can't happen with a valid endTime } - KMessageBox::sorry(this, text.tqarg(endTime.formatLocale())); + KMessageBox::sorry(this, text.arg(endTime.formatLocale())); } else accept(); diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp index 15a2b38ae..02f16912a 100644 --- a/kalarm/editdlg.cpp +++ b/kalarm/editdlg.cpp @@ -22,7 +22,7 @@ #include <limits.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpopupmenu.h> #include <tqvbox.h> #include <tqgroupbox.h> @@ -129,10 +129,10 @@ inline TQString recurText(const KAEvent& event) { TQString r; if (event.repeatCount()) - r = TQString::tqfromLatin1("%1 / %2").tqarg(event.recurrenceText()).tqarg(event.repetitionText()); + r = TQString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText()); else r = event.recurrenceText(); - return i18n("&Recurrence - [%1]").tqarg(r); + return i18n("&Recurrence - [%1]").arg(r); } // Collect these widget labels together to ensure consistent wording and @@ -196,12 +196,12 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par TQHBox* box = new TQHBox(mainWidget); box->setSpacing(spacingHint()); TQLabel* label = new TQLabel(i18n("Template name:"), box); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); mTemplateName = new TQLineEdit(box); mTemplateName->setReadOnly(mReadOnly); label->setBuddy(mTemplateName); TQWhatsThis::add(box, i18n("Enter the name of the alarm template")); - box->setFixedHeight(box->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); } mTabs = new TQTabWidget(mainWidget); mTabs->setMargin(marginHint()); @@ -230,13 +230,13 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par mActionGroup = new ButtonGroup(i18n("Action"), mainPage, "actionGroup"); connect(mActionGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotAlarmTypeChanged(int))); topLayout->addWidget(mActionGroup, 1); - TQBoxLayout* tqlayout = new TQVBoxLayout(mActionGroup, marginHint(), spacingHint()); - tqlayout->addSpacing(fontMetrics().lineSpacing()/2); - TQGridLayout* grid = new TQGridLayout(tqlayout, 1, 5); + TQBoxLayout* layout = new TQVBoxLayout(mActionGroup, marginHint(), spacingHint()); + layout->addSpacing(fontMetrics().lineSpacing()/2); + TQGridLayout* grid = new TQGridLayout(layout, 1, 5); // Message radio button mMessageRadio = new RadioButton(i18n("Te&xt"), mActionGroup, "messageButton"); - mMessageRadio->setFixedSize(mMessageRadio->tqsizeHint()); + mMessageRadio->setFixedSize(mMessageRadio->sizeHint()); TQWhatsThis::add(mMessageRadio, i18n("If checked, the alarm will display a text message.")); grid->addWidget(mMessageRadio, 1, 0); @@ -244,7 +244,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par // File radio button mFileRadio = new PickAlarmFileRadio(i18n("&File"), mActionGroup, "fileButton"); - mFileRadio->setFixedSize(mFileRadio->tqsizeHint()); + mFileRadio->setFixedSize(mFileRadio->sizeHint()); TQWhatsThis::add(mFileRadio, i18n("If checked, the alarm will display the contents of a text or image file.")); grid->addWidget(mFileRadio, 1, 2); @@ -252,7 +252,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par // Command radio button mCommandRadio = new RadioButton(i18n("Co&mmand"), mActionGroup, "cmdButton"); - mCommandRadio->setFixedSize(mCommandRadio->tqsizeHint()); + mCommandRadio->setFixedSize(mCommandRadio->sizeHint()); TQWhatsThis::add(mCommandRadio, i18n("If checked, the alarm will execute a shell command.")); grid->addWidget(mCommandRadio, 1, 4); @@ -260,81 +260,81 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par // Email radio button mEmailRadio = new RadioButton(i18n("&Email"), mActionGroup, "emailButton"); - mEmailRadio->setFixedSize(mEmailRadio->tqsizeHint()); + mEmailRadio->setFixedSize(mEmailRadio->sizeHint()); TQWhatsThis::add(mEmailRadio, i18n("If checked, the alarm will send an email.")); grid->addWidget(mEmailRadio, 1, 6); initDisplayAlarms(mActionGroup); - tqlayout->addWidget(mDisplayAlarmsFrame); + layout->addWidget(mDisplayAlarmsFrame); initCommand(mActionGroup); - tqlayout->addWidget(mCommandFrame); + layout->addWidget(mCommandFrame); initEmail(mActionGroup); - tqlayout->addWidget(mEmailFrame); + layout->addWidget(mEmailFrame); // Deferred date/time: visible only for a deferred recurring event. mDeferGroup = new TQGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup"); topLayout->addWidget(mDeferGroup); TQLabel* label = new TQLabel(i18n("Deferred to:"), mDeferGroup); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); mDeferTimeLabel = new TQLabel(mDeferGroup); mDeferChangeButton = new TQPushButton(i18n("C&hange..."), mDeferGroup); - mDeferChangeButton->setFixedSize(mDeferChangeButton->tqsizeHint()); + mDeferChangeButton->setFixedSize(mDeferChangeButton->sizeHint()); 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); - tqlayout = new TQHBoxLayout(topLayout); + layout = new TQHBoxLayout(topLayout); // Date and time entry if (mTemplate) { mTemplateTimeGroup = new ButtonGroup(i18n("Time"), mainPage, "templateGroup"); connect(mTemplateTimeGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotTemplateTimeType(int))); - tqlayout->addWidget(mTemplateTimeGroup); + layout->addWidget(mTemplateTimeGroup); grid = new TQGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint()); grid->addRowSpacing(0, fontMetrics().lineSpacing()/2); - // Get tqalignment to use in TQGridLayout (AlignAuto doesn't work correctly there) - int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there) + int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; mTemplateDefaultTime = new RadioButton(i18n("&Default time"), mTemplateTimeGroup, "templateDefTimeButton"); - mTemplateDefaultTime->setFixedSize(mTemplateDefaultTime->tqsizeHint()); + mTemplateDefaultTime->setFixedSize(mTemplateDefaultTime->sizeHint()); mTemplateDefaultTime->setReadOnly(mReadOnly); 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, tqalignment); + grid->addWidget(mTemplateDefaultTime, 0, 0, alignment); TQHBox* box = new TQHBox(mTemplateTimeGroup); box->setSpacing(spacingHint()); mTemplateUseTime = new RadioButton(i18n("Time:"), box, "templateTimeButton"); - mTemplateUseTime->setFixedSize(mTemplateUseTime->tqsizeHint()); + mTemplateUseTime->setFixedSize(mTemplateUseTime->sizeHint()); mTemplateUseTime->setReadOnly(mReadOnly); 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->tqsizeHint()); + mTemplateTime->setFixedSize(mTemplateTime->sizeHint()); mTemplateTime->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateTime, - TQString("%1\n\n%2").tqarg(i18n("Enter the start time for alarms based on this template.")) - .tqarg(TimeSpinBox::shiftWhatsThis())); + TQString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template.")) + .arg(TimeSpinBox::shiftWhatsThis())); box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls - box->setFixedHeight(box->tqsizeHint().height()); - grid->addWidget(box, 0, 1, tqalignment); + box->setFixedHeight(box->sizeHint().height()); + grid->addWidget(box, 0, 1, alignment); mTemplateAnyTime = new RadioButton(i18n("An&y time"), mTemplateTimeGroup, "templateAnyTimeButton"); - mTemplateAnyTime->setFixedSize(mTemplateAnyTime->tqsizeHint()); + mTemplateAnyTime->setFixedSize(mTemplateAnyTime->sizeHint()); mTemplateAnyTime->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateAnyTime, - i18n("Set the '%1' option for alarms based on this template.").tqarg(i18n("Any time"))); - grid->addWidget(mTemplateAnyTime, 1, 0, tqalignment); + i18n("Set the '%1' option for alarms based on this template.").arg(i18n("Any time"))); + grid->addWidget(mTemplateAnyTime, 1, 0, alignment); box = new TQHBox(mTemplateTimeGroup); box->setSpacing(spacingHint()); mTemplateUseTimeAfter = new RadioButton(AlarmTimeWidget::i18n_w_TimeFromNow(), box, "templateFromNowButton"); - mTemplateUseTimeAfter->setFixedSize(mTemplateUseTimeAfter->tqsizeHint()); + mTemplateUseTimeAfter->setFixedSize(mTemplateUseTimeAfter->sizeHint()); mTemplateUseTimeAfter->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateUseTimeAfter, i18n("Set alarms based on this template to start after the specified time " @@ -342,15 +342,15 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par mTemplateTimeGroup->insert(mTemplateUseTimeAfter); mTemplateTimeAfter = new TimeSpinBox(1, maxDelayTime, box); mTemplateTimeAfter->setValue(1439); - mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->tqsizeHint()); + mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->sizeHint()); mTemplateTimeAfter->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateTimeAfter, - TQString("%1\n\n%2").tqarg(AlarmTimeWidget::i18n_TimeAfterPeriod()) - .tqarg(TimeSpinBox::shiftWhatsThis())); - box->setFixedHeight(box->tqsizeHint().height()); - grid->addWidget(box, 1, 1, tqalignment); + TQString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod()) + .arg(TimeSpinBox::shiftWhatsThis())); + box->setFixedHeight(box->sizeHint().height()); + grid->addWidget(box, 1, 1, alignment); - tqlayout->addStretch(); + layout->addStretch(); } else { @@ -363,9 +363,9 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par 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)."), - TQString("%1\n\n%2").tqarg(reminderText).tqarg(TimeSpinBox::shiftWhatsThis()), + TQString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()), true, true, mainPage); - mReminder->setFixedSize(mReminder->tqsizeHint()); + mReminder->setFixedSize(mReminder->sizeHint()); topLayout->addWidget(mReminder, 0, TQt::AlignAuto); // Late cancel selector - default = allow late display @@ -373,20 +373,20 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par topLayout->addWidget(mLateCancel, 0, TQt::AlignAuto); // Acknowledgement confirmation required - default = no confirmation - tqlayout = new TQHBoxLayout(topLayout, 0); + layout = new TQHBoxLayout(topLayout, 0); mConfirmAck = createConfirmAckCheckbox(mainPage); - mConfirmAck->setFixedSize(mConfirmAck->tqsizeHint()); - tqlayout->addWidget(mConfirmAck); - tqlayout->addSpacing(2*spacingHint()); - tqlayout->addStretch(); + mConfirmAck->setFixedSize(mConfirmAck->sizeHint()); + layout->addWidget(mConfirmAck); + layout->addSpacing(2*spacingHint()); + layout->addStretch(); if (theApp()->korganizerEnabled()) { // Show in KOrganizer checkbox mShowInKorganizer = new CheckBox(i18n_ShowInKOrganizer(), mainPage); - mShowInKorganizer->setFixedSize(mShowInKorganizer->tqsizeHint()); + mShowInKorganizer->setFixedSize(mShowInKorganizer->sizeHint()); TQWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar")); - tqlayout->addWidget(mShowInKorganizer); + layout->addWidget(mShowInKorganizer); } setButtonWhatsThis(Ok, i18n("Schedule the alarm at the specified time.")); @@ -436,40 +436,40 @@ void EditAlarmDlg::initDisplayAlarms(TQWidget* parent) // File browse button mFileBrowseButton = new TQPushButton(mFileBox); mFileBrowseButton->setPixmap(SmallIcon("fileopen")); - mFileBrowseButton->setFixedSize(mFileBrowseButton->tqsizeHint()); + mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint()); 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 mFontColourButton = new FontColourButton(mDisplayAlarmsFrame); - mFontColourButton->setMaximumHeight(mFontColourButton->tqsizeHint().height()); + mFontColourButton->setMaximumHeight(mFontColourButton->sizeHint().height()); frameLayout->addWidget(mFontColourButton); - TQHBoxLayout* tqlayout = new TQHBoxLayout(frameLayout, 0, 0); + TQHBoxLayout* layout = new TQHBoxLayout(frameLayout, 0, 0); mBgColourBox = new TQHBox(mDisplayAlarmsFrame); mBgColourBox->setSpacing(spacingHint()); - tqlayout->addWidget(mBgColourBox); - tqlayout->addStretch(); + layout->addWidget(mBgColourBox); + layout->addStretch(); TQLabel* label = new TQLabel(i18n("&Background color:"), mBgColourBox); mBgColourButton = new ColourCombo(mBgColourBox); label->setBuddy(mBgColourButton); TQWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color")); // Sound checkbox and file selector - tqlayout = new TQHBoxLayout(frameLayout); + layout = new TQHBoxLayout(frameLayout); mSoundPicker = new SoundPicker(mDisplayAlarmsFrame); - mSoundPicker->setFixedSize(mSoundPicker->tqsizeHint()); - tqlayout->addWidget(mSoundPicker); - tqlayout->addSpacing(2*spacingHint()); - tqlayout->addStretch(); + mSoundPicker->setFixedSize(mSoundPicker->sizeHint()); + layout->addWidget(mSoundPicker); + layout->addSpacing(2*spacingHint()); + layout->addStretch(); if (ShellProcess::authorised()) // don't display if shell commands not allowed (e.g. kiosk mode) { // Special actions button mSpecialActionsButton = new SpecialActionsButton(i18n_SpecialActions(), mDisplayAlarmsFrame); - mSpecialActionsButton->setFixedSize(mSpecialActionsButton->tqsizeHint()); - tqlayout->addWidget(mSpecialActionsButton); + mSpecialActionsButton->setFixedSize(mSpecialActionsButton->sizeHint()); + layout->addWidget(mSpecialActionsButton); } // Top-adjust the controls @@ -488,7 +488,7 @@ void EditAlarmDlg::initCommand(TQWidget* parent) TQBoxLayout* frameLayout = new TQVBoxLayout(mCommandFrame, 0, spacingHint()); mCmdTypeScript = new CheckBox(i18n_p_EnterScript(), mCommandFrame); - mCmdTypeScript->setFixedSize(mCmdTypeScript->tqsizeHint()); + mCmdTypeScript->setFixedSize(mCmdTypeScript->sizeHint()); 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, TQt::AlignAuto); @@ -505,20 +505,20 @@ void EditAlarmDlg::initCommand(TQWidget* parent) mCmdOutputGroup = new ButtonGroup(i18n("Command Output"), mCommandFrame); frameLayout->addWidget(mCmdOutputGroup); - TQBoxLayout* tqlayout = new TQVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint()); - tqlayout->addSpacing(fontMetrics().lineSpacing()/2); + 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->tqsizeHint()); + button->setFixedSize(button->sizeHint()); TQWhatsThis::add(button, i18n("Check to execute the command in a terminal window")); mCmdOutputGroup->insert(button, EXEC_IN_TERMINAL); - tqlayout->addWidget(button, 0, TQt::AlignAuto); + layout->addWidget(button, 0, TQt::AlignAuto); // Log file name edit box TQHBox* box = new TQHBox(mCmdOutputGroup); (new TQWidget(box))->setFixedWidth(button->tqstyle().subRect(TQStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box -// (new TQWidget(box))->setFixedWidth(button->style().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth)); // 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); TQWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file.")); @@ -527,25 +527,25 @@ void EditAlarmDlg::initCommand(TQWidget* parent) // The file browser dialogue is activated by the PickLogFileRadio class. TQPushButton* browseButton = new TQPushButton(box); browseButton->setPixmap(SmallIcon("fileopen")); - browseButton->setFixedSize(browseButton->tqsizeHint()); + browseButton->setFixedSize(browseButton->sizeHint()); 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->tqsizeHint()); + button->setFixedSize(button->sizeHint()); 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); - tqlayout->addWidget(button, 0, TQt::AlignAuto); - tqlayout->addWidget(box); + layout->addWidget(button, 0, TQt::AlignAuto); + layout->addWidget(box); // Discard output button = new RadioButton(i18n("Discard"), mCmdOutputGroup, "cmdDiscard"); - button->setFixedSize(button->tqsizeHint()); + button->setFixedSize(button->sizeHint()); TQWhatsThis::add(button, i18n("Check to discard command output.")); mCmdOutputGroup->insert(button, DISCARD_OUTPUT); - tqlayout->addWidget(button, 0, TQt::AlignAuto); + layout->addWidget(button, 0, TQt::AlignAuto); // Top-adjust the controls mCmdPadding = new TQHBox(mCommandFrame); @@ -560,8 +560,8 @@ void EditAlarmDlg::initEmail(TQWidget* parent) { mEmailFrame = new TQFrame(parent); mEmailFrame->setFrameStyle(TQFrame::NoFrame); - TQBoxLayout* tqlayout = new TQVBoxLayout(mEmailFrame, 0, spacingHint()); - TQGridLayout* grid = new TQGridLayout(tqlayout, 3, 3, spacingHint()); + TQBoxLayout* layout = new TQVBoxLayout(mEmailFrame, 0, spacingHint()); + TQGridLayout* grid = new TQGridLayout(layout, 3, 3, spacingHint()); grid->setColStretch(1, 1); mEmailFromList = 0; @@ -569,11 +569,11 @@ void EditAlarmDlg::initEmail(TQWidget* parent) { // Email sender identity TQLabel* label = new TQLabel(i18n_EmailFrom(), mEmailFrame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 0, 0); mEmailFromList = new EmailIdCombo(KAMail::identityManager(), mEmailFrame); - mEmailFromList->setMinimumSize(mEmailFromList->tqsizeHint()); + mEmailFromList->setMinimumSize(mEmailFromList->sizeHint()); label->setBuddy(mEmailFromList); TQWhatsThis::add(mEmailFromList, i18n("Your email identity, used to identify you as the sender when sending email alarms.")); @@ -582,11 +582,11 @@ void EditAlarmDlg::initEmail(TQWidget* parent) // Email recipients TQLabel* label = new TQLabel(i18n_EmailTo(), mEmailFrame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 1, 0); mEmailToEdit = new LineEdit(LineEdit::Emails, mEmailFrame); - mEmailToEdit->setMinimumSize(mEmailToEdit->tqsizeHint()); + mEmailToEdit->setMinimumSize(mEmailToEdit->sizeHint()); TQWhatsThis::add(mEmailToEdit, i18n("Enter the addresses of the email recipients. Separate multiple addresses by " "commas or semicolons.")); @@ -594,7 +594,7 @@ void EditAlarmDlg::initEmail(TQWidget* parent) mEmailAddressButton = new TQPushButton(mEmailFrame); mEmailAddressButton->setPixmap(SmallIcon("contents")); - mEmailAddressButton->setFixedSize(mEmailAddressButton->tqsizeHint()); + mEmailAddressButton->setFixedSize(mEmailAddressButton->sizeHint()); 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.")); @@ -602,11 +602,11 @@ void EditAlarmDlg::initEmail(TQWidget* parent) // Email subject label = new TQLabel(i18n_j_EmailSubject(), mEmailFrame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 2, 0); mEmailSubjectEdit = new LineEdit(mEmailFrame); - mEmailSubjectEdit->setMinimumSize(mEmailSubjectEdit->tqsizeHint()); + mEmailSubjectEdit->setMinimumSize(mEmailSubjectEdit->sizeHint()); label->setBuddy(mEmailSubjectEdit); TQWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject.")); grid->addMultiCellWidget(mEmailSubjectEdit, 2, 2, 1, 2); @@ -614,19 +614,19 @@ void EditAlarmDlg::initEmail(TQWidget* parent) // Email body mEmailMessageEdit = new TextEdit(mEmailFrame); TQWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message.")); - tqlayout->addWidget(mEmailMessageEdit); + layout->addWidget(mEmailMessageEdit); // Email attachments - grid = new TQGridLayout(tqlayout, 2, 3, spacingHint()); + grid = new TQGridLayout(layout, 2, 3, spacingHint()); label = new TQLabel(i18n("Attachment&s:"), mEmailFrame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 0, 0); mEmailAttachList = new TQComboBox(true, mEmailFrame); - mEmailAttachList->setMinimumSize(mEmailAttachList->tqsizeHint()); + mEmailAttachList->setMinimumSize(mEmailAttachList->sizeHint()); mEmailAttachList->lineEdit()->setReadOnly(true); TQListBox* list = mEmailAttachList->listBox(); -TQRect rect = list->tqgeometry(); +TQRect rect = list->geometry(); list->setGeometry(rect.left() - 50, rect.top(), rect.width(), rect.height()); label->setBuddy(mEmailAttachList); TQWhatsThis::add(mEmailAttachList, @@ -646,7 +646,7 @@ list->setGeometry(rect.left() - 50, rect.top(), rect.width(), rect.height()); // BCC email to sender mEmailBcc = new CheckBox(i18n_s_CopyEmailToSelf(), mEmailFrame); - mEmailBcc->setFixedSize(mEmailBcc->tqsizeHint()); + mEmailBcc->setFixedSize(mEmailBcc->sizeHint()); TQWhatsThis::add(mEmailBcc, i18n("If checked, the email will be blind copied to you.")); grid->addMultiCellWidget(mEmailBcc, 1, 1, 0, 1, TQt::AlignAuto); @@ -708,7 +708,7 @@ void EditAlarmDlg::initialise(const KAEvent* event) if (event->isTemplate()) { // Initialising from an alarm template: use current date - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); int afterTime = event->templateAfterTime(); if (afterTime >= 0) { @@ -728,7 +728,7 @@ void EditAlarmDlg::initialise(const KAEvent* event) else { mExpiredRecurrence = recurs && event->mainExpired(); - mTimeWidget->setDateTime(recurs || event->uidtqStatus() == KAEvent::EXPIRED ? event->startDateTime() + mTimeWidget->setDateTime(recurs || event->uidStatus() == KAEvent::EXPIRED ? event->startDateTime() : event->mainExpired() ? event->deferDateTime() : event->mainDateTime()); } } @@ -750,7 +750,7 @@ void EditAlarmDlg::initialise(const KAEvent* event) TimePeriod::HOURS_MINUTES); mLateCancel->showAutoClose(action == KAEvent::MESSAGE || action == KAEvent::FILE); mLateCancel->setAutoClose(event->autoClose()); - mLateCancel->setFixedSize(mLateCancel->tqsizeHint()); + mLateCancel->setFixedSize(mLateCancel->sizeHint()); if (mShowInKorganizer) mShowInKorganizer->setChecked(event->copyToKOrganizer()); mConfirmAck->setChecked(event->confirmAck()); @@ -804,7 +804,7 @@ void EditAlarmDlg::initialise(const KAEvent* event) mFontColourButton->setBgColour(Preferences::defaultBgColour()); mFontColourButton->setFgColour(Preferences::defaultFgColour()); mBgColourButton->setColour(Preferences::defaultBgColour()); - TQDateTime defaultTime = TQDateTime::tqcurrentDateTime().addSecs(60); + TQDateTime defaultTime = TQDateTime::currentDateTime().addSecs(60); if (mTemplate) { mTemplateTimeGroup->setButton(mTemplateTimeGroup->id(mTemplateDefaultTime)); @@ -817,7 +817,7 @@ void EditAlarmDlg::initialise(const KAEvent* event) mLateCancel->setMinutes((Preferences::defaultLateCancel() ? 1 : 0), false, TimePeriod::HOURS_MINUTES); mLateCancel->showAutoClose(true); mLateCancel->setAutoClose(Preferences::defaultAutoClose()); - mLateCancel->setFixedSize(mLateCancel->tqsizeHint()); + mLateCancel->setFixedSize(mLateCancel->sizeHint()); if (mShowInKorganizer) mShowInKorganizer->setChecked(Preferences::defaultCopyToKOrganizer()); mConfirmAck->setChecked(Preferences::defaultConfirmAck()); @@ -1212,7 +1212,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial) if (mRecurrenceEdit->repeatType() != RecurrenceEdit::NO_RECUR) { mRecurrenceEdit->updateEvent(event, !mTemplate); - TQDateTime now = TQDateTime::tqcurrentDateTime(); + 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 TQString& text, bool trial) DateTime remindTime = mAlarmDateTime.addMins(-reminder); if (mDeferDateTime >= remindTime) { - if (remindTime > TQDateTime::tqcurrentDateTime()) + 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 @@ -1298,7 +1298,7 @@ void EditAlarmDlg::showEvent(TQShowEvent* se) if (KAlarm::readConfigWindowSize(EDIT_DIALOG_NAME, s)) s.setHeight(s.height() + (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight)); else - s = tqminimumSize(); + s = minimumSize(); resize(s); } KWin::setOnDesktop(winId(), mDesktop); // ensure it displays on the desktop expected by the user @@ -1381,7 +1381,7 @@ void EditAlarmDlg::slotOk() { if (timedRecurrence) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (mAlarmDateTime.date() < now.date() || mAlarmDateTime.date() == now.date() && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()) @@ -1424,7 +1424,7 @@ void EditAlarmDlg::slotOk() mTabs->setCurrentPage(mMainPageIndex); mReminder->setFocusOnCount(); KMessageBox::sorry(this, i18n("Reminder period must be less than the recurrence interval, unless '%1' is checked." - ).tqarg(Reminder::i18n_first_recurrence_only())); + ).arg(Reminder::i18n_first_recurrence_only())); return; } } @@ -1479,15 +1479,15 @@ void EditAlarmDlg::slotTry() if (mCommandRadio->isOn() && mCmdOutputGroup->selectedId() != EXEC_IN_TERMINAL) { theApp()->commandMessage((ShellProcess*)proc, this); - KMessageBox::information(this, i18n("Command executed:\n%1").tqarg(text)); + KMessageBox::information(this, i18n("Command executed:\n%1").arg(text)); theApp()->commandMessage((ShellProcess*)proc, 0); } else if (mEmailRadio->isOn()) { TQString bcc; if (mEmailBcc->isChecked()) - bcc = i18n("\nBcc: %1").tqarg(Preferences::emailBccAddress()); - KMessageBox::information(this, i18n("Email sent to:\n%1%2").tqarg(mEmailAddresses.join("\n")).tqarg(bcc)); + bcc = i18n("\nBcc: %1").arg(Preferences::emailBccAddress()); + KMessageBox::information(this, i18n("Email sent to:\n%1%2").arg(mEmailAddresses.join("\n")).arg(bcc)); } } } @@ -1530,7 +1530,7 @@ void EditAlarmDlg::slotEditDeferral() return; limit = false; } - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (limit) { if (repeatCount && start < now) @@ -1557,7 +1557,7 @@ void EditAlarmDlg::slotEditDeferral() if (reminder) { DateTime remindTime = start.addMins(-reminder); - if (TQDateTime::tqcurrentDateTime() < remindTime) + if (TQDateTime::currentDateTime() < remindTime) start = remindTime; } deferDlg.setLimit(start.addSecs(-60)); @@ -1604,7 +1604,7 @@ void EditAlarmDlg::slotShowRecurrenceEdit() mRecurPageIndex = mTabs->currentPageIndex(); if (!mReadOnly && !mTemplate) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); mAlarmDateTime = mTimeWidget->getDateTime(0, false, false); bool expired = (mAlarmDateTime.dateTime() < now); if (mRecurSetDefaultEndDate) @@ -1728,7 +1728,7 @@ bool EditAlarmDlg::checkEmailData() if (!bad.isEmpty()) { mEmailToEdit->setFocus(); - KMessageBox::error(this, i18n("Invalid email address:\n%1").tqarg(bad)); + KMessageBox::error(this, i18n("Invalid email address:\n%1").arg(bad)); return false; } } @@ -1752,7 +1752,7 @@ bool EditAlarmDlg::checkEmailData() break; // empty case -1: mEmailAttachList->setFocus(); - KMessageBox::error(this, i18n("Invalid email attachment:\n%1").tqarg(att)); + KMessageBox::error(this, i18n("Invalid email attachment:\n%1").arg(att)); return false; } } @@ -1826,7 +1826,7 @@ void EditAlarmDlg::slotAlarmTypeChanged(int) focus = mEmailToEdit; } mLateCancel->showAutoClose(displayAlarm); - mLateCancel->setFixedSize(mLateCancel->tqsizeHint()); + mLateCancel->setFixedSize(mLateCancel->sizeHint()); if (focus) focus->setFocus(); } @@ -1948,7 +1948,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE }; Err err = NONE; KURL url; - int i = alarmtext.find(TQString::tqfromLatin1("/")); + int i = alarmtext.find(TQString::fromLatin1("/")); if (i > 0 && alarmtext[i - 1] == ':') { url = alarmtext; @@ -1973,7 +1973,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const TQDir::setCurrent(TQDir::homeDirPath()); alarmtext = info.absFilePath(); url.setPath(alarmtext); - alarmtext = TQString::tqfromLatin1("file:") + alarmtext; + alarmtext = TQString::fromLatin1("file:") + alarmtext; if (!err) { if (info.isDir()) err = DIRECTORY; @@ -2012,7 +2012,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const default: break; } - if (KMessageBox::warningContinueCancel(const_cast<EditAlarmDlg*>(this), errmsg.tqarg(alarmtext)) + if (KMessageBox::warningContinueCancel(const_cast<EditAlarmDlg*>(this), errmsg.arg(alarmtext)) == KMessageBox::Cancel) return false; } @@ -2030,7 +2030,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const TextEdit::TextEdit(TQWidget* parent, const char* name) : KTextEdit(parent, name) { - TQSize tsize = tqsizeHint(); + TQSize tsize = sizeHint(); tsize.setHeight(fontMetrics().lineSpacing()*13/4 + 2*frameWidth()); setMinimumSize(tsize); } diff --git a/kalarm/find.cpp b/kalarm/find.cpp index 560fcfd95..29ba4a6d2 100644 --- a/kalarm/find.cpp +++ b/kalarm/find.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <tqgroupbox.h> #include <tqcheckbox.h> @@ -93,21 +93,21 @@ void Find::display() TQWidget* kalarmWidgets = mDialog->findExtension(); // Alarm types - TQBoxLayout* tqlayout = new TQVBoxLayout(kalarmWidgets, 0, KDialog::spacingHint()); + TQBoxLayout* layout = new TQVBoxLayout(kalarmWidgets, 0, KDialog::spacingHint()); TQGroupBox* group = new TQGroupBox(i18n("Alarm Type"), kalarmWidgets); - tqlayout->addWidget(group); + layout->addWidget(group); 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 TQCheckBox(i18n("Acti&ve"), group); - mLive->setFixedSize(mLive->tqsizeHint()); + mLive->setFixedSize(mLive->sizeHint()); TQWhatsThis::add(mLive, i18n("Check to include active alarms in the search.")); grid->addWidget(mLive, 1, 0, TQt::AlignAuto); mExpired = new TQCheckBox(i18n("Ex&pired"), group); - mExpired->setFixedSize(mExpired->tqsizeHint()); + mExpired->setFixedSize(mExpired->sizeHint()); TQWhatsThis::add(mExpired, i18n("Check to include expired alarms in the search. " "This option is only available if expired alarms are currently being displayed.")); @@ -118,22 +118,22 @@ void Find::display() // Alarm actions mMessageType = new TQCheckBox(i18n("Text"), group, "message"); - mMessageType->setFixedSize(mMessageType->tqsizeHint()); + mMessageType->setFixedSize(mMessageType->sizeHint()); TQWhatsThis::add(mMessageType, i18n("Check to include text message alarms in the search.")); grid->addWidget(mMessageType, 3, 0); mFileType = new TQCheckBox(i18n("Fi&le"), group, "file"); - mFileType->setFixedSize(mFileType->tqsizeHint()); + mFileType->setFixedSize(mFileType->sizeHint()); TQWhatsThis::add(mFileType, i18n("Check to include file alarms in the search.")); grid->addWidget(mFileType, 3, 2); mCommandType = new TQCheckBox(i18n("Co&mmand"), group, "command"); - mCommandType->setFixedSize(mCommandType->tqsizeHint()); + mCommandType->setFixedSize(mCommandType->sizeHint()); TQWhatsThis::add(mCommandType, i18n("Check to include command alarms in the search.")); grid->addWidget(mCommandType, 4, 0); mEmailType = new TQCheckBox(i18n("&Email"), group, "email"); - mEmailType->setFixedSize(mEmailType->tqsizeHint()); + mEmailType->setFixedSize(mEmailType->sizeHint()); TQWhatsThis::add(mEmailType, i18n("Check to include email alarms in the search.")); grid->addWidget(mEmailType, 4, 2); diff --git a/kalarm/fontcolour.cpp b/kalarm/fontcolour.cpp index 94497b969..936cc4c8d 100644 --- a/kalarm/fontcolour.cpp +++ b/kalarm/fontcolour.cpp @@ -24,7 +24,7 @@ #include <tqpushbutton.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <kglobal.h> @@ -57,8 +57,8 @@ FontColourChooser::FontColourChooser(TQWidget *parent, const char *name, topLayout = new TQVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint()); topLayout->addSpacing(fontMetrics().height() - KDialog::marginHint() + KDialog::spacingHint()); } - TQHBoxLayout* htqlayout = new TQHBoxLayout(topLayout); - TQVBoxLayout* colourLayout = new TQVBoxLayout(htqlayout); + TQHBoxLayout* hlayout = new TQHBoxLayout(topLayout); + TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout); if (fg) { TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text @@ -83,35 +83,35 @@ FontColourChooser::FontColourChooser(TQWidget *parent, const char *name, connect(mBgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour())); label->setBuddy(mBgColourButton); TQWhatsThis::add(box, i18n("Select the alarm message background color")); - htqlayout->addStretch(); + hlayout->addStretch(); if (editColours) { - TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout); + TQHBoxLayout* layout = new TQHBoxLayout(topLayout); TQPushButton* button = new TQPushButton(i18n("Add Co&lor..."), page); - button->setFixedSize(button->tqsizeHint()); + button->setFixedSize(button->sizeHint()); connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddColour())); TQWhatsThis::add(button, i18n("Choose a new color to add to the color selection list.")); - tqlayout->addWidget(button); + layout->addWidget(button); mRemoveColourButton = new TQPushButton(i18n("&Remove Color"), page); - mRemoveColourButton->setFixedSize(mRemoveColourButton->tqsizeHint()); + mRemoveColourButton->setFixedSize(mRemoveColourButton->sizeHint()); 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.")); - tqlayout->addWidget(mRemoveColourButton); + layout->addWidget(mRemoveColourButton); } if (defaultFont) { - TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout); + TQHBoxLayout* layout = new TQHBoxLayout(topLayout); mDefaultFont = new CheckBox(i18n("Use &default font"), page); - mDefaultFont->setMinimumSize(mDefaultFont->tqsizeHint()); + mDefaultFont->setMinimumSize(mDefaultFont->sizeHint()); 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.")); - tqlayout->addWidget(mDefaultFont); - tqlayout->addWidget(new TQWidget(page)); // left adjust the widget + layout->addWidget(mDefaultFont); + layout->addWidget(new TQWidget(page)); // left adjust the widget } else mDefaultFont = 0; diff --git a/kalarm/fontcolourbutton.cpp b/kalarm/fontcolourbutton.cpp index e5dd90b92..4f276361d 100644 --- a/kalarm/fontcolourbutton.cpp +++ b/kalarm/fontcolourbutton.cpp @@ -21,7 +21,7 @@ #include "kalarm.h" #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> @@ -43,26 +43,26 @@ FontColourButton::FontColourButton(TQWidget* parent, const char* name) mReadOnly(false) { setFrameStyle(NoFrame); - TQHBoxLayout* tqlayout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); + TQHBoxLayout* layout = new TQHBoxLayout(this, 0, KDialog::spacingHint()); mButton = new PushButton(i18n("Font && Co&lor..."), this); - mButton->setFixedSize(mButton->tqsizeHint()); + mButton->setFixedSize(mButton->sizeHint()); connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonPressed())); TQWhatsThis::add(mButton, i18n("Choose the font, and foreground and background color, for the alarm message.")); - tqlayout->addWidget(mButton); + layout->addWidget(mButton); // Font and colour sample display mSample = new TQLineEdit(this); mSample->setMinimumHeight(TQMAX(mSample->fontMetrics().lineSpacing(), mButton->height()*3/2)); - mSample->tqsetSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::MinimumExpanding); + mSample->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::MinimumExpanding); mSample->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); mSample->setCursorPosition(0); - mSample->tqsetAlignment(TQt::AlignCenter); + mSample->setAlignment(TQt::AlignCenter); TQWhatsThis::add(mSample, i18n("This sample text illustrates the current font and color settings. " "You may edit it to test special characters.")); - tqlayout->addWidget(mSample); + layout->addWidget(mSample); } void FontColourButton::setDefaultFont() @@ -125,7 +125,7 @@ FontColourDlg::FontColourDlg(const TQColor& bgColour, const TQColor& fgColour, c { TQWidget* page = new TQWidget(this); setMainWidget(page); - TQVBoxLayout* tqlayout = new TQVBoxLayout(page, 0, spacingHint()); + TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint()); mChooser = new FontColourChooser(page, 0, false, TQStringList(), TQString(), false, true, true); mChooser->setBgColour(bgColour); mChooser->setFgColour(fgColour); @@ -133,8 +133,8 @@ FontColourDlg::FontColourDlg(const TQColor& bgColour, const TQColor& fgColour, c mChooser->setDefaultFont(); else mChooser->setFont(font); - tqlayout->addWidget(mChooser); - tqlayout->addSpacing(KDialog::spacingHint()); + layout->addWidget(mChooser); + layout->addSpacing(KDialog::spacingHint()); } /****************************************************************************** diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp index d7a6383f2..0221ea86b 100644 --- a/kalarm/functions.cpp +++ b/kalarm/functions.cpp @@ -129,10 +129,10 @@ TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject* * event in that listView instance. * 'event' is updated with the actual event ID. */ -UpdatetqStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate) +UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate) { kdDebug(5950) << "KAlarm::addEvent(): " << event.id() << endl; - UpdatetqStatus status = UPDATE_OK; + UpdateStatus status = UPDATE_OK; if (!theApp()->checkCalendarDaemon()) // ensure calendar is open and daemon started return UPDATE_FAILED; else @@ -172,9 +172,9 @@ bool addExpiredEvent(KAEvent& event) AlarmCalendar* cal = AlarmCalendar::expiredCalendarOpen(); if (!cal) return false; - bool archiving = (KAEvent::uidtqStatus(event.id()) == KAEvent::ACTIVE); + bool archiving = (KAEvent::uidStatus(event.id()) == KAEvent::ACTIVE); if (archiving) - event.setSaveDateTime(TQDateTime::tqcurrentDateTime()); // time stamp to control purging + event.setSaveDateTime(TQDateTime::currentDateTime()); // time stamp to control purging KCal::Event* kcalEvent = cal->addEvent(event); cal->save(); @@ -193,10 +193,10 @@ bool addExpiredEvent(KAEvent& event) * event in that listView instance. * 'event' is updated with the actual event ID. */ -UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) +UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) { kdDebug(5950) << "KAlarm::addTemplate(): " << event.id() << endl; - UpdatetqStatus status = UPDATE_OK; + UpdateStatus status = UPDATE_OK; // Add the template to the calendar file AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen(); @@ -206,7 +206,7 @@ UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWi status = SAVE_FAILED; else { - cal->emitEmptytqStatus(); + cal->emitEmptyStatus(); // Update the window lists TemplateListView::addEvent(event, selectionView); @@ -225,11 +225,11 @@ UpdatetqStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWi * If 'selectionView' is non-null, the selection highlight is moved to the * modified event in that listView instance. */ -UpdatetqStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent) +UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent) { kdDebug(5950) << "KAlarm::modifyEvent(): '" << oldEvent.id() << endl; - UpdatetqStatus status = UPDATE_OK; + UpdateStatus status = UPDATE_OK; if (!newEvent.valid()) { deleteEvent(oldEvent, true); @@ -280,7 +280,7 @@ UpdatetqStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmList * The event is not updated in KOrganizer, since this function is called when an * existing alarm is rescheduled (due to recurrence or deferral). */ -UpdatetqStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision) +UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision) { kdDebug(5950) << "KAlarm::updateEvent(): " << event.id() << endl; @@ -311,9 +311,9 @@ UpdatetqStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidge * If 'selectionView' is non-null, the selection highlight is moved to the * updated event in that listView instance. */ -UpdatetqStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) +UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent) { - UpdatetqStatus status = UPDATE_OK; + UpdateStatus status = UPDATE_OK; AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen(); if (!cal) status = UPDATE_FAILED; @@ -338,7 +338,7 @@ UpdatetqStatus updateTemplate(const KAEvent& event, TemplateListView* selectionV * 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. */ -UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) +UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) { TQString id = event.id(); kdDebug(5950) << "KAlarm::deleteEvent(): " << id << endl; @@ -346,11 +346,11 @@ UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) // Update the window lists AlarmListView::deleteEvent(id); - UpdatetqStatus status = UPDATE_OK; + UpdateStatus status = UPDATE_OK; AlarmCalendar* cal; // Delete the event from the calendar file - if (KAEvent::uidtqStatus(id) == KAEvent::EXPIRED) + if (KAEvent::uidStatus(id) == KAEvent::EXPIRED) { cal = AlarmCalendar::expiredCalendarOpen(); if (!cal) @@ -383,7 +383,7 @@ UpdatetqStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent) /****************************************************************************** * Delete a template from the calendar file and from every template list view. */ -UpdatetqStatus deleteTemplate(const KAEvent& event) +UpdateStatus deleteTemplate(const KAEvent& event) { TQString id = event.id(); @@ -393,7 +393,7 @@ UpdatetqStatus deleteTemplate(const KAEvent& event) return UPDATE_FAILED; if (!cal->deleteEvent(id, true)) // save calendar after deleting return SAVE_FAILED; - cal->emitEmptytqStatus(); + cal->emitEmptyStatus(); // Update the window lists TemplateListView::deleteEvent(id); @@ -407,7 +407,7 @@ void deleteDisplayEvent(const TQString& eventID) { kdDebug(5950) << "KAlarm::deleteDisplayEvent(" << eventID << ")\n"; - if (KAEvent::uidtqStatus(eventID) == KAEvent::DISPLAYING) + if (KAEvent::uidStatus(eventID) == KAEvent::DISPLAYING) { AlarmCalendar* cal = AlarmCalendar::displayCalendarOpen(); if (cal) @@ -421,15 +421,15 @@ void deleteDisplayEvent(const TQString& eventID) * If 'selectionView' is non-null, the selection highlight is moved to the * restored event in that listView instance. */ -UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID) +UpdateStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID) { TQString id = event.id(); kdDebug(5950) << "KAlarm::reactivateEvent(): " << id << endl; // Delete the event from the expired calendar file - if (KAEvent::uidtqStatus(id) == KAEvent::EXPIRED) + if (KAEvent::uidStatus(id) == KAEvent::EXPIRED) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (event.occursAfter(now, true)) { if (event.recurs() || event.repeatCount()) @@ -443,7 +443,7 @@ UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, boo if (!cal->save()) return SAVE_FAILED; - UpdatetqStatus status = UPDATE_OK; + UpdateStatus status = UPDATE_OK; if (event.copyToKOrganizer()) { if (!sendToKOrganizer(event)) // tell KOrganizer to show the event @@ -468,7 +468,7 @@ UpdatetqStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, boo * If 'selectionView' is non-null, the selection highlight is moved to the * updated event in that listView instance. */ -UpdatetqStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enable) +UpdateStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enable) { kdDebug(5950) << "KAlarm::enableEvent(" << enable << "): " << event.id() << endl; @@ -498,7 +498,7 @@ UpdatetqStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool en /****************************************************************************** * Display an error message about an error saving an event. */ -void displayUpdateError(TQWidget* parent, UpdatetqStatus, UpdateError code, int nAlarms) +void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError code, int nAlarms) { TQString errmsg; switch (code) @@ -551,7 +551,7 @@ void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError code, int nAlarms) bool edit(const TQString& eventID) { AlarmCalendar* cal; - switch (KAEvent::uidtqStatus(eventID)) + switch (KAEvent::uidStatus(eventID)) { case KAEvent::ACTIVE: cal = AlarmCalendar::activeCalendar(); @@ -633,13 +633,13 @@ void outputAlarmWarnings(TQWidget* parent, const KAEvent* event) if (event && event->action() == KAEvent::EMAIL && Preferences::emailAddress().isEmpty()) KMessageBox::information(parent, i18n("Please set the 'From' email address...", - "%1\nPlease set it in the Preferences dialog.").tqarg(KAMail::i18n_NeedFromEmailAddress())); + "%1\nPlease set it in the Preferences dialog.").arg(KAMail::i18n_NeedFromEmailAddress())); if (!Daemon::monitoringAlarms()) { if (KMessageBox::warningYesNo(parent, i18n("Alarms are currently disabled.\nDo you want to enable alarms now?"), TQString(), i18n("Enable"), i18n("Keep Disabled"), - TQString::tqfromLatin1("EditEnableAlarms")) + TQString::fromLatin1("EditEnableAlarms")) == KMessageBox::Yes) Daemon::setAlarmsEnabled(); } @@ -705,7 +705,7 @@ TQString runKMail(bool minimise) TQCString dcopName; TQString errmsg; if (!runProgram("kmail", (minimise ? KMAIL_DCOP_WINDOW : ""), dcopName, errmsg)) - return i18n("Unable to start KMail\n(%1)").tqarg(errmsg); + return i18n("Unable to start KMail\n(%1)").arg(errmsg); return TQString(); } @@ -721,7 +721,7 @@ bool runProgram(const TQCString& program, const TQCString& windowName, TQCString if (!kapp->dcopClient()->isApplicationRegistered(program)) { // KOrganizer is not already running, so start it - if (KApplication::startServiceByDesktopName(TQString::tqfromLatin1(program), TQString(), &errorMessage, &dcopName)) + if (KApplication::startServiceByDesktopName(TQString::fromLatin1(program), TQString(), &errorMessage, &dcopName)) { kdError(5950) << "runProgram(): couldn't start " << program << " (" << errorMessage << ")\n"; return false; @@ -746,10 +746,10 @@ bool runProgram(const TQCString& program, const TQCString& windowName, TQCString bool readConfigWindowSize(const char* window, TQSize& result) { KConfig* config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1(window)); + config->setGroup(TQString::fromLatin1(window)); TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop()); - TQSize s = TQSize(config->readNumEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), 0), - config->readNumEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), 0)); + 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,10 +763,10 @@ bool readConfigWindowSize(const char* window, TQSize& result) void writeConfigWindowSize(const char* window, const TQSize& size) { KConfig* config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1(window)); + config->setGroup(TQString::fromLatin1(window)); TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop()); - config->writeEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), size.width()); - config->writeEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), size.height()); + config->writeEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), size.width()); + config->writeEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), size.height()); config->sync(); } @@ -834,20 +834,20 @@ FileType fileType(const TQString& mimetype) static const char* formattedTextTypes[] = { "html", "xml", 0 }; - if (mimetype.startsWith(TQString::tqfromLatin1("image/"))) + if (mimetype.startsWith(TQString::fromLatin1("image/"))) return Image; int slash = mimetype.find('/'); if (slash < 0) return Unknown; TQString type = mimetype.mid(slash + 1); const char* typel = type.latin1(); - if (mimetype.startsWith(TQString::tqfromLatin1("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(TQString::tqfromLatin1("text"))) + else if (mimetype.startsWith(TQString::fromLatin1("text"))) { for (int i = 0; formattedTextTypes[i]; ++i) if (!strcmp(typel, formattedTextTypes[i])) @@ -905,7 +905,7 @@ TQString stripAccel(const TQString& text) { unsigned len = text.length(); TQString out = TQDeepCopy<TQString>(text); - TQChar *corig = (TQChar*)out.tqunicode(); + TQChar *corig = (TQChar*)out.unicode(); TQChar *cout = corig; TQChar *cin = cout; while (len) diff --git a/kalarm/functions.h b/kalarm/functions.h index b8a1a51d3..9d5b1900a 100644 --- a/kalarm/functions.h +++ b/kalarm/functions.h @@ -48,7 +48,7 @@ enum FileType { Unknown, TextPlain, TextFormatted, TextApplication, Image }; /** Return codes from calendar update functions. * The codes are ordered by severity. */ -enum UpdatetqStatus { +enum UpdateStatus { UPDATE_OK, // update succeeded UPDATE_KORG_ERR, // update succeeded, but KOrganizer update failed UPDATE_ERROR, // update failed partially @@ -94,18 +94,18 @@ void resetDaemonIfQueued(); // must only be called from KAlarm TQString runKMail(bool minimise); bool runProgram(const TQCString& program, const TQCString& windowName, TQCString& dcopName, TQString& errorMessage); -UpdatetqStatus addEvent(KAEvent&, AlarmListView* selectionView, TQWidget* 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&); -UpdatetqStatus addTemplate(KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0); -UpdatetqStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent = 0); -UpdatetqStatus updateEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool archiveOnDelete = true, bool incRevision = true); -UpdatetqStatus updateTemplate(const KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0); -UpdatetqStatus deleteEvent(KAEvent&, bool archive = true, TQWidget* errmsgParent = 0); -UpdatetqStatus deleteTemplate(const KAEvent&); +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 TQString& eventID); -UpdatetqStatus reactivateEvent(KAEvent&, AlarmListView* selectionView, bool useEventID = false); -UpdatetqStatus enableEvent(KAEvent&, AlarmListView* selectionView, bool enable); -void displayUpdateError(TQWidget* parent, UpdatetqStatus, UpdateError, int nAlarms); +UpdateStatus reactivateEvent(KAEvent&, AlarmListView* selectionView, bool useEventID = false); +UpdateStatus enableEvent(KAEvent&, AlarmListView* selectionView, bool enable); +void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError, int nAlarms); void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError, int nAlarms); TQString stripAccel(const TQString&); diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index 8a620afd5..25dd60f49 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -121,8 +121,8 @@ KAlarmApp::KAlarmApp() connect(AlarmCalendar::expiredCalendar(), TQT_SIGNAL(purged()), TQT_SLOT(slotExpiredPurged())); KConfig* config = kapp->config(); - config->setGroup(TQString::tqfromLatin1("General")); - mNoSystemTray = config->readBoolEntry(TQString::tqfromLatin1("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 - TQString korg = TQString::tqfromLatin1("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; @@ -205,7 +205,7 @@ bool KAlarmApp::restoreSession() for (int i = 1; KMainWindow::canBeRestored(i); ++i) { TQString type = KMainWindow::classNameOfToplevel(i); - if (type == TQString::tqfromLatin1("MainWindow")) + 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 == TQString::tqfromLatin1("MessageWin")) + else if (type == TQString::fromLatin1("MessageWin")) { MessageWin* win = new MessageWin; win->restore(i, false); @@ -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").tqarg(TQString::tqfromLatin1("--calendarURL")).tqarg(TQString::tqfromLatin1("--handleEvent")).tqarg(TQString::tqfromLatin1("--triggerEvent")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--handleEvent")).tqarg(TQString::tqfromLatin1("--triggerEvent")).tqarg(TQString::tqfromLatin1("--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; @@ -341,11 +341,11 @@ int KAlarmApp::newInstance() { TQString calendarUrl = args->getOption("calendarURL"); if (KURL(calendarUrl).url() != AlarmCalendar::activeCalendar()->urlString()) - USAGE(i18n("%1: wrong calendar file").tqarg(TQString::tqfromLatin1("--calendarURL"))) + USAGE(i18n("%1: wrong calendar file").arg(TQString::fromLatin1("--calendarURL"))) } TQString eventID = args->getOption(option); args->clear(); // free up memory - if (eventID.startsWith(TQString::tqfromLatin1("ad:"))) + if (eventID.startsWith(TQString::fromLatin1("ad:"))) { // It's a notification from the alarm deamon eventID = eventID.mid(3); @@ -369,7 +369,7 @@ int KAlarmApp::newInstance() } if (!KAlarm::edit(eventID)) { - USAGE(i18n("%1: Event %2 not found, or not editable").tqarg(TQString::tqfromLatin1("--edit")).tqarg(eventID)) + USAGE(i18n("%1: Event %2 not found, or not editable").arg(TQString::fromLatin1("--edit")).arg(eventID)) exitCode = 1; break; } @@ -401,11 +401,11 @@ int KAlarmApp::newInstance() { kdDebug(5950)<<"KAlarmApp::newInstance(): file\n"; if (args->isSet("exec")) - USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--exec")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--mail")).tqarg(TQString::tqfromLatin1("--file"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--file"))) if (args->count()) - USAGE(i18n("message incompatible with %1").tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--mail")).tqarg(TQString::tqfromLatin1("--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) @@ -435,7 +435,7 @@ int KAlarmApp::newInstance() { TQString addr = TQString::fromLocal8Bit(*i); if (!KAMail::checkAddress(addr)) - USAGE(i18n("%1: invalid email address").tqarg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1: invalid email address").arg(TQString::fromLatin1("--mail"))) alAddresses += KCal::Person(TQString(), addr); } params = args->getOptionList("attach"); @@ -453,13 +453,13 @@ int KAlarmApp::newInstance() if (action != KAEvent::EMAIL) { if (args->isSet("subject")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--subject")).tqarg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--subject")).arg(TQString::fromLatin1("--mail"))) if (args->isSet("from-id")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--from-id")).tqarg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--from-id")).arg(TQString::fromLatin1("--mail"))) if (args->isSet("attach")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--attach")).tqarg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--attach")).arg(TQString::fromLatin1("--mail"))) if (args->isSet("bcc")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--bcc")).tqarg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--bcc")).arg(TQString::fromLatin1("--mail"))) } bool alarmNoTime = false; @@ -478,7 +478,7 @@ int KAlarmApp::newInstance() colourText.replace(0, 2, "#"); bgColour.setNamedColor(colourText); if (!bgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--color"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--color"))) } if (args->isSet("colorfg")) { @@ -489,25 +489,25 @@ int KAlarmApp::newInstance() colourText.replace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--colorfg"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--colorfg"))) } if (args->isSet("time")) { TQCString dateTime = args->getOption("time"); if (!convWakeTime(dateTime, alarmTime, alarmNoTime)) - USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--time"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--time"))) } else - alarmTime = TQDateTime::tqcurrentDateTime(); + alarmTime = TQDateTime::currentDateTime(); bool haveRecurrence = args->isSet("recurrence"); if (haveRecurrence) { if (args->isSet("login")) - USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--login")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--until")).tqarg(TQString::tqfromLatin1("--recurrence"))) + 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))); } @@ -516,24 +516,24 @@ int KAlarmApp::newInstance() // Repeat count is specified int count; if (args->isSet("login")) - USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--login")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--repeat"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--repeat"))) } else if (haveRecurrence) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--interval")).tqarg(TQString::tqfromLatin1("--repeat"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat"))) else if (args->isSet("until")) { count = 0; TQCString dateTime = args->getOption("until"); if (!convWakeTime(dateTime, endTime, alarmNoTime)) - USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--until"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--until"))) if (endTime < alarmTime) - USAGE(i18n("%1 earlier than %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--interval"))) if (alarmNoTime && recurType == KARecurrence::MINUTELY) - USAGE(i18n("Invalid %1 parameter for date-only alarm").tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--interval")).tqarg(TQString::tqfromLatin1("--repeat")).tqarg(TQString::tqfromLatin1("--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,9 +566,9 @@ int KAlarmApp::newInstance() else { if (args->isSet("repeat")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--repeat")).tqarg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--interval"))) if (args->isSet("until")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--interval"))) } TQCString audioFile; @@ -582,11 +582,11 @@ int KAlarmApp::newInstance() { // Play a sound with the alarm if (audioRepeat && args->isSet("play")) - USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--play")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--beep")).tqarg(TQString::tqfromLatin1(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").tqarg(TQString::tqfromLatin1("--speak")).tqarg(TQString::tqfromLatin1(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").tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--volume")).tqarg(TQString::tqfromLatin1("--play")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--beep")).tqarg(TQString::tqfromLatin1("--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").tqarg(TQString::tqfromLatin1("--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,18 +616,18 @@ int KAlarmApp::newInstance() { // Issue a reminder alarm in advance of the main alarm if (onceOnly && args->isSet("reminder")) - USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--reminder")).tqarg(TQString::tqfromLatin1("--reminder-once"))) - TQString opt = onceOnly ? TQString::tqfromLatin1("--reminder-once") : TQString::tqfromLatin1("--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").tqarg(opt).tqarg(TQString::tqfromLatin1("--exec"))) + USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--exec"))) if (args->isSet("mail")) - USAGE(i18n("%1 incompatible with %2").tqarg(opt).tqarg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--mail"))) KARecurrence::Type recurType; TQString optval = args->getOption(onceOnly ? "reminder-once" : "reminder"); if (!convInterval(args->getOption(onceOnly ? "reminder-once" : "reminder"), recurType, reminderMinutes)) - USAGE(i18n("Invalid %1 parameter").tqarg(opt)) + USAGE(i18n("Invalid %1 parameter").arg(opt)) if (recurType == KARecurrence::MINUTELY && alarmNoTime) - USAGE(i18n("Invalid %1 parameter for date-only alarm").tqarg(opt)) + USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(opt)) } int lateCancel = 0; @@ -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").tqarg(TQString::tqfromLatin1("late-cancel"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("late-cancel"))) } else if (args->isSet("auto-close")) - USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--auto-close")).tqarg(TQString::tqfromLatin1("--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")) @@ -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 += TQString::tqfromLatin1("--ack-confirm "); + usage += TQString::fromLatin1("--ack-confirm "); if (args->isSet("attach")) - usage += TQString::tqfromLatin1("--attach "); + usage += TQString::fromLatin1("--attach "); if (args->isSet("auto-close")) - usage += TQString::tqfromLatin1("--auto-close "); + usage += TQString::fromLatin1("--auto-close "); if (args->isSet("bcc")) - usage += TQString::tqfromLatin1("--bcc "); + usage += TQString::fromLatin1("--bcc "); if (args->isSet("beep")) - usage += TQString::tqfromLatin1("--beep "); + usage += TQString::fromLatin1("--beep "); if (args->isSet("color")) - usage += TQString::tqfromLatin1("--color "); + usage += TQString::fromLatin1("--color "); if (args->isSet("colorfg")) - usage += TQString::tqfromLatin1("--colorfg "); + usage += TQString::fromLatin1("--colorfg "); if (args->isSet("disable")) - usage += TQString::tqfromLatin1("--disable "); + usage += TQString::fromLatin1("--disable "); if (args->isSet("from-id")) - usage += TQString::tqfromLatin1("--from-id "); + usage += TQString::fromLatin1("--from-id "); if (args->isSet("korganizer")) - usage += TQString::tqfromLatin1("--korganizer "); + usage += TQString::fromLatin1("--korganizer "); if (args->isSet("late-cancel")) - usage += TQString::tqfromLatin1("--late-cancel "); + usage += TQString::fromLatin1("--late-cancel "); if (args->isSet("login")) - usage += TQString::tqfromLatin1("--login "); + usage += TQString::fromLatin1("--login "); if (args->isSet("play")) - usage += TQString::tqfromLatin1("--play "); + usage += TQString::fromLatin1("--play "); #ifndef WITHOUT_ARTS if (args->isSet("play-repeat")) - usage += TQString::tqfromLatin1("--play-repeat "); + usage += TQString::fromLatin1("--play-repeat "); #endif if (args->isSet("reminder")) - usage += TQString::tqfromLatin1("--reminder "); + usage += TQString::fromLatin1("--reminder "); if (args->isSet("reminder-once")) - usage += TQString::tqfromLatin1("--reminder-once "); + usage += TQString::fromLatin1("--reminder-once "); if (args->isSet("speak")) - usage += TQString::tqfromLatin1("--speak "); + usage += TQString::fromLatin1("--speak "); if (args->isSet("subject")) - usage += TQString::tqfromLatin1("--subject "); + usage += TQString::fromLatin1("--subject "); if (args->isSet("time")) - usage += TQString::tqfromLatin1("--time "); + usage += TQString::fromLatin1("--time "); #ifndef WITHOUT_ARTS if (args->isSet("volume")) - usage += TQString::tqfromLatin1("--volume "); + usage += TQString::fromLatin1("--volume "); #endif if (!usage.isEmpty()) { - usage += i18n(": option(s) only valid with a message/%1/%2").tqarg(TQString::tqfromLatin1("--file")).tqarg(TQString::tqfromLatin1("--exec")); + usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::fromLatin1("--file")).arg(TQString::fromLatin1("--exec")); break; } @@ -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(TQString::tqfromLatin1("General")); - config->writeEntry(TQString::tqfromLatin1("NoSystemTray"), mNoSystemTray); + config->setGroup(TQString::fromLatin1("General")); + config->writeEntry(TQString::fromLatin1("NoSystemTray"), mNoSystemTray); config->sync(); // Update other settings and reregister with the alarm daemon @@ -1174,7 +1174,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const TQString& text, cons kdDebug(5950) << "KAlarmApp::scheduleEvent(): " << text << endl; if (!dateTime.isValid()) return false; - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (lateCancel && dateTime < now.addSecs(-maxLateness(lateCancel))) return true; // alarm time was already expired too long ago TQDateTime alarmTime = dateTime; @@ -1266,7 +1266,7 @@ bool KAlarmApp::handleEvent(const TQString& 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 { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); bool updateCalAndDisplay = false; bool alarmToExecuteValid = false; KAAlarm alarmToExecute; @@ -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(TQDateTime::tqcurrentDateTime()); + KAEvent::OccurType type = event.setNextOccurrence(TQDateTime::currentDateTime()); switch (type) { case KAEvent::NO_OCCURRENCE: @@ -1722,7 +1722,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& { // Execute the command from a temporary script file, // with a sleep after the command is executed - tmpXtermFile = createTempScriptFile(command + TQString::tqfromLatin1("\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 @@ -1731,7 +1731,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& { // Append a sleep to the command. // Quote the command in case it contains characters such as [>|;]. - TQString exec = KShellProcess::quote(command + TQString::tqfromLatin1("; sleep 86400")); + TQString exec = KShellProcess::quote(command + TQString::fromLatin1("; sleep 86400")); cmd.replace("%w", exec); // %w indicates where to insert the command string } else @@ -1759,7 +1759,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& // Set up a logging process to write the command's output to. 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::tqfromLatin1("cat >>%1").tqarg(event.logFile())); + logproc = new ShellProcess(TQString::fromLatin1("cat >>%1").arg(event.logFile())); connect(logproc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotLogProcExited(ShellProcess*))); logproc->start(KProcess::Stdin); TQCString heading; @@ -2068,7 +2068,7 @@ static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool& else { // Compile the values into a date/time structure - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (dt[0] < 0) date.setYMD(now.date().year(), (dt[1] < 0 ? now.date().month() : dt[1]), diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp index 409ab88f0..3b9c9f55a 100644 --- a/kalarm/kalarmd/adcalendar.cpp +++ b/kalarm/kalarmd/adcalendar.cpp @@ -37,7 +37,7 @@ TQStringList ADCalendar::mCalendarUrls; // never delete or reorde ADCalendar::ADCalendar(const TQString& url, const TQCString& appname) - : KCal::CalendarLocal(TQString::tqfromLatin1("UTC")), + : KCal::CalendarLocal(TQString::fromLatin1("UTC")), mUrlString(url), mAppName(appname), mLoaded(false), diff --git a/kalarm/kalarmd/adconfigdata.cpp b/kalarm/kalarmd/adconfigdata.cpp index 9f471e4da..06ee4597e 100644 --- a/kalarm/kalarmd/adconfigdata.cpp +++ b/kalarm/kalarmd/adconfigdata.cpp @@ -31,13 +31,13 @@ #include "adconfigdata.h" // Config file key strings -const TQString CLIENT_GROUP(TQString::tqfromLatin1("Client ")); +const TQString CLIENT_GROUP(TQString::fromLatin1("Client ")); const TQRegExp CLIENT_GROUP_SEARCH("^Client "); // Client data file key strings -const TQString CALENDAR_KEY(TQString::tqfromLatin1("Calendar")); -const TQString TITLE_KEY(TQString::tqfromLatin1("Title")); -const TQString DCOP_OBJECT_KEY(TQString::tqfromLatin1("DCOP object")); -const TQString START_CLIENT_KEY(TQString::tqfromLatin1("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")); /****************************************************************************** @@ -139,8 +139,8 @@ void ADConfigData::enableAutoStart(bool on) kdDebug(5900) << "ADConfigData::enableAutoStart(" << on << ")\n"; KConfig* config = KGlobal::config(); config->reparseConfiguration(); - config->setGroup(TQString::tqfromLatin1(DAEMON_AUTOSTART_SECTION)); - config->writeEntry(TQString::tqfromLatin1(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/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp index 0fad7935f..85d214656 100644 --- a/kalarm/kalarmd/alarmdaemon.cpp +++ b/kalarm/kalarmd/alarmdaemon.cpp @@ -54,8 +54,8 @@ static const int KALARM_AUTOSTART_TIMEOUT = 30; static const int SECS_PER_DAY = 3600 * 24; // KAlarm config file keys -static const TQString START_OF_DAY(TQString::tqfromLatin1("StartOfDay")); -static const TQString AUTOSTART_TRAY(TQString::tqfromLatin1("AutostartTray")); +static const TQString START_OF_DAY(TQString::fromLatin1("StartOfDay")); +static const TQString AUTOSTART_TRAY(TQString::fromLatin1("AutostartTray")); AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name) @@ -84,7 +84,7 @@ AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name) * itself and instead will simply open a new window. */ KConfig kaconfig(locate("config", "kalarmrc")); - kaconfig.setGroup(TQString::tqfromLatin1("General")); + kaconfig.setGroup(TQString::fromLatin1("General")); autostart = kaconfig.readBoolEntry(AUTOSTART_TRAY, false); if (autostart) { @@ -119,8 +119,8 @@ void AlarmDaemon::autostartKAlarm() } kdDebug(5900) << "AlarmDaemon::autostartKAlarm(): starting KAlarm\n"; TQStringList args; - args << TQString::tqfromLatin1("--tray"); - int ret = KApplication::tdeinitExec(TQString::tqfromLatin1("kalarm"), args); + args << TQString::fromLatin1("--tray"); + int ret = KApplication::tdeinitExec(TQString::fromLatin1("kalarm"), args); if (ret) kdError(5900) << "AlarmDaemon::autostartKAlarm(): error=" << ret << endl; else @@ -138,7 +138,7 @@ void AlarmDaemon::startMonitoring() // Set up the alarm timer mAlarmTimer = new TQTimer(this); connect(mAlarmTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarmsSlot())); - setTimertqStatus(); + setTimerStatus(); // Start monitoring calendar files. // They are monitored until their client application registers, upon which @@ -156,7 +156,7 @@ void AlarmDaemon::enableCal(const TQString& urlString, bool enable) if (cal) { cal->setEnabled(enable); - notifyCaltqStatus(cal); // notify KAlarm + notifyCalStatus(cal); // notify KAlarm } } @@ -196,8 +196,8 @@ void AlarmDaemon::calendarLoaded(ADCalendar* cal, bool success) { if (success) kdDebug(5900) << "Calendar reloaded" << endl; - notifyCaltqStatus(cal); // notify KAlarm - setTimertqStatus(); + notifyCalStatus(cal); // notify KAlarm + setTimerStatus(); checkAlarms(cal); } @@ -262,8 +262,8 @@ void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle ADConfigData::writeClient(appName, client); ADConfigData::enableAutoStart(true); - setTimertqStatus(); - notifyCaltqStatus(client->calendar()); + setTimerStatus(); + notifyCalStatus(client->calendar()); result = KAlarmd::SUCCESS; } @@ -365,7 +365,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) if (!cal->loaded() || !cal->enabled()) return; - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); kdDebug(5901) << " To: " << now.toString() << endl; TQValueList<KCal::Alarm*> alarms = cal->alarmsTo(now); if (!alarms.count()) @@ -385,7 +385,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) // The times for non-due alarms are set invalid in 'alarmtimes'. bool recurs = event->doesRecur(); const TQStringList cats = event->categories(); - bool floats = (cats.find(TQString::tqfromLatin1("DATE")) != cats.end()); + bool floats = (cats.find(TQString::fromLatin1("DATE")) != cats.end()); TQDateTime nextDateTime = event->dtStart(); if (recurs) { @@ -478,7 +478,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID) return false; } kdDebug(5900) << "AlarmDaemon::notifyEvent(" << appname << ", " << eventID << "): notification type=" << client->startClient() << endl; - TQString id = TQString::tqfromLatin1("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)); @@ -531,7 +531,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID) /****************************************************************************** * Starts or stops the alarm timer as necessary after a calendar is enabled/disabled. */ -void AlarmDaemon::setTimertqStatus() +void AlarmDaemon::setTimerStatus() { #ifdef AUTOSTART_KALARM if (!mAlarmTimer) @@ -569,7 +569,7 @@ void AlarmDaemon::setTimertqStatus() * Send a DCOP message to to the client which owns the specified calendar, * notifying it of a change in calendar status. */ -void AlarmDaemon::notifyCaltqStatus(const ADCalendar* cal) +void AlarmDaemon::notifyCalStatus(const ADCalendar* cal) { ClientInfo* client = ClientInfo::get(cal); if (!client) @@ -577,7 +577,7 @@ void AlarmDaemon::notifyCaltqStatus(const ADCalendar* cal) TQCString appname = client->appName(); if (kapp->dcopClient()->isApplicationRegistered(static_cast<const char*>(appname))) { - KAlarmd::CalendartqStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED) + KAlarmd::CalendarStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED) : KAlarmd::CALENDAR_UNAVAILABLE; kdDebug(5900) << "AlarmDaemon::notifyCalStatus() sending:" << appname << " -> " << change << endl; AlarmGuiIface_stub stub(appname, client->dcopObject()); @@ -595,7 +595,7 @@ void AlarmDaemon::notifyCaltqStatus(const ADCalendar* cal) void AlarmDaemon::readKAlarmConfig() { KConfig config(locate("config", "kalarmrc")); - config.setGroup(TQString::tqfromLatin1("General")); + 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; diff --git a/kalarm/kalarmd/alarmdaemon.h b/kalarm/kalarmd/alarmdaemon.h index c2c34e10f..fbbb8f308 100644 --- a/kalarm/kalarmd/alarmdaemon.h +++ b/kalarm/kalarmd/alarmdaemon.h @@ -67,8 +67,8 @@ class AlarmDaemon : public TQObject, virtual public AlarmDaemonIface void reloadCal(ADCalendar*, bool reset); void checkAlarms(ADCalendar*); bool notifyEvent(ADCalendar*, const TQString& eventID); - void notifyCaltqStatus(const ADCalendar*); - void setTimertqStatus(); + void notifyCalStatus(const ADCalendar*); + void setTimerStatus(); static TQString expandURL(const TQString& urlString); TQTimer* mAlarmTimer; diff --git a/kalarm/kalarmd/alarmguiiface.h b/kalarm/kalarmd/alarmguiiface.h index 49a467008..d221fd345 100644 --- a/kalarm/kalarmd/alarmguiiface.h +++ b/kalarm/kalarmd/alarmguiiface.h @@ -35,7 +35,7 @@ namespace KAlarmd NOT_FOUND = 2 // notification type requires client start, but client executable not found }; - enum CalendartqStatus // parameters to client notification + enum CalendarStatus // parameters to client notification { CALENDAR_ENABLED, // calendar is now being monitored CALENDAR_DISABLED, // calendar is available but not being monitored @@ -53,9 +53,9 @@ class AlarmGuiIface : virtual public DCOPObject K_DCOP k_dcop: /** Called to notify a change in status of the calendar. - @param calendartqStatus new calendar status. Value is of type CalendartqStatus. + @param calendarStatus new calendar status. Value is of type CalendarStatus. */ - virtual ASYNC alarmDaemonUpdate(int calendartqStatus, const TQString& calendarURL) = 0; + virtual ASYNC alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL) = 0; /** Called to notify that an alarm is due. */ diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 2b476d811..383d03caf 100644 --- a/kalarm/kamail.cpp +++ b/kalarm/kamail.cpp @@ -115,14 +115,14 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify) if (identity.isNull()) { kdError(5950) << "KAMail::send(): identity" << event.emailFromId() << "not found" << endl; - errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").tqarg(event.emailFromId())); + errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").arg(event.emailFromId())); return false; } from = identity.fullEmailAddr(); if (from.isEmpty()) { kdError(5950) << "KAMail::send(): identity" << identity.identityName() << "uoid" << identity.uoid() << ": no email address" << endl; - errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").tqarg(identity.identityName())); + errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").arg(identity.identityName())); return false; } } @@ -153,30 +153,30 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify) { // Use sendmail to send the message TQString textComplete; - TQString command = KStandardDirs::findExe(TQString::tqfromLatin1("sendmail"), - TQString::tqfromLatin1("/sbin:/usr/sbin:/usr/lib")); + TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"), + TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); if (!command.isNull()) { - command += TQString::tqfromLatin1(" -f "); + command += TQString::fromLatin1(" -f "); command += KPIM::getEmailAddress(from); - command += TQString::tqfromLatin1(" -oi -t "); + command += TQString::fromLatin1(" -oi -t "); textComplete = initHeaders(data, false); } else { - command = KStandardDirs::findExe(TQString::tqfromLatin1("mail")); + command = KStandardDirs::findExe(TQString::fromLatin1("mail")); if (command.isNull()) { - errmsgs = errors(i18n("%1 not found").tqarg(TQString::tqfromLatin1("sendmail"))); // give up + errmsgs = errors(i18n("%1 not found").arg(TQString::fromLatin1("sendmail"))); // give up return false; } - command += TQString::tqfromLatin1(" -s "); + command += TQString::fromLatin1(" -s "); command += KShellProcess::quote(event.emailSubject()); if (!data.bcc.isEmpty()) { - command += TQString::tqfromLatin1(" -b "); + command += TQString::fromLatin1(" -b "); command += KShellProcess::quote(data.bcc); } @@ -321,7 +321,7 @@ TQString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bo // Notify KMail of the message in the temporary file TQByteArray callData; TQDataStream arg(callData, IO_WriteOnly); - arg << TQString::tqfromLatin1(folder) << tmpFile.name(); + arg << TQString::fromLatin1(folder) << tmpFile.name(); if (callKMail(callData, "KMailIface", "dcopAddMessage(TQString,TQString)", "int")) return TQString(); err = i18n("Error calling KMail"); @@ -386,15 +386,15 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow)); TQString from = data.from; from.replace(TQRegExp("^.*<"), TQString()).replace(TQRegExp(">.*$"), TQString()); - message = TQString::tqfromLatin1(buff); - message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); + message = TQString::fromLatin1(buff); + message += TQString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from); } - message += TQString::tqfromLatin1("From: ") + data.from; - message += TQString::tqfromLatin1("\nTo: ") + data.event.emailAddresses(", "); + message += TQString::fromLatin1("From: ") + data.from; + message += TQString::fromLatin1("\nTo: ") + data.event.emailAddresses(", "); if (!data.bcc.isEmpty()) - message += TQString::tqfromLatin1("\nBcc: ") + data.bcc; - message += TQString::tqfromLatin1("\nSubject: ") + data.event.emailSubject(); - message += TQString::tqfromLatin1("\nX-Mailer: %1/" KALARM_VERSION).tqarg(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; } @@ -426,13 +426,13 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) time(&timenow); TQCString boundary; boundary.sprintf("------------_%lu_-%lx=", 2*timenow, timenow); - message += TQString::tqfromLatin1("\nMIME-Version: 1.0"); - message += TQString::tqfromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").tqarg(boundary.data()); + message += TQString::fromLatin1("\nMIME-Version: 1.0"); + message += TQString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary.data()); if (!event.message().isEmpty()) { // There is a message body - message += TQString::tqfromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").tqarg(boundary.data()); + message += TQString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary.data()); message += event.message(); } @@ -446,12 +446,12 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) KIO::UDSEntry uds; if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow())) { kdError(5950) << "KAMail::appendBodyAttachments(): not found: " << attachment << endl; - return i18n("Attachment not found:\n%1").tqarg(attachment); + return i18n("Attachment not found:\n%1").arg(attachment); } KFileItem fi(uds, url); if (fi.isDir() || !fi.isReadable()) { kdError(5950) << "KAMail::appendBodyAttachments(): not file/not readable: " << attachment << endl; - return attachError.tqarg(attachment); + return attachError.arg(attachment); } // Check if the attachment is a text file @@ -463,21 +463,21 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) text = (mimeType == textMimeTypes[i]); } - message += TQString::tqfromLatin1("\n--%1").tqarg(boundary.data()); - message += TQString::tqfromLatin1("\nContent-Type: %2; name=\"%3\"").tqarg(mimeType).tqarg(fi.text()); - message += TQString::tqfromLatin1("\nContent-Transfer-Encoding: %1").tqarg(TQString::tqfromLatin1(text ? "8bit" : "BASE64")); - message += TQString::tqfromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").tqarg(fi.text()); + message += TQString::fromLatin1("\n--%1").arg(boundary.data()); + 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 TQString tmpFile; if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) { kdError(5950) << "KAMail::appendBodyAttachments(): load failure: " << attachment << endl; - return attachError.tqarg(attachment); + return attachError.arg(attachment); } TQFile file(tmpFile); if (!file.open(IO_ReadOnly) ) { kdDebug(5950) << "KAMail::appendBodyAttachments() tmp load error: " << attachment << endl; - return attachError.tqarg(attachment); + return attachError.arg(attachment); } TQIODevice::Offset size = file.size(); char* contents = new char [size + 1]; @@ -504,14 +504,14 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) atterror = true; } else - message += TQString::tqfromLatin1(base64, base64Size); + message += TQString::fromLatin1(base64, base64Size); delete[] base64; } delete[] contents; if (atterror) - return attachError.tqarg(attachment); + return attachError.arg(attachment); } - message += TQString::tqfromLatin1("\n--%1--\n.\n").tqarg(boundary.data()); + message += TQString::fromLatin1("\n--%1--\n.\n").arg(boundary.data()); } return TQString(); } @@ -523,7 +523,7 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) void KAMail::notifyQueued(const KAEvent& event) { KMime::Types::Address addr; - TQString localhost = TQString::tqfromLatin1("localhost"); + TQString localhost = TQString::fromLatin1("localhost"); TQString hostname = getHostName(); const EmailAddressList& addresses = event.emailAddresses(); for (TQValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it) @@ -922,10 +922,10 @@ char* KAMail::base64Encode(const char* in, TQIODevice::Offset size, TQIODevice:: TQStringList KAMail::errors(const TQString& err, bool sendfail) { TQString error1 = sendfail ? i18n("Failed to send email") - : i18n("Error copying sent email to KMail %1 folder").tqarg(i18n_sent_mail()); + : i18n("Error copying sent email to KMail %1 folder").arg(i18n_sent_mail()); if (err.isEmpty()) return TQStringList(error1); - TQStringList errs(TQString::tqfromLatin1("%1:").tqarg(error1)); + TQStringList errs(TQString::fromLatin1("%1:").arg(error1)); errs += err; return errs; } diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp index a14d5675e..8b7e9068f 100644 --- a/kalarm/karecurrence.cpp +++ b/kalarm/karecurrence.cpp @@ -165,7 +165,7 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun */ bool KARecurrence::set(const TQString& icalRRULE) { - static TQString RRULE = TQString::tqfromLatin1("RRULE:"); + static TQString RRULE = TQString::fromLatin1("RRULE:"); mCachedType = -1; clear(); if (icalRRULE.isEmpty()) diff --git a/kalarm/latecancel.cpp b/kalarm/latecancel.cpp index 4f69be211..e8f1d79bd 100644 --- a/kalarm/latecancel.cpp +++ b/kalarm/latecancel.cpp @@ -21,7 +21,7 @@ #include "kalarm.h" #include <tqwidgetstack.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> #include <kdialog.h> @@ -58,31 +58,31 @@ LateCancelSelector::LateCancelSelector(bool allowHourMinute, TQWidget* parent, c mCheckboxFrame = new TQFrame(mStack); mCheckboxFrame->setFrameStyle(TQFrame::NoFrame); mStack->addWidget(mCheckboxFrame, 1); - TQBoxLayout* tqlayout = new TQVBoxLayout(mCheckboxFrame, 0, 0); + TQBoxLayout* layout = new TQVBoxLayout(mCheckboxFrame, 0, 0); mCheckbox = new CheckBox(i18n_n_CancelIfLate(), mCheckboxFrame); - mCheckbox->setFixedSize(mCheckbox->tqsizeHint()); + mCheckbox->setFixedSize(mCheckbox->sizeHint()); connect(mCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool))); TQWhatsThis::add(mCheckbox, whatsThis); - tqlayout->addWidget(mCheckbox, 0, TQt::AlignAuto); + layout->addWidget(mCheckbox, 0, TQt::AlignAuto); mTimeSelectorFrame = new TQFrame(mStack); mTimeSelectorFrame->setFrameStyle(TQFrame::NoFrame); mStack->addWidget(mTimeSelectorFrame, 2); - tqlayout = new TQVBoxLayout(mTimeSelectorFrame, 0, 0); + layout = new TQVBoxLayout(mTimeSelectorFrame, 0, 0); mTimeSelector = new TimeSelector(i18n("Cancel if late by 10 minutes", "Ca&ncel if late by"), TQString(), whatsThis, i18n("Enter how late will cause the alarm to be canceled"), allowHourMinute, mTimeSelectorFrame); connect(mTimeSelector, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool))); - tqlayout->addWidget(mTimeSelector); + layout->addWidget(mTimeSelector); mLayout->addWidget(mStack); - tqlayout = new TQHBoxLayout(mLayout, KDialog::spacingHint()); - tqlayout->addSpacing(3*KDialog::spacingHint()); + layout = new TQHBoxLayout(mLayout, KDialog::spacingHint()); + layout->addSpacing(3*KDialog::spacingHint()); mAutoClose = new CheckBox(i18n_AutoCloseWin(), this); - mAutoClose->setFixedSize(mAutoClose->tqsizeHint()); + mAutoClose->setFixedSize(mAutoClose->sizeHint()); TQWhatsThis::add(mAutoClose, i18n("Automatically close the alarm window after the expiry of the late-cancelation period")); - tqlayout->addWidget(mAutoClose); - tqlayout->addStretch(); + layout->addWidget(mAutoClose); + layout->addStretch(); mAutoClose->hide(); mAutoClose->setEnabled(false); diff --git a/kalarm/latecancel.h b/kalarm/latecancel.h index ba03d07d7..08fcf2c3e 100644 --- a/kalarm/latecancel.h +++ b/kalarm/latecancel.h @@ -55,7 +55,7 @@ class LateCancelSelector : public TQFrame void slotToggled(bool); private: - TQBoxLayout* mLayout; // overall tqlayout for the widget + TQBoxLayout* mLayout; // overall layout for the widget TQWidgetStack* mStack; // contains mCheckboxFrame and mTimeSelectorFrame TQFrame* mCheckboxFrame; CheckBox* mCheckbox; // displayed when late cancellation is not selected diff --git a/kalarm/lib/buttongroup.cpp b/kalarm/lib/buttongroup.cpp index 018640123..2905147f3 100644 --- a/kalarm/lib/buttongroup.cpp +++ b/kalarm/lib/buttongroup.cpp @@ -19,7 +19,7 @@ */ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqbutton.h> #include <kdialog.h> diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h index f81490ea9..7759f6229 100644 --- a/kalarm/lib/checkbox.h +++ b/kalarm/lib/checkbox.h @@ -63,7 +63,7 @@ class CheckBox : public TQCheckBox */ virtual void setReadOnly(bool readOnly); /** Returns the widget which receives focus when the user selects the check box by clicking on it. */ - TQWidget* tqfocusWidget() 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 diff --git a/kalarm/lib/dateedit.cpp b/kalarm/lib/dateedit.cpp index b9699988d..2fef25de5 100644 --- a/kalarm/lib/dateedit.cpp +++ b/kalarm/lib/dateedit.cpp @@ -77,11 +77,11 @@ void DateEdit::pastLimitMessage(const TQDate& limit, const TQString& error, cons TQString errString = error; if (errString.isNull()) { - if (limit == TQDate::tqcurrentDate()) + if (limit == TQDate::currentDate()) errString = i18n("today"); else errString = KGlobal::locale()->formatDate(limit, true); - errString = defaultError.tqarg(errString); + errString = defaultError.arg(errString); } KMessageBox::sorry(this, errString); } diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp index 16ca507e9..6b5787ebf 100644 --- a/kalarm/lib/lineedit.cpp +++ b/kalarm/lib/lineedit.cpp @@ -149,7 +149,7 @@ void LineEdit::dropEvent(TQDropEvent* e) case Emails: { // Email entry field - ignore all but mailto: URLs - TQString mailto = TQString::tqfromLatin1("mailto"); + TQString mailto = TQString::fromLatin1("mailto"); for (KURL::List::Iterator it = files.begin(); it != files.end(); ++it) { if ((*it).protocol() == mailto) @@ -168,7 +168,7 @@ void LineEdit::dropEvent(TQDropEvent* e) if (mType == Emails) { // Remove newlines from a list of email addresses, and allow an eventual mailto: protocol - TQString mailto = TQString::tqfromLatin1("mailto:"); + TQString mailto = TQString::fromLatin1("mailto:"); newEmails = TQStringList::split(TQRegExp("[\r\n]+"), txt); for (TQStringList::Iterator it = newEmails.begin(); it != newEmails.end(); ++it) { diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp index 3345c9c4b..48c18f1cd 100644 --- a/kalarm/lib/messagebox.cpp +++ b/kalarm/lib/messagebox.cpp @@ -109,7 +109,7 @@ bool MessageBox::setDefaultShouldBeShownContinue(const TQString& dontShowAgainNa return false; // First check whether there is an existing setting KConfig* config = mConfig ? mConfig : KGlobal::config(); - config->setGroup(TQString::tqfromLatin1("Notification Messages")); + config->setGroup(TQString::fromLatin1("Notification Messages")); if (config->hasKey(dontShowAgainName)) return false; @@ -168,10 +168,10 @@ void MessageBox::saveDontShowAgain(const TQString& dontShowAgainName, bool yesno if (dontShowAgainName.isEmpty()) return; KConfig* config = mConfig ? mConfig : KGlobal::config(); - config->setGroup(TQString::tqfromLatin1("Notification Messages")); + config->setGroup(TQString::fromLatin1("Notification Messages")); bool global = (dontShowAgainName[0] == ':'); if (yesno) - config->writeEntry(dontShowAgainName, TQString::tqfromLatin1(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/radiobutton.h b/kalarm/lib/radiobutton.h index 107957ca7..3af80343f 100644 --- a/kalarm/lib/radiobutton.h +++ b/kalarm/lib/radiobutton.h @@ -63,7 +63,7 @@ class RadioButton : public TQRadioButton */ virtual void setReadOnly(bool readOnly); /** Returns the widget which receives focus when the button is clicked. */ - TQWidget* tqfocusWidget() 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 diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp index 09daf91db..b3df822e8 100644 --- a/kalarm/lib/shellprocess.cpp +++ b/kalarm/lib/shellprocess.cpp @@ -40,7 +40,7 @@ bool ShellProcess::mAuthorised = false; ShellProcess::ShellProcess(const TQString& command) : KShellProcess(shellName()), mCommand(command), - mtqStatus(INACTIVE), + mStatus(INACTIVE), mStdinExit(false) { } @@ -52,7 +52,7 @@ bool ShellProcess::start(Communication comm) { if (!authorised()) { - mtqStatus = UNAUTHORISED; + mStatus = UNAUTHORISED; return false; } KShellProcess::operator<<(mCommand); @@ -60,10 +60,10 @@ bool ShellProcess::start(Communication comm) connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExited(KProcess*))); if (!KShellProcess::start(KProcess::NotifyOnExit, comm)) { - mtqStatus = START_FAIL; + mStatus = START_FAIL; return false; } - mtqStatus = RUNNING; + mStatus = RUNNING; return true; } @@ -76,11 +76,11 @@ void ShellProcess::slotExited(KProcess* proc) { kdDebug(5950) << "ShellProcess::slotExited()\n"; mStdinQueue.clear(); - mtqStatus = SUCCESS; + mStatus = SUCCESS; if (!proc->normalExit()) { kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": died/killed\n"; - mtqStatus = DIED; + mStatus = DIED; } else { @@ -90,7 +90,7 @@ void ShellProcess::slotExited(KProcess* proc) || mShellName == "ksh" && status == 127) { kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": not found or not executable\n"; - mtqStatus = NOT_FOUND; + mStatus = NOT_FOUND; } } emit shellExited(this); @@ -140,7 +140,7 @@ void ShellProcess::stdinExit() */ TQString ShellProcess::errorMessage() const { - switch (mtqStatus) + switch (mStatus) { case UNAUTHORISED: return i18n("Failed to execute command (shell access not authorized):"); @@ -174,8 +174,8 @@ const TQCString& ShellProcess::shellPath() struct stat fileinfo; if (stat(envshell.data(), &fileinfo) != -1 // ensure file exists && !S_ISDIR(fileinfo.st_mode) // and it's not a directory - && !S_ISCHR(fileinfo.st_mode) // and it's not a character tqdevice - && !S_ISBLK(fileinfo.st_mode) // and it's not a block tqdevice + && !S_ISCHR(fileinfo.st_mode) // and it's not a character device + && !S_ISBLK(fileinfo.st_mode) // and it's not a block device #ifdef S_ISSOCK && !S_ISSOCK(fileinfo.st_mode) // and it's not a socket #endif diff --git a/kalarm/lib/shellprocess.h b/kalarm/lib/shellprocess.h index fd303bea0..a4ff79889 100644 --- a/kalarm/lib/shellprocess.h +++ b/kalarm/lib/shellprocess.h @@ -61,7 +61,7 @@ class ShellProcess : public KShellProcess * @li NOT_FOUND - the command was either not found or not executable. * @li START_FAIL - the command couldn't be started for other reasons. */ - enum tqStatus { + enum Status { INACTIVE, // start() has not yet been called to run the command RUNNING, // command is currently running SUCCESS, // command appears to have exited successfully @@ -80,11 +80,11 @@ class ShellProcess : public KShellProcess */ bool start(Communication comm = NoCommunication); /** Returns the current status of the shell process. */ - tqStatus status() const { return mtqStatus; } + Status status() const { return mStatus; } /** Returns whether the command was run successfully. * @return True if the command has been run and appears to have exited successfully. */ - bool normalExit() const { return mtqStatus == SUCCESS; } + bool normalExit() const { return mStatus == SUCCESS; } /** Returns the command configured to be run. */ const TQString& command() const { return mCommand; } /** Returns the error message corresponding to the command exit status. @@ -132,7 +132,7 @@ class ShellProcess : public KShellProcess static bool mAuthorised; // true if shell commands are authorised TQString mCommand; // copy of command to be executed TQValueList<TQCString> mStdinQueue; // queued strings to send to STDIN - tqStatus mtqStatus; // current execution status + Status mStatus; // current execution status bool mStdinExit; // exit once STDIN queue has been written }; diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp index 3ec3b68c0..a45a5b4e9 100644 --- a/kalarm/lib/spinbox2.cpp +++ b/kalarm/lib/spinbox2.cpp @@ -142,7 +142,7 @@ void SpinBox2::setLineStep(int step) { mLineStep = step; if (reverseButtons()) - mUpdown2->setLineStep(step); // reverse tqlayout, but still set the right buttons + mUpdown2->setLineStep(step); // reverse layout, but still set the right buttons else mSpinbox->setLineStep(step); } @@ -153,7 +153,7 @@ void SpinBox2::setSteps(int line, int page) mPageStep = page; if (reverseButtons()) { - mUpdown2->setLineStep(line); // reverse tqlayout, but still set the right buttons + mUpdown2->setLineStep(line); // reverse layout, but still set the right buttons mSpinbox->setLineStep(page); } else @@ -169,7 +169,7 @@ void SpinBox2::setShiftSteps(int line, int page) mPageShiftStep = page; if (reverseButtons()) { - mUpdown2->setLineShiftStep(line); // reverse tqlayout, but still set the right buttons + mUpdown2->setLineShiftStep(line); // reverse layout, but still set the right buttons mSpinbox->setLineShiftStep(page); } else @@ -225,18 +225,18 @@ void SpinBox2::showEvent(TQShowEvent*) arrange(); } -TQSize SpinBox2::tqsizeHint() const +TQSize SpinBox2::sizeHint() const { getMetrics(); - TQSize size = mSpinbox->tqsizeHint(); + TQSize size = mSpinbox->sizeHint(); size.setWidth(size.width() - xSpinbox + wUpdown2 + wGap); return size; } -TQSize SpinBox2::tqminimumSizeHint() const +TQSize SpinBox2::minimumSizeHint() const { getMetrics(); - TQSize size = mSpinbox->tqminimumSizeHint(); + TQSize size = mSpinbox->minimumSizeHint(); size.setWidth(size.width() - xSpinbox + wUpdown2 + wGap); return size; } @@ -265,14 +265,14 @@ void SpinBox2::updateMirror() void SpinBox2::arrange() { getMetrics(); - TQRect arrowRect = TQStyle::tqvisualRect(TQRect(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(TQStyle::tqvisualRect(TQRect(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(TQStyle::tqvisualRect(TQRect(0, 11, wUpdown2, height()), this)); +//mSpinMirror->setGeometry(TQStyle::visualRect(TQRect(0, 11, wUpdown2, height()), this)); mSpinMirror->setNormalButtons(TQPixmap::grabWidget(mUpdown2Frame, 0, 0)); } @@ -422,7 +422,7 @@ void SpinMirror::redraw() void SpinMirror::redraw(const TQPixmap& px) { TQCanvas* c = canvas(); - c->tqsetBackgroundPixmap(px); + c->setBackgroundPixmap(px); c->setAllChanged(); c->update(); } diff --git a/kalarm/lib/spinbox2.h b/kalarm/lib/spinbox2.h index 4391fbb9c..14c2f16e1 100644 --- a/kalarm/lib/spinbox2.h +++ b/kalarm/lib/spinbox2.h @@ -115,8 +115,8 @@ class SpinBox2 : public TQFrame */ bool wrapping() const { return mSpinbox->wrapping(); } - /** Set the text tqalignment of the widget */ - void tqsetAlignment(int a) { mSpinbox->tqsetAlignment(a); } + /** 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(TQSpinBox::ButtonSymbols); /** Returns the button symbols currently in use (arrows or plus/minus). */ @@ -131,8 +131,8 @@ class SpinBox2 : public TQFrame */ const TQValidator* validator() const { return mSpinbox->validator(); } - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() 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 TQFrame /** Returns the specified value clamped to the range of the spin box. */ int bound(int val) const; - /** Returns the tqgeometry of the right-hand "up" button. */ + /** Returns the geometry of the right-hand "up" button. */ TQRect upRect() const { return mSpinbox->upRect(); } - /** Returns the tqgeometry of the right-hand "down" button. */ + /** Returns the geometry of the right-hand "down" button. */ TQRect downRect() const { return mSpinbox->downRect(); } - /** Returns the tqgeometry of the left-hand "up" button. */ + /** Returns the geometry of the left-hand "up" button. */ TQRect up2Rect() const; - /** Returns the tqgeometry of the left-hand "down" button. */ + /** Returns the geometry of the left-hand "down" button. */ TQRect down2Rect() const; /** Returns the unshifted step increment for the right-hand spin buttons, @@ -286,7 +286,7 @@ class SpinBox2 : public TQFrame : SpinBox(parent, name), owner(sb2) { } MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* parent, const char* name = 0) : SpinBox(minValue, maxValue, step, parent, name), owner(sb2) { } - void tqsetAlignment(int a) { editor()->tqsetAlignment(a); } + void setAlignment(int a) { editor()->setAlignment(a); } virtual TQString mapValueToText(int v) { return owner->mapValueToText(v); } virtual int mapTextToValue(bool* ok) { return owner->mapTextToValue(ok); } TQString mapValToText(int v) { return SpinBox::mapValueToText(v); } @@ -310,7 +310,7 @@ class SpinBox2 : public TQFrame int mLineShiftStep; // right button increment with shift pressed int mPageStep; // left button increment int mPageShiftStep; // left button increment with shift pressed - bool mReverseWithLayout; // reverse button positions if reverse tqlayout (default = true) + bool mReverseWithLayout; // reverse button positions if reverse layout (default = true) friend class MainSpinBox; }; diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp index caed93d7b..eecef7d4b 100644 --- a/kalarm/lib/synchtimer.cpp +++ b/kalarm/lib/synchtimer.cpp @@ -196,7 +196,7 @@ void DailyTimer::changeTime(const TQTime& newTimeOfDay, bool triggerMissed) void DailyTimer::start() { // TIMEZONE = local time - TQDateTime now = TQDateTime::tqcurrentDateTime(); + 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. @@ -224,7 +224,7 @@ void DailyTimer::start() void DailyTimer::slotTimer() { // TIMEZONE = local time - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); mLastDate = now.date(); TQDateTime next = TQDateTime(mLastDate.addDays(1), mTime); uint interval = next.toTime_t() - now.toTime_t(); diff --git a/kalarm/lib/timeedit.cpp b/kalarm/lib/timeedit.cpp index 170914922..01152fcee 100644 --- a/kalarm/lib/timeedit.cpp +++ b/kalarm/lib/timeedit.cpp @@ -37,13 +37,13 @@ TimeEdit::TimeEdit(TQWidget* parent, const char* name) { bool use12hour = KGlobal::locale()->use12Clock(); mSpinBox = new TimeSpinBox(!use12hour, this); - mSpinBox->setFixedSize(mSpinBox->tqsizeHint()); + mSpinBox->setFixedSize(mSpinBox->sizeHint()); 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->tqsizeHint()); + mAmPm->setFixedSize(mAmPm->sizeHint()); connect(mAmPm, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotAmPmChanged(int))); } } diff --git a/kalarm/lib/timeperiod.cpp b/kalarm/lib/timeperiod.cpp index 291ba0872..e372615a7 100644 --- a/kalarm/lib/timeperiod.cpp +++ b/kalarm/lib/timeperiod.cpp @@ -71,7 +71,7 @@ TimePeriod::TimePeriod(bool allowHourMinute, TQWidget* parent, const char* name) connect(mTimeSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotTimeChanged(int))); mSpinStack->addWidget(mTimeSpinBox, 1); - mSpinStack->setFixedSize(mSpinBox->tqsizeHint().expandedTo(mTimeSpinBox->tqsizeHint())); + mSpinStack->setFixedSize(mSpinBox->sizeHint().expandedTo(mTimeSpinBox->sizeHint())); mHourMinuteRaised = mNoHourMinute; showHourMin(!mNoHourMinute); @@ -87,7 +87,7 @@ TimePeriod::TimePeriod(bool allowHourMinute, TQWidget* parent, const char* name) mUnitsCombo->insertItem(i18n_days()); mUnitsCombo->insertItem(i18n_weeks()); mMaxUnitShown = WEEKS; - mUnitsCombo->setFixedSize(mUnitsCombo->tqsizeHint()); + mUnitsCombo->setFixedSize(mUnitsCombo->sizeHint()); connect(mUnitsCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotUnitsSelected(int))); setFocusProxy(mUnitsCombo); diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp index f756112e8..b2121072f 100644 --- a/kalarm/lib/timespinbox.cpp +++ b/kalarm/lib/timespinbox.cpp @@ -69,7 +69,7 @@ TimeSpinBox::TimeSpinBox(bool use24hour, TQWidget* parent, const char* name) setReverseWithLayout(false); // keep buttons the same way round even if right-to-left language setShiftSteps(5, 360); // shift-left button increments 5 min / 6 hours setSelectOnStep(false); - tqsetAlignment(TQt::AlignHCenter); + setAlignment(TQt::AlignHCenter); connect(this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int))); } @@ -88,7 +88,7 @@ TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent, const c 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); - tqsetAlignment(TQApplication::reverseLayout() ? TQt::AlignLeft : TQt::AlignRight); + setAlignment(TQApplication::reverseLayout() ? TQt::AlignLeft : TQt::AlignRight); } TQString TimeSpinBox::shiftWhatsThis() @@ -211,7 +211,7 @@ void TimeSpinBox::setValid(bool valid) { mInvalid = true; SpinBox2::setMinValue(mMinimumValue - 1); - setSpecialValueText(TQString::tqfromLatin1("**:**")); + setSpecialValueText(TQString::fromLatin1("**:**")); SpinBox2::setValue(mMinimumValue - 1); } } @@ -280,16 +280,16 @@ void TimeSpinBox::slotValueChanged(int value) mPm = mValidator->mPm = (value >= 720); } -TQSize TimeSpinBox::tqsizeHint() const +TQSize TimeSpinBox::sizeHint() const { - TQSize sz = SpinBox2::tqsizeHint(); + TQSize sz = SpinBox2::sizeHint(); TQFontMetrics fm(font()); return TQSize(sz.width() + fm.width(":"), sz.height()); } -TQSize TimeSpinBox::tqminimumSizeHint() const +TQSize TimeSpinBox::minimumSizeHint() const { - TQSize sz = SpinBox2::tqminimumSizeHint(); + TQSize sz = SpinBox2::minimumSizeHint(); TQFontMetrics fm(font()); return TQSize(sz.width() + fm.width(":"), sz.height()); } diff --git a/kalarm/lib/timespinbox.h b/kalarm/lib/timespinbox.h index 0be232453..fe45efab4 100644 --- a/kalarm/lib/timespinbox.h +++ b/kalarm/lib/timespinbox.h @@ -91,8 +91,8 @@ class TimeSpinBox : public SpinBox2 */ static TQString shiftWhatsThis(); - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; public slots: /** Sets the value of the spin box. diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp index 6985430b5..e9445d43a 100644 --- a/kalarm/mainwindow.cpp +++ b/kalarm/mainwindow.cpp @@ -71,11 +71,11 @@ using namespace KCal; static const char* UI_FILE = "kalarmui.rc"; static const char* WINDOW_NAME = "MainWindow"; -static const TQString VIEW_GROUP = TQString::tqfromLatin1("View"); -static const TQString SHOW_TIME_KEY = TQString::tqfromLatin1("ShowAlarmTime"); -static const TQString SHOW_TIME_TO_KEY = TQString::tqfromLatin1("ShowTimeToAlarm"); -static const TQString SHOW_ARCHIVED_KEY = TQString::tqfromLatin1("ShowArchivedAlarms"); -static const TQString SHOW_RESOURCES_KEY = TQString::tqfromLatin1("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 TQString undoText; static TQString undoTextStripped; @@ -123,7 +123,7 @@ MainWindow::MainWindow(bool restored) mHiddenTrayParent(false) { kdDebug(5950) << "MainWindow::MainWindow()\n"; - setAutoSaveSettings(TQString::tqfromLatin1(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); @@ -136,8 +136,8 @@ MainWindow::MainWindow(bool restored) if (KAlarm::readConfigWindowSize(WINDOW_NAME, s)) resize(s); } - config->setGroup(TQString::tqfromLatin1(WINDOW_NAME)); - TQValueList<int> order = config->readIntListEntry(TQString::tqfromLatin1("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) @@ -201,10 +201,10 @@ MainWindow::~MainWindow() */ void MainWindow::saveProperties(KConfig* config) { - config->writeEntry(TQString::tqfromLatin1("HiddenTrayParent"), isTrayParent() && isHidden()); - config->writeEntry(TQString::tqfromLatin1("ShowExpired"), mShowExpired); - config->writeEntry(TQString::tqfromLatin1("ShowTime"), mShowTime); - config->writeEntry(TQString::tqfromLatin1("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(TQString::tqfromLatin1("HiddenTrayParent")); - mShowExpired = config->readBoolEntry(TQString::tqfromLatin1("ShowExpired")); - mShowTime = config->readBoolEntry(TQString::tqfromLatin1("ShowTime")); - mShowTimeTo = config->readBoolEntry(TQString::tqfromLatin1("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")); } /****************************************************************************** @@ -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)").tqarg(TQString::tqfromLatin1(UI_FILE))); + KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(TQString::fromLatin1(UI_FILE))); mMenuError = false; } } @@ -315,8 +315,8 @@ void MainWindow::hideEvent(TQHideEvent* he) void MainWindow::columnsReordered() { KConfig* config = KGlobal::config(); - config->setGroup(TQString::tqfromLatin1(WINDOW_NAME)); - config->writeEntry(TQString::tqfromLatin1("ColumnOrder"), mListView->columnOrder()); + config->setGroup(TQString::fromLatin1(WINDOW_NAME)); + config->writeEntry(TQString::fromLatin1("ColumnOrder"), mListView->columnOrder()); config->sync(); } @@ -386,7 +386,7 @@ void MainWindow::initActions() 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(slotUndotqStatus(const TQString&, const TQString&))); + 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()), TQT_TQOBJECT(this), TQT_SLOT(slotPrefsChanged())); connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction())); @@ -415,7 +415,7 @@ void MainWindow::initActions() tb->applySettings(KGlobal::config(), "Toolbars"); Undo::emitChanged(); // set the Undo/Redo menu texts - Daemon::checktqStatus(); + Daemon::checkStatus(); Daemon::monitoringAlarms(); } @@ -947,7 +947,7 @@ void MainWindow::updateTrayIconAction() */ void MainWindow::updateActionsMenu() { - Daemon::checktqStatus(); // update the Alarms Enabled item status + Daemon::checkStatus(); // update the Alarms Enabled item status } /****************************************************************************** @@ -1023,8 +1023,8 @@ void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type) TQString actText = Undo::actionText(type, id); TQString descrip = Undo::description(type, id); TQString text = descrip.isEmpty() - ? i18n("Undo/Redo [action]", "%1 %2").tqarg(action).tqarg(actText) - : i18n("Undo [action]: message", "%1 %2: %3").tqarg(action).tqarg(actText).tqarg(descrip); + ? 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::slotUndotqStatus(const TQString& undo, const TQString& redo) +void MainWindow::slotUndoStatus(const TQString& undo, const TQString& redo) { if (undo.isNull()) { @@ -1043,7 +1043,7 @@ void MainWindow::slotUndotqStatus(const TQString& undo, const TQString& redo) else { mActionUndo->setEnabled(true); - mActionUndo->setText(TQString("%1 %2").tqarg(undoText).tqarg(undo)); + mActionUndo->setText(TQString("%1 %2").arg(undoText).arg(undo)); } if (redo.isNull()) { @@ -1053,7 +1053,7 @@ void MainWindow::slotUndotqStatus(const TQString& undo, const TQString& redo) else { mActionRedo->setEnabled(true); - mActionRedo->setText(TQString("%1 %2").tqarg(redoText).tqarg(redo)); + mActionRedo->setText(TQString("%1 %2").arg(redoText).arg(redo)); } } @@ -1196,7 +1196,7 @@ void MainWindow::executeDropEvent(MainWindow* win, TQDropEvent* e) AlarmText alarmText; KPIM::MailList mailList; KURL::List files; - KCal::CalendarLocal calendar(TQString::tqfromLatin1("UTC")); + KCal::CalendarLocal calendar(TQString::fromLatin1("UTC")); calendar.setLocalTime(); // default to local time (i.e. no time zone) #ifndef NDEBUG TQCString fmts; @@ -1213,7 +1213,7 @@ void MainWindow::executeDropEvent(MainWindow* win, TQDropEvent* e) * Don't change them without careful thought !! */ if (e->provides("message/rfc822") - && !(bytes = e->tqencodedData("message/rfc822")).isEmpty()) + && !(bytes = e->encodedData("message/rfc822")).isEmpty()) { // Email message(s). Ignore all but the first. kdDebug(5950) << "MainWindow::executeDropEvent(email)" << endl; @@ -1299,7 +1299,7 @@ void MainWindow::slotSelection() bool enableEnableDisable = true; bool enableEnable = false; bool enableDisable = false; - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) { const KAEvent& event = ((AlarmListViewItem*)(*it))->event(); diff --git a/kalarm/mainwindow.h b/kalarm/mainwindow.h index cb070e9a2..08fcfacad 100644 --- a/kalarm/mainwindow.h +++ b/kalarm/mainwindow.h @@ -126,7 +126,7 @@ class MainWindow : public MainWindowBase void slotRedoItem(int id); void slotInitUndoMenu(); void slotInitRedoMenu(); - void slotUndotqStatus(const TQString&, const TQString&); + void slotUndoStatus(const TQString&, const TQString&); void slotFindActive(bool); void slotPrefsChanged(); void updateTrayIconAction(); diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index f7decdf65..2c455b128 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -25,13 +25,13 @@ #include <tqfile.h> #include <tqfileinfo.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqlabel.h> #include <tqwhatsthis.h> #include <tqtooltip.h> #include <tqdragobject.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqtimer.h> #include <kstandarddirs.h> @@ -101,7 +101,7 @@ class MessageText : public TQTextEdit } int scrollBarHeight() const { return horizontalScrollBar()->height(); } int scrollBarWidth() const { return verticalScrollBar()->width(); } - virtual TQSize tqsizeHint() const { return TQSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); } + virtual TQSize sizeHint() const { return TQSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); } }; @@ -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(TQString::tqfromLatin1("MessageWin"), false); + setAutoSaveSettings(TQString::fromLatin1("MessageWin"), false); initView(); mWindowList.append(this); if (event.autoClose()) @@ -298,13 +298,13 @@ void MessageWin::initView() { // Show the alarm date/time, together with an "Advance reminder" text where appropriate TQFrame* frame = 0; - TQVBoxLayout* tqlayout = topLayout; + TQVBoxLayout* layout = topLayout; if (reminder) { frame = new TQFrame(topWidget); frame->setFrameStyle(TQFrame::Box | TQFrame::Raised); topLayout->addWidget(frame, 0, TQt::AlignHCenter); - tqlayout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading); + layout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading); } // Alarm date/time @@ -314,8 +314,8 @@ void MessageWin::initView() : KGlobal::locale()->formatDateTime(mDateTime.dateTime())); if (!frame) label->setFrameStyle(TQFrame::Box | TQFrame::Raised); - label->setFixedSize(label->tqsizeHint()); - tqlayout->addWidget(label, 0, TQt::AlignHCenter); + label->setFixedSize(label->sizeHint()); + layout->addWidget(label, 0, TQt::AlignHCenter); TQWhatsThis::add(label, i18n("The scheduled date/time for the message (as opposed to the actual time of display).")); @@ -323,9 +323,9 @@ void MessageWin::initView() { label = new TQLabel(frame); label->setText(i18n("Reminder")); - label->setFixedSize(label->tqsizeHint()); - tqlayout->addWidget(label, 0, TQt::AlignHCenter); - frame->setFixedSize(frame->tqsizeHint()); + label->setFixedSize(label->sizeHint()); + layout->addWidget(label, 0, TQt::AlignHCenter); + frame->setFixedSize(frame->sizeHint()); } } @@ -339,7 +339,7 @@ void MessageWin::initView() // Display the file name TQLabel* label = new TQLabel(mMessage, topWidget); label->setFrameStyle(TQFrame::Box | TQFrame::Raised); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); TQWhatsThis::add(label, i18n("The file whose contents are displayed below")); topLayout->addWidget(label, 0, TQt::AlignHCenter); @@ -357,7 +357,7 @@ void MessageWin::initView() opened = true; KTextBrowser* view = new KTextBrowser(topWidget, "fileContents"); MWMimeSourceFactory msf(tmpFile, view); - view->setMinimumSize(view->tqsizeHint()); + view->setMinimumSize(view->sizeHint()); topLayout->addWidget(view); // Set the default size to 20 lines square. @@ -365,7 +365,7 @@ 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(TQSize(h, h).expandedTo(view->tqsizeHint())); + view->resize(TQSize(h, h).expandedTo(view->sizeHint())); TQWhatsThis::add(view, i18n("The contents of the file to be displayed")); } KIO::NetAccess::removeTempFile(tmpFile); @@ -388,7 +388,7 @@ void MessageWin::initView() text->setPaletteForegroundColor(mFgColour); text->setFont(mFont); int lineSpacing = text->fontMetrics().lineSpacing(); - TQSize s = text->tqsizeHint(); + TQSize s = text->sizeHint(); int h = s.height(); text->setMaximumHeight(h + text->scrollBarHeight()); text->setMinimumHeight(TQMIN(h, lineSpacing*4)); @@ -401,14 +401,14 @@ void MessageWin::initView() // Don't include any horizontal margins if message is 2/3 screen width if (!mWinModule) mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP); - if (text->tqsizeHint().width() >= mWinModule->workArea().width()*2/3) + if (text->sizeHint().width() >= mWinModule->workArea().width()*2/3) topLayout->addWidget(text, 1, TQt::AlignHCenter); else { - TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout); - tqlayout->addSpacing(hspace); - tqlayout->addWidget(text, 1, TQt::AlignHCenter); - tqlayout->addSpacing(hspace); + TQBoxLayout* layout = new TQHBoxLayout(topLayout); + layout->addSpacing(hspace); + layout->addWidget(text, 1, TQt::AlignHCenter); + layout->addSpacing(hspace); } if (!reminder) topLayout->addStretch(); @@ -426,7 +426,7 @@ void MessageWin::initView() mRemainingText = new TQLabel(topWidget); mRemainingText->setFrameStyle(TQFrame::Box | TQFrame::Raised); mRemainingText->setMargin(leading); - if (mDateTime.isDateOnly() || TQDate::tqcurrentDate().daysTo(mDateTime.date()) > 0) + if (mDateTime.isDateOnly() || TQDate::currentDate().daysTo(mDateTime.date()) > 0) { setRemainingTextDay(); MidnightTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextDay())); // update every day @@ -456,17 +456,17 @@ void MessageWin::initView() TQGridLayout* grid = new TQGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint()); TQLabel* label = new TQLabel(i18n("Email addressee", "To:"), frame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 0, 0, TQt::AlignLeft); label = new TQLabel(mEvent.emailAddresses("\n"), frame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 0, 1, TQt::AlignLeft); label = new TQLabel(i18n("Email subject", "Subject:"), frame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 1, 0, TQt::AlignLeft); label = new TQLabel(mEvent.emailSubject(), frame); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 1, 1, TQt::AlignLeft); break; } @@ -484,21 +484,21 @@ void MessageWin::initView() else { setCaption(i18n("Error")); - TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout); - tqlayout->setMargin(2*KDialog::marginHint()); - tqlayout->addStretch(); + TQBoxLayout* layout = new TQHBoxLayout(topLayout); + layout->setMargin(2*KDialog::marginHint()); + layout->addStretch(); TQLabel* label = new TQLabel(topWidget); label->setPixmap(DesktopIcon("error")); - label->setFixedSize(label->tqsizeHint()); - tqlayout->addWidget(label, 0, TQt::AlignRight); - TQBoxLayout* vtqlayout = new TQVBoxLayout(tqlayout); + label->setFixedSize(label->sizeHint()); + layout->addWidget(label, 0, TQt::AlignRight); + TQBoxLayout* vlayout = new TQVBoxLayout(layout); for (TQStringList::Iterator it = mErrorMsgs.begin(); it != mErrorMsgs.end(); ++it) { label = new TQLabel(*it, topWidget); - label->setFixedSize(label->tqsizeHint()); - vtqlayout->addWidget(label, 0, TQt::AlignLeft); + label->setFixedSize(label->sizeHint()); + vlayout->addWidget(label, 0, TQt::AlignLeft); } - tqlayout->addStretch(); + layout->addStretch(); } TQGridLayout* grid = new TQGridLayout(1, 4); @@ -511,7 +511,7 @@ void MessageWin::initView() // Prevent accidental acknowledgement of the message if the user is typing when the window appears mOkButton->clearFocus(); mOkButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection - mOkButton->setFixedSize(mOkButton->tqsizeHint()); + mOkButton->setFixedSize(mOkButton->sizeHint()); connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close())); grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter); TQWhatsThis::add(mOkButton, i18n("Acknowledge the alarm")); @@ -521,7 +521,7 @@ void MessageWin::initView() // Edit button mEditButton = new TQPushButton(i18n("&Edit..."), topWidget); mEditButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection - mEditButton->setFixedSize(mEditButton->tqsizeHint()); + mEditButton->setFixedSize(mEditButton->sizeHint()); connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit())); grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter); TQWhatsThis::add(mEditButton, i18n("Edit the alarm.")); @@ -532,7 +532,7 @@ void MessageWin::initView() // Defer button mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget); mDeferButton->setFocusPolicy(TQ_ClickFocus); // don't allow keyboard selection - mDeferButton->setFixedSize(mDeferButton->tqsizeHint()); + mDeferButton->setFixedSize(mDeferButton->sizeHint()); connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer())); grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter); TQWhatsThis::add(mDeferButton, @@ -549,7 +549,7 @@ void MessageWin::initView() TQPixmap pixmap = MainBarIcon("player_stop"); mSilenceButton = new TQPushButton(topWidget); mSilenceButton->setPixmap(pixmap); - mSilenceButton->setFixedSize(mSilenceButton->tqsizeHint()); + mSilenceButton->setFixedSize(mSilenceButton->sizeHint()); connect(mSilenceButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopPlay())); grid->addWidget(mSilenceButton, 0, gridIndex++, AlignHCenter); TQToolTip::add(mSilenceButton, i18n("Stop sound")); @@ -563,10 +563,10 @@ void MessageWin::initView() if (mKMailSerialNumber) { // KMail button - TQPixmap pixmap = iconLoader.loadIcon(TQString::tqfromLatin1("kmail"), KIcon::MainToolbar); + TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1("kmail"), KIcon::MainToolbar); mKMailButton = new TQPushButton(topWidget); mKMailButton->setPixmap(pixmap); - mKMailButton->setFixedSize(mKMailButton->tqsizeHint()); + mKMailButton->setFixedSize(mKMailButton->sizeHint()); connect(mKMailButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowKMailMessage())); grid->addWidget(mKMailButton, 0, gridIndex++, AlignHCenter); TQToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail")); @@ -576,10 +576,10 @@ void MessageWin::initView() mKMailButton = 0; // KAlarm button - TQPixmap pixmap = iconLoader.loadIcon(TQString::tqfromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar); + TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar); mKAlarmButton = new TQPushButton(topWidget); mKAlarmButton->setPixmap(pixmap); - mKAlarmButton->setFixedSize(mKAlarmButton->tqsizeHint()); + mKAlarmButton->setFixedSize(mKAlarmButton->sizeHint()); connect(mKAlarmButton, TQT_SIGNAL(clicked()), TQT_SLOT(displayMainWindow())); grid->addWidget(mKAlarmButton, 0, gridIndex++, AlignHCenter); TQString actKAlarm = i18n("Activate KAlarm"); @@ -598,7 +598,7 @@ void MessageWin::initView() mKAlarmButton->setEnabled(false); topLayout->activate(); - setMinimumSize(TQSize(grid->tqsizeHint().width() + 2*KDialog::marginHint(), tqsizeHint().height())); + setMinimumSize(TQSize(grid->sizeHint().width() + 2*KDialog::marginHint(), sizeHint().height())); bool modal = !(getWFlags() & TQt::WX11BypassWM); @@ -615,7 +615,7 @@ void MessageWin::initView() void MessageWin::setRemainingTextDay() { TQString text; - int days = TQDate::tqcurrentDate().daysTo(mDateTime.date()); + int days = TQDate::currentDate().daysTo(mDateTime.date()); if (days <= 0 && !mDateTime.isDateOnly()) { // The alarm is due today, so start refreshing every minute @@ -642,7 +642,7 @@ void MessageWin::setRemainingTextDay() void MessageWin::setRemainingTextMinute() { TQString text; - int mins = (TQDateTime::tqcurrentDateTime().secsTo(mDateTime.dateTime()) + 59) / 60; + 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) @@ -650,7 +650,7 @@ void MessageWin::setRemainingTextMinute() else if (mins % 60 == 1) text = i18n("in 1 hour 1 minute's time", "in %n hours 1 minute's time", mins/60); else - text = i18n("in 1 hour %1 minutes' time", "in %n hours %1 minutes' time", mins/60).tqarg(mins%60); + text = i18n("in 1 hour %1 minutes' time", "in %n hours %1 minutes' time", mins/60).arg(mins%60); mRemainingText->setText(text); } @@ -662,38 +662,38 @@ void MessageWin::saveProperties(KConfig* config) { if (mShown && !mErrorWindow) { - config->writeEntry(TQString::tqfromLatin1("EventID"), mEventID); - config->writeEntry(TQString::tqfromLatin1("AlarmType"), mAlarmType); - config->writeEntry(TQString::tqfromLatin1("Message"), mMessage); - config->writeEntry(TQString::tqfromLatin1("Type"), mAction); - config->writeEntry(TQString::tqfromLatin1("Font"), mFont); - config->writeEntry(TQString::tqfromLatin1("BgColour"), mBgColour); - config->writeEntry(TQString::tqfromLatin1("FgColour"), mFgColour); - config->writeEntry(TQString::tqfromLatin1("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(TQString::tqfromLatin1("Time"), mDateTime.dateTime()); - config->writeEntry(TQString::tqfromLatin1("DateOnly"), mDateTime.isDateOnly()); + config->writeEntry(TQString::fromLatin1("Time"), mDateTime.dateTime()); + config->writeEntry(TQString::fromLatin1("DateOnly"), mDateTime.isDateOnly()); } if (mCloseTime.isValid()) - config->writeEntry(TQString::tqfromLatin1("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(TQString::tqfromLatin1("AudioFile"), mAudioFile); - config->writeEntry(TQString::tqfromLatin1("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(TQString::tqfromLatin1("Speak"), mSpeak); - config->writeEntry(TQString::tqfromLatin1("Height"), height()); - config->writeEntry(TQString::tqfromLatin1("DeferMins"), mDefaultDeferMinutes); - config->writeEntry(TQString::tqfromLatin1("NoDefer"), mNoDefer); - config->writeEntry(TQString::tqfromLatin1("NoPostAction"), mNoPostAction); - config->writeEntry(TQString::tqfromLatin1("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(TQString::tqfromLatin1("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(TQString::tqfromLatin1("Invalid"), false); - mEventID = config->readEntry(TQString::tqfromLatin1("EventID")); - mAlarmType = KAAlarm::Type(config->readNumEntry(TQString::tqfromLatin1("AlarmType"))); - mMessage = config->readEntry(TQString::tqfromLatin1("Message")); - mAction = KAEvent::Action(config->readNumEntry(TQString::tqfromLatin1("Type"))); - mFont = config->readFontEntry(TQString::tqfromLatin1("Font")); - mBgColour = config->readColorEntry(TQString::tqfromLatin1("BgColour")); - mFgColour = config->readColorEntry(TQString::tqfromLatin1("FgColour")); - mConfirmAck = config->readBoolEntry(TQString::tqfromLatin1("ConfirmAck")); + 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::tqfromLatin1("Time"), &invalidDateTime); - bool dateOnly = config->readBoolEntry(TQString::tqfromLatin1("DateOnly")); + TQDateTime dt = config->readDateTimeEntry(TQString::fromLatin1("Time"), &invalidDateTime); + bool dateOnly = config->readBoolEntry(TQString::fromLatin1("DateOnly")); mDateTime.set(dt, dateOnly); - mCloseTime = config->readDateTimeEntry(TQString::tqfromLatin1("Expiry"), &invalidDateTime); + mCloseTime = config->readDateTimeEntry(TQString::fromLatin1("Expiry"), &invalidDateTime); #ifndef WITHOUT_ARTS - mAudioFile = config->readPathEntry(TQString::tqfromLatin1("AudioFile")); - mVolume = static_cast<float>(config->readNumEntry(TQString::tqfromLatin1("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(TQString::tqfromLatin1("Speak")); - mRestoreHeight = config->readNumEntry(TQString::tqfromLatin1("Height")); - mDefaultDeferMinutes = config->readNumEntry(TQString::tqfromLatin1("DeferMins")); - mNoDefer = config->readBoolEntry(TQString::tqfromLatin1("NoDefer")); - mNoPostAction = config->readBoolEntry(TQString::tqfromLatin1("NoPostAction")); - mKMailSerialNumber = config->readUnsignedLongNumEntry(TQString::tqfromLatin1("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) @@ -789,7 +789,7 @@ void MessageWin::playAudio() return; // ensure zero volume doesn't play anything #ifdef WITHOUT_ARTS TQString play = mAudioFile; - TQString file = TQString::tqfromLatin1("file:"); + TQString file = TQString::fromLatin1("file:"); if (mAudioFile.startsWith(file)) play = mAudioFile.mid(file.length()); KAudioPlayer::play(TQFile::encodeName(play)); @@ -859,7 +859,7 @@ void MessageWin::slotPlayAudio() kdError(5950) << "MessageWin::playAudio(): Open failure: " << mAudioFile << endl; if (!haveErrorMessage(ErrMsg_AudioFile)) { - KMessageBox::error(this, i18n("Cannot open audio file:\n%1").tqarg(mAudioFile)); + KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mAudioFile)); clearErrorMessage(ErrMsg_AudioFile); } return; @@ -882,8 +882,8 @@ void MessageWin::slotPlayAudio() kdWarning(5950) << "Unable to set master volume (KMix: " << mKMixError << ")\n"; if (!haveErrorMessage(ErrMsg_Volume)) { - KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").tqarg(mKMixError), - TQString(), TQString::tqfromLatin1("KMixError")); + KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").arg(mKMixError), + TQString(), TQString::fromLatin1("KMixError")); clearErrorMessage(ErrMsg_Volume); } } @@ -1183,7 +1183,7 @@ void MessageWin::show() if (mCloseTime.isValid()) { // Set a timer to auto-close the window - int delay = TQDateTime::tqcurrentDateTime().secsTo(mCloseTime); + int delay = TQDateTime::currentDateTime().secsTo(mCloseTime); if (delay < 0) delay = 0; TQTimer::singleShot(delay * 1000, this, TQT_SLOT(close())); @@ -1200,18 +1200,18 @@ void MessageWin::show() * For message windows, the size if limited to fit inside the working area of * the desktop. */ -TQSize MessageWin::tqsizeHint() const +TQSize MessageWin::sizeHint() const { if (mAction != KAEvent::MESSAGE) - return MainWindowBase::tqsizeHint(); + return MainWindowBase::sizeHint(); if (!mWinModule) mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP); TQSize frame = frameGeometry().size(); - TQSize contents = tqgeometry().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::tqsizeHint().boundedTo(maxSize); + return MainWindowBase::sizeHint().boundedTo(maxSize); } /****************************************************************************** @@ -1233,7 +1233,7 @@ void MessageWin::showEvent(TQShowEvent* se) * method is called, so for large windows the size needs to be * set again later. */ - TQSize s = tqsizeHint(); // 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); @@ -1246,10 +1246,10 @@ void MessageWin::showEvent(TQShowEvent* se) * To achieve this, move the window so that the OK button is as far away * from the cursor as possible. If the buttons are still too close to the * cursor, disable the buttons for a short time. - * N.B. This can't be done in show(), since the tqgeometry of the window + * N.B. This can't be done in show(), since the geometry of the window * is not known until it is displayed. Unfortunately by moving the * window in showEvent(), a flicker is unavoidable. - * See the TQt documentation on window tqgeometry for more details. + * See the TQt documentation on window geometry for more details. */ // PROBLEM: The frame size is not known yet! @@ -1267,7 +1267,7 @@ void MessageWin::showEvent(TQShowEvent* se) desk &= dw->screenGeometry(dw->screenNumber(cursor)); TQRect frame = frameGeometry(); - TQRect rect = tqgeometry(); + TQRect rect = geometry(); // Find the offsets from the outside of the frame to the edges of the OK button TQRect button(mOkButton->mapToParent(TQPoint(0, 0)), mOkButton->mapToParent(mOkButton->rect().bottomRight())); int buttonLeft = button.left() + rect.left() - frame.left(); @@ -1282,7 +1282,7 @@ void MessageWin::showEvent(TQShowEvent* se) // Find the enclosing rectangle for the new button positions // and check if the cursor is too near - TQRect buttons = mOkButton->tqgeometry().unite(mKAlarmButton->tqgeometry()); + 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 @@ -1328,7 +1328,7 @@ void MessageWin::moveEvent(TQMoveEvent* e) */ void MessageWin::setMaxSize() { - TQSize s = tqsizeHint(); + TQSize s = sizeHint(); if (width() > s.width() || height() > s.height()) resize(s); } @@ -1465,7 +1465,7 @@ void MessageWin::slotEdit() editDlg.getEvent(event); // Update the displayed lists and the calendar file - KAlarm::UpdatetqStatus status; + KAlarm::UpdateStatus status; if (AlarmCalendar::activeCalendar()->event(mEventID)) { // The old alarm hasn't expired yet, so replace it @@ -1516,7 +1516,7 @@ void MessageWin::checkDeferralLimit() { if (!mDeferButton || !mDeferLimit.isValid()) return; - int n = TQDate::tqcurrentDate().daysTo(mDeferLimit.date()); + int n = TQDate::currentDate().daysTo(mDeferLimit.date()); if (n > 0) return; MidnightTimer::disconnect(TQT_TQOBJECT(this), TQT_SLOT(checkDeferralLimit())); @@ -1540,7 +1540,7 @@ void MessageWin::checkDeferralLimit() */ void MessageWin::slotDefer() { - mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime(TQDateTime::tqcurrentDateTime().addSecs(60)), + mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime(TQDateTime::currentDateTime().addSecs(60)), false, this, "deferDlg"); if (mDefaultDeferMinutes > 0) mDeferDlg->setDeferMinutes(mDefaultDeferMinutes); diff --git a/kalarm/messagewin.h b/kalarm/messagewin.h index f39d2a715..b941307d1 100644 --- a/kalarm/messagewin.h +++ b/kalarm/messagewin.h @@ -57,7 +57,7 @@ class MessageWin : public MainWindowBase bool hasDefer() const { return !!mDeferButton; } bool isValid() const { return !mInvalid; } virtual void show(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; static int instanceCount() { return mWindowList.count(); } static MessageWin* findEvent(const TQString& eventID); diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp index 3aa6fc622..442144108 100644 --- a/kalarm/prefdlg.cpp +++ b/kalarm/prefdlg.cpp @@ -21,7 +21,7 @@ #include "kalarm.h" #include <tqobjectlist.h> -#include <tqlayout.h> +#include <layout.h> #include <tqbuttongroup.h> #include <tqvbox.h> #include <tqlineedit.h> @@ -81,12 +81,12 @@ // %C = temporary command file to execute in terminal // %W = temporary command file to execute in terminal, with 'sleep 86400' appended static TQString xtermCommands[] = { - TQString::tqfromLatin1("xterm -sb -hold -title %t -e %c"), - TQString::tqfromLatin1("konsole --noclose -T %t -e ${SHELL:-sh} -c %c"), - TQString::tqfromLatin1("gnome-terminal -t %t -e %W"), - TQString::tqfromLatin1("eterm --pause -T %t -e %C"), // some systems use eterm... - TQString::tqfromLatin1("Eterm --pause -T %t -e %C"), // while some use Eterm - TQString::tqfromLatin1("rxvt -title %t -e ${SHELL:-sh} -c %w"), + 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() // end of list indicator - don't change! }; @@ -250,8 +250,8 @@ void PrefsTabBase::apply(bool syncToDisc) MiscPrefTab::MiscPrefTab(TQVBox* frame) : PrefsTabBase(frame) { - // Get tqalignment to use in TQGridLayout (AlignAuto doesn't work correctly there) - int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there) + int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; TQGroupBox* group = new TQButtonGroup(i18n("Run Mode"), mPage, "modeGroup"); TQGridLayout* grid = new TQGridLayout(group, 6, 2, KDialog::marginHint(), KDialog::spacingHint()); @@ -262,18 +262,18 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) // Run-on-demand radio button mRunOnDemand = new TQRadioButton(i18n("&Run only on demand"), group, "runDemand"); - mRunOnDemand->setFixedSize(mRunOnDemand->tqsizeHint()); + mRunOnDemand->setFixedSize(mRunOnDemand->sizeHint()); 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" "2. With this option selected, the system tray icon can be displayed or hidden independently of KAlarm.")); - grid->addMultiCellWidget(mRunOnDemand, 1, 1, 0, 2, tqalignment); + grid->addMultiCellWidget(mRunOnDemand, 1, 1, 0, 2, alignment); // Run-in-system-tray radio button mRunInSystemTray = new TQRadioButton(i18n("Run continuously in system &tray"), group, "runTray"); - mRunInSystemTray->setFixedSize(mRunInSystemTray->tqsizeHint()); + mRunInSystemTray->setFixedSize(mRunInSystemTray->sizeHint()); 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" @@ -281,39 +281,39 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) "1. With this option selected, closing the system tray icon will quit KAlarm.\n" "2. You do not need to select this option in order for alarms to be displayed, since alarm monitoring is done by the alarm daemon." " Running in the system tray simply provides easy access and a status indication.")); - grid->addMultiCellWidget(mRunInSystemTray, 2, 2, 0, 2, tqalignment); + grid->addMultiCellWidget(mRunInSystemTray, 2, 2, 0, 2, alignment); // Run continuously options mDisableAlarmsIfStopped = new TQCheckBox(i18n("Disa&ble alarms while not running"), group, "disableAl"); - mDisableAlarmsIfStopped->setFixedSize(mDisableAlarmsIfStopped->tqsizeHint()); + mDisableAlarmsIfStopped->setFixedSize(mDisableAlarmsIfStopped->sizeHint()); 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, tqalignment); + grid->addMultiCellWidget(mDisableAlarmsIfStopped, 3, 3, 1, 2, alignment); mQuitWarn = new TQCheckBox(i18n("Warn before &quitting"), group, "disableAl"); - mQuitWarn->setFixedSize(mQuitWarn->tqsizeHint()); + mQuitWarn->setFixedSize(mQuitWarn->sizeHint()); TQWhatsThis::add(mQuitWarn, i18n("Check to display a warning prompt before quitting KAlarm.")); - grid->addWidget(mQuitWarn, 4, 2, tqalignment); + grid->addWidget(mQuitWarn, 4, 2, alignment); mAutostartTrayIcon = new TQCheckBox(i18n("Autostart at &login"), group, "autoTray"); #ifdef AUTOSTART_BY_KALARMD connect(mAutostartTrayIcon, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutostartToggled(bool))); #endif - grid->addMultiCellWidget(mAutostartTrayIcon, 5, 5, 0, 2, tqalignment); + grid->addMultiCellWidget(mAutostartTrayIcon, 5, 5, 0, 2, alignment); // Autostart alarm daemon mAutostartDaemon = new TQCheckBox(i18n("Start alarm monitoring at lo&gin"), group, "startDaemon"); - mAutostartDaemon->setFixedSize(mAutostartDaemon->tqsizeHint()); + mAutostartDaemon->setFixedSize(mAutostartDaemon->sizeHint()); 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.") - .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))); - grid->addMultiCellWidget(mAutostartDaemon, 6, 6, 0, 2, tqalignment); + .arg(TQString::fromLatin1(DAEMON_APP_NAME))); + grid->addMultiCellWidget(mAutostartDaemon, 6, 6, 0, 2, alignment); - group->setFixedHeight(group->tqsizeHint().height()); + group->setFixedHeight(group->sizeHint().height()); // Start-of-day time TQHBox* itemBox = new TQHBox(mPage); @@ -321,22 +321,22 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) box->setSpacing(KDialog::spacingHint()); TQLabel* label = new TQLabel(i18n("&Start of day for date-only alarms:"), box); mStartOfDay = new TimeEdit(box); - mStartOfDay->setFixedSize(mStartOfDay->tqsizeHint()); + mStartOfDay->setFixedSize(mStartOfDay->sizeHint()); label->setBuddy(mStartOfDay); 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."); - TQWhatsThis::add(box, TQString("%1\n\n%2").tqarg(startOfDayText).tqarg(TimeSpinBox::shiftWhatsThis())); + 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->tqsizeHint().height()); + itemBox->setFixedHeight(box->sizeHint().height()); // Confirm alarm deletion? itemBox = new TQHBox(mPage); // this is to allow left adjustment mConfirmAlarmDeletion = new TQCheckBox(i18n("Con&firm alarm deletions"), itemBox, "confirmDeletion"); - mConfirmAlarmDeletion->setMinimumSize(mConfirmAlarmDeletion->tqsizeHint()); + mConfirmAlarmDeletion->setMinimumSize(mConfirmAlarmDeletion->sizeHint()); TQWhatsThis::add(mConfirmAlarmDeletion, i18n("Check to be prompted for confirmation each time you delete an alarm.")); itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls - itemBox->setFixedHeight(itemBox->tqsizeHint().height()); + itemBox->setFixedHeight(itemBox->sizeHint().height()); // Expired alarms group = new TQGroupBox(i18n("Expired Alarms"), mPage); @@ -345,35 +345,35 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) grid->addColSpacing(0, indentWidth()); grid->addRowSpacing(0, fontMetrics().lineSpacing()/2); mKeepExpired = new TQCheckBox(i18n("Keep alarms after e&xpiry"), group, "keepExpired"); - mKeepExpired->setFixedSize(mKeepExpired->tqsizeHint()); + mKeepExpired->setFixedSize(mKeepExpired->sizeHint()); 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, tqalignment); + grid->addMultiCellWidget(mKeepExpired, 1, 1, 0, 1, alignment); box = new TQHBox(group); box->setSpacing(KDialog::spacingHint()); mPurgeExpired = new TQCheckBox(i18n("Discard ex&pired alarms after:"), box, "purgeExpired"); - mPurgeExpired->setMinimumSize(mPurgeExpired->tqsizeHint()); + mPurgeExpired->setMinimumSize(mPurgeExpired->sizeHint()); connect(mPurgeExpired, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotExpiredToggled(bool))); mPurgeAfter = new SpinBox(box); mPurgeAfter->setMinValue(1); mPurgeAfter->setLineShiftStep(10); - mPurgeAfter->setMinimumSize(mPurgeAfter->tqsizeHint()); + mPurgeAfter->setMinimumSize(mPurgeAfter->sizeHint()); mPurgeAfterLabel = new TQLabel(i18n("da&ys"), box); - mPurgeAfterLabel->setMinimumSize(mPurgeAfterLabel->tqsizeHint()); + mPurgeAfterLabel->setMinimumSize(mPurgeAfterLabel->sizeHint()); mPurgeAfterLabel->setBuddy(mPurgeAfter); 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, tqalignment); + grid->addWidget(box, 2, 1, alignment); mClearExpired = new TQPushButton(i18n("Clear Expired Alar&ms"), group); - mClearExpired->setFixedSize(mClearExpired->tqsizeHint()); + mClearExpired->setFixedSize(mClearExpired->sizeHint()); connect(mClearExpired, TQT_SIGNAL(clicked()), TQT_SLOT(slotClearExpired())); TQWhatsThis::add(mClearExpired, i18n("Delete all existing expired alarms.")); - grid->addWidget(mClearExpired, 3, 1, tqalignment); - group->setFixedHeight(group->tqsizeHint().height()); + grid->addWidget(mClearExpired, 3, 1, alignment); + group->setFixedHeight(group->sizeHint().height()); // Terminal window to use for command alarms group = new TQGroupBox(i18n("Terminal for Command Alarms"), mPage); @@ -395,7 +395,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) if (args.isEmpty() || KStandardDirs::findExe(args[0]).isEmpty()) continue; TQRadioButton* radio = new TQRadioButton(args[0], group); - radio->setMinimumSize(radio->tqsizeHint()); + radio->setMinimumSize(radio->sizeHint()); mXtermType->insert(radio, mXtermCount); if (mXtermFirst < 0) mXtermFirst = mXtermCount; // note the id of the first button @@ -404,7 +404,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) cmd.replace("%w", "<command; sleep>"); cmd.replace("%C", "[command]"); cmd.replace("%W", "[command; sleep]"); - TQWhatsThis::add(radio, whatsThis.tqarg(cmd)); + TQWhatsThis::add(radio, whatsThis.arg(cmd)); grid->addWidget(radio, (row = index/3 + 1), index % 3, TQt::AlignAuto); ++index; } @@ -412,7 +412,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) box = new TQHBox(group); grid->addMultiCellWidget(box, row + 1, row + 1, 0, 2, TQt::AlignAuto); TQRadioButton* radio = new TQRadioButton(i18n("Other:"), box); - radio->setFixedSize(radio->tqsizeHint()); + radio->setFixedSize(radio->sizeHint()); connect(radio, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotOtherTerminalToggled(bool))); mXtermType->insert(radio, mXtermCount); if (mXtermFirst < 0) @@ -470,7 +470,7 @@ void MiscPrefTab::apply(bool syncToDisc) if (KStandardDirs::findExe(cmd).isEmpty()) { mXtermCommand->setFocus(); - if (KMessageBox::warningContinueCancel(this, i18n("Command to invoke terminal window not found:\n%1").tqarg(cmd)) + if (KMessageBox::warningContinueCancel(this, i18n("Command to invoke terminal window not found:\n%1").arg(cmd)) != KMessageBox::Continue) return; } @@ -604,13 +604,13 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) mEmailClient = new ButtonGroup(box); mEmailClient->hide(); RadioButton* radio = new RadioButton(i18n("&KMail"), box, "kmail"); - radio->setMinimumSize(radio->tqsizeHint()); + radio->setMinimumSize(radio->sizeHint()); mEmailClient->insert(radio, Preferences::KMAIL); radio = new RadioButton(i18n("&Sendmail"), box, "sendmail"); - radio->setMinimumSize(radio->tqsizeHint()); + radio->setMinimumSize(radio->sizeHint()); mEmailClient->insert(radio, Preferences::SENDMAIL); connect(mEmailClient, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotEmailClientChanged(int))); - box->setFixedHeight(box->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); 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" @@ -618,12 +618,12 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) "your system is configured to use sendmail or a sendmail compatible mail transport agent.")); box = new TQHBox(mPage); // this is to allow left adjustment - mEmailCopyToKMail = new TQCheckBox(i18n("Co&py sent emails into KMail's %1 folder").tqarg(KAMail::i18n_sent_mail()), box); - mEmailCopyToKMail->setFixedSize(mEmailCopyToKMail->tqsizeHint()); + mEmailCopyToKMail = new TQCheckBox(i18n("Co&py sent emails into KMail's %1 folder").arg(KAMail::i18n_sent_mail()), box); + mEmailCopyToKMail->setFixedSize(mEmailCopyToKMail->sizeHint()); TQWhatsThis::add(mEmailCopyToKMail, - i18n("After sending an email, store a copy in KMail's %1 folder").tqarg(KAMail::i18n_sent_mail())); + i18n("After sending an email, store a copy in KMail's %1 folder").arg(KAMail::i18n_sent_mail())); box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls - box->setFixedHeight(box->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); // Your Email Address group box TQGroupBox* group = new TQGroupBox(i18n("Your Email Address"), mPage); @@ -633,7 +633,7 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // 'From' email address controls ... label = new Label(EditAlarmDlg::i18n_f_EmailFrom(), group); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 1, 0); mFromAddressGroup = new ButtonGroup(group); mFromAddressGroup->hide(); @@ -642,7 +642,7 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // Line edit to enter a 'From' email address radio = new RadioButton(group); mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_ADDR); - radio->setFixedSize(radio->tqsizeHint()); + radio->setFixedSize(radio->sizeHint()); label->setBuddy(radio); grid->addWidget(radio, 1, 1); mEmailAddress = new TQLineEdit(group); @@ -655,7 +655,7 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // 'From' email address to be taken from Control Centre radio = new RadioButton(i18n("&Use address from Control Center"), group); - radio->setFixedSize(radio->tqsizeHint()); + radio->setFixedSize(radio->sizeHint()); mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_CONTROL_CENTRE); 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.")); @@ -663,7 +663,7 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // 'From' email address to be picked from KMail's identities when the email alarm is configured radio = new RadioButton(i18n("Use KMail &identities"), group); - radio->setFixedSize(radio->tqsizeHint()); + radio->setFixedSize(radio->sizeHint()); mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_KMAIL); TQWhatsThis::add(radio, i18n("Check to use KMail's email identities to identify you as the sender when sending email alarms. " @@ -674,7 +674,7 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // 'Bcc' email address controls ... grid->addRowSpacing(4, KDialog::spacingHint()); label = new Label(i18n("'Bcc' email address", "&Bcc:"), group); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 5, 0); mBccAddressGroup = new ButtonGroup(group); mBccAddressGroup->hide(); @@ -682,7 +682,7 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // Line edit to enter a 'Bcc' email address radio = new RadioButton(group); - radio->setFixedSize(radio->tqsizeHint()); + radio->setFixedSize(radio->sizeHint()); mBccAddressGroup->insert(radio, Preferences::MAIL_FROM_ADDR); label->setBuddy(radio); grid->addWidget(radio, 5, 1); @@ -696,22 +696,22 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) // 'Bcc' email address to be taken from Control Centre radio = new RadioButton(i18n("Us&e address from Control Center"), group); - radio->setFixedSize(radio->tqsizeHint()); + radio->setFixedSize(radio->sizeHint()); mBccAddressGroup->insert(radio, Preferences::MAIL_FROM_CONTROL_CENTRE); 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, TQt::AlignAuto); - group->setFixedHeight(group->tqsizeHint().height()); + group->setFixedHeight(group->sizeHint().height()); box = new TQHBox(mPage); // this is to allow left adjustment mEmailQueuedNotify = new TQCheckBox(i18n("&Notify when remote emails are queued"), box); - mEmailQueuedNotify->setFixedSize(mEmailQueuedNotify->tqsizeHint()); + mEmailQueuedNotify->setFixedSize(mEmailQueuedNotify->sizeHint()); 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 TQWidget(box), 1); // left adjust the controls - box->setFixedHeight(box->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets } @@ -793,18 +793,18 @@ TQString EmailPrefTab::validate() TQString EmailPrefTab::validateAddr(ButtonGroup* group, TQLineEdit* addr, const TQString& msg) { - TQString errmsg = i18n("%1\nAre you sure you want to save your changes?").tqarg(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 TQString(); - errmsg = i18n("No email address is currently set in the KDE Control Center. %1").tqarg(errmsg); + 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 TQString(); - errmsg = i18n("No KMail identities currently exist. %1").tqarg(errmsg); + errmsg = i18n("No KMail identities currently exist. %1").arg(errmsg); break; case Preferences::MAIL_FROM_ADDR: if (!addr->text().stripWhiteSpace().isEmpty()) @@ -826,9 +826,9 @@ FontColourPrefTab::FontColourPrefTab(TQVBox* frame) mPage->setStretchFactor(mFontChooser, 1); TQFrame* layoutBox = new TQFrame(mPage); - TQHBoxLayout* htqlayout = new TQHBoxLayout(layoutBox); - TQVBoxLayout* colourLayout = new TQVBoxLayout(htqlayout, KDialog::spacingHint()); - htqlayout->addStretch(); + TQHBoxLayout* hlayout = new TQHBoxLayout(layoutBox); + TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout, KDialog::spacingHint()); + hlayout->addStretch(); TQHBox* box = new TQHBox(layoutBox); // to group widgets for TQWhatsThis text box->setSpacing(KDialog::spacingHint()/2); @@ -887,9 +887,9 @@ void FontColourPrefTab::setDefaults() EditPrefTab::EditPrefTab(TQVBox* frame) : PrefsTabBase(frame) { - // Get tqalignment to use in TQLabel::tqsetAlignment(tqalignment | TQt::WordBreak) + // Get alignment to use in TQLabel::setAlignment(alignment | TQt::WordBreak) // (AlignAuto doesn't work correctly there) - int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; int groupTopMargin = fontMetrics().lineSpacing()/2; TQString defsetting = i18n("The default setting for \"%1\" in the alarm edit dialog."); @@ -897,126 +897,126 @@ EditPrefTab::EditPrefTab(TQVBox* frame) // DISPLAY ALARMS TQGroupBox* group = new TQGroupBox(i18n("Display Alarms"), mPage); - TQBoxLayout* tqlayout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint()); - tqlayout->addSpacing(groupTopMargin); + TQBoxLayout* layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint()); + layout->addSpacing(groupTopMargin); mConfirmAck = new TQCheckBox(EditAlarmDlg::i18n_k_ConfirmAck(), group, "defConfAck"); - mConfirmAck->setMinimumSize(mConfirmAck->tqsizeHint()); - TQWhatsThis::add(mConfirmAck, defsetting.tqarg(EditAlarmDlg::i18n_ConfirmAck())); - tqlayout->addWidget(mConfirmAck, 0, TQt::AlignAuto); + mConfirmAck->setMinimumSize(mConfirmAck->sizeHint()); + TQWhatsThis::add(mConfirmAck, defsetting.arg(EditAlarmDlg::i18n_ConfirmAck())); + layout->addWidget(mConfirmAck, 0, TQt::AlignAuto); mAutoClose = new TQCheckBox(LateCancelSelector::i18n_i_AutoCloseWinLC(), group, "defAutoClose"); - mAutoClose->setMinimumSize(mAutoClose->tqsizeHint()); - TQWhatsThis::add(mAutoClose, defsetting.tqarg(LateCancelSelector::i18n_AutoCloseWin())); - tqlayout->addWidget(mAutoClose, 0, TQt::AlignAuto); + mAutoClose->setMinimumSize(mAutoClose->sizeHint()); + TQWhatsThis::add(mAutoClose, defsetting.arg(LateCancelSelector::i18n_AutoCloseWin())); + layout->addWidget(mAutoClose, 0, TQt::AlignAuto); TQHBox* box = new TQHBox(group); box->setSpacing(KDialog::spacingHint()); - tqlayout->addWidget(box); + layout->addWidget(box); TQLabel* label = new TQLabel(i18n("Reminder &units:"), box); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); 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->tqsizeHint()); + mReminderUnits->setFixedSize(mReminderUnits->sizeHint()); label->setBuddy(mReminderUnits); TQWhatsThis::add(box, i18n("The default units for the reminder in the alarm edit dialog.")); box->setStretchFactor(new TQWidget(box), 1); // left adjust the control mSpecialActionsButton = new SpecialActionsButton(EditAlarmDlg::i18n_SpecialActions(), box); - mSpecialActionsButton->setFixedSize(mSpecialActionsButton->tqsizeHint()); + mSpecialActionsButton->setFixedSize(mSpecialActionsButton->sizeHint()); // SOUND TQButtonGroup* bgroup = new TQButtonGroup(SoundPicker::i18n_Sound(), mPage, "soundGroup"); - tqlayout = new TQVBoxLayout(bgroup, KDialog::marginHint(), KDialog::spacingHint()); - tqlayout->addSpacing(groupTopMargin); + layout = new TQVBoxLayout(bgroup, KDialog::marginHint(), KDialog::spacingHint()); + layout->addSpacing(groupTopMargin); - TQBoxLayout* htqlayout = new TQHBoxLayout(tqlayout, KDialog::spacingHint()); + 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->tqsizeHint()); - TQWhatsThis::add(mSound, defsetting.tqarg(SoundPicker::i18n_Sound())); - htqlayout->addWidget(mSound); - htqlayout->addStretch(1); + mSound->setMinimumSize(mSound->sizeHint()); + TQWhatsThis::add(mSound, defsetting.arg(SoundPicker::i18n_Sound())); + hlayout->addWidget(mSound); + hlayout->addStretch(1); #ifndef WITHOUT_ARTS mSoundRepeat = new TQCheckBox(i18n("Repea&t sound file"), bgroup, "defRepeatSound"); - mSoundRepeat->setMinimumSize(mSoundRepeat->tqsizeHint()); - TQWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").tqarg(SoundDlg::i18n_Repeat())); - htqlayout->addWidget(mSoundRepeat); + mSoundRepeat->setMinimumSize(mSoundRepeat->sizeHint()); + 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 TQHBox(bgroup); // this is to control the TQWhatsThis text display area box->setSpacing(KDialog::spacingHint()); mSoundFileLabel = new TQLabel(i18n("Sound &file:"), box); - mSoundFileLabel->setFixedSize(mSoundFileLabel->tqsizeHint()); + mSoundFileLabel->setFixedSize(mSoundFileLabel->sizeHint()); mSoundFile = new TQLineEdit(box); mSoundFileLabel->setBuddy(mSoundFile); mSoundFileBrowse = new TQPushButton(box); mSoundFileBrowse->setPixmap(SmallIcon("fileopen")); - mSoundFileBrowse->setFixedSize(mSoundFileBrowse->tqsizeHint()); + mSoundFileBrowse->setFixedSize(mSoundFileBrowse->sizeHint()); 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->tqsizeHint().height()); - tqlayout->addWidget(box); - bgroup->setFixedHeight(bgroup->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); + layout->addWidget(box); + bgroup->setFixedHeight(bgroup->sizeHint().height()); // COMMAND ALARMS group = new TQGroupBox(i18n("Command Alarms"), mPage); - tqlayout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint()); - tqlayout->addSpacing(groupTopMargin); - tqlayout = new TQHBoxLayout(tqlayout, KDialog::spacingHint()); + layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint()); + layout->addSpacing(groupTopMargin); + layout = new TQHBoxLayout(layout, KDialog::spacingHint()); mCmdScript = new TQCheckBox(EditAlarmDlg::i18n_p_EnterScript(), group, "defCmdScript"); - mCmdScript->setMinimumSize(mCmdScript->tqsizeHint()); - TQWhatsThis::add(mCmdScript, defsetting.tqarg(EditAlarmDlg::i18n_EnterScript())); - tqlayout->addWidget(mCmdScript); - tqlayout->addStretch(); + mCmdScript->setMinimumSize(mCmdScript->sizeHint()); + TQWhatsThis::add(mCmdScript, defsetting.arg(EditAlarmDlg::i18n_EnterScript())); + layout->addWidget(mCmdScript); + layout->addStretch(); mCmdXterm = new TQCheckBox(EditAlarmDlg::i18n_w_ExecInTermWindow(), group, "defCmdXterm"); - mCmdXterm->setMinimumSize(mCmdXterm->tqsizeHint()); - TQWhatsThis::add(mCmdXterm, defsetting.tqarg(EditAlarmDlg::i18n_ExecInTermWindow())); - tqlayout->addWidget(mCmdXterm); + mCmdXterm->setMinimumSize(mCmdXterm->sizeHint()); + TQWhatsThis::add(mCmdXterm, defsetting.arg(EditAlarmDlg::i18n_ExecInTermWindow())); + layout->addWidget(mCmdXterm); // EMAIL ALARMS group = new TQGroupBox(i18n("Email Alarms"), mPage); - tqlayout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint()); - tqlayout->addSpacing(groupTopMargin); + layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint()); + layout->addSpacing(groupTopMargin); // BCC email to sender mEmailBcc = new TQCheckBox(EditAlarmDlg::i18n_e_CopyEmailToSelf(), group, "defEmailBcc"); - mEmailBcc->setMinimumSize(mEmailBcc->tqsizeHint()); - TQWhatsThis::add(mEmailBcc, defsetting.tqarg(EditAlarmDlg::i18n_CopyEmailToSelf())); - tqlayout->addWidget(mEmailBcc, 0, TQt::AlignAuto); + mEmailBcc->setMinimumSize(mEmailBcc->sizeHint()); + TQWhatsThis::add(mEmailBcc, defsetting.arg(EditAlarmDlg::i18n_CopyEmailToSelf())); + layout->addWidget(mEmailBcc, 0, TQt::AlignAuto); // MISCELLANEOUS // Show in KOrganizer mCopyToKOrganizer = new TQCheckBox(EditAlarmDlg::i18n_g_ShowInKOrganizer(), mPage, "defShowKorg"); - mCopyToKOrganizer->setMinimumSize(mCopyToKOrganizer->tqsizeHint()); - TQWhatsThis::add(mCopyToKOrganizer, defsetting.tqarg(EditAlarmDlg::i18n_ShowInKOrganizer())); + mCopyToKOrganizer->setMinimumSize(mCopyToKOrganizer->sizeHint()); + TQWhatsThis::add(mCopyToKOrganizer, defsetting.arg(EditAlarmDlg::i18n_ShowInKOrganizer())); // Late cancellation box = new TQHBox(mPage); box->setSpacing(KDialog::spacingHint()); mLateCancel = new TQCheckBox(LateCancelSelector::i18n_n_CancelIfLate(), box, "defCancelLate"); - mLateCancel->setMinimumSize(mLateCancel->tqsizeHint()); - TQWhatsThis::add(mLateCancel, defsetting.tqarg(LateCancelSelector::i18n_CancelIfLate())); + mLateCancel->setMinimumSize(mLateCancel->sizeHint()); + TQWhatsThis::add(mLateCancel, defsetting.arg(LateCancelSelector::i18n_CancelIfLate())); box->setStretchFactor(new TQWidget(box), 1); // left adjust the control // Recurrence TQHBox* itemBox = new TQHBox(box); // this is to control the TQWhatsThis text display area itemBox->setSpacing(KDialog::spacingHint()); label = new TQLabel(i18n("&Recurrence:"), itemBox); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); mRecurPeriod = new TQComboBox(itemBox, "defRecur"); mRecurPeriod->insertItem(RecurrenceEdit::i18n_NoRecur()); mRecurPeriod->insertItem(RecurrenceEdit::i18n_AtLogin()); @@ -1025,17 +1025,17 @@ EditPrefTab::EditPrefTab(TQVBox* frame) mRecurPeriod->insertItem(RecurrenceEdit::i18n_Weekly()); mRecurPeriod->insertItem(RecurrenceEdit::i18n_Monthly()); mRecurPeriod->insertItem(RecurrenceEdit::i18n_Yearly()); - mRecurPeriod->setFixedSize(mRecurPeriod->tqsizeHint()); + mRecurPeriod->setFixedSize(mRecurPeriod->sizeHint()); label->setBuddy(mRecurPeriod); TQWhatsThis::add(itemBox, i18n("The default setting for the recurrence rule in the alarm edit dialog.")); - box->setFixedHeight(itemBox->tqsizeHint().height()); + box->setFixedHeight(itemBox->sizeHint().height()); // How to handle February 29th in yearly recurrences TQVBox* vbox = new TQVBox(mPage); // this is to control the TQWhatsThis text display area vbox->setSpacing(KDialog::spacingHint()); label = new TQLabel(i18n("In non-leap years, repeat yearly February 29th alarms on:"), vbox); - label->tqsetAlignment(tqalignment | TQt::WordBreak); + label->setAlignment(alignment | TQt::WordBreak); itemBox = new TQHBox(vbox); itemBox->setSpacing(2*KDialog::spacingHint()); mFeb29 = new TQButtonGroup(itemBox); @@ -1043,15 +1043,15 @@ EditPrefTab::EditPrefTab(TQVBox* frame) TQWidget* widget = new TQWidget(itemBox); widget->setFixedWidth(3*KDialog::spacingHint()); TQRadioButton* radio = new TQRadioButton(i18n("February 2&8th"), itemBox); - radio->setMinimumSize(radio->tqsizeHint()); + radio->setMinimumSize(radio->sizeHint()); mFeb29->insert(radio, KARecurrence::FEB29_FEB28); radio = new TQRadioButton(i18n("March &1st"), itemBox); - radio->setMinimumSize(radio->tqsizeHint()); + radio->setMinimumSize(radio->sizeHint()); mFeb29->insert(radio, KARecurrence::FEB29_MAR1); radio = new TQRadioButton(i18n("Do ¬ repeat"), itemBox); - radio->setMinimumSize(radio->tqsizeHint()); + radio->setMinimumSize(radio->sizeHint()); mFeb29->insert(radio, KARecurrence::FEB29_FEB29); - itemBox->setFixedHeight(itemBox->tqsizeHint().height()); + itemBox->setFixedHeight(itemBox->sizeHint().height()); 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.")); @@ -1179,7 +1179,7 @@ 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").tqarg(SoundPicker::i18n_File());; + return i18n("You must enter a sound file when %1 is selected as the default sound type").arg(SoundPicker::i18n_File());; } return TQString(); } @@ -1200,7 +1200,7 @@ ViewPrefTab::ViewPrefTab(TQVBox* frame) grid->addRowSpacing(0, fontMetrics().lineSpacing()/2); mTooltipShowAlarms = new TQCheckBox(i18n("Show next &24 hours' alarms"), group, "tooltipShow"); - mTooltipShowAlarms->setMinimumSize(mTooltipShowAlarms->tqsizeHint()); + mTooltipShowAlarms->setMinimumSize(mTooltipShowAlarms->sizeHint()); 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")); @@ -1209,25 +1209,25 @@ ViewPrefTab::ViewPrefTab(TQVBox* frame) TQHBox* box = new TQHBox(group); box->setSpacing(KDialog::spacingHint()); mTooltipMaxAlarms = new TQCheckBox(i18n("Ma&ximum number of alarms to show:"), box, "tooltipMax"); - mTooltipMaxAlarms->setMinimumSize(mTooltipMaxAlarms->tqsizeHint()); + mTooltipMaxAlarms->setMinimumSize(mTooltipMaxAlarms->sizeHint()); connect(mTooltipMaxAlarms, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipMaxToggled(bool))); mTooltipMaxAlarmCount = new SpinBox(1, 99, 1, box); mTooltipMaxAlarmCount->setLineShiftStep(5); - mTooltipMaxAlarmCount->setMinimumSize(mTooltipMaxAlarmCount->tqsizeHint()); + mTooltipMaxAlarmCount->setMinimumSize(mTooltipMaxAlarmCount->sizeHint()); 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, TQt::AlignAuto); mTooltipShowTime = new TQCheckBox(MainWindow::i18n_m_ShowAlarmTime(), group, "tooltipTime"); - mTooltipShowTime->setMinimumSize(mTooltipShowTime->tqsizeHint()); + mTooltipShowTime->setMinimumSize(mTooltipShowTime->sizeHint()); 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, TQt::AlignAuto); mTooltipShowTimeTo = new TQCheckBox(MainWindow::i18n_l_ShowTimeToAlarm(), group, "tooltipTimeTo"); - mTooltipShowTimeTo->setMinimumSize(mTooltipShowTimeTo->tqsizeHint()); + mTooltipShowTimeTo->setMinimumSize(mTooltipShowTimeTo->sizeHint()); 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")); @@ -1236,17 +1236,17 @@ ViewPrefTab::ViewPrefTab(TQVBox* frame) box = new TQHBox(group); // this is to control the TQWhatsThis text display area box->setSpacing(KDialog::spacingHint()); mTooltipTimeToPrefixLabel = new TQLabel(i18n("&Prefix:"), box); - mTooltipTimeToPrefixLabel->setFixedSize(mTooltipTimeToPrefixLabel->tqsizeHint()); + mTooltipTimeToPrefixLabel->setFixedSize(mTooltipTimeToPrefixLabel->sizeHint()); mTooltipTimeToPrefix = new TQLineEdit(box); mTooltipTimeToPrefixLabel->setBuddy(mTooltipTimeToPrefix); 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->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); grid->addWidget(box, 5, 2, TQt::AlignAuto); - group->setMaximumHeight(group->tqsizeHint().height()); + group->setMaximumHeight(group->sizeHint().height()); mModalMessages = new TQCheckBox(i18n("Message &windows have a title bar and take keyboard focus"), mPage, "modalMsg"); - mModalMessages->setMinimumSize(mModalMessages->tqsizeHint()); + mModalMessages->setMinimumSize(mModalMessages->sizeHint()); 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" @@ -1259,13 +1259,13 @@ ViewPrefTab::ViewPrefTab(TQVBox* frame) 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->tqsizeHint()); + mDaemonTrayCheckInterval->setMinimumSize(mDaemonTrayCheckInterval->sizeHint()); label->setBuddy(mDaemonTrayCheckInterval); 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 TQWidget(itemBox), 1); // left adjust the controls - itemBox->setFixedHeight(box->tqsizeHint().height()); + itemBox->setFixedHeight(box->sizeHint().height()); mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets } diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp index 95b1b5a69..6488c60c7 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::tqfromLatin1("+"); +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; @@ -139,65 +139,65 @@ TQTime Preferences::mOldStartOfDay; bool Preferences::mStartOfDayChanged; -static const TQString defaultFeb29RecurType = TQString::tqfromLatin1("Mar1"); -static const TQString defaultEmailClient = TQString::tqfromLatin1("kmail"); +static const TQString defaultFeb29RecurType = TQString::fromLatin1("Mar1"); +static const TQString defaultEmailClient = TQString::fromLatin1("kmail"); // Config file entry names -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"); +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 TQString TEMP = TQString::tqfromLatin1("Temp"); +static const TQString TEMP = TQString::fromLatin1("Temp"); // Values for EmailFrom entry -static const TQString FROM_CONTROL_CENTRE = TQString::tqfromLatin1("@ControlCenter"); -static const TQString FROM_KMAIL = TQString::tqfromLatin1("@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 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"); +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"); 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::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; + 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(); @@ -406,10 +406,10 @@ void Preferences::save(bool syncToDisc) TQString value; switch (mDefaultReminderUnits) { - 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; + 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(); 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::tqfromLatin1("DefRemindUnits"); + static const TQString OLD_REMIND_UNITS = TQString::fromLatin1("DefRemindUnits"); config->setGroup(DEFAULTS_SECTION); int intUnit = config->readNumEntry(OLD_REMIND_UNITS, 0); - TQString strUnit = (intUnit == 1) ? TQString::tqfromLatin1("Days") - : (intUnit == 2) ? TQString::tqfromLatin1("Weeks") - : TQString::tqfromLatin1("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 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"); + 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 TQString DEF_SOUND = TQString::tqfromLatin1("DefSound"); + static const TQString DEF_SOUND = TQString::fromLatin1("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::tqfromLatin1("EmailAddress"); - static const TQString EMAIL_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailUseControlCenter"); - static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailBccUseControlCenter"); + 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 TQString DEF_CMD_XTERM = TQString::tqfromLatin1("DefCmdXterm"); + static const TQString DEF_CMD_XTERM = TQString::fromLatin1("DefCmdXterm"); config->setGroup(DEFAULTS_SECTION); if (config->hasKey(DEF_CMD_XTERM)) { diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp index 2a10c1a33..43b95c7ef 100644 --- a/kalarm/recurrenceedit.cpp +++ b/kalarm/recurrenceedit.cpp @@ -24,7 +24,7 @@ #include "kalarm.h" #include <tqtooltip.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbox.h> #include <tqwidgetstack.h> #include <tqlistbox.h> @@ -93,7 +93,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name mNoEmitTypeChanged(true), mReadOnly(readOnly) { - TQBoxLayout* tqlayout; + TQBoxLayout* layout; TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); /* Create the recurrence rule Group box which holds the recurrence period @@ -106,11 +106,11 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name TQGroupBox* recurGroup = new TQGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup"); topLayout->addWidget(recurGroup); TQFrame* ruleFrame = new TQFrame(recurGroup, "ruleFrame"); - tqlayout = new TQVBoxLayout(ruleFrame, 0); - tqlayout->addSpacing(KDialog::spacingHint()/2); + layout = new TQVBoxLayout(ruleFrame, 0); + layout->addSpacing(KDialog::spacingHint()/2); - tqlayout = new TQHBoxLayout(tqlayout, 0); - TQBoxLayout* lay = new TQVBoxLayout(tqlayout, 0); + layout = new TQHBoxLayout(layout, 0); + TQBoxLayout* lay = new TQVBoxLayout(layout, 0); mRuleButtonGroup = new ButtonGroup(1, Qt::Horizontal, ruleFrame); mRuleButtonGroup->setInsideMargin(0); mRuleButtonGroup->setFrameStyle(TQFrame::NoFrame); @@ -119,43 +119,43 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name connect(mRuleButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(periodClicked(int))); mNoneButton = new RadioButton(i18n_Norecur(), mRuleButtonGroup); - mNoneButton->setFixedSize(mNoneButton->tqsizeHint()); + mNoneButton->setFixedSize(mNoneButton->sizeHint()); mNoneButton->setReadOnly(mReadOnly); TQWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm")); mAtLoginButton = new RadioButton(i18n_l_Atlogin(), mRuleButtonGroup); - mAtLoginButton->setFixedSize(mAtLoginButton->tqsizeHint()); + mAtLoginButton->setFixedSize(mAtLoginButton->sizeHint()); mAtLoginButton->setReadOnly(mReadOnly); 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->tqsizeHint()); + mSubDailyButton->setFixedSize(mSubDailyButton->sizeHint()); mSubDailyButton->setReadOnly(mReadOnly); TQWhatsThis::add(mSubDailyButton, i18n("Repeat the alarm at hourly/minutely intervals")); mDailyButton = new RadioButton(i18n_d_Daily(), mRuleButtonGroup); - mDailyButton->setFixedSize(mDailyButton->tqsizeHint()); + mDailyButton->setFixedSize(mDailyButton->sizeHint()); mDailyButton->setReadOnly(mReadOnly); TQWhatsThis::add(mDailyButton, i18n("Repeat the alarm at daily intervals")); mWeeklyButton = new RadioButton(i18n_w_Weekly(), mRuleButtonGroup); - mWeeklyButton->setFixedSize(mWeeklyButton->tqsizeHint()); + mWeeklyButton->setFixedSize(mWeeklyButton->sizeHint()); mWeeklyButton->setReadOnly(mReadOnly); TQWhatsThis::add(mWeeklyButton, i18n("Repeat the alarm at weekly intervals")); mMonthlyButton = new RadioButton(i18n_m_Monthly(), mRuleButtonGroup); - mMonthlyButton->setFixedSize(mMonthlyButton->tqsizeHint()); + mMonthlyButton->setFixedSize(mMonthlyButton->sizeHint()); mMonthlyButton->setReadOnly(mReadOnly); TQWhatsThis::add(mMonthlyButton, i18n("Repeat the alarm at monthly intervals")); mYearlyButton = new RadioButton(i18n_y_Yearly(), mRuleButtonGroup); - mYearlyButton->setFixedSize(mYearlyButton->tqsizeHint()); + mYearlyButton->setFixedSize(mYearlyButton->sizeHint()); mYearlyButton->setReadOnly(mReadOnly); TQWhatsThis::add(mYearlyButton, i18n("Repeat the alarm at annual intervals")); @@ -170,7 +170,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name // Sub-repetition button mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), true, ruleFrame); - mSubRepetition->setFixedSize(mSubRepetition->tqsizeHint()); + mSubRepetition->setFixedSize(mSubRepetition->sizeHint()); mSubRepetition->setReadOnly(mReadOnly); connect(mSubRepetition, TQT_SIGNAL(needsInitialisation()), TQT_SIGNAL(repeatNeedsInitialisation())); connect(mSubRepetition, TQT_SIGNAL(changed()), TQT_SIGNAL(frequencyChanged())); @@ -178,16 +178,16 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name lay->addSpacing(KDialog::spacingHint()); lay->addWidget(mSubRepetition); - lay = new TQVBoxLayout(tqlayout); + lay = new TQVBoxLayout(layout); lay->addStretch(); - tqlayout = new TQHBoxLayout(lay); + layout = new TQHBoxLayout(lay); - tqlayout->addSpacing(KDialog::marginHint()); + layout->addSpacing(KDialog::marginHint()); TQFrame* divider = new TQFrame(ruleFrame); divider->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); - tqlayout->addWidget(divider); - tqlayout->addSpacing(KDialog::marginHint()); + layout->addWidget(divider); + layout->addSpacing(KDialog::marginHint()); mNoRule = new NoRule(ruleFrame, "noFrame"); mSubDailyRule = new SubDailyRule(mReadOnly, ruleFrame, "subdayFrame"); @@ -203,15 +203,15 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name connect(mYearlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged())); mRuleStack = new TQWidgetStack(ruleFrame); - tqlayout->addWidget(mRuleStack); - tqlayout->addStretch(1); + layout->addWidget(mRuleStack); + layout->addStretch(1); mRuleStack->addWidget(mNoRule, 0); mRuleStack->addWidget(mSubDailyRule, 1); mRuleStack->addWidget(mDailyRule, 2); mRuleStack->addWidget(mWeeklyRule, 3); mRuleStack->addWidget(mMonthlyRule, 4); mRuleStack->addWidget(mYearlyRule, 5); - tqlayout->addSpacing(KDialog::marginHint()); + layout->addSpacing(KDialog::marginHint()); // Create the recurrence range group which contains the controls // which specify how long the recurrence is to last. @@ -220,22 +220,22 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name connect(mRangeButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(rangeTypeClicked())); topLayout->addWidget(mRangeButtonGroup); - TQVBoxLayout* vtqlayout = new TQVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint()); - vtqlayout->addSpacing(fontMetrics().lineSpacing()/2); + TQVBoxLayout* vlayout = new TQVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint()); + vlayout->addSpacing(fontMetrics().lineSpacing()/2); mNoEndDateButton = new RadioButton(i18n("No &end"), mRangeButtonGroup); - mNoEndDateButton->setFixedSize(mNoEndDateButton->tqsizeHint()); + mNoEndDateButton->setFixedSize(mNoEndDateButton->sizeHint()); mNoEndDateButton->setReadOnly(mReadOnly); TQWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely")); - vtqlayout->addWidget(mNoEndDateButton, 1, TQt::AlignAuto); + vlayout->addWidget(mNoEndDateButton, 1, TQt::AlignAuto); TQSize size = mNoEndDateButton->size(); - tqlayout = new TQHBoxLayout(vtqlayout, KDialog::spacingHint()); + layout = new TQHBoxLayout(vlayout, KDialog::spacingHint()); mRepeatCountButton = new RadioButton(i18n("End a&fter:"), mRangeButtonGroup); mRepeatCountButton->setReadOnly(mReadOnly); TQWhatsThis::add(mRepeatCountButton, i18n("Repeat the alarm for the number of times specified")); mRepeatCountEntry = new SpinBox(1, 9999, 1, mRangeButtonGroup); - mRepeatCountEntry->setFixedSize(mRepeatCountEntry->tqsizeHint()); + mRepeatCountEntry->setFixedSize(mRepeatCountEntry->sizeHint()); mRepeatCountEntry->setLineShiftStep(10); mRepeatCountEntry->setSelectOnStep(false); mRepeatCountEntry->setReadOnly(mReadOnly); @@ -244,44 +244,44 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name i18n("Enter the total number of times to trigger the alarm")); mRepeatCountButton->setFocusWidget(mRepeatCountEntry); mRepeatCountLabel = new TQLabel(i18n("occurrence(s)"), mRangeButtonGroup); - mRepeatCountLabel->setFixedSize(mRepeatCountLabel->tqsizeHint()); - tqlayout->addWidget(mRepeatCountButton); - tqlayout->addSpacing(KDialog::spacingHint()); - tqlayout->addWidget(mRepeatCountEntry); - tqlayout->addWidget(mRepeatCountLabel); - tqlayout->addStretch(); - size = size.expandedTo(mRepeatCountButton->tqsizeHint()); - - tqlayout = new TQHBoxLayout(vtqlayout, KDialog::spacingHint()); + mRepeatCountLabel->setFixedSize(mRepeatCountLabel->sizeHint()); + layout->addWidget(mRepeatCountButton); + layout->addSpacing(KDialog::spacingHint()); + layout->addWidget(mRepeatCountEntry); + layout->addWidget(mRepeatCountLabel); + layout->addStretch(); + size = size.expandedTo(mRepeatCountButton->sizeHint()); + + layout = new TQHBoxLayout(vlayout, KDialog::spacingHint()); mEndDateButton = new RadioButton(i18n("End &by:"), mRangeButtonGroup); mEndDateButton->setReadOnly(mReadOnly); 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->tqsizeHint()); + mEndDateEdit->setFixedSize(mEndDateEdit->sizeHint()); mEndDateEdit->setReadOnly(mReadOnly); TQWhatsThis::add(mEndDateEdit, i18n("Enter the last date to repeat the alarm")); mEndDateButton->setFocusWidget(mEndDateEdit); mEndTimeEdit = new TimeEdit(mRangeButtonGroup); - mEndTimeEdit->setFixedSize(mEndTimeEdit->tqsizeHint()); + mEndTimeEdit->setFixedSize(mEndTimeEdit->sizeHint()); mEndTimeEdit->setReadOnly(mReadOnly); static const TQString lastTimeText = i18n("Enter the last time to repeat the alarm."); - TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").tqarg(lastTimeText).tqarg(TimeSpinBox::shiftWhatsThis())); + TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis())); mEndAnyTimeCheckBox = new CheckBox(i18n("Any time"), mRangeButtonGroup); - mEndAnyTimeCheckBox->setFixedSize(mEndAnyTimeCheckBox->tqsizeHint()); + mEndAnyTimeCheckBox->setFixedSize(mEndAnyTimeCheckBox->sizeHint()); mEndAnyTimeCheckBox->setReadOnly(mReadOnly); 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")); - tqlayout->addWidget(mEndDateButton); - tqlayout->addSpacing(KDialog::spacingHint()); - tqlayout->addWidget(mEndDateEdit); - tqlayout->addWidget(mEndTimeEdit); - tqlayout->addWidget(mEndAnyTimeCheckBox); - tqlayout->addStretch(); - size = size.expandedTo(mEndDateButton->tqsizeHint()); + layout->addWidget(mEndDateButton); + layout->addSpacing(KDialog::spacingHint()); + layout->addWidget(mEndDateEdit); + layout->addWidget(mEndTimeEdit); + layout->addWidget(mEndAnyTimeCheckBox); + layout->addStretch(); + size = size.expandedTo(mEndDateButton->sizeHint()); // Line up the widgets to the right of the radio buttons mRepeatCountButton->setFixedSize(size); @@ -293,17 +293,17 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name mExceptionGroup = new TQGroupBox(i18n("E&xceptions"), this, "mExceptionGroup"); topLayout->addWidget(mExceptionGroup); topLayout->setStretchFactor(mExceptionGroup, 2); - vtqlayout = new TQVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint()); - vtqlayout->addSpacing(fontMetrics().lineSpacing()/2); - tqlayout = new TQHBoxLayout(vtqlayout, KDialog::spacingHint()); - vtqlayout = new TQVBoxLayout(tqlayout); + vlayout = new TQVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint()); + vlayout->addSpacing(fontMetrics().lineSpacing()/2); + layout = new TQHBoxLayout(vlayout, KDialog::spacingHint()); + vlayout = new TQVBoxLayout(layout); mExceptionDateList = new TQListBox(mExceptionGroup); - mExceptionDateList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + 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")); - vtqlayout->addWidget(mExceptionDateList); + vlayout->addWidget(mExceptionDateList); if (mReadOnly) { @@ -313,36 +313,36 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name } else { - vtqlayout = new TQVBoxLayout(tqlayout); + vlayout = new TQVBoxLayout(layout); mExceptionDateEdit = new DateEdit(mExceptionGroup); - mExceptionDateEdit->setFixedSize(mExceptionDateEdit->tqsizeHint()); - mExceptionDateEdit->setDate(TQDate::tqcurrentDate()); + mExceptionDateEdit->setFixedSize(mExceptionDateEdit->sizeHint()); + 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.")); - vtqlayout->addWidget(mExceptionDateEdit); + vlayout->addWidget(mExceptionDateEdit); - tqlayout = new TQHBoxLayout(vtqlayout, KDialog::spacingHint()); + layout = new TQHBoxLayout(vlayout, KDialog::spacingHint()); TQPushButton* button = new TQPushButton(i18n("Add"), mExceptionGroup); - button->setFixedSize(button->tqsizeHint()); + button->setFixedSize(button->sizeHint()); connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(addException())); TQWhatsThis::add(button, i18n("Add the date entered above to the exceptions list")); - tqlayout->addWidget(button); + layout->addWidget(button); mChangeExceptionButton = new TQPushButton(i18n("Change"), mExceptionGroup); - mChangeExceptionButton->setFixedSize(mChangeExceptionButton->tqsizeHint()); + mChangeExceptionButton->setFixedSize(mChangeExceptionButton->sizeHint()); 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")); - tqlayout->addWidget(mChangeExceptionButton); + layout->addWidget(mChangeExceptionButton); mDeleteExceptionButton = new TQPushButton(i18n("Delete"), mExceptionGroup); - mDeleteExceptionButton->setFixedSize(mDeleteExceptionButton->tqsizeHint()); + mDeleteExceptionButton->setFixedSize(mDeleteExceptionButton->sizeHint()); connect(mDeleteExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteException())); TQWhatsThis::add(mDeleteExceptionButton, i18n("Remove the currently highlighted item from the exceptions list")); - tqlayout->addWidget(mDeleteExceptionButton); + layout->addWidget(mDeleteExceptionButton); } mNoEmitTypeChanged = false; @@ -1029,30 +1029,30 @@ Rule::Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, b box->setSpacing(KDialog::spacingHint()); TQLabel* label = new TQLabel(i18n("Recur e&very"), box); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); if (time) { mIntSpinBox = 0; mSpinBox = mTimeSpinBox = new TimeSpinBox(1, 5999, box); - mTimeSpinBox->setFixedSize(mTimeSpinBox->tqsizeHint()); + mTimeSpinBox->setFixedSize(mTimeSpinBox->sizeHint()); mTimeSpinBox->setReadOnly(readOnly); } else { mTimeSpinBox = 0; mSpinBox = mIntSpinBox = new SpinBox(1, 999, 1, box); - mIntSpinBox->setFixedSize(mIntSpinBox->tqsizeHint()); + mIntSpinBox->setFixedSize(mIntSpinBox->sizeHint()); mIntSpinBox->setReadOnly(readOnly); } connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(frequencyChanged())); label->setBuddy(mSpinBox); label = new TQLabel(freqText, box); - label->setFixedSize(label->tqsizeHint()); - box->setFixedSize(tqsizeHint()); + label->setFixedSize(label->sizeHint()); + box->setFixedSize(sizeHint()); TQWhatsThis::add(box, freqWhatsThis); new TQWidget(freqBox); // left adjust the visible widgets - freqBox->setFixedHeight(freqBox->tqsizeHint().height()); + freqBox->setFixedHeight(freqBox->sizeHint().height()); freqBox->setFocusProxy(mSpinBox); } @@ -1112,11 +1112,11 @@ DayWeekRule::DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis : Rule(freqText, freqWhatsThis, false, readOnly, parent, name), mSavedDays(7) { - TQGridLayout* grid = new TQGridLayout(tqlayout(), 1, 4, KDialog::spacingHint()); + TQGridLayout* grid = new TQGridLayout(layout(), 1, 4, KDialog::spacingHint()); grid->setRowStretch(0, 1); TQLabel* label = new TQLabel(i18n("On: Tuesday", "O&n:"), this); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); grid->addWidget(label, 0, 0, TQt::AlignRight | TQt::AlignTop); grid->addColSpacing(1, KDialog::spacingHint()); @@ -1129,11 +1129,11 @@ DayWeekRule::DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis { int day = KAlarm::localeDayInWeek_to_weekDay(i); mDayBox[i] = new CheckBox(calendar->weekDayName(day), box); - mDayBox[i]->setFixedSize(mDayBox[i]->tqsizeHint()); + mDayBox[i]->setFixedSize(mDayBox[i]->sizeHint()); mDayBox[i]->setReadOnly(readOnly); dgrid->addWidget(mDayBox[i], i%4, i/4, TQt::AlignAuto); } - box->setFixedSize(box->tqsizeHint()); + box->setFixedSize(box->sizeHint()); TQWhatsThis::add(box, daysWhatsThis); grid->addWidget(box, 0, 2, TQt::AlignAuto); label->setBuddy(mDayBox[0]); @@ -1258,10 +1258,10 @@ MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhats // Month day selector TQHBox* box = new TQHBox(this); box->setSpacing(KDialog::spacingHint()); - tqlayout()->addWidget(box); + layout()->addWidget(box); mDayButton = new RadioButton(i18n("On day number in the month", "O&n day"), box); - mDayButton->setFixedSize(mDayButton->tqsizeHint()); + mDayButton->setFixedSize(mDayButton->sizeHint()); mDayButton->setReadOnly(readOnly); mDayButtonId = mButtonGroup->insert(mDayButton); TQWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month")); @@ -1271,22 +1271,22 @@ MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhats for (int i = 0; i < 31; ++i) mDayCombo->insertItem(TQString::number(i + 1)); mDayCombo->insertItem(i18n("Last day of month", "Last")); - mDayCombo->setFixedSize(mDayCombo->tqsizeHint()); + mDayCombo->setFixedSize(mDayCombo->sizeHint()); mDayCombo->setReadOnly(readOnly); TQWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm")); mDayButton->setFocusWidget(mDayCombo); connect(mDayCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotDaySelected(int))); box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls - box->setFixedHeight(box->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); // Month position selector box = new TQHBox(this); box->setSpacing(KDialog::spacingHint()); - tqlayout()->addWidget(box); + layout()->addWidget(box); mPosButton = new RadioButton(i18n("On the 1st Tuesday", "On t&he"), box); - mPosButton->setFixedSize(mPosButton->tqsizeHint()); + mPosButton->setFixedSize(mPosButton->sizeHint()); mPosButton->setReadOnly(readOnly); mPosButtonId = mButtonGroup->insert(mPosButton); TQWhatsThis::add(mPosButton, @@ -1309,7 +1309,7 @@ MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhats mWeekCombo->setSizeLimit(11); } TQWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm")); - mWeekCombo->setFixedSize(mWeekCombo->tqsizeHint()); + mWeekCombo->setFixedSize(mWeekCombo->sizeHint()); mWeekCombo->setReadOnly(readOnly); mPosButton->setFocusWidget(mWeekCombo); @@ -1324,7 +1324,7 @@ MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhats TQWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm")); box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls - box->setFixedHeight(box->tqsizeHint().height()); + box->setFixedHeight(box->sizeHint().height()); connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(clicked(int))); } @@ -1456,47 +1456,47 @@ YearlyRule::YearlyRule(bool readOnly, TQWidget* parent, const char* name) true, readOnly, parent, name) { // Set up the month selection widgets - TQBoxLayout* htqlayout = new TQHBoxLayout(tqlayout(), KDialog::spacingHint()); + TQBoxLayout* hlayout = new TQHBoxLayout(layout(), KDialog::spacingHint()); TQLabel* label = new TQLabel(i18n("List of months to select", "Months:"), this); - label->setFixedSize(label->tqsizeHint()); - htqlayout->addWidget(label, 0, TQt::AlignAuto | TQt::AlignTop); + label->setFixedSize(label->sizeHint()); + hlayout->addWidget(label, 0, TQt::AlignAuto | TQt::AlignTop); // List the months of the year. TQWidget* w = new TQWidget(this); // this is to control the TQWhatsThis text display area - htqlayout->addWidget(w, 1, TQt::AlignAuto); + hlayout->addWidget(w, 1, TQt::AlignAuto); TQGridLayout* grid = new TQGridLayout(w, 4, 3, 0, KDialog::spacingHint()); const KCalendarSystem* calendar = KGlobal::locale()->calendar(); - int year = TQDate::tqcurrentDate().year(); + int year = TQDate::currentDate().year(); for (int i = 0; i < 12; ++i) { mMonthBox[i] = new CheckBox(calendar->monthName(i + 1, year, true), w); - mMonthBox[i]->setFixedSize(mMonthBox[i]->tqsizeHint()); + mMonthBox[i]->setFixedSize(mMonthBox[i]->sizeHint()); mMonthBox[i]->setReadOnly(readOnly); grid->addWidget(mMonthBox[i], i%3, i/3, TQt::AlignAuto); } connect(mMonthBox[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(enableFeb29())); - w->setFixedHeight(w->tqsizeHint().height()); + w->setFixedHeight(w->sizeHint().height()); TQWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm")); // February 29th handling option TQHBox* f29box = new TQHBox(this); - tqlayout()->addWidget(f29box); + layout()->addWidget(f29box); TQHBox* box = new TQHBox(f29box); // this is to control the TQWhatsThis text display area box->setSpacing(KDialog::spacingHint()); mFeb29Label = new TQLabel(i18n("February 2&9th alarm in non-leap years:"), box); - mFeb29Label->setFixedSize(mFeb29Label->tqsizeHint()); + mFeb29Label->setFixedSize(mFeb29Label->sizeHint()); mFeb29Combo = new ComboBox(false, box); mFeb29Combo->insertItem(i18n("No date", "None")); mFeb29Combo->insertItem(i18n("1st March (short form)", "1 Mar")); mFeb29Combo->insertItem(i18n("28th February (short form)", "28 Feb")); - mFeb29Combo->setFixedSize(mFeb29Combo->tqsizeHint()); + mFeb29Combo->setFixedSize(mFeb29Combo->sizeHint()); mFeb29Combo->setReadOnly(readOnly); mFeb29Label->setBuddy(mFeb29Combo); - box->setFixedSize(box->tqsizeHint()); + box->setFixedSize(box->sizeHint()); TQWhatsThis::add(box, i18n("Select which date, if any, the February 29th alarm should trigger in non-leap years")); new TQWidget(f29box); // left adjust the visible widgets - f29box->setFixedHeight(f29box->tqsizeHint().height()); + f29box->setFixedHeight(f29box->sizeHint().height()); } void YearlyRule::setDefaultValues(int dayOfMonth, int dayOfWeek, int month) diff --git a/kalarm/recurrenceeditprivate.h b/kalarm/recurrenceeditprivate.h index 68dd429b9..94472c379 100644 --- a/kalarm/recurrenceeditprivate.h +++ b/kalarm/recurrenceeditprivate.h @@ -54,7 +54,7 @@ class Rule : public NoRule int frequency() const; void setFrequency(int); virtual void setFrequencyFocus() { mSpinBox->setFocus(); } - TQVBoxLayout* tqlayout() const { return mLayout; } + TQVBoxLayout* layout() const { return mLayout; } virtual TQWidget* validate(TQString&) { return 0; } virtual void saveState(); virtual bool stateChanged() const; diff --git a/kalarm/reminder.cpp b/kalarm/reminder.cpp index e10e04e22..aa6aa222a 100644 --- a/kalarm/reminder.cpp +++ b/kalarm/reminder.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <kglobal.h> @@ -51,19 +51,19 @@ Reminder::Reminder(const TQString& caption, const TQString& reminderWhatsThis, c mTime = new TimeSelector(caption, i18n("in advance"), reminderWhatsThis, valueWhatsThis, allowHourMinute, this, "timeOption"); - mTime->setFixedSize(mTime->tqsizeHint()); + mTime->setFixedSize(mTime->sizeHint()); connect(mTime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotReminderToggled(bool))); topLayout->addWidget(mTime); if (showOnceOnly) { - TQBoxLayout* tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); - tqlayout->addSpacing(3*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->tqsizeHint()); + mOnceOnly->setFixedSize(mOnceOnly->sizeHint()); TQWhatsThis::add(mOnceOnly, i18n("Display the reminder only before the first time the alarm is scheduled")); - tqlayout->addWidget(mOnceOnly); - tqlayout->addStretch(); + layout->addWidget(mOnceOnly); + layout->addStretch(); } else mOnceOnly = 0; diff --git a/kalarm/repetition.cpp b/kalarm/repetition.cpp index 403250ba5..db17c9fbc 100644 --- a/kalarm/repetition.cpp +++ b/kalarm/repetition.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <kdebug.h> @@ -165,7 +165,7 @@ RepetitionDlg::RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* p "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->tqsizeHint()); + mTimeSelector->setFixedSize(mTimeSelector->sizeHint()); connect(mTimeSelector, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(intervalChanged(int))); connect(mTimeSelector, TQT_SIGNAL(toggled(bool)), TQT_SLOT(repetitionToggled(bool))); topLayout->addWidget(mTimeSelector, 0, TQt::AlignAuto); @@ -174,38 +174,38 @@ RepetitionDlg::RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* p connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(typeClicked())); topLayout->addWidget(mButtonGroup); - TQBoxLayout* vtqlayout = new TQVBoxLayout(mButtonGroup, marginHint(), spacing); - TQBoxLayout* tqlayout = new TQHBoxLayout(vtqlayout, 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->tqsizeHint()); + mCountButton->setFixedSize(mCountButton->sizeHint()); TQWhatsThis::add(mCountButton, i18n("Check to specify the number of times the alarm should repeat after each recurrence")); - tqlayout->addWidget(mCountButton); + layout->addWidget(mCountButton); mCount = new SpinBox(1, MAX_COUNT, 1, mButtonGroup); - mCount->setFixedSize(mCount->tqsizeHint()); + mCount->setFixedSize(mCount->sizeHint()); mCount->setLineShiftStep(10); mCount->setSelectOnStep(false); 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")); - tqlayout->addWidget(mCount); + layout->addWidget(mCount); mCountButton->setFocusWidget(mCount); - tqlayout->addStretch(); + layout->addStretch(); - tqlayout = new TQHBoxLayout(vtqlayout, spacing); + layout = new TQHBoxLayout(vlayout, spacing); mDurationButton = new RadioButton(i18n("&Duration:"), mButtonGroup); - mDurationButton->setFixedSize(mDurationButton->tqsizeHint()); + mDurationButton->setFixedSize(mDurationButton->sizeHint()); TQWhatsThis::add(mDurationButton, i18n("Check to specify how long the alarm is to be repeated")); - tqlayout->addWidget(mDurationButton); + layout->addWidget(mDurationButton); mDuration = new TimePeriod(true, mButtonGroup); - mDuration->setFixedSize(mDuration->tqsizeHint()); + mDuration->setFixedSize(mDuration->sizeHint()); connect(mDuration, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(durationChanged(int))); TQWhatsThis::add(mDuration, i18n("Enter the length of time to repeat the alarm")); - tqlayout->addWidget(mDuration); + layout->addWidget(mDuration); mDurationButton->setFocusWidget(mDuration); - tqlayout->addStretch(); + layout->addStretch(); mCountButton->setChecked(true); repetitionToggled(false); diff --git a/kalarm/sounddlg.cpp b/kalarm/sounddlg.cpp index c7a6adcfb..0359810f2 100644 --- a/kalarm/sounddlg.cpp +++ b/kalarm/sounddlg.cpp @@ -25,7 +25,7 @@ #include <tqlabel.h> #include <tqhbox.h> #include <tqgroupbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqfile.h> #include <tqdir.h> #include <tqwhatsthis.h> @@ -78,14 +78,14 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad { TQWidget* page = new TQWidget(this); setMainWidget(page); - TQVBoxLayout* tqlayout = new TQVBoxLayout(page, 0, spacingHint()); + TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint()); // File play button TQHBox* box = new TQHBox(page); - tqlayout->addWidget(box); + layout->addWidget(box); mFilePlay = new TQPushButton(box); mFilePlay->setPixmap(SmallIcon("player_play")); - mFilePlay->setFixedSize(mFilePlay->tqsizeHint()); + mFilePlay->setFixedSize(mFilePlay->sizeHint()); connect(mFilePlay, TQT_SIGNAL(clicked()), TQT_SLOT(playSound())); TQToolTip::add(mFilePlay, i18n("Test the sound")); TQWhatsThis::add(mFilePlay, i18n("Play the selected sound file.")); @@ -98,36 +98,36 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad // File browse button mFileBrowseButton = new PushButton(box); mFileBrowseButton->setPixmap(SmallIcon("fileopen")); - mFileBrowseButton->setFixedSize(mFileBrowseButton->tqsizeHint()); + mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint()); 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->tqsizeHint()); + mRepeatCheckbox->setFixedSize(mRepeatCheckbox->sizeHint()); TQWhatsThis::add(mRepeatCheckbox, i18n("If checked, the sound file will be played repeatedly for as long as the message is displayed.")); - tqlayout->addWidget(mRepeatCheckbox); + layout->addWidget(mRepeatCheckbox); // Volume TQGroupBox* group = new TQGroupBox(i18n("Volume"), page); - tqlayout->addWidget(group); + layout->addWidget(group); 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 tqalignment to use in TQGridLayout (AlignAuto doesn't work correctly there) - int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there) + int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; // 'Set volume' checkbox box = new TQHBox(group); box->setSpacing(spacingHint()); grid->addMultiCellWidget(box, 1, 1, 0, 2); mVolumeCheckbox = new CheckBox(i18n_v_SetVolume(), box); - mVolumeCheckbox->setFixedSize(mVolumeCheckbox->tqsizeHint()); + mVolumeCheckbox->setFixedSize(mVolumeCheckbox->sizeHint()); connect(mVolumeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotVolumeToggled(bool))); TQWhatsThis::add(mVolumeCheckbox, i18n("Select to choose the volume for playing the sound file.")); @@ -136,30 +136,30 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad mVolumeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, box); mVolumeSlider->setTickmarks(TQSlider::Below); mVolumeSlider->setTickInterval(10); - mVolumeSlider->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); + 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->tqsizeHint()); + mFadeCheckbox->setFixedSize(mFadeCheckbox->sizeHint()); 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, tqalignment); + grid->addMultiCellWidget(mFadeCheckbox, 2, 2, 1, 2, alignment); // Fade time mFadeBox = new TQHBox(group); mFadeBox->setSpacing(spacingHint()); - grid->addWidget(mFadeBox, 3, 2, tqalignment); + grid->addWidget(mFadeBox, 3, 2, alignment); TQLabel* label = new TQLabel(i18n("Time period over which to fade the sound", "Fade time:"), mFadeBox); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); mFadeTime = new SpinBox(1, 999, 1, mFadeBox); mFadeTime->setLineShiftStep(10); - mFadeTime->setFixedSize(mFadeTime->tqsizeHint()); + mFadeTime->setFixedSize(mFadeTime->sizeHint()); label->setBuddy(mFadeTime); label = new TQLabel(i18n("seconds"), mFadeBox); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); TQWhatsThis::add(mFadeBox, i18n("Enter how many seconds to fade the sound before reaching the set volume.")); // Fade slider @@ -167,11 +167,11 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad mFadeVolumeBox->setSpacing(spacingHint()); grid->addWidget(mFadeVolumeBox, 4, 2); label = new TQLabel(i18n("Initial volume:"), mFadeVolumeBox); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); mFadeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, mFadeVolumeBox); mFadeSlider->setTickmarks(TQSlider::Below); mFadeSlider->setTickInterval(10); - mFadeSlider->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); + mFadeSlider->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); label->setBuddy(mFadeSlider); TQWhatsThis::add(mFadeVolumeBox, i18n("Choose the initial volume for playing the sound file.")); @@ -299,7 +299,7 @@ void SoundDlg::playSound() || !KIO::NetAccess::download(url, mLocalAudioFile, mmw)) { kdError(5950) << "SoundDlg::playAudio(): Open failure: " << mFileName << endl; - KMessageBox::error(this, i18n("Cannot open audio file:\n%1").tqarg(mFileName)); + KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mFileName)); return; } mPlayTimer = new TQTimer(this); diff --git a/kalarm/soundpicker.cpp b/kalarm/soundpicker.cpp index ed55b8112..caa13d88d 100644 --- a/kalarm/soundpicker.cpp +++ b/kalarm/soundpicker.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqregexp.h> #include <tqtooltip.h> #include <tqtimer.h> @@ -64,7 +64,7 @@ SoundPicker::SoundPicker(TQWidget* parent, const char* name) mTypeBox->setSpacing(KDialog::spacingHint()); TQLabel* label = new TQLabel(i18n("An audio sound", "&Sound:"), mTypeBox); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); // Sound type combo box // The order of combo box entries must correspond with the 'Type' enum. @@ -81,7 +81,7 @@ SoundPicker::SoundPicker(TQWidget* parent, const char* name) // Sound file picker button mFilePicker = new PushButton(this); mFilePicker->setPixmap(SmallIcon("playsound")); - mFilePicker->setFixedSize(mFilePicker->tqsizeHint()); + mFilePicker->setFixedSize(mFilePicker->sizeHint()); 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.")); @@ -114,9 +114,9 @@ void SoundPicker::showSpeak(bool show) if (show == mSpeakShowing) return; // no change TQString whatsThis = "<p>" + i18n("Choose a sound to play when the message is displayed.") - + "<br>" + i18n("%1: the message is displayed silently.").tqarg("<b>" + i18n_None() + "</b>") - + "<br>" + i18n("%1: a simple beep is sounded.").tqarg("<b>" + i18n_Beep() + "</b>") - + "<br>" + i18n("%1: an audio file is played. You will be prompted to choose the file and set play options.").tqarg("<b>" + i18n_File() + "</b>"); + + "<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>"); if (!show && mTypeCombo->currentItem() == SPEAK) mTypeCombo->setCurrentItem(NONE); if (mTypeCombo->count() == SPEAK+1) @@ -124,7 +124,7 @@ void SoundPicker::showSpeak(bool show) if (show) { mTypeCombo->insertItem(i18n_Speak()); - whatsThis += "<br>" + i18n("%1: the message text is spoken.").tqarg("<b>" + i18n_Speak() + "</b>") + "</p>"; + whatsThis += "<br>" + i18n("%1: the message text is spoken.").arg("<b>" + i18n_Speak() + "</b>") + "</p>"; } TQWhatsThis::add(mTypeBox, whatsThis + "</p>"); mSpeakShowing = show; @@ -283,7 +283,7 @@ TQString SoundPicker::browseFile(TQString& defaultDir, const TQString& initialFi defaultDir = kdeSoundDir; } #ifdef WITHOUT_ARTS - TQString filter = TQString::tqfromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").tqarg(i18n("Sound Files")).tqarg(i18n("All Files")); + TQString filter = TQString::fromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").arg(i18n("Sound Files")).arg(i18n("All Files")); #else TQStringList filters = KDE::PlayObjectFactory::mimeTypes(); TQString filter = filters.join(" "); diff --git a/kalarm/specialactions.cpp b/kalarm/specialactions.cpp index 02a0543f0..3c028a68c 100644 --- a/kalarm/specialactions.cpp +++ b/kalarm/specialactions.cpp @@ -21,7 +21,7 @@ #include "kalarm.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klineedit.h> @@ -95,12 +95,12 @@ SpecialActionsDlg::SpecialActionsDlg(const TQString& preAction, const TQString& { TQWidget* page = new TQWidget(this); setMainWidget(page); - TQVBoxLayout* tqlayout = new TQVBoxLayout(page, 0, spacingHint()); + TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint()); mActions = new SpecialActions(page); mActions->setActions(preAction, postAction); - tqlayout->addWidget(mActions); - tqlayout->addSpacing(KDialog::spacingHint()); + layout->addWidget(mActions); + layout->addSpacing(KDialog::spacingHint()); TQSize s; if (KAlarm::readConfigWindowSize(SPEC_ACT_DIALOG_NAME, s)) @@ -142,7 +142,7 @@ SpecialActions::SpecialActions(TQWidget* parent, const char* name) // Pre-alarm action TQLabel* label = new TQLabel(i18n("Pre-a&larm action:"), this); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); topLayout->addWidget(label, 0, TQt::AlignAuto); mPreAction = new KLineEdit(this); @@ -156,7 +156,7 @@ SpecialActions::SpecialActions(TQWidget* parent, const char* name) // Post-alarm action label = new TQLabel(i18n("Post-alar&m action:"), this); - label->setFixedSize(label->tqsizeHint()); + label->setFixedSize(label->sizeHint()); topLayout->addWidget(label, 0, TQt::AlignAuto); mPostAction = new KLineEdit(this); diff --git a/kalarm/templatedlg.cpp b/kalarm/templatedlg.cpp index fa176f8b9..a493e0ed7 100644 --- a/kalarm/templatedlg.cpp +++ b/kalarm/templatedlg.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqwhatsthis.h> @@ -50,34 +50,34 @@ TemplateDlg::TemplateDlg(TQWidget* parent, const char* name) TQBoxLayout* topLayout = new TQHBoxLayout(topWidget); topLayout->setSpacing(spacingHint()); - TQBoxLayout* tqlayout = new TQVBoxLayout(topLayout); + TQBoxLayout* layout = new TQVBoxLayout(topLayout); mTemplateList = new TemplateListView(true, i18n("The list of alarm templates"), topWidget); mTemplateList->setSelectionMode(TQListView::Extended); - mTemplateList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + mTemplateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); connect(mTemplateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged())); - tqlayout->addWidget(mTemplateList); + layout->addWidget(mTemplateList); - tqlayout = new TQVBoxLayout(topLayout); + 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")); - tqlayout->addWidget(button); + layout->addWidget(button); mEditButton = new TQPushButton(i18n("&Edit..."), topWidget); connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit())); TQWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template")); - tqlayout->addWidget(mEditButton); + layout->addWidget(mEditButton); 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")); - tqlayout->addWidget(mCopyButton); + layout->addWidget(mCopyButton); mDeleteButton = new TQPushButton(i18n("&Delete"), topWidget); connect(mDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelete())); TQWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template")); - tqlayout->addWidget(mDeleteButton); + layout->addWidget(mDeleteButton); KAccel* accel = new KAccel(this); accel->insert(KStdAccel::SelectAll, TQT_TQOBJECT(mTemplateList), TQT_SLOT(slotSelectAll())); @@ -192,14 +192,14 @@ void TemplateDlg::slotDelete() return; int warnErr = 0; - KAlarm::UpdatetqStatus status = KAlarm::UPDATE_OK; + KAlarm::UpdateStatus status = KAlarm::UPDATE_OK; TQValueList<KAEvent> events; AlarmCalendar::templateCalendar()->startUpdate(); // prevent multiple saves of the calendar until we're finished for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) { TemplateListViewItem* item = (TemplateListViewItem*)(*it); events.append(item->event()); - KAlarm::UpdatetqStatus st = KAlarm::deleteTemplate(item->event()); + KAlarm::UpdateStatus st = KAlarm::deleteTemplate(item->event()); if (st != KAlarm::UPDATE_OK) { status = st; diff --git a/kalarm/templatepickdlg.cpp b/kalarm/templatepickdlg.cpp index 3df2d8dd7..9aff1c94b 100644 --- a/kalarm/templatepickdlg.cpp +++ b/kalarm/templatepickdlg.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqwhatsthis.h> #include <klocale.h> diff --git a/kalarm/timeselector.cpp b/kalarm/timeselector.cpp index 31e69d749..53e0805cb 100644 --- a/kalarm/timeselector.cpp +++ b/kalarm/timeselector.cpp @@ -20,7 +20,7 @@ #include "kalarm.h" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqhbox.h> #include <tqwhatsthis.h> @@ -41,18 +41,18 @@ TimeSelector::TimeSelector(const TQString& selectText, const TQString& postfix, { setFrameStyle(TQFrame::NoFrame); TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - TQHBoxLayout* tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); + TQHBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint()); mSelect = new CheckBox(selectText, this); - mSelect->setFixedSize(mSelect->tqsizeHint()); + mSelect->setFixedSize(mSelect->sizeHint()); connect(mSelect, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectToggled(bool))); TQWhatsThis::add(mSelect, selectWhatsThis); - tqlayout->addWidget(mSelect); + layout->addWidget(mSelect); TQHBox* box = new TQHBox(this); // to group widgets for TQWhatsThis text box->setSpacing(KDialog::spacingHint()); - tqlayout->addWidget(box); + layout->addWidget(box); mPeriod = new TimePeriod(allowHourMinute, box); - mPeriod->setFixedSize(mPeriod->tqsizeHint()); + mPeriod->setFixedSize(mPeriod->sizeHint()); mPeriod->setSelectOnStep(false); connect(mPeriod, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(periodChanged(int))); mSelect->setFocusWidget(mPeriod); diff --git a/kalarm/traywindow.cpp b/kalarm/traywindow.cpp index 9f3524b9d..81af39266 100644 --- a/kalarm/traywindow.cpp +++ b/kalarm/traywindow.cpp @@ -87,7 +87,7 @@ TrayWindow::TrayWindow(MainWindow* parent, const char* name) KActionCollection* actcol = actionCollection(); AlarmEnableAction* a = Daemon::createAlarmEnableAction(actcol, "tAlarmEnable"); a->plug(contextMenu()); - connect(a, TQT_SIGNAL(switched(bool)), TQT_SLOT(setEnabledtqStatus(bool))); + connect(a, TQT_SIGNAL(switched(bool)), TQT_SLOT(setEnabledStatus(bool))); KAlarm::createNewAlarmAction(i18n("&New Alarm..."), TQT_TQOBJECT(this), TQT_SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu()); KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), TQT_TQOBJECT(this), TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actcol)->plug(contextMenu()); @@ -99,8 +99,8 @@ TrayWindow::TrayWindow(MainWindow* parent, const char* name) KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actcol); // Set icon to correspond with the alarms enabled menu status - Daemon::checktqStatus(); - setEnabledtqStatus(Daemon::monitoringAlarms()); + Daemon::checkStatus(); + setEnabledStatus(Daemon::monitoringAlarms()); mTooltip = new TrayTooltip(this); } @@ -121,7 +121,7 @@ TrayWindow::~TrayWindow() void TrayWindow::contextMenuAboutToShow(KPopupMenu* menu) { KSystemTray::contextMenuAboutToShow(menu); // needed for KDE <= 3.1 compatibility - Daemon::checktqStatus(); + Daemon::checkStatus(); } /****************************************************************************** @@ -160,7 +160,7 @@ void TrayWindow::slotQuit() * Called when the Alarms Enabled action status has changed. * Updates the alarms enabled menu item check state, and the icon pixmap. */ -void TrayWindow::setEnabledtqStatus(bool status) +void TrayWindow::setEnabledStatus(bool status) { kdDebug(5950) << "TrayWindow::setEnabledStatus(" << (int)status << ")\n"; setPixmap(status ? mPixmapEnabled : mPixmapDisabled); @@ -226,7 +226,7 @@ void TrayWindow::tooltipAlarmText(TQString& text) const KAEvent event; const TQString& prefix = Preferences::tooltipTimeToPrefix(); int maxCount = Preferences::tooltipAlarmCount(); - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); // Get today's and tomorrow's alarms, sorted in time order TQValueList<TipItem> items; @@ -266,9 +266,9 @@ void TrayWindow::tooltipAlarmText(TQString& text) const minutes[0] = (mins%60) / 10 + '0'; minutes[1] = (mins%60) % 10 + '0'; if (Preferences::showTooltipAlarmTime()) - item.text += i18n("prefix + hours:minutes", "(%1%2:%3)").tqarg(prefix).tqarg(mins/60).tqarg(minutes); + item.text += i18n("prefix + hours:minutes", "(%1%2:%3)").arg(prefix).arg(mins/60).arg(minutes); else - item.text += i18n("prefix + hours:minutes", "%1%2:%3").tqarg(prefix).tqarg(mins/60).tqarg(minutes); + item.text += i18n("prefix + hours:minutes", "%1%2:%3").arg(prefix).arg(mins/60).arg(minutes); item.text += ' '; space = true; } @@ -326,13 +326,13 @@ bool TrayWindow::inSystemTray() const #ifdef HAVE_X11_HEADERS Window xParent; // receives parent window Window root; - Window* tqchildren = 0; - unsigned int ntqchildren; + Window* children = 0; + unsigned int nchildren; // Find the X parent window of the widget. This is not the same as the TQt parent widget. - if (!XQueryTree(qt_xdisplay(), winId(), &root, &xParent, &tqchildren, &ntqchildren)) + if (!XQueryTree(qt_xdisplay(), winId(), &root, &xParent, &children, &nchildren)) return true; // error determining its parent X window - if (tqchildren) - XFree(tqchildren); + if (children) + XFree(children); // If it is in the system tray, the system tray window will be its X parent. // Otherwise, the root window will be its X parent. @@ -353,7 +353,7 @@ void TrayTooltip::maybeTip(const TQPoint&) if (Daemon::monitoringAlarms()) text = kapp->aboutData()->programName(); else - text = i18n("%1 - disabled").tqarg(kapp->aboutData()->programName()); + text = i18n("%1 - disabled").arg(kapp->aboutData()->programName()); kdDebug(5950) << "TrayTooltip::maybeTip(): " << text << endl; if (Preferences::tooltipAlarmCount()) parent->tooltipAlarmText(text); diff --git a/kalarm/traywindow.h b/kalarm/traywindow.h index e1d9ff078..e69e1b565 100644 --- a/kalarm/traywindow.h +++ b/kalarm/traywindow.h @@ -59,7 +59,7 @@ class TrayWindow : public KSystemTray void slotNewAlarm(); void slotNewFromTemplate(const KAEvent&); void slotPreferences(); - void setEnabledtqStatus(bool status); + void setEnabledStatus(bool status); private: friend class TrayTooltip; diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp index 63168f45e..b2703d0f7 100644 --- a/kalarm/undo.cpp +++ b/kalarm/undo.cpp @@ -52,8 +52,8 @@ class UndoItem int id() const { return mId; } Undo::Type type() const { return mType; } void setType(Undo::Type t) { mType = t; } - KAEvent::tqStatus calendar() const { return mCalendar; } - virtual void setCalendar(KAEvent::tqStatus s) { mCalendar = s; } + KAEvent::Status calendar() const { return mCalendar; } + virtual void setCalendar(KAEvent::Status s) { mCalendar = s; } virtual UndoItem* restore() = 0; virtual bool deleteID(const TQString& /*id*/) { return false; } @@ -66,13 +66,13 @@ class UndoItem protected: UndoItem(Undo::Type); - static TQString addDeleteActionText(KAEvent::tqStatus, bool add); + 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) Undo::Type mType; // which list (if any) the object is in - KAEvent::tqStatus mCalendar; + KAEvent::Status mCalendar; }; class UndoMultiBase : public UndoItem @@ -101,7 +101,7 @@ class UndoAdd : public UndoItem { public: UndoAdd(Undo::Type, const KAEvent&); - UndoAdd(Undo::Type, const KAEvent&, KAEvent::tqStatus); + UndoAdd(Undo::Type, const KAEvent&, KAEvent::Status); virtual Operation operation() const { return ADD; } virtual TQString actionText() const; virtual TQString description() const { return mDescription; } @@ -357,7 +357,7 @@ bool Undo::undo(Undo::Iterator it, Undo::Type type, TQWidget* parent, const TQSt case UndoItem::ERR_PROG: err = i18n("Program error"); break; default: err = i18n("Unknown error"); break; } - KMessageBox::sorry(parent, i18n("Undo-action: message", "%1: %2").tqarg(action).tqarg(err)); + KMessageBox::sorry(parent, i18n("Undo-action: message", "%1: %2").arg(action).arg(err)); return false; } @@ -586,7 +586,7 @@ TQString UndoItem::description(const KAEvent& event) const /****************************************************************************** * Return the action description of an add or delete Undo/Redo item for displaying. */ -TQString UndoItem::addDeleteActionText(KAEvent::tqStatus calendar, bool add) +TQString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add) { switch (calendar) { @@ -695,11 +695,11 @@ UndoAdd::UndoAdd(Undo::Type type, const KAEvent& event) : UndoItem(type), mEventID(event.id()) { - setCalendar(KAEvent::uidtqStatus(mEventID)); + setCalendar(KAEvent::uidStatus(mEventID)); mDescription = UndoItem::description(event); // calendar must be set before calling this } -UndoAdd::UndoAdd(Undo::Type type, const KAEvent& event, KAEvent::tqStatus cal) +UndoAdd::UndoAdd(Undo::Type type, const KAEvent& event, KAEvent::Status cal) : UndoItem(type), mEventID(KAEvent::uid(event.id(), cal)) { @@ -793,7 +793,7 @@ UndoEdit::UndoEdit(Undo::Type type, const KAEvent& oldEvent, const TQString& new mNewEventID(newEventID), mDescription(description) { - setCalendar(KAEvent::uidtqStatus(mNewEventID)); + setCalendar(KAEvent::uidStatus(mNewEventID)); } UndoEdit::~UndoEdit() @@ -880,7 +880,7 @@ UndoDelete::UndoDelete(Undo::Type type, const KAEvent& event) : UndoItem(type), mEvent(new KAEvent(event)) { - setCalendar(KAEvent::uidtqStatus(mEvent->id())); + setCalendar(KAEvent::uidStatus(mEvent->id())); } UndoDelete::~UndoDelete() |