diff options
Diffstat (limited to 'kradio3/plugins/timecontrol')
-rw-r--r-- | kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui | 88 | ||||
-rw-r--r-- | kradio3/plugins/timecontrol/timecontrol-configuration.cpp | 84 | ||||
-rw-r--r-- | kradio3/plugins/timecontrol/timecontrol-configuration.h | 15 | ||||
-rw-r--r-- | kradio3/plugins/timecontrol/timecontrol.cpp | 46 | ||||
-rw-r--r-- | kradio3/plugins/timecontrol/timecontrol.h | 35 |
5 files changed, 135 insertions, 133 deletions
diff --git a/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui b/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui index 8b2b768..c020ed4 100644 --- a/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui +++ b/kradio3/plugins/timecontrol/timecontrol-configuration-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>TimeControlConfigurationUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TimeControlConfigurationUI</cstring> </property> @@ -16,15 +16,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelSleep</cstring> </property> @@ -32,7 +32,7 @@ <string>sleep countdown</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>editSleep</cstring> </property> @@ -62,7 +62,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -85,23 +85,23 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelAlarmList</cstring> </property> @@ -117,7 +117,7 @@ <string>Alarms</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonAlarmNew</cstring> </property> @@ -128,7 +128,7 @@ <iconset>"filenew2"</iconset> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonDeleteAlarm</cstring> </property> @@ -141,38 +141,38 @@ </widget> </hbox> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>listAlarms</cstring> </property> </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout28</cstring> + <cstring>tqlayout28</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout27</cstring> + <cstring>tqlayout27</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelAlarmDate</cstring> </property> @@ -180,22 +180,22 @@ <string>Date</string> </property> </widget> - <widget class="QDateEdit"> + <widget class="TQDateEdit"> <property name="name"> <cstring>editAlarmDate</cstring> </property> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout28</cstring> + <cstring>tqlayout28</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelAlarmTime</cstring> </property> @@ -203,22 +203,22 @@ <string>Time</string> </property> </widget> - <widget class="QTimeEdit"> + <widget class="TQTimeEdit"> <property name="name"> <cstring>editAlarmTime</cstring> </property> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout29</cstring> + <cstring>tqlayout29</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelAlarmVolume</cstring> </property> @@ -226,7 +226,7 @@ <string>Volume</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>editAlarmVolume</cstring> </property> @@ -247,15 +247,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkboxAlarmEnable</cstring> </property> @@ -273,7 +273,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>100</height> @@ -323,7 +323,7 @@ <enum>Multi</enum> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkboxAlarmDaily</cstring> </property> @@ -333,7 +333,7 @@ </widget> </grid> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelStationSelection</cstring> </property> @@ -341,24 +341,24 @@ <string>Radio Station</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>comboStationSelection</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapAlarmStation</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>20</height> @@ -378,7 +378,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>20</height> @@ -387,7 +387,7 @@ </spacer> </hbox> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Start Playing</string> @@ -445,7 +445,7 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> </includes> <pixmapfunction>SmallIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> <includehints> <includehint>klistbox.h</includehint> </includehints> diff --git a/kradio3/plugins/timecontrol/timecontrol-configuration.cpp b/kradio3/plugins/timecontrol/timecontrol-configuration.cpp index 4ea6bce..c49906d 100644 --- a/kradio3/plugins/timecontrol/timecontrol-configuration.cpp +++ b/kradio3/plugins/timecontrol/timecontrol-configuration.cpp @@ -19,14 +19,14 @@ #include <algorithm> using std::sort; -#include <qdatetime.h> -#include <qlistbox.h> -#include <qcombobox.h> -#include <qdatetimeedit.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqdatetime.h> +#include <tqlistbox.h> +#include <tqcombobox.h> +#include <tqdatetimeedit.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klistbox.h> #include <klocale.h> @@ -47,37 +47,37 @@ public: }; -TimeControlConfiguration::TimeControlConfiguration (QWidget *parent) - : TimeControlConfigurationUI(parent), +TimeControlConfiguration::TimeControlConfiguration (TQWidget *tqparent) + : TimeControlConfigurationUI(tqparent), ITimeControlClient(), IRadioClient(), ignoreChanges(false), m_dirty(false) { - QObject::connect(checkboxAlarmDaily, SIGNAL(toggled(bool)), this, SLOT(slotDailyChanged(bool))); - QObject::connect(listWeekdays, SIGNAL(highlighted(int)), this, SLOT(slotWeekdaysChanged())); - QObject::connect(checkboxAlarmEnable, SIGNAL(toggled(bool)), this, SLOT(slotEnabledChanged(bool))); - QObject::connect(comboStationSelection, SIGNAL(highlighted(int)), this, SLOT(slotStationChanged(int))); - QObject::connect(listAlarms, SIGNAL(highlighted(int)), this, SLOT(slotAlarmSelectChanged(int))); - QObject::connect(editAlarmDate, SIGNAL(valueChanged(const QDate &)), this, SLOT(slotDateChanged(const QDate &))); - QObject::connect(editAlarmTime, SIGNAL(valueChanged(const QTime &)), this, SLOT(slotTimeChanged(const QTime &))); - QObject::connect(editAlarmVolume, SIGNAL(valueChanged(int)), this, SLOT(slotVolumeChanged(int))); - QObject::connect(buttonAlarmNew, SIGNAL(clicked()), this, SLOT(slotNewAlarm())); - QObject::connect(buttonDeleteAlarm, SIGNAL(clicked()), this, SLOT(slotDeleteAlarm())); - QObject::connect(comboAlarmType, SIGNAL(highlighted(int)), this, SLOT(slotAlarmTypeChanged(int))); - - QObject::connect(checkboxAlarmDaily, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty())); - QObject::connect(listWeekdays, SIGNAL(selectionChanged()), this, SLOT(slotSetDirty())); - QObject::connect(checkboxAlarmEnable, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty())); - QObject::connect(comboStationSelection, SIGNAL(activated(int)), this, SLOT(slotSetDirty())); - QObject::connect(editAlarmDate, SIGNAL(valueChanged(const QDate &)), this, SLOT(slotSetDirty())); - QObject::connect(editAlarmTime, SIGNAL(valueChanged(const QTime &)), this, SLOT(slotSetDirty())); - QObject::connect(editAlarmVolume, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty())); - QObject::connect(buttonAlarmNew, SIGNAL(clicked()), this, SLOT(slotSetDirty())); - QObject::connect(buttonDeleteAlarm, SIGNAL(clicked()), this, SLOT(slotSetDirty())); - QObject::connect(comboAlarmType, SIGNAL(activated(int)), this, SLOT(slotSetDirty())); - QObject::connect(editSleep, SIGNAL(valueChanged(int)), this, SLOT(slotSetDirty())); + TQObject::connect(checkboxAlarmDaily, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotDailyChanged(bool))); + TQObject::connect(listWeekdays, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotWeekdaysChanged())); + TQObject::connect(checkboxAlarmEnable, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnabledChanged(bool))); + TQObject::connect(comboStationSelection, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotStationChanged(int))); + TQObject::connect(listAlarms, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotAlarmSelectChanged(int))); + TQObject::connect(editAlarmDate, TQT_SIGNAL(valueChanged(const TQDate &)), this, TQT_SLOT(slotDateChanged(const TQDate &))); + TQObject::connect(editAlarmTime, TQT_SIGNAL(valueChanged(const TQTime &)), this, TQT_SLOT(slotTimeChanged(const TQTime &))); + TQObject::connect(editAlarmVolume, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVolumeChanged(int))); + TQObject::connect(buttonAlarmNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewAlarm())); + TQObject::connect(buttonDeleteAlarm, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteAlarm())); + TQObject::connect(comboAlarmType, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotAlarmTypeChanged(int))); + + TQObject::connect(checkboxAlarmDaily, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(listWeekdays, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(checkboxAlarmEnable, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(comboStationSelection, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(editAlarmDate, TQT_SIGNAL(valueChanged(const TQDate &)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(editAlarmTime, TQT_SIGNAL(valueChanged(const TQTime &)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(editAlarmVolume, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(buttonAlarmNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(buttonDeleteAlarm, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(comboAlarmType, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetDirty())); + TQObject::connect(editSleep, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDirty())); } TimeControlConfiguration::~TimeControlConfiguration () @@ -140,7 +140,7 @@ bool TimeControlConfiguration::noticeNextAlarmChanged(const Alarm *) return true; } -bool TimeControlConfiguration::noticeCountdownStarted(const QDateTime &/*end*/) +bool TimeControlConfiguration::noticeCountdownStarted(const TQDateTime &/*end*/) { return false; } @@ -179,7 +179,7 @@ bool TimeControlConfiguration::noticeStationsChanged(const StationList &sl) comboStationSelection->clear(); stationIDs.clear(); comboStationSelection->insertItem(i18n("<don't change>")); - stationIDs.push_back(QString::null); + stationIDs.push_back(TQString()); for (RawStationList::Iterator i(sl.all()); i.current(); ++i) { comboStationSelection->insertItem(i.current()->iconName(), @@ -193,7 +193,7 @@ bool TimeControlConfiguration::noticeStationsChanged(const StationList &sl) // Slots -void TimeControlConfiguration::slotDateChanged( const QDate &d ) +void TimeControlConfiguration::slotDateChanged( const TQDate &d ) { if (ignoreChanges) return; @@ -212,7 +212,7 @@ void TimeControlConfiguration::slotDateChanged( const QDate &d ) } -void TimeControlConfiguration::slotTimeChanged(const QTime &t) +void TimeControlConfiguration::slotTimeChanged(const TQTime &t) { if (ignoreChanges) return; @@ -258,17 +258,17 @@ void TimeControlConfiguration::slotWeekdaysChanged () { if (ignoreChanges) return; - int mask = 0; + int tqmask = 0; for (int i = 0; i < 7; ++i) { if (listWeekdays->isSelected(i)) { - mask |= (1 << i); + tqmask |= (1 << i); } } int idx = listAlarms->currentItem(); if (idx >= 0 && (unsigned)idx < alarms.size()) { Alarm &a = alarms[idx]; - a.setWeekdayMask(mask); + a.setWeekdayMask(tqmask); ignoreChanges = true; bool oldBlock = listAlarms->signalsBlocked(); @@ -355,7 +355,7 @@ void TimeControlConfiguration::slotAlarmSelectChanged(int idx) comboAlarmType ->setCurrentItem(a.alarmType()); int k = 0; - const QString &sID = a.stationID(); + const TQString &sID = a.stationID(); for (int i = 0; !k && i < (int)stationIDs.size(); ++i) if (stationIDs[i] == sID) k = i; comboStationSelection->setCurrentItem(k); @@ -371,7 +371,7 @@ void TimeControlConfiguration::slotAlarmSelectChanged(int idx) void TimeControlConfiguration::slotNewAlarm() { - QDateTime dt(QDateTime::currentDateTime()); + TQDateTime dt(TQDateTime::tqcurrentDateTime()); Alarm a(dt, false, false); alarms.push_back(a); listAlarms->insertItem(a.alarmTime().toString()); diff --git a/kradio3/plugins/timecontrol/timecontrol-configuration.h b/kradio3/plugins/timecontrol/timecontrol-configuration.h index ac4570f..64d5cb6 100644 --- a/kradio3/plugins/timecontrol/timecontrol-configuration.h +++ b/kradio3/plugins/timecontrol/timecontrol-configuration.h @@ -26,15 +26,16 @@ #include "timecontrol-configuration-ui.h" class TimeControl; -class QWidget; +class TQWidget; class TimeControlConfiguration : public TimeControlConfigurationUI, public ITimeControlClient, public IRadioClient { Q_OBJECT + TQ_OBJECT public : - TimeControlConfiguration (QWidget *parent); + TimeControlConfiguration (TQWidget *tqparent); ~TimeControlConfiguration (); bool connectI (Interface *i); @@ -45,7 +46,7 @@ public : bool noticeAlarmsChanged(const AlarmVector &sl); bool noticeAlarm(const Alarm &); bool noticeNextAlarmChanged(const Alarm *); - bool noticeCountdownStarted(const QDateTime &end); + bool noticeCountdownStarted(const TQDateTime &end); bool noticeCountdownStopped(); bool noticeCountdownZero(); bool noticeCountdownSecondsChanged(int n); @@ -55,7 +56,7 @@ public : bool noticePowerChanged(bool on); bool noticeStationChanged (const RadioStation &, int idx); bool noticeStationsChanged(const StationList &sl); - bool noticePresetFileChanged(const QString &/*f*/) { return false; } + bool noticePresetFileChanged(const TQString &/*f*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; } @@ -66,8 +67,8 @@ protected slots: void slotEnabledChanged (bool enable); void slotStationChanged (int idx); void slotAlarmSelectChanged(int idx); - void slotDateChanged(const QDate &d); - void slotTimeChanged(const QTime &d); + void slotDateChanged(const TQDate &d); + void slotTimeChanged(const TQTime &d); void slotVolumeChanged(int v); void slotAlarmTypeChanged(int idx); @@ -81,7 +82,7 @@ protected slots: protected: AlarmVector alarms; - vector<QString> stationIDs; + vector<TQString> stationIDs; bool ignoreChanges; bool m_dirty; 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()); diff --git a/kradio3/plugins/timecontrol/timecontrol.h b/kradio3/plugins/timecontrol/timecontrol.h index f38bae9..7d9b946 100644 --- a/kradio3/plugins/timecontrol/timecontrol.h +++ b/kradio3/plugins/timecontrol/timecontrol.h @@ -18,41 +18,42 @@ #ifndef KRADIO_TIMECONTROL_H #define KRADIO_TIMECONTROL_H -#include <qobject.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqtimer.h> #include "../../src/include/alarm.h" #include "../../src/include/plugins.h" #include "../../src/include/timecontrol_interfaces.h" -// well, it has to be a QObject :( , but only for -// receiving QTimer - timeouts +// well, it has to be a TQObject :( , but only for +// receiving TQTimer - timeouts -class TimeControl : public QObject, +class TimeControl : public TQObject, public PluginBase, public ITimeControl { Q_OBJECT + TQ_OBJECT protected: AlarmVector m_alarms; Alarm const * m_waitingFor; // m_alarmTimer is exactly for this date/time int m_countdownSeconds; // in seconds - QDateTime m_countdownEnd; + TQDateTime m_countdownEnd; - QTimer m_alarmTimer; - QTimer m_countdownTimer; + TQTimer m_alarmTimer; + TQTimer m_countdownTimer; - mutable QDateTime m_nextAlarm_tmp; // used to recognize nextAlarm changes + mutable TQDateTime m_nextAlarm_tmp; // used to recognize nextAlarm changes public: - TimeControl (const QString &name); + TimeControl (const TQString &name); ~TimeControl(); - virtual QString pluginClassName() const { return "TimeControl"; } + virtual TQString pluginClassName() const { return "TimeControl"; } - virtual const QString &name() const { return PluginBase::name(); } - virtual QString &name() { return PluginBase::name(); } + virtual const TQString &name() const { return PluginBase::name(); } + virtual TQString &name() { return PluginBase::name(); } virtual bool connectI (Interface *i); virtual bool disconnectI (Interface *i); @@ -76,18 +77,18 @@ RECEIVERS: bool stopCountdown(); ANSWERS: - QDateTime getNextAlarmTime () const; + TQDateTime getNextAlarmTime () const; const Alarm* getNextAlarm () const; const AlarmVector & getAlarms () const { return m_alarms; } int getCountdownSeconds () const { return m_countdownSeconds; } - QDateTime getCountdownEnd () const; + TQDateTime getCountdownEnd () const; // slots for receiving timeout messages of timers protected slots: - virtual void slotQTimerAlarmTimeout(); - virtual void slotQTimerCountdownTimeout(); + virtual void slotTQTimerAlarmTimeout(); + virtual void slotTQTimerCountdownTimeout(); }; |