diff options
Diffstat (limited to 'kradio3/src')
73 files changed, 1347 insertions, 1334 deletions
diff --git a/kradio3/src/aboutwidget.cpp b/kradio3/src/aboutwidget.cpp index 5039c2d..3fbba1c 100644 --- a/kradio3/src/aboutwidget.cpp +++ b/kradio3/src/aboutwidget.cpp @@ -22,16 +22,16 @@ #include "include/kradioversion.h" #include "include/aboutwidget.h" -#include <qframe.h> +#include <tqframe.h> #include <kaboutdialog.h> -#include <qtabwidget.h> -#include <qlayout.h> -#include <qtabbar.h> -#include <qimage.h> +#include <tqtabwidget.h> +#include <tqlayout.h> +#include <tqtabbar.h> +#include <tqimage.h> #include <kglobalsettings.h> #include <ktextbrowser.h> -#include <qtextedit.h> +#include <tqtextedit.h> #include <kdebug.h> #include <kapplication.h> #include <klocale.h> @@ -41,12 +41,12 @@ // copied (and renamed) from kaboutdialog.cpp // original: KAboutTabWidget -class KRadioAboutTabWidget : public QTabWidget +class KRadioAboutTabWidget : public TQTabWidget { public: - KRadioAboutTabWidget( QWidget* parent ) : QTabWidget( parent ) {} - QSize sizeHint() const { - return QTabWidget::sizeHint().expandedTo( tabBar()->sizeHint() + QSize(4,4) ); + KRadioAboutTabWidget( TQWidget* tqparent ) : TQTabWidget( tqparent ) {} + TQSize tqsizeHint() const { + return TQTabWidget::tqsizeHint().expandedTo( tabBar()->tqsizeHint() + TQSize(4,4) ); } }; @@ -54,49 +54,49 @@ public: // copied (renamed and extended) from kaboutdialog.cpp // original: KAboutContainerBase -KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int layoutType, QWidget *_parent, +KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int tqlayoutType, TQWidget *_parent, char *_name ) - : QWidget( _parent, _name ), + : TQWidget( _parent, _name ), mImageLabel(0), mTitleLabel(0), mIconLabel(0),mVersionLabel(0), mAuthorLabel(0), mImageFrame(0),mPageTab(0),mPlainSpace(0) { - mTopLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + mTopLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); if( mTopLayout == 0 ) { return; } - if( layoutType & AbtImageOnly ) + if( tqlayoutType & AbtImageOnly ) { - layoutType &= ~(AbtImageLeft|AbtImageRight|AbtTabbed|AbtPlain); + tqlayoutType &= ~(AbtImageLeft|AbtImageRight|AbtTabbed|AbtPlain); } - if( layoutType & AbtImageLeft ) + if( tqlayoutType & AbtImageLeft ) { - layoutType &= ~AbtImageRight; + tqlayoutType &= ~AbtImageRight; } - if( layoutType & AbtTitle ) + if( tqlayoutType & AbtTitle ) { - mTitleLabel = new QLabel( this, "title" ); - mTitleLabel->setAlignment(AlignCenter); + mTitleLabel = new TQLabel( this, "title" ); + mTitleLabel->tqsetAlignment(AlignCenter); mTopLayout->addWidget( mTitleLabel ); mTopLayout->addSpacing( KDialog::spacingHint() ); } - if( layoutType & AbtProduct ) + if( tqlayoutType & AbtProduct ) { - QWidget *productArea = new QWidget( this, "area" ); + TQWidget *productArea = new TQWidget( this, "area" ); mTopLayout->addWidget( productArea, 0, AlignLeft ); - QHBoxLayout *hbox = new QHBoxLayout(productArea,0,KDialog::spacingHint()); + TQHBoxLayout *hbox = new TQHBoxLayout(productArea,0,KDialog::spacingHint()); if( hbox == 0 ) { return; } - mIconLabel = new QLabel( productArea ); + mIconLabel = new TQLabel( productArea ); hbox->addWidget( mIconLabel, 0, AlignLeft|AlignHCenter ); - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); if( vbox == 0 ) { return; } hbox->addLayout( vbox ); - mVersionLabel = new QLabel( productArea, "version" ); - mAuthorLabel = new QLabel( productArea, "author" ); + mVersionLabel = new TQLabel( productArea, "version" ); + mAuthorLabel = new TQLabel( productArea, "author" ); vbox->addWidget( mVersionLabel ); vbox->addWidget( mAuthorLabel ); hbox->activate(); @@ -104,75 +104,75 @@ KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int layoutType mTopLayout->addSpacing( KDialog::spacingHint() ); } - QHBoxLayout *hbox = new QHBoxLayout(); + TQHBoxLayout *hbox = new TQHBoxLayout(); if( hbox == 0 ) { return; } mTopLayout->addLayout( hbox, 10 ); - if( layoutType & AbtImageLeft ) + if( tqlayoutType & AbtImageLeft ) { - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); hbox->addLayout(vbox); vbox->addSpacing(1); - mImageFrame = new QFrame( this ); + mImageFrame = new TQFrame( this ); setImageFrame( true ); vbox->addWidget( mImageFrame ); vbox->addSpacing(1); - vbox = new QVBoxLayout( mImageFrame, 1 ); + vbox = new TQVBoxLayout( mImageFrame, 1 ); mImageLabel = new KRadioImageTrackLabel( mImageFrame ); - connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )), - SLOT( slotMouseTrack( int, const QMouseEvent * )) ); + connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); vbox->addStretch(10); vbox->addWidget( mImageLabel ); vbox->addStretch(10); vbox->activate(); } - if( layoutType & AbtTabbed ) + if( tqlayoutType & AbtTabbed ) { mPageTab = new KRadioAboutTabWidget( this ); if( mPageTab == 0 ) { return; } hbox->addWidget( mPageTab, 10 ); } - else if( layoutType & AbtImageOnly ) + else if( tqlayoutType & AbtImageOnly ) { - mImageFrame = new QFrame( this ); + mImageFrame = new TQFrame( this ); setImageFrame( true ); hbox->addWidget( mImageFrame, 10 ); - QGridLayout *gbox = new QGridLayout(mImageFrame, 3, 3, 1, 0 ); + TQGridLayout *gbox = new TQGridLayout(mImageFrame, 3, 3, 1, 0 ); gbox->setRowStretch( 0, 10 ); gbox->setRowStretch( 2, 10 ); gbox->setColStretch( 0, 10 ); gbox->setColStretch( 2, 10 ); mImageLabel = new KRadioImageTrackLabel( mImageFrame ); - connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )), - SLOT( slotMouseTrack( int, const QMouseEvent * )) ); + connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); gbox->addWidget( mImageLabel, 1, 1 ); gbox->activate(); } else { - mPlainSpace = new QFrame( this ); + mPlainSpace = new TQFrame( this ); if( mPlainSpace == 0 ) { return; } hbox->addWidget( mPlainSpace, 10 ); } - if( layoutType & AbtImageRight ) + if( tqlayoutType & AbtImageRight ) { - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); hbox->addLayout(vbox); vbox->addSpacing(1); - mImageFrame = new QFrame( this ); + mImageFrame = new TQFrame( this ); setImageFrame( true ); vbox->addWidget( mImageFrame ); vbox->addSpacing(1); - vbox = new QVBoxLayout( mImageFrame, 1 ); + vbox = new TQVBoxLayout( mImageFrame, 1 ); mImageLabel = new KRadioImageTrackLabel( mImageFrame ); - connect( mImageLabel, SIGNAL(mouseTrack( int, const QMouseEvent * )), - SLOT( slotMouseTrack( int, const QMouseEvent * )) ); + connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); vbox->addStretch(10); vbox->addWidget( mImageLabel ); vbox->addStretch(10); @@ -187,19 +187,19 @@ KRadioAboutWidget::KRadioAboutWidget(const KAboutData &aboutData, int layoutType void KRadioAboutWidget::show( void ) { - QWidget::show(); + TQWidget::show(); } -QSize KRadioAboutWidget::sizeHint( void ) const +TQSize KRadioAboutWidget::tqsizeHint( void ) const { - return minimumSize().expandedTo( QSize( QWidget::sizeHint().width(), 0 ) ); + return tqminimumSize().expandedTo( TQSize( TQWidget::tqsizeHint().width(), 0 ) ); } -void KRadioAboutWidget::fontChange( const QFont &/*oldFont*/ ) +void KRadioAboutWidget::fontChange( const TQFont &/*oldFont*/ ) { if( mTitleLabel != 0 ) { - QFont f( KGlobalSettings::generalFont() ); + TQFont f( KGlobalSettings::generalFont() ); f.setBold( true ); f.setPointSize( 14 ); // Perhaps changeable ? mTitleLabel->setFont(f); @@ -207,64 +207,64 @@ void KRadioAboutWidget::fontChange( const QFont &/*oldFont*/ ) if( mVersionLabel != 0 ) { - QFont f( KGlobalSettings::generalFont() ); + TQFont f( KGlobalSettings::generalFont() ); f.setBold( true ); mVersionLabel->setFont(f); mAuthorLabel->setFont(f); - mVersionLabel->parentWidget()->layout()->activate(); + mVersionLabel->tqparentWidget()->tqlayout()->activate(); } update(); } -QFrame *KRadioAboutWidget::addTextPage( const QString &title, - const QString &text, +TQFrame *KRadioAboutWidget::addTextPage( const TQString &title, + const TQString &text, bool richText, int numLines ) { - QFrame *page = addEmptyPage( title ); + TQFrame *page = addEmptyPage( title ); if( page == 0 ) { return 0; } if( numLines <= 0 ) { numLines = 10; } - QVBoxLayout *vbox = new QVBoxLayout( page, KDialog::spacingHint() ); + TQVBoxLayout *vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); if( richText == true ) { KTextBrowser *browser = new KTextBrowser( page, "browser" ); - browser->setHScrollBarMode( QScrollView::AlwaysOff ); + browser->setHScrollBarMode( TQScrollView::AlwaysOff ); browser->setText( text ); browser->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); vbox->addWidget(browser); - connect(browser, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(browser, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(browser, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(browser, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); } else { - QTextEdit *textEdit = new QTextEdit( page, "text" ); + TQTextEdit *textEdit = new TQTextEdit( page, "text" ); textEdit->setReadOnly( true ); textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); - textEdit->setWordWrap( QTextEdit::NoWrap ); + textEdit->setWordWrap( TQTextEdit::NoWrap ); vbox->addWidget( textEdit ); } return page; } -QFrame *KRadioAboutWidget::addLicensePage( const QString &title, - const QString &text, int numLines) +TQFrame *KRadioAboutWidget::addLicensePage( const TQString &title, + const TQString &text, int numLines) { - QFrame *page = addEmptyPage( title ); + TQFrame *page = addEmptyPage( title ); if( page == 0 ) { return 0; } if( numLines <= 0 ) { numLines = 10; } - QVBoxLayout *vbox = new QVBoxLayout( page, KDialog::spacingHint() ); + TQVBoxLayout *vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); - QTextEdit *textEdit = new QTextEdit( page, "license" ); + TQTextEdit *textEdit = new TQTextEdit( page, "license" ); textEdit->setFont( KGlobalSettings::fixedFont() ); textEdit->setReadOnly( true ); - textEdit->setWordWrap( QTextEdit::NoWrap ); + textEdit->setWordWrap( TQTextEdit::NoWrap ); textEdit->setText( text ); textEdit->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); vbox->addWidget( textEdit ); @@ -273,13 +273,13 @@ QFrame *KRadioAboutWidget::addLicensePage( const QString &title, } -KAboutContainer *KRadioAboutWidget::addContainerPage( const QString &title, +KAboutContainer *KRadioAboutWidget::addContainerPage( const TQString &title, int childAlignment, int innerAlignment ) { if( mPageTab == 0 ) { - kdDebug(291) << "addPage: " << i18n("Invalid layout") << endl; + kdDebug(291) << "addPage: " << i18n("Invalid tqlayout") << endl; return 0; } @@ -293,29 +293,29 @@ KAboutContainer *KRadioAboutWidget::addContainerPage( const QString &title, mContainerList[ mContainerList.size()-1 ]=container; } - connect(container, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(container, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(container, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } KAboutContainer *KRadioAboutWidget::addScrolledContainerPage( - const QString &title, + const TQString &title, int childAlignment, int innerAlignment ) { if( mPageTab == 0 ) { - kdDebug(291) << "addPage: " << "Invalid layout" << endl; + kdDebug(291) << "addPage: " << "Invalid tqlayout" << endl; return 0; } - QFrame *page = addEmptyPage( title ); - QVBoxLayout *vbox = new QVBoxLayout( page, KDialog::spacingHint() ); - QScrollView *scrollView = new QScrollView( page ); + TQFrame *page = addEmptyPage( title ); + TQVBoxLayout *vbox = new TQVBoxLayout( page, KDialog::spacingHint() ); + TQScrollView *scrollView = new TQScrollView( page ); scrollView->viewport()->setBackgroundMode( PaletteBackground ); vbox->addWidget( scrollView ); @@ -325,25 +325,25 @@ KAboutContainer *KRadioAboutWidget::addScrolledContainerPage( scrollView->addChild( container ); - connect(container, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(container, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(container, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } -QFrame *KRadioAboutWidget::addEmptyPage( const QString &title ) +TQFrame *KRadioAboutWidget::addEmptyPage( const TQString &title ) { if( mPageTab == 0 ) { - kdDebug(291) << "addPage: " << "Invalid layout" << endl; + kdDebug(291) << "addPage: " << "Invalid tqlayout" << endl; return 0; } - QFrame *page = new QFrame( mPageTab, title.latin1() ); - page->setFrameStyle( QFrame::NoFrame ); + TQFrame *page = new TQFrame( mPageTab, title.latin1() ); + page->setFrameStyle( TQFrame::NoFrame ); mPageTab->addTab( page, title ); return page; @@ -362,32 +362,32 @@ KAboutContainer *KRadioAboutWidget::addContainer( int childAlignment, mContainerList[ mContainerList.size()-1 ]=container; } - connect(container, SIGNAL(urlClick(const QString &)), - SLOT(slotUrlClick(const QString &))); - connect(container, SIGNAL(mailClick(const QString &,const QString &)), - SLOT(slotMailClick(const QString &,const QString &))); + connect(container, TQT_SIGNAL(urlClick(const TQString &)), + TQT_SLOT(slotUrlClick(const TQString &))); + connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), + TQT_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } -void KRadioAboutWidget::setTitle( const QString &title ) +void KRadioAboutWidget::setTitle( const TQString &title ) { if( mTitleLabel == 0 ) { - kdDebug(291) << "setTitle: " << "Invalid layout" << endl; + kdDebug(291) << "setTitle: " << "Invalid tqlayout" << endl; return; } mTitleLabel->setText(title); } -void KRadioAboutWidget::setImage( const QString &fileName ) +void KRadioAboutWidget::setImage( const TQString &fileName ) { if( mImageLabel == 0 ) { - kdDebug(291) << "setImage: " << "Invalid layout" << endl; + kdDebug(291) << "setImage: " << "Invalid tqlayout" << endl; return; } if( fileName.isNull() ) @@ -395,19 +395,19 @@ void KRadioAboutWidget::setImage( const QString &fileName ) return; } - QImage logo( fileName ); + TQImage logo( fileName ); if( logo.isNull() == false ) { - QPixmap pix; + TQPixmap pix; pix = logo; mImageLabel->setPixmap( pix ); } - mImageFrame->layout()->activate(); + mImageFrame->tqlayout()->activate(); } -void KRadioAboutWidget::setImageBackgroundColor( const QColor &color ) +void KRadioAboutWidget::setImageBackgroundColor( const TQColor &color ) { if( mImageFrame != 0 ) { @@ -422,37 +422,37 @@ void KRadioAboutWidget::setImageFrame( bool state ) { if( state == true ) { - mImageFrame->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mImageFrame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); mImageFrame->setLineWidth(1); } else { - mImageFrame->setFrameStyle( QFrame::NoFrame ); + mImageFrame->setFrameStyle( TQFrame::NoFrame ); mImageFrame->setLineWidth(0); } } } -void KRadioAboutWidget::setProduct( const QString &appName, - const QString &/*version*/, - const QString &author, - const QString &year ) +void KRadioAboutWidget::setProduct( const TQString &appName, + const TQString &/*version*/, + const TQString &author, + const TQString &year ) { if( mIconLabel == 0 ) { - kdDebug(291) << "setProduct: " << "Invalid layout" << endl; + kdDebug(291) << "setProduct: " << "Invalid tqlayout" << endl; return; } if ( kapp ) mIconLabel->setPixmap( kapp->icon() ); - QString msg1 = i18n("%1 %2 (Using KDE %3)").arg(appName). - arg(QString::fromLatin1(KRADIO_VERSION)). - arg(QString::fromLatin1(KDE_VERSION_STRING)); - QString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").arg('�').arg(year). - arg(author) : QString::fromLatin1(""); + TQString msg1 = i18n("%1 %2 (Using KDE %3)").tqarg(appName). + arg(TQString::tqfromLatin1(KRADIO_VERSION)). + arg(TQString::tqfromLatin1(KDE_VERSION_STRING)); + TQString msg2 = !year.isEmpty() ? i18n("%1 %2, %3").tqarg('�').tqarg(year). + arg(author) : TQString::tqfromLatin1(""); mVersionLabel->setText( msg1 ); mAuthorLabel->setText( msg2 ); @@ -461,28 +461,28 @@ void KRadioAboutWidget::setProduct( const QString &appName, mAuthorLabel->hide(); } - mIconLabel->parentWidget()->layout()->activate(); + mIconLabel->tqparentWidget()->tqlayout()->activate(); } -void KRadioAboutWidget::slotMouseTrack( int mode, const QMouseEvent *e ) +void KRadioAboutWidget::slotMouseTrack( int mode, const TQMouseEvent *e ) { emit mouseTrack( mode, e ); } -void KRadioAboutWidget::slotUrlClick( const QString &url ) +void KRadioAboutWidget::slotUrlClick( const TQString &url ) { if ( kapp ) kapp->invokeBrowser( url ); } -void KRadioAboutWidget::slotMailClick( const QString &/*_name*/, - const QString &_address ) +void KRadioAboutWidget::slotMailClick( const TQString &/*_name*/, + const TQString &_address ) { if ( kapp ) - kapp->invokeMailer( _address, QString::null ); + kapp->invokeMailer( _address, TQString() ); } @@ -494,10 +494,10 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) const KAboutData *aboutData = &_aboutData; if (aboutData->programName().length()) { setProduct( aboutData->programName(), aboutData->version(), - QString::null, QString::null ); + TQString(), TQString() ); } - QString appPageText = aboutData->shortDescription() + "\n"; + TQString appPageText = aboutData->shortDescription() + "\n"; if (!aboutData->otherText().isEmpty()) appPageText += "\n" + aboutData->otherText()+"\n"; @@ -507,7 +507,7 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) KAboutContainer *appPage = addContainerPage( i18n("&About")); - QLabel *appPageLabel = new QLabel( appPageText, 0 ); + TQLabel *appPageLabel = new TQLabel( appPageText, 0 ); appPage->addWidget( appPageLabel ); if (!aboutData->homepage().isEmpty()) { @@ -516,18 +516,18 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) url->setURL(aboutData->homepage()); appPage->addWidget( url ); // FIXME - connect( url, SIGNAL(leftClickedURL(const QString &)), - this, SLOT(slotUrlClick(const QString &))); + connect( url, TQT_SIGNAL(leftClickedURL(const TQString &)), + this, TQT_SLOT(slotUrlClick(const TQString &))); } int authorCount = aboutData->authors().count(); if (authorCount) { - QString authorPageTitle = authorCount == 1 ? + TQString authorPageTitle = authorCount == 1 ? i18n("A&uthor") : i18n("A&uthors"); KAboutContainer *authorPage = addScrolledContainerPage( authorPageTitle ); - QValueList<KAboutPerson>::ConstIterator it = aboutData->authors().begin(); - QValueList<KAboutPerson>::ConstIterator end = aboutData->authors().end(); + TQValueList<KAboutPerson>::ConstIterator it = aboutData->authors().begin(); + TQValueList<KAboutPerson>::ConstIterator end = aboutData->authors().end(); for (; it != end; ++it) { authorPage->addPerson( (*it).name(), (*it).emailAddress(), (*it).webAddress(), (*it).task() ); @@ -539,31 +539,31 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) if (creditsCount) { KAboutContainer *creditsPage = addScrolledContainerPage( i18n("&Thanks To") ); - QValueList<KAboutPerson>::ConstIterator it = aboutData->credits().begin(); - QValueList<KAboutPerson>::ConstIterator end = aboutData->credits().end(); + TQValueList<KAboutPerson>::ConstIterator it = aboutData->credits().begin(); + TQValueList<KAboutPerson>::ConstIterator end = aboutData->credits().end(); for (; it != end; ++it) { creditsPage->addPerson( (*it).name(), (*it).emailAddress(), (*it).webAddress(), (*it).task() ); } } - const QValueList<KAboutTranslator> translatorList = aboutData->translators(); + const TQValueList<KAboutTranslator> translatorList = aboutData->translators(); if(translatorList.count() > 0) { KAboutContainer *translatorPage = addScrolledContainerPage( i18n("T&ranslation") ); - QValueList<KAboutTranslator>::ConstIterator it = translatorList.begin(); - QValueList<KAboutTranslator>::ConstIterator end = translatorList.end(); + TQValueList<KAboutTranslator>::ConstIterator it = translatorList.begin(); + TQValueList<KAboutTranslator>::ConstIterator end = translatorList.end(); for(; it != end; ++it) { translatorPage->addPerson((*it).name(), (*it).emailAddress(), 0,0); } - QLabel *label = new QLabel(KAboutData::aboutTranslationTeam(), + TQLabel *label = new TQLabel(KAboutData::aboutTranslationTeam(), translatorPage); label->adjustSize(); - label->setMinimumSize(label->sizeHint()); + label->setMinimumSize(label->tqsizeHint()); translatorPage->addWidget(label); } @@ -579,28 +579,28 @@ void KRadioAboutWidget::setAboutData(const KAboutData &_aboutData) // copied (and renamed) from kaboutdialog.cpp // original: KImageTrackLabel -KRadioImageTrackLabel::KRadioImageTrackLabel( QWidget *_parent, const char *_name, WFlags f ) - : QLabel( _parent, _name, f ) +KRadioImageTrackLabel::KRadioImageTrackLabel( TQWidget *_parent, const char *_name, WFlags f ) + : TQLabel( _parent, _name, f ) { setText( i18n("Image missing")); } -void KRadioImageTrackLabel::mousePressEvent( QMouseEvent *e ) +void KRadioImageTrackLabel::mousePressEvent( TQMouseEvent *e ) { emit mouseTrack( MousePress, e ); } -void KRadioImageTrackLabel::mouseReleaseEvent( QMouseEvent *e ) +void KRadioImageTrackLabel::mouseReleaseEvent( TQMouseEvent *e ) { emit mouseTrack( MouseRelease, e ); } -void KRadioImageTrackLabel::mouseDoubleClickEvent( QMouseEvent *e ) +void KRadioImageTrackLabel::mouseDoubleClickEvent( TQMouseEvent *e ) { emit mouseTrack( MouseDoubleClick, e ); } -void KRadioImageTrackLabel::mouseMoveEvent ( QMouseEvent *e ) +void KRadioImageTrackLabel::mouseMoveEvent ( TQMouseEvent *e ) { emit mouseTrack( MouseDoubleClick, e ); } diff --git a/kradio3/src/alarm.cpp b/kradio3/src/alarm.cpp index 3c6784e..a7335d7 100644 --- a/kradio3/src/alarm.cpp +++ b/kradio3/src/alarm.cpp @@ -18,12 +18,12 @@ int Alarm::m_LastID = 0; -Alarm::Alarm(const QDateTime &time, bool daily, bool enabled) +Alarm::Alarm(const TQDateTime &time, bool daily, bool enabled) : m_time (time), m_daily (daily), m_weekdayMask (0x7F), m_enabled (enabled), - m_stationID (QString::null), + m_stationID (TQString()), m_volumePreset (-1), m_type (StartPlaying), m_ID (++m_LastID) @@ -32,11 +32,11 @@ Alarm::Alarm(const QDateTime &time, bool daily, bool enabled) Alarm::Alarm () - : m_time (QDateTime (QDate(1800, 1,1), QTime(0,0,0))), + : m_time (TQDateTime (TQDate(1800, 1,1), TQTime(0,0,0))), m_daily (false), m_weekdayMask (0x7F), m_enabled (false), - m_stationID (QString::null), + m_stationID (TQString()), m_volumePreset(-1), m_type (StartPlaying), m_ID (++m_LastID) @@ -62,9 +62,9 @@ Alarm::~Alarm() } -QDateTime Alarm::nextAlarm(bool ignoreEnable) const +TQDateTime Alarm::nextAlarm(bool ignoreEnable) const { - QDateTime now = QDateTime::currentDateTime(), + TQDateTime now = TQDateTime::tqcurrentDateTime(), alarm = m_time; if (m_daily) { alarm.setDate (now.date()); @@ -76,7 +76,7 @@ QDateTime Alarm::nextAlarm(bool ignoreEnable) const alarm = alarm.addDays(1); } } - return (m_enabled || ignoreEnable) && (!m_daily || m_weekdayMask) ? alarm : QDateTime(); + return (m_enabled || ignoreEnable) && (!m_daily || m_weekdayMask) ? alarm : TQDateTime(); } diff --git a/kradio3/src/debug-profiler.cpp b/kradio3/src/debug-profiler.cpp index 8c5a9ab..ac2f372 100644 --- a/kradio3/src/debug-profiler.cpp +++ b/kradio3/src/debug-profiler.cpp @@ -17,7 +17,7 @@ #include "include/debug-profiler.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <sys/resource.h> @@ -45,11 +45,11 @@ void Profiler::startInternalCounter() { m_tmpStartVal = getCounter(); } -void Profiler::startProfile(const QString &descr) +void Profiler::startProfile(const TQString &descr) { stopInternalCounter(); - if (m_ProfileData.contains(descr)) { + if (m_ProfileData.tqcontains(descr)) { profile_data &d = m_ProfileData[descr]; d.startCounter = m_internalCounter; } else { @@ -60,11 +60,11 @@ void Profiler::startProfile(const QString &descr) } -void Profiler::stopProfile (const QString &descr) +void Profiler::stopProfile (const TQString &descr) { stopInternalCounter(); - if (!descr.isNull() && m_ProfileData.contains(descr)) { + if (!descr.isNull() && m_ProfileData.tqcontains(descr)) { profile_data &d = m_ProfileData[descr]; long long diff = m_internalCounter - d.startCounter; d.accumulatedCounter += diff; @@ -83,16 +83,16 @@ void Profiler::printData () { stopInternalCounter(); - QStringList keys=m_ProfileData.keys(); + TQStringList keys=m_ProfileData.keys(); keys.sort(); - QValueListIterator<QString> it = keys.begin(); - QValueListIterator<QString> end = keys.end(); + TQValueListIterator<TQString> it = keys.begin(); + TQValueListIterator<TQString> end = keys.end(); for (; it != end; ++it) { int l = (*it).length(); l = (((l-1) / 25) + 1) * 25; if (l < 50) l = 50; const profile_data &d = m_ProfileData[*it]; - printf(("%-"+QString::number(l)+"s: total: %3.8f (%9lli) avg: %3.8f min: %3.8f max: %3.8f\n").ascii(), + printf(("%-"+TQString::number(l)+"s: total: %3.8f (%9lli) avg: %3.8f min: %3.8f max: %3.8f\n").ascii(), (*it).ascii(), (double)d.accumulatedCounter / 1.666e9, d.callCounter, @@ -116,7 +116,7 @@ long long MemProfiler::getCounter() const } -BlockProfiler::BlockProfiler(const QString &descr) +BlockProfiler::BlockProfiler(const TQString &descr) : m_Description(descr) { global_mem_profiler.startProfile(m_Description); @@ -133,6 +133,6 @@ void BlockProfiler::stop() { global_time_profiler.stopProfile(m_Description); global_mem_profiler.stopProfile(m_Description); - m_Description = QString::null; + m_Description = TQString(); } diff --git a/kradio3/src/errorlog-interfaces.cpp b/kradio3/src/errorlog-interfaces.cpp index 025c0be..65e2e43 100644 --- a/kradio3/src/errorlog-interfaces.cpp +++ b/kradio3/src/errorlog-interfaces.cpp @@ -19,7 +19,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qdatetime.h> +#include <tqdatetime.h> IErrorLog *staticLogger = NULL; @@ -38,73 +38,73 @@ IErrorLog::~IErrorLog() } -int IErrorLogClient::sendLogError(const QString &s) const +int IErrorLogClient::sendLogError(const TQString &s) const { - kdDebug() << QString(i18n("%1 Error: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Error: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logError(s)); } -int IErrorLogClient::sendLogWarning(const QString &s) const +int IErrorLogClient::sendLogWarning(const TQString &s) const { - kdDebug() << QString(i18n("%1 Warning: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Warning: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logWarning(s)); } -int IErrorLogClient::sendLogInfo(const QString &s) const +int IErrorLogClient::sendLogInfo(const TQString &s) const { - kdDebug() << QString(i18n("%1 Information: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Information: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logInfo(s)); } -int IErrorLogClient::sendLogDebug(const QString &s) const +int IErrorLogClient::sendLogDebug(const TQString &s) const { - kdDebug() << QString(i18n("%1 Debug: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Debug: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); IF_SEND_MESSAGE(logDebug(s)); } -void IErrorLogClient::staticLogError (const QString &s) +void IErrorLogClient::staticLogError (const TQString &s) { - kdDebug() << QString(i18n("%1 Error: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Error: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logError(s); } -void IErrorLogClient::staticLogWarning(const QString &s) +void IErrorLogClient::staticLogWarning(const TQString &s) { - kdDebug() << QString(i18n("%1 Warning: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Warning: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logWarning(s); } -void IErrorLogClient::staticLogInfo (const QString &s) +void IErrorLogClient::staticLogInfo (const TQString &s) { - kdDebug() << QString(i18n("%1 Information: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Information: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logInfo(s); } -void IErrorLogClient::staticLogDebug (const QString &s) +void IErrorLogClient::staticLogDebug (const TQString &s) { - kdDebug() << QString(i18n("%1 Debug: %2\n")) - .arg(QDateTime::currentDateTime().toString(Qt::ISODate)) - .arg(s); + kdDebug() << TQString(i18n("%1 Debug: %2\n")) + .tqarg(TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)) + .tqarg(s); if (staticLogger) staticLogger->logDebug(s); } diff --git a/kradio3/src/fileringbuffer.cpp b/kradio3/src/fileringbuffer.cpp index beea2b4..584b8c2 100644 --- a/kradio3/src/fileringbuffer.cpp +++ b/kradio3/src/fileringbuffer.cpp @@ -17,22 +17,22 @@ #include "include/fileringbuffer.h" -#include <qstring.h> +#include <tqstring.h> #include <unistd.h> #include <klocale.h> -FileRingBuffer::FileRingBuffer(const QString &filename, Q_UINT64 max_size) +FileRingBuffer::FileRingBuffer(const TQString &filename, TQ_UINT64 max_size) { m_BaseFileName = filename; m_FileIdx = 0; - m_FileName = m_BaseFileName + "_" + QString::number(++m_FileIdx); + m_FileName = m_BaseFileName + "_" + TQString::number(++m_FileIdx); m_File = fopen(m_FileName.ascii(), "w+"); m_MaxSize = max_size; m_RealSize = 0; m_FillSize = 0; m_Start = 0; m_error = m_File == NULL; - m_errorString = m_File ? QString::null : i18n("cannot open buffer file %1").arg(filename); + m_errorString = m_File ? TQString() : i18n("cannot open buffer file %1").tqarg(filename); } @@ -43,17 +43,17 @@ FileRingBuffer::~FileRingBuffer() unlink (m_FileName.ascii()); } m_File = NULL; - m_FileName = QString::null; + m_FileName = TQString(); m_MaxSize = 0; m_RealSize = 0; m_FillSize = 0; m_Start = 0; m_error = false; - m_errorString = QString::null; + m_errorString = TQString(); } -bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) +bool FileRingBuffer::resize(const TQString &filename, TQ_UINT64 new_max_size) { if (filename != m_BaseFileName) { clear(); @@ -62,10 +62,10 @@ bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) unlink (m_FileName.ascii()); } m_BaseFileName = filename; - m_FileName = m_BaseFileName + "_" + QString::number(++m_FileIdx); + m_FileName = m_BaseFileName + "_" + TQString::number(++m_FileIdx); m_File = fopen(m_FileName.ascii(), "w+"); m_error = m_File == NULL; - m_errorString = m_File ? QString::null : i18n("cannot open buffer file %1").arg(filename); + m_errorString = m_File ? TQString() : i18n("cannot open buffer file %1").tqarg(filename); } if (new_max_size >= m_RealSize) { @@ -79,9 +79,9 @@ bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) const size_t buffer_size = 65536; char buffer[buffer_size]; - QString tmp_file_name = m_BaseFileName + "_" + QString::number(++m_FileIdx); + TQString tmp_file_name = m_BaseFileName + "_" + TQString::number(++m_FileIdx); FILE *tmp_file = fopen (tmp_file_name.ascii(), "w+"); - Q_UINT64 newFill = 0; + TQ_UINT64 newFill = 0; if (tmp_file) { while (!m_error && m_FillSize > 0) { int tmp_size = takeData(buffer, buffer_size); @@ -90,13 +90,13 @@ bool FileRingBuffer::resize(const QString &filename, Q_UINT64 new_max_size) newFill += tmp_size; } else { m_error = true; - m_errorString += i18n("FileRingbuffer::resize: Writing to tmpfile %1 failed. ").arg(tmp_file_name); + m_errorString += i18n("FileRingbuffer::resize: Writing to tmpfile %1 failed. ").tqarg(tmp_file_name); } } } } else { m_error = true; - m_errorString += i18n("FileRingbuffer::resize: Opening tmpfile %1 failed. ").arg(tmp_file_name); + m_errorString += i18n("FileRingbuffer::resize: Opening tmpfile %1 failed. ").tqarg(tmp_file_name); } if (!m_error) { @@ -118,13 +118,13 @@ size_t FileRingBuffer::addData (const char *src, size_t size) { size_t written = 0; if (m_Start + m_FillSize <= m_RealSize) { - Q_UINT64 rest = m_MaxSize - (m_Start + m_FillSize); + TQ_UINT64 rest = m_MaxSize - (m_Start + m_FillSize); if (rest > size) rest = size; fseek(m_File, m_Start + m_FillSize, SEEK_SET); if (rest > 0 && fwrite(src, rest, 1, m_File) <= 0) { m_error = true; - m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").arg(m_FileName); + m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").tqarg(m_FileName); } else { m_FillSize += rest; if (m_Start + m_FillSize > m_RealSize) @@ -142,7 +142,7 @@ size_t FileRingBuffer::addData (const char *src, size_t size) fseek(m_File, m_Start + m_FillSize - m_RealSize, SEEK_SET); if (fwrite(src, rest, 1, m_File) <= 0) { m_error = true; - m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").arg(m_FileName); + m_errorString += i18n("FileRingBuffer::addData: failed writing data to file %1.").tqarg(m_FileName); } else { m_FillSize += rest; written += rest; @@ -165,7 +165,7 @@ size_t FileRingBuffer::takeData(char *dst, size_t size) fseek(m_File, m_Start, SEEK_SET); if (fread(dst+read, n, 1, m_File) <= 0) { m_error = true; - m_errorString += i18n("FileRingBuffer::takeData: failed reading data to file %1.").arg(m_FileName); + m_errorString += i18n("FileRingBuffer::takeData: failed reading data to file %1.").tqarg(m_FileName); } else { m_FillSize -= n; m_Start += n; @@ -180,7 +180,7 @@ size_t FileRingBuffer::takeData(char *dst, size_t size) } -Q_UINT64 FileRingBuffer::getFreeSpace(Q_UINT64 &size) +TQ_UINT64 FileRingBuffer::getFreeSpace(TQ_UINT64 &size) { if (m_FillSize == m_RealSize) { size = 0; @@ -197,7 +197,7 @@ Q_UINT64 FileRingBuffer::getFreeSpace(Q_UINT64 &size) } -Q_UINT64 FileRingBuffer::removeFreeSpace(Q_UINT64 size) +TQ_UINT64 FileRingBuffer::removeFreeSpace(TQ_UINT64 size) { if (m_FillSize == m_RealSize) return 0; @@ -216,7 +216,7 @@ Q_UINT64 FileRingBuffer::removeFreeSpace(Q_UINT64 size) } -Q_UINT64 FileRingBuffer::getData(Q_UINT64 &size) +TQ_UINT64 FileRingBuffer::getData(TQ_UINT64 &size) { if (m_Start + m_FillSize >= m_RealSize) { size = m_RealSize - m_Start; @@ -227,7 +227,7 @@ Q_UINT64 FileRingBuffer::getData(Q_UINT64 &size) } -Q_UINT64 FileRingBuffer::removeData(Q_UINT64 size) +TQ_UINT64 FileRingBuffer::removeData(TQ_UINT64 size) { if (size > m_FillSize) size = m_FillSize; diff --git a/kradio3/src/frequencyradiostation.cpp b/kradio3/src/frequencyradiostation.cpp index a2833ec..d2c9eb3 100644 --- a/kradio3/src/frequencyradiostation.cpp +++ b/kradio3/src/frequencyradiostation.cpp @@ -29,7 +29,7 @@ static FrequencyRadioStation emptyFrequencyRadioStation(registerStationClass); ///////////////////////////////////////////////////////////////////////////// -FrequencyRadioStation::FrequencyRadioStation (RegisterStationClass, const QString &classname) +FrequencyRadioStation::FrequencyRadioStation (RegisterStationClass, const TQString &classname) : RadioStation(registerStationClass, !classname.isNull() ? classname : getClassName()), m_frequency(0) { @@ -47,8 +47,8 @@ FrequencyRadioStation::FrequencyRadioStation(float frequency) { } -FrequencyRadioStation::FrequencyRadioStation(const QString &name, - const QString &shortName, +FrequencyRadioStation::FrequencyRadioStation(const TQString &name, + const TQString &shortName, float frequency) : RadioStation(name, shortName), m_frequency(frequency) @@ -113,11 +113,11 @@ int FrequencyRadioStation::compare(const RadioStation &_s) const } -QString FrequencyRadioStation::longName() const +TQString FrequencyRadioStation::longName() const { - QString longN = name(); + TQString longN = name(); if (!longN.isEmpty()) { - longN = i18n("%1, %2").arg(longN).arg(description()); + longN = i18n("%1, %2").tqarg(longN).tqarg(description()); } else { longN = description(); } @@ -126,14 +126,14 @@ QString FrequencyRadioStation::longName() const } -QString FrequencyRadioStation::description() const +TQString FrequencyRadioStation::description() const { float cf = frequency(); - QString f; + TQString f; if (cf >= 10) - f = i18n("%1 MHz").arg(KGlobal::locale()->formatNumber(cf, 2)); + f = i18n("%1 MHz").tqarg(KGlobal::locale()->formatNumber(cf, 2)); else - f = i18n("%1 kHz").arg(KGlobal::locale()->formatNumber(cf * 1000, 0)); + f = i18n("%1 kHz").tqarg(KGlobal::locale()->formatNumber(cf * 1000, 0)); return f; } @@ -146,7 +146,7 @@ bool FrequencyRadioStation::isValid() const -bool FrequencyRadioStation::setProperty(const QString &pn, const QString &val) +bool FrequencyRadioStation::setProperty(const TQString &pn, const TQString &val) { bool retval = false; if (pn == StationFrequencyElement) { @@ -160,19 +160,19 @@ bool FrequencyRadioStation::setProperty(const QString &pn, const QString &val) } -QString FrequencyRadioStation::getProperty(const QString &pn) const +TQString FrequencyRadioStation::getProperty(const TQString &pn) const { if (pn == StationFrequencyElement) { - return QString().setNum(m_frequency); + return TQString().setNum(m_frequency); } else { return RadioStation::getProperty(pn); } } -QStringList FrequencyRadioStation::getPropertyNames() const +TQStringList FrequencyRadioStation::getPropertyNames() const { - QStringList l = RadioStation::getPropertyNames(); + TQStringList l = RadioStation::getPropertyNames(); l.push_back(StationFrequencyElement); return l; } diff --git a/kradio3/src/frequencyseekhelper.cpp b/kradio3/src/frequencyseekhelper.cpp index 670c300..84a2bc9 100644 --- a/kradio3/src/frequencyseekhelper.cpp +++ b/kradio3/src/frequencyseekhelper.cpp @@ -16,13 +16,13 @@ ***************************************************************************/ #include "include/frequencyseekhelper.h" -#include <qtimer.h> +#include <tqtimer.h> -FrequencySeekHelper::FrequencySeekHelper(ISeekRadio &parent) - : SeekHelper(parent) +FrequencySeekHelper::FrequencySeekHelper(ISeekRadio &tqparent) + : SeekHelper(tqparent) { - m_timer = new QTimer(this); - QObject::connect (m_timer, SIGNAL(timeout()), this, SLOT(step())); + m_timer = new TQTimer(this); + TQObject::connect (m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(step())); } 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; diff --git a/kradio3/src/internetradiostation.cpp b/kradio3/src/internetradiostation.cpp index f3e5029..6bec8d2 100644 --- a/kradio3/src/internetradiostation.cpp +++ b/kradio3/src/internetradiostation.cpp @@ -39,8 +39,8 @@ InternetRadioStation::InternetRadioStation(const KURL &url) { } -InternetRadioStation::InternetRadioStation(const QString &name, - const QString &shortName, +InternetRadioStation::InternetRadioStation(const TQString &name, + const TQString &shortName, const KURL &url) : RadioStation(name, shortName), m_url(url) @@ -54,7 +54,7 @@ InternetRadioStation::InternetRadioStation(const InternetRadioStation &s) } -InternetRadioStation::InternetRadioStation(RegisterStationClass, const QString &classname) +InternetRadioStation::InternetRadioStation(RegisterStationClass, const TQString &classname) : RadioStation(registerStationClass, !classname.isNull() ? classname : getClassName()), m_url() { @@ -91,8 +91,8 @@ int InternetRadioStation::compare(const RadioStation &_s) const if (!s) return (typeid(this).name() > typeid(&_s).name()) ? 1 : -1; - QString thisurl = m_url.url(-1); // -1: remove trailing '/' - QString thaturl = s->m_url.url(-1); + TQString thisurl = m_url.url(-1); // -1: remove trailing '/' + TQString thaturl = s->m_url.url(-1); // empty urls are never identical if (thisurl.length () == 0) @@ -111,11 +111,11 @@ bool InternetRadioStation::isValid() const return !m_url.isEmpty(); } -QString InternetRadioStation::longName() const +TQString InternetRadioStation::longName() const { - QString longN = name(); + TQString longN = name(); if (!longN.isEmpty()) { - longN = i18n("%1, %2").arg(longN).arg(description()); + longN = i18n("%1, %2").tqarg(longN).tqarg(description()); } else { longN = description(); } @@ -124,13 +124,13 @@ QString InternetRadioStation::longName() const } -QString InternetRadioStation::description() const +TQString InternetRadioStation::description() const { return m_url.url(); } -bool InternetRadioStation::setProperty(const QString &pn, const QString &val) +bool InternetRadioStation::setProperty(const TQString &pn, const TQString &val) { bool retval = false; if (pn == StationUrlElement) { @@ -142,7 +142,7 @@ bool InternetRadioStation::setProperty(const QString &pn, const QString &val) return retval; } -QString InternetRadioStation::getProperty(const QString &pn) const +TQString InternetRadioStation::getProperty(const TQString &pn) const { if (pn == StationUrlElement) { return m_url.url(); @@ -151,9 +151,9 @@ QString InternetRadioStation::getProperty(const QString &pn) const } } -QStringList InternetRadioStation::getPropertyNames() const +TQStringList InternetRadioStation::getPropertyNames() const { - QStringList l = RadioStation::getPropertyNames(); + TQStringList l = RadioStation::getPropertyNames(); l.push_back(StationUrlElement); return l; } diff --git a/kradio3/src/kradioapp.cpp b/kradio3/src/kradioapp.cpp index 0f2dca6..6937bcf 100644 --- a/kradio3/src/kradioapp.cpp +++ b/kradio3/src/kradioapp.cpp @@ -85,7 +85,7 @@ AboutPageInfo KRadioAbout::createAboutPage () ///////////////////////////////////////////////////////////////////////////// //// PluginLibraryInfo -PluginLibraryInfo::PluginLibraryInfo (const QString &lib_name) +PluginLibraryInfo::PluginLibraryInfo (const TQString &lib_name) : library (NULL), init_func(NULL), info_func(NULL), @@ -104,7 +104,7 @@ PluginLibraryInfo::PluginLibraryInfo (const QString &lib_name) } else { KMessageBox::error(NULL, i18n("Library %1: Plugin Entry Point is missing\n") - .arg(lib_name), + .tqarg(lib_name), i18n("Plugin Library Load Error")); library->unload(); info_func = NULL; @@ -114,8 +114,8 @@ PluginLibraryInfo::PluginLibraryInfo (const QString &lib_name) } else { KMessageBox::error(NULL, i18n("Library %1: \n%2") - .arg(lib_name) - .arg(KLibLoader::self()->lastErrorMessage()), + .tqarg(lib_name) + .tqarg(KLibLoader::self()->lastErrorMessage()), i18n("Plugin Library Load Error")); } } @@ -129,7 +129,7 @@ KRadioApp::KRadioApp() m_quitting(false) { m_Instances.setAutoDelete(true); - connect(this, SIGNAL(aboutToQuit()), this, SLOT(slotAboutToQuit())); + connect(this, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(slotAboutToQuit())); } @@ -150,19 +150,19 @@ void KRadioApp::saveState (KConfig *c) c->writeEntry("instances", m_Instances.count()); int i = 0; - QDictIterator<PluginManager> it(m_Instances); + TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it, ++i) { c->setGroup("Global"); - c->writeEntry("instance_name_" + QString::number(i), it.currentKey()); + c->writeEntry("instance_name_" + TQString::number(i), it.currentKey()); it.current()->saveState(c); } c->setGroup("Plugin Libraries"); c->writeEntry("count", m_PluginLibraries.count()); int idx = 0; - QMapConstIterator<QString, PluginLibraryInfo> end = m_PluginLibraries.end(); - for (QMapConstIterator<QString, PluginLibraryInfo> it = m_PluginLibraries.begin(); it != end; ++it, ++idx) { - c->writeEntry("library_" + QString::number(idx), it.key()); + TQMapConstIterator<TQString, PluginLibraryInfo> end = m_PluginLibraries.end(); + for (TQMapConstIterator<TQString, PluginLibraryInfo> it = m_PluginLibraries.begin(); it != end; ++it, ++idx) { + c->writeEntry("library_" + TQString::number(idx), it.key()); } c->sync(); @@ -179,12 +179,12 @@ void KRadioApp::restoreState (KConfig *c) // KProgressDialog *progress = new KProgressDialog(NULL, NULL, i18n("Loading Plugin Libraries")); // progress->setMinimumWidth(400); // progress->setAllowCancel(false); -// progress->QWidget::setCaption(i18n("KRadio - Loading Plugin Libraries")); +// progress->TQWidget::setCaption(i18n("KRadio - Loading Plugin Libraries")); // progress->show(); /* progress->progressBar()->setTotalSteps(n_libs);*/ for (int idx = 0; idx < n_libs; ++idx) { - QString lib = c->readEntry("library_" + QString::number(idx), QString::null); + TQString lib = c->readEntry("library_" + TQString::number(idx), TQString()); if (lib.length()) { LoadLibrary(lib); // progress->progressBar()->setProgress(idx+1); @@ -192,12 +192,12 @@ void KRadioApp::restoreState (KConfig *c) } if (n_libs < 6) { // this seems to be a meaningful minimum value for a working kradio setup - QStringList libs + TQStringList libs = KGlobal::dirs()->findAllResources("lib", "kradio/plugins/*.so"); - QValueListIterator<QString> end = libs.end(); + TQValueListIterator<TQString> end = libs.end(); int idx = 0; // progress->progressBar()->setTotalSteps(libs.count()); - for (QValueListIterator<QString> it = libs.begin(); it != end; ++it, ++idx) { + for (TQValueListIterator<TQString> it = libs.begin(); it != end; ++it, ++idx) { LoadLibrary(*it); // progress->progressBar()->setProgress(idx+1); } @@ -217,20 +217,20 @@ void KRadioApp::restoreState (KConfig *c) for (int i = 0; i < n; ++i) { c->setGroup("Global"); - QString name = c->readEntry("instance_name_" + QString::number(i), - n > 1 ? (i18n("Instance") + " " + QString::number(i+1)) : QString("")); + TQString name = c->readEntry("instance_name_" + TQString::number(i), + n > 1 ? (i18n("Instance") + " " + TQString::number(i+1)) : TQString("")); createNewInstance(name)->restoreState(c); } } -PluginManager *KRadioApp::createNewInstance(const QString &_name) +PluginManager *KRadioApp::createNewInstance(const TQString &_name) { BlockProfiler profiler("KRadioApp::createNewInstance"); - QString instance_name = _name; - QString title_ext = ""; - QString id = QString::number(m_Instances.count()+1); + TQString instance_name = _name; + TQString title_ext = ""; + TQString id = TQString::number(m_Instances.count()+1); if (instance_name.length() == 0) { instance_name = "Instance " + id; } @@ -253,7 +253,7 @@ PluginManager *KRadioApp::createNewInstance(const QString &_name) } -KLibrary *KRadioApp::LoadLibrary (const QString &library) +KLibrary *KRadioApp::LoadLibrary (const TQString &library) { BlockProfiler profiler("KRadioApp::LoadLibrary"); BlockProfiler libprofiler("KRadioApp::LoadLibrary - " + library); @@ -261,19 +261,19 @@ KLibrary *KRadioApp::LoadLibrary (const QString &library) PluginLibraryInfo libinfo(library); if (libinfo.valid()) { m_PluginLibraries.insert(library, libinfo); - QMapConstIterator<QString,QString> end = libinfo.plugins.end(); - for (QMapConstIterator<QString,QString> it = libinfo.plugins.begin(); it != end; ++it) { + TQMapConstIterator<TQString,TQString> end = libinfo.plugins.end(); + for (TQMapConstIterator<TQString,TQString> it = libinfo.plugins.begin(); it != end; ++it) { m_PluginInfos.insert(it.key(), PluginClassInfo (it.key(), *it, libinfo.init_func)); } } else { - kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " " << i18n("Error: Loading Library %1 failed: %2") - .arg(library).arg(KLibLoader::self()->lastErrorMessage()) + .tqarg(library).tqarg(KLibLoader::self()->lastErrorMessage()) << endl; } - for (QDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { + for (TQDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { it_managers.current()->noticeLibrariesChanged(); } @@ -281,16 +281,16 @@ KLibrary *KRadioApp::LoadLibrary (const QString &library) } -void KRadioApp::UnloadLibrary (const QString &library) +void KRadioApp::UnloadLibrary (const TQString &library) { - if (!m_PluginLibraries.contains(library)) + if (!m_PluginLibraries.tqcontains(library)) return; PluginLibraryInfo info = m_PluginLibraries[library]; - QMapConstIterator<QString, QString> end_classes = info.plugins.end(); - for (QMapConstIterator<QString, QString> it_classes = info.plugins.begin(); it_classes != end_classes; ++it_classes) { - for (QDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { + TQMapConstIterator<TQString, TQString> end_classes = info.plugins.end(); + for (TQMapConstIterator<TQString, TQString> it_classes = info.plugins.begin(); it_classes != end_classes; ++it_classes) { + for (TQDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { it_managers.current()->unloadPlugins(it_classes.key()); } m_PluginInfos.remove(it_classes.key()); @@ -300,13 +300,13 @@ void KRadioApp::UnloadLibrary (const QString &library) info.libunload_func(); info.library->unload(); - for (QDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { + for (TQDictIterator<PluginManager> it_managers(m_Instances); it_managers.current(); ++it_managers) { it_managers.current()->noticeLibrariesChanged(); } } -PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const QString &class_name, const QString &object_name) +PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const TQString &class_name, const TQString &object_name) { BlockProfiler all_profiler ("KRadioApp::CreatePlugin"); BlockProfiler class_profiler("KRadioApp::CreatePlugin - " + class_name); @@ -314,18 +314,18 @@ PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const QString &clas BlockProfiler create_profiler("KRadioApp::CreatePlugin - create"); PluginBase *retval = NULL; - if (m_PluginInfos.contains(class_name)) { + if (m_PluginInfos.tqcontains(class_name)) { retval = m_PluginInfos[class_name].CreateInstance(object_name); if (!retval) { - kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " " - << i18n("Error: Creation of instance \"%1\" of class %2 falied.").arg(object_name).arg(class_name) + << i18n("Error: Creation of instance \"%1\" of class %2 falied.").tqarg(object_name).tqarg(class_name) << endl; } } else { - kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " " - << i18n("Error: Cannot create instance \"%1\" of unknown class %2.").arg(object_name).arg(class_name) + << i18n("Error: Cannot create instance \"%1\" of unknown class %2.").tqarg(object_name).tqarg(class_name) << endl; } @@ -346,7 +346,7 @@ PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const QString &clas void KRadioApp::startPlugins() { - QDictIterator<PluginManager> it(m_Instances); + TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it) { it.current()->startPlugins(); } @@ -359,7 +359,7 @@ void KRadioApp::slotAboutToQuit() IErrorLogClient::staticLogDebug("slotAboutToQuit, m_quitting = false"); m_quitting = true; saveState(); - QDictIterator<PluginManager> it(m_Instances); + TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it) { it.current()->aboutToQuit(); } diff --git a/kradio3/src/multibuffer.cpp b/kradio3/src/multibuffer.cpp index 5ed4bd0..07eb74b 100644 --- a/kradio3/src/multibuffer.cpp +++ b/kradio3/src/multibuffer.cpp @@ -25,7 +25,7 @@ MultiBuffer::MultiBuffer(size_t n_buffers, size_t buffersize) m_currentReadBuffer(m_nBuffers-1), // during wait4read, this will be incremented to 0 m_currentWriteBuffer(0), m_readLock(n_buffers), - m_errorString(QString::null), + m_errorString(TQString()), m_error(false) { m_readLock += m_nBuffers; @@ -68,7 +68,7 @@ char *MultiBuffer::lockWriteBuffer(size_t &bufferSize) bufferSize = bytesAvailable; return m_buffers[m_currentWriteBuffer] + m_buffersFill[m_currentWriteBuffer]; } -/* QString tmp; +/* TQString tmp; IErrorLogClient::staticLogDebug(tmp.sprintf("current input buffer: %li", m_currentInputBuffer)); IErrorLogClient::staticLogDebug(tmp.sprintf("inputAvailableLock: %i", m_inputAvailableLock.available())); for (size_t i = 0; i < m_config.m_EncodeBufferCount; ++i) { @@ -127,5 +127,5 @@ char *MultiBuffer::getCurrentReadBuffer(size_t &buffer_fill) const void MultiBuffer::resetError() { m_error = false; - m_errorString = QString::null; + m_errorString = TQString(); } diff --git a/kradio3/src/plugin_configuration_dialog.cpp b/kradio3/src/plugin_configuration_dialog.cpp index d5f4568..a20edfd 100644 --- a/kradio3/src/plugin_configuration_dialog.cpp +++ b/kradio3/src/plugin_configuration_dialog.cpp @@ -20,12 +20,12 @@ #include <klocale.h> PluginConfigurationDialog::PluginConfigurationDialog( - int dialogFace, const QString &caption, + int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, - QWidget *parent, const char *name, + TQWidget *tqparent, const char *name, bool modal, bool separator) : KDialogBase(dialogFace, caption, buttonMask, defaultButton, - parent, name, modal, separator), + tqparent, name, modal, separator), WidgetPluginBase (name, i18n("Configuration Dialog")), m_Caption(caption) { @@ -36,13 +36,13 @@ PluginConfigurationDialog::PluginConfigurationDialog( void PluginConfigurationDialog::saveState (KConfig *c) const { - c->setGroup(QString("config-dialog-") + WidgetPluginBase::name()); + c->setGroup(TQString("config-dialog-") + WidgetPluginBase::name()); WidgetPluginBase::saveState(c); } void PluginConfigurationDialog::restoreState (KConfig *c) { - c->setGroup(QString("config-dialog-") + WidgetPluginBase::name()); + c->setGroup(TQString("config-dialog-") + WidgetPluginBase::name()); WidgetPluginBase::restoreState(c, true); } @@ -82,17 +82,17 @@ void PluginConfigurationDialog::hide() } -// QWidget overrides +// TQWidget overrides -void PluginConfigurationDialog::showEvent(QShowEvent *e) +void PluginConfigurationDialog::showEvent(TQShowEvent *e) { KDialogBase::showEvent(e); - QWidget::setCaption(m_Caption); + TQWidget::setCaption(m_Caption); WidgetPluginBase::pShowEvent(e); } -void PluginConfigurationDialog::hideEvent(QHideEvent *e) +void PluginConfigurationDialog::hideEvent(TQHideEvent *e) { KDialogBase::hideEvent(e); WidgetPluginBase::pHideEvent(e); diff --git a/kradio3/src/pluginmanager-configuration-ui.ui b/kradio3/src/pluginmanager-configuration-ui.ui index ce481e3..12c4824 100644 --- a/kradio3/src/pluginmanager-configuration-ui.ui +++ b/kradio3/src/pluginmanager-configuration-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PluginManagerConfigurationUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PluginManagerConfigurationUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>11</number> </property> - <widget class="QCheckBox" row="6" column="0"> + <widget class="TQCheckBox" row="6" column="0"> <property name="name"> <cstring>cbShowProgressBar</cstring> </property> @@ -47,7 +47,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox" row="4" column="0"> + <widget class="TQGroupBox" row="4" column="0"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -126,7 +126,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>87</height> @@ -137,7 +137,7 @@ <property name="name"> <cstring>btnRemovePluginInstance</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -169,7 +169,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -196,7 +196,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>55</height> @@ -207,7 +207,7 @@ <property name="name"> <cstring>btnNewPluginInstance</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -272,7 +272,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -301,7 +301,7 @@ <property name="name"> <cstring>btnRemoveLibrary</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -321,7 +321,7 @@ <property name="name"> <cstring>btnAddLibrary</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>24</width> <height>24</height> @@ -363,7 +363,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>61</height> @@ -380,7 +380,7 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> </includes> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kradio3/src/pluginmanager-configuration.cpp b/kradio3/src/pluginmanager-configuration.cpp index f589ecb..2852e61 100644 --- a/kradio3/src/pluginmanager-configuration.cpp +++ b/kradio3/src/pluginmanager-configuration.cpp @@ -26,10 +26,10 @@ #include <kurlrequester.h> #include <kinputdialog.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -PluginManagerConfiguration::PluginManagerConfiguration(QWidget *parent, KRadioApp *app, PluginManager *pm) - : PluginManagerConfigurationUI(parent), +PluginManagerConfiguration::PluginManagerConfiguration(TQWidget *tqparent, KRadioApp *app, PluginManager *pm) + : PluginManagerConfigurationUI(tqparent), m_Application(app), m_PluginManager(pm), m_dirty(true) @@ -37,11 +37,11 @@ PluginManagerConfiguration::PluginManagerConfiguration(QWidget *parent, KRadioAp noticePluginLibrariesChanged(); noticePluginsChanged(); - QObject::connect(btnAddLibrary, SIGNAL(clicked()), this, SLOT(slotAddLibrary())); - QObject::connect(btnRemoveLibrary, SIGNAL(clicked()), this, SLOT(slotRemoveLibrary())); - QObject::connect(btnNewPluginInstance, SIGNAL(clicked()), this, SLOT(slotNewPluginInstance())); - QObject::connect(btnRemovePluginInstance, SIGNAL(clicked()), this, SLOT(slotRemovePluginInstance())); - QObject::connect(cbShowProgressBar, SIGNAL(toggled(bool)), this, SLOT(slotSetDirty())); + TQObject::connect(btnAddLibrary, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddLibrary())); + TQObject::connect(btnRemoveLibrary, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveLibrary())); + TQObject::connect(btnNewPluginInstance, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewPluginInstance())); + TQObject::connect(btnRemovePluginInstance, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemovePluginInstance())); + TQObject::connect(cbShowProgressBar, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetDirty())); slotCancel(); } @@ -55,16 +55,16 @@ PluginManagerConfiguration::~PluginManagerConfiguration () void PluginManagerConfiguration::noticePluginLibrariesChanged() { listPluginLibraries->clear(); - const QMap<QString, PluginLibraryInfo> &libs = m_Application->getPluginLibraries(); - QMapConstIterator<QString,PluginLibraryInfo> end = libs.end(); - for (QMapConstIterator<QString,PluginLibraryInfo> it = libs.begin(); it != end; ++it) { + const TQMap<TQString, PluginLibraryInfo> &libs = m_Application->getPluginLibraries(); + TQMapConstIterator<TQString,PluginLibraryInfo> end = libs.end(); + for (TQMapConstIterator<TQString,PluginLibraryInfo> it = libs.begin(); it != end; ++it) { listPluginLibraries->insertItem(it.key()); } listPluginClasses->clear(); - const QMap<QString, PluginClassInfo> &classes = m_Application->getPluginClasses(); - QMapConstIterator<QString, PluginClassInfo> end_cls = classes.end(); - for (QMapConstIterator<QString, PluginClassInfo> it = classes.begin(); it != end_cls; ++it) { + const TQMap<TQString, PluginClassInfo> &classes = m_Application->getPluginClasses(); + TQMapConstIterator<TQString, PluginClassInfo> end_cls = classes.end(); + for (TQMapConstIterator<TQString, PluginClassInfo> it = classes.begin(); it != end_cls; ++it) { listPluginClasses->insertItem(new KListViewItem(listPluginClasses, it.key(), (*it).description)); } @@ -76,12 +76,12 @@ void PluginManagerConfiguration::noticePluginsChanged() { listPluginInstances->clear(); const PluginList &plugins = m_PluginManager->plugins(); - const QMap<QString, PluginClassInfo> &classes = m_Application->getPluginClasses(); + const TQMap<TQString, PluginClassInfo> &classes = m_Application->getPluginClasses(); for (PluginIterator it(plugins); it.current(); ++it) { - QString class_name = it.current()->pluginClassName(); - if (classes.contains(class_name)) { - QString obj_name = it.current()->name(); + TQString class_name = it.current()->pluginClassName(); + if (classes.tqcontains(class_name)) { + TQString obj_name = it.current()->name(); listPluginInstances->insertItem(new KListViewItem(listPluginInstances, class_name, obj_name, classes[class_name].description)); } } @@ -111,7 +111,7 @@ void PluginManagerConfiguration::slotCancel() void PluginManagerConfiguration::slotAddLibrary() { slotSetDirty(); - QString url = editPluginLibrary->url(); + TQString url = editPluginLibrary->url(); if (m_Application && url.length()) m_Application->LoadLibrary(url); } @@ -121,7 +121,7 @@ void PluginManagerConfiguration::slotRemoveLibrary() { slotSetDirty(); if (m_Application) { - QString lib = listPluginLibraries->currentText(); + TQString lib = listPluginLibraries->currentText(); if (lib.length()) { m_Application->UnloadLibrary(lib); } @@ -133,16 +133,16 @@ void PluginManagerConfiguration::slotNewPluginInstance() { slotSetDirty(); if (m_Application && m_PluginManager) { - QListViewItem *item = listPluginClasses->currentItem(); - QString class_name = item ? item->text(0) : QString::null; + TQListViewItem *item = listPluginClasses->currentItem(); + TQString class_name = item ? item->text(0) : TQString(); bool ok = false; int default_object_id = 1; - while (m_PluginManager->getPluginByName(class_name + QString::number(default_object_id))) + while (m_PluginManager->getPluginByName(class_name + TQString::number(default_object_id))) ++default_object_id; - QString object_name = KInputDialog::getText(i18n("Enter Plugin Instance Name"), + TQString object_name = KInputDialog::getText(i18n("Enter Plugin Instance Name"), i18n("Instance Name"), - class_name + QString::number(default_object_id), + class_name + TQString::number(default_object_id), &ok); if (ok && class_name.length() && object_name.length()) m_Application->CreatePlugin(m_PluginManager, class_name, object_name); @@ -154,8 +154,8 @@ void PluginManagerConfiguration::slotRemovePluginInstance() { slotSetDirty(); if (m_Application && m_PluginManager) { - QListViewItem *item = listPluginInstances->currentItem(); - QString object_name = item ? item->text(1) : QString::null; + TQListViewItem *item = listPluginInstances->currentItem(); + TQString object_name = item ? item->text(1) : TQString(); if (object_name.length()) m_PluginManager->deletePluginByName(object_name); } diff --git a/kradio3/src/pluginmanager.cpp b/kradio3/src/pluginmanager.cpp index adac66c..286b588 100644 --- a/kradio3/src/pluginmanager.cpp +++ b/kradio3/src/pluginmanager.cpp @@ -27,17 +27,17 @@ #include <kconfig.h> #include <kprogress.h> -#include <qlayout.h> -#include <qframe.h> -#include <qmenudata.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqmenudata.h> #include "include/debug-profiler.h" PluginManager::PluginManager( - const QString &name, + const TQString &name, KRadioApp *app, - const QString &configDialogTitle, - const QString &aboutDialogTitle) + const TQString &configDialogTitle, + const TQString &aboutDialogTitle) : m_Name(name), m_Application(app), m_showProgressBar(true), @@ -87,7 +87,7 @@ void PluginManager::noticeLibrariesChanged() } -void PluginManager::unloadPlugins(const QString &class_name) +void PluginManager::unloadPlugins(const TQString &class_name) { PluginList plugins = m_plugins; for (PluginIterator it(plugins); it.current(); ++it) { @@ -99,7 +99,7 @@ void PluginManager::unloadPlugins(const QString &class_name) } -void PluginManager::addWidgetPluginMenuItems(QMenuData *menu, QMap<WidgetPluginBase *,int> &map) const +void PluginManager::addWidgetPluginMenuItems(TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map) const { map.clear(); @@ -107,23 +107,23 @@ void PluginManager::addWidgetPluginMenuItems(QMenuData *menu, QMap<WidgetPluginB WidgetPluginBase *b = dynamic_cast<WidgetPluginBase*>(it.current()); if (!b) continue; - int id = menu->insertItem("dummy", b->getWidget(), SLOT(toggleShown())); + int id = menu->insertItem("dummy", b->getWidget(), TQT_SLOT(toggleShown())); map.insert(b, id); updateWidgetPluginMenuItem(b, menu, map, b->isReallyVisible()); } } -void PluginManager::updateWidgetPluginMenuItem(WidgetPluginBase *b, QMenuData *menu, QMap<WidgetPluginBase *,int> &map, bool shown) const +void PluginManager::updateWidgetPluginMenuItem(WidgetPluginBase *b, TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map, bool shown) const { - if (!b || !map.contains(b)) + if (!b || !map.tqcontains(b)) return; - const QString &name = b->description(); - QString text = (shown ? i18n("Hide %1") : i18n("Show %1")).arg(name); + const TQString &name = b->description(); + TQString text = (shown ? i18n("Hide %1") : i18n("Show %1")).tqarg(name); menu->changeItem(map[b], - QIconSet(SmallIconSet(!shown ? "kradio_show" : "kradio_hide")), + TQIconSet(SmallIconSet(!shown ? "kradio_show" : "kradio_hide")), text); } @@ -136,7 +136,7 @@ void PluginManager::noticeWidgetPluginShown(WidgetPluginBase *p, bool shown) } -PluginBase *PluginManager::getPluginByName(const QString &name) const +PluginBase *PluginManager::getPluginByName(const TQString &name) const { for (PluginIterator it(m_plugins); it.current(); ++it) { if (it.current()->name() == name) @@ -153,7 +153,7 @@ void PluginManager::insertPlugin(PluginBase *p) if (p) { BlockProfiler profiler_cfg("PluginManager::insertPlugin - about/config"); - /*kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + /*kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " Debug: Adding Plugin: " << p->name() << "\n";*/ if (!m_configDialog) @@ -173,7 +173,7 @@ void PluginManager::insertPlugin(PluginBase *p) // connect plugins with each other for (PluginIterator it(m_plugins); it.current(); ++it) { if (it.current() != p) { - /*kdDebug() << QDateTime::currentDateTime().toString(Qt::ISODate) + /*kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) << " Debug: connecting with " << it.current()->name() << "\n";*/ p->connectI(it.current()); } @@ -181,7 +181,7 @@ void PluginManager::insertPlugin(PluginBase *p) // perhaps some existing config pages will profit from new plugin // example: timecontrol profits from radio plugin - for (QWidgetDictIterator it(m_configPages); it.current(); ++it) { + for (TQWidgetDictIterator it(m_configPages); it.current(); ++it) { Interface *i = dynamic_cast<Interface *>(it.current()); if (i) i->connectI(p); @@ -211,7 +211,7 @@ void PluginManager::insertPlugin(PluginBase *p) void PluginManager::deletePlugin(PluginBase *p) { - if (p && m_plugins.contains(p)) { + if (p && m_plugins.tqcontains(p)) { removePlugin(p); delete p; } @@ -220,7 +220,7 @@ void PluginManager::deletePlugin(PluginBase *p) void PluginManager::removePlugin(PluginBase *p) { - if (p && m_plugins.contains(p)) { + if (p && m_plugins.tqcontains(p)) { for (PluginIterator it(m_plugins); it.current(); ++it) { if (it.current() != p) { @@ -236,12 +236,12 @@ void PluginManager::removePlugin(PluginBase *p) // remove config page from config dialog, only chance is to delete it // plugin will be notified automatically (mechanism implemented by // PluginBase) - while (QFrame *f = m_configPageFrames.find(p)) { + while (TQFrame *f = m_configPageFrames.tqfind(p)) { m_configPageFrames.remove(p); m_configPages.remove(p); delete f; } - while (QFrame *f = m_aboutPageFrames.find(p)) { + while (TQFrame *f = m_aboutPageFrames.tqfind(p)) { m_aboutPageFrames.remove(p); m_aboutPages.remove(p); delete f; @@ -265,9 +265,9 @@ void PluginManager::removePlugin(PluginBase *p) void PluginManager::addConfigurationPage (PluginBase *forWhom, const ConfigPageInfo &info) { - if (!forWhom || !m_plugins.containsRef(forWhom) || !info.page) + if (!forWhom || !m_plugins.tqcontainsRef(forWhom) || !info.page) return; - QFrame *f = addConfigurationPage(info); + TQFrame *f = addConfigurationPage(info); // register this frame and config page m_configPageFrames.insert(forWhom, f); @@ -283,36 +283,36 @@ void PluginManager::addConfigurationPage (PluginBase *forWhom, } -QFrame *PluginManager::addConfigurationPage (const ConfigPageInfo &info) +TQFrame *PluginManager::addConfigurationPage (const ConfigPageInfo &info) { if (!m_configDialog) createConfigDialog(i18n(m_configDialogTitle.ascii())); // create empty config frame - QFrame *f = m_configDialog->addPage( + TQFrame *f = m_configDialog->addPage( info.itemName, info.pageHeader, KGlobal::instance()->iconLoader()->loadIcon( info.iconName, KIcon::NoGroup, KIcon::SizeMedium ) ); - // fill config frame with layout ... - QGridLayout *l = new QGridLayout(f); + // fill config frame with tqlayout ... + TQGridLayout *l = new TQGridLayout(f); l->setSpacing( 0 ); l->setMargin( 0 ); // ... and externally created config page - info.page->reparent (f, QPoint(0,0), true); + info.page->reparent (f, TQPoint(0,0), true); l->addWidget( info.page, 0, 0 ); // make sure, that config page receives ok, apply and cancel signals - QObject::connect(this, SIGNAL(sigConfigOK()), info.page, SLOT(slotOK())); - QObject::connect(m_configDialog, SIGNAL(cancelClicked()), info.page, SLOT(slotCancel())); + TQObject::connect(this, TQT_SIGNAL(sigConfigOK()), info.page, TQT_SLOT(slotOK())); + TQObject::connect(m_configDialog, TQT_SIGNAL(cancelClicked()), info.page, TQT_SLOT(slotCancel())); return f; } -void PluginManager::createConfigDialog(const QString &title) +void PluginManager::createConfigDialog(const TQString &title) { if (m_configDialog) delete m_configDialog; m_configDialog = NULL; @@ -322,15 +322,15 @@ void PluginManager::createConfigDialog(const QString &title) title, KDialogBase::Apply|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, - /*parent = */ NULL, + /*tqparent = */ NULL, title.ascii(), /*modal = */ false, true); m_configDialog = cfg; - QObject::connect(m_configDialog, SIGNAL(okClicked()), this, SLOT(slotConfigOK())); - QObject::connect(m_configDialog, SIGNAL(applyClicked()), this, SLOT(slotConfigOK())); + TQObject::connect(m_configDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotConfigOK())); + TQObject::connect(m_configDialog, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotConfigOK())); insertPlugin(cfg); @@ -362,13 +362,13 @@ void PluginManager::addAboutPage (PluginBase *forWhom, if (!m_aboutDialog) createAboutDialog(i18n(m_aboutDialogTitle.ascii())); - if ( !forWhom || !m_plugins.containsRef(forWhom) + if ( !forWhom || !m_plugins.tqcontainsRef(forWhom) || !m_aboutDialog || !info.page) return; // create empty about frame - QFrame *f = m_aboutDialog->addPage( + TQFrame *f = m_aboutDialog->addPage( info.itemName, info.pageHeader, KGlobal::instance()->iconLoader()->loadIcon( info.iconName, KIcon::NoGroup, KIcon::SizeMedium ) @@ -378,18 +378,18 @@ void PluginManager::addAboutPage (PluginBase *forWhom, m_aboutPageFrames.insert(forWhom, f); m_aboutPages.insert(forWhom, info.page); - // fill config frame with layout ... - QGridLayout *l = new QGridLayout(f); + // fill config frame with tqlayout ... + TQGridLayout *l = new TQGridLayout(f); l->setSpacing( 0 ); l->setMargin( 0 ); // ... and externally created config page - info.page->reparent (f, QPoint(0,0), true); + info.page->reparent (f, TQPoint(0,0), true); l->addWidget( info.page, 0, 0 ); } -void PluginManager::createAboutDialog(const QString &title) +void PluginManager::createAboutDialog(const TQString &title) { if (m_aboutDialog) delete m_aboutDialog; m_aboutDialog = NULL; @@ -398,7 +398,7 @@ void PluginManager::createAboutDialog(const QString &title) title, KDialogBase::Close, KDialogBase::Close, - /*parent = */ NULL, + /*tqparent = */ NULL, title.ascii(), /*modal = */ false, true); @@ -416,14 +416,14 @@ void PluginManager::saveState (KConfig *c) const c->writeEntry("show-progress-bar", m_showProgressBar); int n = 0; for (PluginIterator it(m_plugins); it.current(); ++it) { - QString class_name = it.current()->pluginClassName(); - QString object_name = it.current()->name(); + TQString class_name = it.current()->pluginClassName(); + TQString object_name = it.current()->name(); if (class_name.length() && object_name.length() && - m_Application->getPluginClasses().contains(class_name)) + m_Application->getPluginClasses().tqcontains(class_name)) { ++n; - c->writeEntry("plugin_class_" + QString::number(n), class_name); - c->writeEntry("plugin_name_" + QString::number(n), object_name); + c->writeEntry("plugin_class_" + TQString::number(n), class_name); + c->writeEntry("plugin_name_" + TQString::number(n), object_name); } } c->writeEntry("plugins", n); @@ -452,11 +452,11 @@ void PluginManager::restoreState (KConfig *c) for (int i = 1; i <= n; ++i) { c->setGroup("PluginManager-" + m_Name); - QString class_name = c->readEntry("plugin_class_" + QString::number(i)); - QString object_name = c->readEntry("plugin_name_" + QString::number(i)); + TQString class_name = c->readEntry("plugin_class_" + TQString::number(i)); + TQString object_name = c->readEntry("plugin_name_" + TQString::number(i)); if (m_showProgressBar) - progress->QWidget::setCaption(i18n("Creating Plugin %1").arg(class_name)); + progress->TQWidget::setCaption(i18n("Creating Plugin %1").tqarg(class_name)); if (class_name.length() && object_name.length()) m_Application->CreatePlugin(this, class_name, object_name); if (m_showProgressBar) @@ -464,16 +464,16 @@ void PluginManager::restoreState (KConfig *c) } if (m_Application && n == 0) { - const QMap<QString, PluginClassInfo> &classes = m_Application->getPluginClasses(); - QMapConstIterator<QString, PluginClassInfo> end = classes.end(); + const TQMap<TQString, PluginClassInfo> &classes = m_Application->getPluginClasses(); + TQMapConstIterator<TQString, PluginClassInfo> end = classes.end(); n = classes.count(); if (m_showProgressBar) progress->progressBar()->setTotalSteps(2*n); int idx = 1; - for (QMapConstIterator<QString, PluginClassInfo> it=classes.begin(); it != end; ++it, ++idx) { + for (TQMapConstIterator<TQString, PluginClassInfo> it=classes.begin(); it != end; ++it, ++idx) { const PluginClassInfo &cls = *it; if (m_showProgressBar) - progress->QWidget::setCaption(i18n("Creating Plugin %1").arg(cls.class_name)); + progress->TQWidget::setCaption(i18n("Creating Plugin %1").tqarg(cls.class_name)); m_Application->CreatePlugin(this, cls.class_name, m_Name + "-" + cls.class_name); if (m_showProgressBar) progress->progressBar()->setProgress(idx); @@ -487,7 +487,7 @@ void PluginManager::restoreState (KConfig *c) for (PluginIterator i(m_plugins); i.current(); ++i, ++idx) { BlockProfiler profile_plugin("PluginManager::restoreState - " + i.current()->pluginClassName()); if (m_showProgressBar) - progress->QWidget::setCaption(i18n("Initializing Plugin %1").arg(i.current()->pluginClassName())); + progress->TQWidget::setCaption(i18n("Initializing Plugin %1").tqarg(i.current()->pluginClassName())); i.current()->restoreState(c); if (m_showProgressBar) progress->progressBar()->setProgress(idx+1); diff --git a/kradio3/src/plugins.cpp b/kradio3/src/plugins.cpp index 4da7310..f711bf0 100644 --- a/kradio3/src/plugins.cpp +++ b/kradio3/src/plugins.cpp @@ -18,7 +18,7 @@ #include "include/plugins.h" #include "include/pluginmanager.h" -PluginBase::PluginBase(const QString &name, const QString &description) +PluginBase::PluginBase(const TQString &name, const TQString &description) : m_name(name), m_description(description), m_manager(NULL), diff --git a/kradio3/src/radio_interfaces.cpp b/kradio3/src/radio_interfaces.cpp index c91df36..f4e68a9 100644 --- a/kradio3/src/radio_interfaces.cpp +++ b/kradio3/src/radio_interfaces.cpp @@ -27,7 +27,7 @@ IF_IMPL_SENDER ( IRadio::notifyStationChanged (const RadioStation &s, int idx) noticeStationChanged (s, idx) ); IF_IMPL_SENDER ( IRadio::notifyStationsChanged(const StationList &sl), noticeStationsChanged(sl) ); -IF_IMPL_SENDER ( IRadio::notifyPresetFileChanged(const QString &f), +IF_IMPL_SENDER ( IRadio::notifyPresetFileChanged(const TQString &f), noticePresetFileChanged(f) ); IF_IMPL_SENDER ( IRadio::notifyCurrentSoundStreamIDChanged(SoundStreamID id), noticeCurrentSoundStreamIDChanged(id) ); @@ -44,39 +44,39 @@ IF_IMPL_SENDER ( IRadioClient::sendActivateStation(int index), activateStation(index) ); IF_IMPL_SENDER ( IRadioClient::sendStations(const StationList &sl), setStations(sl) ); -IF_IMPL_SENDER ( IRadioClient::sendPresetFile(const QString &f), +IF_IMPL_SENDER ( IRadioClient::sendPresetFile(const TQString &f), setPresetFile(f) ); -IF_IMPL_QUERY ( bool IRadioClient::queryIsPowerOn(), +IF_IMPL_TQUERY ( bool IRadioClient::queryIsPowerOn(), isPowerOn(), false ); -IF_IMPL_QUERY ( bool IRadioClient::queryIsPowerOff(), +IF_IMPL_TQUERY ( bool IRadioClient::queryIsPowerOff(), isPowerOff(), true ); -IF_IMPL_QUERY ( const RadioStation & IRadioClient::queryCurrentStation(), +IF_IMPL_TQUERY ( const RadioStation & IRadioClient::queryCurrentStation(), getCurrentStation(), undefinedRadioStation ); -IF_IMPL_QUERY ( int IRadioClient::queryCurrentStationIdx(), +IF_IMPL_TQUERY ( int IRadioClient::queryCurrentStationIdx(), getCurrentStationIdx(), -1 ); -IF_IMPL_QUERY ( int IRadioClient::queryStationIdx(const RadioStation &rs), +IF_IMPL_TQUERY ( int IRadioClient::queryStationIdx(const RadioStation &rs), getStationIdx(rs), -1 ); -IF_IMPL_QUERY ( const StationList & IRadioClient::queryStations(), +IF_IMPL_TQUERY ( const StationList & IRadioClient::queryStations(), getStations(), emptyStationList ); -static QString emptyString; -IF_IMPL_QUERY ( const QString & IRadioClient::queryPresetFile(), +static TQString emptyString; +IF_IMPL_TQUERY ( const TQString & IRadioClient::queryPresetFile(), getPresetFile(), emptyString ); -IF_IMPL_QUERY ( SoundStreamID IRadioClient::queryCurrentSoundStreamID(), +IF_IMPL_TQUERY ( SoundStreamID IRadioClient::queryCurrentSoundStreamID(), getCurrentSoundStreamID(), SoundStreamID::InvalidID ); diff --git a/kradio3/src/radiodevice_interfaces.cpp b/kradio3/src/radiodevice_interfaces.cpp index 3f8a015..0a75a8b 100644 --- a/kradio3/src/radiodevice_interfaces.cpp +++ b/kradio3/src/radiodevice_interfaces.cpp @@ -27,7 +27,7 @@ IF_IMPL_SENDER ( IRadioDevice::notifyPowerChanged(bool on), noticePowerChanged(on, this) ); IF_IMPL_SENDER ( IRadioDevice::notifyStationChanged (const RadioStation &s), noticeStationChanged (s, this) ); -IF_IMPL_SENDER ( IRadioDevice::notifyDescriptionChanged (const QString&s), +IF_IMPL_SENDER ( IRadioDevice::notifyDescriptionChanged (const TQString&s), noticeDescriptionChanged (s, this) ); IF_IMPL_SENDER ( IRadioDevice::notifyCurrentSoundStreamIDChanged(SoundStreamID id), noticeCurrentSoundStreamIDChanged(id, this) ); @@ -43,22 +43,22 @@ IF_IMPL_SENDER ( IRadioDeviceClient::sendPowerOff(), IF_IMPL_SENDER ( IRadioDeviceClient::sendActivateStation(const RadioStation &rs), activateStation(rs) ); -IF_IMPL_QUERY ( bool IRadioDeviceClient::queryIsPowerOn(), +IF_IMPL_TQUERY ( bool IRadioDeviceClient::queryIsPowerOn(), isPowerOn(), false ); -IF_IMPL_QUERY ( bool IRadioDeviceClient::queryIsPowerOff(), +IF_IMPL_TQUERY ( bool IRadioDeviceClient::queryIsPowerOff(), isPowerOff(), true ); -IF_IMPL_QUERY ( const RadioStation & IRadioDeviceClient::queryCurrentStation(), +IF_IMPL_TQUERY ( const RadioStation & IRadioDeviceClient::queryCurrentStation(), getCurrentStation(), undefinedRadioStation ); -static QString IRadioDeviceClient_unknown("unknown"); -IF_IMPL_QUERY ( const QString & IRadioDeviceClient::queryDescription(), +static TQString IRadioDeviceClient_unknown("unknown"); +IF_IMPL_TQUERY ( const TQString & IRadioDeviceClient::queryDescription(), getDescription(), IRadioDeviceClient_unknown ); -IF_IMPL_QUERY ( SoundStreamID IRadioDeviceClient::queryCurrentSoundStreamID(), +IF_IMPL_TQUERY ( SoundStreamID IRadioDeviceClient::queryCurrentSoundStreamID(), getCurrentSoundStreamID(), SoundStreamID::InvalidID ); @@ -120,31 +120,31 @@ IF_IMPL_SENDER ( IRadioSoundClient::sendSignalMinQuality (float q), IF_IMPL_SENDER ( IRadioSoundClient::sendStereo(bool s), setStereo(s) ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryVolume(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryVolume(), getVolume(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryTreble(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryTreble(), getTreble(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryBass(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryBass(), getBass(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::queryBalance(), +IF_IMPL_TQUERY ( float IRadioSoundClient::queryBalance(), getBalance(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::querySignalQuality(), +IF_IMPL_TQUERY ( float IRadioSoundClient::querySignalQuality(), getSignalQuality(), 0.0 ) -IF_IMPL_QUERY ( float IRadioSoundClient::querySignalMinQuality(), +IF_IMPL_TQUERY ( float IRadioSoundClient::querySignalMinQuality(), getSignalMinQuality(), 0.75 ) -IF_IMPL_QUERY ( bool IRadioSoundClient::queryHasGoodQuality(), +IF_IMPL_TQUERY ( bool IRadioSoundClient::queryHasGoodQuality(), hasGoodQuality(), false ) -IF_IMPL_QUERY ( bool IRadioSoundClient::queryIsStereo(), +IF_IMPL_TQUERY ( bool IRadioSoundClient::queryIsStereo(), isStereo(), false ) -IF_IMPL_QUERY ( bool IRadioSoundClient::queryIsMuted(), +IF_IMPL_TQUERY ( bool IRadioSoundClient::queryIsMuted(), isMuted(), true ) @@ -207,16 +207,16 @@ IF_IMPL_SENDER ( ISeekRadioClient::sendStartSeekDown(), IF_IMPL_SENDER ( ISeekRadioClient::sendStopSeek(), stopSeek() ); -IF_IMPL_QUERY ( bool ISeekRadioClient::queryIsSeekRunning(), +IF_IMPL_TQUERY ( bool ISeekRadioClient::queryIsSeekRunning(), isSeekRunning(), false ); -IF_IMPL_QUERY ( bool ISeekRadioClient::queryIsSeekUpRunning(), +IF_IMPL_TQUERY ( bool ISeekRadioClient::queryIsSeekUpRunning(), isSeekUpRunning(), false ); -IF_IMPL_QUERY ( bool ISeekRadioClient::queryIsSeekDownRunning(), +IF_IMPL_TQUERY ( bool ISeekRadioClient::queryIsSeekDownRunning(), isSeekDownRunning(), false ); -IF_IMPL_QUERY ( float ISeekRadioClient::queryProgress(), +IF_IMPL_TQUERY ( float ISeekRadioClient::queryProgress(), getProgress(), 1.0 ); @@ -261,22 +261,22 @@ IF_IMPL_SENDER ( IFrequencyRadioClient::sendMaxFrequency(float mf), IF_IMPL_SENDER ( IFrequencyRadioClient::sendScanStep(float s), setScanStep(s) ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryFrequency(), getFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMinFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMinFrequency(), getMinFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMinDeviceFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMinDeviceFrequency(), getMinDeviceFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMaxFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMaxFrequency(), getMaxFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryMaxDeviceFrequency(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryMaxDeviceFrequency(), getMaxDeviceFrequency(), 0 ) -IF_IMPL_QUERY ( float IFrequencyRadioClient::queryScanStep(), +IF_IMPL_TQUERY ( float IFrequencyRadioClient::queryScanStep(), getScanStep(), 0.05 ) @@ -312,7 +312,7 @@ IF_IMPL_SENDER ( IInternetRadioClient::sendURL(const KURL &url), static KURL emptyURL; -IF_IMPL_QUERY ( const KURL &IInternetRadioClient::queryURL(), +IF_IMPL_TQUERY ( const KURL &IInternetRadioClient::queryURL(), getURL(), emptyURL ) diff --git a/kradio3/src/radiodevicepool_interfaces.cpp b/kradio3/src/radiodevicepool_interfaces.cpp index 27c111e..6b6fbe1 100644 --- a/kradio3/src/radiodevicepool_interfaces.cpp +++ b/kradio3/src/radiodevicepool_interfaces.cpp @@ -23,9 +23,9 @@ IF_IMPL_SENDER ( IRadioDevicePool::notifyActiveDeviceChanged(IRadioDevice *rd), noticeActiveDeviceChanged(rd) ) -IF_IMPL_SENDER ( IRadioDevicePool::notifyDevicesChanged(const QPtrList<IRadioDevice> &l), +IF_IMPL_SENDER ( IRadioDevicePool::notifyDevicesChanged(const TQPtrList<IRadioDevice> &l), noticeDevicesChanged(l) ) -IF_IMPL_SENDER ( IRadioDevicePool::notifyDeviceDescriptionChanged(const QString &s), +IF_IMPL_SENDER ( IRadioDevicePool::notifyDeviceDescriptionChanged(const TQString &s), noticeDeviceDescriptionChanged(s) ) // IRadioDevicePoolClient @@ -33,17 +33,17 @@ IF_IMPL_SENDER ( IRadioDevicePool::notifyDeviceDescriptionChanged(const QStrin IF_IMPL_SENDER ( IRadioDevicePoolClient::sendActiveDevice(IRadioDevice *rd, bool keepPower ), setActiveDevice(rd, keepPower) ) -IF_IMPL_QUERY ( IRadioDevice *IRadioDevicePoolClient::queryActiveDevice(), +IF_IMPL_TQUERY ( IRadioDevice *IRadioDevicePoolClient::queryActiveDevice(), getActiveDevice(), NULL ) -static const QPtrList<IRadioDevice> IRadioDevicePoolClient_emptyList; -IF_IMPL_QUERY ( const QPtrList<IRadioDevice> &IRadioDevicePoolClient::queryDevices(), +static const TQPtrList<IRadioDevice> IRadioDevicePoolClient_emptyList; +IF_IMPL_TQUERY ( const TQPtrList<IRadioDevice> &IRadioDevicePoolClient::queryDevices(), getDevices(), IRadioDevicePoolClient_emptyList ) -static QString IRadioDevicePoolClient_unknown("unknown"); -IF_IMPL_QUERY ( const QString &IRadioDevicePoolClient::queryDeviceDescription(), +static TQString IRadioDevicePoolClient_unknown("unknown"); +IF_IMPL_TQUERY ( const TQString &IRadioDevicePoolClient::queryDeviceDescription(), getDeviceDescription(), IRadioDevicePoolClient_unknown ) diff --git a/kradio3/src/radiostation-config.cpp b/kradio3/src/radiostation-config.cpp index f60230c..9f191c8 100644 --- a/kradio3/src/radiostation-config.cpp +++ b/kradio3/src/radiostation-config.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qlabel.h> -#include <qspinbox.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqlayout.h> #include <klocale.h> #include <math.h> @@ -26,8 +26,8 @@ #include "include/frequencyradiostation.h" -RadioStationConfig::RadioStationConfig(QWidget *parent) - : QWidget (parent) +RadioStationConfig::RadioStationConfig(TQWidget *tqparent) + : TQWidget (tqparent) { } @@ -39,10 +39,10 @@ RadioStationConfig::~RadioStationConfig() /////////////////////////////////////////////////////////////////////// -UndefinedRadioStationConfig::UndefinedRadioStationConfig (QWidget *parent) - : RadioStationConfig(parent) +UndefinedRadioStationConfig::UndefinedRadioStationConfig (TQWidget *tqparent) + : RadioStationConfig(tqparent) { - new QLabel (i18n("I don't know how to edit this station"), this); + new TQLabel (i18n("I don't know how to edit this station"), this); } UndefinedRadioStationConfig::~UndefinedRadioStationConfig() @@ -60,17 +60,17 @@ void UndefinedRadioStationConfig::storeStationData (RadioStation &/*rs*/) /////////////////////////////////////////////////////////////////////// -FrequencyRadioStationConfig::FrequencyRadioStationConfig (QWidget *parent) - : RadioStationConfig(parent) +FrequencyRadioStationConfig::FrequencyRadioStationConfig (TQWidget *tqparent) + : RadioStationConfig(tqparent) { - QHBoxLayout *hl = new QHBoxLayout(this); - QVBoxLayout *vl = new QVBoxLayout(hl); - vl->addWidget (new QLabel(i18n("Frequency:"), this)); - m_editFrequency = new QSpinBox(20, 150000, 10, this); + TQHBoxLayout *hl = new TQHBoxLayout(this); + TQVBoxLayout *vl = new TQVBoxLayout(hl); + vl->addWidget (new TQLabel(i18n("Frequency:"), this)); + m_editFrequency = new TQSpinBox(20, 150000, 10, this); vl->addWidget (m_editFrequency); - hl->addItem(new QSpacerItem (10, 1, QSizePolicy::Expanding, QSizePolicy::Fixed)); + hl->addItem(new TQSpacerItem (10, 1, TQSizePolicy::Expanding, TQSizePolicy::Fixed)); - connect (m_editFrequency, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int))); + connect (m_editFrequency, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int))); } FrequencyRadioStationConfig::~FrequencyRadioStationConfig() diff --git a/kradio3/src/radiostation-listview.cpp b/kradio3/src/radiostation-listview.cpp index e23fbaa..a9f814c 100644 --- a/kradio3/src/radiostation-listview.cpp +++ b/kradio3/src/radiostation-listview.cpp @@ -21,14 +21,14 @@ #include "include/station-drag-object.h" #include <klocale.h> -#include <qfile.h> -#include <qimage.h> -#include <qpixmap.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqpixmap.h> #include <kconfig.h> -RadioStationListView::RadioStationListView(QWidget *parent, const char *name) - : KListView(parent, name) +RadioStationListView::RadioStationListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { addColumn(i18n("No.")); addColumn(i18n("Icon")); @@ -37,14 +37,14 @@ RadioStationListView::RadioStationListView(QWidget *parent, const char *name) setAllColumnsShowFocus(true); setSorting(-1); - QObject::connect(this, SIGNAL(spacePressed(QListViewItem*)), - this, SLOT(slotStationActivation(QListViewItem* ))); - QObject::connect(this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotStationActivation(QListViewItem* ))); - QObject::connect(this, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotStationActivation(QListViewItem *))); - QObject::connect(this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(slotCurrentStationChanged(QListViewItem *))); + TQObject::connect(this, TQT_SIGNAL(spacePressed(TQListViewItem*)), + this, TQT_SLOT(slotStationActivation(TQListViewItem* ))); + TQObject::connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotStationActivation(TQListViewItem* ))); + TQObject::connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotStationActivation(TQListViewItem *))); + TQObject::connect(this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(slotCurrentStationChanged(TQListViewItem *))); setAcceptDrops(true); } @@ -55,9 +55,9 @@ RadioStationListView::~RadioStationListView() } -QListViewItem *RadioStationListView::getItemForIndex(int idx) const +TQListViewItem *RadioStationListView::getItemForIndex(int idx) const { - QListViewItem *item = NULL; + TQListViewItem *item = NULL; if (idx >= 0 && idx < childCount()) { item = firstChild(); @@ -71,12 +71,12 @@ QListViewItem *RadioStationListView::getItemForIndex(int idx) const } -int RadioStationListView::getIndexForItem(QListViewItem *queryItem) const +int RadioStationListView::getIndexForItem(TQListViewItem *queryItem) const { int idx = -1; if (queryItem) { - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); ++idx; while (item && item != queryItem) { item = item->nextSibling(); @@ -92,15 +92,15 @@ int RadioStationListView::getIndexForItem(QListViewItem *queryItem) const void RadioStationListView::setStation(int idx, const RadioStation &s, int nr) { - QListViewItem *item = getItemForIndex(idx); + TQListViewItem *item = getItemForIndex(idx); if (idx < 0) { - item = new QListViewItem(this, firstChild()); + item = new TQListViewItem(this, firstChild()); firstChild()->moveItem(item); m_StationIDs.prepend(s.stationID()); idx = 0; } else if (idx >= childCount()) { - item = new QListViewItem(this, lastChild()); + item = new TQListViewItem(this, lastChild()); m_StationIDs.append(s.stationID()); idx = childCount() - 1; } @@ -109,19 +109,19 @@ void RadioStationListView::setStation(int idx, const RadioStation &s, int nr) item->setDragEnabled(true); item->setDropEnabled(true); - item->setText(0, QString::number(nr > 0 ? nr : idx+1)); + item->setText(0, TQString::number(nr > 0 ? nr : idx+1)); item->setText(2, s.name()); item->setText(3, s.description()); m_StationIDs[idx] = s.stationID(); - QImage img(s.iconName()); + TQImage img(s.iconName()); if (!img.isNull()) { int h = img.height(); float f = 0.9 * (float)(item->height()) / (h ? (float)h : 1.0); item->setPixmap(1, img.smoothScale((int)(img.width()*f), (int)(h * f))); } else { - item->setPixmap(1, QPixmap()); + item->setPixmap(1, TQPixmap()); } } } @@ -144,28 +144,28 @@ void RadioStationListView::setStations(const StationList &stations) void RadioStationListView::removeStation(int idx) { - QListViewItem *item = getItemForIndex(idx); + TQListViewItem *item = getItemForIndex(idx); if (item) { delete item; m_StationIDs.remove(m_StationIDs.at(idx)); } } -void RadioStationListView::takeItem(QListViewItem *item, int idx) +void RadioStationListView::takeItem(TQListViewItem *item, int idx) { - QListView::takeItem(item); + TQListView::takeItem(item); m_StationIDs.remove(m_StationIDs.at(idx)); } -void RadioStationListView::insertItem(QListViewItem *item, const QString &stationid, int idx_to) +void RadioStationListView::insertItem(TQListViewItem *item, const TQString &stationid, int idx_to) { - QListView::insertItem(item); + TQListView::insertItem(item); m_StationIDs.insert(m_StationIDs.at(idx_to), stationid); } void RadioStationListView::setCurrentStation(int idx) { - QListViewItem *item = getItemForIndex(idx); + TQListViewItem *item = getItemForIndex(idx); if (item) { clearSelection(); setSelected(item, true); @@ -180,13 +180,13 @@ int RadioStationListView::currentStationIndex() const } -void RadioStationListView::slotStationActivation(QListViewItem *item) +void RadioStationListView::slotStationActivation(TQListViewItem *item) { emit sigStationActivated(getIndexForItem(item)); } -void RadioStationListView::slotCurrentStationChanged(QListViewItem *item) +void RadioStationListView::slotCurrentStationChanged(TQListViewItem *item) { emit sigCurrentStationChanged(getIndexForItem(item)); } @@ -197,7 +197,7 @@ void RadioStationListView::saveState (KConfig *cfg) const if (!cfg) return; for (int i = 0; i < 4; ++i) - cfg->writeEntry(QString(name()) + "_radiostation_listview_col_" + QString::number(i), columnWidth(i)); + cfg->writeEntry(TQString(name()) + "_radiostation_listview_col_" + TQString::number(i), columnWidth(i)); } @@ -206,14 +206,14 @@ void RadioStationListView::restoreState (KConfig *cfg) if (!cfg) return; for (int i = 0; i < 4; ++i) - setColumnWidth(i, cfg->readNumEntry(QString(name()) + "_radiostation_listview_col_" + QString::number(i), -1)); + setColumnWidth(i, cfg->readNumEntry(TQString(name()) + "_radiostation_listview_col_" + TQString::number(i), -1)); } -QDragObject *RadioStationListView::dragObject() +TQDragObject *RadioStationListView::dragObject() { - QStringList list; - QListViewItem *item = firstChild(); + TQStringList list; + TQListViewItem *item = firstChild(); for (int idx = 0; item; ++idx, item = item->nextSibling()) { if (item->isSelected()) { list.append(m_StationIDs[idx]); @@ -222,12 +222,12 @@ QDragObject *RadioStationListView::dragObject() return new StationDragObject(list, this); } -void RadioStationListView::dragEnterEvent(QDragEnterEvent* event) +void RadioStationListView::dragEnterEvent(TQDragEnterEvent* event) { event->accept(StationDragObject::canDecode(event)); } -void RadioStationListView::contentsDragEnterEvent(QDragEnterEvent* event) +void RadioStationListView::contentsDragEnterEvent(TQDragEnterEvent* event) { bool a = StationDragObject::canDecode(event); if (a) @@ -237,21 +237,21 @@ void RadioStationListView::contentsDragEnterEvent(QDragEnterEvent* event) event->accept(a); } -void RadioStationListView::dropEvent(QDropEvent* event) +void RadioStationListView::dropEvent(TQDropEvent* event) { - QStringList list; + TQStringList list; if ( StationDragObject::decode(event, list) ) { emit sigStationsReceived(list); } } -void RadioStationListView::contentsDropEvent(QDropEvent* event) +void RadioStationListView::contentsDropEvent(TQDropEvent* event) { dropEvent(event); } -void RadioStationListView::contentsDragMoveEvent(QDragMoveEvent* event) +void RadioStationListView::contentsDragMoveEvent(TQDragMoveEvent* event) { event->accept(); } diff --git a/kradio3/src/radiostation.cpp b/kradio3/src/radiostation.cpp index 6bdcd1a..f1eb58c 100644 --- a/kradio3/src/radiostation.cpp +++ b/kradio3/src/radiostation.cpp @@ -38,7 +38,7 @@ const char *dev_urandom_radiostations = "/dev/urandom"; ///////////////////////////////////////////////////////////////////////////// -QDict<RadioStation> *RadioStation::stationClassRegistry = 0; +TQDict<RadioStation> *RadioStation::stationClassRegistry = 0; ///////////////////////////////////////////////////////////////////////////// @@ -48,33 +48,33 @@ const UndefinedRadioStation undefinedRadioStation (registerStationClass); ///////////////////////////////////////////////////////////////////////////// -RadioStation::RadioStation(RegisterStationClass, const QString &classname) - : m_stationID(QString::null), // mark this station as a prototype station +RadioStation::RadioStation(RegisterStationClass, const TQString &classname) + : m_stationID(TQString()), // mark this station as a prototype station // so that we can create later a real stationID - m_name(QString::null), - m_shortName(QString::null), + m_name(TQString()), + m_shortName(TQString()), m_initialVolume(-1), - m_iconName(QString::null) + m_iconName(TQString()) { if (! stationClassRegistry) - stationClassRegistry = new QDict<RadioStation>; + stationClassRegistry = new TQDict<RadioStation>; stationClassRegistry->insert(classname, this); } RadioStation::RadioStation() - : m_name(QString::null), - m_shortName(QString::null), + : m_name(TQString()), + m_shortName(TQString()), m_initialVolume(-1), - m_iconName(QString::null) + m_iconName(TQString()) { generateNewStationID(); } -RadioStation::RadioStation(const QString &name, const QString &shortName) +RadioStation::RadioStation(const TQString &name, const TQString &shortName) : m_name(name), m_shortName(shortName), m_initialVolume(-1), - m_iconName(QString::null) + m_iconName(TQString()) { generateNewStationID(); } @@ -112,29 +112,29 @@ void RadioStation::generateNewStationID() const int buffersize = 32; unsigned char buffer[buffersize]; - QString stime, srandom = QString::null; + TQString stime, srandom = TQString(); stime.setNum(time(NULL)); int fd = open (dev_urandom_radiostations, O_RDONLY); read(fd, buffer, buffersize); close(fd); for (int i = 0; i < buffersize; ++i) - srandom += QString().sprintf("%02X", (unsigned int)buffer[i]); + srandom += TQString().sprintf("%02X", (unsigned int)buffer[i]); m_stationID = stime + srandom; } -RadioStation const *RadioStation::getStationClass(const QString &classname) +RadioStation const *RadioStation::getStationClass(const TQString &classname) { if (stationClassRegistry) - return stationClassRegistry->find(classname); + return stationClassRegistry->tqfind(classname); else return NULL; } -bool RadioStation::setProperty(const QString &pn, const QString &val) +bool RadioStation::setProperty(const TQString &pn, const TQString &val) { bool retval = false; if (pn == StationIDElement) { @@ -158,7 +158,7 @@ bool RadioStation::setProperty(const QString &pn, const QString &val) } -QString RadioStation::getProperty(const QString &pn) const +TQString RadioStation::getProperty(const TQString &pn) const { if (pn == StationIDElement) { return m_stationID; @@ -169,16 +169,16 @@ QString RadioStation::getProperty(const QString &pn) const } else if (pn == StationIconStringElement) { return m_iconName; } else if (pn == StationVolumePresetElement) { - return QString().setNum(m_initialVolume); + return TQString().setNum(m_initialVolume); } else { - return QString::null; + return TQString(); } } -QStringList RadioStation::getPropertyNames() const +TQStringList RadioStation::getPropertyNames() const { - QStringList l; + TQStringList l; l.push_back(StationIDElement); l.push_back(StationNameElement); l.push_back(StationShortNameElement); diff --git a/kradio3/src/seekhelper.cpp b/kradio3/src/seekhelper.cpp index eab7c1a..6a26c5d 100644 --- a/kradio3/src/seekhelper.cpp +++ b/kradio3/src/seekhelper.cpp @@ -19,9 +19,9 @@ #include <kdebug.h> -SeekHelper::SeekHelper(ISeekRadio &parent) +SeekHelper::SeekHelper(ISeekRadio &tqparent) : m_state(off), - m_parent(parent), + m_parent(tqparent), m_SoundStreamID(SoundStreamID::InvalidID) { } diff --git a/kradio3/src/soundformat.cpp b/kradio3/src/soundformat.cpp index c3f290b..9ca1b5d 100644 --- a/kradio3/src/soundformat.cpp +++ b/kradio3/src/soundformat.cpp @@ -47,7 +47,7 @@ int SoundFormat::maxValue() const } -void SoundFormat::restoreConfig(const QString &prefix, KConfig *c) +void SoundFormat::restoreConfig(const TQString &prefix, KConfig *c) { m_SampleBits = c->readNumEntry (prefix + "bits", 16); m_IsSigned = c->readBoolEntry(prefix + "sign", true); @@ -59,7 +59,7 @@ void SoundFormat::restoreConfig(const QString &prefix, KConfig *c) } -void SoundFormat::saveConfig(const QString &prefix, KConfig *c) const +void SoundFormat::saveConfig(const TQString &prefix, KConfig *c) const { c->writeEntry(prefix + "bits", m_SampleBits); c->writeEntry(prefix + "sign", m_IsSigned); @@ -87,15 +87,15 @@ int SoundFormat::convertSampleToInt(const char *sample, bool do_scale) const } int scale = (sizeof(unsigned) << 3) - m_SampleBits; - int signmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : + int signtqmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : (-m_IsSigned << ((size << 3) - 1)) ; if (do_scale) { // map to int number space - return (val << scale) ^ signmask; + return (val << scale) ^ signtqmask; } else { // do only sign extension - if (val & signmask) - val |= signmask; + if (val & signtqmask) + val |= signtqmask; return val; } } @@ -105,9 +105,9 @@ void SoundFormat::convertIntToSample(int src, char *dst, bool is_scaled) const { int size = sampleSize(); int scale = (sizeof(unsigned) * 8) - m_SampleBits; - int signmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); + int signtqmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); - unsigned val = is_scaled ? (src ^ signmask) >> scale : src; + unsigned val = is_scaled ? (src ^ signtqmask) >> scale : src; if (m_Endianess == LITTLE_ENDIAN) { for (int i = 0; i < size; ++i, ++dst) { (unsigned char &)*dst = val & 0xFF; @@ -127,7 +127,7 @@ void SoundFormat::convertSamplesToInts(const char *src, int *dst, size_t n, bool { int size = sampleSize(); int scale = (sizeof(unsigned) * 8) - m_SampleBits; - int signmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : + int signtqmask = do_scale ? (!m_IsSigned << ((sizeof(unsigned) << 3) - 1)) : (-m_IsSigned << ((size << 3) - 1)) ; if (m_Endianess == LITTLE_ENDIAN) { src = src - 1 + (size * n); @@ -138,9 +138,9 @@ void SoundFormat::convertSamplesToInts(const char *src, int *dst, size_t n, bool val = (val << 8) | (unsigned char)*src; } if (do_scale) { - *dst = (val << scale) ^ signmask; - } else if (val & signmask) { - *dst = val | signmask; + *dst = (val << scale) ^ signtqmask; + } else if (val & signtqmask) { + *dst = val | signtqmask; } } } else { @@ -150,9 +150,9 @@ void SoundFormat::convertSamplesToInts(const char *src, int *dst, size_t n, bool val = (val << 8) | (unsigned char)*src; } if (do_scale) { - *dst = (val << scale) ^ signmask; - } else if (val & signmask) { - *dst = val | signmask; + *dst = (val << scale) ^ signtqmask; + } else if (val & signtqmask) { + *dst = val | signtqmask; } } } @@ -163,11 +163,11 @@ void SoundFormat::convertIntsToSamples(const int *src, char *dst, size_t n, bool { int size = sampleSize(); int scale = (sizeof(unsigned) * 8) - m_SampleBits; - int signmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); + int signtqmask = (!m_IsSigned << (sizeof(unsigned) * 8 - 1)); if (m_Endianess == LITTLE_ENDIAN) { for (const int *end = src+n; src < end; ++src) { - unsigned val = is_scaled ? ((unsigned)(*src ^ signmask)) >> scale : *src; + unsigned val = is_scaled ? ((unsigned)(*src ^ signtqmask)) >> scale : *src; for (int i = 0; i < size; ++i, ++dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; @@ -177,7 +177,7 @@ void SoundFormat::convertIntsToSamples(const int *src, char *dst, size_t n, bool dst = dst - 1 + (size * n); const int *end = src; for (src = src - 1 + n; src >= end; --src) { - unsigned val = is_scaled ? ((unsigned)(*src ^ signmask)) >> scale : *src; + unsigned val = is_scaled ? ((unsigned)(*src ^ signtqmask)) >> scale : *src; for (int i = size - 1; i >= 0; --i, --dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; @@ -192,7 +192,7 @@ void SoundFormat::convertSamplesToFloat(const char *_src, float **_dst, size_t n int sample_size = sampleSize(); int frame_size = frameSize(); int scale = (sizeof(short) << 3) - m_SampleBits; - int signmask = !m_IsSigned << ((sizeof(short) << 3) - 1); + int signtqmask = !m_IsSigned << ((sizeof(short) << 3) - 1); int skip = frame_size - sample_size; if (m_Endianess == LITTLE_ENDIAN) { @@ -206,7 +206,7 @@ void SoundFormat::convertSamplesToFloat(const char *_src, float **_dst, size_t n for (int i = sample_size - 1; i >= 0; --i, --src) { val = (val << 8) | (unsigned char)*src; } - *dst = (float)(signed short)((val << scale) ^ signmask) / 32768.0f; + *dst = (float)(signed short)((val << scale) ^ signtqmask) / 32768.0f; src = src - skip; } } @@ -219,7 +219,7 @@ void SoundFormat::convertSamplesToFloat(const char *_src, float **_dst, size_t n for (int i = 0; i < sample_size; ++i, ++src) { val = (val << 8) | (unsigned char)*src; } - *dst = (float)(signed short)((val << scale) ^ signmask) / 32768.0f; + *dst = (float)(signed short)((val << scale) ^ signtqmask) / 32768.0f; src = src + skip; } } @@ -233,7 +233,7 @@ void SoundFormat::convertFloatsToSamples(const float **_src, char *_dst, size_t int sample_size = sampleSize(); int frame_size = frameSize(); int scale = (sizeof(short) << 3) - m_SampleBits; - int signmask = (!m_IsSigned << (sizeof(short) << 3) - 1); + int signtqmask = (!m_IsSigned << (sizeof(short) << 3) - 1); int skip = frame_size - sample_size; if (m_Endianess == LITTLE_ENDIAN) { @@ -241,7 +241,7 @@ void SoundFormat::convertFloatsToSamples(const float **_src, char *_dst, size_t const float *src = _src[ch]; char *dst = _dst + ch * sample_size; for (const float *end = src+n; src < end; ++src) { - unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signmask)) >> scale; + unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signtqmask)) >> scale; for (int i = 0; i < sample_size; ++i, ++dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; @@ -256,7 +256,7 @@ void SoundFormat::convertFloatsToSamples(const float **_src, char *_dst, size_t const float *src = _src[ch]; const float *end = src; for (src = src - 1 + n; src >= end; --src) { - unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signmask)) >> scale; + unsigned val = (( ((unsigned)(*src * 32768.0f)) ^ signtqmask)) >> scale; for (int i = sample_size - 1; i >= 0; --i, --dst) { (unsigned char &)*dst = val & 0xFF; val >>= 8; diff --git a/kradio3/src/soundstreamclient_interfaces.cpp b/kradio3/src/soundstreamclient_interfaces.cpp index c030ec4..943276c 100644 --- a/kradio3/src/soundstreamclient_interfaces.cpp +++ b/kradio3/src/soundstreamclient_interfaces.cpp @@ -27,7 +27,7 @@ const char *dev_urandom = "/dev/urandom"; void ISoundStreamServer::noticeConnectedI(cmplInterface *i, bool pointer_valid) { - for (QPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { + for (TQPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { it.current()->noticeConnectedSoundClient(i, pointer_valid); cmplInterface *x = it.current(); if (x != i && pointer_valid) @@ -37,7 +37,7 @@ void ISoundStreamServer::noticeConnectedI(cmplInterface *i, bool pointer_valid) void ISoundStreamServer::noticeDisconnectedI(cmplInterface *i, bool pointer_valid) { - for (QPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { + for (TQPtrListIterator<cmplInterface> it(iConnections); it.current(); ++it) { it.current()->noticeDisconnectedSoundClient(i, pointer_valid); cmplInterface *x = it.current(); if (x != i && pointer_valid) @@ -47,20 +47,20 @@ void ISoundStreamServer::noticeDisconnectedI(cmplInterface *i, bool pointer_vali -QPtrList<ISoundStreamClient> ISoundStreamServer::getPlaybackMixers() const +TQPtrList<ISoundStreamClient> ISoundStreamServer::getPlaybackMixers() const { - QPtrList<ISoundStreamClient> tmp; - for (QPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { + TQPtrList<ISoundStreamClient> tmp; + for (TQPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) tmp.append(it.current()); } return tmp; } -QPtrList<ISoundStreamClient> ISoundStreamServer::getCaptureMixers() const +TQPtrList<ISoundStreamClient> ISoundStreamServer::getCaptureMixers() const { - QPtrList<ISoundStreamClient> tmp; - for (QPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { + TQPtrList<ISoundStreamClient> tmp; + for (TQPtrListIterator<ISoundStreamClient> it(iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) tmp.append(it.current()); } @@ -196,18 +196,18 @@ IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryIsMuted, (SoundStreamID id, bool isMuted(id, m) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyPlaybackChannelsChanged, (const QString &client_id, const QStringList &map), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyPlaybackChannelsChanged, (const TQString &client_id, const TQStringList &map), noticePlaybackChannelsChanged(client_id, map) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyCaptureChannelsChanged, (const QString &client_id, const QStringList &map), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, notifyCaptureChannelsChanged, (const TQString &client_id, const TQStringList &map), noticeCaptureChannelsChanged (client_id, map) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamDescription, (SoundStreamID id, QString &descr), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamDescription, (SoundStreamID id, TQString &descr), getSoundStreamDescription(id, descr) ); IF_IMPL_SENDER_FINE ( ISoundStreamServer, querySoundStreamRadioStation, (SoundStreamID id, const RadioStation *&rs), getSoundStreamRadioStation(id, rs) ); -IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryEnumerateSoundStreams, (QMap<QString, SoundStreamID> &list), +IF_IMPL_SENDER_FINE ( ISoundStreamServer, queryEnumerateSoundStreams, (TQMap<TQString, SoundStreamID> &list), enumerateSoundStreams(list) ); @@ -228,26 +228,26 @@ ISoundStreamClient::~ISoundStreamClient() { } -QString ISoundStreamClient::createNewSoundStreamClientID() +TQString ISoundStreamClient::createNewSoundStreamClientID() { const int buffersize = 32; unsigned char buffer[buffersize]; - QString stime, srandom = QString::null; + TQString stime, srandom = TQString(); stime.setNum(time(NULL)); int fd = open (dev_urandom, O_RDONLY); read(fd, buffer, buffersize); close(fd); for (int i = 0; i < buffersize; ++i) - srandom += QString().sprintf("%02X", (unsigned int)buffer[i]); + srandom += TQString().sprintf("%02X", (unsigned int)buffer[i]); return stime + srandom; } -void ISoundStreamClient::setSoundStreamClientID(const QString &s) +void ISoundStreamClient::setSoundStreamClientID(const TQString &s) { ISoundStreamServer *server = getSoundStreamServer(); if (server) @@ -258,7 +258,7 @@ void ISoundStreamClient::setSoundStreamClientID(const QString &s) } -const QString &ISoundStreamClient::getSoundStreamClientID() const +const TQString &ISoundStreamClient::getSoundStreamClientID() const { return m_SoundStreamClientID; } @@ -304,30 +304,30 @@ void ISoundStreamClient::closeSoundStream(SoundStreamID id, bool notify) } -static const QStringList emptyList; +static const TQStringList emptyList; -const QStringList &ISoundStreamClient::getPlaybackChannels() const +const TQStringList &ISoundStreamClient::getPlaybackChannels() const { return emptyList; } -const QStringList &ISoundStreamClient::getCaptureChannels() const +const TQStringList &ISoundStreamClient::getCaptureChannels() const { return emptyList; } -static const QMap<QString, ISoundStreamClient *> emptyClientMap; -QMap<QString, ISoundStreamClient *> ISoundStreamClient::getPlaybackClients() const +static const TQMap<TQString, ISoundStreamClient *> emptyClientMap; +TQMap<TQString, ISoundStreamClient *> ISoundStreamClient::getPlaybackClients() const { return iConnections.count() ? iConnections.getFirst()->getPlaybackClients() : emptyClientMap; } -QMap<QString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() const { - QMap<QString, ISoundStreamClient *> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, ISoundStreamClient *> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) map.insert(it.current()->getSoundStreamClientID(), it.current()); } @@ -336,16 +336,16 @@ QMap<QString, ISoundStreamClient *> ISoundStreamServer::getPlaybackClients() con -static const QMap<QString, QString> emptyClientDescrMap; -QMap<QString, QString> ISoundStreamClient::getPlaybackClientDescriptions() const +static const TQMap<TQString, TQString> emptyClientDescrMap; +TQMap<TQString, TQString> ISoundStreamClient::getPlaybackClientDescriptions() const { return iConnections.count() ? iConnections.getFirst()->getPlaybackClientDescriptions() : emptyClientDescrMap; } -QMap<QString, QString> ISoundStreamServer::getPlaybackClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamServer::getPlaybackClientDescriptions() const { - QMap<QString, QString> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, TQString> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsPlayback()) map.insert(it.current()->getSoundStreamClientID(), it.current()->getSoundStreamClientDescription()); } @@ -355,16 +355,16 @@ QMap<QString, QString> ISoundStreamServer::getPlaybackClientDescriptions() const -QMap<QString, ISoundStreamClient *> ISoundStreamClient::getCaptureClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamClient::getCaptureClients() const { return iConnections.count() ? iConnections.getFirst()->getCaptureClients() : emptyClientMap; } -QMap<QString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() const +TQMap<TQString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() const { - QMap<QString, ISoundStreamClient *> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, ISoundStreamClient *> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) map.insert(it.current()->getSoundStreamClientID(), it.current()); } @@ -374,15 +374,15 @@ QMap<QString, ISoundStreamClient *> ISoundStreamServer::getCaptureClients() cons -QMap<QString, QString> ISoundStreamClient::getCaptureClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamClient::getCaptureClientDescriptions() const { return iConnections.count() ? iConnections.getFirst()->getCaptureClientDescriptions() : emptyClientDescrMap; } -QMap<QString, QString> ISoundStreamServer::getCaptureClientDescriptions() const +TQMap<TQString, TQString> ISoundStreamServer::getCaptureClientDescriptions() const { - QMap<QString, QString> map; - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + TQMap<TQString, TQString> map; + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { if (it.current()->supportsCapture()) map.insert(it.current()->getSoundStreamClientID(), it.current()->getSoundStreamClientDescription()); } @@ -393,15 +393,15 @@ QMap<QString, QString> ISoundStreamServer::getCaptureClientDescriptions() const -ISoundStreamClient *ISoundStreamClient::getSoundStreamClientWithID(const QString &search_id) const +ISoundStreamClient *ISoundStreamClient::getSoundStreamClientWithID(const TQString &search_id) const { return iConnections.count() ? iConnections.getFirst()->getSoundStreamClientWithID(search_id) : NULL; } -ISoundStreamClient *ISoundStreamServer::getSoundStreamClientWithID(const QString &search_id) const +ISoundStreamClient *ISoundStreamServer::getSoundStreamClientWithID(const TQString &search_id) const { - for (QPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { - const QString &id = it.current()->getSoundStreamClientID(); + for (TQPtrListIterator<ISoundStreamClient> it(ISoundStreamServer::iConnections); it.current(); ++it) { + const TQString &id = it.current()->getSoundStreamClientID(); if (id == search_id) return it.current(); } @@ -416,11 +416,11 @@ void ISoundStreamClient::noticeDisconnectedSoundClient(thisInterface */*i*/, boo { } -static const QPtrList<ISoundStreamClient> emptyClientList; -IF_IMPL_QUERY ( QPtrList<ISoundStreamClient> ISoundStreamClient::queryPlaybackMixers(), +static const TQPtrList<ISoundStreamClient> emptyClientList; +IF_IMPL_TQUERY ( TQPtrList<ISoundStreamClient> ISoundStreamClient::queryPlaybackMixers(), getPlaybackMixers(), emptyClientList ); -IF_IMPL_QUERY ( QPtrList<ISoundStreamClient> ISoundStreamClient::queryCaptureMixers(), +IF_IMPL_TQUERY ( TQPtrList<ISoundStreamClient> ISoundStreamClient::queryCaptureMixers(), getPlaybackMixers(), emptyClientList ); diff --git a/kradio3/src/soundstreamid.cpp b/kradio3/src/soundstreamid.cpp index 1c9cfed..f1905e9 100644 --- a/kradio3/src/soundstreamid.cpp +++ b/kradio3/src/soundstreamid.cpp @@ -62,7 +62,7 @@ SoundStreamID SoundStreamID::createNewID(const SoundStreamID &oldID) } -void SoundStreamID::invalidate() +void SoundStreamID::tqinvalidate() { m_ID = 0; m_PhysicalID = 0; diff --git a/kradio3/src/standardscandialog-ui.ui b/kradio3/src/standardscandialog-ui.ui index ba7b98e..47e084e 100644 --- a/kradio3/src/standardscandialog-ui.ui +++ b/kradio3/src/standardscandialog-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>StandardScanDialogUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>StandardScanDialogUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QProgressBar" row="0" column="0"> + <widget class="TQProgressBar" row="0" column="0"> <property name="name"> <cstring>progressBar</cstring> </property> @@ -36,9 +36,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -54,14 +54,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>100</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -79,7 +79,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>20</height> @@ -88,15 +88,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelTimeDescr</cstring> </property> @@ -104,7 +104,7 @@ <string>remaining time</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelTime</cstring> </property> @@ -130,7 +130,7 @@ </includes> <variables> </variables> -<slots> -</slots> -<layoutdefaults spacing="6" margin="11"/> +<Q_SLOTS> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kradio3/src/standardscandialog.cpp b/kradio3/src/standardscandialog.cpp index 32d5308..cccfac0 100644 --- a/kradio3/src/standardscandialog.cpp +++ b/kradio3/src/standardscandialog.cpp @@ -18,23 +18,23 @@ #include "include/standardscandialog.h" #include "include/radiostation.h" -#include <qprogressbar.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqprogressbar.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klocale.h> #include <math.h> -StandardScanDialog::StandardScanDialog(QWidget *parent) - : StandardScanDialogUI(parent, NULL, true), +StandardScanDialog::StandardScanDialog(TQWidget *tqparent) + : StandardScanDialogUI(tqparent, NULL, true), m_count(0), m_running(false), m_oldPowerOn(false), m_oldStation(NULL), m_ignorePower(false) { - QObject::connect(buttonCancel, SIGNAL(clicked()), this, SLOT(slotCancelDone())); + TQObject::connect(buttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCancelDone())); } @@ -67,7 +67,7 @@ void StandardScanDialog::start() if (!m_running) { m_running = true; m_stations.all().clear(); - m_startTime = QDateTime::currentDateTime(); + m_startTime = TQDateTime::tqcurrentDateTime(); m_oldPowerOn = queryIsPowerOn(); m_oldStation = queryCurrentStation().copy(); sendToBeginning(); @@ -110,7 +110,7 @@ bool StandardScanDialog::noticeSeekFinished (const RadioStation &, bool goodQual { if (goodQuality) { ++m_count; - QString s; + TQString s; s.setNum(m_count); RadioStation *st = queryCurrentStation().copy(); @@ -153,11 +153,11 @@ bool StandardScanDialog::noticeProgress (float f) progressBar->setProgress((int)rint(f * 100)); if (m_running) { - int secs = m_startTime.secsTo(QDateTime::currentDateTime()); + int secs = m_startTime.secsTo(TQDateTime::tqcurrentDateTime()); int ms = (int)rint((1 - f) * (float) secs / f * 1000.0); if (ms > 0 && ms < 86400000) // max one day - labelTime->setText(i18n("<p align=\"right\">%1</p>").arg(QTime(0,0).addMSecs(ms).toString())); + labelTime->setText(i18n("<p align=\"right\">%1</p>").tqarg(TQTime(0,0).addMSecs(ms).toString())); else labelTime->setText(i18n("unknown")); diff --git a/kradio3/src/station-drag-object.cpp b/kradio3/src/station-drag-object.cpp index f951d54..b3fecb7 100644 --- a/kradio3/src/station-drag-object.cpp +++ b/kradio3/src/station-drag-object.cpp @@ -21,14 +21,14 @@ #define STATION_LIST_MIME_TYPE "multimedia/kradio-stationids" -StationDragObject::StationDragObject(const QStringList &stationIDs, QWidget *dragSource, const char * name) - : QStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) +StationDragObject::StationDragObject(const TQStringList &stationIDs, TQWidget *dragSource, const char * name) + : TQStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) { setStations(stationIDs); } -StationDragObject::StationDragObject(QWidget *dragSource, const char * name) - : QStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) +StationDragObject::StationDragObject(TQWidget *dragSource, const char * name) + : TQStoredDrag(STATION_LIST_MIME_TYPE, dragSource, name) { } @@ -46,12 +46,12 @@ const char *StationDragObject::format(int i) const } -void StationDragObject::setStations(const QStringList &stationIDs) +void StationDragObject::setStations(const TQStringList &stationIDs) { - QByteArray tmp; + TQByteArray tmp; int pos = 0; - for (QValueListConstIterator<QString> it=stationIDs.begin(); it != stationIDs.end(); ++it) { - const QString &s = *it; + for (TQValueListConstIterator<TQString> it=stationIDs.begin(); it != stationIDs.end(); ++it) { + const TQString &s = *it; tmp.resize(tmp.size()+s.length() + 1); for (unsigned int k = 0; k < s.length(); ++k) { tmp[pos++] = s[k].latin1(); @@ -62,22 +62,22 @@ void StationDragObject::setStations(const QStringList &stationIDs) } -bool StationDragObject::canDecode (const QMimeSource *e) +bool StationDragObject::canDecode (const TQMimeSource *e) { IErrorLogClient::staticLogDebug(e->format(0)); - bool retval = (e && e->format(0) == QString(STATION_LIST_MIME_TYPE)); + bool retval = (e && e->format(0) == TQString(STATION_LIST_MIME_TYPE)); if (retval) IErrorLogClient::staticLogDebug(i18n("canDecode = true")); return retval; } -bool StationDragObject::decode (const QMimeSource *e, QStringList &stationIDs) +bool StationDragObject::decode (const TQMimeSource *e, TQStringList &stationIDs) { stationIDs.clear(); if (canDecode(e)) { - const QByteArray &tmp = e->encodedData(e->format(0)); - QString str = ""; + const TQByteArray &tmp = e->tqencodedData(e->format(0)); + TQString str = ""; for (unsigned int pos = 0; pos < tmp.size(); ++pos) { if (tmp[pos]) { str.append(tmp[pos]); diff --git a/kradio3/src/stationlist.cpp b/kradio3/src/stationlist.cpp index f0f0ace..737fd72 100644 --- a/kradio3/src/stationlist.cpp +++ b/kradio3/src/stationlist.cpp @@ -22,10 +22,10 @@ #include "include/stationlistxmlhandler.h" #include "include/kradioversion.h" -#include <qstring.h> -#include <qfile.h> -#include <qiodevice.h> -#include <qmessagebox.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqiodevice.h> +#include <tqmessagebox.h> #include <kio/netaccess.h> #include <ktempfile.h> #include <klocale.h> @@ -43,7 +43,7 @@ RawStationList::RawStationList () RawStationList::RawStationList (const RawStationList &sl) - : QPtrList<RadioStation>(sl) + : TQPtrList<RadioStation>(sl) { setAutoDelete(true); } @@ -55,7 +55,7 @@ RawStationList::~RawStationList () } -QPtrCollection::Item RawStationList::newItem (QPtrCollection::Item s) +TQPtrCollection::Item RawStationList::newItem (TQPtrCollection::Item s) { if (s) return ((RadioStation*)s)->copy(); @@ -64,14 +64,14 @@ QPtrCollection::Item RawStationList::newItem (QPtrCollection::Item s) } -void RawStationList::deleteItem (QPtrCollection::Item s) +void RawStationList::deleteItem (TQPtrCollection::Item s) { if (autoDelete()) delete (RadioStation*)s; } -int RawStationList::compareItems(QPtrCollection::Item a, QPtrCollection::Item b) +int RawStationList::compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b) { if (!a && !b) return 0; @@ -104,7 +104,7 @@ bool RawStationList::insert (const RadioStation * item ) if (!item) return false; int idx = idxWithID(item->stationID()); if (idx >= 0) { - return replace(idx, item); + return tqreplace(idx, item); } else { append(item); return true; @@ -145,11 +145,11 @@ void RawStationList::append ( const RadioStation * item ) } -bool RawStationList::replace ( uint index, const RadioStation * item ) +bool RawStationList::tqreplace ( uint index, const RadioStation * item ) { bool r = true; RadioStation *rs = &stationWithID(item->stationID()); - r = BaseClass::replace(index, item); + r = BaseClass::tqreplace(index, item); if (rs != item) { BaseClass::removeRef(rs); } @@ -157,7 +157,7 @@ bool RawStationList::replace ( uint index, const RadioStation * item ) } -const RadioStation &RawStationList::stationWithID(const QString &sid) const +const RadioStation &RawStationList::stationWithID(const TQString &sid) const { Iterator it(*this); for (; const RadioStation *s = it.current(); ++it) { @@ -168,7 +168,7 @@ const RadioStation &RawStationList::stationWithID(const QString &sid) const } -RadioStation &RawStationList::stationWithID(const QString &sid) +RadioStation &RawStationList::stationWithID(const TQString &sid) { Iterator it(*this); for (; RadioStation *s = it.current(); ++it) { @@ -180,7 +180,7 @@ RadioStation &RawStationList::stationWithID(const QString &sid) -int RawStationList::idxWithID(const QString &sid) const +int RawStationList::idxWithID(const TQString &sid) const { int i = 0; Iterator it(*this); @@ -194,8 +194,8 @@ int RawStationList::idxWithID(const QString &sid) const bool RawStationList::operator == (const RawStationList &l) const { - QPtrListIterator<RadioStation> it1(*this); - QPtrListIterator<RadioStation> it2(l); + TQPtrListIterator<RadioStation> it1(*this); + TQPtrListIterator<RadioStation> it2(l); if (count() != l.count()) return false; for (; it1.current() && it2.current(); ++it1, ++it2) { @@ -235,29 +235,29 @@ void StationList::merge(const StationList & other) if (! m_metaData.comment.isEmpty()) m_metaData.comment += "\n"; - m_metaData.lastChange = QDateTime::currentDateTime(); + m_metaData.lastChange = TQDateTime::tqcurrentDateTime(); if (!metaData.maintainer.isEmpty()) - m_metaData.maintainer += (count() ? QString(" / ") : QString::null) + metaData.maintainer; + m_metaData.maintainer += (count() ? TQString(" / ") : TQString()) + metaData.maintainer; if (!metaData.country.isEmpty()) - m_metaData.country += (count() ? QString(" / ") : QString::null) + metaData.country; + m_metaData.country += (count() ? TQString(" / ") : TQString()) + metaData.country; if (!metaData.city.isEmpty()) - m_metaData.city = (count() ? QString(" / ") : QString::null) + metaData.city; + m_metaData.city = (count() ? TQString(" / ") : TQString()) + metaData.city; if (!metaData.media.isEmpty()) - m_metaData.media += (count() ? QString(" / ") : QString::null) + metaData.media; + m_metaData.media += (count() ? TQString(" / ") : TQString()) + metaData.media; if (!metaData.comment.isEmpty()) - m_metaData.comment += (count() ? QString(" / ") : QString::null) + metaData.comment; + m_metaData.comment += (count() ? TQString(" / ") : TQString()) + metaData.comment; if (count() && other.count()) m_metaData.comment += " " + i18n("Contains merged Data"); // merge stations - QPtrListIterator<RadioStation> it(other.all()); + TQPtrListIterator<RadioStation> it(other.all()); for (RadioStation *s = it.current(); s; s = ++it) { m_all.insert(s); } @@ -289,29 +289,29 @@ RadioStation &StationList::at(int idx) } -const RadioStation &StationList::stationWithID(const QString &sid) const +const RadioStation &StationList::stationWithID(const TQString &sid) const { return m_all.stationWithID(sid); } -RadioStation &StationList::stationWithID(const QString &sid) +RadioStation &StationList::stationWithID(const TQString &sid) { return m_all.stationWithID(sid); } -bool StationList::readXML (const QString &dat, const IErrorLogClient &logger, bool enableMessageBox) +bool StationList::readXML (const TQString &dat, const IErrorLogClient &logger, bool enableMessageBox) { // FIXME: TODO: error handling - QXmlInputSource source; + TQXmlInputSource source; source.setData(dat); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; StationListXmlHandler handler(logger); reader.setContentHandler (&handler); if (reader.parse(source)) { if (handler.wasCompatMode() && enableMessageBox) { - QMessageBox::information(NULL, "KRadio", + TQMessageBox::information(NULL, "KRadio", i18n("Probably an old station preset file was read.\n" "You have to rebuild your station selections for " "the quickbar and the docking menu.") @@ -325,7 +325,7 @@ bool StationList::readXML (const QString &dat, const IErrorLogClient &logger, bo logger.logError("StationList::readXML: " + i18n("parsing failed")); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Parsing the station preset file failed.\n" "See console output for more details.")); } @@ -336,17 +336,17 @@ bool StationList::readXML (const QString &dat, const IErrorLogClient &logger, bo bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool enableMessageBox) { - QString tmpfile; + TQString tmpfile; if (!KIO::NetAccess::download(url, tmpfile, NULL)) { if (enableMessageBox) { logger.logError("StationList::readXML: " + - i18n("error downloading preset file %1").arg(url.url())); - QMessageBox::warning(NULL, "KRadio", + i18n("error downloading preset file %1").tqarg(url.url())); + TQMessageBox::warning(NULL, "KRadio", i18n("Download of the station preset file at %1 failed.") - .arg(url.url())); + .tqarg(url.url())); } else { logger.logWarning("StationList::readXML: " + - i18n("error downloading preset file %1").arg(url.url())); + i18n("error downloading preset file %1").tqarg(url.url())); } return false; } @@ -354,40 +354,40 @@ bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool logger.logDebug("StationList::readXML: " + i18n("temporary file: ") + tmpfile); - QFile presetFile (tmpfile); + TQFile presetFile (tmpfile); if (! presetFile.open(IO_ReadOnly)) { logger.logError("StationList::readXML: " + - i18n("error opening preset file %1").arg(tmpfile)); + i18n("error opening preset file %1").tqarg(tmpfile)); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Opening of the station preset file at %1 failed.") - .arg(tmpfile)); + .tqarg(tmpfile)); } return false; } - QString xmlData; + TQString xmlData; // make sure that qtextstream is gone when we close presetFile - QString tmp; + TQString tmp; { - QTextStream ins(&presetFile); + TQTextStream ins(&presetFile); tmp = ins.read(); } presetFile.reset(); // preset file written with kradio <= 0.2.x - if (tmp.find("<format>") < 0) { + if (tmp.tqfind("<format>") < 0) { logger.logInfo(i18n("Old Preset File Format detected")); - QTextStream ins(&presetFile); - ins.setEncoding(QTextStream::Locale); + TQTextStream ins(&presetFile); + ins.setEncoding(TQTextStream::Locale); xmlData = ins.read(); } // preset file written with kradio >= 0.3.0 else { - QXmlInputSource tmp(&presetFile); + TQXmlInputSource tmp(TQT_TQIODEVICE(&presetFile)); xmlData = tmp.data(); } @@ -399,15 +399,15 @@ bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool } -QString StationList::writeXML (const IErrorLogClient &/*logger*/) const +TQString StationList::writeXML (const IErrorLogClient &/*logger*/) const { - QString data = QString::null; + TQString data = TQString(); // write station list - QString t = "\t"; - QString tt = "\t\t"; - QString ttt = "\t\t\t"; + TQString t = "\t"; + TQString tt = "\t\t"; + TQString ttt = "\t\t\t"; data += xmlOpenTag(KRadioConfigElement) + t + xmlOpenTag(StationListElement) + @@ -427,9 +427,9 @@ QString StationList::writeXML (const IErrorLogClient &/*logger*/) const data += tt + xmlOpenTag (s->getClassName()); - QStringList properties = s->getPropertyNames(); - QStringList::iterator end = properties.end(); - for (QStringList::iterator sit = properties.begin(); sit != end; ++sit) { + TQStringList properties = s->getPropertyNames(); + TQStringList::iterator end = properties.end(); + for (TQStringList::iterator sit = properties.begin(); sit != end; ++sit) { data += ttt + xmlTag (*sit, s->getProperty(*sit)); } data += tt + xmlCloseTag(s->getClassName()); @@ -447,22 +447,22 @@ bool StationList::writeXML (const KURL &url, const IErrorLogClient &logger, bool { KTempFile tmpFile; tmpFile.setAutoDelete(true); - QFile *outf = tmpFile.file(); + TQFile *outf = tmpFile.file(); - QTextStream outs(outf); - outs.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream outs(outf); + outs.setEncoding(TQTextStream::UnicodeUTF8); outs << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; - QString output = writeXML(logger); + TQString output = writeXML(logger); outs << output; if (outf->status() != IO_Ok) { logger.logError("StationList::writeXML: " + - i18n("error writing to tempfile %1").arg(tmpFile.name())); + i18n("error writing to tempfile %1").tqarg(tmpFile.name())); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Writing station preset file %1 failed.") - .arg(tmpFile.name())); + .tqarg(tmpFile.name())); } return false; } @@ -472,19 +472,19 @@ bool StationList::writeXML (const KURL &url, const IErrorLogClient &logger, bool if (count() <= 1) { logger.logWarning("StationList::writeXML: " + - i18n("uploading preset file %1: ").arg(url.url())); + i18n("uploading preset file %1: ").tqarg(url.url())); logger.logWarning("StationList::writeXML: " + - i18n("something strange happend, station list has only %1 entries. Writing station preset file skipped").arg(count())); + i18n("something strange happend, station list has only %1 entries. Writing station preset file skipped").tqarg(count())); } else { if (!KIO::NetAccess::upload(tmpFile.name(), url, NULL)) { logger.logError("StationList::writeXML: " + - i18n("error uploading preset file %1").arg(url.url())); + i18n("error uploading preset file %1").tqarg(url.url())); if (enableMessageBox) { - QMessageBox::warning(NULL, "KRadio", + TQMessageBox::warning(NULL, "KRadio", i18n("Upload of station preset file to %1 failed.") - .arg(url.url())); + .tqarg(url.url())); } return false; } diff --git a/kradio3/src/stationlistxmlhandler.cpp b/kradio3/src/stationlistxmlhandler.cpp index 71fb78e..0e303da 100644 --- a/kradio3/src/stationlistxmlhandler.cpp +++ b/kradio3/src/stationlistxmlhandler.cpp @@ -62,13 +62,13 @@ bool StationListXmlHandler::startDocument () #define START_ELEMENT_ERROR m_logger.logError("StationListXmlHandler::startElement: " + \ i18n("misplaced element %1") \ - .arg(qname));\ + .tqarg(qname));\ return false; -bool StationListXmlHandler::startElement (const QString &/*ns*/, const QString &/*localname*/, - const QString& _qname, const QXmlAttributes &) +bool StationListXmlHandler::startElement (const TQString &/*ns*/, const TQString &/*localname*/, + const TQString& _qname, const TQXmlAttributes &) { - QString qname = _qname; + TQString qname = _qname; if (qname == KRadioConfigElement) { if (m_status.size()) { START_ELEMENT_ERROR } @@ -113,7 +113,7 @@ bool StationListXmlHandler::startElement (const QString &/*ns*/, const QString & } else { // unknown m_logger.logWarning("StationListXmlHandler::startElement: " + - i18n("unknown or unexpected element %1").arg(qname)); + i18n("unknown or unexpected element %1").tqarg(qname)); } m_status.push_back(qname); @@ -121,10 +121,10 @@ bool StationListXmlHandler::startElement (const QString &/*ns*/, const QString & } -bool StationListXmlHandler::endElement (const QString &/*ns*/, const QString &/*localname*/, - const QString &_qname) +bool StationListXmlHandler::endElement (const TQString &/*ns*/, const TQString &/*localname*/, + const TQString &_qname) { - QString qname = _qname; + TQString qname = _qname; if (qname == compatStationElement) { qname = "FrequencyRadioStation"; m_compatMode = true; @@ -143,10 +143,10 @@ bool StationListXmlHandler::endElement (const QString &/*ns*/, const QString &/* if (m_status.size()) { m_logger.logError("StationListXmlHandler::endElement: " + i18n("expected element %1, but found %2") - .arg(m_status.back()).arg(qname)); + .tqarg(m_status.back()).tqarg(qname)); } else { m_logger.logError("StationListXmlHandler::endElement: " + - i18n("unexpected element %1").arg(qname)); + i18n("unexpected element %1").tqarg(qname)); } } return true; @@ -155,13 +155,13 @@ bool StationListXmlHandler::endElement (const QString &/*ns*/, const QString &/* #define CHARACTERS_ERROR m_logger.logError("StationListXmlHandler::characters: " + \ i18n("invalid data for element %1") \ - .arg(stat)); \ + .tqarg(stat)); \ return false; -bool StationListXmlHandler::characters (const QString &ch) +bool StationListXmlHandler::characters (const TQString &ch) { - QString stat = m_status.back(); - QString str = ch.stripWhiteSpace(); + TQString stat = m_status.back(); + TQString str = ch.stripWhiteSpace(); // Station parsing @@ -169,7 +169,7 @@ bool StationListXmlHandler::characters (const QString &ch) if (stat == StationListFormat) { if (str != STATION_LIST_FORMAT) { - m_logger.logError(i18n("found a station list with unknown format %1").arg(str)); + m_logger.logError(i18n("found a station list with unknown format %1").tqarg(str)); return false; } @@ -197,7 +197,7 @@ bool StationListXmlHandler::characters (const QString &ch) } else if (stat == StationListInfoChanged) { - m_metaData.lastChange = QDateTime::fromString(str, Qt::ISODate); + m_metaData.lastChange = TQDateTime::fromString(str, Qt::ISODate); } else if (stat == StationListInfoCreator) { @@ -210,13 +210,13 @@ bool StationListXmlHandler::characters (const QString &ch) if (!m_newStation->setProperty(stat, str)) { m_logger.logWarning("StationListXmlHandler::characters: " + i18n("unknown property %1 for class %2") - .arg(stat) - .arg(m_newStation->getClassName())); + .tqarg(stat) + .tqarg(m_newStation->getClassName())); } } else if (str.length()) { m_logger.logError("StationListXmlHandler::characters: " + - i18n("characters ignored for element %1").arg(stat)); + i18n("characters ignored for element %1").tqarg(stat)); } return true; } diff --git a/kradio3/src/stationselection_interfaces.cpp b/kradio3/src/stationselection_interfaces.cpp index b8d6fe9..4cdc84d 100644 --- a/kradio3/src/stationselection_interfaces.cpp +++ b/kradio3/src/stationselection_interfaces.cpp @@ -16,19 +16,19 @@ ***************************************************************************/ #include "include/stationselection_interfaces.h" -#include <qstringlist.h> +#include <tqstringlist.h> -IF_IMPL_SENDER ( IStationSelection::notifyStationSelectionChanged(const QStringList &sl), +IF_IMPL_SENDER ( IStationSelection::notifyStationSelectionChanged(const TQStringList &sl), noticeStationSelectionChanged(sl) ) -IF_IMPL_SENDER ( IStationSelectionClient::sendStationSelection(const QStringList &sl), +IF_IMPL_SENDER ( IStationSelectionClient::sendStationSelection(const TQStringList &sl), setStationSelection(sl) ) -static QStringList IStationSelectionClient_emptyList; +static TQStringList IStationSelectionClient_emptyList; -IF_IMPL_QUERY ( const QStringList & IStationSelectionClient::queryStationSelection(), +IF_IMPL_TQUERY ( const TQStringList & IStationSelectionClient::queryStationSelection(), getStationSelection(), IStationSelectionClient_emptyList ) diff --git a/kradio3/src/stationselector-ui.ui b/kradio3/src/stationselector-ui.ui index d8adf16..9ef12b1 100644 --- a/kradio3/src/stationselector-ui.ui +++ b/kradio3/src/stationselector-ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>StationSelectorUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>StationSelectorUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>labelSelected</cstring> </property> @@ -46,9 +46,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <vbox> <property name="name"> @@ -102,7 +102,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -111,7 +111,7 @@ </spacer> </vbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>labelAvailable</cstring> </property> @@ -129,7 +129,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>20</height> @@ -165,7 +165,7 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> </includes> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>radiostation-listview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kradio3/src/stationselector.cpp b/kradio3/src/stationselector.cpp index 635d4da..8cf240c 100644 --- a/kradio3/src/stationselector.cpp +++ b/kradio3/src/stationselector.cpp @@ -26,17 +26,17 @@ using namespace std; #include "include/stationselector.h" #include "include/radiostation-listview.h" -StationSelector::StationSelector (QWidget *parent) - : StationSelectorUI(parent), +StationSelector::StationSelector (TQWidget *tqparent) + : StationSelectorUI(tqparent), m_dirty(true) { - QObject::connect(buttonToLeft, SIGNAL(clicked()), this, SLOT(slotButtonToLeft())); - QObject::connect(buttonToRight, SIGNAL(clicked()), this, SLOT(slotButtonToRight())); - QObject::connect(listAvailable, SIGNAL(sigStationsReceived(const QStringList&)), this, SLOT(slotMoveToLeft(const QStringList&))); - QObject::connect(listSelected, SIGNAL(sigStationsReceived(const QStringList&)), this, SLOT(slotMoveToRight(const QStringList&))); + TQObject::connect(buttonToLeft, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonToLeft())); + TQObject::connect(buttonToRight, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonToRight())); + TQObject::connect(listAvailable, TQT_SIGNAL(sigStationsReceived(const TQStringList&)), this, TQT_SLOT(slotMoveToLeft(const TQStringList&))); + TQObject::connect(listSelected, TQT_SIGNAL(sigStationsReceived(const TQStringList&)), this, TQT_SLOT(slotMoveToRight(const TQStringList&))); - listSelected->setSelectionMode(QListView::Extended); - listAvailable->setSelectionMode(QListView::Extended); + listSelected->setSelectionMode(TQListView::Extended); + listAvailable->setSelectionMode(TQListView::Extended); } @@ -61,21 +61,21 @@ bool StationSelector::disconnectI(Interface *i) } -bool StationSelector::noticeStationSelectionChanged(const QStringList &sl) +bool StationSelector::noticeStationSelectionChanged(const TQStringList &sl) { m_stationIDsNotDisplayed.clear(); m_stationIDsSelected.clear(); m_stationIDsAvailable.clear(); for (unsigned int i = 0; i < m_stationIDsAll.count(); ++i) { - if (sl.contains(m_stationIDsAll[i])) { + if (sl.tqcontains(m_stationIDsAll[i])) { m_stationIDsSelected.append(m_stationIDsAll[i]); } else { m_stationIDsAvailable.append(m_stationIDsAll[i]); } } for (unsigned int i = 0; i < sl.count(); ++i) { - if (!m_stationIDsAll.contains(sl[i])) + if (!m_stationIDsAll.tqcontains(sl[i])) m_stationIDsNotDisplayed.append(sl[i]); } updateListViews(); @@ -100,10 +100,10 @@ bool StationSelector::noticeStationsChanged(const StationList &sl) m_stationIDsSelected.clear(); for (RawStationList::Iterator i(sl.all()); i.current(); ++i) { - const QString &id = i.current()->stationID(); + const TQString &id = i.current()->stationID(); m_stationIDsAll.append(id); - if (m_stationIDsNotDisplayed.contains(id)) { + if (m_stationIDsNotDisplayed.tqcontains(id)) { m_stationIDsNotDisplayed.remove(id); m_stationIDsSelected.append(id); } else { @@ -120,10 +120,10 @@ void StationSelector::slotButtonToLeft() { slotSetDirty(); listAvailable->clearSelection(); - QListViewItem *item = listSelected->firstChild(); + TQListViewItem *item = listSelected->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); if (item->isSelected()) { @@ -143,10 +143,10 @@ void StationSelector::slotButtonToRight() { slotSetDirty(); listSelected->clearSelection(); - QListViewItem *item = listAvailable->firstChild(); + TQListViewItem *item = listAvailable->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); if (item->isSelected()) { @@ -162,16 +162,16 @@ void StationSelector::slotButtonToRight() } -void StationSelector::slotMoveToRight(const QStringList &list) +void StationSelector::slotMoveToRight(const TQStringList &list) { slotSetDirty(); listSelected->clearSelection(); - QListViewItem *item = listAvailable->firstChild(); + TQListViewItem *item = listAvailable->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); - if (list.contains(m_stationIDsAvailable[idx_from])) { + if (list.tqcontains(m_stationIDsAvailable[idx_from])) { moveItem (listAvailable, m_stationIDsAvailable, item, idx_from, @@ -185,16 +185,16 @@ void StationSelector::slotMoveToRight(const QStringList &list) } -void StationSelector::slotMoveToLeft(const QStringList &list) +void StationSelector::slotMoveToLeft(const TQStringList &list) { slotSetDirty(); listAvailable->clearSelection(); - QListViewItem *item = listSelected->firstChild(); + TQListViewItem *item = listSelected->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); - if (list.contains(m_stationIDsSelected[idx_from])) { + if (list.tqcontains(m_stationIDsSelected[idx_from])) { moveItem (listSelected, m_stationIDsSelected, item, idx_from, @@ -210,22 +210,22 @@ void StationSelector::slotMoveToLeft(const QStringList &list) void StationSelector::moveItem( RadioStationListView *fromListView, - QStringList &fromIDList, - QListViewItem *item, + TQStringList &fromIDList, + TQListViewItem *item, int idx_from, RadioStationListView *toListView, - QStringList &toIDList + TQStringList &toIDList ) { fromListView->takeItem(item, idx_from); - QString id = fromIDList[idx_from]; + TQString id = fromIDList[idx_from]; fromIDList.remove(fromIDList.at(idx_from)); unsigned int idx_to = 0, idx_all = 0; bool found = false; - QListViewItem *item_to = toListView->firstChild(), + TQListViewItem *item_to = toListView->firstChild(), *prev_item_to = NULL; while (idx_all < m_stationIDsAll.count() && @@ -266,11 +266,11 @@ void StationSelector::updateListViews() const RawStationList &sl = stations.all(); for (unsigned int i = 0; i < m_stationIDsAvailable.count(); ++i) { - QString id = m_stationIDsAvailable[i]; + TQString id = m_stationIDsAvailable[i]; listAvailable->appendStation(sl.stationWithID(id), sl.idxWithID(id)+1); } for (unsigned int i = 0; i < m_stationIDsSelected.count(); ++i) { - QString id = m_stationIDsSelected[i]; + TQString id = m_stationIDsSelected[i]; listSelected->appendStation(sl.stationWithID(id), sl.idxWithID(id)+1); } } @@ -279,7 +279,7 @@ void StationSelector::updateListViews() void StationSelector::slotOK() { if (m_dirty) { - QStringList l = m_stationIDsSelected; + TQStringList l = m_stationIDsSelected; for (unsigned int i = 0; i < m_stationIDsNotDisplayed.count(); ++i) l.append(m_stationIDsNotDisplayed[i]); sendStationSelection(l); diff --git a/kradio3/src/timecontrol_interfaces.cpp b/kradio3/src/timecontrol_interfaces.cpp index f33422c..248fa47 100644 --- a/kradio3/src/timecontrol_interfaces.cpp +++ b/kradio3/src/timecontrol_interfaces.cpp @@ -30,7 +30,7 @@ IF_IMPL_SENDER ( ITimeControl::notifyAlarm(const Alarm &a), IF_IMPL_SENDER ( ITimeControl::notifyNextAlarmChanged(const Alarm *a), noticeNextAlarmChanged(a) ) -IF_IMPL_SENDER ( ITimeControl::notifyCountdownStarted(const QDateTime &end), +IF_IMPL_SENDER ( ITimeControl::notifyCountdownStarted(const TQDateTime &end), noticeCountdownStarted(end) ) IF_IMPL_SENDER ( ITimeControl::notifyCountdownStopped(), @@ -57,33 +57,33 @@ IF_IMPL_SENDER ( ITimeControlClient::sendStopCountdown(), stopCountdown() ) -IF_IMPL_QUERY ( QDateTime ITimeControlClient::queryNextAlarmTime (), +IF_IMPL_TQUERY ( TQDateTime ITimeControlClient::queryNextAlarmTime (), getNextAlarmTime(), - QDateTime() ) + TQDateTime() ) -IF_IMPL_QUERY ( const Alarm * ITimeControlClient::queryNextAlarm (), +IF_IMPL_TQUERY ( const Alarm * ITimeControlClient::queryNextAlarm (), getNextAlarm(), NULL ) -IF_IMPL_QUERY ( const AlarmVector &ITimeControlClient::queryAlarms (), +IF_IMPL_TQUERY ( const AlarmVector &ITimeControlClient::queryAlarms (), getAlarms(), emptyAlarms ) -IF_IMPL_QUERY ( int ITimeControlClient::queryCountdownSeconds (), +IF_IMPL_TQUERY ( int ITimeControlClient::queryCountdownSeconds (), getCountdownSeconds(), 30*60 ) -IF_IMPL_QUERY ( QDateTime ITimeControlClient::queryCountdownEnd (), +IF_IMPL_TQUERY ( TQDateTime ITimeControlClient::queryCountdownEnd (), getCountdownEnd(), - QDateTime() ) + TQDateTime() ) void ITimeControlClient::noticeConnectedI(cmplInterface *, bool /*pointer_valid*/) { noticeAlarmsChanged(queryAlarms()); noticeNextAlarmChanged(queryNextAlarm()); - QDateTime end = queryCountdownEnd(); - if (end > QDateTime::currentDateTime()) + TQDateTime end = queryCountdownEnd(); + if (end > TQDateTime::tqcurrentDateTime()) noticeCountdownStarted(end); else noticeCountdownStopped(); @@ -94,8 +94,8 @@ void ITimeControlClient::noticeDisconnectedI(cmplInterface *, bool /*pointer_val { noticeAlarmsChanged(queryAlarms()); noticeNextAlarmChanged(queryNextAlarm()); - QDateTime end = queryCountdownEnd(); - if (end > QDateTime::currentDateTime()) + TQDateTime end = queryCountdownEnd(); + if (end > TQDateTime::tqcurrentDateTime()) noticeCountdownStarted(end); else noticeCountdownStopped(); diff --git a/kradio3/src/utils.cpp b/kradio3/src/utils.cpp index e54f19d..fa60b02 100644 --- a/kradio3/src/utils.cpp +++ b/kradio3/src/utils.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qregexp.h> +#include <tqregexp.h> #include "include/utils.h" #include <linux/soundcard.h> @@ -23,47 +23,47 @@ //const char *mixerChannelNames[] = SOUND_DEVICE_NAMES; -QString XMLEscape (const QString &s) +TQString XMLEscape (const TQString &s) { - QString c = s; - c.replace(QRegExp("&"), "&"); - c.replace(QRegExp("<"), "<"); - c.replace(QRegExp(">"), ">"); - c.replace(QRegExp("\""), """); - c.replace(QRegExp("'"), "'"); + TQString c = s; + c.tqreplace(TQRegExp("&"), "&"); + c.tqreplace(TQRegExp("<"), "<"); + c.tqreplace(TQRegExp(">"), ">"); + c.tqreplace(TQRegExp("\""), """); + c.tqreplace(TQRegExp("'"), "'"); return c; } -QString xmlOpenTag (const QString &tag, bool nl) +TQString xmlOpenTag (const TQString &tag, bool nl) { - return "<" + tag + ">" + (nl ? QString("\n") : QString::null); + return "<" + tag + ">" + (nl ? TQString("\n") : TQString()); } -QString xmlCloseTag (const QString &tag, bool nl) +TQString xmlCloseTag (const TQString &tag, bool nl) { - return "</" + tag + ">" + (nl ? QString("\n") : QString::null); + return "</" + tag + ">" + (nl ? TQString("\n") : TQString()); } -QString xmlTag (const QString &tag, int v, bool nl) +TQString xmlTag (const TQString &tag, int v, bool nl) { - return xmlTag (tag, QString().setNum(v), nl); + return xmlTag (tag, TQString().setNum(v), nl); } -QString xmlTag (const QString &tag, float f, bool nl) +TQString xmlTag (const TQString &tag, float f, bool nl) { - return xmlTag(tag, QString().setNum(f), nl); + return xmlTag(tag, TQString().setNum(f), nl); } -QString xmlTag (const QString &tag, const QString &data, bool nl) +TQString xmlTag (const TQString &tag, const TQString &data, bool nl) { return xmlOpenTag(tag, false) + XMLEscape(data) + xmlCloseTag(tag, false) - + (nl ? QString("\n") : QString::null); + + (nl ? TQString("\n") : TQString()); } diff --git a/kradio3/src/widgetplugins.cpp b/kradio3/src/widgetplugins.cpp index 434b568..a0e662a 100644 --- a/kradio3/src/widgetplugins.cpp +++ b/kradio3/src/widgetplugins.cpp @@ -23,11 +23,11 @@ #endif #include <kwin.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kconfig.h> #include <klocale.h> -WidgetPluginBase::WidgetPluginBase(const QString &name, const QString &description) +WidgetPluginBase::WidgetPluginBase(const TQString &name, const TQString &description) : PluginBase(name, description), m_geoCacheValid(false), m_geoRestoreFlag(false), @@ -36,15 +36,15 @@ WidgetPluginBase::WidgetPluginBase(const QString &name, const QString &descripti } /* -QWidget *WidgetPluginBase::getWidget() +TQWidget *WidgetPluginBase::getWidget() { - return dynamic_cast<QWidget*>(this); + return dynamic_cast<TQWidget*>(this); } -const QWidget *WidgetPluginBase::getWidget() const +const TQWidget *WidgetPluginBase::getWidget() const { - return dynamic_cast<const QWidget*>(this); + return dynamic_cast<const TQWidget*>(this); } */ @@ -55,9 +55,9 @@ void WidgetPluginBase::notifyManager(bool shown) } -bool WidgetPluginBase::isReallyVisible(const QWidget *_w) const +bool WidgetPluginBase::isReallyVisible(const TQWidget *_w) const { - const QWidget *w = _w ? _w : getWidget(); + const TQWidget *w = _w ? _w : getWidget(); if (!w) return false; KWin::WindowInfo i = KWin::WindowInfo(w->winId(), 0, 0); return (i.mappingState() == NET::Visible) @@ -66,9 +66,9 @@ bool WidgetPluginBase::isReallyVisible(const QWidget *_w) const } -bool WidgetPluginBase::isAnywhereVisible(const QWidget *_w) const +bool WidgetPluginBase::isAnywhereVisible(const TQWidget *_w) const { - const QWidget *w = _w ? _w : getWidget(); + const TQWidget *w = _w ? _w : getWidget(); if (!w) return false; return w->isVisible(); } @@ -76,7 +76,7 @@ bool WidgetPluginBase::isAnywhereVisible(const QWidget *_w) const void WidgetPluginBase::pShow(bool on) { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; if (on && !isReallyVisible(w)) w->show(); @@ -87,7 +87,7 @@ void WidgetPluginBase::pShow(bool on) void WidgetPluginBase::pToggleShown() { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; if (!isReallyVisible(w)) w->show(); @@ -100,9 +100,9 @@ void WidgetPluginBase::pShowOnOrgDesktop() { KWin::setMainWindow(getWidget(), 0); - logDebug(QString("%1::pShowOnOrgDesktop: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").arg(name()).arg(m_saveSticky).arg(m_saveDesktop).arg(isReallyVisible()).arg(isAnywhereVisible()).arg(m_geoCacheValid)); + logDebug(TQString("%1::pShowOnOrgDesktop: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").tqarg(name()).tqarg(m_saveSticky).tqarg(m_saveDesktop).tqarg(isReallyVisible()).tqarg(isAnywhereVisible()).tqarg(m_geoCacheValid)); if (m_geoCacheValid && (!isReallyVisible() || m_geoRestoreFlag) ) { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; WId id = w->winId(); @@ -131,9 +131,9 @@ void WidgetPluginBase::pShow() { KWin::setMainWindow(getWidget(), 0); - logDebug(QString("%1::pShow: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").arg(name()).arg(m_saveSticky).arg(m_saveDesktop).arg(isReallyVisible()).arg(isAnywhereVisible()).arg(m_geoCacheValid)); + logDebug(TQString("%1::pShow: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").tqarg(name()).tqarg(m_saveSticky).tqarg(m_saveDesktop).tqarg(isReallyVisible()).tqarg(isAnywhereVisible()).tqarg(m_geoCacheValid)); if (m_geoCacheValid && (!isReallyVisible() || m_geoRestoreFlag) ) { - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (!w) return; WId id = w->winId(); @@ -150,29 +150,29 @@ void WidgetPluginBase::pShow() void WidgetPluginBase::pHide() { - logDebug(QString("%1::pHide1: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").arg(name()).arg(m_saveSticky).arg(m_saveDesktop).arg(isReallyVisible()).arg(isAnywhereVisible()).arg(m_geoCacheValid)); + logDebug(TQString("%1::pHide1: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").tqarg(name()).tqarg(m_saveSticky).tqarg(m_saveDesktop).tqarg(isReallyVisible()).tqarg(isAnywhereVisible()).tqarg(m_geoCacheValid)); getKWinState(); - logDebug(QString("%1::pHide2: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").arg(name()).arg(m_saveSticky).arg(m_saveDesktop).arg(isReallyVisible()).arg(isAnywhereVisible()).arg(m_geoCacheValid)); + logDebug(TQString("%1::pHide2: all: %2, desktop: %3, visible:%4, anywherevisible:%5, cachevalid: %6").tqarg(name()).tqarg(m_saveSticky).tqarg(m_saveDesktop).tqarg(isReallyVisible()).tqarg(isAnywhereVisible()).tqarg(m_geoCacheValid)); } -void WidgetPluginBase::pShowEvent(QShowEvent *) +void WidgetPluginBase::pShowEvent(TQShowEvent *) { notifyManager (true); } -void WidgetPluginBase::pHideEvent(QHideEvent *) +void WidgetPluginBase::pHideEvent(TQHideEvent *) { notifyManager (false); } -void WidgetPluginBase::getKWinState(const QWidget *_w) const +void WidgetPluginBase::getKWinState(const TQWidget *_w) const { if (m_geoRestoreFlag) return; - const QWidget *w = _w ? _w : getWidget(); + const TQWidget *w = _w ? _w : getWidget(); if (!w) return; if (w->isVisible()) { KWin::WindowInfo i = KWin::WindowInfo(w->winId(), 0, 0); @@ -180,7 +180,7 @@ void WidgetPluginBase::getKWinState(const QWidget *_w) const m_saveMaximized = w->isMaximized(); m_saveSticky = i.onAllDesktops(); m_saveDesktop = i.desktop(); - m_saveGeometry = QRect(w->pos(), w->size()); + m_saveGeometry = TQRect(w->pos(), w->size()); m_geoCacheValid = true; } } @@ -188,7 +188,7 @@ void WidgetPluginBase::getKWinState(const QWidget *_w) const void WidgetPluginBase::saveState (KConfig *config) const { - const QWidget *w = getWidget(); + const TQWidget *w = getWidget(); getKWinState(w); config->writeEntry("hidden", w ? w->isHidden() : false); @@ -224,7 +224,7 @@ void WidgetPluginBase::startPlugin() { PluginBase::startPlugin(); - QWidget *w = getWidget(); + TQWidget *w = getWidget(); if (w) { m_geoRestoreFlag = true; if (!m_restoreShow) w->hide(); |