summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/timecontrol/timecontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kradio3/plugins/timecontrol/timecontrol.cpp')
-rw-r--r--kradio3/plugins/timecontrol/timecontrol.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kradio3/plugins/timecontrol/timecontrol.cpp b/kradio3/plugins/timecontrol/timecontrol.cpp
index 42441ac..f6525b4 100644
--- a/kradio3/plugins/timecontrol/timecontrol.cpp
+++ b/kradio3/plugins/timecontrol/timecontrol.cpp
@@ -44,15 +44,15 @@ PLUGIN_LIBRARY_FUNCTIONS(TimeControl, "kradio-timecontrol", i18n("Time Control a
///////////////////////////////////////////////////////////////////////
-TimeControl::TimeControl (const QString &n)
+TimeControl::TimeControl (const TQString &n)
: PluginBase(n, i18n("TimeControl Plugin")),
m_waitingFor(NULL),
m_countdownSeconds(0),
m_alarmTimer(this),
m_countdownTimer(this)
{
- QObject::connect(&m_alarmTimer, SIGNAL(timeout()), this, SLOT(slotQTimerAlarmTimeout()));
- QObject::connect(&m_countdownTimer, SIGNAL(timeout()), this, SLOT(slotQTimerCountdownTimeout()));
+ TQObject::connect(&m_alarmTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTQTimerAlarmTimeout()));
+ TQObject::connect(&m_countdownTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTQTimerCountdownTimeout()));
}
@@ -82,7 +82,7 @@ bool TimeControl::setAlarms (const AlarmVector &al)
m_alarms = al;
- slotQTimerAlarmTimeout();
+ slotTQTimerAlarmTimeout();
notifyAlarmsChanged(m_alarms);
}
@@ -102,7 +102,7 @@ bool TimeControl::setCountdownSeconds(int n)
bool TimeControl::startCountdown()
{
- m_countdownEnd = QDateTime::currentDateTime().addSecs(m_countdownSeconds);
+ m_countdownEnd = TQDateTime::tqcurrentDateTime().addSecs(m_countdownSeconds);
m_countdownTimer.start(m_countdownSeconds * 1000, true);
notifyCountdownStarted(getCountdownEnd());
@@ -114,7 +114,7 @@ bool TimeControl::startCountdown()
bool TimeControl::stopCountdown()
{
m_countdownTimer.stop();
- m_countdownEnd = QDateTime();
+ m_countdownEnd = TQDateTime();
notifyCountdownStopped();
@@ -122,32 +122,32 @@ bool TimeControl::stopCountdown()
}
-QDateTime TimeControl::getNextAlarmTime() const
+TQDateTime TimeControl::getNextAlarmTime() const
{
const Alarm *a = getNextAlarm();
if (a)
return a->nextAlarm();
else
- return QDateTime();
+ return TQDateTime();
}
const Alarm *TimeControl::getNextAlarm () const
{
- QDateTime now = QDateTime::currentDateTime(),
+ TQDateTime now = TQDateTime::tqcurrentDateTime(),
next;
const Alarm *retval = NULL;
for (ciAlarmVector i = m_alarms.begin(); i != m_alarms.end(); ++i) {
- QDateTime n = i->nextAlarm();
+ TQDateTime n = i->nextAlarm();
if (n.isValid() && n > now && ( ! next.isValid() || n < next)) {
next = n;
retval = &(*i);
}
}
- QDateTime old = m_nextAlarm_tmp;
+ TQDateTime old = m_nextAlarm_tmp;
m_nextAlarm_tmp = next;
if (old != m_nextAlarm_tmp) {
notifyNextAlarmChanged(retval);
@@ -157,16 +157,16 @@ const Alarm *TimeControl::getNextAlarm () const
}
-QDateTime TimeControl::getCountdownEnd () const
+TQDateTime TimeControl::getCountdownEnd () const
{
if (m_countdownTimer.isActive())
return m_countdownEnd;
else
- return QDateTime();
+ return TQDateTime();
}
-void TimeControl::slotQTimerCountdownTimeout()
+void TimeControl::slotTQTimerCountdownTimeout()
{
stopCountdown();
@@ -174,15 +174,15 @@ void TimeControl::slotQTimerCountdownTimeout()
}
-void TimeControl::slotQTimerAlarmTimeout()
+void TimeControl::slotTQTimerAlarmTimeout()
{
if (m_waitingFor) {
notifyAlarm(*m_waitingFor);
}
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
Alarm const *n = getNextAlarm();
- QDateTime na = getNextAlarmTime();
+ TQDateTime na = getNextAlarmTime();
m_waitingFor = NULL;
@@ -212,18 +212,18 @@ void TimeControl::restoreState (KConfig *config)
{
AlarmVector al;
- config->setGroup(QString("timecontrol-") + name());
+ config->setGroup(TQString("timecontrol-") + name());
int nAlarms = config->readNumEntry ("nAlarms", 0);
for (int idx = 1; idx <= nAlarms; ++idx) {
- QString num = QString().setNum(idx);
- QDateTime d = config->readDateTimeEntry(AlarmTimeElement + num);
+ TQString num = TQString().setNum(idx);
+ TQDateTime d = config->readDateTimeEntry(AlarmTimeElement + num);
bool enable = config->readBoolEntry(AlarmEnabledElement + num, false);
bool daily = config->readBoolEntry(AlarmDailyElement + num, false);
int weekdayMask = config->readNumEntry(AlarmWeekdayMaskElement + num, 0x7F);
float vol = config->readDoubleNumEntry(AlarmVolumeElement + num, 1);
- QString sid = config->readEntry(AlarmStationIDElement + num, QString::null);
+ TQString sid = config->readEntry(AlarmStationIDElement + num, TQString());
int type = config->readNumEntry(AlarmTypeElement + num, 0);
enable &= d.isValid();
@@ -243,13 +243,13 @@ void TimeControl::restoreState (KConfig *config)
void TimeControl::saveState (KConfig *config) const
{
- config->setGroup(QString("timecontrol-") + name());
+ config->setGroup(TQString("timecontrol-") + name());
config->writeEntry("nAlarms", m_alarms.size());
int idx = 1;
ciAlarmVector end = m_alarms.end();
for (ciAlarmVector i = m_alarms.begin(); i != end; ++i, ++idx) {
- QString num = QString().setNum(idx);
+ TQString num = TQString().setNum(idx);
config->writeEntry (AlarmTimeElement + num, i->alarmTime());
config->writeEntry (AlarmEnabledElement + num, i->isEnabled());
config->writeEntry (AlarmDailyElement + num, i->isDaily());