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/src/include | |
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/src/include')
37 files changed, 532 insertions, 519 deletions
diff --git a/kradio3/src/include/aboutwidget.h b/kradio3/src/include/aboutwidget.h index c2a8562..3ba3573 100644 --- a/kradio3/src/include/aboutwidget.h +++ b/kradio3/src/include/aboutwidget.h @@ -23,27 +23,28 @@ #endif -#include <qwidget.h> +#include <tqwidget.h> /* Unfortunately KDE doesn't provide the class KAboutContainerBase to public programming, so we have to copy most of that code into an own class :( */ -class QFrame; +class TQFrame; class KAboutContainer; -class QTabWidget; -class QVBoxLayout; +class TQTabWidget; +class TQVBoxLayout; class KAboutData; -#include <qlabel.h> +#include <tqlabel.h> // copied (and renamed) from kaboutdialog_private.h // original: KImageTrackLabel -class KRadioImageTrackLabel : public QLabel +class KRadioImageTrackLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: enum MouseMode @@ -55,24 +56,25 @@ class KRadioImageTrackLabel : public QLabel }; public: - KRadioImageTrackLabel( QWidget * parent, const char * name=0, WFlags f=0 ); + KRadioImageTrackLabel( TQWidget * tqparent, const char * name=0, WFlags f=0 ); signals: - void mouseTrack( int mode, const QMouseEvent *e ); + void mouseTrack( int mode, const TQMouseEvent *e ); protected: - virtual void mousePressEvent( QMouseEvent *e ); - virtual void mouseReleaseEvent( QMouseEvent *e ); - virtual void mouseDoubleClickEvent( QMouseEvent *e ); - virtual void mouseMoveEvent ( QMouseEvent *e ); + virtual void mousePressEvent( TQMouseEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent *e ); + virtual void mouseDoubleClickEvent( TQMouseEvent *e ); + virtual void mouseMoveEvent ( TQMouseEvent *e ); }; // copied (and renamed) from kaboutdialog_private.h // original: KAboutContainerBase -class KRadioAboutWidget : public QWidget +class KRadioAboutWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum LayoutType @@ -90,57 +92,57 @@ class KRadioAboutWidget : public QWidget }; public: - KRadioAboutWidget(const KAboutData &abtData, int layoutType, QWidget *parent = 0, char *name = 0); + KRadioAboutWidget(const KAboutData &abtData, int tqlayoutType, TQWidget *tqparent = 0, char *name = 0); virtual void show( void ); - virtual QSize sizeHint( void ) const; + virtual TQSize tqsizeHint( void ) const; void setAboutData(const KAboutData &abtData); - void setTitle( const QString &title ); - void setImage( const QString &fileName ); - void setImageBackgroundColor( const QColor &color ); + void setTitle( const TQString &title ); + void setImage( const TQString &fileName ); + void setImageBackgroundColor( const TQColor &color ); void setImageFrame( bool state ); - void setProduct( const QString &appName, const QString &version, - const QString &author, const QString &year ); + void setProduct( const TQString &appName, const TQString &version, + const TQString &author, const TQString &year ); - QFrame *addTextPage( const QString &title, const QString &text, + TQFrame *addTextPage( const TQString &title, const TQString &text, bool richText=false, int numLines=10 ); - QFrame *addLicensePage( const QString &title, const QString &text, + TQFrame *addLicensePage( const TQString &title, const TQString &text, int numLines=10 ); - KAboutContainer *addContainerPage( const QString &title, + KAboutContainer *addContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); - KAboutContainer *addScrolledContainerPage( const QString &title, + KAboutContainer *addScrolledContainerPage( const TQString &title, int childAlignment = AlignCenter, int innerAlignment = AlignCenter ); - QFrame *addEmptyPage( const QString &title ); + TQFrame *addEmptyPage( const TQString &title ); KAboutContainer *addContainer( int childAlignment, int innerAlignment ); public slots: - virtual void slotMouseTrack( int mode, const QMouseEvent *e ); - virtual void slotUrlClick( const QString &url ); - virtual void slotMailClick( const QString &name, const QString &address ); + virtual void slotMouseTrack( int mode, const TQMouseEvent *e ); + virtual void slotUrlClick( const TQString &url ); + virtual void slotMailClick( const TQString &name, const TQString &address ); protected: - virtual void fontChange( const QFont &oldFont ); + virtual void fontChange( const TQFont &oldFont ); signals: - void mouseTrack( int mode, const QMouseEvent *e ); - void urlClick( const QString &url ); - void mailClick( const QString &name, const QString &address ); + void mouseTrack( int mode, const TQMouseEvent *e ); + void urlClick( const TQString &url ); + void mailClick( const TQString &name, const TQString &address ); private: - QMemArray<QWidget*> mContainerList; + TQMemArray<TQWidget*> mContainerList; - QVBoxLayout *mTopLayout; + TQVBoxLayout *mTopLayout; KRadioImageTrackLabel *mImageLabel; - QLabel *mTitleLabel; - QLabel *mIconLabel; - QLabel *mVersionLabel; - QLabel *mAuthorLabel; - QFrame *mImageFrame; - QTabWidget *mPageTab; - QFrame *mPlainSpace; + TQLabel *mTitleLabel; + TQLabel *mIconLabel; + TQLabel *mVersionLabel; + TQLabel *mAuthorLabel; + TQFrame *mImageFrame; + TQTabWidget *mPageTab; + TQFrame *mPlainSpace; }; diff --git a/kradio3/src/include/alarm.h b/kradio3/src/include/alarm.h index 45cb397..14b4abc 100644 --- a/kradio3/src/include/alarm.h +++ b/kradio3/src/include/alarm.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qdatetime.h> +#include <tqdatetime.h> #include <vector> /** @@ -36,13 +36,13 @@ public: enum AlarmType { StartPlaying, StopPlaying, StartRecording, StopRecording }; protected: - QDateTime m_time; + TQDateTime m_time; bool m_daily; int m_weekdayMask; bool m_enabled; - QString m_stationID; + TQString m_stationID; float m_volumePreset; // < 0: disabled AlarmType m_type; @@ -53,16 +53,16 @@ protected: public: Alarm(); - Alarm(const QDateTime &time, bool daily, bool enabled); + Alarm(const TQDateTime &time, bool daily, bool enabled); Alarm(const Alarm &); ~Alarm(); bool isEnabled() const { return m_enabled; } bool isDaily() const { return m_daily; } int weekdayMask() const { return m_weekdayMask; } - QDateTime alarmTime () const { return m_time; } - QDateTime nextAlarm (bool ignoreEnable = false) const; - const QString &stationID () const { return m_stationID; } + TQDateTime alarmTime () const { return m_time; } + TQDateTime nextAlarm (bool ignoreEnable = false) const; + const TQString &stationID () const { return m_stationID; } float volumePreset () const { return m_volumePreset; } AlarmType alarmType() const { return m_type; } @@ -71,10 +71,10 @@ public: void setEnabled (bool enable = true) { m_enabled = enable; } void setDaily (bool d = true) { m_daily = d; } void setWeekdayMask(int m = 0x7F) { m_weekdayMask = m; } - void setDate (const QDate &d) { m_time.setDate(d); } - void setTime (const QTime &d) { m_time.setTime(d); } + void setDate (const TQDate &d) { m_time.setDate(d); } + void setTime (const TQTime &d) { m_time.setTime(d); } void setVolumePreset(float v) { m_volumePreset = v; } - void setStationID(const QString &id) { m_stationID = id;} + void setStationID(const TQString &id) { m_stationID = id;} void setAlarmType(AlarmType t) { m_type = t; } diff --git a/kradio3/src/include/debug-profiler.h b/kradio3/src/include/debug-profiler.h index 969008a..7ceb50d 100644 --- a/kradio3/src/include/debug-profiler.h +++ b/kradio3/src/include/debug-profiler.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> #if (defined __i386__) || (defined __x86_64__) static __inline__ unsigned long long int rdtsc() @@ -45,8 +45,8 @@ public: Profiler(); virtual ~Profiler(); - void startProfile(const QString &descr); - void stopProfile (const QString &descr); + void startProfile(const TQString &descr); + void stopProfile (const TQString &descr); void printData(); @@ -72,7 +72,7 @@ protected: long long maxCounter; }; - QMap<QString, profile_data> m_ProfileData; + TQMap<TQString, profile_data> m_ProfileData; }; @@ -98,13 +98,13 @@ extern MemProfiler global_mem_profiler; class BlockProfiler { public: - BlockProfiler(const QString &descr); + BlockProfiler(const TQString &descr); ~BlockProfiler(); void stop(); protected: - QString m_Description; + TQString m_Description; }; diff --git a/kradio3/src/include/errorlog-interfaces.h b/kradio3/src/include/errorlog-interfaces.h index a480927..85d5926 100644 --- a/kradio3/src/include/errorlog-interfaces.h +++ b/kradio3/src/include/errorlog-interfaces.h @@ -31,10 +31,10 @@ public : virtual ~IErrorLog(); RECEIVERS: - IF_RECEIVER( logError (const QString &) ) - IF_RECEIVER( logWarning(const QString &) ) - IF_RECEIVER( logInfo (const QString &) ) - IF_RECEIVER( logDebug (const QString &) ) + IF_RECEIVER( logError (const TQString &) ) + IF_RECEIVER( logWarning(const TQString &) ) + IF_RECEIVER( logInfo (const TQString &) ) + IF_RECEIVER( logDebug (const TQString &) ) }; @@ -44,20 +44,20 @@ public : IF_CON_DESTRUCTOR(IErrorLogClient, -1) public: - IF_SENDER ( sendLogError (const QString &) ) - IF_SENDER ( sendLogWarning(const QString &) ) - IF_SENDER ( sendLogInfo (const QString &) ) - IF_SENDER ( sendLogDebug (const QString &) ) + IF_SENDER ( sendLogError (const TQString &) ) + IF_SENDER ( sendLogWarning(const TQString &) ) + IF_SENDER ( sendLogInfo (const TQString &) ) + IF_SENDER ( sendLogDebug (const TQString &) ) - void logError (const QString &s) const { sendLogError(s); } - void logWarning(const QString &s) const { sendLogWarning(s); } - void logInfo (const QString &s) const { sendLogInfo(s); } - void logDebug (const QString &s) const { sendLogDebug(s); } + void logError (const TQString &s) const { sendLogError(s); } + void logWarning(const TQString &s) const { sendLogWarning(s); } + void logInfo (const TQString &s) const { sendLogInfo(s); } + void logDebug (const TQString &s) const { sendLogDebug(s); } - static void staticLogError (const QString &s); - static void staticLogWarning(const QString &s); - static void staticLogInfo (const QString &s); - static void staticLogDebug (const QString &s); + static void staticLogError (const TQString &s); + static void staticLogWarning(const TQString &s); + static void staticLogInfo (const TQString &s); + static void staticLogDebug (const TQString &s); }; diff --git a/kradio3/src/include/fileringbuffer.h b/kradio3/src/include/fileringbuffer.h index 3447277..2978bec 100644 --- a/kradio3/src/include/fileringbuffer.h +++ b/kradio3/src/include/fileringbuffer.h @@ -22,49 +22,49 @@ #include <config.h> #endif -#include <qstring.h> +#include <tqstring.h> #include <stdio.h> class FileRingBuffer { public: - FileRingBuffer(const QString &filename, Q_UINT64 max_size); + FileRingBuffer(const TQString &filename, TQ_UINT64 max_size); ~FileRingBuffer(); - bool resize(const QString &filename, Q_UINT64 new_max_size); + bool resize(const TQString &filename, TQ_UINT64 new_max_size); size_t addData (const char *src, size_t size); size_t takeData(char *dst, size_t size); - Q_UINT64 removeData(Q_UINT64 size); + TQ_UINT64 removeData(TQ_UINT64 size); - const QString &getFileName () const { return m_FileName; } - Q_UINT64 getMaxSize() const { return m_MaxSize; } - Q_UINT64 getRealSize() const { return m_RealSize; } - Q_UINT64 getFillSize() const { return m_FillSize; } - Q_UINT64 getFreeSize() const { return (m_Start + m_FillSize > m_RealSize) ? m_RealSize - m_FillSize : m_MaxSize - m_FillSize; } + const TQString &getFileName () const { return m_FileName; } + TQ_UINT64 getMaxSize() const { return m_MaxSize; } + TQ_UINT64 getRealSize() const { return m_RealSize; } + TQ_UINT64 getFillSize() const { return m_FillSize; } + TQ_UINT64 getFreeSize() const { return (m_Start + m_FillSize > m_RealSize) ? m_RealSize - m_FillSize : m_MaxSize - m_FillSize; } void clear(); bool error() const { return m_error; } - const QString &errorString() const { return m_errorString; } + const TQString &errorString() const { return m_errorString; } protected: - Q_UINT64 getFreeSpace(Q_UINT64 &size); // returns position in file + size - Q_UINT64 removeFreeSpace(Q_UINT64 size); + TQ_UINT64 getFreeSpace(TQ_UINT64 &size); // returns position in file + size + TQ_UINT64 removeFreeSpace(TQ_UINT64 size); - Q_UINT64 getData(Q_UINT64 &size); // returns position in file + size + TQ_UINT64 getData(TQ_UINT64 &size); // returns position in file + size int m_FileIdx; - QString m_BaseFileName; - QString m_FileName; + TQString m_BaseFileName; + TQString m_FileName; FILE *m_File; - Q_UINT64 m_Start; - Q_UINT64 m_MaxSize; - Q_UINT64 m_RealSize; - Q_UINT64 m_FillSize; + TQ_UINT64 m_Start; + TQ_UINT64 m_MaxSize; + TQ_UINT64 m_RealSize; + TQ_UINT64 m_FillSize; - QString m_errorString; + TQString m_errorString; bool m_error; }; diff --git a/kradio3/src/include/frequencyradiostation.h b/kradio3/src/include/frequencyradiostation.h index 87e4125..75c6ecd 100644 --- a/kradio3/src/include/frequencyradiostation.h +++ b/kradio3/src/include/frequencyradiostation.h @@ -39,16 +39,16 @@ class FrequencyRadioStation : public RadioStation { public: FrequencyRadioStation (); FrequencyRadioStation (float frequency); - FrequencyRadioStation (const QString &name, const QString &shortName, float frequency); + FrequencyRadioStation (const TQString &name, const TQString &shortName, float frequency); FrequencyRadioStation (const FrequencyRadioStation &); - FrequencyRadioStation (RegisterStationClass, const QString &classname = QString::null); + FrequencyRadioStation (RegisterStationClass, const TQString &classname = TQString()); ~FrequencyRadioStation(); float frequency() const { return m_frequency; } void setFrequency (float frequency) { m_frequency = frequency; } - virtual QString longName() const; - virtual QString description() const; + virtual TQString longName() const; + virtual TQString description() const; virtual bool isValid () const; /* = 0 : "this" is same as "s", i.e. approximately same frequency @@ -65,10 +65,10 @@ public: virtual RadioStationConfig *createEditor() const; // for XML-Parsing/Export - virtual bool setProperty(const QString &property_name, const QString &val); - virtual QString getProperty(const QString &property_name) const; - virtual QStringList getPropertyNames() const; - virtual QString getClassName() const { return "FrequencyRadioStation"; } + virtual bool setProperty(const TQString &property_name, const TQString &val); + virtual TQString getProperty(const TQString &property_name) const; + virtual TQStringList getPropertyNames() const; + virtual TQString getClassName() const { return "FrequencyRadioStation"; } virtual bool operator == (const RadioStation &x) const; diff --git a/kradio3/src/include/frequencyseekhelper.h b/kradio3/src/include/frequencyseekhelper.h index 4dc529f..3401b95 100644 --- a/kradio3/src/include/frequencyseekhelper.h +++ b/kradio3/src/include/frequencyseekhelper.h @@ -22,18 +22,19 @@ #include <config.h> #endif -#include <qobject.h> +#include <tqobject.h> #include "radiodevice_interfaces.h" #include "seekhelper.h" -class FrequencySeekHelper : public QObject, +class FrequencySeekHelper : public TQObject, public SeekHelper, public IFrequencyRadioClient { Q_OBJECT + TQ_OBJECT public: - FrequencySeekHelper(ISeekRadio &parent); + FrequencySeekHelper(ISeekRadio &tqparent); virtual ~FrequencySeekHelper(); // IFrequencyRadioClient @@ -66,7 +67,7 @@ protected: virtual void applyBest(); protected: - QTimer *m_timer; + TQTimer *m_timer; float m_currentSignal, m_oldSignal; bool m_goodSignal; diff --git a/kradio3/src/include/gui_list_helper.h b/kradio3/src/include/gui_list_helper.h index 6524043..3cf2d25 100644 --- a/kradio3/src/include/gui_list_helper.h +++ b/kradio3/src/include/gui_list_helper.h @@ -18,8 +18,8 @@ #ifndef _KRADIO_LIBKRADIO_GUI_GUI_LIST_HELPER_H_ #define _KRADIO_LIBKRADIO_GUI_GUI_LIST_HELPER_H_ -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> template <class TLIST> class GUISimpleListHelper @@ -28,27 +28,27 @@ public: GUISimpleListHelper(TLIST *list) : m_List(list) {} ~GUISimpleListHelper() {} - void setData(const QValueList<QString> &data); - QString getCurrentText() const { return m_List->currentText(); } - void setCurrentText(const QString &s) { m_List->setCurrentItem(m_revData.contains(s) ? m_revData[s] : 0); } + void setData(const TQValueList<TQString> &data); + TQString getCurrentText() const { return m_List->currentText(); } + void setCurrentText(const TQString &s) { m_List->setCurrentItem(m_revData.tqcontains(s) ? m_revData[s] : 0); } int count() const { return m_revData.count(); } - bool contains(const QString &id) const { return m_revData.contains(id); } + bool tqcontains(const TQString &id) const { return m_revData.tqcontains(id); } protected: TLIST *m_List; - QMap<QString, int> m_revData; + TQMap<TQString, int> m_revData; }; template <class TLIST> -void GUISimpleListHelper<TLIST>::setData(const QValueList<QString> &data) +void GUISimpleListHelper<TLIST>::setData(const TQValueList<TQString> &data) { m_List->clear(); m_revData.clear(); - QValueListConstIterator<QString> it = data.begin(); - QValueListConstIterator<QString> end = data.end(); + TQValueListConstIterator<TQString> it = data.begin(); + TQValueListConstIterator<TQString> end = data.end(); for (int i = 0; it != end; ++it, ++i) { m_revData[*it] = i; m_List->insertItem(*it); @@ -69,32 +69,32 @@ public: enum SORT_KEY { SORT_BY_ID, SORT_BY_DESCR }; GUIListHelper(TLIST *list, SORT_KEY skey); - GUIListHelper(TLIST *list, const QMap<TID, QString> &data, SORT_KEY skey); + GUIListHelper(TLIST *list, const TQMap<TID, TQString> &data, SORT_KEY skey); ~GUIListHelper(); - void setData(const QMap<TID, QString> &data); + void setData(const TQMap<TID, TQString> &data); void setCurrentItem(const TID &) const; const TID &getCurrentItem() const; int count() const { return m_Index2ID.count(); } - bool contains(const TID &id) const { return m_ID2Index.contains(id); } + bool tqcontains(const TID &id) const { return m_ID2Index.tqcontains(id); } protected: SORT_KEY m_skey; TLIST *m_List; - QMap<int, TID> m_Index2ID; - QMap<TID, int> m_ID2Index; - QMap<TID, QString> m_ID2Description; + TQMap<int, TID> m_Index2ID; + TQMap<TID, int> m_ID2Index; + TQMap<TID, TQString> m_ID2Description; struct THelpData { TID id; - QString descr; + TQString descr; SORT_KEY skey; THelpData() : id(), descr(), skey(SORT_BY_ID) {} - THelpData(TID _id, const QString &_descr, SORT_KEY _skey) + THelpData(TID _id, const TQString &_descr, SORT_KEY _skey) : id(_id), descr(_descr), skey(_skey) @@ -115,7 +115,7 @@ GUIListHelper<TLIST, TID>::GUIListHelper(TLIST *list, SORT_KEY skey) template <class TLIST, class TID> -GUIListHelper<TLIST, TID>::GUIListHelper(TLIST *list, const QMap<TID, QString> &data, SORT_KEY skey) +GUIListHelper<TLIST, TID>::GUIListHelper(TLIST *list, const TQMap<TID, TQString> &data, SORT_KEY skey) : m_skey(skey), m_List(list) { @@ -130,14 +130,14 @@ GUIListHelper<TLIST, TID>::~GUIListHelper() template <class TLIST, class TID> -void GUIListHelper<TLIST, TID>::setData (const QMap<TID, QString> &data) +void GUIListHelper<TLIST, TID>::setData (const TQMap<TID, TQString> &data) { m_List->clear(); m_ID2Description = data; - QValueList<THelpData> help_list; - QMapConstIterator<TID, QString> end = data.end(); - for (QMapConstIterator<TID, QString> it = data.begin(); it != end; ++it) { + TQValueList<THelpData> help_list; + TQMapConstIterator<TID, TQString> end = data.end(); + for (TQMapConstIterator<TID, TQString> it = data.begin(); it != end; ++it) { help_list.push_back(THelpData(it.key(), *it, m_skey)); } qHeapSort(help_list); @@ -146,8 +146,8 @@ void GUIListHelper<TLIST, TID>::setData (const QMap<TID, QString> &data) m_ID2Index.clear(); int idx = 0; - QValueListIterator<THelpData> end_hlp = help_list.end(); - for (QValueListIterator<THelpData> it = help_list.begin(); it != end_hlp; ++it, ++idx) { + TQValueListIterator<THelpData> end_hlp = help_list.end(); + for (TQValueListIterator<THelpData> it = help_list.begin(); it != end_hlp; ++it, ++idx) { m_Index2ID.insert(idx, (*it).id); m_ID2Index.insert((*it).id, idx); m_List->insertItem((*it).descr); @@ -158,7 +158,7 @@ void GUIListHelper<TLIST, TID>::setData (const QMap<TID, QString> &data) template <class TLIST, class TID> void GUIListHelper<TLIST, TID>::setCurrentItem(const TID &id) const { - if (m_ID2Index.contains(id)) + if (m_ID2Index.tqcontains(id)) m_List->setCurrentItem(m_ID2Index[id]); else m_List->setCurrentItem(0); diff --git a/kradio3/src/include/interfaces.h b/kradio3/src/include/interfaces.h index dced1d7..1719315 100644 --- a/kradio3/src/include/interfaces.h +++ b/kradio3/src/include/interfaces.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qptrlist.h> -#include <qmap.h> +#include <tqptrlist.h> +#include <tqmap.h> #include <kdebug.h> #include <typeinfo> @@ -65,20 +65,20 @@ To provide queries or a delivery feedback for messages, wrapper functions would have been necessary. - - Qt does not support multiple inheritance of QObjects. Thus even signals + - TQt does not support multiple inheritance of TQObjects. Thus even signals have to be declared abstract by the interface though the (later) implementation is already known. Those functions have to be declared as signals in the interface - implementation (derived from QObject) though the implementation does not + implementation (derived from TQObject) though the implementation does not want to worry about these signals. - - Qt does connect functions (signals/slots) and not interfaces. These + - TQt does connect functions (signals/slots) and not interfaces. These functions have to be connected separately. By that it is possible to forget to connect signals/slots of that interfaces. - - Aggregation of multiple interface implementations (each one is an QObject) - is not possible because qt does not allow multiple inheritance of QObjects + - Aggregation of multiple interface implementations (each one is an TQObject) + is not possible because qt does not allow multiple inheritance of TQObjects ///////////////////////////////////////////////////////////////////////////// @@ -87,7 +87,7 @@ Well, it eliminates at least the qt-problems explained above. But first we need a common mechanism to manage interface connections. This functionality can be provided by a common base class "InterfaceBase". It stores all - connected interfaces in a list of InterfaceBase pointers, e.g. QPtrList. + connected interfaces in a list of InterfaceBase pointers, e.g. TQPtrList. With this approach we would have some problems: @@ -145,7 +145,7 @@ - sending Messages Declare a virtual constant method with return value "int" and the desired - parameters. The return value will indicate how many receivers have handled + parameters. The return value will indicate how many tqreceivers have handled the message: virtual bool SendingMessages(int any_or_non_param) const; @@ -168,7 +168,7 @@ The method has to be implemented by a derived class. The current item of the - receivers conntions list is set to the sender. + tqreceivers conntions list is set to the sender. - querying queries @@ -180,7 +180,7 @@ Abbreviation by macros: - IF_QUERY( int QueryingQueries(int another_param) ) + IF_TQUERY( int QueryingQueries(int another_param) ) - answering queries @@ -195,7 +195,7 @@ IF_ANSWER( AnsweringQueries(int another_param) ) The method has to be implemented by a derived class. The current item of the - receivers conntions list is set to the sender. + tqreceivers conntions list is set to the sender. At last a note on maxConnections. This member is set on initialization by @@ -207,7 +207,7 @@ How do I use it ? - Implementations - Because we do not have a MOC as Qt does, we have to implement our sending + Because we do not have a TQMOC as TQt does, we have to implement our sending or querying methods by hand. But this minor disadvantage should be considered as less important than the fact, that this implementation is done where it belongs to. Especially because there are easy to use macros @@ -216,12 +216,12 @@ int ComplementaryInterface::SendingMessages(int any_or_non_param) const { IF_SEND_MESSAGE( ReceivingMessages(any_or_non_param) ) - // macro includes "return #receivers" + // macro includes "return #tqreceivers" } int ComplementaryInterface::QueryingQueries(int another_param) const { - IF_SEND_QUERY( AnsweringQuery(another_param), (int)"default return value" ) + IF_SEND_TQUERY( AnsweringQuery(another_param), (int)"default return value" ) } @@ -231,7 +231,7 @@ AnsweringQueries(param) ) - IF_IMPL_QUERY( int ComplementaryInterface::SendingMessages(int param), + IF_IMPL_TQUERY( int ComplementaryInterface::SendingMessages(int param), ReceivingMessages(param), (int)"default return value" ) @@ -337,8 +337,8 @@ public: typedef thisIF thisInterface; typedef cmplIF cmplInterface; - typedef QPtrList<cmplIF> IFList; - typedef QPtrListIterator<cmplIF> IFIterator; + typedef TQPtrList<cmplIF> IFList; + typedef TQPtrListIterator<cmplIF> IFIterator; typedef thisClass BaseClass; @@ -373,7 +373,7 @@ public: thisIF *initThisInterfacePointer(); thisIF *getThisInterfacePointer() const { return me; } bool isThisInterfacePointerValid() const { return me_valid; } - bool hasConnectionTo(cmplInterface *other) const { return iConnections.containsRef(other); } + bool hasConnectionTo(cmplInterface *other) const { return iConnections.tqcontainsRef(other); } void appendConnectionTo(cmplInterface *other) { iConnections.append(other); } void removeConnectionTo(cmplInterface *other) { iConnections.removeRef(other); } @@ -384,11 +384,11 @@ protected : // functions for individually selectable callbacks protected: - bool addListener (const cmplInterface *i, QPtrList<cmplInterface> &list); - void removeListener(const cmplInterface *i, QPtrList<cmplInterface> &list); + bool addListener (const cmplInterface *i, TQPtrList<cmplInterface> &list); + void removeListener(const cmplInterface *i, TQPtrList<cmplInterface> &list); void removeListener(const cmplInterface *i); - QMap<const cmplInterface *, QPtrList<QPtrList<cmplInterface> > > m_FineListeners; + TQMap<const cmplInterface *, TQPtrList<TQPtrList<cmplInterface> > > m_FineListeners; private: thisInterface *me; @@ -414,12 +414,12 @@ private: #ifdef DEBUG #include <iostream> using namespace std; - #define IF_QUERY_DEBUG \ + #define IF_TQUERY_DEBUG \ if (iConnections.count() > 1) { \ - kdDebug() << "class " << typeid(this).name() << ": using IF_QUERY with #connections > 1\n"; \ + kdDebug() << "class " << typeid(this).name() << ": using IF_TQUERY with #connections > 1\n"; \ } #else - #define IF_QUERY_DEBUG + #define IF_TQUERY_DEBUG #endif @@ -454,23 +454,23 @@ private: // queries #define ANSWERS public -#define QUERIES protected +#define TQUERIES protected -#define IF_QUERY(decl) \ +#define IF_TQUERY(decl) \ virtual decl const; -#define IF_SEND_QUERY(call, default) \ +#define IF_SEND_TQUERY(call, default) \ cmplInterface *o = IFIterator(iConnections).current(); \ if (o) { \ - IF_QUERY_DEBUG \ + IF_TQUERY_DEBUG \ return o->call; \ } else { \ return default; \ } \ -#define IF_IMPL_QUERY(decl, call, default) \ +#define IF_IMPL_TQUERY(decl, call, default) \ decl const { \ - IF_SEND_QUERY(call, default) \ + IF_SEND_TQUERY(call, default) \ } #define IF_ANSWER(decl) \ @@ -491,12 +491,12 @@ public: \ bool register4_##name (cmplInterface *); \ void unregister4_##name(cmplInterface *); \ private: \ - QPtrList<cmplInterface> m_Listeners_##name;\ + TQPtrList<cmplInterface> m_Listeners_##name;\ #define IF_SEND_MESSAGE_FINE(name, params, call) \ int ____n = 0; \ - for (QPtrListIterator<cmplInterface> ____it(m_Listeners_##name); ____it.current(); ++____it) { \ + for (TQPtrListIterator<cmplInterface> ____it(m_Listeners_##name); ____it.current(); ++____it) { \ if (____it.current()->call ) ++____n; \ } \ return ____n; @@ -576,7 +576,7 @@ bool InterfaceBase<thisIF, cmplIF>::connectI (Interface *__i) cmplIF *i = _i->initThisInterfacePointer(); if (i && me) { - bool i_connected = iConnections.containsRef(i); + bool i_connected = iConnections.tqcontainsRef(i); bool me_connected = i->hasConnectionTo(me); if (i_connected || me_connected) { @@ -671,9 +671,9 @@ void InterfaceBase<thisIF, cmplIF>::disconnectAllI() template <class thisIF, class cmplIF> -bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, QPtrList<cmplInterface> &list) +bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, TQPtrList<cmplInterface> &list) { - if (iConnections.containsRef(i) && !list.contains(i)) { + if (iConnections.tqcontainsRef(i) && !list.tqcontains(i)) { list.append(i); m_FineListeners[i].append(&list); return true; @@ -684,10 +684,10 @@ bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, QPtrList template <class thisIF, class cmplIF> -void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, QPtrList<cmplInterface> &list) +void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, TQPtrList<cmplInterface> &list) { list.remove(i); - if (m_FineListeners.contains(i)) + if (m_FineListeners.tqcontains(i)) m_FineListeners[i].remove(&list); } @@ -695,9 +695,9 @@ void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, QPtrL template <class thisIF, class cmplIF> void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i) { - if (m_FineListeners.contains(i)) { - QPtrList<QPtrList<cmplInterface> > &list = m_FineListeners[i]; - QPtrListIterator<QPtrList<cmplInterface> > it(list); + if (m_FineListeners.tqcontains(i)) { + TQPtrList<TQPtrList<cmplInterface> > &list = m_FineListeners[i]; + TQPtrListIterator<TQPtrList<cmplInterface> > it(list); for (; it.current(); ++it) { (*it)->remove(i); } diff --git a/kradio3/src/include/internetradiostation.h b/kradio3/src/include/internetradiostation.h index fa25159..716dba2 100644 --- a/kradio3/src/include/internetradiostation.h +++ b/kradio3/src/include/internetradiostation.h @@ -35,16 +35,16 @@ class InternetRadioStation : public RadioStation { public: InternetRadioStation(); InternetRadioStation(KURL const &url); - InternetRadioStation(const QString &name, const QString &shortName, KURL const &url); + InternetRadioStation(const TQString &name, const TQString &shortName, KURL const &url); InternetRadioStation(const InternetRadioStation &); - InternetRadioStation(RegisterStationClass, const QString &classname = QString::null); + InternetRadioStation(RegisterStationClass, const TQString &classname = TQString()); ~InternetRadioStation(); const KURL & url() const { return m_url; } void setUrl(KURL const &url) { m_url = url; } - virtual QString longName() const; - virtual QString description() const; + virtual TQString longName() const; + virtual TQString description() const; virtual bool isValid () const; /* = 0 : this.url == s.url @@ -61,10 +61,10 @@ public: virtual RadioStationConfig *createEditor() const; // for XML-Parsing/Export - virtual bool setProperty(const QString &property_name, const QString &val); - virtual QString getProperty(const QString &property_name) const; - virtual QStringList getPropertyNames() const; - virtual QString getClassName() const { return "InternetRadioStation"; } + virtual bool setProperty(const TQString &property_name, const TQString &val); + virtual TQString getProperty(const TQString &property_name) const; + virtual TQStringList getPropertyNames() const; + virtual TQString getClassName() const { return "InternetRadioStation"; } virtual bool operator == (const RadioStation &x) const; diff --git a/kradio3/src/include/kradioapp.h b/kradio3/src/include/kradioapp.h index f5fb950..8dba108 100644 --- a/kradio3/src/include/kradioapp.h +++ b/kradio3/src/include/kradioapp.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qdict.h> +#include <tqdict.h> #include <kapplication.h> #include <kaboutapplication.h> @@ -34,9 +34,9 @@ class KLibrary; class KRadioAbout : public PluginBase { public: - KRadioAbout(const QString &name) : PluginBase(name, "KRadio Application") {} + KRadioAbout(const TQString &name) : PluginBase(name, "KRadio Application") {} - virtual QString pluginClassName() const { return "KRadioAbout"; } + virtual TQString pluginClassName() const { return "KRadioAbout"; } virtual ConfigPageInfo createConfigurationPage () { return ConfigPageInfo(); } virtual AboutPageInfo createAboutPage (); @@ -48,41 +48,42 @@ public: -typedef PluginBase *(*t_kradio_plugin_init_func)(const QString & cls, const QString &obj); -typedef void (*t_kradio_plugin_info_func)(QMap<QString, QString> &); +typedef PluginBase *(*t_kradio_plugin_init_func)(const TQString & cls, const TQString &obj); +typedef void (*t_kradio_plugin_info_func)(TQMap<TQString, TQString> &); typedef void (*t_kradio_plugin_libload_func)(); typedef void (*t_kradio_plugin_libunload_func)(); struct PluginLibraryInfo { KLibrary *library; - QMap<QString,QString> plugins; + TQMap<TQString,TQString> plugins; t_kradio_plugin_init_func init_func; t_kradio_plugin_info_func info_func; t_kradio_plugin_libload_func libload_func; t_kradio_plugin_libunload_func libunload_func; PluginLibraryInfo() : library(NULL), init_func(NULL), info_func(NULL), libload_func(NULL), libunload_func(NULL) {} - PluginLibraryInfo(const QString &libname); + PluginLibraryInfo(const TQString &libname); bool valid() { return init_func && info_func && library && libload_func && libunload_func; } }; struct PluginClassInfo { - QString class_name; - QString description; + TQString class_name; + TQString description; t_kradio_plugin_init_func create_function; PluginClassInfo() : create_function(NULL) {} - PluginClassInfo(const QString &_name, const QString &descr, t_kradio_plugin_init_func init_func) + PluginClassInfo(const TQString &_name, const TQString &descr, t_kradio_plugin_init_func init_func) : class_name(_name), description(descr), create_function(init_func) {} - PluginBase *CreateInstance(const QString &obj_name) { return create_function ? create_function(class_name, obj_name) : NULL; } + PluginBase *CreateInstance(const TQString &obj_name) { return create_function ? create_function(class_name, obj_name) : NULL; } }; class KRadioApp : public KApplication { Q_OBJECT + TQ_OBJECT public: KRadioApp(); virtual ~KRadioApp(); @@ -90,14 +91,14 @@ public: virtual void saveState (KConfig *c); virtual void restoreState (KConfig *c); - virtual PluginManager *createNewInstance(const QString &name); + virtual PluginManager *createNewInstance(const TQString &name); - virtual KLibrary *LoadLibrary (const QString &library); - virtual void UnloadLibrary (const QString &library); - virtual PluginBase *CreatePlugin (PluginManager *manager, const QString &name, const QString &object_name); + virtual KLibrary *LoadLibrary (const TQString &library); + virtual void UnloadLibrary (const TQString &library); + virtual PluginBase *CreatePlugin (PluginManager *manager, const TQString &name, const TQString &object_name); - virtual const QMap<QString, PluginLibraryInfo> &getPluginLibraries() const { return m_PluginLibraries; } - virtual const QMap<QString, PluginClassInfo> &getPluginClasses() const { return m_PluginInfos; } + virtual const TQMap<TQString, PluginLibraryInfo> &getPluginLibraries() const { return m_PluginLibraries; } + virtual const TQMap<TQString, PluginClassInfo> &getPluginClasses() const { return m_PluginInfos; } virtual void startPlugins(); @@ -108,10 +109,10 @@ protected slots: protected: - QDict<PluginManager> m_Instances; + TQDict<PluginManager> m_Instances; - QMap<QString, PluginLibraryInfo> m_PluginLibraries; - QMap<QString, PluginClassInfo> m_PluginInfos; + TQMap<TQString, PluginLibraryInfo> m_PluginLibraries; + TQMap<TQString, PluginClassInfo> m_PluginInfos; bool m_quitting; }; diff --git a/kradio3/src/include/multibuffer.h b/kradio3/src/include/multibuffer.h index e835465..e0ed05c 100644 --- a/kradio3/src/include/multibuffer.h +++ b/kradio3/src/include/multibuffer.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qsemaphore.h> -#include <qstring.h> +#include <tqsemaphore.h> +#include <tqstring.h> class MultiBuffer { @@ -37,7 +37,7 @@ public: char *wait4ReadBuffer (size_t &buffer_fill); char *getCurrentReadBuffer(size_t &buffer_fill) const; - const QString &getErrorString() const { return m_errorString; } + const TQString &getErrorString() const { return m_errorString; } bool hasError() const { return m_error; } void resetError(); @@ -56,9 +56,9 @@ protected: size_t *m_buffersFill; size_t m_currentReadBuffer; size_t m_currentWriteBuffer; - QSemaphore m_readLock; + TQSemaphore m_readLock; - QString m_errorString; + TQString m_errorString; bool m_error; }; diff --git a/kradio3/src/include/plugin_configuration_dialog.h b/kradio3/src/include/plugin_configuration_dialog.h index d315a88..87e4d35 100644 --- a/kradio3/src/include/plugin_configuration_dialog.h +++ b/kradio3/src/include/plugin_configuration_dialog.h @@ -29,17 +29,18 @@ class PluginConfigurationDialog : public KDialogBase, { Q_OBJECT + TQ_OBJECT public: PluginConfigurationDialog( - int dialogFace, const QString &caption, + int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, - QWidget *parent=0, const char *name=0, + TQWidget *tqparent=0, const char *name=0, bool modal=true, bool separator=false); // PluginBase - virtual QString pluginClassName() const { return "PluginConfigurationDialog"; } + virtual TQString pluginClassName() const { return "PluginConfigurationDialog"; } virtual void saveState (KConfig *) const; virtual void restoreState (KConfig *); @@ -58,16 +59,16 @@ public slots: virtual void hide(); virtual void cancel() { slotCancel(); } - // QWidget overrides + // TQWidget overrides protected: - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); - virtual QWidget *getWidget() { return this; } - virtual const QWidget *getWidget() const { return this; } + virtual TQWidget *getWidget() { return this; } + virtual const TQWidget *getWidget() const { return this; } - QString m_Caption; + TQString m_Caption; }; diff --git a/kradio3/src/include/pluginmanager-configuration.h b/kradio3/src/include/pluginmanager-configuration.h index 5cd8d5f..77c28dd 100644 --- a/kradio3/src/include/pluginmanager-configuration.h +++ b/kradio3/src/include/pluginmanager-configuration.h @@ -24,15 +24,16 @@ #include <pluginmanager-configuration-ui.h> -class QWidget; +class TQWidget; class KRadioApp; class PluginManager; class PluginManagerConfiguration : public PluginManagerConfigurationUI { Q_OBJECT + TQ_OBJECT public : - PluginManagerConfiguration (QWidget *parent, KRadioApp *app, PluginManager *pm); + PluginManagerConfiguration (TQWidget *tqparent, KRadioApp *app, PluginManager *pm); ~PluginManagerConfiguration (); void noticePluginLibrariesChanged(); diff --git a/kradio3/src/include/pluginmanager.h b/kradio3/src/include/pluginmanager.h index b52c8f2..d857c6e 100644 --- a/kradio3/src/include/pluginmanager.h +++ b/kradio3/src/include/pluginmanager.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qptrdict.h> +#include <tqstring.h> +#include <tqptrdict.h> #include "plugins.h" @@ -31,50 +31,51 @@ class PluginBase; class WidgetPluginBase; class PluginConfigurationDialog; class PluginManagerConfiguration; -class QWidget; +class TQWidget; class KConfig; -class QFrame; +class TQFrame; class KAboutDialog; class KDialogBase; struct ConfigPageInfo; -class QMenuData; +class TQMenuData; class KRadioApp; -class PluginManager : public QObject +class PluginManager : public TQObject { Q_OBJECT + TQ_OBJECT public : - PluginManager(const QString &name, + PluginManager(const TQString &name, KRadioApp *app, - const QString &configDialogTitle, - const QString &aboutTitle); + const TQString &configDialogTitle, + const TQString &aboutTitle); virtual ~PluginManager(); // Library Functions void noticeLibrariesChanged(); - void unloadPlugins(const QString &class_name); + void unloadPlugins(const TQString &class_name); // managing plugins const PluginList &plugins() const { return m_plugins; } - void addWidgetPluginMenuItems(QMenuData *menu, QMap<WidgetPluginBase *,int> &map) const; - void updateWidgetPluginMenuItem(WidgetPluginBase *p, QMenuData *menu, QMap<WidgetPluginBase *,int> &map, bool shown) const; + void addWidgetPluginMenuItems(TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map) const; + void updateWidgetPluginMenuItem(WidgetPluginBase *p, TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map, bool shown) const; - PluginBase *getPluginByName(const QString &name) const; + PluginBase *getPluginByName(const TQString &name) const; // after insert, pluginManager is responsible for deletion void insertPlugin(PluginBase *); // remove and delete plugin void deletePlugin(PluginBase *); - void deletePluginByName(const QString &name) { deletePlugin(getPluginByName(name)); } + void deletePluginByName(const TQString &name) { deletePlugin(getPluginByName(name)); } // remove plugin, afterwards pluginManager is no longer responsible for deletion void removePlugin(PluginBase *); - void removePluginByName(const QString &name) { removePlugin(getPluginByName(name)); } + void removePluginByName(const TQString &name) { removePlugin(getPluginByName(name)); } // operations on all plugins @@ -92,8 +93,8 @@ public : virtual void noticeWidgetPluginShown(WidgetPluginBase *p, bool shown); protected : - virtual void createConfigDialog(const QString &title = QString::null); - virtual void createAboutDialog (const QString &title = QString::null); + virtual void createConfigDialog(const TQString &title = TQString()); + virtual void createAboutDialog (const TQString &title = TQString()); virtual void addConfigurationPage (PluginBase *forWhom, const ConfigPageInfo &info); @@ -112,33 +113,33 @@ signals: virtual void sigConfigOK(); private: - virtual QFrame *addConfigurationPage (const ConfigPageInfo &info); + virtual TQFrame *addConfigurationPage (const ConfigPageInfo &info); ConfigPageInfo createOwnConfigurationPage(); // PluginManager's data & types ;) protected: - typedef QPtrDict<QFrame> QFrameDict; - typedef QPtrDictIterator<QFrame> QFrameDictIterator; - typedef QPtrDict<QWidget> QWidgetDict; - typedef QPtrDictIterator<QWidget> QWidgetDictIterator; + typedef TQPtrDict<TQFrame> TQFrameDict; + typedef TQPtrDictIterator<TQFrame> TQFrameDictIterator; + typedef TQPtrDict<TQWidget> TQWidgetDict; + typedef TQPtrDictIterator<TQWidget> TQWidgetDictIterator; - QString m_Name; + TQString m_Name; KRadioApp *m_Application; PluginList m_plugins; bool m_showProgressBar; - QFrameDict m_configPageFrames; - QWidgetDict m_configPages; + TQFrameDict m_configPageFrames; + TQWidgetDict m_configPages; - QFrameDict m_aboutPageFrames; - QWidgetDict m_aboutPages; + TQFrameDict m_aboutPageFrames; + TQWidgetDict m_aboutPages; PluginConfigurationDialog *m_configDialog; PluginManagerConfiguration*m_pluginManagerConfiguration; KDialogBase *m_aboutDialog; - QString m_configDialogTitle; - QString m_aboutDialogTitle; + TQString m_configDialogTitle; + TQString m_aboutDialogTitle; }; diff --git a/kradio3/src/include/plugins.h b/kradio3/src/include/plugins.h index 8040437..6fd6d70 100644 --- a/kradio3/src/include/plugins.h +++ b/kradio3/src/include/plugins.h @@ -27,23 +27,23 @@ #include <kglobal.h> #include "errorlog-interfaces.h" -#include <qstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqptrlist.h> class PluginManager; class PluginBase; -class QWidget; +class TQWidget; class KConfig; -typedef QPtrList<PluginBase> PluginList; -typedef QPtrListIterator<PluginBase> PluginIterator; +typedef TQPtrList<PluginBase> PluginList; +typedef TQPtrListIterator<PluginBase> PluginIterator; /* PluginBase must be inherited from Interface so that a plugin can be used in Interface::connect functions. - PluginBase must not be inherited from QObject, because derived classes may - be inherited e.g. from QWidget (multiple inheritance is not possible with + PluginBase must not be inherited from TQObject, because derived classes may + be inherited e.g. from TQWidget (multiple inheritance is not possible with OBjects). But we must be able to receive destroy messages e.g. from configuration pages. Thus we need the special callback member m_destroyNotifier. @@ -61,18 +61,18 @@ class WidgetPluginBase; struct ConfigPageInfo { ConfigPageInfo () : page(NULL) {} - ConfigPageInfo (QWidget *p, - const QString &in, - const QString &ph, - const QString &icon) + ConfigPageInfo (TQWidget *p, + const TQString &in, + const TQString &ph, + const TQString &icon) : page (p), itemName(in), pageHeader(ph), iconName(icon) {} - QWidget *page; - QString itemName, + TQWidget *page; + TQString itemName, pageHeader, iconName; }; @@ -84,15 +84,15 @@ class PluginBase : public IErrorLogClient { friend class PluginManager; public : - PluginBase(const QString &name, const QString &description); + PluginBase(const TQString &name, const TQString &description); virtual ~PluginBase(); - virtual QString pluginClassName() const = 0; + virtual TQString pluginClassName() const = 0; - const QString &name() const { return m_name; } - QString &name() { return m_name; } + const TQString &name() const { return m_name; } + TQString &name() { return m_name; } - const QString &description() const { return m_description; } + const TQString &description() const { return m_description; } // workaround for compiler bugs bool destructorCalled() const { return m_destructorCalled; } @@ -127,8 +127,8 @@ public: virtual void noticePluginsChanged(const PluginList &) {} protected : - QString m_name; - QString m_description; + TQString m_name; + TQString m_description; PluginManager *m_manager; bool m_destructorCalled; }; @@ -145,12 +145,12 @@ extern "C" void KRadioPlugin_UnloadLibrary() \ KGlobal::locale()->removeCatalogue(i18nName); \ } \ \ -extern "C" void KRadioPlugin_GetAvailablePlugins(QMap<QString, QString> &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap<TQString, TQString> &info) \ { \ info.insert(#class_name, (description)); \ } \ \ -extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \ +extern "C" PluginBase *KRadioPlugin_CreatePlugin(const TQString &type, const TQString &object_name) \ { \ if (type == #class_name) { \ return new class_name(object_name); \ @@ -171,13 +171,13 @@ extern "C" void KRadioPlugin_UnloadLibrary() \ KGlobal::locale()->removeCatalogue(i18nName); \ } \ \ -extern "C" void KRadioPlugin_GetAvailablePlugins(QMap<QString, QString> &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap<TQString, TQString> &info) \ { \ info.insert(#class_name1, (description1)); \ info.insert(#class_name2, (description2)); \ } \ \ -extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \ +extern "C" PluginBase *KRadioPlugin_CreatePlugin(const TQString &type, const TQString &object_name) \ { \ if (type == #class_name1) { \ return new class_name1(object_name); \ diff --git a/kradio3/src/include/radio_interfaces.h b/kradio3/src/include/radio_interfaces.h index 12a9037..dbba88d 100644 --- a/kradio3/src/include/radio_interfaces.h +++ b/kradio3/src/include/radio_interfaces.h @@ -51,13 +51,13 @@ RECEIVERS: IF_RECEIVER( activateStation(const RadioStation &rs) ) IF_RECEIVER( activateStation(int index) ) IF_RECEIVER( setStations(const StationList &sl) ) - IF_RECEIVER( setPresetFile(const QString &f) ) + IF_RECEIVER( setPresetFile(const TQString &f) ) SENDERS: IF_SENDER ( notifyPowerChanged(bool on) ) IF_SENDER ( notifyStationChanged (const RadioStation &, int idx) ) IF_SENDER ( notifyStationsChanged(const StationList &sl) ) - IF_SENDER ( notifyPresetFileChanged(const QString &sl) ) + IF_SENDER ( notifyPresetFileChanged(const TQString &sl) ) IF_SENDER ( notifyCurrentSoundStreamIDChanged(SoundStreamID id) ) ANSWERS: @@ -67,7 +67,7 @@ ANSWERS: IF_ANSWER ( int getStationIdx(const RadioStation &rs) const ) IF_ANSWER ( int getCurrentStationIdx() const ) IF_ANSWER ( const StationList & getStations() const ) - IF_ANSWER ( const QString & getPresetFile() const ); + IF_ANSWER ( const TQString & getPresetFile() const ); IF_ANSWER ( SoundStreamID getCurrentSoundStreamID() const ); @@ -87,25 +87,25 @@ SENDERS: IF_SENDER ( sendActivateStation(const RadioStation &rs) ) IF_SENDER ( sendActivateStation(int index) ) IF_SENDER ( sendStations(const StationList &sl) ) - IF_SENDER ( sendPresetFile(const QString &f) ) + IF_SENDER ( sendPresetFile(const TQString &f) ) RECEIVERS: IF_RECEIVER( noticePowerChanged(bool on) ) IF_RECEIVER( noticeStationChanged (const RadioStation &, int idx) ) IF_RECEIVER( noticeStationsChanged(const StationList &sl) ) - IF_RECEIVER( noticePresetFileChanged(const QString &f) ) + IF_RECEIVER( noticePresetFileChanged(const TQString &f) ) IF_RECEIVER( noticeCurrentSoundStreamIDChanged(SoundStreamID id)) -QUERIES: - IF_QUERY ( bool queryIsPowerOn() ) - IF_QUERY ( bool queryIsPowerOff() ) - IF_QUERY ( const RadioStation & queryCurrentStation() ) - IF_QUERY ( int queryStationIdx(const RadioStation &rs) ) - IF_QUERY ( int queryCurrentStationIdx() ) - IF_QUERY ( const StationList & queryStations() ) - IF_QUERY ( const QString & queryPresetFile() ) +TQUERIES: + IF_TQUERY ( bool queryIsPowerOn() ) + IF_TQUERY ( bool queryIsPowerOff() ) + IF_TQUERY ( const RadioStation & queryCurrentStation() ) + IF_TQUERY ( int queryStationIdx(const RadioStation &rs) ) + IF_TQUERY ( int queryCurrentStationIdx() ) + IF_TQUERY ( const StationList & queryStations() ) + IF_TQUERY ( const TQString & queryPresetFile() ) - IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ); + IF_TQUERY ( SoundStreamID queryCurrentSoundStreamID() ); RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); diff --git a/kradio3/src/include/radiodevice_interfaces.h b/kradio3/src/include/radiodevice_interfaces.h index 53b975e..262663e 100644 --- a/kradio3/src/include/radiodevice_interfaces.h +++ b/kradio3/src/include/radiodevice_interfaces.h @@ -54,14 +54,14 @@ RECEIVERS: SENDERS: IF_SENDER ( notifyPowerChanged(bool on) ) IF_SENDER ( notifyStationChanged (const RadioStation &) ) - IF_SENDER ( notifyDescriptionChanged (const QString &) ) + IF_SENDER ( notifyDescriptionChanged (const TQString &) ) IF_SENDER ( notifyCurrentSoundStreamIDChanged(SoundStreamID id)) ANSWERS: IF_ANSWER ( bool isPowerOn() const ); IF_ANSWER ( bool isPowerOff() const ); IF_ANSWER ( const RadioStation & getCurrentStation() const ); - IF_ANSWER ( const QString & getDescription() const ); + IF_ANSWER ( const TQString & getDescription() const ); IF_ANSWER ( SoundStreamID getCurrentSoundStreamID() const ); }; @@ -83,16 +83,16 @@ SENDERS: RECEIVERS: IF_RECEIVER( noticePowerChanged (bool on, const IRadioDevice *sender = NULL) ) IF_RECEIVER( noticeStationChanged (const RadioStation &, const IRadioDevice *sender = NULL) ) - IF_RECEIVER( noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL) ) + IF_RECEIVER( noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL) ) IF_RECEIVER( noticeCurrentSoundStreamIDChanged(SoundStreamID id, const IRadioDevice *sender = NULL)) -QUERIES: - IF_QUERY ( bool queryIsPowerOn() ) - IF_QUERY ( bool queryIsPowerOff() ) - IF_QUERY ( const RadioStation & queryCurrentStation() ) - IF_QUERY ( const QString & queryDescription() ) +TQUERIES: + IF_TQUERY ( bool queryIsPowerOn() ) + IF_TQUERY ( bool queryIsPowerOff() ) + IF_TQUERY ( const RadioStation & queryCurrentStation() ) + IF_TQUERY ( const TQString & queryDescription() ) - IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ) + IF_TQUERY ( SoundStreamID queryCurrentSoundStreamID() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -168,16 +168,16 @@ RECEIVERS: IF_RECEIVER( noticeStereoChanged(bool s) ) IF_RECEIVER( noticeMuted(bool m) ) -QUERIES: - IF_QUERY ( float queryVolume() ) - IF_QUERY ( float queryTreble() ) - IF_QUERY ( float queryBass() ) - IF_QUERY ( float queryBalance () ) - IF_QUERY ( float querySignalQuality() ) - IF_QUERY ( float querySignalMinQuality() ) - IF_QUERY ( bool queryHasGoodQuality() ) - IF_QUERY ( bool queryIsStereo() ) - IF_QUERY ( bool queryIsMuted() ) +TQUERIES: + IF_TQUERY ( float queryVolume() ) + IF_TQUERY ( float queryTreble() ) + IF_TQUERY ( float queryBass() ) + IF_TQUERY ( float queryBalance () ) + IF_TQUERY ( float querySignalQuality() ) + IF_TQUERY ( float querySignalMinQuality() ) + IF_TQUERY ( bool queryHasGoodQuality() ) + IF_TQUERY ( bool queryIsStereo() ) + IF_TQUERY ( bool queryIsMuted() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -234,11 +234,11 @@ RECEIVERS: IF_RECEIVER( noticeSeekFinished (const RadioStation &s, bool goodQuality) ) IF_RECEIVER( noticeProgress (float f) ) -QUERIES: - IF_QUERY ( bool queryIsSeekRunning() ) - IF_QUERY ( bool queryIsSeekUpRunning() ) - IF_QUERY ( bool queryIsSeekDownRunning() ) - IF_QUERY ( float queryProgress () ) +TQUERIES: + IF_TQUERY ( bool queryIsSeekRunning() ) + IF_TQUERY ( bool queryIsSeekUpRunning() ) + IF_TQUERY ( bool queryIsSeekDownRunning() ) + IF_TQUERY ( float queryProgress () ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -293,13 +293,13 @@ RECEIVERS: IF_RECEIVER( noticeDeviceMinMaxFrequencyChanged(float min, float max) ) IF_RECEIVER( noticeScanStepChanged(float s) ) -QUERIES: - IF_QUERY ( float queryFrequency() ) - IF_QUERY ( float queryMinFrequency() ) - IF_QUERY ( float queryMinDeviceFrequency() ) - IF_QUERY ( float queryMaxFrequency() ) - IF_QUERY ( float queryMaxDeviceFrequency() ) - IF_QUERY ( float queryScanStep() ) +TQUERIES: + IF_TQUERY ( float queryFrequency() ) + IF_TQUERY ( float queryMinFrequency() ) + IF_TQUERY ( float queryMinDeviceFrequency() ) + IF_TQUERY ( float queryMaxFrequency() ) + IF_TQUERY ( float queryMaxDeviceFrequency() ) + IF_TQUERY ( float queryScanStep() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); @@ -339,8 +339,8 @@ SENDERS: RECEIVERS: IF_RECEIVER( noticeURLChanged(const KURL &url) ) -QUERIES: - IF_QUERY ( const KURL &queryURL() ) +TQUERIES: + IF_TQUERY ( const KURL &queryURL() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); diff --git a/kradio3/src/include/radiodevicepool_interfaces.h b/kradio3/src/include/radiodevicepool_interfaces.h index 6c562a8..dadc400 100644 --- a/kradio3/src/include/radiodevicepool_interfaces.h +++ b/kradio3/src/include/radiodevicepool_interfaces.h @@ -38,13 +38,13 @@ RECEIVERS: SENDERS: IF_SENDER ( notifyActiveDeviceChanged(IRadioDevice *rd) ) - IF_SENDER ( notifyDevicesChanged(const QPtrList<IRadioDevice> &) ) - IF_SENDER ( notifyDeviceDescriptionChanged(const QString &) ) + IF_SENDER ( notifyDevicesChanged(const TQPtrList<IRadioDevice> &) ) + IF_SENDER ( notifyDeviceDescriptionChanged(const TQString &) ) ANSWERS: IF_ANSWER ( IRadioDevice * getActiveDevice() const ) - IF_ANSWER ( const QPtrList<IRadioDevice> & getDevices() const ) - IF_ANSWER ( const QString & getDeviceDescription() const ) + IF_ANSWER ( const TQPtrList<IRadioDevice> & getDevices() const ) + IF_ANSWER ( const TQString & getDeviceDescription() const ) }; @@ -58,13 +58,13 @@ SENDERS: RECEIVERS: IF_RECEIVER( noticeActiveDeviceChanged(IRadioDevice *rd) ) - IF_RECEIVER( noticeDevicesChanged(const QPtrList<IRadioDevice> &) ) - IF_RECEIVER( noticeDeviceDescriptionChanged(const QString &) ) + IF_RECEIVER( noticeDevicesChanged(const TQPtrList<IRadioDevice> &) ) + IF_RECEIVER( noticeDeviceDescriptionChanged(const TQString &) ) -QUERIES: - IF_QUERY ( IRadioDevice *queryActiveDevice() ) - IF_QUERY ( const QPtrList<IRadioDevice> &queryDevices() ) - IF_QUERY ( const QString &queryDeviceDescription() ) +TQUERIES: + IF_TQUERY ( IRadioDevice *queryActiveDevice() ) + IF_TQUERY ( const TQPtrList<IRadioDevice> &queryDevices() ) + IF_TQUERY ( const TQString &queryDeviceDescription() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool /*pointer_valid*/); diff --git a/kradio3/src/include/radiostation-config.h b/kradio3/src/include/radiostation-config.h index b0b31cf..17ee824 100644 --- a/kradio3/src/include/radiostation-config.h +++ b/kradio3/src/include/radiostation-config.h @@ -22,15 +22,16 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> class RadioStation; -class RadioStationConfig : public QWidget +class RadioStationConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - RadioStationConfig(QWidget *parent); + RadioStationConfig(TQWidget *tqparent); ~RadioStationConfig(); virtual void setStationData (const RadioStation &rs) = 0; @@ -44,8 +45,9 @@ signals: class UndefinedRadioStationConfig : public RadioStationConfig { Q_OBJECT + TQ_OBJECT public: - UndefinedRadioStationConfig (QWidget *parent); + UndefinedRadioStationConfig (TQWidget *tqparent); ~UndefinedRadioStationConfig(); virtual void setStationData (const RadioStation &rs); @@ -54,13 +56,14 @@ public: -class QSpinBox; +class TQSpinBox; class FrequencyRadioStationConfig : public RadioStationConfig { Q_OBJECT + TQ_OBJECT public: - FrequencyRadioStationConfig (QWidget *parent); + FrequencyRadioStationConfig (TQWidget *tqparent); ~FrequencyRadioStationConfig(); virtual void setStationData (const RadioStation &rs); @@ -71,7 +74,7 @@ protected slots: protected: - QSpinBox *m_editFrequency; + TQSpinBox *m_editFrequency; }; diff --git a/kradio3/src/include/radiostation-listview.h b/kradio3/src/include/radiostation-listview.h index 1f3fb6a..43bf535 100644 --- a/kradio3/src/include/radiostation-listview.h +++ b/kradio3/src/include/radiostation-listview.h @@ -31,20 +31,21 @@ class StationList; class RadioStationListView : public KListView { Q_OBJECT + TQ_OBJECT public: - RadioStationListView(QWidget *parent=0, const char *name=0); + RadioStationListView(TQWidget *tqparent=0, const char *name=0); virtual ~RadioStationListView(); - QListViewItem *getItemForIndex(int idx) const; - int getIndexForItem(QListViewItem *) const; + TQListViewItem *getItemForIndex(int idx) const; + int getIndexForItem(TQListViewItem *) const; void setStation(int idx, const RadioStation &, int nr = -1); void appendStation(const RadioStation &, int nr = -1); void setStations(const StationList &); void removeStation(int idx); - void takeItem(QListViewItem *item, int idx); - void insertItem(QListViewItem *item, const QString &stationid, int idx); + void takeItem(TQListViewItem *item, int idx); + void insertItem(TQListViewItem *item, const TQString &stationid, int idx); void setCurrentStation(int idx); int currentStationIndex() const; @@ -57,26 +58,26 @@ public: protected: - QDragObject *dragObject(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - void contentsDragEnterEvent(QDragEnterEvent* event); - void contentsDragMoveEvent(QDragMoveEvent* event); - void contentsDropEvent(QDropEvent* event); + TQDragObject *dragObject(); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + void contentsDragEnterEvent(TQDragEnterEvent* event); + void contentsDragMoveEvent(TQDragMoveEvent* event); + void contentsDropEvent(TQDropEvent* event); protected slots: - void slotStationActivation(QListViewItem *); - void slotCurrentStationChanged(QListViewItem *); + void slotStationActivation(TQListViewItem *); + void slotCurrentStationChanged(TQListViewItem *); signals: void sigStationActivated(int idx); void sigCurrentStationChanged(int idx); - void sigStationsReceived(const QStringList &stationIDs); + void sigStationsReceived(const TQStringList &stationIDs); protected: - QStringList m_StationIDs; + TQStringList m_StationIDs; }; diff --git a/kradio3/src/include/radiostation.h b/kradio3/src/include/radiostation.h index 5c63874..8098d3d 100644 --- a/kradio3/src/include/radiostation.h +++ b/kradio3/src/include/radiostation.h @@ -23,9 +23,9 @@ #endif //#include "utils.h" -#include <qstring.h> -#include <qstringlist.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdict.h> #include <klocale.h> @@ -70,38 +70,38 @@ class RadioStationConfig; class RadioStation { protected: - RadioStation (RegisterStationClass, const QString &classname); + RadioStation (RegisterStationClass, const TQString &classname); public: RadioStation (); - RadioStation (const QString &name, const QString &shortName); + RadioStation (const TQString &name, const TQString &shortName); RadioStation (const RadioStation &); virtual ~RadioStation(); - const QString &stationID() const { return m_stationID; } + const TQString &stationID() const { return m_stationID; } - virtual QString longName() const = 0; - virtual QString description() const = 0; + virtual TQString longName() const = 0; + virtual TQString description() const = 0; - const QString &name() const { return m_name; } - const QString &shortName() const { return m_shortName; } - const QString &iconName() const { return m_iconName; } + const TQString &name() const { return m_name; } + const TQString &shortName() const { return m_shortName; } + const TQString &iconName() const { return m_iconName; } float initialVolume() const { return m_initialVolume; } - void setName (const QString &name) { m_name = name; } - void setShortName (const QString &shortName) { m_shortName = shortName; } - void setIconName (const QString &iconName) { m_iconName = iconName; } + void setName (const TQString &name) { m_name = name; } + void setShortName (const TQString &shortName) { m_shortName = shortName; } + void setIconName (const TQString &iconName) { m_iconName = iconName; } void setInitialVolume(float initialVolume) { m_initialVolume = initialVolume; } void copyDescriptionFrom(const RadioStation &rs); // for XML-Parsing/Export - virtual bool setProperty(const QString &property_name, const QString &val); - virtual QString getProperty(const QString &property_name) const; - virtual QStringList getPropertyNames() const; - virtual QString getClassName() const = 0; + virtual bool setProperty(const TQString &property_name, const TQString &val); + virtual TQString getProperty(const TQString &property_name) const; + virtual TQStringList getPropertyNames() const; + virtual TQString getClassName() const = 0; // get empty derived stations by classname from registry - static RadioStation const *getStationClass(const QString &classname); + static RadioStation const *getStationClass(const TQString &classname); RadioStation const *getStationClass() const { return getStationClass(getClassName()); } // = 0 : "this" is same as "s", e.g. approximately same frequency, same url, ... @@ -125,15 +125,15 @@ public: virtual bool operator != (const RadioStation &x) const { return !operator==(x); } protected : - QString m_stationID; + TQString m_stationID; - QString m_name; - QString m_shortName; + TQString m_name; + TQString m_shortName; float m_initialVolume; // <0: => Don't use - QString m_iconName; + TQString m_iconName; private: - static QDict<RadioStation> *stationClassRegistry; + static TQDict<RadioStation> *stationClassRegistry; }; @@ -147,14 +147,14 @@ class UndefinedRadioStation : public RadioStation public: UndefinedRadioStation (RegisterStationClass) : RadioStation (registerStationClass, getClassName()) {} - virtual QString longName() const { return i18n("unknown"); } - virtual QString description() const { return i18n("unknown"); } + virtual TQString longName() const { return i18n("unknown"); } + virtual TQString description() const { return i18n("unknown"); } virtual bool isValid() const { return false; } virtual RadioStation *copy() const { return new UndefinedRadioStation(*this); } virtual RadioStation *copyNewID() const { RadioStation *x = new UndefinedRadioStation(*this); x->generateNewStationID(); return x; } virtual int compare(const RadioStation &s) const; - virtual QString getClassName() const { return "UndefinedRadioStation"; } + virtual TQString getClassName() const { return "UndefinedRadioStation"; } virtual RadioStationConfig *createEditor() const; }; diff --git a/kradio3/src/include/seekhelper.h b/kradio3/src/include/seekhelper.h index 01d8d86..8baa9a0 100644 --- a/kradio3/src/include/seekhelper.h +++ b/kradio3/src/include/seekhelper.h @@ -33,7 +33,7 @@ public: typedef enum { off, searchWorse, searchBest } state_t; typedef enum { up, down } direction_t; - SeekHelper(ISeekRadio &parent); + SeekHelper(ISeekRadio &tqparent); virtual ~SeekHelper(); virtual bool connectI (Interface *i); @@ -52,7 +52,7 @@ public: RECEIVERS: bool noticePowerChanged (bool /*on*/, const IRadioDevice */*sender*/) { return false; } bool noticeStationChanged (const RadioStation &, const IRadioDevice */*sender*/) { return false; } - bool noticeDescriptionChanged (const QString &, const IRadioDevice */*sender*/) { return false; } + bool noticeDescriptionChanged (const TQString &, const IRadioDevice */*sender*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; } diff --git a/kradio3/src/include/sound_metadata.h b/kradio3/src/include/sound_metadata.h index ceecb9c..a8d2fb2 100644 --- a/kradio3/src/include/sound_metadata.h +++ b/kradio3/src/include/sound_metadata.h @@ -24,23 +24,23 @@ #include <time.h> #include <endian.h> -#include <qstring.h> +#include <tqstring.h> #include <kconfig.h> #include <kurl.h> class SoundMetaData { public: - SoundMetaData (Q_UINT64 pos, time_t rel_ts, time_t abs_ts, const KURL &url = KURL()) + SoundMetaData (TQ_UINT64 pos, time_t rel_ts, time_t abs_ts, const KURL &url = KURL()) : m_DataPosition(pos), m_relativeTimestamp(rel_ts), m_absoluteTimestamp(abs_ts), m_URL(url) {} - Q_UINT64 position() const { return m_DataPosition; } + TQ_UINT64 position() const { return m_DataPosition; } KURL url() const { return m_URL; } time_t relativeTimestamp() const { return m_relativeTimestamp; } time_t absoluteTimestamp() const { return m_absoluteTimestamp; } protected: - Q_UINT64 m_DataPosition; + TQ_UINT64 m_DataPosition; time_t m_relativeTimestamp; time_t m_absoluteTimestamp; KURL m_URL; diff --git a/kradio3/src/include/soundformat.h b/kradio3/src/include/soundformat.h index 0c7a384..ea11f09 100644 --- a/kradio3/src/include/soundformat.h +++ b/kradio3/src/include/soundformat.h @@ -23,7 +23,7 @@ #endif #include <endian.h> -#include <qstring.h> +#include <tqstring.h> #include <kconfig.h> struct SoundFormat { @@ -32,9 +32,9 @@ struct SoundFormat { unsigned m_SampleBits; bool m_IsSigned; unsigned m_Endianess; - QString m_Encoding; // "raw", "mp3", ... (no "wav", because it's only header + raw data) + TQString m_Encoding; // "raw", "mp3", ... (no "wav", because it's only header + raw data) - SoundFormat(unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess, const QString &enc) + SoundFormat(unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess, const TQString &enc) : m_SampleRate(sample_rate), m_Channels(channels), m_SampleBits(sample_bits), m_IsSigned(is_signed), m_Endianess(endianess), m_Encoding(enc) {} SoundFormat(unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess) : m_SampleRate(sample_rate), m_Channels(channels), m_SampleBits(sample_bits), m_IsSigned(is_signed), m_Endianess(endianess), m_Encoding("raw") {} @@ -60,8 +60,8 @@ struct SoundFormat { int minValue() const; int maxValue() const; - void restoreConfig(const QString &prefix, KConfig *c); - void saveConfig(const QString &prefix, KConfig *c) const; + void restoreConfig(const TQString &prefix, KConfig *c); + void saveConfig(const TQString &prefix, KConfig *c) const; int convertSampleToInt(const char *sample, bool do_scale) const; void convertIntToSample(int src, char *dst, bool is_scaled) const; diff --git a/kradio3/src/include/soundstreamclient_interfaces.h b/kradio3/src/include/soundstreamclient_interfaces.h index a3de4ca..310d42a 100644 --- a/kradio3/src/include/soundstreamclient_interfaces.h +++ b/kradio3/src/include/soundstreamclient_interfaces.h @@ -31,7 +31,7 @@ #endif #include <kconfig.h> -#include <qmap.h> +#include <tqmap.h> #include "interfaces.h" #include "soundformat.h" @@ -58,20 +58,20 @@ public: virtual void noticeConnectedI(cmplInterface *i, bool valid); virtual void noticeDisconnectedI(cmplInterface *i, bool valid); - virtual QMap<QString, ISoundStreamClient *> getPlaybackClients() const; - virtual QMap<QString, QString> getPlaybackClientDescriptions() const; - virtual QMap<QString, ISoundStreamClient *> getCaptureClients() const; - virtual QMap<QString, QString> getCaptureClientDescriptions() const; - virtual ISoundStreamClient *getSoundStreamClientWithID(const QString &id) const; + virtual TQMap<TQString, ISoundStreamClient *> getPlaybackClients() const; + virtual TQMap<TQString, TQString> getPlaybackClientDescriptions() const; + virtual TQMap<TQString, ISoundStreamClient *> getCaptureClients() const; + virtual TQMap<TQString, TQString> getCaptureClientDescriptions() const; + virtual ISoundStreamClient *getSoundStreamClientWithID(const TQString &id) const; ANSWERS: - virtual QPtrList<ISoundStreamClient> getPlaybackMixers() const; - virtual QPtrList<ISoundStreamClient> getCaptureMixers() const; + virtual TQPtrList<ISoundStreamClient> getPlaybackMixers() const; + virtual TQPtrList<ISoundStreamClient> getCaptureMixers() const; SENDERS: - IF_SENDER_FINE ( notifyPlaybackChannelsChanged, (const QString &/*client_id*/, const QStringList &) ) - IF_SENDER_FINE ( notifyCaptureChannelsChanged, (const QString &/*client_id*/, const QStringList &) ) + IF_SENDER_FINE ( notifyPlaybackChannelsChanged, (const TQString &/*client_id*/, const TQStringList &) ) + IF_SENDER_FINE ( notifyCaptureChannelsChanged, (const TQString &/*client_id*/, const TQStringList &) ) IF_SENDER_FINE ( sendPlaybackVolume, (SoundStreamID /*id*/, float /*volume*/) ) IF_SENDER_FINE ( sendCaptureVolume, (SoundStreamID /*id*/, float /*volume*/) ) @@ -107,7 +107,7 @@ SENDERS: IF_SENDER_FINE ( queryIsMuted, (SoundStreamID /*id*/, bool &) ) - // sendPreparePlayback/sendPrepareCapture don't make sense for multiple receivers + // sendPreparePlayback/sendPrepareCapture don't make sense for multiple tqreceivers IF_SENDER_FINE ( sendReleasePlayback, (SoundStreamID id) ) IF_SENDER_FINE ( sendReleaseCapture, (SoundStreamID id) ) @@ -133,9 +133,9 @@ SENDERS: IF_SENDER_FINE ( sendStopRecording, (SoundStreamID id) ) IF_SENDER_FINE ( queryIsRecordingRunning, (SoundStreamID id, bool &running, SoundFormat &sf)) - IF_SENDER_FINE ( querySoundStreamDescription, (SoundStreamID id, QString &descr) ) + IF_SENDER_FINE ( querySoundStreamDescription, (SoundStreamID id, TQString &descr) ) IF_SENDER_FINE ( querySoundStreamRadioStation, (SoundStreamID id, const RadioStation *&rs)) - IF_SENDER_FINE ( queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &) ) + IF_SENDER_FINE ( queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &) ) IF_SENDER_FINE ( notifySoundStreamCreated, (SoundStreamID id) ) IF_SENDER_FINE ( notifySoundStreamClosed, (SoundStreamID id) ) @@ -171,8 +171,8 @@ public: // direct playback / capture device functions RECEIVERS: - IF_RECEIVER_EMPTY( preparePlayback(SoundStreamID /*id*/, const QString &/*channel*/, bool /*active_mode*/, bool /*start_immediately = false*/) ) - IF_RECEIVER_EMPTY( prepareCapture(SoundStreamID /*id*/, const QString &/*channel*/) ) + IF_RECEIVER_EMPTY( preparePlayback(SoundStreamID /*id*/, const TQString &/*channel*/, bool /*active_mode*/, bool /*start_immediately = false*/) ) + IF_RECEIVER_EMPTY( prepareCapture(SoundStreamID /*id*/, const TQString &/*channel*/) ) IF_RECEIVER_EMPTY( releasePlayback(SoundStreamID /*id*/) ) IF_RECEIVER_EMPTY( releaseCapture(SoundStreamID /*id*/) ) @@ -180,29 +180,29 @@ ANSWERS: virtual bool supportsPlayback() const { return false; } virtual bool supportsCapture() const { return false; } - virtual const QString &getSoundStreamClientID() const; - virtual QString getSoundStreamClientDescription() const { return QString::null; } + virtual const TQString &getSoundStreamClientID() const; + virtual TQString getSoundStreamClientDescription() const { return TQString(); } - virtual QMap<QString, ISoundStreamClient *> getPlaybackClients() const; - virtual QMap<QString, QString> getPlaybackClientDescriptions() const; - virtual QMap<QString, ISoundStreamClient *> getCaptureClients() const; - virtual QMap<QString, QString> getCaptureClientDescriptions() const; - virtual ISoundStreamClient *getSoundStreamClientWithID(const QString &id) const; + virtual TQMap<TQString, ISoundStreamClient *> getPlaybackClients() const; + virtual TQMap<TQString, TQString> getPlaybackClientDescriptions() const; + virtual TQMap<TQString, ISoundStreamClient *> getCaptureClients() const; + virtual TQMap<TQString, TQString> getCaptureClientDescriptions() const; + virtual ISoundStreamClient *getSoundStreamClientWithID(const TQString &id) const; // device mixer functions -QUERIES: - IF_QUERY ( QPtrList<ISoundStreamClient> queryPlaybackMixers() ); - IF_QUERY ( QPtrList<ISoundStreamClient> queryCaptureMixers() ); +TQUERIES: + IF_TQUERY ( TQPtrList<ISoundStreamClient> queryPlaybackMixers() ); + IF_TQUERY ( TQPtrList<ISoundStreamClient> queryCaptureMixers() ); ANSWERS: - virtual const QStringList &getPlaybackChannels() const; - virtual const QStringList &getCaptureChannels() const; + virtual const TQStringList &getPlaybackChannels() const; + virtual const TQStringList &getCaptureChannels() const; RECEIVERS: - IF_RECEIVER_EMPTY( noticePlaybackChannelsChanged(const QString & /*client_id*/, const QStringList &/*channels*/) ); - IF_RECEIVER_EMPTY( noticeCaptureChannelsChanged (const QString & /*client_id*/, const QStringList &/*channels*/) ); + IF_RECEIVER_EMPTY( noticePlaybackChannelsChanged(const TQString & /*client_id*/, const TQStringList &/*channels*/) ); + IF_RECEIVER_EMPTY( noticeCaptureChannelsChanged (const TQString & /*client_id*/, const TQStringList &/*channels*/) ); RECEIVERS: @@ -262,10 +262,10 @@ RECEIVERS: IF_RECEIVER_EMPTY( stopRecording(SoundStreamID /*id*/) ) IF_RECEIVER_EMPTY( isRecordingRunning(SoundStreamID /*id*/, bool &/*running*/, SoundFormat &/*sf*/) const ) - IF_RECEIVER_EMPTY( getSoundStreamDescription(SoundStreamID /*id*/, QString &/*descr*/) const ) + IF_RECEIVER_EMPTY( getSoundStreamDescription(SoundStreamID /*id*/, TQString &/*descr*/) const ) IF_RECEIVER_EMPTY( getSoundStreamRadioStation(SoundStreamID /*id*/, const RadioStation *&/*rs*/) const ) - IF_RECEIVER_EMPTY( enumerateSoundStreams(QMap<QString, SoundStreamID> &/*list*/) const ) + IF_RECEIVER_EMPTY( enumerateSoundStreams(TQMap<TQString, SoundStreamID> &/*list*/) const ) IF_RECEIVER_EMPTY( noticeSoundStreamCreated(SoundStreamID /*id*/) ) IF_RECEIVER_EMPTY( noticeSoundStreamClosed(SoundStreamID /*id*/) ) @@ -278,8 +278,8 @@ RECEIVERS: IF_RECEIVER_EMPTY( noticeReadyForPlaybackData(SoundStreamID /*id*/, size_t /*size*/) ) SENDERS: - CALL_SNDSTR_SERVER ( notifyPlaybackChannelsChanged, (const QString &client_id, const QStringList &map), (client_id, map) ) - CALL_SNDSTR_SERVER ( notifyCaptureChannelsChanged, (const QString &client_id, const QStringList &map), (client_id, map) ) + CALL_SNDSTR_SERVER ( notifyPlaybackChannelsChanged, (const TQString &client_id, const TQStringList &map), (client_id, map) ) + CALL_SNDSTR_SERVER ( notifyCaptureChannelsChanged, (const TQString &client_id, const TQStringList &map), (client_id, map) ) CALL_SNDSTR_SERVER ( sendPlaybackVolume, (SoundStreamID id, float volume), (id, volume) ) CALL_SNDSTR_SERVER ( sendCaptureVolume, (SoundStreamID id, float volume), (id, volume) ) @@ -315,7 +315,7 @@ SENDERS: CALL_SNDSTR_SERVER ( queryIsMuted, (SoundStreamID id, bool &v), (id, v) ) - // sendPreparePlayback/sendPrepareCapture don't make sense for multiple receivers + // sendPreparePlayback/sendPrepareCapture don't make sense for multiple tqreceivers CALL_SNDSTR_SERVER ( sendReleasePlayback, (SoundStreamID id), (id) ) CALL_SNDSTR_SERVER ( sendReleaseCapture, (SoundStreamID id), (id) ) @@ -339,10 +339,10 @@ SENDERS: CALL_SNDSTR_SERVER ( sendStopRecording, (SoundStreamID id), (id) ) CALL_SNDSTR_SERVER ( queryIsRecordingRunning, (SoundStreamID id, bool &b, SoundFormat &sf), (id, b, sf) ) - CALL_SNDSTR_SERVER ( querySoundStreamDescription, (SoundStreamID id, QString &descr), (id, descr) ) + CALL_SNDSTR_SERVER ( querySoundStreamDescription, (SoundStreamID id, TQString &descr), (id, descr) ) CALL_SNDSTR_SERVER ( querySoundStreamRadioStation,(SoundStreamID id, const RadioStation *&rs), (id, rs) ) - CALL_SNDSTR_SERVER ( queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &list), (list) ) + CALL_SNDSTR_SERVER ( queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &list), (list) ) CALL_SNDSTR_SERVER ( notifySoundStreamCreated, (SoundStreamID id), (id) ) CALL_SNDSTR_SERVER ( notifySoundStreamClosed, (SoundStreamID id), (id) ) @@ -360,10 +360,10 @@ protected: SoundStreamID createNewSoundStream(SoundStreamID old_id, bool notify = true) const; void closeSoundStream(SoundStreamID id, bool notify = true); - static QString createNewSoundStreamClientID(); - void setSoundStreamClientID(const QString &s); + static TQString createNewSoundStreamClientID(); + void setSoundStreamClientID(const TQString &s); - QString m_SoundStreamClientID; + TQString m_SoundStreamClientID; cmplInterface *m_Server; }; diff --git a/kradio3/src/include/soundstreamid.h b/kradio3/src/include/soundstreamid.h index e7aa4d5..4133103 100644 --- a/kradio3/src/include/soundstreamid.h +++ b/kradio3/src/include/soundstreamid.h @@ -44,7 +44,7 @@ public: bool HasSamePhysicalID(const SoundStreamID &x) const { return m_PhysicalID == x.m_PhysicalID; } bool isValid() const { return m_ID != 0; } // m_PhysicalID is not checked! - void invalidate(); + void tqinvalidate(); static const SoundStreamID InvalidID; diff --git a/kradio3/src/include/standardscandialog.h b/kradio3/src/include/standardscandialog.h index 475457b..bab8bf1 100644 --- a/kradio3/src/include/standardscandialog.h +++ b/kradio3/src/include/standardscandialog.h @@ -27,8 +27,8 @@ #include "radio_interfaces.h" #include "stationlist.h" -#include <qtimer.h> -#include <qdatetime.h> +#include <tqtimer.h> +#include <tqdatetime.h> class StandardScanDialog : public StandardScanDialogUI, public ISeekRadioClient, @@ -36,8 +36,9 @@ class StandardScanDialog : public StandardScanDialogUI, public IRadioClient { Q_OBJECT + TQ_OBJECT public: - StandardScanDialog(QWidget *parent); + StandardScanDialog(TQWidget *tqparent); ~StandardScanDialog(); bool connectI (Interface *i); @@ -75,7 +76,7 @@ RECEIVERS: bool noticePowerChanged(bool on); bool noticeStationChanged (const RadioStation &, int /*idx*/){ return false; } bool noticeStationsChanged(const StationList &/*sl*/) { return false; } - bool noticePresetFileChanged(const QString &/*f*/) { return false; } + bool noticePresetFileChanged(const TQString &/*f*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; } @@ -89,7 +90,7 @@ protected: bool m_running; bool m_oldPowerOn; RadioStation *m_oldStation; - QDateTime m_startTime; + TQDateTime m_startTime; StationList m_stations; diff --git a/kradio3/src/include/station-drag-object.h b/kradio3/src/include/station-drag-object.h index d65e7a6..5796dd0 100644 --- a/kradio3/src/include/station-drag-object.h +++ b/kradio3/src/include/station-drag-object.h @@ -18,21 +18,21 @@ #ifndef KRADIO_STATION_DRAG_OBJECT_H #define KRADIO_STATION_DRAG_OBJECT_H -#include <qdragobject.h> +#include <tqdragobject.h> -class StationDragObject : public QStoredDrag +class StationDragObject : public TQStoredDrag { public: - StationDragObject(const QStringList &stationIDs, QWidget *dragSource = NULL, const char * name = NULL); - StationDragObject(QWidget *dragSource = NULL, const char * name = NULL); + StationDragObject(const TQStringList &stationIDs, TQWidget *dragSource = NULL, const char * name = NULL); + StationDragObject(TQWidget *dragSource = NULL, const char * name = NULL); virtual ~StationDragObject(); const char *format(int i = 0) const; - void setStations(const QStringList &stationIDs); + void setStations(const TQStringList &stationIDs); - static bool canDecode (const QMimeSource *e); - static bool decode (const QMimeSource *e, QStringList &stationIDs); + static bool canDecode (const TQMimeSource *e); + static bool decode (const TQMimeSource *e, TQStringList &stationIDs); }; #endif diff --git a/kradio3/src/include/stationlist.h b/kradio3/src/include/stationlist.h index 70fbd32..5e259e7 100644 --- a/kradio3/src/include/stationlist.h +++ b/kradio3/src/include/stationlist.h @@ -25,7 +25,7 @@ #include "stationlistmetadata.h" #include "errorlog-interfaces.h" -#include <qptrlist.h> +#include <tqptrlist.h> class RadioStation; class KURL; @@ -42,7 +42,7 @@ class KURL; take place very often and thus are not critical. - Why don't we use QValueList then? + Why don't we use TQValueList then? We are using polymorphic radio stations, thus we cannot use a template using instances of a base class and copying them with a copy constructor. @@ -52,12 +52,12 @@ class KURL; */ -class RawStationList : public QPtrList<RadioStation> +class RawStationList : public TQPtrList<RadioStation> { public: - typedef QPtrListIterator<RadioStation> Iterator; - typedef QPtrList<RadioStation> BaseClass; + typedef TQPtrListIterator<RadioStation> Iterator; + typedef TQPtrList<RadioStation> BaseClass; public: RawStationList (); @@ -72,24 +72,24 @@ public: void inSort (const RadioStation *item); void prepend (const RadioStation *item); void append (const RadioStation *item); - bool replace (uint index, const RadioStation *item); + bool tqreplace (uint index, const RadioStation *item); // simplify stationIDSearch - const RadioStation & stationWithID(const QString &sid) const; - RadioStation & stationWithID(const QString &sid); + const RadioStation & stationWithID(const TQString &sid) const; + RadioStation & stationWithID(const TQString &sid); - int idxWithID(const QString &sid) const; + int idxWithID(const TQString &sid) const; bool operator == (const RawStationList &l) const; bool operator != (const RawStationList &l) const { return !operator==(l); } protected: - QPtrCollection::Item newItem (QPtrCollection::Item s); - void deleteItem (QPtrCollection::Item s); + TQPtrCollection::Item newItem (TQPtrCollection::Item s); + void deleteItem (TQPtrCollection::Item s); - int compareItems (QPtrCollection::Item a, QPtrCollection::Item b); + int compareItems (TQPtrCollection::Item a, TQPtrCollection::Item b); }; @@ -112,8 +112,8 @@ public: const RadioStation & at(int idx) const; RadioStation & at(int idx); - const RadioStation & stationWithID(const QString &sid) const; - RadioStation & stationWithID(const QString &sid); + const RadioStation & stationWithID(const TQString &sid) const; + RadioStation & stationWithID(const TQString &sid); // all stations, with full access RawStationList & all() { return m_all; } @@ -123,7 +123,7 @@ public: StationListMetaData & metaData() { return m_metaData; } StationListMetaData const & metaData() const { return m_metaData; } - // we do not need a special matchingStation/find/... method because + // we do not need a special matchingStation/tqfind/... method because // it is already implemented in RawStationList /** @@ -138,10 +138,10 @@ public: // xml in/out - bool readXML (const QString &dat, const IErrorLogClient &logger, bool enableMessageBox = true); + bool readXML (const TQString &dat, const IErrorLogClient &logger, bool enableMessageBox = true); bool readXML (const KURL &url, const IErrorLogClient &logger, bool enableMessageBox = true); - QString writeXML (const IErrorLogClient &logger) const; + TQString writeXML (const IErrorLogClient &logger) const; bool writeXML (const KURL &url, const IErrorLogClient &logger, bool enableMessageBox = true) const; diff --git a/kradio3/src/include/stationlistmetadata.h b/kradio3/src/include/stationlistmetadata.h index 36adb29..00f54f3 100644 --- a/kradio3/src/include/stationlistmetadata.h +++ b/kradio3/src/include/stationlistmetadata.h @@ -24,8 +24,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> /** * Meta Data about a stationlist @@ -34,12 +34,12 @@ class StationListMetaData { public: - QString maintainer; - QDateTime lastChange; - QString country; - QString city; - QString media; - QString comment; + TQString maintainer; + TQDateTime lastChange; + TQString country; + TQString city; + TQString media; + TQString comment; bool operator != (const StationListMetaData &x) const { return !operator ==(x); } bool operator == (const StationListMetaData &x) const { diff --git a/kradio3/src/include/stationlistxmlhandler.h b/kradio3/src/include/stationlistxmlhandler.h index 7386933..dccd697 100644 --- a/kradio3/src/include/stationlistxmlhandler.h +++ b/kradio3/src/include/stationlistxmlhandler.h @@ -21,16 +21,16 @@ #include <config.h> #endif -#include <qxml.h> -#include <qobject.h> +#include <tqxml.h> +#include <tqobject.h> #include "radiostation.h" #include "stationlist.h" -class StationListXmlHandler : public QXmlDefaultHandler +class StationListXmlHandler : public TQXmlDefaultHandler { protected: - QStringList m_status; + TQStringList m_status; const IErrorLogClient&m_logger; RawStationList m_stations; @@ -44,11 +44,11 @@ public : StationListXmlHandler (const IErrorLogClient &logger); virtual ~StationListXmlHandler (); bool startDocument (); - bool startElement (const QString &ns, const QString &localname, - const QString& qname, const QXmlAttributes &); - bool endElement (const QString &ns, const QString &localname, - const QString &qname); - bool characters (const QString &ch); + bool startElement (const TQString &ns, const TQString &localname, + const TQString& qname, const TQXmlAttributes &); + bool endElement (const TQString &ns, const TQString &localname, + const TQString &qname); + bool characters (const TQString &ch); const RawStationList &getStations() const { return m_stations; } const StationListMetaData &getMetaData() const { return m_metaData; } diff --git a/kradio3/src/include/stationselection_interfaces.h b/kradio3/src/include/stationselection_interfaces.h index a571147..3d24eee 100644 --- a/kradio3/src/include/stationselection_interfaces.h +++ b/kradio3/src/include/stationselection_interfaces.h @@ -24,7 +24,7 @@ #include "interfaces.h" -class QStringList; +class TQStringList; INTERFACE(IStationSelection, IStationSelectionClient) { @@ -32,13 +32,13 @@ public : IF_CON_DESTRUCTOR(IStationSelection, -1) RECEIVERS: - IF_RECEIVER( setStationSelection(const QStringList &sl) ) + IF_RECEIVER( setStationSelection(const TQStringList &sl) ) SENDERS: - IF_SENDER ( notifyStationSelectionChanged(const QStringList &sl) ) + IF_SENDER ( notifyStationSelectionChanged(const TQStringList &sl) ) ANSWERS: - IF_ANSWER ( const QStringList & getStationSelection () const ) + IF_ANSWER ( const TQStringList & getStationSelection () const ) }; @@ -49,13 +49,13 @@ public : IF_CON_DESTRUCTOR(IStationSelectionClient, 1) SENDERS: - IF_SENDER ( sendStationSelection(const QStringList &sl) ) + IF_SENDER ( sendStationSelection(const TQStringList &sl) ) RECEIVERS: - IF_RECEIVER( noticeStationSelectionChanged(const QStringList &sl) ) + IF_RECEIVER( noticeStationSelectionChanged(const TQStringList &sl) ) -QUERIES: - IF_QUERY ( const QStringList & queryStationSelection () ) +TQUERIES: + IF_TQUERY ( const TQStringList & queryStationSelection () ) RECEIVERS: diff --git a/kradio3/src/include/stationselector.h b/kradio3/src/include/stationselector.h index 6842877..432b870 100644 --- a/kradio3/src/include/stationselector.h +++ b/kradio3/src/include/stationselector.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qstringlist.h> +#include <tqstringlist.h> #include "radio_interfaces.h" #include "stationselection_interfaces.h" @@ -39,8 +39,9 @@ class StationSelector : public StationSelectorUI, public IStationSelectionClient { Q_OBJECT + TQ_OBJECT public : - StationSelector (QWidget *parent); + StationSelector (TQWidget *tqparent); ~StationSelector (); bool connectI (Interface *i); @@ -48,14 +49,14 @@ public : // IStationSelectionClient - bool noticeStationSelectionChanged(const QStringList &sl); + bool noticeStationSelectionChanged(const TQStringList &sl); // IRadioClient bool noticePowerChanged(bool /*on*/) { return false; } bool noticeStationChanged (const RadioStation &, int /*idx*/) { return false; } bool noticeStationsChanged(const StationList &sl); - bool noticePresetFileChanged(const QString &/*f*/) { return false; } + bool noticePresetFileChanged(const TQString &/*f*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID) { return false; } @@ -68,8 +69,8 @@ protected slots: void slotButtonToLeft(); void slotButtonToRight(); - void slotMoveToRight(const QStringList &list); - void slotMoveToLeft(const QStringList &list); + void slotMoveToRight(const TQStringList &list); + void slotMoveToLeft(const TQStringList &list); void slotOK(); void slotCancel(); @@ -81,14 +82,14 @@ signals: protected: - void moveItem (RadioStationListView *fromListView, QStringList &fromIDList, - QListViewItem *item, int fromIdx, - RadioStationListView *toListView, QStringList &toIDList); + void moveItem (RadioStationListView *fromListView, TQStringList &fromIDList, + TQListViewItem *item, int fromIdx, + RadioStationListView *toListView, TQStringList &toIDList); void updateListViews(); // station ids - QStringList m_stationIDsAvailable, + TQStringList m_stationIDsAvailable, m_stationIDsSelected, m_stationIDsNotDisplayed, m_stationIDsAll; diff --git a/kradio3/src/include/timecontrol_interfaces.h b/kradio3/src/include/timecontrol_interfaces.h index ad743a4..10b114c 100644 --- a/kradio3/src/include/timecontrol_interfaces.h +++ b/kradio3/src/include/timecontrol_interfaces.h @@ -50,18 +50,18 @@ SENDERS: IF_SENDER ( notifyAlarmsChanged(const AlarmVector &sl) ) IF_SENDER ( notifyAlarm(const Alarm &) ) IF_SENDER ( notifyNextAlarmChanged(const Alarm *) ) - IF_SENDER ( notifyCountdownStarted(const QDateTime &end) ) + IF_SENDER ( notifyCountdownStarted(const TQDateTime &end) ) IF_SENDER ( notifyCountdownStopped() ) IF_SENDER ( notifyCountdownZero() ) IF_SENDER ( notifyCountdownSecondsChanged(int n) ) ANSWERS: - IF_ANSWER ( QDateTime getNextAlarmTime () const ) + IF_ANSWER ( TQDateTime getNextAlarmTime () const ) IF_ANSWER ( const Alarm* getNextAlarm () const ) IF_ANSWER ( const AlarmVector & getAlarms () const ) IF_ANSWER ( int getCountdownSeconds () const ) - IF_ANSWER ( QDateTime getCountdownEnd () const ) + IF_ANSWER ( TQDateTime getCountdownEnd () const ) }; @@ -82,18 +82,18 @@ RECEIVERS: IF_RECEIVER( noticeAlarmsChanged(const AlarmVector &sl) ) IF_RECEIVER( noticeAlarm(const Alarm &) ) IF_RECEIVER( noticeNextAlarmChanged(const Alarm *) ) - IF_RECEIVER( noticeCountdownStarted(const QDateTime &end) ) + IF_RECEIVER( noticeCountdownStarted(const TQDateTime &end) ) IF_RECEIVER( noticeCountdownStopped() ) IF_RECEIVER( noticeCountdownZero() ) IF_RECEIVER( noticeCountdownSecondsChanged(int n) ) -QUERIES: - IF_QUERY ( QDateTime queryNextAlarmTime() ) - IF_QUERY ( const Alarm* queryNextAlarm () ) - IF_QUERY ( const AlarmVector & queryAlarms () ) - IF_QUERY ( int queryCountdownSeconds () ) - IF_QUERY ( QDateTime queryCountdownEnd () ) +TQUERIES: + IF_TQUERY ( TQDateTime queryNextAlarmTime() ) + IF_TQUERY ( const Alarm* queryNextAlarm () ) + IF_TQUERY ( const AlarmVector & queryAlarms () ) + IF_TQUERY ( int queryCountdownSeconds () ) + IF_TQUERY ( TQDateTime queryCountdownEnd () ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool /*pointer_valid*/); diff --git a/kradio3/src/include/utils.h b/kradio3/src/include/utils.h index 4e93293..037a2e3 100644 --- a/kradio3/src/include/utils.h +++ b/kradio3/src/include/utils.h @@ -27,19 +27,19 @@ using namespace std; #include <kconfig.h> #include <klocale.h> #include <kdebug.h> -#include <qstring.h> +#include <tqstring.h> #define __USE_ISOC99 1 #include <math.h> //extern const char *mixerChannelLabels[]; //extern const char *mixerChannelNames[]; -extern QString XMLEscape (const QString &s); -QString xmlOpenTag (const QString &tag, bool newline = true); -QString xmlTag (const QString &tag, const QString &s, bool newline = true); -QString xmlTag (const QString &tag, int i, bool newline = true); -QString xmlTag (const QString &tag, float f, bool newline = true); -QString xmlCloseTag (const QString &tag, bool newline = true); +extern TQString XMLEscape (const TQString &s); +TQString xmlOpenTag (const TQString &tag, bool newline = true); +TQString xmlTag (const TQString &tag, const TQString &s, bool newline = true); +TQString xmlTag (const TQString &tag, int i, bool newline = true); +TQString xmlTag (const TQString &tag, float f, bool newline = true); +TQString xmlCloseTag (const TQString &tag, bool newline = true); template<class T1, class T2> inline T1 min (T1 a, T2 b) { return a < b ? a : b; } template<class T1, class T2> inline T1 max (T1 a, T2 b) { return a < b ? b : a; } diff --git a/kradio3/src/include/widgetplugins.h b/kradio3/src/include/widgetplugins.h index c138df3..c3339c4 100644 --- a/kradio3/src/include/widgetplugins.h +++ b/kradio3/src/include/widgetplugins.h @@ -24,23 +24,23 @@ #include "plugins.h" -class QWidget; +class TQWidget; class WidgetPluginBase : public PluginBase { public : - WidgetPluginBase(const QString &name, const QString &description); + WidgetPluginBase(const TQString &name, const TQString &description); virtual void saveState (KConfig *) const; virtual void restoreState (KConfig *); virtual void restoreState (KConfig *, bool showByDefault); virtual void startPlugin(); - virtual QWidget *getWidget() = 0; - virtual const QWidget *getWidget() const = 0; + virtual TQWidget *getWidget() = 0; + virtual const TQWidget *getWidget() const = 0; - virtual bool isReallyVisible(const QWidget *w = NULL) const; - virtual bool isAnywhereVisible(const QWidget *w = NULL) const; + virtual bool isReallyVisible(const TQWidget *w = NULL) const; + virtual bool isAnywhereVisible(const TQWidget *w = NULL) const; virtual void showOnOrgDesktop () = 0; protected: @@ -50,12 +50,12 @@ protected: virtual void pHide (); virtual void pToggleShown (); - virtual void pShowEvent(QShowEvent *); - virtual void pHideEvent(QHideEvent *); + virtual void pShowEvent(TQShowEvent *); + virtual void pHideEvent(TQHideEvent *); virtual void notifyManager(bool shown); - virtual void getKWinState(const QWidget *w = NULL) const; + virtual void getKWinState(const TQWidget *w = NULL) const; protected: // temporary data @@ -64,7 +64,7 @@ protected: mutable bool m_saveMaximized; mutable bool m_saveSticky; mutable int m_saveDesktop; - mutable QRect m_saveGeometry; + mutable TQRect m_saveGeometry; bool m_geoRestoreFlag; bool m_restoreShow; |