summaryrefslogtreecommitdiffstats
path: root/kalarm/alarmcalendar.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/alarmcalendar.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/alarmcalendar.cpp')
-rw-r--r--kalarm/alarmcalendar.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp
index 274bf0c81..2d4e962d5 100644
--- a/kalarm/alarmcalendar.cpp
+++ b/kalarm/alarmcalendar.cpp
@@ -64,7 +64,7 @@ TQString AlarmCalendar::icalProductId()
return TQString::tqfromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString());
}
-static const KAEvent::Status eventTypes[AlarmCalendar::NCALS] = {
+static const KAEvent::tqStatus eventTypes[AlarmCalendar::NCALS] = {
KAEvent::ACTIVE, KAEvent::EXPIRED, KAEvent::DISPLAYING, KAEvent::TEMPLATE
};
static const TQString calendarNames[AlarmCalendar::NCALS] = {
@@ -83,7 +83,7 @@ AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 };
* There are 4 calendars:
* 1) A user-independent one containing the active alarms;
* 2) A historical one containing expired alarms;
-* 3) A user-specific one which tqcontains details of alarms which are currently
+* 3) A user-specific one which contains details of alarms which are currently
* being displayed to that user and which have not yet been acknowledged;
* 4) One containing alarm templates.
* Reply = true if success, false if calendar name error.
@@ -206,7 +206,7 @@ const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
if (uniqueID.isEmpty())
return 0;
CalID calID;
- switch (KAEvent::uidStatus(uniqueID))
+ switch (KAEvent::uidtqStatus(uniqueID))
{
case KAEvent::ACTIVE: calID = ACTIVE; break;
case KAEvent::TEMPLATE: calID = TEMPLATE; break;
@@ -231,7 +231,7 @@ const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
AlarmCalendar::AlarmCalendar(const TQString& path, CalID type, const TQString& icalPath,
const TQString& configKey)
: mCalendar(0),
- mConfigKey(icalPath.isNull() ? TQString::null : configKey),
+ mConfigKey(icalPath.isNull() ? TQString() : configKey),
mType(eventTypes[type]),
mPurgeDays(-1), // default to not purging
mOpen(false),
@@ -325,7 +325,7 @@ int AlarmCalendar::load()
return -1;
}
kdDebug(5950) << "AlarmCalendar::load(): --- Downloaded to " << tmpFile << endl;
- mCalendar->setTimeZoneId(TQString::null); // default to the local time zone for reading
+ mCalendar->setTimeZoneId(TQString()); // default to the local time zone for reading
bool loaded = mCalendar->load(tmpFile);
mCalendar->setLocalTime(); // write using local time (i.e. no time zone)
if (!loaded)
@@ -439,14 +439,14 @@ void AlarmCalendar::close()
/******************************************************************************
* Import alarms from an external calendar and merge them into KAlarm's calendar.
* The alarms are given new unique event IDs.
-* Parameters: parent = parent widget for error message boxes
+* Parameters: tqparent = tqparent widget for error message boxes
* Reply = true if all alarms in the calendar were successfully imported
* = false if any alarms failed to be imported.
*/
-bool AlarmCalendar::importAlarms(TQWidget* parent)
+bool AlarmCalendar::importAlarms(TQWidget* tqparent)
{
KURL url = KFileDialog::getOpenURL(TQString::tqfromLatin1(":importalarms"),
- TQString::tqfromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), parent);
+ TQString::tqfromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), tqparent);
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'.").arg(url.prettyURL()));
+ KMessageBox::error(tqparent, i18n("Could not load calendar '%1'.").arg(url.prettyURL()));
return false;
}
}
@@ -477,7 +477,7 @@ 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").arg(url.prettyURL()));
+ KMessageBox::error(tqparent, i18n("Cannot download calendar:\n%1").arg(url.prettyURL()));
return false;
}
kdDebug(5950) << "--- Downloaded to " << filename << endl;
@@ -490,7 +490,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent)
if (!success)
{
kdDebug(5950) << "AlarmCalendar::importAlarms(): error loading calendar '" << filename << "'" << endl;
- KMessageBox::error(parent, i18n("Could not load calendar '%1'.").arg(url.prettyURL()));
+ KMessageBox::error(tqparent, 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::Status type = KAEvent::uidStatus(event->uid());
+ KAEvent::tqStatus type = KAEvent::uidtqStatus(event->uid());
switch (type)
{
case KAEvent::ACTIVE:
@@ -544,7 +544,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent)
if (alarm->type() == Alarm::Display && alarm->text().isEmpty())
alarm->setText(newev->summary());
}
- newev->setSummary(TQString::null); // KAlarm only uses summary for template names
+ newev->setSummary(TQString()); // KAlarm only uses summary for template names
}
// Give the event a new ID and add it to the calendar
newev->setUid(KAEvent::uid(CalFormat::createUniqueId(), type));
@@ -807,9 +807,9 @@ bool AlarmCalendar::deleteEvent(const TQString& eventID, bool saveit)
/******************************************************************************
* Emit a signal to indicate whether the calendar is empty.
*/
-void AlarmCalendar::emitEmptyStatus()
+void AlarmCalendar::emitEmptytqStatus()
{
- emit emptyStatus(events().isEmpty());
+ emit emptytqStatus(events().isEmpty());
}
/******************************************************************************