diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
commit | 70b9eea2ba01c3691497f49e4c45cb070c16193c (patch) | |
tree | 9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/plugins/radio | |
parent | 998c1384ace4ae4655997c181fa33242148cd0a4 (diff) | |
download | tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip |
TQt4 port kradio
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/radio')
-rw-r--r-- | kradio3/plugins/radio/radio-configuration-ui.ui | 164 | ||||
-rw-r--r-- | kradio3/plugins/radio/radio-configuration.cpp | 200 | ||||
-rw-r--r-- | kradio3/plugins/radio/radio-configuration.h | 27 | ||||
-rw-r--r-- | kradio3/plugins/radio/radio.cpp | 30 | ||||
-rw-r--r-- | kradio3/plugins/radio/radio.h | 34 |
5 files changed, 228 insertions, 227 deletions
diff --git a/kradio3/plugins/radio/radio-configuration-ui.ui b/kradio3/plugins/radio/radio-configuration-ui.ui index eee95e9..e56fc37 100644 --- a/kradio3/plugins/radio/radio-configuration-ui.ui +++ b/kradio3/plugins/radio/radio-configuration-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>RadioConfigurationUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RadioConfigurationUI</cstring> </property> @@ -16,11 +16,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget3</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>stations</cstring> </property> @@ -34,9 +34,9 @@ <property name="margin"> <number>11</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout32</cstring> + <cstring>tqlayout32</cstring> </property> <property name="margin" stdset="0"> <number>6</number> @@ -45,7 +45,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelStationList</cstring> </property> @@ -53,17 +53,17 @@ <string>Stations</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout22</cstring> + <cstring>tqlayout22</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -82,15 +82,15 @@ </sizepolicy> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonNewStation</cstring> </property> @@ -101,7 +101,7 @@ <iconset>"filenew2"</iconset> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonDeleteStation</cstring> </property> @@ -122,14 +122,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonStationUp</cstring> </property> @@ -140,7 +140,7 @@ <iconset>"1uparrow"</iconset> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonStationDown</cstring> </property> @@ -155,15 +155,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonSearchStations</cstring> </property> @@ -179,10 +179,10 @@ <string>&Search Stations</string> </property> <property name="iconSet"> - <iconset>"find"</iconset> + <iconset>"tqfind"</iconset> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonLoadPresets</cstring> </property> @@ -201,7 +201,7 @@ <iconset>"fileopen"</iconset> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonStorePresets</cstring> </property> @@ -226,19 +226,19 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>stackStationEdit</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>page</cstring> </property> @@ -247,15 +247,15 @@ </attribute> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelStationName</cstring> </property> @@ -263,7 +263,7 @@ <string>Name</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>editStationName</cstring> </property> @@ -278,15 +278,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout32</cstring> + <cstring>tqlayout32</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelStationShortName</cstring> </property> @@ -294,7 +294,7 @@ <string>Short Name</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>editStationShortName</cstring> </property> @@ -309,15 +309,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelPixmapFile</cstring> </property> @@ -325,15 +325,15 @@ <string>Pixmap File</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>editPixmapFile</cstring> </property> @@ -346,7 +346,7 @@ </sizepolicy> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonSelectPixmapFile</cstring> </property> @@ -358,7 +358,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -375,15 +375,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapStation</cstring> </property> @@ -395,7 +395,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>20</height> @@ -415,7 +415,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>5</height> @@ -434,22 +434,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <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="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>editVolumePreset</cstring> </property> @@ -463,7 +463,7 @@ <number>-1</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelVolumePreset</cstring> </property> @@ -481,7 +481,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -492,15 +492,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>editLabelPresetFile</cstring> </property> @@ -517,7 +517,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>About</cstring> </property> @@ -541,22 +541,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>labelCity</cstring> </property> @@ -564,12 +564,12 @@ <string>City</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>editCountry</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>labelCountry</cstring> </property> @@ -577,15 +577,15 @@ <string>Country</string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QDateTimeEdit"> + <widget class="TQDateTimeEdit"> <property name="name"> <cstring>editLastChange</cstring> </property> @@ -601,7 +601,7 @@ <enum>StrongFocus</enum> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonLastChangeNow</cstring> </property> @@ -619,7 +619,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>labelComment</cstring> </property> @@ -627,12 +627,12 @@ <string>Comment</string> </property> </widget> - <widget class="QLineEdit" row="5" column="1"> + <widget class="TQLineEdit" row="5" column="1"> <property name="name"> <cstring>editComment</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>labelMedia</cstring> </property> @@ -640,7 +640,7 @@ <string>Media</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>labelMaintainer</cstring> </property> @@ -648,12 +648,12 @@ <string>Maintainer</string> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>editCity</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>labelLastChange</cstring> </property> @@ -661,12 +661,12 @@ <string>Last Change</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>editMaintainer</cstring> </property> </widget> - <widget class="QLineEdit" row="4" column="1"> + <widget class="TQLineEdit" row="4" column="1"> <property name="name"> <cstring>editMedia</cstring> </property> @@ -683,21 +683,21 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string><p align="center">Click on the link below to contribute this station preset file to the kradio project.</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> @@ -705,7 +705,7 @@ <property name="name"> <cstring>mailLabel</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -760,11 +760,11 @@ </tabstops> <includes> <include location="global" impldecl="in implementation">kiconloader.h</include> - <include location="global" impldecl="in implementation">qwidgetstack.h</include> + <include location="global" impldecl="in implementation">tqwidgetstack.h</include> <include location="global" impldecl="in implementation">src/include/radiostation-listview.h</include> </includes> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> <includehints> <includehint>src/include/radiostation-listview.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/kradio3/plugins/radio/radio-configuration.cpp b/kradio3/plugins/radio/radio-configuration.cpp index 321d17c..f28b933 100644 --- a/kradio3/plugins/radio/radio-configuration.cpp +++ b/kradio3/plugins/radio/radio-configuration.cpp @@ -28,82 +28,82 @@ #include <math.h> -#include <qlistbox.h> +#include <tqlistbox.h> #include <klistbox.h> -#include <qdatetimeedit.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qpushbutton.h> -#include <qpopupmenu.h> -#include <qtoolbutton.h> -#include <qwidgetstack.h> -#include <qimage.h> +#include <tqdatetimeedit.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> +#include <tqpopupmenu.h> +#include <tqtoolbutton.h> +#include <tqwidgetstack.h> +#include <tqimage.h> #include <kfiledialog.h> #include <kstandarddirs.h> #include <kurllabel.h> -#include <qregexp.h> +#include <tqregexp.h> #include <krun.h> #include <kurlrequester.h> #include <klocale.h> -RadioConfiguration::RadioConfiguration (QWidget *parent, const IErrorLogClient &logger) - : RadioConfigurationUI(parent), +RadioConfiguration::RadioConfiguration (TQWidget *tqparent, const IErrorLogClient &logger) + : RadioConfigurationUI(tqparent), ignoreChanges(false), devicePopup(NULL), m_logger(logger), m_dirty(true) { - QObject::connect(listStations, SIGNAL(sigCurrentStationChanged(int)), - this, SLOT(slotStationSelectionChanged(int))); - QObject::connect(buttonSelectPixmapFile, SIGNAL(clicked()), - this, SLOT(slotSelectPixmap())); - QObject::connect(buttonNewStation, SIGNAL(clicked()), - this, SLOT(slotNewStation())); - QObject::connect(buttonDeleteStation, SIGNAL(clicked()), - this, SLOT(slotDeleteStation())); - QObject::connect(editPixmapFile, SIGNAL(textChanged(const QString &)), - this, SLOT(slotPixmapChanged(const QString &))); - QObject::connect(editStationName, SIGNAL(textChanged(const QString &)), - this, SLOT(slotStationNameChanged(const QString &))); - QObject::connect(editStationShortName, SIGNAL(textChanged(const QString &)), - this, SLOT(slotStationShortNameChanged(const QString &))); - QObject::connect(editVolumePreset, SIGNAL(valueChanged(int)), - this, SLOT(slotVolumePresetChanged(int))); - QObject::connect(buttonStationUp, SIGNAL(clicked()), - this, SLOT(slotStationUp())); - QObject::connect(buttonStationDown, SIGNAL(clicked()), - this, SLOT(slotStationDown())); - QObject::connect(listStations, SIGNAL(sigStationActivated(int)), - this, SLOT(slotActivateStation( int ))); - QObject::connect(buttonLoadPresets, SIGNAL(clicked()), - this, SLOT(slotLoadPresets())); - QObject::connect(buttonStorePresets, SIGNAL(clicked()), - this, SLOT(slotStorePresets())); - QObject::connect(buttonLastChangeNow, SIGNAL(clicked()), - this, SLOT(slotLastChangeNow())); - - connect(editMaintainer, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty())); - connect(editLastChange, SIGNAL(valueChanged(const QDateTime &)), SLOT(slotSetDirty())); - connect(editCountry, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty())); - connect(editCity, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty())); - connect(editMedia, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty())); - connect(editComment, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty())); - connect(editPresetFile, SIGNAL(textChanged(const QString &)), SLOT(slotSetDirty())); + TQObject::connect(listStations, TQT_SIGNAL(sigCurrentStationChanged(int)), + this, TQT_SLOT(slotStationSelectionChanged(int))); + TQObject::connect(buttonSelectPixmapFile, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSelectPixmap())); + TQObject::connect(buttonNewStation, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewStation())); + TQObject::connect(buttonDeleteStation, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteStation())); + TQObject::connect(editPixmapFile, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotPixmapChanged(const TQString &))); + TQObject::connect(editStationName, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotStationNameChanged(const TQString &))); + TQObject::connect(editStationShortName, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotStationShortNameChanged(const TQString &))); + TQObject::connect(editVolumePreset, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVolumePresetChanged(int))); + TQObject::connect(buttonStationUp, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotStationUp())); + TQObject::connect(buttonStationDown, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotStationDown())); + TQObject::connect(listStations, TQT_SIGNAL(sigStationActivated(int)), + this, TQT_SLOT(slotActivateStation( int ))); + TQObject::connect(buttonLoadPresets, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLoadPresets())); + TQObject::connect(buttonStorePresets, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotStorePresets())); + TQObject::connect(buttonLastChangeNow, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLastChangeNow())); + + connect(editMaintainer, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty())); + connect(editLastChange, TQT_SIGNAL(valueChanged(const TQDateTime &)), TQT_SLOT(slotSetDirty())); + connect(editCountry, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty())); + connect(editCity, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty())); + connect(editMedia, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty())); + connect(editComment, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty())); + connect(editPresetFile, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotSetDirty())); mailLabel->setText("mailto:[email protected]"); mailLabel->setURL ("mailto:[email protected]"); - QObject::connect(mailLabel, SIGNAL(leftClickedURL(const QString &)), - this, SLOT(slotSendPresetsByMail(const QString &))); + TQObject::connect(mailLabel, TQT_SIGNAL(leftClickedURL(const TQString &)), + this, TQT_SLOT(slotSendPresetsByMail(const TQString &))); - QObject::connect(buttonSearchStations, SIGNAL(clicked()), - this, SLOT(slotSearchStations0())); + TQObject::connect(buttonSearchStations, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSearchStations0())); - devicePopup = new QPopupMenu(buttonSearchStations); + devicePopup = new TQPopupMenu(buttonSearchStations); buttonSearchStations->setPopup(devicePopup); - QObject::connect(devicePopup, SIGNAL(activated(int)), - this, SLOT(slotSearchStations(int))); + TQObject::connect(devicePopup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSearchStations(int))); } @@ -130,9 +130,9 @@ bool RadioConfiguration::disconnectI (Interface *i) // IRadioDevicePoolClient -bool RadioConfiguration::noticeDevicesChanged(const QPtrList<IRadioDevice> &l) +bool RadioConfiguration::noticeDevicesChanged(const TQPtrList<IRadioDevice> &l) { - QPtrListIterator<IRadioDevice> it(l); + TQPtrListIterator<IRadioDevice> it(l); devices.clear(); devicePopup->clear(); int id = 0; @@ -147,7 +147,7 @@ bool RadioConfiguration::noticeDevicesChanged(const QPtrList<IRadioDevice> &l) } -bool RadioConfiguration::noticeDeviceDescriptionChanged(const QString &) +bool RadioConfiguration::noticeDeviceDescriptionChanged(const TQString &) { noticeDevicesChanged(queryDevices()); return true; @@ -181,7 +181,7 @@ bool RadioConfiguration::noticeStationsChanged(const StationList &sl) } -bool RadioConfiguration::noticePresetFileChanged(const QString &f) +bool RadioConfiguration::noticePresetFileChanged(const TQString &f) { ignoreChanges = true; editPresetFile->setURL(f); @@ -215,12 +215,12 @@ void RadioConfiguration::slotStationSelectionChanged(int idx) if (ignoreChanges) return; ignoreChanges = true; - editStationName ->setText (s ? s->name() : QString::null); - editStationShortName ->setText (s ? s->shortName() : QString::null); - editPixmapFile ->setText (s ? s->iconName() : QString::null); + editStationName ->setText (s ? s->name() : TQString()); + editStationShortName ->setText (s ? s->shortName() : TQString()); + editPixmapFile ->setText (s ? s->iconName() : TQString()); editVolumePreset ->setValue (s ? (int)rint(s->initialVolume()*100) : -1); - QPixmap pixmap(s ? s->iconName() : QString::null); + TQPixmap pixmap(s ? s->iconName() : TQString()); if (!pixmap.isNull()) { pixmapStation->setPixmap(pixmap); } else { @@ -230,13 +230,13 @@ void RadioConfiguration::slotStationSelectionChanged(int idx) stackStationEdit->setDisabled(!s); if (s) { - RadioStationConfig *c = stationEditors.find(s->getClassName()); + RadioStationConfig *c = stationEditors.tqfind(s->getClassName()); if (!c) { c = s->createEditor(); if (c) { - c->reparent(this, QPoint(0,0), true); - QObject::connect(c, SIGNAL(changed(RadioStationConfig*)), - this, SLOT(slotStationEditorChanged(RadioStationConfig*))); + c->reparent(this, TQPoint(0,0), true); + TQObject::connect(c, TQT_SIGNAL(changed(RadioStationConfig*)), + this, TQT_SLOT(slotStationEditorChanged(RadioStationConfig*))); stationEditors.insert(s->getClassName(), c); stackStationEdit->addWidget(c); } @@ -306,7 +306,7 @@ void RadioConfiguration::slotStationEditorChanged(RadioStationConfig *c) } -void RadioConfiguration::slotStationNameChanged( const QString & s) +void RadioConfiguration::slotStationNameChanged( const TQString & s) { if (ignoreChanges) return; @@ -325,7 +325,7 @@ void RadioConfiguration::slotStationNameChanged( const QString & s) } -void RadioConfiguration::slotStationShortNameChanged( const QString & sn) +void RadioConfiguration::slotStationShortNameChanged( const TQString & sn) { if (ignoreChanges) return; @@ -346,7 +346,7 @@ void RadioConfiguration::slotStationShortNameChanged( const QString & sn) void RadioConfiguration::slotSelectPixmap() { - KURL url = KFileDialog::getImageOpenURL(QString::null, this, + KURL url = KFileDialog::getImageOpenURL(TQString(), this, i18n("Image Selection")); if (!url.isEmpty()) { if (url.isLocalFile()) { @@ -358,7 +358,7 @@ void RadioConfiguration::slotSelectPixmap() } -void RadioConfiguration::slotPixmapChanged( const QString &s ) +void RadioConfiguration::slotPixmapChanged( const TQString &s ) { if (ignoreChanges) return; @@ -368,7 +368,7 @@ void RadioConfiguration::slotPixmapChanged( const QString &s ) RadioStation &st = m_stations.at(idx); st.setIconName(s); ignoreChanges = true; - pixmapStation->setPixmap(QPixmap(s)); + pixmapStation->setPixmap(TQPixmap(s)); bool o = listStations->signalsBlocked(); listStations->blockSignals(true); listStations->setStation(idx, st); @@ -454,7 +454,7 @@ void RadioConfiguration::slotLoadPresets() fd.setMode(KFile::File | KFile::ExistingOnly); fd.setCaption (i18n("Select Preset File")); - if (fd.exec() == QDialog::Accepted) { + if (fd.exec() == TQDialog::Accepted) { slotSetDirty(); StationList sl; if (sl.readXML(fd.selectedURL(), m_logger)) { @@ -474,7 +474,7 @@ void RadioConfiguration::slotStorePresets() fd.setMode(KFile::File); fd.setCaption (i18n("Store Preset File")); - if (fd.exec() == QDialog::Accepted) { + if (fd.exec() == TQDialog::Accepted) { editPresetFile->setURL(fd.selectedURL().url()); m_stations.writeXML(fd.selectedURL(), m_logger); } @@ -484,46 +484,46 @@ void RadioConfiguration::slotStorePresets() void RadioConfiguration::slotLastChangeNow() { slotSetDirty(); - editLastChange->setDateTime(QDateTime::currentDateTime()); + editLastChange->setDateTime(TQDateTime::tqcurrentDateTime()); } -static QString &urlEscapes(QString &s) +static TQString &urlEscapes(TQString &s) { - s.replace(QRegExp("%"), "%25"); - s.replace(QRegExp("\t"), "%09"); - s.replace(QRegExp("\n"), "%0A"); - s.replace(QRegExp("\n"), "%0D"); - s.replace(QRegExp(" "), "%20"); - s.replace(QRegExp("\\!"), "%21"); - s.replace(QRegExp("\""), "%22"); - s.replace(QRegExp("#"), "%23"); - s.replace(QRegExp("\\$"), "%24"); - s.replace(QRegExp("\\&"), "%26"); - s.replace(QRegExp("'"), "%27"); - s.replace(QRegExp(","), "%2C"); - s.replace(QRegExp(":"), "%3A"); - s.replace(QRegExp(";"), "%3B"); - s.replace(QRegExp("="), "%3D"); - s.replace(QRegExp("\\?"), "%3F"); + s.tqreplace(TQRegExp("%"), "%25"); + s.tqreplace(TQRegExp("\t"), "%09"); + s.tqreplace(TQRegExp("\n"), "%0A"); + s.tqreplace(TQRegExp("\n"), "%0D"); + s.tqreplace(TQRegExp(" "), "%20"); + s.tqreplace(TQRegExp("\\!"), "%21"); + s.tqreplace(TQRegExp("\""), "%22"); + s.tqreplace(TQRegExp("#"), "%23"); + s.tqreplace(TQRegExp("\\$"), "%24"); + s.tqreplace(TQRegExp("\\&"), "%26"); + s.tqreplace(TQRegExp("'"), "%27"); + s.tqreplace(TQRegExp(","), "%2C"); + s.tqreplace(TQRegExp(":"), "%3A"); + s.tqreplace(TQRegExp(";"), "%3B"); + s.tqreplace(TQRegExp("="), "%3D"); + s.tqreplace(TQRegExp("\\?"), "%3F"); return s; } -void RadioConfiguration::slotSendPresetsByMail( const QString &url ) +void RadioConfiguration::slotSendPresetsByMail( const TQString &url ) { - QString presets = m_stations.writeXML(m_logger); + TQString presets = m_stations.writeXML(m_logger); urlEscapes(presets); // documentation says, krun object deletes itself, // so we do not need to store the pointer - QString country = m_stations.metaData().country; - QString city = m_stations.metaData().city; - QString location = city + "/" + country; + TQString country = m_stations.metaData().country; + TQString city = m_stations.metaData().city; + TQString location = city + "/" + country; urlEscapes(location); - QString cmd = url + "?subject=station preset file for " + location + "&body="; + TQString cmd = url + "?subject=station preset file for " + location + "&body="; cmd += presets; new KRun (cmd); @@ -541,7 +541,7 @@ void RadioConfiguration::slotSearchStations(int idev) sendActiveDevice(dev); x->show(); x->start(); - if (x->exec() == QDialog::Accepted) { + if (x->exec() == TQDialog::Accepted) { slotSetDirty(); m_stations.merge(x->getStations()); noticeStationsChanged(m_stations); diff --git a/kradio3/plugins/radio/radio-configuration.h b/kradio3/plugins/radio/radio-configuration.h index 31b29c8..b9c52b0 100644 --- a/kradio3/plugins/radio/radio-configuration.h +++ b/kradio3/plugins/radio/radio-configuration.h @@ -22,14 +22,14 @@ #include <config.h> #endif -#include <qdict.h> +#include <tqdict.h> #include "../../src/include/radio_interfaces.h" #include "../../src/include/stationlist.h" #include "../../src/include/radiodevicepool_interfaces.h" #include "radio-configuration-ui.h" -class QPopupMenu; +class TQPopupMenu; class RadioStationConfig; class RadioConfiguration : public RadioConfigurationUI, @@ -37,8 +37,9 @@ class RadioConfiguration : public RadioConfigurationUI, public IRadioDevicePoolClient { Q_OBJECT + TQ_OBJECT public : - RadioConfiguration (QWidget *parent, const IErrorLogClient &m_logger); + RadioConfiguration (TQWidget *tqparent, const IErrorLogClient &m_logger); ~RadioConfiguration (); bool connectI (Interface *i); @@ -48,8 +49,8 @@ public : RECEIVERS: bool noticeActiveDeviceChanged(IRadioDevice *) { return false; } - bool noticeDevicesChanged(const QPtrList<IRadioDevice> &); - bool noticeDeviceDescriptionChanged(const QString &); + bool noticeDevicesChanged(const TQPtrList<IRadioDevice> &); + bool noticeDeviceDescriptionChanged(const TQString &); // IRadioClient @@ -57,7 +58,7 @@ RECEIVERS: bool noticePowerChanged(bool /*on*/) { return false; } // don't care bool noticeStationChanged (const RadioStation &, int /*idx*/) { return false; } // don't care bool noticeStationsChanged(const StationList &sl); - bool noticePresetFileChanged(const QString &f); + bool noticePresetFileChanged(const TQString &f); bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; } @@ -67,9 +68,9 @@ protected slots: void slotNewStation(); void slotDeleteStation(); void slotStationEditorChanged(RadioStationConfig *c); - void slotStationNameChanged( const QString & s); - void slotStationShortNameChanged( const QString & sn); - void slotPixmapChanged( const QString &s ); + void slotStationNameChanged( const TQString & s); + void slotStationShortNameChanged( const TQString & sn); + void slotPixmapChanged( const TQString &s ); void slotSelectPixmap(); void slotVolumePresetChanged(int v); void slotStationUp(); @@ -78,7 +79,7 @@ protected slots: void slotLoadPresets(); void slotStorePresets(); void slotLastChangeNow(); - void slotSendPresetsByMail( const QString &url ); + void slotSendPresetsByMail( const TQString &url ); void slotSearchStations(int i); void slotSearchStations0() { slotSearchStations(0); } @@ -93,10 +94,10 @@ protected: StationList m_stations; bool ignoreChanges; - QPopupMenu *devicePopup; - QPtrList<IRadioDevice> devices; + TQPopupMenu *devicePopup; + TQPtrList<IRadioDevice> devices; - QDict<RadioStationConfig> stationEditors; + TQDict<RadioStationConfig> stationEditors; const IErrorLogClient &m_logger; bool m_dirty; diff --git a/kradio3/plugins/radio/radio.cpp b/kradio3/plugins/radio/radio.cpp index 2320f56..af14e66 100644 --- a/kradio3/plugins/radio/radio.cpp +++ b/kradio3/plugins/radio/radio.cpp @@ -35,7 +35,7 @@ PLUGIN_LIBRARY_FUNCTIONS(Radio, "kradio-radio", i18n("Central Radio Device Multi ///////////////////////////////////////////////////////////////////////////// -Radio::Radio(const QString &name) +Radio::Radio(const TQString &name) : PluginBase(name, i18n("Radio Multiplexer Plugin")), IRadioDeviceClient(-1), m_presetFile(locateLocal("data", "kradio/stations.krp")), @@ -79,7 +79,7 @@ bool Radio::disconnectI (Interface *i) void Radio::saveState (KConfig *config) const { - config->setGroup(QString("radio-") + name()); + config->setGroup(TQString("radio-") + name()); config->writeEntry("presetfile", m_presetFile); @@ -89,10 +89,10 @@ void Radio::saveState (KConfig *config) const void Radio::restoreState (KConfig *config) { - config->setGroup(QString("radio-") + name()); + config->setGroup(TQString("radio-") + name()); m_presetFile = config->readEntry("presetfile", - QString::null); + TQString()); bool first_restore = false; if (m_presetFile.isNull() || m_presetFile.length() == 0) { m_presetFile = locateLocal("data", "kradio/stations.krp"); @@ -205,7 +205,7 @@ bool Radio::setStations(const StationList &sl) return true; } -bool Radio::setPresetFile(const QString &presetFile) +bool Radio::setPresetFile(const TQString &presetFile) { if (m_presetFile != presetFile) { m_presetFile = presetFile; @@ -217,7 +217,7 @@ bool Radio::setPresetFile(const QString &presetFile) int Radio::getStationIdx(const RadioStation &rs) const { RawStationList &sl = const_cast<RawStationList&>(m_stationList.all()); - return sl.find(&rs); + return sl.tqfind(&rs); } int Radio::getCurrentStationIdx() const @@ -245,7 +245,7 @@ bool Radio::setActiveDevice(IRadioDevice *rd, bool keepPower) // check if new station is in "connections" // special case: rd == NULL: power off active device, new active device = NULL - if (!rd || IRadioDeviceClient::iConnections.containsRef(rd)) { // new device is ok + if (!rd || IRadioDeviceClient::iConnections.tqcontainsRef(rd)) { // new device is ok // save old power state and power off old device bool oldPowerOn = false; @@ -280,13 +280,13 @@ IRadioDevice *Radio::getActiveDevice() const } -const QPtrList<IRadioDevice> &Radio::getDevices() const +const TQPtrList<IRadioDevice> &Radio::getDevices() const { return IRadioDeviceClient::iConnections; } -const QString &Radio::getDeviceDescription() const +const TQString &Radio::getDeviceDescription() const { return queryDescription(); } @@ -348,9 +348,9 @@ const RadioStation & Radio::queryCurrentStation() const } -static QString qstrUnknown(I18N_NOOP("unknown")); -static QString i18nqstrUnknown; -const QString &Radio::queryDescription() const +static TQString qstrUnknown(I18N_NOOP("unknown")); +static TQString i18nqstrUnknown; +const TQString &Radio::queryDescription() const { return m_activeDevice ? m_activeDevice->getDescription() : (i18nqstrUnknown = i18n(qstrUnknown.ascii())); } @@ -392,7 +392,7 @@ bool Radio::noticeStationChanged (const RadioStation &_rs, const IRadioDevice *s } -bool Radio::noticeDescriptionChanged (const QString &s, const IRadioDevice *sender) +bool Radio::noticeDescriptionChanged (const TQString &s, const IRadioDevice *sender) { if (sender == m_activeDevice) notifyDeviceDescriptionChanged(s); @@ -433,13 +433,13 @@ void Radio::noticeDisconnectI(IRadioDeviceClient::cmplInterface *rd, bool pointe if (rd == m_activeDevice) { // search a new active device - if (IRadioDeviceClient::iConnections.findRef(rd) >= 0) { + if (IRadioDeviceClient::iConnections.tqfindRef(rd) >= 0) { IRadioDevice *new_rd = NULL; new_rd = IRadioDeviceClient::iConnections.next(); // choose next device as active device if next exists if (!new_rd) { - IRadioDeviceClient::iConnections.findRef(rd); + IRadioDeviceClient::iConnections.tqfindRef(rd); new_rd = IRadioDeviceClient::iConnections.prev(); // otherwise try prev then, may be NULL (no connections) } setActiveDevice(new_rd); diff --git a/kradio3/plugins/radio/radio.h b/kradio3/plugins/radio/radio.h index 7913c16..d125eee 100644 --- a/kradio3/plugins/radio/radio.h +++ b/kradio3/plugins/radio/radio.h @@ -56,7 +56,7 @@ class Radio : public PluginBase, public ISoundStreamClient { public: - Radio(const QString &name); + Radio(const TQString &name); ~Radio(); @@ -66,10 +66,10 @@ public: virtual void saveState (KConfig *) const; virtual void restoreState (KConfig *); - virtual QString pluginClassName() const { return "Radio"; } + virtual TQString pluginClassName() const { return "Radio"; } - 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 ConfigPageInfo createConfigurationPage(); virtual AboutPageInfo createAboutPage(); @@ -84,7 +84,7 @@ RECEIVERS: bool activateStation(const RadioStation &rs); bool activateStation(int index); bool setStations(const StationList &sl); - bool setPresetFile(const QString &presetFile); + bool setPresetFile(const TQString &presetFile); ANSWERS: bool isPowerOn() const { return queryIsPowerOn(); } @@ -93,7 +93,7 @@ ANSWERS: int getStationIdx(const RadioStation &) const; int getCurrentStationIdx() const; const StationList & getStations() const { return m_stationList; } - const QString & getPresetFile() const { return m_presetFile; } + const TQString & getPresetFile() const { return m_presetFile; } SoundStreamID getCurrentSoundStreamID() const; @@ -112,8 +112,8 @@ RECEIVERS: ANSWERS: IRadioDevice * getActiveDevice() const; - const QPtrList<IRadioDevice> & getDevices() const; - const QString & getDeviceDescription() const; + const TQPtrList<IRadioDevice> & getDevices() const; + const TQString & getDeviceDescription() const; @@ -125,17 +125,17 @@ SENDERS: IF_SENDER ( sendPowerOff() ) IF_SENDER ( sendActivateStation (const RadioStation &rs) ) -QUERIES: - IF_QUERY ( bool queryIsPowerOn() ) - IF_QUERY ( bool queryIsPowerOff() ) - IF_QUERY ( const RadioStation & queryCurrentStation() ) - IF_QUERY ( const QString & queryDescription() ) - IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ) +TQUERIES: + IF_TQUERY ( bool queryIsPowerOn() ) + IF_TQUERY ( bool queryIsPowerOff() ) + IF_TQUERY ( const RadioStation & queryCurrentStation() ) + IF_TQUERY ( const TQString & queryDescription() ) + IF_TQUERY ( SoundStreamID queryCurrentSoundStreamID() ) RECEIVERS: virtual bool noticePowerChanged (bool on, const IRadioDevice *sender = NULL); virtual bool noticeStationChanged (const RadioStation &rs, const IRadioDevice *sender = NULL); - virtual bool noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL); + virtual bool noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL); virtual bool noticeCurrentSoundStreamIDChanged(SoundStreamID id, const IRadioDevice *sender = NULL); @@ -145,7 +145,7 @@ RECEIVERS: bool noticeAlarmsChanged(const AlarmVector &) { return false; } // ignore bool noticeAlarm(const Alarm &); bool noticeNextAlarmChanged(const Alarm *) { return false; } // ignore - bool noticeCountdownStarted(const QDateTime &/*end*/){ return false; } // ignore + bool noticeCountdownStarted(const TQDateTime &/*end*/){ return false; } // ignore bool noticeCountdownStopped() { return false; } // ignore bool noticeCountdownZero(); bool noticeCountdownSecondsChanged(int /*n*/) { return false; } // ignore @@ -158,7 +158,7 @@ RECEIVERS: protected: - QString m_presetFile; + TQString m_presetFile; StationList m_stationList; IRadioDevice *m_activeDevice; }; |