diff options
149 files changed, 5769 insertions, 5675 deletions
diff --git a/kaffeine/src/drivescombo.cpp b/kaffeine/src/drivescombo.cpp index a33eb2b..d355e7b 100644 --- a/kaffeine/src/drivescombo.cpp +++ b/kaffeine/src/drivescombo.cpp @@ -26,24 +26,24 @@ #include <kdebug.h> -#include <qfile.h> +#include <tqfile.h> -DrivesCombo::DrivesCombo(QWidget* parent, const char* name) - : KComboBox(parent, name) +DrivesCombo::DrivesCombo(TQWidget* tqparent, const char* name) + : KComboBox(tqparent, name) { setEditable(true); - QFile file("/etc/fstab"); + TQFile file("/etc/fstab"); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); - QString line; - QStringList drives; + TQTextStream stream(&file); + TQString line; + TQStringList drives; while (!stream.eof()) { line = stream.readLine(); - if (line.contains("cdfss")) + if (line.tqcontains("cdfss")) { kdDebug() << "DrivesCombo: found disc drive: " << line.section(' ', 0, 0) << endl; drives.append(line.section(' ', 0, 0)); diff --git a/kaffeine/src/drivescombo.h b/kaffeine/src/drivescombo.h index 05b28ef..cb3cc47 100644 --- a/kaffeine/src/drivescombo.h +++ b/kaffeine/src/drivescombo.h @@ -35,7 +35,7 @@ Let user choose the disc drive. Takes presets from /etc/fstab. class DrivesCombo : public KComboBox { public: - DrivesCombo(QWidget* parent, const char* name = 0); + DrivesCombo(TQWidget* tqparent, const char* name = 0); virtual ~DrivesCombo(); }; diff --git a/kaffeine/src/input/audiobrowser/googlefetcher.cpp b/kaffeine/src/input/audiobrowser/googlefetcher.cpp index fe88d14..a276e71 100644 --- a/kaffeine/src/input/audiobrowser/googlefetcher.cpp +++ b/kaffeine/src/input/audiobrowser/googlefetcher.cpp @@ -35,17 +35,17 @@ #include "googlefetcher.h" #include "googlefetcherdialog.h" -GoogleImage::GoogleImage(QString thumbURL, QString size) +GoogleImage::GoogleImage(TQString thumbURL, TQString size) { // thumbURL is in the following format - and we can regex the imageURL // images?q=tbn:hKSEWNB8aNcJ:www.styxnet.com/deyoung/styx/stygians/cp_portrait.jpg - m_thumbURL = thumbURL.replace("\"",""); - m_imageURL = thumbURL.remove(QRegExp("^.*q=tbn:[^:]*:")).replace("\"",""); - m_size = size.replace("pixels - ", "\n(") + ")"; + m_thumbURL = thumbURL.tqreplace("\"",""); + m_imageURL = thumbURL.remove(TQRegExp("^.*q=tbn:[^:]*:")).tqreplace("\"",""); + m_size = size.tqreplace("pixels - ", "\n(") + ")"; } -GoogleFetcher::GoogleFetcher( QString artist, QString album, bool gallery ) +GoogleFetcher::GoogleFetcher( TQString artist, TQString album, bool gallery ) { m_artist = artist; m_album = album; @@ -108,9 +108,9 @@ void GoogleFetcher::slotLoadImageURLs(GoogleFetcher::ImageSize size) kdDebug() << "Performing Google Search: " << url << endl; - search.load(url.url()+QString("&start=%1&sa=N").arg(galleryPage*20) ); + search.load(url.url()+TQString("&start=%1&sa=N").tqarg(galleryPage*20) ); - QString text = search.toString().string(); + TQString text = search.toString().string(); if ( !hasImageResults(text) ) { kdDebug() << "Search returned no results.\n"; @@ -120,28 +120,28 @@ void GoogleFetcher::slotLoadImageURLs(GoogleFetcher::ImageSize size) // Go through each of the top (table) nodes - int pos = text.find("/imgres?imgurl"); + int pos = text.tqfind("/imgres?imgurl"); int tpos; - QString s, c; + TQString s, c; while ( pos>-1 ) { text = text.right( text.length()-pos-14 ); - tpos = text.find("&h="); + tpos = text.tqfind("&h="); text = text.right( text.length()-tpos-3 ); - tpos = text.find("&w="); + tpos = text.tqfind("&w="); c = "pixels - " + text.left( tpos ); text = text.right( text.length()-tpos-3 ); - tpos = text.find("&sz="); + tpos = text.tqfind("&sz="); c = c + "x" + text.left( tpos ); - tpos = text.find("src="); + tpos = text.tqfind("src="); text = text.right( text.length()-tpos-4 ); - if ( (tpos=text.find("width="))==-1 ) + if ( (tpos=text.tqfind("width="))==-1 ) break; s = text.left( tpos-1 ); text = text.right( text.length()-tpos ); - if ( (tpos=text.find("></a>"))==-1 ) + if ( (tpos=text.tqfind("></a>"))==-1 ) break; m_imageList.append(GoogleImage(s, c)); - pos = text.find("/imgres?imgurl"); + pos = text.tqfind("/imgres?imgurl"); } } // try catch (DOM::DOMException &e) @@ -156,10 +156,10 @@ void GoogleFetcher::slotLoadImageURLs(GoogleFetcher::ImageSize size) emit signalNewSearch(m_imageList); } -QImage GoogleFetcher::galleryNext( bool &end ) +TQImage GoogleFetcher::galleryNext( bool &end ) { - QString file; - QImage image; + TQString file; + TQImage image; m_loadedSize = All; int tries = 0; end = false; @@ -181,14 +181,14 @@ QImage GoogleFetcher::galleryNext( bool &end ) } else { end = true; - return QImage(); + return TQImage(); } } else { if(KIO::NetAccess::download( m_imageList[galleryImage].imageURL(), file, 0)) - image = QImage(file); + image = TQImage(file); else - image = QImage(); + image = TQImage(); ++galleryImage; if ( galleryImage==(int)m_imageList.count() ) { m_imageList.clear(); @@ -199,10 +199,10 @@ QImage GoogleFetcher::galleryNext( bool &end ) return image; } } - return QImage(); + return TQImage(); } -QPixmap GoogleFetcher::pixmap( bool forceFetch ) +TQPixmap GoogleFetcher::pixmap( bool forceFetch ) { bool chosen = false; m_loadedSize = All; @@ -211,7 +211,7 @@ QPixmap GoogleFetcher::pixmap( bool forceFetch ) encoding = 0; displayWaitMessage(); - QPixmap pixmap; + TQPixmap pixmap; while(!chosen) { @@ -232,10 +232,10 @@ QPixmap GoogleFetcher::pixmap( bool forceFetch ) } else { GoogleFetcherDialog dialog("google", m_imageList, m_artist, m_album, 0); - connect(&dialog, SIGNAL(sizeChanged(GoogleFetcher::ImageSize)), - this, SLOT(slotLoadImageURLs(GoogleFetcher::ImageSize))); - connect(this, SIGNAL(signalNewSearch(GoogleImageList &)), - &dialog, SLOT(refreshScreen(GoogleImageList &))); + connect(&dialog, TQT_SIGNAL(sizeChanged(GoogleFetcher::ImageSize)), + this, TQT_SLOT(slotLoadImageURLs(GoogleFetcher::ImageSize))); + connect(this, TQT_SIGNAL(signalNewSearch(GoogleImageList &)), + &dialog, TQT_SLOT(refreshScreen(GoogleImageList &))); dialog.exec(); pixmap = dialog.result(); chosen = dialog.takeIt(); @@ -271,9 +271,9 @@ bool GoogleFetcher::requestNewSearchTerms(bool noResults) return ok; } -bool GoogleFetcher::hasImageResults( QString &doc ) +bool GoogleFetcher::hasImageResults( TQString &doc ) { - if ( !doc.contains( "/imgres?imgurl" ) ) + if ( !doc.tqcontains( "/imgres?imgurl" ) ) return false; return true; diff --git a/kaffeine/src/input/audiobrowser/googlefetcher.h b/kaffeine/src/input/audiobrowser/googlefetcher.h index 7c90091..22697cf 100644 --- a/kaffeine/src/input/audiobrowser/googlefetcher.h +++ b/kaffeine/src/input/audiobrowser/googlefetcher.h @@ -24,9 +24,9 @@ #include <kdialogbase.h> -#include <qpixmap.h> -#include <qstringlist.h> -#include <qregexp.h> +#include <tqpixmap.h> +#include <tqstringlist.h> +#include <tqregexp.h> namespace DOM { class HTMLDocument; @@ -37,30 +37,31 @@ class KURL; class GoogleImage { public: - GoogleImage(QString thumbURL = QString::null, QString size = QString::null); + GoogleImage(TQString thumbURL = TQString(), TQString size = TQString()); - QString imageURL() const { return m_imageURL; } - QString thumbURL() const { return m_thumbURL; } - QString size() const { return m_size; } + TQString imageURL() const { return m_imageURL; } + TQString thumbURL() const { return m_thumbURL; } + TQString size() const { return m_size; } private: - QString m_imageURL; - QString m_thumbURL; - QString m_size; + TQString m_imageURL; + TQString m_thumbURL; + TQString m_size; }; -typedef QValueList<GoogleImage> GoogleImageList; +typedef TQValueList<GoogleImage> GoogleImageList; -class GoogleFetcher : public QObject +class GoogleFetcher : public TQObject { Q_OBJECT + TQ_OBJECT public: enum ImageSize { All, Icon, Small, Medium, Large, XLarge }; - GoogleFetcher( QString artist, QString album, bool gallery=false ); - QPixmap pixmap( bool forceFetch = false ); - QImage galleryNext( bool &end ); + GoogleFetcher( TQString artist, TQString album, bool gallery=false ); + TQPixmap pixmap( bool forceFetch = false ); + TQImage galleryNext( bool &end ); signals: void signalNewSearch(GoogleImageList &images); @@ -70,15 +71,15 @@ private: bool requestNewSearchTerms(bool noResults = false); // Returns true if there are results in the search, otherwise returns false. - bool hasImageResults( QString &doc ); + bool hasImageResults( TQString &doc ); private slots: void slotLoadImageURLs(GoogleFetcher::ImageSize size = All); private: - QString m_artist, m_album; - QString m_searchString; - QString m_loadedQuery; + TQString m_artist, m_album; + TQString m_searchString; + TQString m_loadedQuery; ImageSize m_loadedSize; GoogleImageList m_imageList; uint m_selectedIndex; diff --git a/kaffeine/src/input/audiobrowser/googlefetcherdialog.cpp b/kaffeine/src/input/audiobrowser/googlefetcherdialog.cpp index bda3853..cf49424 100644 --- a/kaffeine/src/input/audiobrowser/googlefetcherdialog.cpp +++ b/kaffeine/src/input/audiobrowser/googlefetcherdialog.cpp @@ -25,22 +25,22 @@ #include <kmessagebox.h> #include <kcombobox.h> -#include <qhbox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qeventloop.h> +#include <tqhbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqeventloop.h> #include "googlefetcherdialog.h" -GoogleFetcherDialog::GoogleFetcherDialog(const QString &name, +GoogleFetcherDialog::GoogleFetcherDialog(const TQString &name, const GoogleImageList &imageList, - const QString &artist, - const QString &album, - QWidget *parent) : - KDialogBase(parent, name.latin1(), true, QString::null, + const TQString &artist, + const TQString &album, + TQWidget *tqparent) : + KDialogBase(tqparent, name.latin1(), true, TQString(), Ok | Cancel | User1 , NoDefault, true), - m_pixmap(QPixmap()), + m_pixmap(TQPixmap()), m_imageList(imageList), m_takeIt(false), m_newSearch(false) @@ -49,18 +49,18 @@ GoogleFetcherDialog::GoogleFetcherDialog(const QString &name, m_album = album; disableResize(); - QHBox *mainBox = new QHBox(this); + TQHBox *mainBox = new TQHBox(this); m_iconWidget = new KIconView(mainBox); - m_iconWidget->setResizeMode(QIconView::Adjust); - m_iconWidget->setSelectionMode(QIconView::Extended); + m_iconWidget->setResizeMode(TQIconView::Adjust); + m_iconWidget->setSelectionMode(TQIconView::Extended); m_iconWidget->setSpacing(10); m_iconWidget->setMode(KIconView::Execute); m_iconWidget->setFixedSize(500,550); m_iconWidget->arrangeItemsInGrid(); m_iconWidget->setItemsMovable(FALSE); - QHBox *imgSize = new QHBox(actionButton(User1)->parentWidget()); - //QLabel *label = new QLabel(imgSize); + TQHBox *imgSize = new TQHBox(actionButton(User1)->tqparentWidget()); + //TQLabel *label = new TQLabel(imgSize); //label->setText(i18n("Image size:")); KComboBox *combo = new KComboBox(imgSize); @@ -71,8 +71,8 @@ GoogleFetcherDialog::GoogleFetcherDialog(const QString &name, combo->insertItem(i18n("Large")); combo->insertItem(i18n("Very Large")); combo->setCurrentItem(0); - connect(combo, SIGNAL(activated(int)), this, SLOT(imgSizeChanged(int))); - connect(m_iconWidget, SIGNAL( executed(QIconViewItem*) ), this, SLOT(slotOk())); + connect(combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(imgSizeChanged(int))); + connect(m_iconWidget, TQT_SIGNAL( executed(TQIconViewItem*) ), this, TQT_SLOT(slotOk())); imgSize->adjustSize(); setMainWidget(mainBox); @@ -86,10 +86,10 @@ GoogleFetcherDialog::~GoogleFetcherDialog() void GoogleFetcherDialog::setLayout() { - setCaption(QString("%1 - %2 (%3)") - .arg(m_artist) - .arg(m_album) - .arg(m_imageList.size())); + setCaption(TQString("%1 - %2 (%3)") + .tqarg(m_artist) + .tqarg(m_album) + .tqarg(m_imageList.size())); m_iconWidget->clear(); for(uint i = 0; i < m_imageList.size(); i++) @@ -128,7 +128,7 @@ void GoogleFetcherDialog::slotOk() KMessageBox::sorry(this, i18n("The cover you have selected is unavailable. Please select another."), i18n("Cover Unavailable")); - QPixmap blankPix; + TQPixmap blankPix; blankPix.resize(80, 80); blankPix.fill(); m_iconWidget->currentItem()->setPixmap(blankPix, true, true); @@ -144,7 +144,7 @@ void GoogleFetcherDialog::slotCancel() { m_takeIt = true; m_newSearch = false; - m_pixmap = QPixmap(); + m_pixmap = TQPixmap(); hide(); } @@ -152,7 +152,7 @@ void GoogleFetcherDialog::slotUser1() { m_takeIt = false; m_newSearch = true; - m_pixmap = QPixmap(); + m_pixmap = TQPixmap(); hide(); } @@ -181,34 +181,34 @@ void GoogleFetcherDialog::imgSizeChanged(int index) emit sizeChanged(imageSize); } -QPixmap GoogleFetcherDialog::fetchedImage(uint index) const +TQPixmap GoogleFetcherDialog::fetchedImage(uint index) const { - return (index > m_imageList.count()) ? QPixmap() : pixmapFromURL(m_imageList[index].imageURL()); + return (index > m_imageList.count()) ? TQPixmap() : pixmapFromURL(m_imageList[index].imageURL()); } -QPixmap GoogleFetcherDialog::pixmapFromURL(const KURL &url) const +TQPixmap GoogleFetcherDialog::pixmapFromURL(const KURL &url) const { - QString file; + TQString file; if(KIO::NetAccess::download(url, file, 0)) { - QPixmap pixmap = QPixmap(file); + TQPixmap pixmap = TQPixmap(file); KIO::NetAccess::removeTempFile(file); return pixmap; } KIO::NetAccess::removeTempFile(file); - return QPixmap(); + return TQPixmap(); } //////////////////////////////////////////////////////////////////////////////// // CoverIconViewItem //////////////////////////////////////////////////////////////////////////////// -CoverIconViewItem::CoverIconViewItem(QIconView *parent, const GoogleImage &image) : - QObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0) +CoverIconViewItem::CoverIconViewItem(TQIconView *tqparent, const GoogleImage &image) : + TQObject(tqparent), KIconViewItem(tqparent, tqparent->lastItem(), image.size()), m_job(0) { // Set up the iconViewItem - QPixmap mainMap; + TQPixmap mainMap; mainMap.resize(80, 80); mainMap.fill(); setPixmap(mainMap, true, true); @@ -216,9 +216,9 @@ CoverIconViewItem::CoverIconViewItem(QIconView *parent, const GoogleImage &image // Start downloading the image. m_job = KIO::get(image.thumbURL(), false, false); - connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(imageResult(KIO::Job *))); - connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(imageData(KIO::Job *, const QByteArray &))); + connect(m_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(imageResult(KIO::Job *))); + connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(imageData(KIO::Job *, const TQByteArray &))); } CoverIconViewItem::~CoverIconViewItem() @@ -228,16 +228,16 @@ CoverIconViewItem::~CoverIconViewItem() // Drain results issued by KIO before being deleted, // and before deleting the job. - kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); delete m_job; } } -void CoverIconViewItem::imageData(KIO::Job *, const QByteArray &data) +void CoverIconViewItem::imageData(KIO::Job *, const TQByteArray &data) { int currentSize = m_buffer.size(); - m_buffer.resize(currentSize + data.size(), QGArray::SpeedOptim); + m_buffer.tqresize(currentSize + data.size(), TQGArray::SpeedOptim); memcpy(&(m_buffer.data()[currentSize]), data.data(), data.size()); } @@ -246,8 +246,8 @@ void CoverIconViewItem::imageResult(KIO::Job *job) if(job->error()) return; - QPixmap iconImage(m_buffer); - iconImage = QImage(iconImage.convertToImage()).smoothScale(80, 80); + TQPixmap iconImage(m_buffer); + iconImage = TQImage(iconImage.convertToImage()).smoothScale(80, 80); setPixmap(iconImage, true, true); } diff --git a/kaffeine/src/input/audiobrowser/googlefetcherdialog.h b/kaffeine/src/input/audiobrowser/googlefetcherdialog.h index 48ec70c..f0de193 100644 --- a/kaffeine/src/input/audiobrowser/googlefetcherdialog.h +++ b/kaffeine/src/input/audiobrowser/googlefetcherdialog.h @@ -31,17 +31,18 @@ class KURL; class GoogleFetcherDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GoogleFetcherDialog(const QString &name, + GoogleFetcherDialog(const TQString &name, const GoogleImageList &urlList, - const QString &artist, - const QString &album, - QWidget *parent = 0); + const TQString &artist, + const TQString &album, + TQWidget *tqparent = 0); virtual ~GoogleFetcherDialog(); - QPixmap result() const { return m_pixmap; } + TQPixmap result() const { return m_pixmap; } bool takeIt() const { return m_takeIt; } bool newSearch() const { return m_newSearch; } @@ -62,15 +63,15 @@ protected slots: void imgSizeChanged(int index); private: - QPixmap fetchedImage(uint index) const; - QPixmap pixmapFromURL(const KURL &url) const; + TQPixmap fetchedImage(uint index) const; + TQPixmap pixmapFromURL(const KURL &url) const; - QPixmap m_pixmap; + TQPixmap m_pixmap; GoogleImageList m_imageList; KIconView *m_iconWidget; bool m_takeIt; bool m_newSearch; - QString m_artist, m_album; + TQString m_artist, m_album; }; namespace KIO @@ -78,21 +79,22 @@ namespace KIO class TransferJob; } -class CoverIconViewItem : public QObject, public KIconViewItem +class CoverIconViewItem : public TQObject, public KIconViewItem { Q_OBJECT + TQ_OBJECT public: - CoverIconViewItem(QIconView *parent, const GoogleImage &image); + CoverIconViewItem(TQIconView *tqparent, const GoogleImage &image); ~CoverIconViewItem(); private slots: - void imageData(KIO::Job *job, const QByteArray &data); + void imageData(KIO::Job *job, const TQByteArray &data); void imageResult(KIO::Job* job); private: - QByteArray m_buffer; - QGuardedPtr<KIO::TransferJob> m_job; + TQByteArray m_buffer; + TQGuardedPtr<KIO::TransferJob> m_job; }; #endif /* GOOGLEFETCHERDIALOG_H */ diff --git a/kaffeine/src/input/audiobrowser/playlist.cpp b/kaffeine/src/input/audiobrowser/playlist.cpp index 480d70b..752eb66 100644 --- a/kaffeine/src/input/audiobrowser/playlist.cpp +++ b/kaffeine/src/input/audiobrowser/playlist.cpp @@ -45,24 +45,24 @@ #include <kurlcombobox.h> #include <kurlcompletion.h> -#include <qlabel.h> -#include <qclipboard.h> -#include <qdragobject.h> -#include <qstringlist.h> -#include <qdom.h> -#include <qxml.h> -#include <qregexp.h> -#include <qheader.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qvbox.h> -#include <qlistbox.h> -#include <qtextcodec.h> -#include <qtooltip.h> -#include <qinputdialog.h> -#include <qtimer.h> -#include <qwhatsthis.h> -#include <qpopupmenu.h> +#include <tqlabel.h> +#include <tqclipboard.h> +#include <tqdragobject.h> +#include <tqstringlist.h> +#include <tqdom.h> +#include <tqxml.h> +#include <tqregexp.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqvbox.h> +#include <tqlistbox.h> +#include <tqtextcodec.h> +#include <tqtooltip.h> +#include <tqinputdialog.h> +#include <tqtimer.h> +#include <tqwhatsthis.h> +#include <tqpopupmenu.h> #include "googlefetcher.h" #include "mrl.h" @@ -73,32 +73,32 @@ -RollTitle::RollTitle( QWidget *parent ) : QLabel( "I", parent ) +RollTitle::RollTitle( TQWidget *tqparent ) : TQLabel( "I", tqparent ) { - QColorGroup cg = parentWidget()->colorGroup(); - QColor base = cg.base(); - QColor selection = cg.highlight(); + TQColorGroup cg = tqparentWidget()->tqcolorGroup(); + TQColor base = cg.base(); + TQColor selection = cg.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - back = QColor(r, g, b); - fore = parentWidget()->colorGroup().text(); + back = TQColor(r, g, b); + fore = tqparentWidget()->tqcolorGroup().text(); setPaletteBackgroundColor( back ); setPaletteForegroundColor( fore ); - setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); title = " ##### "; titleOffset = 0; setTitle( title ); - connect( &titleTimer, SIGNAL( timeout() ), this, SLOT( rollTitle() ) ); + connect( &titleTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( rollTitle() ) ); titleTimer.start( 50 ); } void RollTitle::setTitle( MRL mrl ) { title = " ##### "; - QString s1 = mrl.artist().stripWhiteSpace(); - QString s2 = mrl.album().stripWhiteSpace(); - QString s3 = mrl.title().stripWhiteSpace(); + TQString s1 = mrl.artist().stripWhiteSpace(); + TQString s2 = mrl.album().stripWhiteSpace(); + TQString s3 = mrl.title().stripWhiteSpace(); if ( !s1.isEmpty() ) title+= s1+" - "; if ( !s2.isEmpty() ) @@ -111,27 +111,27 @@ void RollTitle::setTitle( MRL mrl ) setTitle( title ); } -void RollTitle::setTitle( QString t ) +void RollTitle::setTitle( TQString t ) { - QLabel *lab = new QLabel( t, this ); - lab->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); - lab->resize( lab->sizeHint() ); + TQLabel *lab = new TQLabel( t, this ); + lab->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + lab->resize( lab->tqsizeHint() ); int x = 2*lab->frameWidth(); - titlePix = QPixmap( lab->width()-x, height()-x, -1, QPixmap::BestOptim ); + titlePix = TQPixmap( lab->width()-x, height()-x, -1, TQPixmap::BestOptim ); delete lab; - QPainter p( &titlePix ); + TQPainter p( &titlePix ); p.fillRect( 0, 0, titlePix.width(), titlePix.height(), back ); p.setPen( fore ); p.setFont( font() ); - p.drawText( QRect(0,(titlePix.height()-QFontInfo(font()).pointSize())/2,titlePix.width(),QFontInfo(font()).pointSize()*2), Qt::AlignAuto|Qt::SingleLine, t ); + p.drawText( TQRect(0,(titlePix.height()-TQFontInfo(font()).pointSize())/2,titlePix.width(),TQFontInfo(font()).pointSize()*2), TQt::AlignAuto|TQt::SingleLine, t ); p.end(); } void RollTitle::rollTitle() { int w = 2*frameWidth(); - QPixmap pix( width()-w, height()-w, -1, QPixmap::BestOptim ); - QPainter p1( &pix ); + TQPixmap pix( width()-w, height()-w, -1, TQPixmap::BestOptim ); + TQPainter p1( &pix ); p1.fillRect( 0, 0, pix.width(), pix.height(), back ); p1.end(); int x = titlePix.width()-titleOffset; @@ -146,51 +146,51 @@ void RollTitle::rollTitle() bitBlt( this, w/2, w/2, &pix, 0, 0, width()-w, height()-w, CopyROP ); } -void RollTitle::paintEvent( QPaintEvent *pe ) +void RollTitle::paintEvent( TQPaintEvent *pe ) { - QLabel::paintEvent( pe ); - QColorGroup cg = parentWidget()->colorGroup(); - QColor base = cg.base(); - QColor selection = cg.highlight(); + TQLabel::paintEvent( pe ); + TQColorGroup cg = tqparentWidget()->tqcolorGroup(); + TQColor base = cg.base(); + TQColor selection = cg.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - back=QColor(r,g,b); + back=TQColor(r,g,b); setPaletteBackgroundColor( back ); - fore = parentWidget()->colorGroup().text(); + fore = tqparentWidget()->tqcolorGroup().text(); setPaletteForegroundColor( fore ); setTitle( title ); } -struct CoverPopup : public QWidget +struct CoverPopup : public TQWidget { - CoverPopup(const QPixmap &image, const QPoint &p) : - QWidget(0, 0, WDestructiveClose | WX11BypassWM) + CoverPopup(const TQPixmap &image, const TQPoint &p) : + TQWidget(0, 0, WDestructiveClose | WX11BypassWM) { - QHBoxLayout *layout = new QHBoxLayout(this); - QLabel *label = new QLabel(this); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + TQLabel *label = new TQLabel(this); - layout->addWidget(label); - label->setFrameStyle(QFrame::Box | QFrame::Raised); + tqlayout->addWidget(label); + label->setFrameStyle(TQFrame::Box | TQFrame::Raised); label->setLineWidth(1); label->setPixmap(image); setGeometry(p.x(), p.y(), label->width(), label->height()); show(); } - virtual void leaveEvent(QEvent *) { close(); } - virtual void mouseReleaseEvent(QMouseEvent *) { close(); } + virtual void leaveEvent(TQEvent *) { close(); } + virtual void mouseReleaseEvent(TQMouseEvent *) { close(); } }; -CoverFrame::CoverFrame( QWidget *parent ) : QFrame( parent ) +CoverFrame::CoverFrame( TQWidget *tqparent ) : TQFrame( tqparent ) { imagePath = ""; - QString path = locate("appdata", "nocover.png"); + TQString path = locate("appdata", "nocover.png"); if ( !path ) path = locate("data", "kaffeine/nocover.png"); - noCoverPix.convertFromImage( QImage(path) ); + noCoverPix.convertFromImage( TQImage(path) ); setPaletteBackgroundPixmap( noCoverPix ); } @@ -198,12 +198,12 @@ CoverFrame::~CoverFrame() { } -void CoverFrame::setCoverPixmap( const QString &path ) +void CoverFrame::setCoverPixmap( const TQString &path ) { - QPixmap pix; - QImage img; + TQPixmap pix; + TQImage img; - img = QImage( path ); + img = TQImage( path ); if ( !img.isNull() ) { img = img.smoothScale( 80, 80 ); pix.convertFromImage( img ); @@ -216,10 +216,10 @@ void CoverFrame::setCoverPixmap( const QString &path ) } } -void CoverFrame::popup( const QPixmap &pix ) const +void CoverFrame::popup( const TQPixmap &pix ) const { - QPoint mouse = QCursor::pos(); - QRect desktop = KApplication::desktop()->screenGeometry(mouse); + TQPoint mouse = TQCursor::pos(); + TQRect desktop = KApplication::desktop()->screenGeometry(mouse); int x = mouse.x(); int y = mouse.y(); int height = pix.height() + 4; @@ -241,28 +241,28 @@ void CoverFrame::popup( const QPixmap &pix ) const else y = (y - desktop.y() > desktop.height() - 10) ? desktop.height() - height + desktop.y() : (y - height + 10); - new CoverPopup( pix, QPoint(x, y) ); + new CoverPopup( pix, TQPoint(x, y) ); } -void CoverFrame::mousePressEvent( QMouseEvent *e ) +void CoverFrame::mousePressEvent( TQMouseEvent *e ) { int i; - QPixmap pix; + TQPixmap pix; switch ( e->button() ) { - case LeftButton: { + case Qt::LeftButton: { if ( imagePath.isEmpty() ) break; - pix.convertFromImage( QImage( imagePath ) ); + pix.convertFromImage( TQImage( imagePath ) ); if ( !pix.isNull() ) popup( pix ); break; } - case RightButton: { - QPopupMenu pop( this ); + case Qt::RightButton: { + TQPopupMenu pop( this ); pop.insertItem( i18n("Choose a Cover..."), 1 ); pop.insertItem( i18n("Gallery..."), 2 ); - i = pop.exec( QCursor::pos() ); + i = pop.exec( TQCursor::pos() ); if ( i==1 ) emit changeCurrentCover(); else if ( i==2 ) @@ -275,27 +275,27 @@ void CoverFrame::mousePressEvent( QMouseEvent *e ) } -PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : KaffeineInput(objParent , name), +PlayList::PlayList( TQWidget* tqparent, TQObject *objParent, const char *name ) : KaffeineInput(objParent , name), m_playTime(0), m_playTimeVisible(0), m_countVisible(0), m_searchSelection(false), m_metaOnLoading(true), m_sortAscending(true), m_currentEntry(NULL), m_currentRandomListEntry(-1), m_endless(false), m_random(false), m_useAlternateEncoding(false), m_alternateEncoding("ISO 8859-1") { google = NULL; - mainWidget = new QVBox( parent ); - //mainWidget->setSizePolicy( QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred) ); - hSplit = new QSplitter( mainWidget ); + mainWidget = new TQVBox( tqparent ); + //mainWidget->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Preferred, TQSizePolicy::Preferred) ); + hSplit = new TQSplitter( mainWidget ); hSplit->setOpaqueResize( true ); - panel = new QVBox( hSplit ); - playlist = new QWidget( hSplit ); + panel = new TQVBox( hSplit ); + playlist = new TQWidget( hSplit ); hSplit->moveToFirst( panel ); - hSplit->setResizeMode( panel, QSplitter::KeepSize ); + hSplit->setResizeMode( panel, TQSplitter::KeepSize ); - vSplit = new QSplitter( QSplitter::Vertical, panel ); + vSplit = new TQSplitter( Qt::Vertical, panel ); vSplit->setOpaqueResize( true ); - QWidget *vb = new QWidget( vSplit ); + TQWidget *vb = new TQWidget( vSplit ); KToolBar *tb = new KToolBar( vb ); - QVBoxLayout *v = new QVBoxLayout( vb, 0, 0 ); + TQVBoxLayout *v = new TQVBoxLayout( vb, 0, 0 ); v->addWidget( tb ); tb->setIconSize( 16 ); @@ -303,7 +303,7 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka browserComb->setCompletionObject( new KURLCompletion( KURLCompletion::DirCompletion ) ); browserComb->setAutoDeleteCompletionObject( true ); browserComb->setMaxItems( 10 ); - browserComb->setFocusPolicy(QWidget::ClickFocus); + browserComb->setFocusPolicy(TQ_ClickFocus); /* if (!m_medium) @@ -311,7 +311,7 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka else m_combo->lineEdit()->setText( "/" );*/ - QVBoxLayout *v1 = new QVBoxLayout( 0, 3, 3 ); + TQVBoxLayout *v1 = new TQVBoxLayout( 0, 3, 3 ); v1->addWidget( browserComb ); fileBrowser = new KDirOperator( KURL("/"), vb ); fileBrowser->setupMenu( KDirOperator::SortActions|KDirOperator::NavActions|KDirOperator::ViewActions ); @@ -332,7 +332,7 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka col->action( "home" )->plug( tb ); vSplit->moveToFirst( vb ); - playerBox = new QVBox( vSplit ); + playerBox = new TQVBox( vSplit ); playerBox->setMinimumHeight( 50 ); playerBox->setMinimumWidth( 200 ); vSplit->moveToLast( playerBox ); @@ -342,14 +342,14 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka KIO::NetAccess::mkdir(m_playlistDirectory, mainWidget); kdDebug() << "PLAYLIST" << endl; - QGridLayout* layout = new QGridLayout( playlist, 4, 2, 3 ); + TQGridLayout* tqlayout = new TQGridLayout( playlist, 4, 2, 3 ); m_list = new UrlListView(playlist); mainWidget->setAcceptDrops(true); m_list->setHScrollBarMode(KListView::AlwaysOff); m_list->setItemMargin(2); m_list->setMargin(0); - m_list->setSelectionMode(QListView::Extended); + m_list->setSelectionMode(TQListView::Extended); m_list->addColumn(""); m_list->addColumn(i18n("Title")); m_list->addColumn(i18n("Artist")); @@ -357,13 +357,13 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka m_list->addColumn(i18n("Track")); m_list->addColumn(i18n("Length")); m_list->setShowToolTips(true); - m_list->setColumnWidthMode(MIME_COLUMN, QListView::Manual); - m_list->setColumnWidthMode(TITLE_COLUMN, QListView::Manual); - m_list->setColumnWidthMode(ARTIST_COLUMN, QListView::Manual); - m_list->setColumnWidthMode(ALBUM_COLUMN, QListView::Manual); - m_list->setColumnWidthMode(TRACK_COLUMN, QListView::Manual); - m_list->setColumnWidthMode(LENGTH_COLUMN, QListView::Manual); - m_list->setResizeMode(QListView::NoColumn); + m_list->setColumnWidthMode(MIME_COLUMN, TQListView::Manual); + m_list->setColumnWidthMode(TITLE_COLUMN, TQListView::Manual); + m_list->setColumnWidthMode(ARTIST_COLUMN, TQListView::Manual); + m_list->setColumnWidthMode(ALBUM_COLUMN, TQListView::Manual); + m_list->setColumnWidthMode(TRACK_COLUMN, TQListView::Manual); + m_list->setColumnWidthMode(LENGTH_COLUMN, TQListView::Manual); + m_list->setResizeMode(TQListView::NoColumn); KConfig* config = kapp->config(); m_list->restoreLayout(config, "Playlist Layout"); m_list->setFullWidth(true); @@ -379,44 +379,44 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka m_list->setRenameable(TRACK_COLUMN); m_list->setAllColumnsShowFocus(true); m_list->setShowSortIndicator(true); - layout->addMultiCellWidget(m_list, 3, 3, 0, 1); + tqlayout->addMultiCellWidget(m_list, 3, 3, 0, 1); coverFrame = new CoverFrame( playlist ); coverFrame->setFixedWidth( 80 ); coverFrame->setFixedHeight( 80 ); - layout->addMultiCellWidget(coverFrame, 0, 2, 0, 0); + tqlayout->addMultiCellWidget(coverFrame, 0, 2, 0, 0); - QHBoxLayout *h1 = new QHBoxLayout(); - searchBtn = new QToolButton( playlist ); + TQHBoxLayout *h1 = new TQHBoxLayout(); + searchBtn = new TQToolButton( playlist ); searchBtn->setAutoRaise( true ); - QToolTip::add( searchBtn, i18n("Search")); + TQToolTip::add( searchBtn, i18n("Search")); searchBtn->setIconSet( KGlobal::iconLoader()->loadIconSet("locationbar_erase", KIcon::Small) ); h1->addWidget( searchBtn ); - QLabel* filterLabel = new QLabel(i18n("Filter") + ":", playlist); + TQLabel* filterLabel = new TQLabel(i18n("Filter") + ":", playlist); h1->addWidget(filterLabel); m_playlistFilter = new KLineEdit(playlist); - m_playlistFilter->setFocusPolicy(QWidget::ClickFocus); + m_playlistFilter->setFocusPolicy(TQ_ClickFocus); h1->addWidget(m_playlistFilter); - layout->addLayout( h1, 2, 1 ); + tqlayout->addLayout( h1, 2, 1 ); - QHBoxLayout *h2 = new QHBoxLayout(); - QLabel* playlistLabel = new QLabel(i18n("Playlist:"), playlist); + TQHBoxLayout *h2 = new TQHBoxLayout(); + TQLabel* playlistLabel = new TQLabel(i18n("Playlist:"), playlist); h2->addWidget(playlistLabel); m_playlistSelector = new KComboBox( playlist ); m_playlistSelector->setMinimumWidth(10); - m_playlistSelector->setSizePolicy( QSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::Preferred) ); + m_playlistSelector->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred) ); m_playlistSelector->setEditable(true); m_playlistSelector->setDuplicatesEnabled(false); - m_playlistSelector->setFocusPolicy(QWidget::ClickFocus); - QToolTip::add(m_playlistSelector, i18n("Select the active playlist. To change playlist name edit it and confirm with 'Return'.")); + m_playlistSelector->setFocusPolicy(TQ_ClickFocus); + TQToolTip::add(m_playlistSelector, i18n("Select the active playlist. To change playlist name edit it and confirm with 'Return'.")); h2->addWidget(m_playlistSelector); - layout->addLayout( h2, 1, 1 ); + tqlayout->addLayout( h2, 1, 1 ); roller = new RollTitle( playlist ); - layout->addWidget( roller, 0, 1 ); + tqlayout->addWidget( roller, 0, 1 ); KAccel* accel = new KAccel(mainWidget); - accel->insert("Delete selected", Qt::Key_Delete, this, SLOT(slotRemoveSelected())); + accel->insert("Delete selected", TQt::Key_Delete, this, TQT_SLOT(slotRemoveSelected())); m_isCurrentEntry = UserIcon("playing"); m_cdPixmap = KGlobal::iconLoader()->loadIcon("cdtrack", KIcon::Small); @@ -424,10 +424,10 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka setXMLFile("kaffeineplaylist.rc"); setupActions(); - QStrList formats = QImageIO::outputFormats(); + TQStrList formats = TQImageIO::outputFormats(); coverImageFormat = "PNG"; for (int i=0; i<(int)formats.count(); i++ ) { - if ( QString(formats.at(i))=="JPEG" ) { + if ( TQString(formats.at(i))=="JPEG" ) { coverImageFormat = "JPEG"; break; } @@ -435,28 +435,28 @@ PlayList::PlayList( QWidget* parent, QObject *objParent, const char *name ) : Ka loadConfig( KGlobal::config() ); - connect(coverFrame, SIGNAL(changeCurrentCover()), this, SLOT(chooseCurrentCover())); - connect(coverFrame, SIGNAL(gallery()), this, SLOT(showGallery())); - connect(browserComb, SIGNAL(urlActivated( const KURL& )), this, SLOT(setBrowserURL( const KURL& ))); - connect(browserComb, SIGNAL(returnPressed( const QString& )), this, SLOT(setBrowserURL( const QString& ))); - connect(fileBrowser, SIGNAL(urlEntered( const KURL& )), this, SLOT(browserURLChanged( const KURL& ))); - connect(fileBrowser, SIGNAL(fileSelected(const KFileItem*)), this, SLOT(fileSelected(const KFileItem*))); - connect(m_playlistFilter, SIGNAL(textChanged(const QString&)), this, SLOT(slotFindText(const QString&))); - connect( searchBtn, SIGNAL(clicked()), this, SLOT(resetSearch()) ); - connect(m_playlistSelector, SIGNAL(returnPressed(const QString&)), this, SLOT(slotNewPlaylistName(const QString&))); - connect(m_playlistSelector, SIGNAL(activated(int)),this, SLOT(slotPlaylistActivated(int))); - connect(m_list, SIGNAL(dropped(QDropEvent*, QListViewItem*)), this, SLOT(slotDropEvent(QDropEvent*, QListViewItem*))); - connect(m_list, SIGNAL(aboutToMove()), this, SLOT(slotPreDropEvent())); - connect(m_list, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(slotPlayDirect(QListViewItem*))); - connect(m_list, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotPlayDirect(QListViewItem*))); - connect(m_list, SIGNAL(signalCut()), this, SLOT(slotCut())); - connect(m_list, SIGNAL(signalCopy()), this, SLOT(slotCopy())); - connect(m_list, SIGNAL(signalPaste()), this, SLOT(slotPaste())); - connect(m_list, SIGNAL(signalSelectAll()), this, SLOT(slotSelectAll())); - connect(m_list, SIGNAL(signalPlayItem(QListViewItem*)), this, SLOT(slotPlayDirect(QListViewItem*))); - connect(m_list, SIGNAL(signalPlaylistFromSelected()), this, SLOT(slotPlaylistFromSelected())); - connect(m_list, SIGNAL(signalAddToQueue(MRL)), this, SLOT(slotAddToQueue(MRL))); - connect(m_list->header(), SIGNAL(clicked(int)), this, SLOT(slotSort(int))); + connect(coverFrame, TQT_SIGNAL(changeCurrentCover()), this, TQT_SLOT(chooseCurrentCover())); + connect(coverFrame, TQT_SIGNAL(gallery()), this, TQT_SLOT(showGallery())); + connect(browserComb, TQT_SIGNAL(urlActivated( const KURL& )), this, TQT_SLOT(setBrowserURL( const KURL& ))); + connect(browserComb, TQT_SIGNAL(returnPressed( const TQString& )), this, TQT_SLOT(setBrowserURL( const TQString& ))); + connect(fileBrowser, TQT_SIGNAL(urlEntered( const KURL& )), this, TQT_SLOT(browserURLChanged( const KURL& ))); + connect(fileBrowser, TQT_SIGNAL(fileSelected(const KFileItem*)), this, TQT_SLOT(fileSelected(const KFileItem*))); + connect(m_playlistFilter, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotFindText(const TQString&))); + connect( searchBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetSearch()) ); + connect(m_playlistSelector, TQT_SIGNAL(returnPressed(const TQString&)), this, TQT_SLOT(slotNewPlaylistName(const TQString&))); + connect(m_playlistSelector, TQT_SIGNAL(activated(int)),this, TQT_SLOT(slotPlaylistActivated(int))); + connect(m_list, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), this, TQT_SLOT(slotDropEvent(TQDropEvent*, TQListViewItem*))); + connect(m_list, TQT_SIGNAL(aboutToMove()), this, TQT_SLOT(slotPreDropEvent())); + connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(slotPlayDirect(TQListViewItem*))); + connect(m_list, TQT_SIGNAL(returnPressed(TQListViewItem*)), this, TQT_SLOT(slotPlayDirect(TQListViewItem*))); + connect(m_list, TQT_SIGNAL(signalCut()), this, TQT_SLOT(slotCut())); + connect(m_list, TQT_SIGNAL(signalCopy()), this, TQT_SLOT(slotCopy())); + connect(m_list, TQT_SIGNAL(signalPaste()), this, TQT_SLOT(slotPaste())); + connect(m_list, TQT_SIGNAL(signalSelectAll()), this, TQT_SLOT(slotSelectAll())); + connect(m_list, TQT_SIGNAL(signalPlayItem(TQListViewItem*)), this, TQT_SLOT(slotPlayDirect(TQListViewItem*))); + connect(m_list, TQT_SIGNAL(signalPlaylistFromSelected()), this, TQT_SLOT(slotPlaylistFromSelected())); + connect(m_list, TQT_SIGNAL(signalAddToQueue(MRL)), this, TQT_SLOT(slotAddToQueue(MRL))); + connect(m_list->header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSort(int))); } void PlayList::togglePanel() @@ -467,24 +467,24 @@ void PlayList::togglePanel() panel->hide(); } -void PlayList::getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ) +void PlayList::getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ) { uiNames.append( i18n("Play Playlist") ); iconNames.append( "view_text" ); targetNames.append( "PLAYLIST" ); } -bool PlayList::execTarget( const QString &target ) +bool PlayList::execTarget( const TQString &target ) { if ( target=="PLAYLIST" ) { emit showMe( this ); - QTimer::singleShot( 100, this, SLOT(startPlaylist()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startPlaylist()) ); return true; } return false; } -void PlayList::setFileFilter( const QString& filter ) +void PlayList::setFileFilter( const TQString& filter ) { m_fileFilter = filter; fileBrowser->setNameFilter( m_fileFilter ); @@ -497,19 +497,19 @@ PlayList::~PlayList() void PlayList::setupActions() { - m_repeat = new KToggleAction(i18n("&Repeat"), 0 , CTRL|Key_E, this, SLOT(slotRepeat()), actionCollection(),"playlist_repeat"); + m_repeat = new KToggleAction(i18n("&Repeat"), 0 , CTRL|Key_E, this, TQT_SLOT(slotRepeat()), actionCollection(),"playlist_repeat"); m_repeat->setStatusText(i18n("Loop playlist")); - m_shuffle = new KToggleAction(i18n("Sh&uffle"), 0 , CTRL|Key_R, this, SLOT(slotShuffle()), actionCollection(),"playlist_shuffle"); + m_shuffle = new KToggleAction(i18n("Sh&uffle"), 0 , CTRL|Key_R, this, TQT_SLOT(slotShuffle()), actionCollection(),"playlist_shuffle"); m_shuffle->setStatusText(i18n("Play items in random order")); - m_autoCover = new KToggleAction(i18n("Autodownload covers"), 0 , 0, this, SLOT(slotAutoCover()), actionCollection(),"playlist_autocover"); + m_autoCover = new KToggleAction(i18n("Autodownload covers"), 0 , 0, this, TQT_SLOT(slotAutoCover()), actionCollection(),"playlist_autocover"); m_autoCover->setStatusText(i18n("Automatic dowloading of covers")); - m_showPlayer = new KToggleAction(i18n("Don't switch to player window"), 0 , 0, this, SLOT(slotShowPlayer()), actionCollection(),"playlist_showplayer"); + m_showPlayer = new KToggleAction(i18n("Don't switch to player window"), 0 , 0, this, TQT_SLOT(slotShowPlayer()), actionCollection(),"playlist_showplayer"); m_showPlayer->setStatusText(i18n("Don't switch automatically to player window")); - new KAction(i18n("&Clear Current Playlist"), "eraser", 0, this, SLOT(slotClearList()), actionCollection(), "playlist_clear"); - new KAction(i18n("Ne&w Playlist"), "filenew", 0, this, SLOT(slotNewList()), actionCollection(), "playlist_new"); - new KAction(i18n("&Import Playlist..."), "project_open", 0, this, SLOT(slotPlaylistLoad()), actionCollection(), "playlist_load"); - new KAction(i18n("&Save Current Playlist As..."), "filesaveas", 0, this, SLOT(slotPlaylistSaveAs()), actionCollection(), "playlist_save_as"); - new KAction(i18n("Re&move Current Playlist"), "fileclose", 0, this, SLOT(slotPlaylistRemove()), actionCollection(), "playlist_remove"); + new KAction(i18n("&Clear Current Playlist"), "eraser", 0, this, TQT_SLOT(slotClearList()), actionCollection(), "playlist_clear"); + new KAction(i18n("Ne&w Playlist"), "filenew", 0, this, TQT_SLOT(slotNewList()), actionCollection(), "playlist_new"); + new KAction(i18n("&Import Playlist..."), "project_open", 0, this, TQT_SLOT(slotPlaylistLoad()), actionCollection(), "playlist_load"); + new KAction(i18n("&Save Current Playlist As..."), "filesaveas", 0, this, TQT_SLOT(slotPlaylistSaveAs()), actionCollection(), "playlist_save_as"); + new KAction(i18n("Re&move Current Playlist"), "fileclose", 0, this, TQT_SLOT(slotPlaylistRemove()), actionCollection(), "playlist_remove"); } void PlayList::slotClearList() @@ -544,8 +544,8 @@ void PlayList::slotToggleShuffle() void PlayList::slotPlaylistLoad() { - QString path = KFileDialog::getOpenFileName(":kaffeine_openPlaylist", QString("*.kaffeine|") + i18n("Kaffeine Playlists") + "\n*.*|" + i18n("All Files"), 0, i18n("Open Playlist")); - if (path.isEmpty() || (!path.contains(".kaffeine", false))) + TQString path = KFileDialog::getOpenFileName(":kaffeine_openPlaylist", TQString("*.kaffeine|") + i18n("Kaffeine Playlists") + "\n*.*|" + i18n("All Files"), 0, i18n("Open Playlist")); + if (path.isEmpty() || (!path.tqcontains(".kaffeine", false))) return; loadPlaylist(path); @@ -553,12 +553,12 @@ void PlayList::slotPlaylistLoad() void PlayList::slotPlaylistSaveAs() { - QString startPath = ":kaffeine_savePlaylist"; + TQString startPath = ":kaffeine_savePlaylist"; //if (!lastPlaylist.isEmpty()) startPath = lastPlaylist; - QString path = KFileDialog::getSaveFileName(startPath, - QString("*.kaffeine|") + i18n("Kaffeine Playlists") + "\n" + - QString("*.m3u|") + i18n("M3U Playlists") + "\n" + - QString("*.pls|") + i18n("PLS Playlists") + "\n" + + TQString path = KFileDialog::getSaveFileName(startPath, + TQString("*.kaffeine|") + i18n("Kaffeine Playlists") + "\n" + + TQString("*.m3u|") + i18n("M3U Playlists") + "\n" + + TQString("*.pls|") + i18n("PLS Playlists") + "\n" + "*.*|" + i18n("All Files"), 0, i18n("Save Playlist")); if ( path.isEmpty() ) @@ -580,19 +580,19 @@ void PlayList::slotPlaylistRemove() removeCurrentPlaylist(); } -QWidget* PlayList::wantPlayerWindow() +TQWidget* PlayList::wantPlayerWindow() { return playerBox; } -QWidget* PlayList::inputMainWidget() +TQWidget* PlayList::inputMainWidget() { return mainWidget; } void PlayList::loadConfig(KConfig* config) { - QValueList<int> sl; + TQValueList<int> sl; bool b; config->setGroup("Playlist"); @@ -617,7 +617,7 @@ void PlayList::loadConfig(KConfig* config) hSplit->setSizes( sl ); } vSplit->setSizes( config->readIntListEntry("VSplitSizes") ); - QStringList list; + TQStringList list; list = config->readListEntry("Playlists"); if (!list.count()) { @@ -632,10 +632,10 @@ void PlayList::loadConfig(KConfig* config) m_playlistSelector->setCurrentItem(m_currentPlaylist); add(m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine", NULL); m_nextPlaylistNumber = config->readNumEntry("Next Playlist", 2); - QString currentEntry = config->readEntry("Current Entry", QString()); + TQString currentEntry = config->readEntry("Current Entry", TQString()); if ((!currentEntry.isEmpty()) && (m_list->childCount())) { - QListViewItem* tmp = findByURL(currentEntry); + TQListViewItem* tmp = findByURL(currentEntry); if (tmp) setCurrentEntry(tmp, false); } @@ -659,8 +659,8 @@ void PlayList::saveConfig(KConfig* config) config->writeEntry("DontShowPlayer", m_showPlayer->isChecked()); config->writeEntry( "HSplitSizes", hSplit->sizes() ); config->writeEntry( "VSplitSizes", vSplit->sizes() ); - QStringList list; - QString text; + TQStringList list; + TQString text; for (uint i=0; i < m_playlistSelector->listBox()->count(); i++) { text = m_playlistSelector->text(i); @@ -676,7 +676,7 @@ void PlayList::saveConfig(KConfig* config) config->writeEntry( "FileBrowserURL", fileBrowser->url().url() ); } -void PlayList::closeEvent(QCloseEvent* ce) +void PlayList::closeEvent(TQCloseEvent* ce) { kdDebug() << "Playlist: close Event" << endl; ce->ignore(); @@ -706,7 +706,7 @@ MRL PlayList::getCurrent() if (isQueueMode()) { m_queue.clear(); - updateStatus(); + updatetqStatus(); } if (m_random) @@ -747,7 +747,7 @@ bool PlayList::nextTrack( MRL &mrl ) { mrl = m_queue.first(); m_queue.remove(m_queue.begin()); - updateStatus(); + updatetqStatus(); return true; } @@ -775,7 +775,7 @@ bool PlayList::nextTrack( MRL &mrl ) return true; } - QListViewItem* tmpItem; + TQListViewItem* tmpItem; tmpItem = m_currentEntry->itemBelow(); if (tmpItem) @@ -802,7 +802,7 @@ bool PlayList::previousTrack( MRL &mrl ) if (isQueueMode()) { m_queue.clear(); - updateStatus(); + updatetqStatus(); } if (!m_currentEntry) { @@ -827,7 +827,7 @@ bool PlayList::previousTrack( MRL &mrl ) return true; } - QListViewItem* tmpItem; + TQListViewItem* tmpItem; tmpItem = m_currentEntry->itemAbove(); if (tmpItem) { @@ -851,7 +851,7 @@ bool PlayList::trackNumber( int number, MRL &mrl ) if (number > m_list->childCount()) return false; - QListViewItem * item = m_list->firstChild(); + TQListViewItem * item = m_list->firstChild(); for (int i = 1; i < number; i++) item = item->nextSibling(); @@ -860,19 +860,19 @@ bool PlayList::trackNumber( int number, MRL &mrl ) return true; } -QListViewItem* PlayList::getLast() +TQListViewItem* PlayList::getLast() { return m_list->lastItem(); } -QListViewItem* PlayList::getFirst() +TQListViewItem* PlayList::getFirst() { return m_list->firstChild(); } -QListViewItem* PlayList::findByURL(const QString& url) +TQListViewItem* PlayList::findByURL(const TQString& url) { - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); while (it.current()) { if (dynamic_cast<PlaylistItem*>(*it)->url() == url) @@ -888,14 +888,14 @@ QListViewItem* PlayList::findByURL(const QString& url) /********* set current entry (with play icon) ****************/ -void PlayList::setCurrentEntry(QListViewItem* item, bool playIcon) +void PlayList::setCurrentEntry(TQListViewItem* item, bool playIcon) { PlaylistItem* newItem = dynamic_cast<PlaylistItem*>(item); PlaylistItem* oldItem = dynamic_cast<PlaylistItem*>(m_currentEntry); if (m_currentEntry) { oldItem->setPlaying(false); - m_currentEntry->setPixmap(TITLE_COLUMN, QPixmap()); + m_currentEntry->setPixmap(TITLE_COLUMN, TQPixmap()); } if (playIcon) { @@ -904,7 +904,7 @@ void PlayList::setCurrentEntry(QListViewItem* item, bool playIcon) } m_currentEntry = item; if (m_random) - m_currentRandomListEntry = m_randomList.find(item); + m_currentRandomListEntry = m_randomList.tqfind(item); m_currentEntryMRL = newItem->toMRL(); roller->setTitle( m_currentEntryMRL ); m_list->setCurrentItem(m_currentEntry); @@ -912,13 +912,13 @@ void PlayList::setCurrentEntry(QListViewItem* item, bool playIcon) m_list->ensureVisible(10, m_list->itemPos(m_currentEntry), 10, 30); } -QListViewItem* PlayList::insertItem(QListViewItem* after, const MRL& m) +TQListViewItem* PlayList::insertItem(TQListViewItem* after, const MRL& m) { PlaylistItem* tmp = NULL; MRL mrl(m); m_list->setSorting(-1); - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); while (it.current()) { if (dynamic_cast<PlaylistItem*>(*it)->url() == mrl.url()) @@ -943,14 +943,14 @@ QListViewItem* PlayList::insertItem(QListViewItem* after, const MRL& m) else tmp->setPixmap(MIME_COLUMN, KMimeType::mimeType(mrl.mime())->pixmap(KIcon::Small)); - if (tmp->length().contains(':')) + if (tmp->length().tqcontains(':')) m_playTime += timeStringToMs(tmp->length()); if (m_searchSelection) { - QString text = m_playlistFilter->text(); - if ((!tmp->title().contains(text, false)) && (!tmp->url().contains(text, false)) - && (!tmp->artist().contains(text, false)) && (!tmp->album().contains(text, false))) + TQString text = m_playlistFilter->text(); + if ((!tmp->title().tqcontains(text, false)) && (!tmp->url().tqcontains(text, false)) + && (!tmp->artist().tqcontains(text, false)) && (!tmp->album().tqcontains(text, false))) { tmp->setVisible(false); } @@ -958,7 +958,7 @@ QListViewItem* PlayList::insertItem(QListViewItem* after, const MRL& m) if (tmp->isVisible()) { - if (tmp->length().contains(':')); + if (tmp->length().tqcontains(':')); m_playTimeVisible += timeStringToMs(tmp->length()); m_countVisible++; } @@ -970,15 +970,15 @@ void PlayList::fileSelected( const KFileItem *item ) { if ( !item ) return; - add( QStringList( item->url().path() ), NULL ); - QListViewItem* tmp = findByURL(item->url().path()); + add( TQStringList( item->url().path() ), NULL ); + TQListViewItem* tmp = findByURL(item->url().path()); if (tmp) { setCurrentEntry(tmp); emit play(m_currentEntryMRL, this); } } -void PlayList::setBrowserURL( const QString &path ) +void PlayList::setBrowserURL( const TQString &path ) { fileBrowser->setURL( KURL(path), true ); } @@ -990,41 +990,41 @@ void PlayList::setBrowserURL( const KURL &path ) void PlayList::browserURLChanged( const KURL &u ) { - QString url; + TQString url; if ( u.isLocalFile() ) url = u.path(); else url = u.prettyURL(); - QStringList urls = browserComb->urls(); + TQStringList urls = browserComb->urls(); urls.remove( url ); // do not duplicate urls.prepend( url ); browserComb->setURLs( urls, KURLComboBox::RemoveBottom ); } -void PlayList::add(const QString& url, QListViewItem* after) +void PlayList::add(const TQString& url, TQListViewItem* after) { - add(QStringList(url), after); + add(TQStringList(url), after); } -void PlayList::add(const QStringList& urlList, QListViewItem* after) +void PlayList::add(const TQStringList& urlList, TQListViewItem* after) { - QListViewItem* tmp = NULL; - QStringList urls(urlList); + TQListViewItem* tmp = NULL; + TQStringList urls(urlList); - QString ext; - QString subtitleURL; - QStringList subs; + TQString ext; + TQString subtitleURL; + TQStringList subs; KURL tmpKURL; bool playlist; MRL mrl; - QValueList<MRL> mrlList; - QString mediadevice=""; + TQValueList<MRL> mrlList; + TQString mediadevice=""; KProgressDialog* progress = NULL; - progress = new KProgressDialog(mainWidget, "importprogress", QString::null, i18n("Importing media resources...")); + progress = new KProgressDialog(mainWidget, "importprogress", TQString(), i18n("Importing media resources...")); progress->progressBar()->setTotalSteps(urls.count()); progress->show(); @@ -1033,26 +1033,26 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) for (uint i = 0; i < urls.count(); i++) { mrl = MRL(urls[i]); - QString url(mrl.kurl().prettyURL()); + TQString url(mrl.kurl().prettyURL()); if (mrl.kurl().protocol() == "media" || url.startsWith("system:/media/")) { - QString mediaName; + TQString mediaName; if (url.startsWith("system:/media/")) mediaName = url.mid(14); else mediaName = url.mid(7); - int slash = mediaName.find("/"); - QString filePath(mediaName.mid(slash)); + int slash = mediaName.tqfind("/"); + TQString filePath(mediaName.mid(slash)); if (filePath == "/") filePath = ""; mediaName = mediaName.left(slash); DCOPRef mediamanager("kded","mediamanager"); - DCOPReply reply = mediamanager.call("properties(QString)",mediaName); + DCOPReply reply = mediamanager.call("properties(TQString)",mediaName); if (reply.isValid()) { - QStringList properties = reply; + TQStringList properties = reply; if (properties.isEmpty()) break; url = properties[6] + filePath; if (filePath.isEmpty()) @@ -1085,7 +1085,7 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) if (mrl.kurl().isLocalFile()) { - if (!QFile::exists(mrl.kurl().path())) + if (!TQFile::exists(mrl.kurl().path())) continue; mrl.setTitle(mrl.kurl().fileName()); mrl.setURL(mrl.kurl().path()); @@ -1099,7 +1099,7 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) /*********** determine extension and mime type ************/ ext = mrl.kurl().fileName(); - ext = ext.remove(0 , ext.findRev('.') +1).lower(); + ext = ext.remove(0 , ext.tqfindRev('.') +1).lower(); // kdDebug() << "Extension: " << ext << endl; //kdDebug() << "PlayList: Try to determine mime of: " << mrl.url() << endl; @@ -1122,32 +1122,32 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) mrlList.clear(); playlist = false; - QFile file(mrl.url()); + TQFile file(mrl.url()); file.open(IO_ReadOnly); - QTextStream stream(&file); - QString firstLine = stream.readLine(); - QString secondLine = stream.readLine(); + TQTextStream stream(&file); + TQString firstLine = stream.readLine(); + TQString secondLine = stream.readLine(); file.close(); - if (secondLine.contains("kaffeine", false)) + if (secondLine.tqcontains("kaffeine", false)) { kdDebug() << "PlayList: Try loading kaffeine playlist\n"; playlist = PlaylistImport::kaffeine(mrl.url(), mrlList); if (!playlist) continue; } - if (secondLine.contains("noatun", false)) + if (secondLine.tqcontains("noatun", false)) { kdDebug() << "PlayList: Try loading noatun playlist\n"; playlist = PlaylistImport::noatun(mrl.url(), mrlList); } - if (firstLine.contains("asx", false)) + if (firstLine.tqcontains("asx", false)) { kdDebug() << "PlayList: Try loading asx playlist\n"; playlist = PlaylistImport::asx(mrl.url(), mrlList); } - if ( (firstLine.contains("[playlist]", false)) || (ext == "pls") ) + if ( (firstLine.tqcontains("[playlist]", false)) || (ext == "pls") ) { kdDebug() << "PlayList: Try loading pls playlist\n"; playlist = PlaylistImport::pls(mrl.url(), mrlList); @@ -1159,8 +1159,8 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) } if (playlist) { - QValueList<MRL>::ConstIterator end(mrlList.end()); - for (QValueList<MRL>::ConstIterator it = mrlList.begin(); it != end; ++it) + TQValueList<MRL>::ConstIterator end(mrlList.end()); + for (TQValueList<MRL>::ConstIterator it = mrlList.begin(); it != end; ++it) after = insertItem(after, *it); continue; } @@ -1172,10 +1172,10 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) { mrlList.clear(); kdDebug() << "PlayList: Try loading ram playlist\n"; - if (PlaylistImport::ram(mrl, mrlList, mainWidget->parentWidget())) + if (PlaylistImport::ram(mrl, mrlList, mainWidget->tqparentWidget())) { - QValueList<MRL>::ConstIterator end(mrlList.end()); - for (QValueList<MRL>::ConstIterator it = mrlList.begin(); it != end; ++it) + TQValueList<MRL>::ConstIterator end(mrlList.end()); + for (TQValueList<MRL>::ConstIterator it = mrlList.begin(); it != end; ++it) after = insertItem(after, *it); continue; } @@ -1186,11 +1186,11 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) { kdDebug() << "PlayList: Add Directory: " << mrl.url() << endl; - QDir d(mrl.url()); + TQDir d(mrl.url()); uint x; /* subdirs */ - QStringList entryList = d.entryList(QDir::Dirs, QDir::Name); + TQStringList entryList = d.entryList(TQDir::Dirs, TQDir::Name); for (x = 0; x < entryList.count(); x++) { if (entryList[x][0] != '.') @@ -1202,14 +1202,14 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) /* Media files */ /* Exclude subtitles because they are examined twice : */ /* Once for movie and once per subtitle - very annoying*/ - QString fileFilter = m_fileFilter; + TQString fileFilter = m_fileFilter; fileFilter.remove("*.srt",false); fileFilter.remove("*.ssa",false); fileFilter.remove("*.txt",false); fileFilter.remove("*.asc",false); fileFilter.remove("*.smi",false); fileFilter.remove("*.sub",false); - entryList = d.entryList(fileFilter, QDir::Files, QDir::Name ); + entryList = d.entryList(fileFilter, TQDir::Files, TQDir::Name ); for (x = 0; x < entryList.count(); x++) { urls.append(mrl.url() + "/" + entryList[x]); @@ -1223,12 +1223,12 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) if ((ext == "srt") || (ext == "ssa") || (ext == "txt") || (ext == "asc") || (ext == "smi") || (ext == "sub")) { - QStringList movies; - QString movieURL; - QListViewItemIterator it(m_list); + TQStringList movies; + TQString movieURL; + TQListViewItemIterator it(m_list); while (it.current()) { - if (dynamic_cast<PlaylistItem*>(*it)->mime().contains("video")) + if (dynamic_cast<PlaylistItem*>(*it)->mime().tqcontains("video")) movies << dynamic_cast<PlaylistItem*>(*it)->url(); ++it; } @@ -1237,7 +1237,7 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) else if (movies.count() >= 2) { MovieChooser *mc = new MovieChooser(movies, mrl.url(), mainWidget); - if(mc->exec() == QDialog::Accepted) + if(mc->exec() == TQDialog::Accepted) movieURL = mc->getSelection(); delete mc; } @@ -1263,18 +1263,18 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) * those starting with a different name than the movie, * prompt the user to select a sub */ - if (mime->name().contains("video")) + if (mime->name().tqcontains("video")) { kdDebug() << "PlayList: Check for subtitle files" << endl; - subtitleURL = QString::null; - QDir *d = new QDir(mrl.url().section('/',0,-2)); - QString filename = mrl.url().section('/',-1,-1); - subs = QStringList(); + subtitleURL = TQString(); + TQDir *d = new TQDir(mrl.url().section('/',0,-2)); + TQString filename = mrl.url().section('/',-1,-1); + subs = TQStringList(); //Do a case insensitive search for subs - QStringList dirListing = d->entryList(QDir::Files|QDir::NoSymLinks); //cache directory listing + TQStringList dirListing = d->entryList(TQDir::Files|TQDir::NoSymLinks); //cache directory listing bool matches = false; - QStringList::Iterator end(dirListing.end()); - for(QStringList::Iterator it = dirListing.begin(); it != end; ++it ) + TQStringList::Iterator end(dirListing.end()); + for(TQStringList::Iterator it = dirListing.begin(); it != end; ++it ) { if(startsWith(*it, filename.section('.',0,-2), false)) //If filenames (without extensions) match { @@ -1293,10 +1293,10 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) if((subs.count() > 1)) { subs.prepend(i18n("(no subtitles)")); subs.append(i18n("Other subtitle...")); - subtitleURL = QString::null; + subtitleURL = TQString(); SubtitleChooser *sc = new SubtitleChooser(subs, filename, mainWidget); - THERE: if(sc->exec() == QDialog::Accepted) + THERE: if(sc->exec() == TQDialog::Accepted) { if((sc->getSelection() != i18n("(no subtitles)")) && (sc->getSelection() != i18n("Other subtitle..."))) subtitleURL = d->path()+"/"+sc->getSelection(); @@ -1305,7 +1305,7 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) subtitleURL = KFileDialog::getOpenURL(d->path(), i18n("*.smi *.srt *.sub *.txt *.ssa *.asc|Subtitle Files\n*.*|All Files"), 0, i18n("Select Subtitle File")).path(); if(subtitleURL.isEmpty()) { - subtitleURL = QString::null; + subtitleURL = TQString(); goto THERE; } else //The user has selected another sub, so add this to the list @@ -1331,7 +1331,7 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) if (!subtitleURL.isNull()) { kdDebug() << "PlayList: Use subtitle file: " << subtitleURL << " for: " << mrl.url() << endl; - mrl.setCurrentSubtitle(subs.findIndex(subtitleURL)); + mrl.setCurrentSubtitle(subs.tqfindIndex(subtitleURL)); } } } /* if localFile() */ @@ -1343,25 +1343,25 @@ void PlayList::add(const QStringList& urlList, QListViewItem* after) if ( progress->wasCancelled() ) break; progress->progressBar()->setProgress(i+1); - progress->setLabel(QString::number(i+1) + " / " + QString::number(progress->progressBar()->totalSteps()) + " " + i18n("Files")); + progress->setLabel(TQString::number(i+1) + " / " + TQString::number(progress->progressBar()->totalSteps()) + " " + i18n("Files")); KApplication::kApplication()->processEvents(); } delete progress; if (m_random) createRandomList(); - updateStatus(); + updatetqStatus(); } -void PlayList::add(const QValueList<MRL>& mrlList, QListViewItem* after) +void PlayList::add(const TQValueList<MRL>& mrlList, TQListViewItem* after) { - QValueList<MRL>::ConstIterator end(mrlList.end()); - for (QValueList<MRL>::ConstIterator it = mrlList.begin(); it != end; ++it) + TQValueList<MRL>::ConstIterator end(mrlList.end()); + for (TQValueList<MRL>::ConstIterator it = mrlList.begin(); it != end; ++it) after = insertItem(after, *it); - updateStatus(); + updatetqStatus(); if (m_random) createRandomList(); } -void PlayList::slotPlayDirect(QListViewItem* item) +void PlayList::slotPlayDirect(TQListViewItem* item) { if (!item) return; @@ -1386,7 +1386,7 @@ void PlayList::createRandomList() m_randomList.clear(); m_currentRandomListEntry = 0; - QListViewItem* tmpItem = NULL; + TQListViewItem* tmpItem = NULL; tmpItem = m_list->firstChild(); if ( (tmpItem) && (!tmpItem->isVisible()) ) tmpItem = tmpItem->itemBelow(); @@ -1419,23 +1419,23 @@ void PlayList::clearList() m_playlistFilter->clear(); m_searchSelection = false; } - updateStatus(); + updatetqStatus(); m_currentEntry = NULL; m_currentRandomListEntry = -1; } -void PlayList::slotDropEvent(QDropEvent* dev, QListViewItem* after) +void PlayList::slotDropEvent(TQDropEvent* dev, TQListViewItem* after) { - QStringList urls ,newurls; + TQStringList urls ,newurls; m_list->setSorting(-1); - if (QUriDrag::decodeLocalFiles(dev, urls)) + if (TQUriDrag::decodeLocalFiles(dev, urls)) { if (urls.count()) { for (uint i=0; i < urls.count() ;i++) { - //KURL url(QUriDrag::unicodeUriToUri(urls[i])); + //KURL url(TQUriDrag::tqunicodeUriToUri(urls[i])); //newurls << url.path(-1); //kdDebug() << "PlayList: Dropped " << url.path() << endl; newurls << urls[i]; @@ -1445,7 +1445,7 @@ void PlayList::slotDropEvent(QDropEvent* dev, QListViewItem* after) } else { - QUriDrag::decodeToUnicodeUris(dev, urls); + TQUriDrag::decodeToUnicodeUris(dev, urls); if (urls.count()) add(urls, after); } @@ -1453,8 +1453,8 @@ void PlayList::slotDropEvent(QDropEvent* dev, QListViewItem* after) else if (strcmp(dev->format(), "text/x-moz-url") == 0) /* for mozilla drops */ { - QByteArray data = dev->encodedData("text/plain"); - QString md(data); + TQByteArray data = dev->tqencodedData("text/plain"); + TQString md(data); add(md, after); } } @@ -1464,7 +1464,7 @@ void PlayList::slotPreDropEvent() m_list->setSorting(-1); } -void PlayList::slotSetAlternateColor( const QColor& col ) +void PlayList::slotSetAlternateColor( const TQColor& col ) { m_list->setAlternateBackground( col ); m_altCol = col; @@ -1476,30 +1476,30 @@ void PlayList::useAlternateEncoding(bool useEncoding) m_useAlternateEncoding = useEncoding; } -void PlayList::setAlternateEncoding(const QString& encoding) +void PlayList::setAlternateEncoding(const TQString& encoding) { m_alternateEncoding = encoding; } -void PlayList::getMetaInfo(MRL& mrl, const QString& mimeName) +void PlayList::getMetaInfo(MRL& mrl, const TQString& mimeName) { KFileMetaInfo* metaInfo = NULL; KFileMetaInfoGroup metaGroup; uint m, n; metaInfo = new KFileMetaInfo(mrl.url(), mimeName); - QStringList groups = metaInfo->groups(); - QStringList keys; - QString title; - QString artist; - QString album; + TQStringList groups = metaInfo->groups(); + TQStringList keys; + TQString title; + TQString artist; + TQString album; - QTextCodec *altCodec; - QTextCodec *CodecUtf8; + TQTextCodec *altCodec; + TQTextCodec *CodecUtf8; - altCodec = QTextCodec::codecForName(m_alternateEncoding.ascii()); - CodecUtf8 = QTextCodec::codecForName("UTF-8"); + altCodec = TQTextCodec::codecForName(m_alternateEncoding.ascii()); + CodecUtf8 = TQTextCodec::codecForName("UTF-8"); //kdDebug() << "playlist: locale " << Codec->name << " index: " << m_alternateEncoding << endl; for (m = 0; m < groups.count(); m++) @@ -1512,13 +1512,13 @@ void PlayList::getMetaInfo(MRL& mrl, const QString& mimeName) //kdDebug() << "Metainfo-Key: " << keys[n] << endl; if (keys[n] == "Length") { - mrl.setLength(QTime().addSecs(metaGroup.item(keys[n]).value().toUInt())); + mrl.setLength(TQTime().addSecs(metaGroup.item(keys[n]).value().toUInt())); } if (keys[n] == "Title") { title = metaGroup.item(keys[n]).value().toString().simplifyWhiteSpace(); - if ((!title.isEmpty()) && (title.contains(QRegExp("\\w")) > 2) && (title.left(5).lower() != "track")) + if ((!title.isEmpty()) && (title.tqcontains(TQRegExp("\\w")) > 2) && (title.left(5).lower() != "track")) { if ((m_useAlternateEncoding) && (CodecUtf8->heuristicContentMatch(title.ascii(), title.length()) < 0)) { @@ -1581,7 +1581,7 @@ void PlayList::mergeMeta(const MRL& mrl) { if (!m_currentEntry) return; PlaylistItem* tmp = dynamic_cast<PlaylistItem*>(m_currentEntry); - bool addTime = (tmp->length() == QString("00:00:00")); + bool addTime = (tmp->length() == TQString("00:00:00")); if ((tmp) && (tmp->url() == mrl.url())) { tmp->setTitle(mrl.title()); @@ -1596,13 +1596,13 @@ void PlayList::mergeMeta(const MRL& mrl) } if (addTime) { - if (tmp->length().contains(':')); + if (tmp->length().tqcontains(':')); { m_playTime += timeStringToMs(tmp->length()); if (tmp->isVisible()) m_playTimeVisible += timeStringToMs(tmp->length()); - updateStatus(); + updatetqStatus(); } } @@ -1610,26 +1610,26 @@ void PlayList::mergeMeta(const MRL& mrl) setCover( mrl.artist().stripWhiteSpace(), mrl.album().stripWhiteSpace() ); } -GalleryDialog::GalleryDialog( QWidget *parent, GoogleFetcher *goog ) - : KDialogBase( parent, QString(i18n("Gallery")).latin1(), true, QString::null, Ok, NoDefault, true ) +GalleryDialog::GalleryDialog( TQWidget *tqparent, GoogleFetcher *goog ) + : KDialogBase( tqparent, TQString(i18n("Gallery")).latin1(), true, TQString(), Ok, NoDefault, true ) { google = goog; - hbox = new QHBox(this); - imageFrame = new QFrame( hbox ); + hbox = new TQHBox(this); + imageFrame = new TQFrame( hbox ); imageFrame->setFixedSize(500,500); setMainWidget(hbox); - connect( &next, SIGNAL(timeout()), this, SLOT(slotNext()) ); + connect( &next, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotNext()) ); next.start(1000,true); } void GalleryDialog::slotNext() { - QPixmap pix; + TQPixmap pix; bool end; actionButton(Ok)->setEnabled(false); loop: - QImage img = google->galleryNext( end ); + TQImage img = google->galleryNext( end ); if ( end ) { slotOk(); return; @@ -1661,7 +1661,7 @@ void PlayList::showGallery() { if ( google ) return; - QString s = getCurrent().artist().stripWhiteSpace(); + TQString s = getCurrent().artist().stripWhiteSpace(); if ( s.isEmpty() ) return; google = new GoogleFetcher( s, "", true ); @@ -1671,20 +1671,20 @@ void PlayList::showGallery() google = NULL; } -void PlayList::setCover( QString s1, QString s2, bool forceFetch ) +void PlayList::setCover( TQString s1, TQString s2, bool forceFetch ) { if ( s1.isEmpty() || s2.isEmpty() ) { coverFrame->setCoverPixmap( "" ); return; } - QString s = locateLocal("appdata", ""); - QImage img; - QPixmap pix; - QString fname = s1+"_"+s2; - fname = fname.replace( QChar( '/' ), "_" ); + TQString s = locateLocal("appdata", ""); + TQImage img; + TQPixmap pix; + TQString fname = s1+"_"+s2; + fname = fname.tqreplace( TQChar( '/' ), "_" ); fname = fname.upper(); fname = s+"covers/"+fname; - if ( !forceFetch && QFile( fname ).exists() ) + if ( !forceFetch && TQFile( fname ).exists() ) coverFrame->setCoverPixmap( fname ); else { if ( !forceFetch ) @@ -1697,8 +1697,8 @@ void PlayList::setCover( QString s1, QString s2, bool forceFetch ) delete google; google = NULL; } - if ( !QDir( s+"covers" ).exists() ) - QDir().mkdir( s+"covers" ); + if ( !TQDir( s+"covers" ).exists() ) + TQDir().mkdir( s+"covers" ); if ( !pix.isNull() ) { img = pix.convertToImage(); img.save( fname, coverImageFormat.latin1() ); @@ -1707,7 +1707,7 @@ void PlayList::setCover( QString s1, QString s2, bool forceFetch ) coverFrame->setCoverPixmap( fname ); } else if ( !forceFetch && m_cover ) { - QString path = locate("appdata", "nocover.png"); + TQString path = locate("appdata", "nocover.png"); if ( !path ) path = locate("data", "kaffeine/nocover.png"); KIO::file_copy( KURL::fromPathOrURL( path ), KURL::fromPathOrURL( fname ), -1, true ); @@ -1735,7 +1735,7 @@ void PlayList::slotSort(int section) void PlayList::slotRemoveSelected() { - QPtrList<QListViewItem> selected; + TQPtrList<TQListViewItem> selected; if (m_currentEntry) if (m_currentEntry->isSelected()) @@ -1751,7 +1751,7 @@ void PlayList::slotRemoveSelected() { // kdDebug() << "Remove " << selected.at(i)->text(TITLE_COLUMN) << "\n"; item = dynamic_cast<PlaylistItem *>(selected.at(i)); - if (item->length().contains(':')) + if (item->length().tqcontains(':')) { m_playTime -= timeStringToMs(item->length()); m_playTimeVisible -= timeStringToMs(item->length()); @@ -1762,26 +1762,26 @@ void PlayList::slotRemoveSelected() } if (m_random) createRandomList(); - updateStatus(); + updatetqStatus(); } -void PlayList::updateStatus() +void PlayList::updatetqStatus() { - QString status; + TQString status; if (isQueueMode()) { - QTime total; - QValueList<MRL>::ConstIterator end(m_queue.end()); - for (QValueList<MRL>::ConstIterator it = m_queue.begin(); it != end; ++it) - total = total.addSecs(QTime().secsTo((*it).length())); - status = i18n("Queue: %1 Entries, Playtime: %2").arg(m_queue.count()).arg(total.toString("h:mm:ss")); + TQTime total; + TQValueList<MRL>::ConstIterator end(m_queue.end()); + for (TQValueList<MRL>::ConstIterator it = m_queue.begin(); it != end; ++it) + total = total.addSecs(TQTime().secsTo((*it).length())); + status = i18n("Queue: %1 Entries, Playtime: %2").tqarg(m_queue.count()).tqarg(total.toString("h:mm:ss")); } else { - //status = i18n("Entries: %1, Playtime: %2 (Total: %3, %4)").arg(QString::number(m_countVisible)).arg(msToTimeString(m_playTimeVisible)).arg(QString::number(m_list->childCount())).arg(msToTimeString(m_playTime)); + //status = i18n("Entries: %1, Playtime: %2 (Total: %3, %4)").tqarg(TQString::number(m_countVisible)).tqarg(msToTimeString(m_playTimeVisible)).tqarg(TQString::number(m_list->childCount())).tqarg(msToTimeString(m_playTime)); - status = i18n("Entries: %1, Playtime: %2").arg(QString::number(m_countVisible)).arg(msToTimeString(m_playTimeVisible)); + status = i18n("Entries: %1, Playtime: %2").tqarg(TQString::number(m_countVisible)).tqarg(msToTimeString(m_playTimeVisible)); } emit statusBarMessage(status); } @@ -1790,21 +1790,21 @@ void PlayList::slotNewList() { m_list->setSorting(-1); saveCurrentPlaylist(); - m_playlistSelector->insertItem(i18n("Playlist") + QString::number(m_nextPlaylistNumber), 0); + m_playlistSelector->insertItem(i18n("Playlist") + TQString::number(m_nextPlaylistNumber), 0); m_nextPlaylistNumber++; m_playlistSelector->setCurrentItem(0); m_currentPlaylist = 0; clearList(); } -void PlayList::setPlaylist(const QString& name, bool clear) +void PlayList::setPlaylist(const TQString& name, bool clear) { saveCurrentPlaylist(); if (clear) clearList(); int index = 0; - if (m_playlistSelector->listBox()->findItem(name)) - index = m_playlistSelector->listBox()->index(m_playlistSelector->listBox()->findItem(name)); + if (m_playlistSelector->listBox()->tqfindItem(name)) + index = m_playlistSelector->listBox()->index(m_playlistSelector->listBox()->tqfindItem(name)); else m_playlistSelector->insertItem(name, 0); m_playlistSelector->setCurrentItem(index); @@ -1814,7 +1814,7 @@ void PlayList::setPlaylist(const QString& name, bool clear) void PlayList::nextPlaylist() { int nextPlaylist = m_playlistSelector->currentItem(); - QString pl = NULL; + TQString pl = NULL; do { nextPlaylist++; @@ -1829,21 +1829,21 @@ void PlayList::nextPlaylist() m_playlistSelector->setCurrentItem(nextPlaylist); m_currentPlaylist = nextPlaylist; add(m_playlistDirectory + pl + ".kaffeine", NULL); - if (mainWidget->parentWidget()) - mainWidget->parentWidget()->setFocus(); + if (mainWidget->tqparentWidget()) + mainWidget->tqparentWidget()->setFocus(); } void PlayList::slotPlaylistActivated(int index) { kdDebug() << "PlayList: Switch to playlist: " << m_playlistSelector->text(index) << endl; - QString pl = m_playlistSelector->text(index); + TQString pl = m_playlistSelector->text(index); saveCurrentPlaylist(); clearList(); m_currentPlaylist = index; add(m_playlistDirectory + pl + ".kaffeine", NULL); - if (mainWidget->parentWidget()) - mainWidget->parentWidget()->setFocus(); + if (mainWidget->tqparentWidget()) + mainWidget->tqparentWidget()->setFocus(); /* if (!isQueueMode()) { getCurrent(); @@ -1851,16 +1851,16 @@ void PlayList::slotPlaylistActivated(int index) } */ } -void PlayList::slotNewPlaylistName(const QString& text) +void PlayList::slotNewPlaylistName(const TQString& text) { if ((text.isEmpty()) || (text == m_playlistSelector->text(m_currentPlaylist))) return; - if (m_playlistSelector->listBox()->findItem(text)) + if (m_playlistSelector->listBox()->tqfindItem(text)) { kdDebug() << "PlayList: Name still exists!" << endl; return; } - QString oldPl = m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine"; + TQString oldPl = m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine"; kdDebug() << "Playlist: removing file: " << oldPl << endl; if (!KIO::NetAccess::del(oldPl, mainWidget)) kdError() << "Playlist: " << KIO::NetAccess::lastErrorString() << endl; @@ -1868,28 +1868,28 @@ void PlayList::slotNewPlaylistName(const QString& text) kdDebug() << "PlayList: Set playlist name to: " << text << endl; m_playlistSelector->changeItem(text, m_currentPlaylist); saveCurrentPlaylist(); - if (mainWidget->parentWidget()) - mainWidget->parentWidget()->setFocus(); + if (mainWidget->tqparentWidget()) + mainWidget->tqparentWidget()->setFocus(); } -QString PlayList::queryCurrentPlaylist() +TQString PlayList::queryCurrentPlaylist() { - QString pl = m_playlistSelector->text(m_currentPlaylist); + TQString pl = m_playlistSelector->text(m_currentPlaylist); return (m_playlistDirectory + pl + ".kaffeine"); } void PlayList::saveCurrentPlaylist() { - QString pl = m_playlistSelector->text(m_currentPlaylist); + TQString pl = m_playlistSelector->text(m_currentPlaylist); savePlaylist(m_playlistDirectory + pl + ".kaffeine"); } void PlayList::removeCurrentPlaylist() { - int code = KMessageBox::warningContinueCancel(0, i18n("Remove '%1' from list and from disk?").arg(m_playlistSelector->text(m_currentPlaylist)),QString::null,KStdGuiItem::del()); + int code = KMessageBox::warningContinueCancel(0, i18n("Remove '%1' from list and from disk?").tqarg(m_playlistSelector->text(m_currentPlaylist)),TQString(),KStdGuiItem::del()); if (code == KMessageBox::Continue) { - QString pl = m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine"; + TQString pl = m_playlistDirectory + m_playlistSelector->text(m_currentPlaylist) + ".kaffeine"; if (!KIO::NetAccess::del(pl, mainWidget)) kdError() << "Playlist: " << KIO::NetAccess::lastErrorString() << endl; @@ -1900,22 +1900,22 @@ void PlayList::removeCurrentPlaylist() } } -void PlayList::loadPlaylist(const QString& pl) +void PlayList::loadPlaylist(const TQString& pl) { saveCurrentPlaylist(); - QString plName = KURL(pl).fileName(); + TQString plName = KURL(pl).fileName(); plName = plName.remove(".kaffeine", false); - if (m_playlistSelector->listBox()->findItem(plName)) + if (m_playlistSelector->listBox()->tqfindItem(plName)) { - QString plNewName = NULL; + TQString plNewName = NULL; while (true) { bool ok; - plNewName = QInputDialog::getText(i18n("Playlist Name Already Exists"), - i18n("Enter different playlist name:"), QLineEdit::Normal, plName, &ok); + plNewName = TQInputDialog::getText(i18n("Playlist Name Already Exists"), + i18n("Enter different playlist name:"), TQLineEdit::Normal, plName, &ok); if ((ok) && (!plNewName.isEmpty())) { - if (m_playlistSelector->listBox()->findItem(plNewName)) + if (m_playlistSelector->listBox()->tqfindItem(plNewName)) continue; else break; @@ -1939,18 +1939,18 @@ void PlayList::loadPlaylist(const QString& pl) * save xml playlist ******************************************/ -void PlayList::savePlaylist(const QString& pl) +void PlayList::savePlaylist(const TQString& pl) { - QDomDocument doc("playlist"); - doc.setContent(QString("<!DOCTYPE XMLPlaylist>")); - QDomElement root = doc.createElement("playlist"); + TQDomDocument doc("playlist"); + doc.setContent(TQString("<!DOCTYPE XMLPlaylist>")); + TQDomElement root = doc.createElement("playlist"); root.setAttribute("client", "kaffeine"); doc.appendChild(root); - QDomElement entry; + TQDomElement entry; PlaylistItem * tmp = NULL; - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); while (it.current()) { tmp = dynamic_cast<PlaylistItem *>(it.current()); @@ -1969,22 +1969,22 @@ void PlayList::savePlaylist(const QString& pl) if(!(tmp->subtitles().isEmpty())) { - QString subList; + TQString subList; for(unsigned int i=0; i<tmp->subtitles().count(); i++) subList += tmp->subtitles()[i] + "&"; entry.setAttribute("subs", subList); } - entry.setAttribute("currentSub", QString::number(tmp->currentSubtitle())); + entry.setAttribute("currentSub", TQString::number(tmp->currentSubtitle())); root.appendChild(entry); ++it; } - QFile file(pl); + TQFile file(pl); if (!file.open(IO_WriteOnly)) return; - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << doc.toString(); @@ -1994,14 +1994,14 @@ void PlayList::savePlaylist(const QString& pl) /**********************/ -void PlayList::exportM3UPlaylist(const QString& pl) +void PlayList::exportM3UPlaylist(const TQString& pl) { PlaylistItem * tmp = NULL; - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); int length = -1; - QString m3uList = "#EXTM3U\n"; + TQString m3uList = "#EXTM3U\n"; while (it.current()) { @@ -2011,7 +2011,7 @@ void PlayList::exportM3UPlaylist(const QString& pl) if ( length == 0 ) length = -1; - m3uList.append("#EXTINF:" + QString::number(length) + "," + tmp->title()); + m3uList.append("#EXTINF:" + TQString::number(length) + "," + tmp->title()); if (tmp->artist().isEmpty() ) m3uList.append("\n"); else @@ -2020,26 +2020,26 @@ void PlayList::exportM3UPlaylist(const QString& pl) ++it; } - QFile file(pl); + TQFile file(pl); if (!file.open(IO_WriteOnly)) return; - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << m3uList; file.close(); } -void PlayList::exportPLSPlaylist(const QString& pl) +void PlayList::exportPLSPlaylist(const TQString& pl) { PlaylistItem * tmp = NULL; - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); int counter = 0; int length = -1; - QString plsList = "[playlist]\n"; + TQString plsList = "[playlist]\n"; while (it.current()) { @@ -2052,24 +2052,24 @@ void PlayList::exportPLSPlaylist(const QString& pl) length = -1; } - plsList.append("File" + QString::number(counter) + "=" + tmp->url() + "\n"); - plsList.append("Title" + QString::number(counter) + "=" + tmp->title()); + plsList.append("File" + TQString::number(counter) + "=" + tmp->url() + "\n"); + plsList.append("Title" + TQString::number(counter) + "=" + tmp->title()); if (tmp->artist().isEmpty() ) plsList.append("\n"); else plsList.append(" - " + tmp->artist() + "\n"); - plsList.append("Length" + QString::number(counter) + "=" + QString::number(length) + "\n"); + plsList.append("Length" + TQString::number(counter) + "=" + TQString::number(length) + "\n"); ++it; } - plsList.append("NumberOfEntries=" + QString::number(counter) + "\n"); + plsList.append("NumberOfEntries=" + TQString::number(counter) + "\n"); plsList.append("Version=2"); - QFile file(pl); + TQFile file(pl); if (!file.open(IO_WriteOnly)) return; - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << plsList; @@ -2082,22 +2082,22 @@ void PlayList::resetSearch() slotFindText( "" ); } -void PlayList::slotFindText(const QString& text) +void PlayList::slotFindText(const TQString& text) { if (text == i18n("Filter")) return; - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); m_playTimeVisible = 0; m_countVisible = 0; PlaylistItem* tmp = NULL; while ( it.current() ) { tmp = dynamic_cast<PlaylistItem *>(it.current()); - if (text.isEmpty() || tmp->title().contains(text, false) || tmp->url().contains(text, false) - || tmp->artist().contains(text, false) || tmp->album().contains(text, false) ) + if (text.isEmpty() || tmp->title().tqcontains(text, false) || tmp->url().tqcontains(text, false) + || tmp->artist().tqcontains(text, false) || tmp->album().tqcontains(text, false) ) { tmp->setVisible(true); - if (tmp->length().contains(':')) + if (tmp->length().tqcontains(':')) m_playTimeVisible += timeStringToMs(tmp->length()); m_countVisible++; @@ -2107,7 +2107,7 @@ void PlayList::slotFindText(const QString& text) tmp->setVisible(false); if (tmp == m_currentEntry) { - tmp->setPixmap(TITLE_COLUMN, QPixmap()); + tmp->setPixmap(TITLE_COLUMN, TQPixmap()); m_currentEntry = NULL; m_currentRandomListEntry = -1; } @@ -2121,7 +2121,7 @@ void PlayList::slotFindText(const QString& text) m_searchSelection = true; if (m_random) createRandomList(); - updateStatus(); + updatetqStatus(); } @@ -2135,27 +2135,27 @@ void PlayList::slotCut() void PlayList::slotPaste() { - QPtrList<QListViewItem> selected; + TQPtrList<TQListViewItem> selected; selected = m_list->selectedItems(); - QListViewItem* lastSelected = NULL; + TQListViewItem* lastSelected = NULL; if (selected.count()) lastSelected = selected.at(selected.count() - 1); else lastSelected = m_list->lastItem(); - QStrList list; + TQStrList list; - if (QUriDrag::decode(QApplication::clipboard()->data(), list)) + if (TQUriDrag::decode(TQApplication::tqclipboard()->data(), list)) { - QStringList urls; - for (QStrListIterator it(list); *it; ++it) - urls.append(QUriDrag::uriToUnicodeUri(*it)); + TQStringList urls; + for (TQStrListIterator it(list); *it; ++it) + urls.append(TQUriDrag::uriToUnicodeUri(*it)); add(urls, lastSelected); return; } /** try to decode as text **/ - QString text; - if (QTextDrag::decode(QApplication::clipboard()->data(), text)) + TQString text; + if (TQTextDrag::decode(TQApplication::tqclipboard()->data(), text)) { add(text, lastSelected); } @@ -2163,22 +2163,22 @@ void PlayList::slotPaste() void PlayList::slotCopy() { - QPtrList<QListViewItem> selected; + TQPtrList<TQListViewItem> selected; selected = m_list->selectedItems(); - QStrList urlList; + TQStrList urlList; for (uint i=0; i<selected.count(); i++) { - urlList.append(QUriDrag::unicodeUriToUri(dynamic_cast<PlaylistItem *>(selected.at(i))->url())); + urlList.append(TQUriDrag::tqunicodeUriToUri(dynamic_cast<PlaylistItem *>(selected.at(i))->url())); } - QApplication::clipboard()->setData(new QUriDrag(urlList)); + TQApplication::tqclipboard()->setData(new TQUriDrag(urlList)); } void PlayList::slotSelectAll() { - QListViewItemIterator it(m_list); + TQListViewItemIterator it(m_list); while (it.current()) { if ((*it)->isVisible()) @@ -2189,10 +2189,10 @@ void PlayList::slotSelectAll() void PlayList::slotPlaylistFromSelected() { - QPtrList<QListViewItem> selected; + TQPtrList<TQListViewItem> selected; selected = m_list->selectedItems(); - QValueList<MRL> mrlList; + TQValueList<MRL> mrlList; for (uint i=0; i<selected.count(); i++) { @@ -2209,15 +2209,15 @@ void PlayList::slotPlaylistFromSelected() void PlayList::slotAddToQueue(MRL mrl) { m_queue.append(mrl); - updateStatus(); + updatetqStatus(); } /**** helper ****/ -QString PlayList::msToTimeString(int msec) +TQString PlayList::msToTimeString(int msec) { /* - QTime t; + TQTime t; t = t.addMSecs(msec); return t.toString("h:mm:ss"); */ @@ -2226,8 +2226,8 @@ QString PlayList::msToTimeString(int msec) int min; int sec; int my_msec=msec; - QString tmp; - QString t; + TQString tmp; + TQString t; msec = msec/1000; //sec hours = msec/3600; @@ -2254,10 +2254,10 @@ QString PlayList::msToTimeString(int msec) return t; } -int PlayList::timeStringToMs(const QString& timeString) +int PlayList::timeStringToMs(const TQString& timeString) { int sec = 0; - QStringList tokens = QStringList::split(':',timeString); + TQStringList tokens = TQStringList::split(':',timeString); bool ok = false; sec += tokens[0].toInt(&ok)*3600; //hours @@ -2274,7 +2274,7 @@ int PlayList::timeStringToMs(const QString& timeString) return 0; } -bool PlayList::endsWith(QString s1, QString s2, bool caseSensitive ) +bool PlayList::endsWith(TQString s1, TQString s2, bool caseSensitive ) { if ( s1.isNull() || s2.isNull() ) return false; @@ -2297,7 +2297,7 @@ bool PlayList::endsWith(QString s1, QString s2, bool caseSensitive ) return true; } -bool PlayList::startsWith(QString s1, QString s2, bool caseSensitive ) +bool PlayList::startsWith(TQString s1, TQString s2, bool caseSensitive ) { if ( s1.isNull() || s2.isNull() ) return false; @@ -2322,13 +2322,13 @@ bool PlayList::startsWith(QString s1, QString s2, bool caseSensitive ) return true; } -SubtitleChooser::SubtitleChooser(QStringList values, QString filename,QWidget *parent, const char * name) : - KDialogBase(parent,name,true,i18n("Select Subtitle"), Ok|Cancel, Ok, true) +SubtitleChooser::SubtitleChooser(TQStringList values, TQString filename,TQWidget *tqparent, const char * name) : + KDialogBase(tqparent,name,true,i18n("Select Subtitle"), Ok|Cancel, Ok, true) { - QVBox *page = makeVBoxMainWidget(); - QLabel *label = new QLabel(page); + TQVBox *page = makeVBoxMainWidget(); + TQLabel *label = new TQLabel(page); label->setText("<qt>" + i18n("Media file:") + " <b>" + filename + "</b></qt>"); - table = new QListBox(page); + table = new TQListBox(page); this->setMinimumSize(300,200); table->setFocus(); @@ -2338,18 +2338,18 @@ SubtitleChooser::SubtitleChooser(QStringList values, QString filename,QWidget *p SubtitleChooser::~SubtitleChooser(){} -QString SubtitleChooser::getSelection() +TQString SubtitleChooser::getSelection() { return table->selectedItem()->text(); } -MovieChooser::MovieChooser(QStringList values, QString filename,QWidget *parent, const char * name) : - KDialogBase(parent,name,true,i18n("Select Movie"), Ok|Cancel, Ok, true) +MovieChooser::MovieChooser(TQStringList values, TQString filename,TQWidget *tqparent, const char * name) : + KDialogBase(tqparent,name,true,i18n("Select Movie"), Ok|Cancel, Ok, true) { - QVBox *page = makeVBoxMainWidget(); - QLabel *label = new QLabel(page); + TQVBox *page = makeVBoxMainWidget(); + TQLabel *label = new TQLabel(page); label->setText("<qt> " + i18n("Subtitle file:") + " <b>" + filename + "</b></qt>"); - table = new QListBox(page); + table = new TQListBox(page); this->setMinimumSize(450,200); table->setFocus(); @@ -2359,7 +2359,7 @@ MovieChooser::MovieChooser(QStringList values, QString filename,QWidget *parent, MovieChooser::~MovieChooser(){} -QString MovieChooser::getSelection() +TQString MovieChooser::getSelection() { return table->selectedItem()->text(); } diff --git a/kaffeine/src/input/audiobrowser/playlist.h b/kaffeine/src/input/audiobrowser/playlist.h index 41df120..08c5a9c 100644 --- a/kaffeine/src/input/audiobrowser/playlist.h +++ b/kaffeine/src/input/audiobrowser/playlist.h @@ -28,12 +28,12 @@ #include <kaction.h> #include <kstdaction.h> -#include <qwidget.h> -#include <qptrlist.h> -#include <qvbox.h> -#include <qsplitter.h> -#include <qpainter.h> -#include <qtoolbutton.h> +#include <tqwidget.h> +#include <tqptrlist.h> +#include <tqvbox.h> +#include <tqsplitter.h> +#include <tqpainter.h> +#include <tqtoolbutton.h> #include "urllistview.h" #include "kaffeineinput.h" @@ -41,12 +41,12 @@ class UrlListView; class MRL; class KURL; -class QListViewItem; -class QString; -class QLabel; -class QColor; -class QDropEvent; -class QPixmap; +class TQListViewItem; +class TQString; +class TQLabel; +class TQColor; +class TQDropEvent; +class TQPixmap; class KLineEdit; class KComboBox; class KURLComboBox; @@ -59,38 +59,40 @@ class GoogleFetcher; class GalleryDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GalleryDialog( QWidget *parent, GoogleFetcher *goog ); + GalleryDialog( TQWidget *tqparent, GoogleFetcher *goog ); protected slots: void slotOk(); void slotNext(); private: - QFrame *imageFrame; + TQFrame *imageFrame; GoogleFetcher *google; - QTimer next; - QHBox *hbox; + TQTimer next; + TQHBox *hbox; }; -class RollTitle : public QLabel +class RollTitle : public TQLabel { Q_OBJECT + TQ_OBJECT public: - RollTitle( QWidget *parent ); + RollTitle( TQWidget *tqparent ); void setTitle( MRL mrl ); private: - void setTitle( QString t ); - QTimer titleTimer; - QPixmap titlePix; - QColor back, fore; + void setTitle( TQString t ); + TQTimer titleTimer; + TQPixmap titlePix; + TQColor back, fore; int titleOffset; - QString title; + TQString title; protected: - void paintEvent ( QPaintEvent * ); + void paintEvent ( TQPaintEvent * ); private slots: void rollTitle(); @@ -98,22 +100,23 @@ private slots: -class CoverFrame : public QFrame +class CoverFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CoverFrame( QWidget *parent ); + CoverFrame( TQWidget *tqparent ); ~CoverFrame(); - void setCoverPixmap( const QString &path ); + void setCoverPixmap( const TQString &path ); protected: - void mousePressEvent( QMouseEvent *e ); + void mousePressEvent( TQMouseEvent *e ); private: - void popup( const QPixmap &pix ) const; - QString imagePath; - QPixmap noCoverPix; + void popup( const TQPixmap &pix ) const; + TQString imagePath; + TQPixmap noCoverPix; signals: void changeCurrentCover(); @@ -125,24 +128,25 @@ signals: class PlayList : public KaffeineInput { Q_OBJECT + TQ_OBJECT public: - PlayList(QWidget *parent, QObject *objParent, const char *name=0); + PlayList(TQWidget *tqparent, TQObject *objParent, const char *name=0); ~PlayList(); // Reimplemented from KaffeineInput public: - QWidget *wantPlayerWindow(); - QWidget *inputMainWidget(); + TQWidget *wantPlayerWindow(); + TQWidget *inputMainWidget(); void mergeMeta(const MRL&); bool nextTrack( MRL& ); bool previousTrack( MRL& ); bool currentTrack( MRL& ); bool trackNumber( int, MRL& ); bool playbackFinished( MRL& ); - void getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ); + void getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ); void togglePanel(); - bool execTarget( const QString& ); + bool execTarget( const TQString& ); void saveConfig(); bool showPlayer() {return !m_showPlayer->isChecked();} //*************************************** @@ -151,24 +155,24 @@ public: MRL getCurrent(); /* get current playlist entry */ MRL getNext(); MRL getEntryWithNumber(int number); - void setCurrentEntry(QListViewItem*, bool playIcon = true); + void setCurrentEntry(TQListViewItem*, bool playIcon = true); - QListViewItem* getLast(); - QListViewItem* getFirst(); - QListViewItem* findByURL(const QString&); + TQListViewItem* getLast(); + TQListViewItem* getFirst(); + TQListViewItem* findByURL(const TQString&); /* insert a KURL(list) after a specific item */ - void add(const QString& url, QListViewItem* after); - void add(const QStringList& urls, QListViewItem* after); - void add(const QValueList<MRL>&, QListViewItem* after); + void add(const TQString& url, TQListViewItem* after); + void add(const TQStringList& urls, TQListViewItem* after); + void add(const TQValueList<MRL>&, TQListViewItem* after); bool isQueueMode() { return m_queue.count(); } - void setPlaylist(const QString& name, bool clear = false); + void setPlaylist(const TQString& name, bool clear = false); void nextPlaylist(); void removeCurrentPlaylist(); void saveCurrentPlaylist(); - QString queryCurrentPlaylist(); + TQString queryCurrentPlaylist(); void loadConfig(KConfig*); void saveConfig(KConfig*); void clearList(); @@ -177,32 +181,32 @@ public: void setRandom(bool); void useAlternateEncoding(bool); - void setAlternateEncoding(const QString&); + void setAlternateEncoding(const TQString&); - void setFileFilter(const QString& filter); - void savePlaylist(const QString&); - void loadPlaylist(const QString&); + void setFileFilter(const TQString& filter); + void savePlaylist(const TQString&); + void loadPlaylist(const TQString&); - void exportM3UPlaylist(const QString&); - void exportPLSPlaylist(const QString&); + void exportM3UPlaylist(const TQString&); + void exportPLSPlaylist(const TQString&); const bool getReadMetaOnLoading() const { return m_metaOnLoading; } - QVBox *mainWidget; - QVBox *playerBox; + TQVBox *mainWidget; + TQVBox *playerBox; public slots: void slotToggleShuffle(); protected: - void closeEvent(QCloseEvent*); + void closeEvent(TQCloseEvent*); private slots: void slotNewList(); void slotSetReadMetaOnLoading(bool read) { m_metaOnLoading = read; } - void slotSetAlternateColor(const QColor&); - void slotPlayDirect(QListViewItem* item); /* doubleclick */ - void slotDropEvent(QDropEvent*, QListViewItem*); + void slotSetAlternateColor(const TQColor&); + void slotPlayDirect(TQListViewItem* item); /* doubleclick */ + void slotDropEvent(TQDropEvent*, TQListViewItem*); void slotPreDropEvent(); void slotCut(); void slotPaste(); @@ -211,10 +215,10 @@ private slots: void slotPlaylistFromSelected(); void slotAddToQueue(MRL); void slotRemoveSelected(); - void slotFindText(const QString&); + void slotFindText(const TQString&); void slotSort(int); void slotPlaylistActivated(int); - void slotNewPlaylistName(const QString&); + void slotNewPlaylistName(const TQString&); void slotRepeat(); void slotShuffle(); void slotAutoCover(); @@ -222,52 +226,52 @@ private slots: void slotPlaylistLoad(); void slotPlaylistSaveAs(); void slotPlaylistRemove(); - void setCover( QString s1, QString s2, bool forceFetch=false ); + void setCover( TQString s1, TQString s2, bool forceFetch=false ); void chooseCurrentCover(); void showGallery(); void startPlaylist(); void fileSelected( const KFileItem* ); - void setBrowserURL( const QString& ); + void setBrowserURL( const TQString& ); void setBrowserURL( const KURL& ); void browserURLChanged( const KURL& ); void slotClearList(); void resetSearch(); private: - QListViewItem* insertItem(QListViewItem* after, const MRL&); - void updateStatus(); + TQListViewItem* insertItem(TQListViewItem* after, const MRL&); + void updatetqStatus(); void createRandomList(); - void getMetaInfo(MRL& mrl, const QString& mimeName); + void getMetaInfo(MRL& mrl, const TQString& mimeName); void setupActions(); /* helpers */ - static QString msToTimeString(int); - static int timeStringToMs(const QString&); - static bool endsWith(QString, QString, bool); - static bool startsWith(QString, QString, bool); + static TQString msToTimeString(int); + static int timeStringToMs(const TQString&); + static bool endsWith(TQString, TQString, bool); + static bool startsWith(TQString, TQString, bool); private: - QColor m_altCol; + TQColor m_altCol; KComboBox* m_playlistSelector; - QToolButton *searchBtn; + TQToolButton *searchBtn; KLineEdit* m_playlistFilter; int m_nextPlaylistNumber; - QString m_playlistDirectory; + TQString m_playlistDirectory; int m_currentPlaylist; KURLComboBox *browserComb; - QSplitter *hSplit, *vSplit; - QVBox *panel; - QWidget *playlist; + TQSplitter *hSplit, *vSplit; + TQVBox *panel; + TQWidget *playlist; KDirOperator *fileBrowser; KFileIconView *view; CoverFrame *coverFrame; GoogleFetcher *google; - QString coverImageFormat; + TQString coverImageFormat; RollTitle *roller; KToggleAction *m_repeat, *m_shuffle, *m_autoCover, *m_showPlayer; - QValueList<MRL> m_queue; + TQValueList<MRL> m_queue; uint m_playTime; uint m_playTimeVisible; @@ -278,59 +282,61 @@ private: bool m_sortAscending; UrlListView* m_list; - QListViewItem* m_currentEntry; + TQListViewItem* m_currentEntry; MRL m_currentEntryMRL; - QString m_fileFilter; - QString m_metaInfoString; - QString m_lastPlaylist; + TQString m_fileFilter; + TQString m_metaInfoString; + TQString m_lastPlaylist; - QPtrList<QListViewItem> m_randomList; + TQPtrList<TQListViewItem> m_randomList; int m_currentRandomListEntry; - QPixmap m_isCurrentEntry; - QPixmap m_cdPixmap; + TQPixmap m_isCurrentEntry; + TQPixmap m_cdPixmap; bool m_endless; bool m_random; bool m_cover; bool m_useAlternateEncoding; - QString m_alternateEncoding; + TQString m_alternateEncoding; signals: - void signalRequestForAudioCD(const QString&); - void signalRequestForDVD(const QString&); - void signalRequestForVCD(const QString&); + void signalRequestForAudioCD(const TQString&); + void signalRequestForDVD(const TQString&); + void signalRequestForVCD(const TQString&); }; -class QListBox; -class QStringList; +class TQListBox; +class TQStringList; class SubtitleChooser : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SubtitleChooser(QStringList, QString, QWidget *parent=0, const char *name = 0); + SubtitleChooser(TQStringList, TQString, TQWidget *tqparent=0, const char *name = 0); virtual ~SubtitleChooser(); - QString getSelection(); + TQString getSelection(); private: - QListBox *table; + TQListBox *table; }; class MovieChooser : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MovieChooser(QStringList, QString, QWidget *parent=0, const char *name = 0); + MovieChooser(TQStringList, TQString, TQWidget *tqparent=0, const char *name = 0); virtual ~MovieChooser(); - QString getSelection(); + TQString getSelection(); private: - QListBox *table; + TQListBox *table; }; #endif /* PLAYLIST_H */ diff --git a/kaffeine/src/input/audiobrowser/playlistitem.cpp b/kaffeine/src/input/audiobrowser/playlistitem.cpp index 3b5fc05..813f5c2 100644 --- a/kaffeine/src/input/audiobrowser/playlistitem.cpp +++ b/kaffeine/src/input/audiobrowser/playlistitem.cpp @@ -19,16 +19,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdebug.h> #include "mrl.h" #include "playlistitem.h" -PlaylistItem::PlaylistItem(KListView *list, KListViewItem *after, const QString& url, const QString& mime, const QString& title, - const QString& length, const QString& artist, const QString& album, const QString& year, const QString& genre, - const QString& track, const QStringList& subtitles, int currentSubtitle) : +PlaylistItem::PlaylistItem(KListView *list, KListViewItem *after, const TQString& url, const TQString& mime, const TQString& title, + const TQString& length, const TQString& artist, const TQString& album, const TQString& year, const TQString& genre, + const TQString& track, const TQStringList& subtitles, int currentSubtitle) : KListViewItem(list, after, mime, title, artist, album, track, length), m_url(url), m_year(year), m_genre(genre), m_subtitles(subtitles), m_currentSubtitle(currentSubtitle), isCurrent(false) {} @@ -44,55 +44,55 @@ PlaylistItem::~PlaylistItem() {} MRL PlaylistItem::toMRL() const { - return MRL(url(), title(), stringToTime(length()), mime(), artist(), album(), track(), year(), genre(), QString::null, subtitles(), currentSubtitle()); + return MRL(url(), title(), stringToTime(length()), mime(), artist(), album(), track(), year(), genre(), TQString(), subtitles(), currentSubtitle()); } -const QString& PlaylistItem::url() const +const TQString& PlaylistItem::url() const { return m_url; } -QString PlaylistItem::mime() const +TQString PlaylistItem::mime() const { return this->text(MIME_COLUMN); } -QString PlaylistItem::title() const +TQString PlaylistItem::title() const { return this->text(TITLE_COLUMN); } -QString PlaylistItem::artist() const +TQString PlaylistItem::artist() const { return this->text(ARTIST_COLUMN); } -QString PlaylistItem::album() const +TQString PlaylistItem::album() const { return this->text(ALBUM_COLUMN); } -QString PlaylistItem::track() const +TQString PlaylistItem::track() const { return this->text(TRACK_COLUMN); } -QString PlaylistItem::year() const +TQString PlaylistItem::year() const { return m_year; } -QString PlaylistItem::genre() const +TQString PlaylistItem::genre() const { return m_genre; } -QString PlaylistItem::length() const +TQString PlaylistItem::length() const { return this->text(LENGTH_COLUMN); } -const QStringList& PlaylistItem::subtitles() const +const TQStringList& PlaylistItem::subtitles() const { return m_subtitles; } @@ -102,57 +102,57 @@ int PlaylistItem::currentSubtitle() const return m_currentSubtitle; } -void PlaylistItem::setUrl(const QString& url) +void PlaylistItem::setUrl(const TQString& url) { m_url = url; } -void PlaylistItem::setMime(const QString& mime) +void PlaylistItem::setMime(const TQString& mime) { this->setText(MIME_COLUMN, mime); } -void PlaylistItem::setTitle(const QString& title) +void PlaylistItem::setTitle(const TQString& title) { this->setText(TITLE_COLUMN, title); } -void PlaylistItem::setArtist(const QString& artist) +void PlaylistItem::setArtist(const TQString& artist) { this->setText(ARTIST_COLUMN, artist); } -void PlaylistItem::setAlbum(const QString& album) +void PlaylistItem::setAlbum(const TQString& album) { this->setText(ALBUM_COLUMN, album); } -void PlaylistItem::setTrack(const QString& track) +void PlaylistItem::setTrack(const TQString& track) { this->setText(TRACK_COLUMN, track); } -void PlaylistItem::setYear(const QString& year) +void PlaylistItem::setYear(const TQString& year) { m_year = year; } -void PlaylistItem::setGenre(const QString& genre) +void PlaylistItem::setGenre(const TQString& genre) { m_genre = genre; } -void PlaylistItem::setLength(const QString& length) +void PlaylistItem::setLength(const TQString& length) { this->setText(LENGTH_COLUMN, length); } -void PlaylistItem::setSubtitles(const QStringList& subs) +void PlaylistItem::setSubtitles(const TQStringList& subs) { m_subtitles = subs; } -void PlaylistItem::addSubtitle(const QString& sub) +void PlaylistItem::addSubtitle(const TQString& sub) { /* This will add subtitle & set it to the current one */ for (uint i=0; i < m_subtitles.count(); i++) { @@ -170,27 +170,27 @@ void PlaylistItem::setCurrentSubtitle(int sub) m_currentSubtitle = sub; } -QTime PlaylistItem::stringToTime(const QString& timeString) +TQTime PlaylistItem::stringToTime(const TQString& timeString) { int sec = 0; bool ok = false; - QStringList tokens = QStringList::split(':',timeString); + TQStringList tokens = TQStringList::split(':',timeString); sec += tokens[0].toInt(&ok)*3600; //hours sec += tokens[1].toInt(&ok)*60; //minutes sec += tokens[2].toInt(&ok); //secs if (ok) - return QTime().addSecs(sec); + return TQTime().addSecs(sec); else - return QTime(); + return TQTime(); } -int PlaylistItem::compare(QListViewItem *i, int col, bool ascending ) const +int PlaylistItem::compare(TQListViewItem *i, int col, bool ascending ) const { PlaylistItem* p = dynamic_cast<PlaylistItem*>(i); if (!p) - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); //if both strings are empty, sort by filename if (text(col).isEmpty() && i->text(col).isEmpty()) @@ -207,16 +207,16 @@ int PlaylistItem::compare(QListViewItem *i, int col, bool ascending ) const if (ok) return (track2 - track1); else - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } else { - int result = QListViewItem::compare(i, col, ascending); + int result = TQListViewItem::compare(i, col, ascending); //if artists are equal, compare albums if ((col == ARTIST_COLUMN) && (result == 0)) { - result = QListViewItem::compare(i, ALBUM_COLUMN, ascending); + result = TQListViewItem::compare(i, ALBUM_COLUMN, ascending); if (!ascending) result = -result; } @@ -245,23 +245,23 @@ void PlaylistItem::setPlaying(bool playing) isCurrent = playing; } -void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void PlaylistItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if (isCurrent) { - QColorGroup colorGroup = cg; + TQColorGroup tqcolorGroup = cg; - QColor base = colorGroup.base(); - QColor selection = colorGroup.highlight(); + TQColor base = tqcolorGroup.base(); + TQColor selection = tqcolorGroup.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - QColor c(r, g, b); + TQColor c(r, g, b); - colorGroup.setColor(QColorGroup::Base, c); - QListViewItem::paintCell(p, colorGroup, column, width, align); + tqcolorGroup.setColor(TQColorGroup::Base, c); + TQListViewItem::paintCell(p, tqcolorGroup, column, width, align); } else return KListViewItem::paintCell(p, cg, column, width, align); diff --git a/kaffeine/src/input/audiobrowser/playlistitem.h b/kaffeine/src/input/audiobrowser/playlistitem.h index 9b1b9f5..d536117 100644 --- a/kaffeine/src/input/audiobrowser/playlistitem.h +++ b/kaffeine/src/input/audiobrowser/playlistitem.h @@ -31,61 +31,61 @@ #define TRACK_COLUMN 4 #define LENGTH_COLUMN 5 -class QTime; -class QString; -class QStringList; +class TQTime; +class TQString; +class TQStringList; class MRL; class PlaylistItem : public KListViewItem { public: - PlaylistItem(KListView *list, KListViewItem *after, const QString& url, const QString& mime, const QString& title, - const QString& length = QString::null, const QString& artist = QString::null, const QString& album = QString::null, - const QString& track = QString::null, const QString& year = QString::null, const QString& genre = QString::null, - const QStringList& subtitles = QStringList(), int currentSubtitle = -1); + PlaylistItem(KListView *list, KListViewItem *after, const TQString& url, const TQString& mime, const TQString& title, + const TQString& length = TQString(), const TQString& artist = TQString(), const TQString& album = TQString(), + const TQString& track = TQString(), const TQString& year = TQString(), const TQString& genre = TQString(), + const TQStringList& subtitles = TQStringList(), int currentSubtitle = -1); PlaylistItem(KListView* list, KListViewItem* after, const MRL&); virtual ~PlaylistItem(); MRL toMRL() const; - const QString& url() const; - QString mime() const; - QString title() const; - QString artist() const; - QString album() const; - QString track() const; - QString year() const; - QString genre() const; - QString length() const; - const QStringList& subtitles() const; + const TQString& url() const; + TQString mime() const; + TQString title() const; + TQString artist() const; + TQString album() const; + TQString track() const; + TQString year() const; + TQString genre() const; + TQString length() const; + const TQStringList& subtitles() const; int currentSubtitle() const; - void setUrl(const QString&); - void setMime(const QString&); - void setTitle(const QString&); - void setArtist(const QString&); - void setAlbum(const QString&); - void setTrack(const QString&); - void setYear(const QString&); - void setGenre(const QString&); - void setLength(const QString&); - void setSubtitles(const QStringList&); - void addSubtitle(const QString&); + void setUrl(const TQString&); + void setMime(const TQString&); + void setTitle(const TQString&); + void setArtist(const TQString&); + void setAlbum(const TQString&); + void setTrack(const TQString&); + void setYear(const TQString&); + void setGenre(const TQString&); + void setLength(const TQString&); + void setSubtitles(const TQStringList&); + void addSubtitle(const TQString&); void setCurrentSubtitle(int); //reimplement to fix track order - int compare( QListViewItem *i, int col, bool ascending ) const; + int compare( TQListViewItem *i, int col, bool ascending ) const; void setPlaying(bool playing); - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); private: - static QTime stringToTime(const QString&); - QString m_url; - QString m_year; - QString m_genre; - QStringList m_subtitles; + static TQTime stringToTime(const TQString&); + TQString m_url; + TQString m_year; + TQString m_genre; + TQStringList m_subtitles; int m_currentSubtitle; bool isCurrent; }; diff --git a/kaffeine/src/input/audiobrowser/urllistview.cpp b/kaffeine/src/input/audiobrowser/urllistview.cpp index 49cfc3c..644f6ab 100644 --- a/kaffeine/src/input/audiobrowser/urllistview.cpp +++ b/kaffeine/src/input/audiobrowser/urllistview.cpp @@ -28,8 +28,8 @@ #include <kfiledialog.h> #include <kpopupmenu.h> -#include <qfontmetrics.h> -#include <qdragobject.h> +#include <tqfontmetrics.h> +#include <tqdragobject.h> #include "mrl.h" #include "playlistitem.h" @@ -37,27 +37,27 @@ #include "urllistview.moc" -UrlListView::UrlListView(QWidget *parent, const char *name ) : KListView(parent,name), +UrlListView::UrlListView(TQWidget *tqparent, const char *name ) : KListView(tqparent,name), m_listCleared(true), m_itemOfContextMenu(NULL) { m_contextMenu = new KPopupMenu(this); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("player_play", KIcon::Small), i18n("Play"), this, SLOT(slotPlayItem())); - m_contextMenu->insertItem(i18n("Play Next/Add to Queue"), this, SLOT(slotPlayNext())); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("player_play", KIcon::Small), i18n("Play"), this, TQT_SLOT(slotPlayItem())); + m_contextMenu->insertItem(i18n("Play Next/Add to Queue"), this, TQT_SLOT(slotPlayNext())); m_contextMenu->insertSeparator(); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("editcut", KIcon::Small), i18n("C&ut"), this, SIGNAL(signalCut()), CTRL+Key_X); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("editcopy", KIcon::Small), i18n("&Copy"), this, SIGNAL(signalCopy()), CTRL+Key_C); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("editpaste", KIcon::Small), i18n("&Paste"), this, SIGNAL(signalPaste()), CTRL+Key_V); - m_contextMenu->insertItem(i18n("Select &All"), this, SIGNAL(signalSelectAll()), CTRL+Key_A); - m_contextMenu->insertItem(i18n("Create Playlist From Selected"), this, SIGNAL(signalPlaylistFromSelected())); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("editcut", KIcon::Small), i18n("C&ut"), this, TQT_SIGNAL(signalCut()), CTRL+Key_X); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("editcopy", KIcon::Small), i18n("&Copy"), this, TQT_SIGNAL(signalCopy()), CTRL+Key_C); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("editpaste", KIcon::Small), i18n("&Paste"), this, TQT_SIGNAL(signalPaste()), CTRL+Key_V); + m_contextMenu->insertItem(i18n("Select &All"), this, TQT_SIGNAL(signalSelectAll()), CTRL+Key_A); + m_contextMenu->insertItem(i18n("Create Playlist From Selected"), this, TQT_SIGNAL(signalPlaylistFromSelected())); m_contextMenu->insertSeparator(); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("indent", KIcon::Small), i18n("Add Sub&title..."), this, SLOT(slotAddSubtitle()),QKeySequence(),100 ); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("indent", KIcon::Small), i18n("Add Sub&title..."), this, TQT_SLOT(slotAddSubtitle()),TQKeySequence(),100 ); m_contextMenu->insertSeparator(); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("edit", KIcon::Small), i18n("&Edit Title"), this, SLOT(slotEditTitle())); - m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("info", KIcon::Small), i18n("&Info"), this, SLOT(slotShowInfo())); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("edit", KIcon::Small), i18n("&Edit Title"), this, TQT_SLOT(slotEditTitle())); + m_contextMenu->insertItem(KGlobal::iconLoader()->loadIconSet("info", KIcon::Small), i18n("&Info"), this, TQT_SLOT(slotShowInfo())); /* width of the "length"-column */ - QFontMetrics met(KGlobalSettings::generalFont()); + TQFontMetrics met(KGlobalSettings::generalFont()); int w1 = met.width(i18n("Length")); int w2 = met.width("5:55:55") + 2; @@ -71,28 +71,28 @@ UrlListView::UrlListView(QWidget *parent, const char *name ) : KListView(parent, m_column4Track = w1 > w2 ? w1 : w2; m_column4Track += 36; - connect(this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - this, SLOT(slotShowContextMenu(QListViewItem*, const QPoint&, int))); - connect(this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(slotCurrentChanged(QListViewItem*))); - connect(this, SIGNAL(clicked( QListViewItem*, const QPoint&, int )), - this, SLOT(slotClicked( QListViewItem*, const QPoint&, int ))); + connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotShowContextMenu(TQListViewItem*, const TQPoint&, int))); + connect(this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(slotCurrentChanged(TQListViewItem*))); + connect(this, TQT_SIGNAL(clicked( TQListViewItem*, const TQPoint&, int )), + this, TQT_SLOT(slotClicked( TQListViewItem*, const TQPoint&, int ))); } UrlListView::~UrlListView() { } -bool UrlListView::acceptDrag(QDropEvent* event) const +bool UrlListView::acceptDrag(TQDropEvent* event) const { - return QUriDrag::canDecode(event) || QTextDrag::canDecode(event) || KListView::acceptDrag(event); + return TQUriDrag::canDecode(event) || TQTextDrag::canDecode(event) || KListView::acceptDrag(event); } -QDragObject* UrlListView::dragObject() +TQDragObject* UrlListView::dragObject() { // get selected items - QPtrList<QListViewItem> selected; - QStrList urlList; + TQPtrList<TQListViewItem> selected; + TQStrList urlList; selected = selectedItems(); for (uint i = 0; i<selected.count(); i++) @@ -100,10 +100,10 @@ QDragObject* UrlListView::dragObject() urlList.append(dynamic_cast<PlaylistItem*>(selected.at(i))->url().ascii()); } - return new QUriDrag(urlList, viewport()); + return new TQUriDrag(urlList, viewport()); } -void UrlListView::resizeEvent(QResizeEvent* rev) +void UrlListView::resizeEvent(TQResizeEvent* rev) { int width = contentsRect().width() - m_column5Width - m_column4Track - 69; setColumnWidth(0, 20); /* mime */ @@ -136,7 +136,7 @@ bool UrlListView::getCleared() const /* was playlist cleared ? */ /********** context menu **********/ -void UrlListView::slotShowContextMenu(QListViewItem* item, const QPoint& pos, int) +void UrlListView::slotShowContextMenu(TQListViewItem* item, const TQPoint& pos, int) { if (!item) { @@ -146,7 +146,7 @@ void UrlListView::slotShowContextMenu(QListViewItem* item, const QPoint& pos, in else { m_itemOfContextMenu = dynamic_cast<PlaylistItem *>(item); - if (m_itemOfContextMenu->mime().contains("video")) + if (m_itemOfContextMenu->mime().tqcontains("video")) enableSubEntry(); else disableSubEntry(); @@ -183,9 +183,9 @@ void UrlListView::slotShowInfo() if (!m_itemOfContextMenu) return; - QString num; + TQString num; num = num.setNum(childCount()); - QString info = "<qt><table width=\"90%\">"; + TQString info = "<qt><table width=\"90%\">"; info = info + "<tr><td colspan=\"2\"><center><b>" + m_itemOfContextMenu->title() + "</b></center></td></tr>"; info = info + "<tr><td><b>" + i18n("URL")+ ":</b></td><td>" + m_itemOfContextMenu->url() + "</td></tr>"; info = info + "<tr><td><b>" + i18n("Artist") + ":</b></td><td>" + m_itemOfContextMenu->artist() + "</td></td>"; @@ -211,7 +211,7 @@ void UrlListView::slotShowInfo() KMessageBox::information(this, info); } -void UrlListView::slotClicked(QListViewItem*, const QPoint&, int) +void UrlListView::slotClicked(TQListViewItem*, const TQPoint&, int) { /*if ( (item) && (col == 3) ) { @@ -221,44 +221,44 @@ void UrlListView::slotClicked(QListViewItem*, const QPoint&, int) } */ } -#include <qdom.h> +#include <tqdom.h> #include <kio/job.h> void UrlListView::slotAddSubtitle() { - /*QDomDocument reqdoc; + /*TQDomDocument reqdoc; - QDomElement methodCall = reqdoc.createElement( "methodCall" ); - QDomElement methodName = reqdoc.createElement( "methodName" ); - QDomText methodNameValue = reqdoc.createTextNode( "LogIn" ); + TQDomElement methodCall = reqdoc.createElement( "methodCall" ); + TQDomElement methodName = reqdoc.createElement( "methodName" ); + TQDomText methodNameValue = reqdoc.createTextNode( "LogIn" ); methodName.appendChild( methodNameValue ); methodCall.appendChild( methodName ); reqdoc.appendChild( methodCall ); - QDomElement params = reqdoc.createElement( "params" ); + TQDomElement params = reqdoc.createElement( "params" ); - QDomElement param1 = reqdoc.createElement( "param" ); - QDomElement value1 = reqdoc.createElement( "value" ); - QDomElement type1 = reqdoc.createElement( "string" ); - QDomText param1Value = reqdoc.createTextNode( "" ); + TQDomElement param1 = reqdoc.createElement( "param" ); + TQDomElement value1 = reqdoc.createElement( "value" ); + TQDomElement type1 = reqdoc.createElement( "string" ); + TQDomText param1Value = reqdoc.createTextNode( "" ); type1.appendChild( param1Value ); value1.appendChild( type1 ); param1.appendChild( value1 ); params.appendChild( param1 ); - QDomElement param2 = reqdoc.createElement( "param" ); - QDomElement value2 = reqdoc.createElement( "value" ); - QDomElement type2 = reqdoc.createElement( "string" ); - QDomText param2Value = reqdoc.createTextNode( "" ); + TQDomElement param2 = reqdoc.createElement( "param" ); + TQDomElement value2 = reqdoc.createElement( "value" ); + TQDomElement type2 = reqdoc.createElement( "string" ); + TQDomText param2Value = reqdoc.createTextNode( "" ); type2.appendChild( param2Value ); value2.appendChild( type2 ); param2.appendChild( value2 ); params.appendChild( param2 ); - QDomElement param3 = reqdoc.createElement( "param" ); - QDomElement value3 = reqdoc.createElement( "value" ); - QDomElement type3 = reqdoc.createElement( "string" ); - QDomText param3Value = reqdoc.createTextNode( "en" ); + TQDomElement param3 = reqdoc.createElement( "param" ); + TQDomElement value3 = reqdoc.createElement( "value" ); + TQDomElement type3 = reqdoc.createElement( "string" ); + TQDomText param3Value = reqdoc.createTextNode( "en" ); type3.appendChild( param3Value ); value3.appendChild( type3 ); param3.appendChild( value3 ); @@ -266,20 +266,20 @@ void UrlListView::slotAddSubtitle() methodCall.appendChild( params ); - const QString xmlRequest = "<?xml version=\"1.0\"?>\n" + reqdoc.toString(); + const TQString xmlRequest = "<?xml version=\"1.0\"?>\n" + reqdoc.toString(); - QByteArray postData; - QDataStream stream( postData, IO_WriteOnly ); + TQByteArray postData; + TQDataStream stream( postData, IO_WriteOnly ); stream.writeRawBytes( xmlRequest.utf8(), xmlRequest.utf8().length() ); - openSubJobBuf = QByteArray(); + openSubJobBuf = TQByteArray(); openSubJob = KIO::http_post( "http://test.opensubtitles.org/xml-rpc", postData, false ); openSubJob->addMetaData( "content-type", "Content-Type: text/xml" ); - connect( openSubJob, SIGNAL(result(KIO::Job*)), this, SLOT(openSubResult(KIO::Job*)) ); - connect( openSubJob, SIGNAL(data(KIO::Job*,const QByteArray&) ), this, SLOT(openSubData(KIO::Job*, - const QByteArray&)) ); + connect( openSubJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(openSubResult(KIO::Job*)) ); + connect( openSubJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&) ), this, TQT_SLOT(openSubData(KIO::Job*, + const TQByteArray&)) ); kdDebug() << "\n\n" << xmlRequest << "\n\n" << endl;*/ @@ -287,11 +287,11 @@ void UrlListView::slotAddSubtitle() if (!m_itemOfContextMenu) return; - QString openURL = m_itemOfContextMenu->url(); - QString subtitleURL = KFileDialog::getOpenURL(openURL, + TQString openURL = m_itemOfContextMenu->url(); + TQString subtitleURL = KFileDialog::getOpenURL(openURL, i18n("*.smi *.srt *.sub *.txt *.ssa *.asc|Subtitle Files\n*.*|All Files"), 0, i18n("Select Subtitle File")).path(); - if(!(subtitleURL.isEmpty()) && !(m_itemOfContextMenu->subtitles().contains(subtitleURL)) && QFile::exists(subtitleURL)) + if(!(subtitleURL.isEmpty()) && !(m_itemOfContextMenu->subtitles().tqcontains(subtitleURL)) && TQFile::exists(subtitleURL)) { m_itemOfContextMenu->addSubtitle(subtitleURL); emit signalPlayItem(m_itemOfContextMenu); @@ -308,7 +308,7 @@ void UrlListView::openSubResult( KIO::Job* job ) return; } - QDomDocument document; + TQDomDocument document; if ( !document.setContent( openSubJobBuf ) ) { kdDebug() << "Couldn't read similar artists response" << endl; return; @@ -317,7 +317,7 @@ void UrlListView::openSubResult( KIO::Job* job ) openSubJob = 0; } -void UrlListView::openSubData( KIO::Job* job, const QByteArray& data ) +void UrlListView::openSubData( KIO::Job* job, const TQByteArray& data ) { if ( openSubJob != job ) return; @@ -328,7 +328,7 @@ void UrlListView::openSubData( KIO::Job* job, const QByteArray& data ) } -void UrlListView::slotCurrentChanged(QListViewItem * item) +void UrlListView::slotCurrentChanged(TQListViewItem * item) { if(item == 0) //All items deleted m_itemOfContextMenu = NULL; diff --git a/kaffeine/src/input/audiobrowser/urllistview.h b/kaffeine/src/input/audiobrowser/urllistview.h index 964b743..95ac717 100644 --- a/kaffeine/src/input/audiobrowser/urllistview.h +++ b/kaffeine/src/input/audiobrowser/urllistview.h @@ -28,8 +28,8 @@ #include <klistview.h> class KPopupMenu; -class QWidget; -class QDragObject; +class TQWidget; +class TQDragObject; class PlaylistItem; class MRL; class KIO::Job; @@ -37,8 +37,9 @@ class KIO::Job; class UrlListView : public KListView { Q_OBJECT + TQ_OBJECT public: - UrlListView(QWidget *parent=0, const char *name=0); + UrlListView(TQWidget *tqparent=0, const char *name=0); ~UrlListView(); void setCleared(bool); @@ -48,7 +49,7 @@ public slots: virtual void clear(); /* reimplement slot */ signals: - void signalPlayItem(QListViewItem* ); /* play selected in context menu */ + void signalPlayItem(TQListViewItem* ); /* play selected in context menu */ void signalCut(); void signalCopy(); void signalPaste(); @@ -57,21 +58,21 @@ signals: void signalPlaylistFromSelected(); private slots: - void slotShowContextMenu(QListViewItem*, const QPoint&, int); - void slotCurrentChanged(QListViewItem *); + void slotShowContextMenu(TQListViewItem*, const TQPoint&, int); + void slotCurrentChanged(TQListViewItem *); void slotAddSubtitle(); void slotShowInfo(); void slotEditTitle(); void slotPlayItem(); - void slotClicked(QListViewItem*, const QPoint&, int); + void slotClicked(TQListViewItem*, const TQPoint&, int); void slotPlayNext(); void openSubResult( KIO::Job* ); - void openSubData( KIO::Job*, const QByteArray& ); + void openSubData( KIO::Job*, const TQByteArray& ); protected: - virtual bool acceptDrag(QDropEvent* event) const; - virtual void resizeEvent(QResizeEvent*); - virtual QDragObject* dragObject(); + virtual bool acceptDrag(TQDropEvent* event) const; + virtual void resizeEvent(TQResizeEvent*); + virtual TQDragObject* dragObject(); private: void enableSubEntry(); @@ -85,7 +86,7 @@ private: PlaylistItem* m_itemOfContextMenu; KPopupMenu* m_contextMenu; KIO::Job *openSubJob; - QByteArray openSubJobBuf; + TQByteArray openSubJobBuf; }; diff --git a/kaffeine/src/input/disc/cddb.cpp b/kaffeine/src/input/disc/cddb.cpp index 407fbbc..037c515 100644 --- a/kaffeine/src/input/disc/cddb.cpp +++ b/kaffeine/src/input/disc/cddb.cpp @@ -24,12 +24,12 @@ #include <errno.h> #include <unistd.h> -#include <qdir.h> -#include <qtextstream.h> -#include <qregexp.h> -#include <qapplication.h> -#include <qstring.h> -#include <qcursor.h> +#include <tqdir.h> +#include <tqtextstream.h> +#include <tqregexp.h> +#include <tqapplication.h> +#include <tqstring.h> +#include <tqcursor.h> #include <kdebug.h> #include <ksock.h> #include <kextsock.h> @@ -41,7 +41,7 @@ CDDB::CDDB() : ks(0), port(80), remote(false), save_local(false) { - QString s = QDir::homeDirPath()+"/.cddb"; + TQString s = TQDir::homeDirPath()+"/.cddb"; cddb_dirs +=s; } @@ -73,7 +73,7 @@ bool CDDB::set_server(const char *hostname, unsigned short int _port) h_name = hostname; port = _port; - QCString r; + TQCString r; readLine(r); // the server greeting writeLine("cddb hello kde-user blubb kio_audiocd 0.4"); readLine(r); @@ -86,7 +86,7 @@ bool CDDB::deinit() if (ks) { writeLine("quit"); - QCString r; + TQCString r; readLine(r); ks->close(); } @@ -97,7 +97,7 @@ bool CDDB::deinit() return true; } -bool CDDB::readLine(QCString& ret) +bool CDDB::readLine(TQCString& ret) { int read_length = 0; char small_b[128]; @@ -107,7 +107,7 @@ bool CDDB::readLine(QCString& ret) while (read_length < 40000) { // Look for a \n in buf - int ni = buf.find('\n'); + int ni = buf.tqfind('\n'); if (ni >= 0) { // Nice, so return this substring (without the \n), @@ -135,7 +135,7 @@ bool CDDB::readLine(QCString& ret) return false; } -bool CDDB::writeLine(const QCString& line) +bool CDDB::writeLine(const TQCString& line) { const char *b = line.data(); int l = line.length(); @@ -164,7 +164,7 @@ bool CDDB::writeLine(const QCString& line) return true; } -unsigned int CDDB::get_discid(QValueList<int>& track_ofs) +unsigned int CDDB::get_discid(TQValueList<int>& track_ofs) { unsigned int id = 0; int num_tracks = track_ofs.count() - 2; @@ -188,7 +188,7 @@ unsigned int CDDB::get_discid(QValueList<int>& track_ofs) return id; } -static int get_code (const QCString &s) +static int get_code (const TQCString &s) { bool ok; int code = s.left(3).toInt(&ok); @@ -197,17 +197,17 @@ static int get_code (const QCString &s) return code; } -static void parse_query_resp (const QCString& _r, QCString& catg, QCString& d_id, QCString& title) +static void parse_query_resp (const TQCString& _r, TQCString& catg, TQCString& d_id, TQCString& title) { - QCString r = _r.stripWhiteSpace(); - int i = r.find(' '); + TQCString r = _r.stripWhiteSpace(); + int i = r.tqfind(' '); if (i) { catg = r.left(i).stripWhiteSpace(); r.remove(0, i+1); r = r.stripWhiteSpace(); } - i = r.find(' '); + i = r.tqfind(' '); if (i) { d_id = r.left(i).stripWhiteSpace(); @@ -217,17 +217,17 @@ static void parse_query_resp (const QCString& _r, QCString& catg, QCString& d_id title = r; } -QString CDDB::track(int i) const +TQString CDDB::track(int i) const { if (i < 0 || i >= int(m_names.count())) - return QString(); + return TQString(); return m_names[i].utf8(); } -bool CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream) +bool CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream) { /* Note, that m_names and m_title should be empty */ - QCString end = "."; + TQCString end = "."; /* Fill table, so we can index it below. */ for (int i = 0; i < m_tracks; i++) @@ -236,7 +236,7 @@ bool CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream) } while (1) { - QCString r; + TQCString r; if (stream) { if (stream->atEnd()) @@ -260,12 +260,12 @@ bool CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream) if (r.left(7) == "DTITLE=") { r.remove(0, 7); - m_title += QString::fromLocal8Bit(r.stripWhiteSpace()); + m_title += TQString::fromLocal8Bit(r.stripWhiteSpace()); } else if (r.left(6) == "TTITLE") { r.remove(0, 6); - int e = r.find('='); + int e = r.tqfind('='); if (e) { bool ok; @@ -273,7 +273,7 @@ bool CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream) if (ok && i >= 0 && i < m_tracks) { r.remove(0, e+1); - m_names[i] += QString::fromLocal8Bit(r); + m_names[i] += TQString::fromLocal8Bit(r); } } } @@ -281,7 +281,7 @@ bool CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream) /* XXX We should canonicalize the strings ("\n" --> '\n' e.g.) */ - int si = m_title.find(" / "); + int si = m_title.tqfind(" / "); if (si > 0) { m_artist = m_title.left(si).stripWhiteSpace(); @@ -292,27 +292,27 @@ bool CDDB::parse_read_resp(QTextStream *stream, QTextStream *write_stream) if (m_title.isEmpty()) m_title = i18n("No Title"); /*else - m_title.replace(QRegExp("/"), "%2f");*/ + m_title.tqreplace(TQRegExp("/"), "%2f");*/ if (m_artist.isEmpty()) m_artist = i18n("Unknown"); /*else - m_artist.replace(QRegExp("/"), "%2f");*/ + m_artist.tqreplace(TQRegExp("/"), "%2f");*/ kdDebug(7101) << "CDDB: found Title: `" << m_title << "'" << endl; for (int i = 0; i < m_tracks; i++) { if (m_names[i].isEmpty()) - m_names[i] += i18n("Track %1").arg(i); - m_names[i].replace(QRegExp("/"), "%2f"); + m_names[i] += i18n("Track %1").tqarg(i); + m_names[i].tqreplace(TQRegExp("/"), "%2f"); kdDebug(7101) << "CDDB: found Track " << i+1 << ": `" << m_names[i] << "'" << endl; } return true; } -void CDDB::add_cddb_dirs(const QStringList& list) +void CDDB::add_cddb_dirs(const TQStringList& list) { - QString s = QDir::homeDirPath()+"/.cddb"; + TQString s = TQDir::homeDirPath()+"/.cddb"; cddb_dirs = list; if (cddb_dirs.isEmpty()) @@ -322,14 +322,14 @@ void CDDB::add_cddb_dirs(const QStringList& list) /* Locates and opens the local file corresponding to that discid. Returns TRUE, if file is found and ready for reading. Returns FALSE, if file isn't found. In this case ret_file is initialized - with a QFile which resides in the first cddb_dir, and has a temp name + with a TQFile which resides in the first cddb_dir, and has a temp name (the ID + getpid()). You can open it for writing. */ -bool CDDB::searchLocal(unsigned int id, QFile *ret_file) +bool CDDB::searchLocal(unsigned int id, TQFile *ret_file) { - QDir dir; - QString filename; - filename = QString("%1").arg(id, 0, 16).rightJustify(8, '0'); - QStringList::ConstIterator it; + TQDir dir; + TQString filename; + filename = TQString("%1").tqarg(id, 0, 16).rightJustify(8, '0'); + TQStringList::ConstIterator it; for (it = cddb_dirs.begin(); it != cddb_dirs.end(); ++it) { dir.setPath(*it); @@ -341,9 +341,9 @@ bool CDDB::searchLocal(unsigned int id, QFile *ret_file) return true; /* And then in the subdirs of dir (representing the categories normally). */ - const QFileInfoList *subdirs = dir.entryInfoList (QDir::Dirs); - QFileInfoListIterator fiit(*subdirs); - QFileInfo *fi; + const TQFileInfoList *subdirs = dir.entryInfoList (TQDir::Dirs); + TQFileInfoListIterator fiit(*subdirs); + TQFileInfo *fi; while ((fi = fiit.current()) != 0) { ret_file->setName (*it + "/" + fi->fileName() + "/" + filename); @@ -352,26 +352,26 @@ bool CDDB::searchLocal(unsigned int id, QFile *ret_file) ++fiit; } } - QString pid; + TQString pid; pid.setNum(::getpid()); ret_file->setName (cddb_dirs[0] + "/" + filename + "." + pid); /* Try to create the save location. */ dir.setPath(cddb_dirs[0]); if (save_local && !dir.exists()) { - //dir = QDir::current(); + //dir = TQDir::current(); dir.mkdir(cddb_dirs[0]); } return false; } -bool CDDB::queryCD(QValueList<int>& track_ofs) +bool CDDB::queryCD(TQValueList<int>& track_ofs) { int num_tracks = track_ofs.count() - 2; if (num_tracks < 1) return false; unsigned int id = get_discid(track_ofs); - QFile file; + TQFile file; bool local; /* Already read this ID. */ @@ -379,7 +379,7 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) return true; emit cddbMessage(i18n("Searching local cddb entry ...")); - qApp->processEvents(); + tqApp->processEvents(); /* First look for a local file. */ local = searchLocal (id, &file); @@ -394,41 +394,41 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) m_discid = id; if (local) { - QTextStream stream(&file); + TQTextStream stream(&file); /* XXX Hmm, what encoding is used by CDDB files? local? Unicode? Nothing? */ - //stream.setEncoding(QTextStream::Locale); + //stream.setEncoding(TQTextStream::Locale); parse_read_resp(&stream, 0); file.close(); return true; } emit cddbMessage(i18n("Searching remote cddb entry ...")); - qApp->processEvents(); + tqApp->processEvents(); /* Remote CDDB query. */ unsigned int length = track_ofs[num_tracks+1] - track_ofs[num_tracks]; - QCString q; + TQCString q; q.sprintf("cddb query %08x %d", id, num_tracks); - QCString num; + TQCString num; for (int i = 0; i < num_tracks; i++) q += " " + num.setNum(track_ofs[i]); q += " " + num.setNum(length / 75); if (!writeLine(q)) return false; - QCString r; + TQCString r; if (!readLine(r)) return false; r = r.stripWhiteSpace(); int code = get_code(r); if (code == 200) { - QCString catg, d_id, title; - QDir dir; - QCString s, pid; + TQCString catg, d_id, title; + TQDir dir; + TQCString s, pid; emit cddbMessage(i18n("Found exact match cddb entry ...")); - qApp->processEvents(); + tqApp->processEvents(); /* an exact match */ r.remove(0, 3); @@ -456,16 +456,16 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) if (save_local && file.open(IO_WriteOnly)) { kdDebug(7101) << "CDDB: file name to save =" << file.name() << endl; - QTextStream stream(&file); + TQTextStream stream(&file); if (!parse_read_resp(0, &stream)) { file.remove(); return false; } file.close(); - /*QString newname (file.name()); - newname.truncate(newname.findRev('.')); - if (QDir::current().rename(file.name(), newname)) { + /*TQString newname (file.name()); + newname.truncate(newname.tqfindRev('.')); + if (TQDir::current().rename(file.name(), newname)) { kdDebug(7101) << "CDDB: rename failed" << endl; file.remove(); } */ @@ -477,16 +477,16 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) { // Found some close matches. We'll read the query response and ask the user // which one should be fetched from the server. - QCString end = "."; - QCString catg, d_id, title; - QDir dir; - QCString s, pid, first_match; - QStringList disc_ids; + TQCString end = "."; + TQCString catg, d_id, title; + TQDir dir; + TQCString s, pid, first_match; + TQStringList disc_ids; /* some close matches */ //XXX may be try to find marker based on r emit cddbMessage(i18n("Found close cddb entry ...")); - qApp->processEvents(); + tqApp->processEvents(); int i=0; while (1) @@ -505,12 +505,12 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) bool ok = false; // We don't want to be thinking too much, do we? - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); // Oh, mylord, which match should I serve you? - QString _answer = KInputDialog::getItem(i18n("CDDB Matches"), i18n("Several close CDDB entries found. Choose one:"), + TQString _answer = KInputDialog::getItem(i18n("CDDB Matches"), i18n("Several close CDDB entries found. Choose one:"), disc_ids, 0, false, &ok ); - QCString answer = _answer.utf8(); + TQCString answer = _answer.utf8(); if (ok){ // Get user selected match parse_query_resp(answer, catg, d_id, title); @@ -520,7 +520,7 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) } // Now we can continue thinking... - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) ); kdDebug(7101) << "CDDB: found close CD: category=" << catg << " DiscId=" << d_id << " Title=`" << title << "'" << endl; @@ -547,7 +547,7 @@ bool CDDB::queryCD(QValueList<int>& track_ofs) if (save_local && file.open(IO_WriteOnly)) { kdDebug(7101) << "CDDB: file name to save =" << file.name() << endl; - QTextStream stream(&file); + TQTextStream stream(&file); if (!parse_read_resp(0, &stream)) { file.remove(); diff --git a/kaffeine/src/input/disc/cddb.h b/kaffeine/src/input/disc/cddb.h index e75eb2d..a9d0657 100644 --- a/kaffeine/src/input/disc/cddb.h +++ b/kaffeine/src/input/disc/cddb.h @@ -21,57 +21,58 @@ #ifndef CDDB_H #define CDDB_H -#include <qcstring.h> -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qobject.h> +#include <tqcstring.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqobject.h> -class QFile; -class QTextStream; +class TQFile; +class TQTextStream; class KExtendedSocket; -class CDDB : public QObject +class CDDB : public TQObject { Q_OBJECT + TQ_OBJECT public: CDDB(); ~CDDB(); bool set_server(const char *hostname = 0, unsigned short int port = 0); - void add_cddb_dirs(const QStringList& list); + void add_cddb_dirs(const TQStringList& list); void save_cddb (bool save) { save_local = save; } - unsigned int get_discid(QValueList<int>& track_ofs); - bool queryCD(QValueList<int>& track_ofs); - QString title() const { return m_title.utf8(); } - QString artist() const { return m_artist.utf8(); } + unsigned int get_discid(TQValueList<int>& track_ofs); + bool queryCD(TQValueList<int>& track_ofs); + TQString title() const { return m_title.utf8(); } + TQString artist() const { return m_artist.utf8(); } int trackCount() const { return m_tracks; } - QString track(int i) const; + TQString track(int i) const; private: - bool readLine(QCString& s); - bool writeLine(const QCString& s); + bool readLine(TQCString& s); + bool writeLine(const TQCString& s); bool deinit(); - bool parse_read_resp(QTextStream*, QTextStream*); - bool searchLocal(unsigned int id, QFile *ret_file); + bool parse_read_resp(TQTextStream*, TQTextStream*); + bool searchLocal(unsigned int id, TQFile *ret_file); KExtendedSocket *ks; - QCString h_name; + TQCString h_name; unsigned short int port; bool remote; bool save_local; - QStringList cddb_dirs; - QCString buf; + TQStringList cddb_dirs; + TQCString buf; unsigned int m_discid; int m_tracks; - QString m_title; - QString m_artist; - QStringList m_names; + TQString m_title; + TQString m_artist; + TQStringList m_names; signals: - void cddbMessage( QString ); + void cddbMessage( TQString ); }; #endif /* CDDB_H */ diff --git a/kaffeine/src/input/disc/disc.cpp b/kaffeine/src/input/disc/disc.cpp index 224a270..ea56305 100644 --- a/kaffeine/src/input/disc/disc.cpp +++ b/kaffeine/src/input/disc/disc.cpp @@ -18,15 +18,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qstringlist.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qvaluelist.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qfile.h> -#include <qpopupmenu.h> -#include <qapplication.h> +#include <tqstringlist.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqvaluelist.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqpopupmenu.h> +#include <tqapplication.h> #include <klocale.h> #include <kiconloader.h> @@ -42,28 +42,28 @@ #include "disc.h" #include "disc.moc" -MLabel::MLabel( QWidget *parent ) : QLabel( parent ) +MLabel::MLabel( TQWidget *tqparent ) : TQLabel( tqparent ) { setText("<center><font size=\"6\"><b>"+i18n("Audio CD")+"</b></font></center>"); } -void MLabel::paintEvent( QPaintEvent *pe ) +void MLabel::paintEvent( TQPaintEvent *pe ) { - QLabel::paintEvent( pe ); - QColorGroup cg = parentWidget()->colorGroup(); - QColor base = cg.base(); - QColor selection = cg.highlight(); + TQLabel::paintEvent( pe ); + TQColorGroup cg = tqparentWidget()->tqcolorGroup(); + TQColor base = cg.base(); + TQColor selection = cg.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - setPaletteBackgroundColor( QColor(r, g, b) ); + setPaletteBackgroundColor( TQColor(r, g, b) ); } -MListView::MListView( QWidget *parent ) : KListView( parent ) +MListView::MListView( TQWidget *tqparent ) : KListView( tqparent ) { } -void MListView::resizeEvent( QResizeEvent *rev ) +void MListView::resizeEvent( TQResizeEvent *rev ) { int width = contentsRect().width(); setColumnWidth(0, 40); /* Track */ @@ -73,42 +73,42 @@ void MListView::resizeEvent( QResizeEvent *rev ) KListView::resizeEvent(rev); } -Disc::Disc( QWidget* parent, QObject *objParent, const char *name ) : KaffeineInput(objParent , name) +Disc::Disc( TQWidget* tqparent, TQObject *objParent, const char *name ) : KaffeineInput(objParent , name) { - mainWidget = new QVBox( parent ); - mainWidget->setSizePolicy( QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred) ); - split = new QSplitter( mainWidget ); + mainWidget = new TQVBox( tqparent ); + mainWidget->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred) ); + split = new TQSplitter( mainWidget ); split->setOpaqueResize( true ); - widg = new QWidget( split ); + widg = new TQWidget( split ); widg->setMinimumWidth( 200 ); - widg->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::MinimumExpanding ) ); - QVBoxLayout *wb = new QVBoxLayout( widg, 0, 0 ); + widg->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding ) ); + TQVBoxLayout *wb = new TQVBoxLayout( widg, 0, 0 ); discLab = new MLabel( widg ); wb->addWidget( discLab ); - playerBox = new QVBox( widg ); + playerBox = new TQVBox( widg ); wb->addWidget( playerBox ); playerBox->setMinimumWidth( 200 ); - playerBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::MinimumExpanding ) ); - panel = new QFrame( split ); + playerBox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding ) ); + panel = new TQFrame( split ); split->moveToFirst( panel ); - panel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::MinimumExpanding ) ); - split->setResizeMode( panel, QSplitter::KeepSize ); + panel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding ) ); + split->setResizeMode( panel, TQSplitter::KeepSize ); - QVBoxLayout *vb = new QVBoxLayout( panel, 3, 3 ); - cdBtn = new QToolButton( panel ); + TQVBoxLayout *vb = new TQVBoxLayout( panel, 3, 3 ); + cdBtn = new TQToolButton( panel ); cdBtn->setTextLabel( i18n("Play CD") ); - cdBtn->setTextPosition( QToolButton::Under ); + cdBtn->setTextPosition( TQToolButton::Under ); cdBtn->setUsesTextLabel( true ); - cdBtn->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); - QToolTip::add( cdBtn, i18n("Play CD")); - ripBtn = new QToolButton( panel ); + cdBtn->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + TQToolTip::add( cdBtn, i18n("Play CD")); + ripBtn = new TQToolButton( panel ); ripBtn->setTextLabel( i18n("Rip CD") ); - ripBtn->setTextPosition( QToolButton::Under ); + ripBtn->setTextPosition( TQToolButton::Under ); ripBtn->setUsesTextLabel( true ); - ripBtn->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); - QToolTip::add( ripBtn, i18n("Rip CD")); + ripBtn->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + TQToolTip::add( ripBtn, i18n("Rip CD")); - QHBoxLayout *h1 = new QHBoxLayout(); + TQHBoxLayout *h1 = new TQHBoxLayout(); h1->addWidget( cdBtn ); h1->addWidget( ripBtn ); vb->addLayout( h1 ); @@ -116,66 +116,66 @@ Disc::Disc( QWidget* parent, QObject *objParent, const char *name ) : KaffeineIn cdBtn->setIconSet( KGlobal::iconLoader()->loadIconSet("cdaudio_unmount", KIcon::Toolbar) ); ripBtn->setIconSet( KGlobal::iconLoader()->loadIconSet("kilogram", KIcon::Toolbar) ); - connect( cdBtn, SIGNAL(clicked()), this, SLOT(startCD()) ); - connect( ripBtn, SIGNAL(clicked()), this, SLOT(startRIP()) ); + connect( cdBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(startCD()) ); + connect( ripBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(startRIP()) ); - h1 = new QHBoxLayout(); - h1->addWidget( new QLabel( i18n("Artist:"), panel ) ); - artistLab = new QLabel( "", panel ); + h1 = new TQHBoxLayout(); + h1->addWidget( new TQLabel( i18n("Artist:"), panel ) ); + artistLab = new TQLabel( "", panel ); artistLab->setLineWidth(1); - artistLab->setFrameStyle(QFrame::Panel|QFrame::Sunken); - artistLab->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) ); + artistLab->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); + artistLab->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) ); h1->addWidget( artistLab ); vb->addLayout( h1 ); - h1 = new QHBoxLayout(); - h1->addWidget( new QLabel( i18n("Album:"), panel ) ); - albumLab = new QLabel( "", panel ); + h1 = new TQHBoxLayout(); + h1->addWidget( new TQLabel( i18n("Album:"), panel ) ); + albumLab = new TQLabel( "", panel ); albumLab->setLineWidth(1); - albumLab->setFrameStyle(QFrame::Panel|QFrame::Sunken); - albumLab->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) ); + albumLab->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); + albumLab->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) ); h1->addWidget( albumLab ); vb->addLayout( h1 ); list = new MListView( panel ); - list->setHScrollBarMode( QListView::AlwaysOff ); - connect( list, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(trackSelected(QListViewItem*)) ); + list->setHScrollBarMode( TQListView::AlwaysOff ); + connect( list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(trackSelected(TQListViewItem*)) ); list->addColumn( i18n("Track") ); list->addColumn( i18n("Title") ); list->addColumn( i18n("Duration") ); //list->setSortColumn( -1 ); list->setAllColumnsShowFocus( true ); - list->setSelectionMode(QListView::Extended); - list->setColumnWidthMode( 0, QListView::Manual ); - list->setColumnWidthMode( 1, QListView::Manual ); - list->setColumnWidthMode( 2, QListView::Manual ); - list->setResizeMode( QListView::NoColumn ); + list->setSelectionMode(TQListView::Extended); + list->setColumnWidthMode( 0, TQListView::Manual ); + list->setColumnWidthMode( 1, TQListView::Manual ); + list->setColumnWidthMode( 2, TQListView::Manual ); + list->setResizeMode( TQListView::NoColumn ); vb->addWidget( list ); - encodeWidget = new QWidget( panel ); - QGridLayout *grid = new QGridLayout( encodeWidget, 2, 2, 0, 3 ); - QLabel *lab = new QLabel( i18n("Select the tracks you want to rip and click the <b>Encode</b> button."), encodeWidget ); + encodeWidget = new TQWidget( panel ); + TQGridLayout *grid = new TQGridLayout( encodeWidget, 2, 2, 0, 3 ); + TQLabel *lab = new TQLabel( i18n("Select the tracks you want to rip and click the <b>Encode</b> button."), encodeWidget ); grid->addMultiCellWidget( lab, 0, 1, 0, 0); - enc = new QToolButton( encodeWidget ); + enc = new TQToolButton( encodeWidget ); grid->addMultiCellWidget( enc, 0, 0, 1, 1); enc->setTextLabel( i18n("Encode...") ); - enc->setTextPosition( QToolButton::Under ); + enc->setTextPosition( TQToolButton::Under ); enc->setUsesTextLabel( true ); enc->setIconSet( KGlobal::iconLoader()->loadIconSet("kilogram", KIcon::Small) ); - enc->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - connect( enc, SIGNAL(clicked()), this, SLOT(encode()) ); + enc->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + connect( enc, TQT_SIGNAL(clicked()), this, TQT_SLOT(encode()) ); vb->addWidget( encodeWidget ); encodeWidget->hide(); - progressBar = new QProgressBar( 100, panel ); + progressBar = new TQProgressBar( 100, panel ); vb->addWidget( progressBar ); progressBar->hide(); - vb->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred ) ); + vb->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); artistLab->setPaletteBackgroundColor( list->paletteBackgroundColor() ); albumLab->setPaletteBackgroundColor( list->paletteBackgroundColor() ); - connect( &encodeTimer, SIGNAL(timeout()), this, SLOT(encodeProgress()) ); + connect( &encodeTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(encodeProgress()) ); setXMLFile("kaffeinedisc.rc"); setupActions(); @@ -199,7 +199,7 @@ void Disc::togglePanel() panel->hide(); } -void Disc::getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ) +void Disc::getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ) { uiNames.append( i18n("Audio CD encoding") ); iconNames.append( "kilogram" ); @@ -215,23 +215,23 @@ void Disc::getTargets( QStringList &uiNames, QStringList &iconNames, QStringList targetNames.append( "DISC_VCD" ); } -bool Disc::execTarget( const QString &target ) +bool Disc::execTarget( const TQString &target ) { if ( target=="DISC_CDDA" ) { //emit showMe( this ); - QTimer::singleShot( 100, this, SLOT(startCD()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startCD()) ); return true; } else if ( target=="DISC_RIP" ) { - QTimer::singleShot( 100, this, SLOT(startRIP()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startRIP()) ); return true; } else if ( target=="DISC_DVD" ) { - QTimer::singleShot( 100, this, SLOT(startDVD()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startDVD()) ); return true; } else if ( target=="DISC_VCD" ) { - QTimer::singleShot( 100, this, SLOT(startVCD()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startVCD()) ); return true; } return false; @@ -239,7 +239,7 @@ bool Disc::execTarget( const QString &target ) void Disc::loadConfig( KConfig* config ) { - QValueList<int> sl; + TQValueList<int> sl; config->setGroup("Disc"); sl = config->readIntListEntry("SplitSizes"); @@ -254,21 +254,21 @@ void Disc::saveConfig() config->writeEntry( "SplitSizes", split->sizes() ); } -QWidget* Disc::wantPlayerWindow() +TQWidget* Disc::wantPlayerWindow() { return playerBox; } -QWidget* Disc::inputMainWidget() +TQWidget* Disc::inputMainWidget() { return mainWidget; } void Disc::setupActions() { - new KAction(i18n("Open &DVD"), "dvd_unmount", 0, this, SLOT(startDVD()), actionCollection(), "file_open_dvd"); - new KAction(i18n("Open &VCD"), "cdrom_unmount", 0, this, SLOT(startVCD()), actionCollection(), "file_open_vcd"); - new KAction(i18n("Open &Audio-CD"), "cdaudio_unmount", 0, this, SLOT(startCD()), actionCollection(), "file_open_audiocd"); + new KAction(i18n("Open &DVD"), "dvd_unmount", 0, this, TQT_SLOT(startDVD()), actionCollection(), "file_open_dvd"); + new KAction(i18n("Open &VCD"), "cdrom_unmount", 0, this, TQT_SLOT(startVCD()), actionCollection(), "file_open_vcd"); + new KAction(i18n("Open &Audio-CD"), "cdaudio_unmount", 0, this, TQT_SLOT(startCD()), actionCollection(), "file_open_audiocd"); } void Disc::playerStopped() @@ -300,8 +300,8 @@ void Disc::setEncoding( bool b ) void Disc::encode() { - QListViewItem *it; - QStringList tracklist; + TQListViewItem *it; + TQStringList tracklist; it = list->firstChild(); if ( !it ) @@ -353,29 +353,29 @@ void Disc::encodeProgress() void Disc::setCurrent( int n ) { - QListViewItem *it; + TQListViewItem *it; it = list->firstChild(); while ( it!=0 ) { if ( it->text(0).toInt()==n ) it->setPixmap( 1, currentPixmap ); else - it->setPixmap( 1, QPixmap() ); + it->setPixmap( 1, TQPixmap() ); it = it->nextSibling(); } } -void Disc::trackSelected( QListViewItem *it ) +void Disc::trackSelected( TQListViewItem *it ) { if ( !it ) return; - MRL mrl( QString("cdda://%1/%2").arg( currentDevice ).arg( it->text(0).toInt() ) ); + MRL mrl( TQString("cdda://%1/%2").tqarg( currentDevice ).tqarg( it->text(0).toInt() ) ); mrl.setTitle( it->text(1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); mrl.setTrack( it->text(0) ); - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); trackCurrent = it->text(0).toInt(); setCurrent( trackCurrent ); emit play( mrl, this ); @@ -386,15 +386,15 @@ void Disc::startRIP() startCD( "", true ); } -void Disc::startCD( const QString &device, bool rip ) +void Disc::startCD( const TQString &device, bool rip ) { - QStringList s; + TQStringList s; bool init=false; - QValueList<int> qvl; + TQValueList<int> qvl; int i; KListViewItem *it; MRL mrl; - QStringList dcopList, devList; + TQStringList dcopList, devList; bool ok=false; if ( !cdBtn->isEnabled() ) { @@ -419,7 +419,7 @@ void Disc::startCD( const QString &device, bool rip ) i+=13; } if ( devList.count()>1 ) { - QString choice = KInputDialog::getItem( i18n("Audio CD"), i18n("Several Audio CD found. Choose one:"), + TQString choice = KInputDialog::getItem( i18n("Audio CD"), i18n("Several Audio CD found. Choose one:"), devList, 0, false, &ok ); if ( ok ) s.append( choice ); @@ -439,8 +439,8 @@ void Disc::startCD( const QString &device, bool rip ) } } - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); - qApp->processEvents(); + TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) ); + tqApp->processEvents(); para = new Paranoia(); for ( i=0; i<(int)s.count(); i++ ) { @@ -463,13 +463,13 @@ void Disc::startCD( const QString &device, bool rip ) artistLab->setText( cddb->artist() ); albumLab->setText( cddb->title() ); for ( i=0; i<para->getTracks(); i++ ) { - it = new KListViewItem( list, QString().sprintf("%02d", i+1), cddb->track( i ), para->trackTime(i) ); + it = new KListViewItem( list, TQString().sprintf("%02d", i+1), cddb->track( i ), para->trackTime(i) ); if ( i==0 ) { - mrl.setURL( QString("cdda://%1/1").arg( currentDevice ) ); + mrl.setURL( TQString("cdda://%1/1").tqarg( currentDevice ) ); mrl.setTitle( cddb->track(i) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); - mrl.setTrack( QString().sprintf("%02d", i+1) ); + mrl.setTrack( TQString().sprintf("%02d", i+1) ); } } } @@ -479,13 +479,13 @@ void Disc::startCD( const QString &device, bool rip ) artistLab->setText( cddb->artist() ); albumLab->setText( cddb->title() ); for ( i=0; i<para->getTracks(); i++ ) { - it = new KListViewItem( list, QString().sprintf("%02d", i+1), cddb->track( i ), para->trackTime(i) ); + it = new KListViewItem( list, TQString().sprintf("%02d", i+1), cddb->track( i ), para->trackTime(i) ); if ( i==0 ) { - mrl.setURL( QString("cdda://%1/1").arg( currentDevice ) ); + mrl.setURL( TQString("cdda://%1/1").tqarg( currentDevice ) ); mrl.setTitle( cddb->track(i) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); - mrl.setTrack( QString().sprintf("%02d", i+1) ); + mrl.setTrack( TQString().sprintf("%02d", i+1) ); } } } @@ -493,45 +493,45 @@ void Disc::startCD( const QString &device, bool rip ) artistLab->setText( i18n("Unknown") ); albumLab->setText( i18n("Unknown") ); for ( i=0; i<para->getTracks(); i++ ) { - it = new KListViewItem( list, QString().sprintf("%02d", i+1), i18n("Track")+QString().sprintf("%02d", i+1), para->trackTime(i) ); + it = new KListViewItem( list, TQString().sprintf("%02d", i+1), i18n("Track")+TQString().sprintf("%02d", i+1), para->trackTime(i) ); if ( i==0 ) { - mrl.setURL( QString("cdda://%1/1").arg( currentDevice ) ); - mrl.setTitle( i18n("Track")+QString().sprintf("%02d", i+1) ); + mrl.setURL( TQString("cdda://%1/1").tqarg( currentDevice ) ); + mrl.setTitle( i18n("Track")+TQString().sprintf("%02d", i+1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); - mrl.setTrack( QString().sprintf("%02d", i+1) ); + mrl.setTrack( TQString().sprintf("%02d", i+1) ); } } } } delete cddb; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); encodeWidget->show(); emit showMe( this ); if ( !rip && !mrl.isEmpty() ) { - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); trackCurrent = mrl.track().toInt(); setCurrent( trackCurrent ); emit play( mrl, this ); } } else { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::information( 0, i18n("No audio CD found."), i18n("Warning") ); } delete para; para = NULL; } -void Disc::startDVD( const QString &device ) +void Disc::startDVD( const TQString &device ) { MRL mrl; - QStringList dcopList, devList; + TQStringList dcopList, devList; int i; bool ok=false; if ( !device.isEmpty() ) - mrl.setURL( QString("dvd://%1").arg(device) ); + mrl.setURL( TQString("dvd://%1").tqarg(device) ); else { DCOPRef mediamanager("kded","mediamanager"); DCOPReply reply = mediamanager.call("fullList()"); @@ -546,32 +546,32 @@ void Disc::startDVD( const QString &device ) else if ( dcopList[i+10]=="media/cdrom_mounted" || dcopList[i+10]=="media/cdwriter_mounted" || dcopList[i+10]=="media/dvd_mounted" ) { - if ( QFile::exists(dcopList[i+6]+"/video_ts") || QFile::exists(dcopList[i+6]+"/VIDEO_TS") ) + if ( TQFile::exists(dcopList[i+6]+"/video_ts") || TQFile::exists(dcopList[i+6]+"/VIDEO_TS") ) devList.append( dcopList[i+5] ); } i+=13; } if ( devList.count()>1 ) { - QString choice = KInputDialog::getItem( i18n("DVD Video"), i18n("Several DVD Video found. Choose one:"), + TQString choice = KInputDialog::getItem( i18n("DVD Video"), i18n("Several DVD Video found. Choose one:"), devList, 0, false, &ok ); if ( ok ) - mrl.setURL( QString("dvd://%1").arg(choice) ); + mrl.setURL( TQString("dvd://%1").tqarg(choice) ); else return; } else if ( devList.count()==1 ) - mrl.setURL( QString("dvd://%1").arg(devList[0]) ); + mrl.setURL( TQString("dvd://%1").tqarg(devList[0]) ); else { //KMessageBox::information( 0, i18n("No DVD Video found."), i18n("Warning") ); //return; - mrl.setURL( QString("dvd://") ); + mrl.setURL( TQString("dvd://") ); } } else - mrl.setURL( QString("dvd://") ); + mrl.setURL( TQString("dvd://") ); } - mrl.setMime( QString("video/dvd") ); + mrl.setMime( TQString("video/dvd") ); if ( !progressBar->isVisible() ) { list->clear(); @@ -583,15 +583,15 @@ void Disc::startDVD( const QString &device ) emit play( mrl, this ); } -void Disc::startVCD( const QString &device ) +void Disc::startVCD( const TQString &device ) { MRL mrl; - QStringList dcopList, devList; + TQStringList dcopList, devList; int i; bool ok=false; if ( !device.isEmpty() ) - mrl.setURL( QString("vcd://%1").arg(device) ); + mrl.setURL( TQString("vcd://%1").tqarg(device) ); else { DCOPRef mediamanager("kded","mediamanager"); DCOPReply reply = mediamanager.call("fullList()"); @@ -606,26 +606,26 @@ void Disc::startVCD( const QString &device ) i+=13; } if ( devList.count()>1 ) { - QString choice = KInputDialog::getItem( i18n("VCD-SVCD"), i18n("Several (S)VCD found. Choose one:"), + TQString choice = KInputDialog::getItem( i18n("VCD-SVCD"), i18n("Several (S)VCD found. Choose one:"), devList, 0, false, &ok ); if ( ok ) - mrl.setURL( QString("vcd://%1").arg(choice) ); + mrl.setURL( TQString("vcd://%1").tqarg(choice) ); else return; } else if ( devList.count()==1 ) - mrl.setURL( QString("vcd://%1").arg(devList[0]) ); + mrl.setURL( TQString("vcd://%1").tqarg(devList[0]) ); else { //KMessageBox::information( 0, i18n("No (S)VCD found."), i18n("Warning") ); //return; - mrl.setURL( QString("vcd://") ); + mrl.setURL( TQString("vcd://") ); } } else - mrl.setURL( QString("vcd://") ); + mrl.setURL( TQString("vcd://") ); } - mrl.setMime( QString("video/vcd") ); + mrl.setMime( TQString("video/vcd") ); if ( !progressBar->isVisible() ) { list->clear(); @@ -639,7 +639,7 @@ void Disc::startVCD( const QString &device ) bool Disc::currentTrack( MRL &mrl ) { - QListViewItem *it; + TQListViewItem *it; if ( !trackCurrent ) return false; @@ -649,12 +649,12 @@ bool Disc::currentTrack( MRL &mrl ) return false; while ( it!=0 ) { if ( it->text(0).toInt()==trackCurrent ) { - mrl.setURL( QString("cdda://%1/%2").arg( currentDevice ).arg( it->text(0).toInt() ) ); + mrl.setURL( TQString("cdda://%1/%2").tqarg( currentDevice ).tqarg( it->text(0).toInt() ) ); mrl.setTitle( it->text(1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); mrl.setTrack( it->text(0) ); - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); setCurrent( trackCurrent ); return true; } @@ -671,7 +671,7 @@ bool Disc::playbackFinished( MRL &mrl ) bool Disc::nextTrack( MRL &mrl ) { - QListViewItem *it; + TQListViewItem *it; if ( !trackCurrent ) return false; @@ -681,12 +681,12 @@ bool Disc::nextTrack( MRL &mrl ) return false; while ( it!=0 ) { if ( it->text(0).toInt()==trackCurrent+1 ) { - mrl.setURL( QString("cdda://%1/%2").arg( currentDevice ).arg( it->text(0).toInt() ) ); + mrl.setURL( TQString("cdda://%1/%2").tqarg( currentDevice ).tqarg( it->text(0).toInt() ) ); mrl.setTitle( it->text(1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); mrl.setTrack( it->text(0) ); - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); ++trackCurrent; setCurrent( trackCurrent ); return true; @@ -695,12 +695,12 @@ bool Disc::nextTrack( MRL &mrl ) } it = list->firstChild(); - mrl.setURL( QString("cdda://%1/%2").arg( currentDevice ).arg( it->text(0).toInt() ) ); + mrl.setURL( TQString("cdda://%1/%2").tqarg( currentDevice ).tqarg( it->text(0).toInt() ) ); mrl.setTitle( it->text(1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); mrl.setTrack( it->text(0) ); - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); trackCurrent = 1; setCurrent( trackCurrent ); return true; @@ -708,7 +708,7 @@ bool Disc::nextTrack( MRL &mrl ) bool Disc::previousTrack( MRL &mrl ) { - QListViewItem *it; + TQListViewItem *it; if ( !trackCurrent ) return false; @@ -718,12 +718,12 @@ bool Disc::previousTrack( MRL &mrl ) return false; while ( it!=0 ) { if ( it->text(0).toInt()==trackCurrent-1 ) { - mrl.setURL( QString("cdda://%1/%2").arg( currentDevice ).arg( it->text(0).toInt() ) ); + mrl.setURL( TQString("cdda://%1/%2").tqarg( currentDevice ).tqarg( it->text(0).toInt() ) ); mrl.setTitle( it->text(1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); mrl.setTrack( it->text(0) ); - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); --trackCurrent; setCurrent( trackCurrent ); return true; @@ -736,7 +736,7 @@ bool Disc::previousTrack( MRL &mrl ) bool Disc::trackNumber( int number, MRL &mrl ) { - QListViewItem *it; + TQListViewItem *it; if ( !trackCurrent ) return false; @@ -746,12 +746,12 @@ bool Disc::trackNumber( int number, MRL &mrl ) return false; while ( it!=0 ) { if ( it->text(0).toInt()==number ) { - mrl.setURL( QString("cdda://%1/%2").arg( currentDevice ).arg( it->text(0).toInt() ) ); + mrl.setURL( TQString("cdda://%1/%2").tqarg( currentDevice ).tqarg( it->text(0).toInt() ) ); mrl.setTitle( it->text(1) ); mrl.setArtist( artistLab->text() ); mrl.setAlbum( albumLab->text() ); mrl.setTrack( it->text(0) ); - mrl.setMime( QString("audio/cdda") ); + mrl.setMime( TQString("audio/cdda") ); trackCurrent=number; setCurrent( trackCurrent ); return true; diff --git a/kaffeine/src/input/disc/disc.h b/kaffeine/src/input/disc/disc.h index c62c905..fe1a1ad 100644 --- a/kaffeine/src/input/disc/disc.h +++ b/kaffeine/src/input/disc/disc.h @@ -26,30 +26,31 @@ #include <kconfig.h> #include <klistview.h> -#include <qframe.h> -#include <qvbox.h> -#include <qsplitter.h> -#include <qtoolbutton.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qprogressbar.h> -#include <qguardedptr.h> +#include <tqframe.h> +#include <tqvbox.h> +#include <tqsplitter.h> +#include <tqtoolbutton.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqprogressbar.h> +#include <tqguardedptr.h> #include "kaffeineinput.h" #include "paranoia.h" class MRL; -class MLabel : public QLabel +class MLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - MLabel( QWidget *parent ); + MLabel( TQWidget *tqparent ); ~MLabel() {} protected: - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); }; @@ -57,13 +58,14 @@ protected: class MListView : public KListView { Q_OBJECT + TQ_OBJECT public: - MListView( QWidget *parent ); + MListView( TQWidget *tqparent ); ~MListView() {} protected: - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); }; @@ -71,15 +73,16 @@ protected: class Disc : public KaffeineInput { Q_OBJECT + TQ_OBJECT public: - Disc(QWidget *parent, QObject *objParent, const char *name=0); + Disc(TQWidget *tqparent, TQObject *objParent, const char *name=0); ~Disc(); // Reimplemented from KaffeineInput public: - QWidget *wantPlayerWindow(); - QWidget *inputMainWidget(); + TQWidget *wantPlayerWindow(); + TQWidget *inputMainWidget(); void mergeMeta(const MRL&); bool nextTrack( MRL& ); bool previousTrack( MRL& ); @@ -88,21 +91,21 @@ public: bool playbackFinished( MRL& ); void toggleLayout( bool ); void playerStopped(); - void getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ); + void getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ); void togglePanel(); - bool execTarget( const QString& ); + bool execTarget( const TQString& ); void saveConfig(); //*************************************** public slots: - void startCD( const QString &device="", bool rip=false ); - void startDVD( const QString &device="" ); - void startVCD( const QString &device="" ); + void startCD( const TQString &device="", bool rip=false ); + void startDVD( const TQString &device="" ); + void startVCD( const TQString &device="" ); void startRIP(); public: - QVBox *mainWidget; - QVBox *playerBox; + TQVBox *mainWidget; + TQVBox *playerBox; private: void loadConfig( KConfig* config ); @@ -110,24 +113,24 @@ private: void setCurrent( int n ); void setupActions(); - QLabel *artistLab, *albumLab; - QGuardedPtr<QWidget> widg; - QToolButton *ripBtn, *cdBtn; - QToolButton *enc; - QSplitter *split; - QGuardedPtr<QFrame> panel; + TQLabel *artistLab, *albumLab; + TQGuardedPtr<TQWidget> widg; + TQToolButton *ripBtn, *cdBtn; + TQToolButton *enc; + TQSplitter *split; + TQGuardedPtr<TQFrame> panel; MLabel *discLab; Paranoia *para; MListView *list; int trackCurrent; - QString currentDevice; - QPixmap currentPixmap; - QWidget *encodeWidget; - QTimer encodeTimer; - QProgressBar *progressBar; + TQString currentDevice; + TQPixmap currentPixmap; + TQWidget *encodeWidget; + TQTimer encodeTimer; + TQProgressBar *progressBar; private slots: - void trackSelected( QListViewItem* ); + void trackSelected( TQListViewItem* ); void encode(); void encodeProgress(); void setEncoding( bool ); diff --git a/kaffeine/src/input/disc/paranoia.cpp b/kaffeine/src/input/disc/paranoia.cpp index fad1729..9a32743 100644 --- a/kaffeine/src/input/disc/paranoia.cpp +++ b/kaffeine/src/input/disc/paranoia.cpp @@ -25,16 +25,16 @@ #include <unistd.h> #include <math.h> -#include <qfile.h> -#include <qslider.h> -#include <qlcdnumber.h> -#include <qdir.h> -#include <qlineedit.h> -#include <qbuttongroup.h> -#include <qtoolbutton.h> -#include <qcheckbox.h> +#include <tqfile.h> +#include <tqslider.h> +#include <tqlcdnumber.h> +#include <tqdir.h> +#include <tqlineedit.h> +#include <tqbuttongroup.h> +#include <tqtoolbutton.h> +#include <tqcheckbox.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <kmessagebox.h> #include <klocale.h> @@ -50,7 +50,7 @@ #define DEFAULT_DRIVE "/dev/cdrom" -KiloConfig::KiloConfig( QWidget *parent, KConfig *confile, const QStringList &encoders ) : ParanoiaSettings( parent ) +KiloConfig::KiloConfig( TQWidget *tqparent, KConfig *confile, const TQStringList &encoders ) : ParanoiaSettings( tqparent ) { int i; @@ -59,14 +59,14 @@ KiloConfig::KiloConfig( QWidget *parent, KConfig *confile, const QStringList &en cancelBtn->setGuiItem( KGuiItem(i18n("Cancel"), icon->loadIconSet("cancel", KIcon::Small) ) ); baseDirBtn->setIconSet( icon->loadIconSet("fileopen", KIcon::Small) ); delete icon; - connect( baseDirBtn, SIGNAL( clicked() ), this, SLOT( setBaseDir() ) ); + connect( baseDirBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setBaseDir() ) ); Conf = confile; Conf->setGroup( "Paranoia" ); - baseDirLineEdit->setText( Conf->readEntry( "Basedir", QDir::homeDirPath() ) ); + baseDirLineEdit->setText( Conf->readEntry( "Basedir", TQDir::homeDirPath() ) ); paranoiaGroup->setButton( Conf->readNumEntry( "Mode", 0 ) ); normCb->setChecked( Conf->readBoolEntry( "Normalize", false ) ); encoderComb->insertStringList( encoders ); - QString s = Conf->readEntry( "CurrentEncoder", "" ); + TQString s = Conf->readEntry( "CurrentEncoder", "" ); if ( !s.isEmpty() ) { for ( i=0; i<(int)encoders.count(); i++ ) { if ( encoders[i]==s ) { @@ -79,15 +79,15 @@ KiloConfig::KiloConfig( QWidget *parent, KConfig *confile, const QStringList &en void KiloConfig::setBaseDir() { Conf->setGroup( "Paranoia" ); - QString d = Conf->readEntry( "Basedir", QDir::homeDirPath() ); - QString u = KFileDialog::getExistingDirectory( d ); + TQString d = Conf->readEntry( "Basedir", TQDir::homeDirPath() ); + TQString u = KFileDialog::getExistingDirectory( d ); if ( u!="" ) { baseDirLineEdit->setText( u ); Conf->writeEntry( "Basedir", u ); } } -QString KiloConfig::getEncoder() +TQString KiloConfig::getEncoder() { return encoderComb->currentText(); } @@ -97,7 +97,7 @@ bool KiloConfig::getNormalize() return normCb->isChecked(); } -QString KiloConfig::getBaseDir() +TQString KiloConfig::getBaseDir() { return baseDirLineEdit->text().stripWhiteSpace(); } @@ -131,10 +131,10 @@ Paranoia::Paranoia() isRunning = false; } -bool Paranoia::init( QString dev ) +bool Paranoia::init( TQString dev ) { - QString s; - QFile f; + TQString s; + TQFile f; if ( p!=0 ) paranoia_free( p ); if (d!=0 ) cdda_close( d ); @@ -162,27 +162,27 @@ bool Paranoia::init( QString dev ) bool Paranoia::findCdrom() { - QFile *f; - QString c; - QString s=""; + TQFile *f; + TQString c; + TQString s=""; int pos, i; bool stop=false; char dev[4][4]={"","","",""}; - f = new QFile( "/proc/sys/dev/cdrom/info" ); + f = new TQFile( "/proc/sys/dev/cdrom/info" ); if ( !f->open(IO_ReadOnly) ) return false; - QTextStream t( f ); + TQTextStream t( f ); while ( !t.eof() && !stop ) { s = t.readLine(); - if ( s.contains("drive name:") ) + if ( s.tqcontains("drive name:") ) stop = true; } if ( !stop ) return false; - pos = s.find(":"); + pos = s.tqfind(":"); c = s.right( s.length()-pos-1 ); sscanf( c.latin1(), "%s %s %s %s", dev[0], dev[1], dev[2], dev[3] ); @@ -194,19 +194,19 @@ bool Paranoia::findCdrom() return false; } -bool Paranoia::procCdrom( QString name ) +bool Paranoia::procCdrom( TQString name ) { int pos; - if ( name.contains("sr") ) { - pos = name.find("r"); + if ( name.tqcontains("sr") ) { + pos = name.tqfind("r"); name = name.right( name.length()-pos-1 ); name = "/dev/scd"+name; d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); if ( cdda_open( d )==0 ) return true; } - else if ( name.contains("hd") ) { + else if ( name.tqcontains("hd") ) { name = "/dev/"+name; d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); if ( cdda_open( d )==0 ) @@ -227,14 +227,14 @@ void Paranoia::setMode( int mode ) paranoia_modeset( p, mode ); } -bool Paranoia::encode( const QStringList &list, QWidget *parent ) +bool Paranoia::encode( const TQStringList &list, TQWidget *tqparent ) { - QStringList desktop; - QStringList encoderName; + TQStringList desktop; + TQStringList encoderName; encodingList.clear(); encodingList = list; - myParent = parent; + myParent = tqparent; // check for encoders KTrader::OfferList offers = KTrader::self()->query("KaffeineAudioEncoder"); @@ -252,13 +252,13 @@ bool Paranoia::encode( const QStringList &list, QWidget *parent ) KiloConfig dlg( myParent, KGlobal::config(), encoderName ); int ret = dlg.exec(); - if ( ret!=QDialog::Accepted ) + if ( ret!=TQDialog::Accepted ) return false; normalize = dlg.getNormalize(); baseDir = dlg.getBaseDir(); paraMode = dlg.getParanoiaMode(); - QString s = dlg.getEncoder(); + TQString s = dlg.getEncoder(); for ( ret=0; ret<(int)encoderName.count(); ++ret ) { if ( encoderName[ret]==s ) { encoderDesktop = desktop[ret]; @@ -274,7 +274,7 @@ bool Paranoia::encode( const QStringList &list, QWidget *parent ) return false; } - if ( !setPath( baseDir, QString(encodingList[0]).replace("/","_"), QString(encodingList[1]).replace("/","_") ) ) { + if ( !setPath( baseDir, TQString(encodingList[0]).tqreplace("/","_"), TQString(encodingList[1]).tqreplace("/","_") ) ) { return false; } isRunning = true; @@ -282,20 +282,20 @@ bool Paranoia::encode( const QStringList &list, QWidget *parent ) return true; } -bool Paranoia::loadEncoder( QWidget *parent ) +bool Paranoia::loadEncoder( TQWidget *tqparent ) { int error = 0; KService::Ptr service = KService::serviceByDesktopName( encoderDesktop ); if (!service) { - KMessageBox::error( parent, i18n("Loading of encoder '%1' failed.").arg(encoderDesktop) ); + KMessageBox::error( tqparent, i18n("Loading of encoder '%1' failed.").tqarg(encoderDesktop) ); return false; } - if ( service->serviceTypes().contains("KaffeineAudioEncoder") ) { + if ( service->serviceTypes().tqcontains("KaffeineAudioEncoder") ) { currentEncoder = KParts::ComponentFactory::createPartInstanceFromService<KaffeineAudioEncoder>(service, 0, service->name().ascii(), 0, 0, 0, &error); if (error > 0) { - KMessageBox::error( parent, i18n("Loading of encoder '%1' failed.").arg(encoderDesktop) ); + KMessageBox::error( tqparent, i18n("Loading of encoder '%1' failed.").tqarg(encoderDesktop) ); return false; } else @@ -313,9 +313,9 @@ void Paranoia::unloadEncoder() //kdDebug()<<"... encoder unloaded."<<endl; } -bool Paranoia::validPath( QString path ) +bool Paranoia::validPath( TQString path ) { - QDir dir; + TQDir dir; dir.setPath( path ); if ( !dir.exists() ) { @@ -327,9 +327,9 @@ bool Paranoia::validPath( QString path ) return true; } -bool Paranoia::setPath( QString &path, const QString &artist, const QString &album ) +bool Paranoia::setPath( TQString &path, const TQString &artist, const TQString &album ) { - QString s; + TQString s; if ( !path.endsWith("/") ) path = path+"/"; @@ -368,10 +368,10 @@ void Paranoia::run() signed short *buf; int i, n, len, retlen; long curpos, endpos; - QFile f, fn; + TQFile f, fn; float max; float factor; - QString s; + TQString s; char *encoded; int overallSectors=0; int sectorCount=0; @@ -389,7 +389,7 @@ void Paranoia::run() for ( i=2; i<(int)encodingList.count(); ++i ) { n = encodingList[i].left(2).toInt(); - s = QString(encodingList[i]).replace("/","_")+currentEncoder->getExtension(); + s = TQString(encodingList[i]).tqreplace("/","_")+currentEncoder->getExtension(); f.setName( baseDir+s ); initTrack( n ); max = 0; @@ -509,9 +509,9 @@ bool Paranoia::isAudio( int t ) else return false; } -QString Paranoia::trackSize( int t ) +TQString Paranoia::trackSize( int t ) { - QString s, c; + TQString s, c; long total; total = CDIO_CD_FRAMESIZE_RAW * (cdda_track_lastsector( d, t+1 )-cdda_track_firstsector( d, t+1 ) ); @@ -526,9 +526,9 @@ long Paranoia::trackSectorSize( int t ) return cdda_track_lastsector( d, t )-cdda_track_firstsector( d, t ); } -QString Paranoia::trackTime( int t ) +TQString Paranoia::trackTime( int t ) { - QString c; + TQString c; long total, time; int m, s; diff --git a/kaffeine/src/input/disc/paranoia.h b/kaffeine/src/input/disc/paranoia.h index ae269d4..0957ffe 100644 --- a/kaffeine/src/input/disc/paranoia.h +++ b/kaffeine/src/input/disc/paranoia.h @@ -21,9 +21,9 @@ #ifndef PARANOIA_H #define PARANOIA_H -#include <qstringlist.h> -#include <qthread.h> -#include <qwidget.h> +#include <tqstringlist.h> +#include <tqthread.h> +#include <tqwidget.h> #include <kconfig.h> @@ -39,15 +39,16 @@ extern "C" class KiloConfig : public ParanoiaSettings { Q_OBJECT + TQ_OBJECT public: - KiloConfig( QWidget *parent, KConfig *confile, const QStringList &encoders ); + KiloConfig( TQWidget *tqparent, KConfig *confile, const TQStringList &encoders ); ~KiloConfig(); - QString getEncoder(); + TQString getEncoder(); bool getNormalize(); - QString getBaseDir(); + TQString getBaseDir(); int getParanoiaMode(); public slots: @@ -60,15 +61,15 @@ private: KConfig *Conf; }; -class Paranoia : public QThread +class Paranoia : public TQThread { public: Paranoia(); - bool init( QString dev ); + bool init( TQString dev ); ~Paranoia(); - bool encode( const QStringList&, QWidget* ); + bool encode( const TQStringList&, TQWidget* ); long getTracks(); - QString trackTime( int t ); + TQString trackTime( int t ); int trackFirstSector( int t ); int discFirstSector(); int discLastSector(); @@ -79,28 +80,28 @@ public: private: bool findCdrom(); - bool procCdrom( QString name ); + bool procCdrom( TQString name ); bool initTrack( int t ); void setMode( int mode ); bool isAudio( int t ); - QString trackSize( int t ); + TQString trackSize( int t ); long trackSectorSize( int t ); - bool loadEncoder( QWidget* ); + bool loadEncoder( TQWidget* ); void unloadEncoder(); - bool validPath( QString path ); - bool setPath( QString &path, const QString &artist, const QString &album ); + bool validPath( TQString path ); + bool setPath( TQString &path, const TQString &artist, const TQString &album ); long nTracks; cdrom_drive_t *d; cdrom_paranoia_t *p; long currentSector, endOfTrack; bool isRunning; - QStringList encodingList; - QWidget *myParent; + TQStringList encodingList; + TQWidget *myParent; KaffeineAudioEncoder *currentEncoder; - QString encoderDesktop; + TQString encoderDesktop; bool normalize; - QString baseDir; + TQString baseDir; int paraMode; int progress; }; diff --git a/kaffeine/src/input/disc/paranoiasettings.ui b/kaffeine/src/input/disc/paranoiasettings.ui index 487899c..d73e492 100644 --- a/kaffeine/src/input/disc/paranoiasettings.ui +++ b/kaffeine/src/input/disc/paranoiasettings.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ParanoiaSettings</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ParanoiaSettings</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>encoderGroup</cstring> </property> @@ -41,14 +41,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="0" column="0"> + <widget class="TQComboBox" row="0" column="0"> <property name="name"> <cstring>encoderComb</cstring> </property> </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>basedirGroup</cstring> </property> @@ -65,7 +65,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QToolButton" row="0" column="1"> + <widget class="TQToolButton" row="0" column="1"> <property name="name"> <cstring>baseDirBtn</cstring> </property> @@ -73,7 +73,7 @@ <string>...</string> </property> </widget> - <widget class="QLineEdit" row="0" column="0"> + <widget class="TQLineEdit" row="0" column="0"> <property name="name"> <cstring>baseDirLineEdit</cstring> </property> @@ -91,7 +91,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>paranoiaGroup</cstring> </property> @@ -108,7 +108,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>paranoiaRb0</cstring> </property> @@ -116,7 +116,7 @@ <string>Disable all checking</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>paranoiaRb1</cstring> </property> @@ -124,7 +124,7 @@ <string>Normal mode</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>paranoiaRb2</cstring> </property> @@ -134,7 +134,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -145,7 +145,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>normCb</cstring> </property> @@ -165,16 +165,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -190,7 +190,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>152</width> <height>20</height> @@ -248,5 +248,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.cpp b/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.cpp index 5198e43..85b9f7a 100644 --- a/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.cpp +++ b/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.cpp @@ -21,7 +21,7 @@ #include "kaffeineaudioencoder.h" #include "kaffeineaudioencoder.moc" -KaffeineAudioEncoder::KaffeineAudioEncoder(QObject* parent, const char* name) : KParts::Part( parent, name ) +KaffeineAudioEncoder::KaffeineAudioEncoder(TQObject* tqparent, const char* name) : KParts::Part( tqparent, name ) { } diff --git a/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.h b/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.h index 1dc3616..3cfc570 100644 --- a/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.h +++ b/kaffeine/src/input/disc/plugins/kaffeineaudioencoder.h @@ -24,8 +24,8 @@ #include <kparts/part.h> #include <kconfig.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> /* * Base-Class for Kaffeine audio encoder plugins. @@ -34,17 +34,18 @@ class KDE_EXPORT KaffeineAudioEncoder : public KParts::Part { Q_OBJECT + TQ_OBJECT public: - KaffeineAudioEncoder(QObject* parent, const char* name); + KaffeineAudioEncoder(TQObject* tqparent, const char* name); virtual ~KaffeineAudioEncoder(); // return false if the user's canceled. - virtual bool options( QWidget*, KConfig* ) {return false;} + virtual bool options( TQWidget*, KConfig* ) {return false;} // your file extension, e.g. ".ogg" - virtual QString getExtension() {return QString();} + virtual TQString getExtension() {return TQString();} - virtual void start( QString/*title*/=0, QString/*artist*/=0, QString/*album*/=0, QString/*tracknumber*/=0, QString/*genre*/=0 ) {} + virtual void start( TQString/*title*/=0, TQString/*artist*/=0, TQString/*album*/=0, TQString/*tracknumber*/=0, TQString/*genre*/=0 ) {} virtual char* getHeader( int&/*len*/ ) {return NULL;} virtual char* encode( char*/*data*/, int /*datalen*/, int&/*len*/ ) {return NULL;} virtual char* stop( int& /*len*/) {return NULL;} diff --git a/kaffeine/src/input/disc/plugins/mp3lame/klameenc.cpp b/kaffeine/src/input/disc/plugins/mp3lame/klameenc.cpp index ddfc5c2..19f3737 100644 --- a/kaffeine/src/input/disc/plugins/mp3lame/klameenc.cpp +++ b/kaffeine/src/input/disc/plugins/mp3lame/klameenc.cpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kparts/genericfactory.h> #include <klocale.h> @@ -29,7 +29,7 @@ #include "klameenc.h" #include "klameenc.moc" -LameSettings::LameSettings( QWidget *parent, KConfig *confile ) : LameConfig( parent ) +LameSettings::LameSettings( TQWidget *tqparent, KConfig *confile ) : LameConfig( tqparent ) { KIconLoader *icon = new KIconLoader(); okBtn->setGuiItem( KGuiItem(i18n("OK"), icon->loadIconSet("ok", KIcon::Small) ) ); @@ -79,8 +79,8 @@ bool LameSettings::isVBR() K_EXPORT_COMPONENT_FACTORY (libkaffeinemp3lame, KParts::GenericFactory<KLameEnc>) -KLameEnc::KLameEnc( QWidget*, const char*, QObject* parent, const char* name, const QStringList& ) - : KaffeineAudioEncoder(parent,name) +KLameEnc::KLameEnc( TQWidget*, const char*, TQObject* tqparent, const char* name, const TQStringList& ) + : KaffeineAudioEncoder(tqparent,name) { setInstance(KParts::GenericFactory<KLameEnc>::instance()); } @@ -96,23 +96,23 @@ KAboutData *KLameEnc::createAboutData() return aboutData; } -QString KLameEnc::getExtension() +TQString KLameEnc::getExtension() { - return QString(".mp3"); + return TQString(".mp3"); } -bool KLameEnc::options( QWidget *parent, KConfig *conf ) +bool KLameEnc::options( TQWidget *tqparent, KConfig *conf ) { - LameSettings dlg( parent, conf ); + LameSettings dlg( tqparent, conf ); int ret = dlg.exec(); - if ( ret!=QDialog::Accepted ) + if ( ret!=TQDialog::Accepted ) return false; bitrate = dlg.getBitrate(); vbr = dlg.isVBR(); return true; } -void KLameEnc::start( QString title, QString artist, QString album, QString tracknumber, QString genre ) +void KLameEnc::start( TQString title, TQString artist, TQString album, TQString tracknumber, TQString genre ) { flags = lame_init(); lame_set_mode( flags, STEREO ); diff --git a/kaffeine/src/input/disc/plugins/mp3lame/klameenc.h b/kaffeine/src/input/disc/plugins/mp3lame/klameenc.h index 0550149..faa944e 100644 --- a/kaffeine/src/input/disc/plugins/mp3lame/klameenc.h +++ b/kaffeine/src/input/disc/plugins/mp3lame/klameenc.h @@ -31,8 +31,9 @@ class LameSettings : public LameConfig { Q_OBJECT + TQ_OBJECT public: - LameSettings( QWidget *parent, KConfig *confile ); + LameSettings( TQWidget *tqparent, KConfig *confile ); ~LameSettings(); int getBitrate(); @@ -48,16 +49,17 @@ private: class KLameEnc : public KaffeineAudioEncoder { Q_OBJECT + TQ_OBJECT public: - KLameEnc( QWidget*, const char*, QObject*, const char*, const QStringList& ); + KLameEnc( TQWidget*, const char*, TQObject*, const char*, const TQStringList& ); ~KLameEnc(); // Reimplemented from KaffeineAudioEncoder - bool options( QWidget*, KConfig* ); - QString getExtension(); - void start( QString title=0, QString artist=0, QString album=0, QString tracknumber=0, QString genre=0 ); + bool options( TQWidget*, KConfig* ); + TQString getExtension(); + void start( TQString title=0, TQString artist=0, TQString album=0, TQString tracknumber=0, TQString genre=0 ); char* getHeader( int &len ); char* encode( char *data, int datalen, int &len ); char* stop( int &len ); diff --git a/kaffeine/src/input/disc/plugins/mp3lame/lameconfig.ui b/kaffeine/src/input/disc/plugins/mp3lame/lameconfig.ui index 202040a..bb184cd 100644 --- a/kaffeine/src/input/disc/plugins/mp3lame/lameconfig.ui +++ b/kaffeine/src/input/disc/plugins/mp3lame/lameconfig.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>LameConfig</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>LameConfig</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -41,7 +41,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>vbrCb</cstring> </property> @@ -49,15 +49,15 @@ <string>VBR</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -73,12 +73,12 @@ <string>Bitrate:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>brateComb</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -108,16 +108,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -133,7 +133,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>107</width> <height>20</height> @@ -191,5 +191,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.cpp b/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.cpp index f5352b8..a96898c 100644 --- a/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.cpp +++ b/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.cpp @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qslider.h> +#include <tqslider.h> #include <kparts/genericfactory.h> #include <kiconloader.h> @@ -27,7 +27,7 @@ #include "koggenc.h" #include "koggenc.moc" -OggSettings::OggSettings( QWidget *parent, KConfig *confile ) : OggConfig( parent ) +OggSettings::OggSettings( TQWidget *tqparent, KConfig *confile ) : OggConfig( tqparent ) { KIconLoader *icon = new KIconLoader(); okBtn->setGuiItem( KGuiItem(i18n("OK"), icon->loadIconSet("ok", KIcon::Small) ) ); @@ -56,8 +56,8 @@ int OggSettings::getQuality() K_EXPORT_COMPONENT_FACTORY (libkaffeineoggvorbis, KParts::GenericFactory<KOggEnc>) -KOggEnc::KOggEnc( QWidget*, const char*, QObject* parent, const char* name, const QStringList& ) - : KaffeineAudioEncoder(parent,name) +KOggEnc::KOggEnc( TQWidget*, const char*, TQObject* tqparent, const char* name, const TQStringList& ) + : KaffeineAudioEncoder(tqparent,name) { setInstance(KParts::GenericFactory<KOggEnc>::instance()); encodingQuality = 0.4; @@ -76,22 +76,22 @@ KAboutData *KOggEnc::createAboutData() return aboutData; } -QString KOggEnc::getExtension() +TQString KOggEnc::getExtension() { - return QString(".ogg"); + return TQString(".ogg"); } -bool KOggEnc::options( QWidget *parent, KConfig *conf ) +bool KOggEnc::options( TQWidget *tqparent, KConfig *conf ) { - OggSettings dlg( parent, conf ); + OggSettings dlg( tqparent, conf ); int ret = dlg.exec(); - if ( ret!=QDialog::Accepted ) + if ( ret!=TQDialog::Accepted ) return false; encodingQuality = dlg.getQuality()/10.0; return true; } -void KOggEnc::start( QString title, QString artist, QString album, QString tracknumber, QString genre ) +void KOggEnc::start( TQString title, TQString artist, TQString album, TQString tracknumber, TQString genre ) { char* tag; diff --git a/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.h b/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.h index 9560a53..be2c9b6 100644 --- a/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.h +++ b/kaffeine/src/input/disc/plugins/oggvorbis/koggenc.h @@ -39,8 +39,9 @@ extern "C" class OggSettings : public OggConfig { Q_OBJECT + TQ_OBJECT public: - OggSettings( QWidget *parent, KConfig *confile ); + OggSettings( TQWidget *tqparent, KConfig *confile ); ~OggSettings(); int getQuality(); @@ -55,16 +56,17 @@ private: class KOggEnc : public KaffeineAudioEncoder { Q_OBJECT + TQ_OBJECT public: - KOggEnc( QWidget*, const char*, QObject*, const char*, const QStringList& ); + KOggEnc( TQWidget*, const char*, TQObject*, const char*, const TQStringList& ); ~KOggEnc(); // Reimplemented from KaffeineAudioEncoder - bool options( QWidget*, KConfig* ); - QString getExtension(); - void start( QString title=0, QString artist=0, QString album=0, QString tracknumber=0, QString genre=0 ); + bool options( TQWidget*, KConfig* ); + TQString getExtension(); + void start( TQString title=0, TQString artist=0, TQString album=0, TQString tracknumber=0, TQString genre=0 ); char* getHeader( int &len ); char* encode( char *data, int datalen, int &len ); char* stop( int &len ); diff --git a/kaffeine/src/input/disc/plugins/oggvorbis/oggconfig.ui b/kaffeine/src/input/disc/plugins/oggvorbis/oggconfig.ui index 178e938..91576ef 100644 --- a/kaffeine/src/input/disc/plugins/oggvorbis/oggconfig.ui +++ b/kaffeine/src/input/disc/plugins/oggvorbis/oggconfig.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>OggConfig</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>OggConfig</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -47,7 +47,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLCDNumber" row="1" column="1"> + <widget class="TQLCDNumber" row="1" column="1"> <property name="name"> <cstring>oggLCD</cstring> </property> @@ -64,7 +64,7 @@ <number>0</number> </property> </widget> - <widget class="QSlider" row="1" column="0"> + <widget class="TQSlider" row="1" column="0"> <property name="name"> <cstring>oggSlid</cstring> </property> @@ -78,7 +78,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -98,16 +98,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>81</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> @@ -123,7 +123,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>157</width> <height>20</height> @@ -187,5 +187,5 @@ <slot>display(int)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/audioeditor.cpp b/kaffeine/src/input/dvb/audioeditor.cpp index a8d8a5f..0f3e8c9 100644 --- a/kaffeine/src/input/dvb/audioeditor.cpp +++ b/kaffeine/src/input/dvb/audioeditor.cpp @@ -18,20 +18,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qlistbox.h> -#include <qspinbox.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlistbox.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kmessagebox.h> #include <klocale.h> #include "audioeditor.h" -AudioEditor::AudioEditor( ChannelDesc *chan, QWidget *parent ) : AudioEditorUI( parent ) +AudioEditor::AudioEditor( ChannelDesc *chan, TQWidget *tqparent ) : AudioEditorUI( tqparent ) { - QString s, t; + TQString s, t; int i; channel = chan; @@ -41,17 +41,17 @@ AudioEditor::AudioEditor( ChannelDesc *chan, QWidget *parent ) : AudioEditorUI( if ( channel->napid==channel->maxapid ) newBtn->setEnabled( false ); - connect( pidList, SIGNAL(highlighted(int)), this, SLOT(showProp(int)) ); - connect( upBtn, SIGNAL(clicked()), this, SLOT(itemUp()) ); - connect( downBtn, SIGNAL(clicked()), this, SLOT(itemDown()) ); - connect( delBtn, SIGNAL(clicked()), this, SLOT(itemDelete()) ); - connect( updateBtn, SIGNAL(clicked()), this, SLOT(itemUpdate()) ); - connect( newBtn, SIGNAL(clicked()), this, SLOT(itemNew()) ); + connect( pidList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(showProp(int)) ); + connect( upBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemUp()) ); + connect( downBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemDown()) ); + connect( delBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemDelete()) ); + connect( updateBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemUpdate()) ); + connect( newBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemNew()) ); } void AudioEditor::insertItem( int index, bool updt ) { - QString s, t; + TQString s, t; s = t.setNum( channel->apid[index].pid ); if ( !channel->apid[index].lang.isEmpty() ) s = s+"("+channel->apid[index].lang+")"; diff --git a/kaffeine/src/input/dvb/audioeditor.h b/kaffeine/src/input/dvb/audioeditor.h index 8751505..2422264 100644 --- a/kaffeine/src/input/dvb/audioeditor.h +++ b/kaffeine/src/input/dvb/audioeditor.h @@ -27,10 +27,11 @@ class AudioEditor : public AudioEditorUI { Q_OBJECT + TQ_OBJECT public: - AudioEditor( ChannelDesc *chan, QWidget *parent ); + AudioEditor( ChannelDesc *chan, TQWidget *tqparent ); ~AudioEditor(); private slots: diff --git a/kaffeine/src/input/dvb/audioeditorui.ui b/kaffeine/src/input/dvb/audioeditorui.ui index 20b07ef..945520c 100644 --- a/kaffeine/src/input/dvb/audioeditorui.ui +++ b/kaffeine/src/input/dvb/audioeditorui.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AudioEditorUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>AudioEditorUI</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,23 +19,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox10</cstring> </property> @@ -46,7 +46,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox" row="0" column="0"> + <widget class="TQListBox" row="0" column="0"> <item> <property name="text"> <string>New Item</string> @@ -58,31 +58,31 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>upBtn</cstring> </property> @@ -90,7 +90,7 @@ <string>Move Up</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>downBtn</cstring> </property> @@ -98,7 +98,7 @@ <string>Move Down</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>delBtn</cstring> </property> @@ -118,7 +118,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -137,30 +137,30 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>updateBtn</cstring> </property> @@ -168,7 +168,7 @@ <string><< Update Selected</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>newBtn</cstring> </property> @@ -178,7 +178,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox9</cstring> </property> @@ -189,7 +189,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>pidSpin</cstring> </property> @@ -197,7 +197,7 @@ <number>8192</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -205,7 +205,7 @@ <string>Pid:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -213,7 +213,7 @@ <string>Lang:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>ac3Cb</cstring> </property> @@ -221,7 +221,7 @@ <string>AC3</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>langLe</cstring> </property> @@ -256,9 +256,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> @@ -274,14 +274,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okBtn</cstring> </property> @@ -315,5 +315,5 @@ <tabstop>langLe</tabstop> <tabstop>ac3Cb</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/broadcasteditor.cpp b/kaffeine/src/input/dvb/broadcasteditor.cpp index 0e6c8a6..9e3c86c 100644 --- a/kaffeine/src/input/dvb/broadcasteditor.cpp +++ b/kaffeine/src/input/dvb/broadcasteditor.cpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qdir.h> -#include <qvaluelist.h> +#include <tqdir.h> +#include <tqvaluelist.h> #include <kpushbutton.h> #include <kiconloader.h> @@ -27,7 +27,7 @@ #include "broadcasteditor.h" -BroadcastEditor::BroadcastEditor( QWidget *parent, QPtrList<ChannelDesc> *ch, QPtrList<ChannelDesc> *ret ) : BroadcastEditorUI( parent ) +BroadcastEditor::BroadcastEditor( TQWidget *tqparent, TQPtrList<ChannelDesc> *ch, TQPtrList<ChannelDesc> *ret ) : BroadcastEditorUI( tqparent ) { KIconLoader *icon = new KIconLoader(); @@ -40,7 +40,7 @@ BroadcastEditor::BroadcastEditor( QWidget *parent, QPtrList<ChannelDesc> *ch, QP cancelBtn->setGuiItem( KGuiItem(i18n("Cancel"), icon->loadIconSet("cancel", KIcon::Small) ) ); okBtn->setGuiItem( KGuiItem(i18n("OK"), icon->loadIconSet("ok", KIcon::Small) ) ); - connect( channelLb, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(slotAddChannel(QListBoxItem*)) ); + connect( channelLb, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), this, TQT_SLOT(slotAddChannel(TQListBoxItem*)) ); chan = ch; list = ret; @@ -53,7 +53,7 @@ BroadcastEditor::~BroadcastEditor() { } -ChannelDesc* BroadcastEditor::getChannel( const QString &name ) +ChannelDesc* BroadcastEditor::getChannel( const TQString &name ) { int i; @@ -63,7 +63,7 @@ ChannelDesc* BroadcastEditor::getChannel( const QString &name ) return 0; } -void BroadcastEditor::slotAddChannel(QListBoxItem*) +void BroadcastEditor::slotAddChannel(TQListBoxItem*) { addToList(); } @@ -71,8 +71,8 @@ void BroadcastEditor::slotAddChannel(QListBoxItem*) void BroadcastEditor::addToList() { int i; - QString curName; - QValueList<QListBoxItem*> qvl; + TQString curName; + TQValueList<TQListBoxItem*> qvl; ChannelDesc *c=0, *d=0; for ( i=0; i<(int)channelLb->count(); i++ ) { @@ -96,7 +96,7 @@ void BroadcastEditor::addToList() } for ( i=0; i<(int)qvl.count(); i++ ) channelLb->takeItem( qvl[i] ); - channelLb->setSelectionMode( QListBox::Extended ); + channelLb->setSelectionMode( TQListBox::Extended ); } bool BroadcastEditor::getChannelList() @@ -126,7 +126,7 @@ void BroadcastEditor::resetList() list->clear(); getChannelList(); channelLb->sort(); - channelLb->setSelectionMode( QListBox::Single ); + channelLb->setSelectionMode( TQListBox::Single ); } #include "broadcasteditor.moc" diff --git a/kaffeine/src/input/dvb/broadcasteditor.h b/kaffeine/src/input/dvb/broadcasteditor.h index 13c619f..86d5fad 100644 --- a/kaffeine/src/input/dvb/broadcasteditor.h +++ b/kaffeine/src/input/dvb/broadcasteditor.h @@ -21,9 +21,9 @@ #ifndef BROADCASTEDITOR_H #define BROADCASTEDITOR_H -#include <qpixmap.h> -#include <qfile.h> -#include <qlistbox.h> +#include <tqpixmap.h> +#include <tqfile.h> +#include <tqlistbox.h> #include "broadcasteditorui.h" #include "channeldesc.h" @@ -31,27 +31,28 @@ class BroadcastEditor : public BroadcastEditorUI { Q_OBJECT + TQ_OBJECT public: - BroadcastEditor( QWidget *parent, QPtrList<ChannelDesc> *ch, QPtrList<ChannelDesc> *ret ); + BroadcastEditor( TQWidget *tqparent, TQPtrList<ChannelDesc> *ch, TQPtrList<ChannelDesc> *ret ); ~BroadcastEditor(); - QPtrList<ChannelDesc> *chan; - QPtrList<ChannelDesc> *list; + TQPtrList<ChannelDesc> *chan; + TQPtrList<ChannelDesc> *list; public slots: virtual void addToList(); virtual void resetList(); - void slotAddChannel(QListBoxItem*); + void slotAddChannel(TQListBoxItem*); private: bool getChannelList(); - ChannelDesc* getChannel( const QString &name ); + ChannelDesc* getChannel( const TQString &name ); - QPixmap tvPix, raPix, tvcPix, racPix; + TQPixmap tvPix, raPix, tvcPix, racPix; }; diff --git a/kaffeine/src/input/dvb/broadcasteditorui.ui b/kaffeine/src/input/dvb/broadcasteditorui.ui index 034bd39..b14d625 100644 --- a/kaffeine/src/input/dvb/broadcasteditorui.ui +++ b/kaffeine/src/input/dvb/broadcasteditorui.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>BroadcastEditorUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>BroadcastEditorUI</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>Layout6</cstring> </property> @@ -39,7 +39,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -53,7 +53,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout2</cstring> </property> @@ -67,7 +67,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -78,7 +78,7 @@ <bool>false</bool> </property> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <item> <property name="text"> <string>New Item</string> @@ -93,7 +93,7 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -117,7 +117,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -150,7 +150,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -159,7 +159,7 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout3</cstring> </property> @@ -173,7 +173,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -181,7 +181,7 @@ <string>Broadcasting list:</string> </property> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <item> <property name="text"> <string>New Item</string> @@ -212,7 +212,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -244,7 +244,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -301,11 +301,11 @@ <tabstop>cancelBtn</tabstop> <tabstop>okBtn</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>addToList()</slot> <slot>resetList()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kaffeine/src/input/dvb/camdialog.ui b/kaffeine/src/input/dvb/camdialog.ui index b1c3032..4a04607 100644 --- a/kaffeine/src/input/dvb/camdialog.ui +++ b/kaffeine/src/input/dvb/camdialog.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CamDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CamDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,23 +19,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -43,7 +43,7 @@ <string>Maximum Concurrent Services:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>maxServiceSpin</cstring> </property> @@ -53,7 +53,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -64,7 +64,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -72,7 +72,7 @@ <string>Application Type:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -80,7 +80,7 @@ <string>Manufacturer Code:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -88,7 +88,7 @@ <string>Menu String:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>manuCodeLab</cstring> </property> @@ -96,7 +96,7 @@ <string>_</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>appManuLab</cstring> </property> @@ -104,7 +104,7 @@ <string>_</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -112,7 +112,7 @@ <string>Application Manufacturer:</string> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>menuStringLab</cstring> </property> @@ -120,7 +120,7 @@ <string>_</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>appTypeLab</cstring> </property> @@ -130,7 +130,7 @@ </widget> </grid> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>camMenuBtn</cstring> </property> @@ -145,5 +145,5 @@ <tabstops> <tabstop>maxServiceSpin</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/cammenudialog.ui b/kaffeine/src/input/dvb/cammenudialog.ui index 6eebfa4..e7123f9 100644 --- a/kaffeine/src/input/dvb/cammenudialog.ui +++ b/kaffeine/src/input/dvb/cammenudialog.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CamMenuDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CamMenuDialog</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,28 +19,28 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTextBrowser"> + <widget class="TQTextBrowser"> <property name="name"> <cstring>menuText</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -48,7 +48,7 @@ <string>Your choice (enter to validate):</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>inputLine</cstring> </property> @@ -63,5 +63,5 @@ <tabstop>inputLine</tabstop> <tabstop>menuText</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/channeldesc.h b/kaffeine/src/input/dvb/channeldesc.h index ef07011..cb50c00 100644 --- a/kaffeine/src/input/dvb/channeldesc.h +++ b/kaffeine/src/input/dvb/channeldesc.h @@ -21,11 +21,11 @@ #ifndef CHANNELDESC_H #define CHANNELDESC_H -#include <qstring.h> -#include <qptrlist.h> -#include <qdatetime.h> -#include <qvaluelist.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> +#include <tqpixmap.h> #include <linux/dvb/frontend.h> @@ -39,11 +39,11 @@ class RecTimer public: - QString name; - QString fullPath; - QString channel; - QDateTime begin; - QTime duration; + TQString name; + TQString fullPath; + TQString channel; + TQDateTime begin; + TQTime duration; char running; int mode; }; @@ -58,7 +58,7 @@ public: ~AudioPid(); unsigned short pid; - QString lang; + TQString lang; char ac3; }; @@ -69,7 +69,7 @@ public: unsigned short pid, page, id; unsigned char type; - QString lang; + TQString lang; }; class Transponder @@ -84,10 +84,10 @@ public: bool operator==( const Transponder &t ); bool operator!=( const Transponder &t ); - QString source; + TQString source; fe_type_t type; // S, C or T unsigned long freq; - QValueList<unsigned long> freqlist; + TQValueList<unsigned long> freqlist; char pol; unsigned long sr; unsigned short nid; @@ -114,9 +114,9 @@ public: ChannelDesc( const ChannelDesc &chan ); //copy ~ChannelDesc(); - QString provider; - QString name; - QString category; + TQString provider; + TQString name; + TQString category; unsigned int num; unsigned short sid; unsigned short vpid; @@ -133,7 +133,7 @@ public: unsigned char type; // 1 for TV , 2 for RA int completed; Transponder tp; - QPixmap pix; + TQPixmap pix; }; #endif /* CHANNELDESC_H */ diff --git a/kaffeine/src/input/dvb/channeleditor.cpp b/kaffeine/src/input/dvb/channeleditor.cpp index 18ea8ce..61ab9f0 100644 --- a/kaffeine/src/input/dvb/channeleditor.cpp +++ b/kaffeine/src/input/dvb/channeleditor.cpp @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kmessagebox.h> @@ -34,7 +34,7 @@ #include "audioeditor.h" #include "subeditor.h" -ChannelEditor::ChannelEditor( QStringList src, bool m, ChannelDesc *chan, QPtrList<ChannelDesc> *cdesc, QWidget *parent ) : ChannelEditorUI( parent ) +ChannelEditor::ChannelEditor( TQStringList src, bool m, ChannelDesc *chan, TQPtrList<ChannelDesc> *cdesc, TQWidget *tqparent ) : ChannelEditorUI( tqparent ) { int i; channel = chan; @@ -75,8 +75,8 @@ ChannelEditor::ChannelEditor( QStringList src, bool m, ChannelDesc *chan, QPtrLi } nameLe->setText( channel->name ); - connect( apidBtn, SIGNAL(clicked()), this, SLOT(editAudio()) ); - connect( subpidBtn, SIGNAL(clicked()), this, SLOT(editSubtitle()) ); + connect( apidBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editAudio()) ); + connect( subpidBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editSubtitle()) ); } void ChannelEditor::editAudio() @@ -96,7 +96,7 @@ void ChannelEditor::editSubtitle() void ChannelEditor::accept() { int ret, i; - QString name; + TQString name; name = nameLe->text().stripWhiteSpace(); if ( name.isEmpty() ) { @@ -261,73 +261,73 @@ void ChannelEditor::initA() rolloffComb->setEnabled( false ); } -QStringList ChannelEditor::inversionList() +TQStringList ChannelEditor::inversionList() { - QStringList list; + TQStringList list; list<<"OFF"<<"ON"<<"AUTO"; return list; } -QStringList ChannelEditor::coderateList() +TQStringList ChannelEditor::coderateList() { - QStringList list; + TQStringList list; list<<"NONE"<<"1/2"<<"2/3"<<"3/4"<<"4/5"<<"5/6"<<"6/7"<<"7/8"<<"8/9"<<"AUTO"<<"3/5"<<"9/10"; return list; } -QStringList ChannelEditor::modulationList() +TQStringList ChannelEditor::modulationList() { - QStringList list; + TQStringList list; list<<"QPSK"<<"QAM 16"<<"QAM 32"<<"QAM 64"<<"QAM 128"<<"QAM 256"<<"AUTO"<<"VSB-8"<<"VSB-16"<<"8PSK"<<"16APSK"<<"DQPSK"; return list; } -QStringList ChannelEditor::transmissionList() +TQStringList ChannelEditor::transmissionList() { - QStringList list; + TQStringList list; list<<"2K"<<"8K"<<"AUTO"; return list; } -QStringList ChannelEditor::bandwidthList() +TQStringList ChannelEditor::bandwidthList() { - QStringList list; + TQStringList list; list<<"8 MHz"<<"7 MHz"<<"6 MHz"<<"AUTO"; return list; } -QStringList ChannelEditor::hierarchyList() +TQStringList ChannelEditor::hierarchyList() { - QStringList list; + TQStringList list; list<<"NONE"<<"1"<<"2"<<"4"<<"AUTO"; return list; } -QStringList ChannelEditor::guardList() +TQStringList ChannelEditor::guardList() { - QStringList list; + TQStringList list; list<<"1/32"<<"1/16"<<"1/8"<<"1/4"<<"AUTO"; return list; } -QStringList ChannelEditor::stypeList() +TQStringList ChannelEditor::stypeList() { - QStringList list; + TQStringList list; list<<"DVB-S"<<"DVB-S2"; return list; } -QStringList ChannelEditor::rolloffList() +TQStringList ChannelEditor::rolloffList() { - QStringList list; + TQStringList list; list<<"35"<<"20"<<"25"<<"AUTO"; return list; diff --git a/kaffeine/src/input/dvb/channeleditor.h b/kaffeine/src/input/dvb/channeleditor.h index 586b9a3..69221b1 100644 --- a/kaffeine/src/input/dvb/channeleditor.h +++ b/kaffeine/src/input/dvb/channeleditor.h @@ -21,7 +21,7 @@ #ifndef CHANNELEDITOR_H #define CHANNELEDITOR_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "channeleditorui.h" #include "channeldesc.h" @@ -29,10 +29,11 @@ class ChannelEditor : public ChannelEditorUI { Q_OBJECT + TQ_OBJECT public: - ChannelEditor( QStringList src, bool m, ChannelDesc *chan, QPtrList<ChannelDesc> *cdesc, QWidget *parent ); + ChannelEditor( TQStringList src, bool m, ChannelDesc *chan, TQPtrList<ChannelDesc> *cdesc, TQWidget *tqparent ); ~ChannelEditor(); protected: @@ -50,20 +51,20 @@ private: void initC(); void initT(); void initA(); - QStringList inversionList(); - QStringList coderateList(); - QStringList modulationList(); - QStringList transmissionList(); - QStringList bandwidthList(); - QStringList hierarchyList(); - QStringList guardList(); - QStringList stypeList(); - QStringList rolloffList(); + TQStringList inversionList(); + TQStringList coderateList(); + TQStringList modulationList(); + TQStringList transmissionList(); + TQStringList bandwidthList(); + TQStringList hierarchyList(); + TQStringList guardList(); + TQStringList stypeList(); + TQStringList rolloffList(); ChannelDesc *channel; - QPtrList<ChannelDesc> *chandesc; + TQPtrList<ChannelDesc> *chandesc; bool mode; - QString orgName; + TQString orgName; int chanNum; }; diff --git a/kaffeine/src/input/dvb/channeleditorui.ui b/kaffeine/src/input/dvb/channeleditorui.ui index 09bdad1..3ccacf8 100644 --- a/kaffeine/src/input/dvb/channeleditorui.ui +++ b/kaffeine/src/input/dvb/channeleditorui.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ChannelEditorUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ChannelEditorUI</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -33,23 +33,23 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -57,7 +57,7 @@ <string>Source:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>sourceComb</cstring> </property> @@ -72,7 +72,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -81,15 +81,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -105,7 +105,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>nameLe</cstring> </property> @@ -118,7 +118,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -126,7 +126,7 @@ <string>Nr:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>numSpin</cstring> </property> @@ -136,15 +136,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>freqGroup</cstring> </property> @@ -155,7 +155,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>polGroup</cstring> </property> @@ -166,7 +166,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>verticalRadio</cstring> </property> @@ -174,7 +174,7 @@ <string>Vertical</string> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>horizontalRadio</cstring> </property> @@ -184,7 +184,7 @@ </widget> </grid> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -200,7 +200,7 @@ <string>Frequency:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -216,7 +216,7 @@ <string>Symbol rate:</string> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>srSpin</cstring> </property> @@ -224,7 +224,7 @@ <number>99999</number> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>freqSpin</cstring> </property> @@ -238,7 +238,7 @@ <number>0</number> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>ftaCb</cstring> </property> @@ -248,7 +248,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>pidsGroup</cstring> </property> @@ -259,15 +259,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>tsidSpin</cstring> </property> @@ -275,7 +275,7 @@ <number>65535</number> </property> </widget> - <widget class="QSpinBox" row="4" column="1"> + <widget class="TQSpinBox" row="4" column="1"> <property name="name"> <cstring>ttpidSpin</cstring> </property> @@ -289,7 +289,7 @@ <number>0</number> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel12</cstring> </property> @@ -305,7 +305,7 @@ <string>Service ID:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -313,7 +313,7 @@ <string>Network ID:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel15</cstring> </property> @@ -329,7 +329,7 @@ <string>Teletext PID:</string> </property> </widget> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>vpidSpin</cstring> </property> @@ -343,7 +343,7 @@ <number>0</number> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>sidSpin</cstring> </property> @@ -351,7 +351,7 @@ <number>65535</number> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>nidSpin</cstring> </property> @@ -359,7 +359,7 @@ <number>65535</number> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel13</cstring> </property> @@ -375,7 +375,7 @@ <string>Video PID:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -393,7 +393,7 @@ </widget> </grid> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>subpidBtn</cstring> </property> @@ -401,7 +401,7 @@ <string>Subtitle PIDs...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>apidBtn</cstring> </property> @@ -416,7 +416,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>extendedGroup</cstring> </property> @@ -427,12 +427,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>transmissionComb</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -448,7 +448,7 @@ <string>FEC high:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -464,17 +464,17 @@ <string>Transmission:</string> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <property name="name"> <cstring>coderateHComb</cstring> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>coderateLComb</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -490,7 +490,7 @@ <string>FEC low:</string> </property> </widget> - <widget class="QLabel" row="3" column="2"> + <widget class="TQLabel" row="3" column="2"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -506,12 +506,12 @@ <string>Guard interval:</string> </property> </widget> - <widget class="QComboBox" row="2" column="3"> + <widget class="TQComboBox" row="2" column="3"> <property name="name"> <cstring>hierarchyComb</cstring> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -527,7 +527,7 @@ <string>Hierarchy:</string> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -543,17 +543,17 @@ <string>Modulation:</string> </property> </widget> - <widget class="QComboBox" row="1" column="3"> + <widget class="TQComboBox" row="1" column="3"> <property name="name"> <cstring>modulationComb</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="3"> + <widget class="TQComboBox" row="0" column="3"> <property name="name"> <cstring>inversionComb</cstring> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -569,7 +569,7 @@ <string>Inversion:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel11</cstring> </property> @@ -585,12 +585,12 @@ <string>Bandwidth:</string> </property> </widget> - <widget class="QComboBox" row="3" column="1"> + <widget class="TQComboBox" row="3" column="1"> <property name="name"> <cstring>bandwidthComb</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -598,17 +598,17 @@ <string>Type:</string> </property> </widget> - <widget class="QComboBox" row="4" column="1"> + <widget class="TQComboBox" row="4" column="1"> <property name="name"> <cstring>stypeComb</cstring> </property> </widget> - <widget class="QComboBox" row="4" column="3"> + <widget class="TQComboBox" row="4" column="3"> <property name="name"> <cstring>rolloffComb</cstring> </property> </widget> - <widget class="QLabel" row="4" column="2"> + <widget class="TQLabel" row="4" column="2"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -616,7 +616,7 @@ <string>Roll off:</string> </property> </widget> - <widget class="QComboBox" row="3" column="3"> + <widget class="TQComboBox" row="3" column="3"> <property name="name"> <cstring>guardComb</cstring> </property> @@ -633,22 +633,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>166</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okBtn</cstring> </property> @@ -666,14 +666,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>cancelBtn</cstring> </property> @@ -726,5 +726,5 @@ <tabstop>okBtn</tabstop> <tabstop>sourceComb</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/cleaner.cpp b/kaffeine/src/input/dvb/cleaner.cpp index 8214bc9..d9400b1 100644 --- a/kaffeine/src/input/dvb/cleaner.cpp +++ b/kaffeine/src/input/dvb/cleaner.cpp @@ -20,18 +20,18 @@ #include <sys/statvfs.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqfileinfo.h> #include "cleaner.h" -Cleaner::Cleaner( const QString &lpath, const QString &rpath ) +Cleaner::Cleaner( const TQString &lpath, const TQString &rpath ) { setPaths( lpath, rpath ); - connect( &timer, SIGNAL(timeout()), this, SLOT(doClean()) ); + connect( &timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doClean()) ); timer.start( 60*1000 ); } @@ -45,7 +45,7 @@ void Cleaner::doClean() start(IdlePriority); } -void Cleaner::setPaths( const QString &lpath, const QString &rpath ) +void Cleaner::setPaths( const TQString &lpath, const TQString &rpath ) { livePath = lpath; recordPath = rpath; @@ -53,13 +53,13 @@ void Cleaner::setPaths( const QString &lpath, const QString &rpath ) void Cleaner::run() { - QStringList list; - QDir d; + TQStringList list; + TQDir d; double freemb; struct statvfs buf; d.setPath( livePath ); - list = d.entryList( "DVBLive-*", QDir::Files, QDir::Name ); + list = d.entryList( "DVBLive-*", TQDir::Files, TQDir::Name ); if ( list.count()>1 ) d.remove( list[0] ); @@ -71,9 +71,9 @@ void Cleaner::run() freemb = (double)(((double)(buf.f_bavail)*(double)(buf.f_bsize))/(1024.0*1024.0)); if ( freemb<1000 ) { d.setPath( recordPath ); - const QFileInfoList *infos = d.entryInfoList( "*.m2t", QDir::Files|QDir::NoSymLinks|QDir::Writable, QDir::Time|QDir::Reversed ); - QFileInfoListIterator it( *infos ); - QFileInfo *i; + const TQFileInfoList *infos = d.entryInfoList( "*.m2t", TQDir::Files|TQDir::NoSymLinks|TQDir::Writable, TQDir::Time|TQDir::Reversed ); + TQFileInfoListIterator it( *infos ); + TQFileInfo *i; /*if ( ( i=it.current() )!=0 ) d.remove( i->absFilePath() );*/ } diff --git a/kaffeine/src/input/dvb/cleaner.h b/kaffeine/src/input/dvb/cleaner.h index 215af32..5132c1f 100644 --- a/kaffeine/src/input/dvb/cleaner.h +++ b/kaffeine/src/input/dvb/cleaner.h @@ -21,21 +21,22 @@ #ifndef CLEANER_H #define CLEANER_H -#include <qobject.h> -#include <qthread.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqthread.h> +#include <tqstring.h> +#include <tqtimer.h> -class Cleaner : public QObject, public QThread +class Cleaner : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - Cleaner( const QString &lpath, const QString &rpath ); + Cleaner( const TQString &lpath, const TQString &rpath ); ~Cleaner(); - void setPaths( const QString &lpath, const QString &rpath ); + void setPaths( const TQString &lpath, const TQString &rpath ); protected: @@ -47,8 +48,8 @@ private slots: private: - QTimer timer; - QString livePath, recordPath; + TQTimer timer; + TQString livePath, recordPath; }; #endif /* CLEANER_H */ diff --git a/kaffeine/src/input/dvb/crontimer.cpp b/kaffeine/src/input/dvb/crontimer.cpp index 00078ea..677c306 100644 --- a/kaffeine/src/input/dvb/crontimer.cpp +++ b/kaffeine/src/input/dvb/crontimer.cpp @@ -25,9 +25,9 @@ #include "crontimer.h" -CronTimer::CronTimer( int m, QWidget *parent ) : CronTimerUI( parent ) +CronTimer::CronTimer( int m, TQWidget *tqparent ) : CronTimerUI( tqparent ) { - connect( cronBtnGrp, SIGNAL(clicked(int)), this, SLOT(modeSelected(int)) ); + connect( cronBtnGrp, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(modeSelected(int)) ); mode = m; switch ( mode ) { case Noone : cronBtnGrp->setButton( 0 ); break; diff --git a/kaffeine/src/input/dvb/crontimer.h b/kaffeine/src/input/dvb/crontimer.h index bb079bd..d46262f 100644 --- a/kaffeine/src/input/dvb/crontimer.h +++ b/kaffeine/src/input/dvb/crontimer.h @@ -21,10 +21,10 @@ #ifndef CRONTIMER_H #define CRONTIMER_H -#include <qwidget.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include "crontimerui.h" @@ -32,10 +32,11 @@ class CronTimer : public CronTimerUI { Q_OBJECT + TQ_OBJECT public: - CronTimer( int m, QWidget *parent ); + CronTimer( int m, TQWidget *tqparent ); ~CronTimer(); int getMode() const; diff --git a/kaffeine/src/input/dvb/crontimerui.ui b/kaffeine/src/input/dvb/crontimerui.ui index 1a70361..41130bd 100644 --- a/kaffeine/src/input/dvb/crontimerui.ui +++ b/kaffeine/src/input/dvb/crontimerui.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CronTimerUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CronTimerUI</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -45,22 +45,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>32</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>cronBtnGrp</cstring> </property> @@ -71,7 +71,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>noneRad</cstring> </property> @@ -82,7 +82,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>dailyRad</cstring> </property> @@ -93,7 +93,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>weeklyRad</cstring> </property> @@ -104,7 +104,7 @@ <number>2</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>mnthlyRad</cstring> </property> @@ -115,7 +115,7 @@ <number>3</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>customRad</cstring> </property> @@ -138,7 +138,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>67</height> @@ -157,14 +157,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>39</width> <height>20</height> </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>daysGb</cstring> </property> @@ -175,7 +175,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>monCb</cstring> </property> @@ -183,7 +183,7 @@ <string>Monday</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>tueCb</cstring> </property> @@ -191,7 +191,7 @@ <string>Tuesday</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>wedCb</cstring> </property> @@ -199,7 +199,7 @@ <string>Wednesday</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>thuCb</cstring> </property> @@ -207,7 +207,7 @@ <string>Thursday</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>friCb</cstring> </property> @@ -215,7 +215,7 @@ <string>Friday</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>satCb</cstring> </property> @@ -223,7 +223,7 @@ <string>Saturday</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>sunCb</cstring> </property> @@ -243,7 +243,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>32</width> <height>20</height> @@ -262,16 +262,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>95</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> @@ -295,7 +295,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>177</width> <height>20</height> @@ -346,7 +346,7 @@ <slot>accept()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/kaffeine/src/input/dvb/dvbcam.cpp b/kaffeine/src/input/dvb/dvbcam.cpp index e525f6d..e4cd749 100644 --- a/kaffeine/src/input/dvb/dvbcam.cpp +++ b/kaffeine/src/input/dvb/dvbcam.cpp @@ -30,14 +30,14 @@ #include <sys/poll.h> #include <linux/dvb/ca.h> -#include <qapplication.h> -#include <qthread.h> -#include <qstring.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qtextbrowser.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqapplication.h> +#include <tqthread.h> +#include <tqstring.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqtextbrowser.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include "dvbcam.h" @@ -79,7 +79,7 @@ int DvbCam::probe( int adapter, int ca_device ) int fdCa; ca_caps_t cap; ca_slot_info_t info; - QString s = QString("/dev/dvb/adapter%1/ca%2").arg( adapter ).arg( ca_device ); + TQString s = TQString("/dev/dvb/adapter%1/ca%2").tqarg( adapter ).tqarg( ca_device ); if ( (fdCa = open( s.ascii(), O_RDWR )) < 0) { fprintf(stderr, "DvbCam::probe(): %s:", s.ascii()); @@ -131,7 +131,7 @@ bool DvbCam::canPlay( ChannelDesc *chan ) { int i, n=0; - QMutexLocker locker( &sidMutex ); + TQMutexLocker locker( &sidMutex ); for ( i=0; i<sidList.count(); ++i ) { if ( sidList.at(i)->getState()<CamService::Remove ) n++; @@ -144,7 +144,7 @@ bool DvbCam::canPlay( ChannelDesc *chan ) void DvbCam::startService( ChannelDesc *chan ) { int i; - QMutexLocker locker( &sidMutex ); + TQMutexLocker locker( &sidMutex ); for ( i=0; i<sidList.count(); ++i ) { if ( sidList.at(i)->getChannel().name==chan->name ) { sidList.at(i)->restart(); @@ -157,7 +157,7 @@ void DvbCam::startService( ChannelDesc *chan ) void DvbCam::stopService( ChannelDesc *chan ) { int i; - QMutexLocker locker( &sidMutex ); + TQMutexLocker locker( &sidMutex ); for ( i=0; i<sidList.count(); ++i ) { if ( sidList.at(i)->getChannel().name==chan->name ) { sidList.at(i)->setState( CamService::Remove ); @@ -169,7 +169,7 @@ void DvbCam::stopService( ChannelDesc *chan ) void DvbCam::resendPmts() { int i; - QMutexLocker locker( &sidMutex ); + TQMutexLocker locker( &sidMutex ); for ( i=0; i<sidList.count(); ++i ) { if ( sidList.at(i)->getState()==CamService::Added ) { sidList.at(i)->setState( CamService::Ready ); @@ -401,7 +401,7 @@ int DvbCam::infoCallback(void *arg, uint8_t slot_id, uint16_t session_number, ui fprintf( stderr, " 0x%04x\n", ca_ids[i]); } - QApplication::postEvent( std->dvbcam, new QTimerEvent(TIMER_EVENT_CAM_READY ) ); + TQApplication::postEvent( std->dvbcam, new TQTimerEvent(TIMER_EVENT_CAM_READY ) ); return 0; } @@ -413,13 +413,13 @@ int DvbCam::aiCallback(void *arg, uint8_t slot_id, uint16_t session_number, uint (void)session_number; fprintf(stderr, "CAM Application type: %02x\n", application_type); - std->dvbcam->setAppType( QString("0x%1").arg(application_type, 0, 16 ) ); + std->dvbcam->setAppType( TQString("0x%1").tqarg(application_type, 0, 16 ) ); fprintf(stderr, "CAM Application manufacturer: %04x\n", application_manufacturer); - std->dvbcam->setAppManu( QString("0x%1").arg(application_manufacturer, 0, 16 ) ); + std->dvbcam->setAppManu( TQString("0x%1").tqarg(application_manufacturer, 0, 16 ) ); fprintf(stderr, "CAM Manufacturer code: %04x\n", manufacturer_code); - std->dvbcam->setManuCode( QString("0x%1").arg(manufacturer_code, 0, 16 ) ); + std->dvbcam->setManuCode( TQString("0x%1").tqarg(manufacturer_code, 0, 16 ) ); fprintf(stderr, "CAM Menu string: %.*s\n", menu_string_length, menu_string); - QString s = (const char*)menu_string; + TQString s = (const char*)menu_string; s.truncate( menu_string_length ); std->dvbcam->setMenuString( s ); return 0; @@ -436,7 +436,7 @@ int DvbCam::mmi_close_callback(void *arg, uint8_t slot_id, uint16_t session_numb // note: not entirely correct as its supposed to delay if asked std->mmi_state = MMI_STATE_CLOSED; - QApplication::postEvent( std->dvbcam, new QTimerEvent(TIMER_EVENT_MMI_CLOSE ) ); + TQApplication::postEvent( std->dvbcam, new TQTimerEvent(TIMER_EVENT_MMI_CLOSE ) ); return 0; } @@ -474,9 +474,9 @@ int DvbCam::mmi_enq_callback(void *arg, uint8_t slot_id, uint16_t session_number (void) slot_id; (void) session_number; - QString s; + TQString s; - QMutexLocker locker( &std->mutex ); + TQMutexLocker locker( &std->mutex ); std->menuList.clear(); fprintf(stderr, "%.*s: ", text_size, text); @@ -504,9 +504,9 @@ int DvbCam::mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_numbe (void) item_raw_length; (void) items_raw; - QString s; + TQString s; - QMutexLocker locker( &std->mutex ); + TQMutexLocker locker( &std->mutex ); std->menuList.clear(); fprintf(stderr, "------------------------------\n"); @@ -531,7 +531,7 @@ int DvbCam::mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_numbe fprintf(stderr, "%i. %.*s\n", i+1, items[i].text_length, items[i].text); s = (const char*)items[i].text; s.truncate( items[i].text_length ); - std->menuList.append( QString("%1. %2").arg(i+1).arg(s) ); + std->menuList.append( TQString("%1. %2").tqarg(i+1).tqarg(s) ); } @@ -546,12 +546,12 @@ int DvbCam::mmi_menu_callback(void *arg, uint8_t slot_id, uint16_t session_numbe std->mmi_state = MMI_STATE_MENU; std->menuType = MMI_MENU; - QApplication::postEvent( std->dvbcam, new QTimerEvent(TIMER_EVENT_MMI_OPEN ) ); + TQApplication::postEvent( std->dvbcam, new TQTimerEvent(TIMER_EVENT_MMI_OPEN ) ); return 0; } -void DvbCam::timerEvent( QTimerEvent *e ) +void DvbCam::timerEvent( TQTimerEvent *e ) { switch ( e->timerId() ) { case TIMER_EVENT_MMI_OPEN: @@ -570,7 +570,7 @@ void DvbCam::showMMI() { if ( !menuDialog && stdcam ) { menuDialog = new MCamMenuDialog( stdcam ); - connect( menuDialog, SIGNAL(enteredResponse(QString)), this, SLOT(mmiResponse(QString)) ); + connect( menuDialog, TQT_SIGNAL(enteredResponse(TQString)), this, TQT_SLOT(mmiResponse(TQString)) ); menuDialog->exec(); closeMMI(); } @@ -597,7 +597,7 @@ int DvbCam::showCamDialog() dlg.appManuLab->setText( getAppManu() ); dlg.manuCodeLab->setText( getManuCode() ); dlg.menuStringLab->setText( getMenuString() ); - connect( dlg.camMenuBtn, SIGNAL(clicked()), this, SLOT(enterMenu()) ); + connect( dlg.camMenuBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(enterMenu()) ); dlg.exec(); CamMaxService = dlg.maxServiceSpin->value(); return CamMaxService; @@ -609,9 +609,9 @@ void DvbCam::enterMenu() en50221_app_ai_entermenu( stdcam->stdcam->ai_resource, stdcam->stdcam->ai_session_number ); } -void DvbCam::mmiResponse( QString s ) +void DvbCam::mmiResponse( TQString s ) { - QString res = s.stripWhiteSpace(); + TQString res = s.stripWhiteSpace(); switch( stdcam->mmi_state ) { case MMI_STATE_CLOSED: @@ -644,8 +644,8 @@ void DvbCam::mmiResponse( QString s ) MCamMenuDialog::MCamMenuDialog( StandardCam *sc ) { stdcam = sc; - connect( inputLine, SIGNAL(returnPressed()), this, SLOT(validateClicked()) ); - connect( &readTimer, SIGNAL(timeout()), this, SLOT(setMenu()) ); + connect( inputLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(validateClicked()) ); + connect( &readTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setMenu()) ); readTimer.start( 500 ); } @@ -653,7 +653,7 @@ void MCamMenuDialog::setMenu() { if ( !stdcam ) return; - QMutexLocker locker( &stdcam->mutex ); + TQMutexLocker locker( &stdcam->mutex ); if ( stdcam->menuType==MMI_MENU ) menuText->setText( stdcam->menuList.join("\n") ); } @@ -707,8 +707,8 @@ int CamService::createSectionFilter(uint16_t pid, uint8_t table_id) // create a section filter uint8_t filter[18] = {table_id}; - uint8_t mask[18] = {0xff}; - if(dvbdemux_set_section_filter(demux_fd, pid, filter, mask, 1, 1)) { // crc check on + uint8_t tqmask[18] = {0xff}; + if(dvbdemux_set_section_filter(demux_fd, pid, filter, tqmask, 1, 1)) { // crc check on close(demux_fd); return -1; } @@ -780,7 +780,7 @@ int CamService::processPmt( int demux_fd ) void CamService::setState( PmtState st ) { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); switch ( st ) { case Ready: { int listmgnt; @@ -809,7 +809,7 @@ void CamService::setState( PmtState st ) int CamService::getState() { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); return state; } diff --git a/kaffeine/src/input/dvb/dvbcam.h b/kaffeine/src/input/dvb/dvbcam.h index ec9bf45..01832bf 100644 --- a/kaffeine/src/input/dvb/dvbcam.h +++ b/kaffeine/src/input/dvb/dvbcam.h @@ -33,9 +33,9 @@ #include <libdvben50221/en50221_stdcam.h> #include <libucsi/mpeg/section.h> -#include <qthread.h> -#include <qmutex.h> -#include <qptrlist.h> +#include <tqthread.h> +#include <tqmutex.h> +#include <tqptrlist.h> #include "channeldesc.h" #include "camdialog.h" @@ -51,7 +51,7 @@ -class CamService : protected QThread +class CamService : protected TQThread { public: enum PmtState{ NotReady=0, Ready, Added, Remove, Destroy }; @@ -82,7 +82,7 @@ private: struct mpeg_pmt_section *parsedPmt; PmtState state; bool isRunning; - QMutex mutex; + TQMutex mutex; int CamMaxService; }; @@ -107,9 +107,9 @@ public: int mmi_enq_length; int menuType; - QStringList menuList; + TQStringList menuList; - QMutex mutex; + TQMutex mutex; }; @@ -117,23 +117,25 @@ public: class MCamMenuDialog : public CamMenuDialog { Q_OBJECT + TQ_OBJECT public: MCamMenuDialog( StandardCam *sc ); private: StandardCam *stdcam; - QTimer readTimer; + TQTimer readTimer; private slots: void setMenu(); void validateClicked(); signals: - void enteredResponse( QString ); + void enteredResponse( TQString ); }; -class DvbCam : public QObject, public QThread +class DvbCam : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: DvbCam(int adapter, int ca_device, int demux_device, int ci_type, int maxService); ~DvbCam(); @@ -142,24 +144,24 @@ public: bool canPlay( ChannelDesc *chan ); static int probe( int adapter, int ca_device ); - void setAppType( QString s ) { appType=s; } - void setAppManu( QString s ) { appManu=s; } - void setManuCode( QString s ) { manuCode=s; } - void setMenuString( QString s ) { menuString=s; } - QString getAppType() { return appType; } - QString getAppManu() { return appManu; } - QString getManuCode() { return manuCode; } - QString getMenuString() { return menuString; } + void setAppType( TQString s ) { appType=s; } + void setAppManu( TQString s ) { appManu=s; } + void setManuCode( TQString s ) { manuCode=s; } + void setMenuString( TQString s ) { menuString=s; } + TQString getAppType() { return appType; } + TQString getAppManu() { return appManu; } + TQString getManuCode() { return manuCode; } + TQString getMenuString() { return menuString; } int getCamMaxService() { return CamMaxService; } int showCamDialog(); protected: void run(); - void timerEvent( QTimerEvent *e ); + void timerEvent( TQTimerEvent *e ); private slots: - void mmiResponse( QString s ); + void mmiResponse( TQString s ); void showMMI(); void closeMMI(); void enterMenu(); @@ -188,10 +190,10 @@ private: bool isRunning; - QPtrList<CamService> sidList; - QMutex sidMutex; + TQPtrList<CamService> sidList; + TQMutex sidMutex; - QString appType, appManu, manuCode, menuString; + TQString appType, appManu, manuCode, menuString; StandardCam *stdcam; en50221_session_layer *SessionLayer; diff --git a/kaffeine/src/input/dvb/dvbconfig.cpp b/kaffeine/src/input/dvb/dvbconfig.cpp index 90e0489..869ca83 100644 --- a/kaffeine/src/input/dvb/dvbconfig.cpp +++ b/kaffeine/src/input/dvb/dvbconfig.cpp @@ -23,11 +23,11 @@ #include <unistd.h> #include <errno.h> -#include <qdir.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qregexp.h> -#include <qradiobutton.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqregexp.h> +#include <tqradiobutton.h> #include <klocale.h> #include <kiconloader.h> @@ -42,10 +42,10 @@ -MSpinBox::MSpinBox( QWidget *parent, int devNum ) : QSpinBox( 1, 4, 1, parent ) +MSpinBox::MSpinBox( TQWidget *tqparent, int devNum ) : TQSpinBox( 1, 4, 1, tqparent ) { deviceNumber = devNum; - connect( this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)) ); + connect( this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int)) ); } @@ -57,11 +57,11 @@ void MSpinBox::slotValueChanged( int value ) -MPushButton::MPushButton( QWidget *parent, int devNum, int lnbNum ) : KPushButton( parent ) +MPushButton::MPushButton( TQWidget *tqparent, int devNum, int lnbNum ) : KPushButton( tqparent ) { deviceNumber = devNum; lnbNumber = lnbNum; - connect( this, SIGNAL(clicked()), this, SLOT(isClicked()) ); + connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(isClicked()) ); } @@ -73,10 +73,10 @@ void MPushButton::isClicked() -MCAMButton::MCAMButton( QWidget *parent, int devNum ) : QPushButton( i18n("CAM"), parent ) +MCAMButton::MCAMButton( TQWidget *tqparent, int devNum ) : TQPushButton( i18n("CAM"), tqparent ) { deviceNumber = devNum; - connect( this, SIGNAL(clicked()), this, SLOT(isClicked()) ); + connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(isClicked()) ); } @@ -88,11 +88,11 @@ void MCAMButton::isClicked() -MComboBox::MComboBox( QWidget *parent, int devNum, int lnbNum ) : QComboBox( parent ) +MComboBox::MComboBox( TQWidget *tqparent, int devNum, int lnbNum ) : TQComboBox( tqparent ) { deviceNumber = devNum; lnbNumber = lnbNum; - connect( this, SIGNAL(activated(int)), this, SLOT(isActivated(int)) ); + connect( this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(isActivated(int)) ); } @@ -116,7 +116,7 @@ LNB::LNB() -Device::Device( int anum, int tnum, fe_type_t t, const QString &n, bool as ) +Device::Device( int anum, int tnum, fe_type_t t, const TQString &n, bool as ) { adapter = anum; tuner = tnum; @@ -135,7 +135,7 @@ Device::Device( int anum, int tnum, fe_type_t t, const QString &n, bool as ) -Category::Category( const QString &tname, const QString &ticon ) +Category::Category( const TQString &tname, const TQString &ticon ) { name = tname; icon = ticon; @@ -143,11 +143,11 @@ Category::Category( const QString &tname, const QString &ticon ) -DVBconfig::DVBconfig( const QString &dvbConf ) +DVBconfig::DVBconfig( const TQString &dvbConf ) { dvbConfigDir = dvbConf; dvbConfigIconsDir = dvbConf+"icons/"; - QDir dir; + TQDir dir; dir.setPath( dvbConfigIconsDir ); if ( !dir.exists() ) dir.mkdir( dvbConfigIconsDir ); @@ -178,19 +178,19 @@ bool DVBconfig::haveDvbDevice() int i, j, res, fdFrontend=0; struct dvb_frontend_info info; - QStringList list, flist; - QDir d; + TQStringList list, flist; + TQDir d; d.setPath( "/dev/dvb/" ); - list = d.entryList( "adapter*", QDir::Dirs, QDir::Name ); + list = d.entryList( "adapter*", TQDir::Dirs, TQDir::Name ); for ( i=0; i<(int)list.count(); i++ ) { d.setPath( "/dev/dvb/"+list[i]+"/" ); - flist = d.entryList( "frontend*", QDir::System, QDir::Name ); + flist = d.entryList( "frontend*", TQDir::System, TQDir::Name ); for ( j=0; j<(int)flist.count(); j++ ) { - fdFrontend = open( QString("/dev/dvb/%1/%2").arg( list[i] ).arg( flist[j] ).ascii(), O_RDWR); + fdFrontend = open( TQString("/dev/dvb/%1/%2").tqarg( list[i] ).tqarg( flist[j] ).ascii(), O_RDWR); if ( fdFrontend>0 ) { if ( (res = ioctl( fdFrontend, FE_GET_INFO, &info ) < 0) ) - perror( QString("/dev/dvb/%1/%2 FE_GET_INFO: ").arg( list[i] ).arg( flist[j] ).ascii() ); + perror( TQString("/dev/dvb/%1/%2 FE_GET_INFO: ").tqarg( list[i] ).tqarg( flist[j] ).ascii() ); else { close( fdFrontend ); return true; @@ -210,17 +210,17 @@ void DVBconfig::startup() int i=0, j=0, res, fdFrontend=0; struct dvb_frontend_info info; bool as; - QTime t1; + TQTime t1; - QStringList list, flist; - QString s, t; - QDir d; + TQStringList list, flist; + TQString s, t; + TQDir d; d.setPath( "/dev/dvb/" ); - list = d.entryList( "adapter*", QDir::Dirs, QDir::Name ); + list = d.entryList( "adapter*", TQDir::Dirs, TQDir::Name ); for ( i=0; i<(int)list.count(); i++ ) { d.setPath( "/dev/dvb/"+list[i]+"/" ); - flist = d.entryList( "frontend*", QDir::System, QDir::Name ); + flist = d.entryList( "frontend*", TQDir::System, TQDir::Name ); for ( j=0; j<(int)flist.count(); j++ ) { s = list[i]; t = flist[j]; @@ -228,8 +228,8 @@ void DVBconfig::startup() break; if ( !probeMfe && t!="frontend0" ) continue; - t1 = QTime::currentTime(); - fdFrontend = open( QString("/dev/dvb/%1/%2").arg( s ).arg( t ).ascii(), O_RDWR); + t1 = TQTime::currentTime(); + fdFrontend = open( TQString("/dev/dvb/%1/%2").tqarg( s ).tqarg( t ).ascii(), O_RDWR); if ( fdFrontend>0 ) { if ( !(res = ioctl( fdFrontend, FE_GET_INFO, &info ) < 0) ) { if ( (info.type==FE_OFDM) @@ -241,13 +241,13 @@ void DVBconfig::startup() as = true; else as = false; - fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s ) (%dms)\n", s.ascii(), t.ascii(), info.name, t1.msecsTo(QTime::currentTime()) ); - devList.append( new Device( s.replace("adapter","").toInt(), t.replace("frontend","").toInt(), info.type, info.name, as ) ); + fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s ) (%dms)\n", s.ascii(), t.ascii(), info.name, t1.msecsTo(TQTime::currentTime()) ); + devList.append( new Device( s.tqreplace("adapter","").toInt(), t.tqreplace("frontend","").toInt(), info.type, info.name, as ) ); } close( fdFrontend ); } else { - perror( QString("/dev/dvb/%1/%2 %3/%4").arg( s ).arg( t ).arg( errno ).arg( -EBUSY ).ascii() ); + perror( TQString("/dev/dvb/%1/%2 %3/%4").tqarg( s ).tqarg( t ).tqarg( errno ).tqarg( -EBUSY ).ascii() ); } } } @@ -275,22 +275,22 @@ void DVBconfig::setDownloadPercent( Job *job, unsigned long percent ) -bool DVBconfig::loadDvbData( QWidget *parent ) +bool DVBconfig::loadDvbData( TQWidget *tqparent ) { - QString s=""; + TQString s=""; FileCopyJob *job; - QFile f( dvbConfigDir+"dvbdata.tar.gz" ); + TQFile f( dvbConfigDir+"dvbdata.tar.gz" ); //if ( f.exists() ) f.remove(); - downProgress = new KProgressDialog( parent, "progress", i18n("Downloading... "), i18n("Copying data files..."), true ); + downProgress = new KProgressDialog( tqparent, "progress", i18n("Downloading... "), i18n("Copying data files..."), true ); downProgress->progressBar()->setTotalSteps( 100 ); //job = file_copy( KURL( "http://hftom.free.fr/kaxtv/dvbdata.tar.gz" ), KURL( dvbConfigDir+"dvbdata.tar.gz" ), -1, true, false, false ); job = file_copy( KURL( "http://hftom.free.fr/kaxtv/dvbdata.tar.gz" ), KURL( dvbConfigDir+"dvbdata.tar.gz" ), -1, true, false, false ); - connect( job, SIGNAL(result(KIO::Job*)), this, SLOT(setDownloadResult(KIO::Job*)) ); - connect( job, SIGNAL(percent(KIO::Job*,unsigned long)), this, SLOT(setDownloadPercent(KIO::Job*,unsigned long)) ); + connect( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(setDownloadResult(KIO::Job*)) ); + connect( job, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(setDownloadPercent(KIO::Job*,unsigned long)) ); downProgress->exec(); - disconnect( job, SIGNAL(result(KIO::Job*)), this, SLOT(setDownloadResult(KIO::Job*)) ); - disconnect( job, SIGNAL(percent(KIO::Job*,unsigned long)), this, SLOT(setDownloadPercent(KIO::Job*,unsigned long)) ); + disconnect( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(setDownloadResult(KIO::Job*)) ); + disconnect( job, TQT_SIGNAL(percent(KIO::Job*,unsigned long)), this, TQT_SLOT(setDownloadPercent(KIO::Job*,unsigned long)) ); if ( downProgress ) { delete downProgress; downProgress = 0; @@ -308,7 +308,7 @@ bool DVBconfig::loadDvbData( QWidget *parent ) bool DVBconfig::localData() { - QString s = locate("data","kaffeine/dvbdata.tar.gz"); + TQString s = locate("data","kaffeine/dvbdata.tar.gz"); KTar tar( s ); if ( tar.open( IO_ReadOnly ) ) { tar.directory()->copyTo( dvbConfigDir ); @@ -322,9 +322,9 @@ bool DVBconfig::localData() bool DVBconfig::haveData() { - if ( !QDir( dvbConfigDir+"dvb-s" ).exists() || !QDir( dvbConfigDir+"dvb-c" ).exists() || !QDir( dvbConfigDir+"dvb-t" ).exists() || !QDir( dvbConfigDir+"atsc" ).exists()) { + if ( !TQDir( dvbConfigDir+"dvb-s" ).exists() || !TQDir( dvbConfigDir+"dvb-c" ).exists() || !TQDir( dvbConfigDir+"dvb-t" ).exists() || !TQDir( dvbConfigDir+"atsc" ).exists()) { loadDvbData(0); - if ( !QDir( dvbConfigDir+"dvb-s" ).exists() || !QDir( dvbConfigDir+"dvb-c" ).exists() || !QDir( dvbConfigDir+"dvb-t" ).exists() || !QDir( dvbConfigDir+"atsc" ).exists() ) { + if ( !TQDir( dvbConfigDir+"dvb-s" ).exists() || !TQDir( dvbConfigDir+"dvb-c" ).exists() || !TQDir( dvbConfigDir+"dvb-t" ).exists() || !TQDir( dvbConfigDir+"atsc" ).exists() ) { if ( !localData() ) return false; } @@ -334,10 +334,10 @@ bool DVBconfig::haveData() -QStringList DVBconfig::getSourcesList( fe_type_t type ) +TQStringList DVBconfig::getSourcesList( fe_type_t type ) { - QString s; - QStringList list; + TQString s; + TQStringList list; switch ( type ) { case FE_QPSK : s = "dvb-s"; break; @@ -346,20 +346,20 @@ QStringList DVBconfig::getSourcesList( fe_type_t type ) case FE_ATSC : s = "atsc"; break; default : return list; } - list = QDir( dvbConfigDir+s ).entryList( QDir::Files, QDir::Name ); + list = TQDir( dvbConfigDir+s ).entryList( TQDir::Files, TQDir::Name ); return list; } -void DVBconfig::addCategory( const QString &name, const QString &icon ) +void DVBconfig::addCategory( const TQString &name, const TQString &icon ) { categories.append( new Category( name, icon ) ); } -void DVBconfig::removeCategory( const QString &name ) +void DVBconfig::removeCategory( const TQString &name ) { int i; @@ -373,7 +373,7 @@ void DVBconfig::removeCategory( const QString &name ) -void DVBconfig::changeIconCategory( const QString &name, const QString &icon ) +void DVBconfig::changeIconCategory( const TQString &name, const TQString &icon ) { int i; @@ -424,56 +424,56 @@ void DVBconfig::readFirst() void DVBconfig::readConfig() { - QSize size; - QString s; + TQSize size; + TQString s; int i, j; config->setGroup( "DVB Options" ); broadcastAddress = config->readEntry( "BroadcastAddress", "192.168.0.255" ); broadcastPort = config->readNumEntry( "BroadcastPort", 1234 ); senderPort = config->readNumEntry( "SenderPort", 1235 ); - size = QSize(600, 350); + size = TQSize(600, 350); epgSize = config->readSizeEntry( "EPG Geometry", &size ); - size = QSize(600, 300); + size = TQSize(600, 300); timerSize = config->readSizeEntry( "Timers Geometry", &size ); - size = QSize(300, 300); + size = TQSize(300, 300); scanSize = config->readSizeEntry( "Scan Geometry", &size ); beginMargin = config->readNumEntry( "BeginMargin", 5 ); endMargin = config->readNumEntry( "EndMargin", 10 ); instantDuration = config->readNumEntry( "InstantDuration", 120 ); - recordDir = config->readEntry( "RecordDir", QDir::homeDirPath() ); + recordDir = config->readEntry( "RecordDir", TQDir::homeDirPath() ); if ( !recordDir.endsWith("/") ) recordDir+= "/"; sizeFile = config->readNumEntry("SizeFile",0); - shiftDir = config->readEntry( "ShiftDir", QDir::homeDirPath() ); + shiftDir = config->readEntry( "ShiftDir", TQDir::homeDirPath() ); if ( !shiftDir.endsWith("/") ) shiftDir+= "/"; filenameFormat = config->readEntry( "filenameFormat", "%name" ); for ( i=0; i<(int)devList.count(); i++ ) { - devList.at(i)->source = config->readEntry( QString("DVB%1").arg(i), "" ); - devList.at(i)->tuningTimeout = config->readNumEntry( QString("DVB%1_TIMEOUT").arg(i), 1500 ); - devList.at(i)->camMaxService = config->readNumEntry( QString("DVB%1_CAM_MAX").arg(i), 1 ); - devList.at(i)->priority = config->readNumEntry( QString("DVB%1_PRIORITY").arg(i), 10 ); + devList.at(i)->source = config->readEntry( TQString("DVB%1").tqarg(i), "" ); + devList.at(i)->tuningTimeout = config->readNumEntry( TQString("DVB%1_TIMEOUT").tqarg(i), 1500 ); + devList.at(i)->camMaxService = config->readNumEntry( TQString("DVB%1_CAM_MAX").tqarg(i), 1 ); + devList.at(i)->priority = config->readNumEntry( TQString("DVB%1_PRIORITY").tqarg(i), 10 ); if ( devList.at(i)->type!=FE_QPSK ) continue; - devList.at(i)->numLnb = config->readNumEntry( QString("DVB%1_NLNB").arg(i), 1 ); + devList.at(i)->numLnb = config->readNumEntry( TQString("DVB%1_NLNB").tqarg(i), 1 ); for ( j=0; j<devList.at(i)->numLnb; j++ ) { - devList.at(i)->lnb[j].switchFreq = config->readNumEntry( QString("DVB%1_LNB%2_switch").arg(i).arg(j), 11700 ); - devList.at(i)->lnb[j].loFreq = config->readNumEntry( QString("DVB%1_LNB%2_lo").arg(i).arg(j), 9750 ); - devList.at(i)->lnb[j].hiFreq = config->readNumEntry( QString("DVB%1_LNB%2_hi").arg(i).arg(j), 10600 ); - devList.at(i)->lnb[j].rotorType = config->readNumEntry( QString("DVB%1_LNB%2_rotor").arg(i).arg(j), 0 ); - devList.at(i)->lnb[j].source = config->readListEntry( QString("DVB%1_LNB%2_source").arg(i).arg(j) ); - devList.at(i)->lnb[j].position = config->readIntListEntry( QString("DVB%1_LNB%2_position").arg(i).arg(j) ); - devList.at(i)->lnb[j].speed13v = config->readDoubleNumEntry( QString("DVB%1_LNB%2_speed13v").arg(i).arg(j), 2.5 ); - devList.at(i)->lnb[j].speed18v = config->readDoubleNumEntry( QString("DVB%1_LNB%2_speed18v").arg(i).arg(j), 1.5 ); + devList.at(i)->lnb[j].switchFreq = config->readNumEntry( TQString("DVB%1_LNB%2_switch").tqarg(i).tqarg(j), 11700 ); + devList.at(i)->lnb[j].loFreq = config->readNumEntry( TQString("DVB%1_LNB%2_lo").tqarg(i).tqarg(j), 9750 ); + devList.at(i)->lnb[j].hiFreq = config->readNumEntry( TQString("DVB%1_LNB%2_hi").tqarg(i).tqarg(j), 10600 ); + devList.at(i)->lnb[j].rotorType = config->readNumEntry( TQString("DVB%1_LNB%2_rotor").tqarg(i).tqarg(j), 0 ); + devList.at(i)->lnb[j].source = config->readListEntry( TQString("DVB%1_LNB%2_source").tqarg(i).tqarg(j) ); + devList.at(i)->lnb[j].position = config->readIntListEntry( TQString("DVB%1_LNB%2_position").tqarg(i).tqarg(j) ); + devList.at(i)->lnb[j].speed13v = config->readDoubleNumEntry( TQString("DVB%1_LNB%2_speed13v").tqarg(i).tqarg(j), 2.5 ); + devList.at(i)->lnb[j].speed18v = config->readDoubleNumEntry( TQString("DVB%1_LNB%2_speed18v").tqarg(i).tqarg(j), 1.5 ); } - devList.at(i)->secMini = config->readNumEntry( QString("DVB%1_SEC_MINI").arg(i), 0 ); - devList.at(i)->secTwice = config->readNumEntry( QString("DVB%1_SEC_TWICE").arg(i), 0 ); - devList.at(i)->doS2 = config->readNumEntry( QString("DVB%1_DOS2").arg(i), 0 ); + devList.at(i)->secMini = config->readNumEntry( TQString("DVB%1_SEC_MINI").tqarg(i), 0 ); + devList.at(i)->secTwice = config->readNumEntry( TQString("DVB%1_SEC_TWICE").tqarg(i), 0 ); + devList.at(i)->doS2 = config->readNumEntry( TQString("DVB%1_DOS2").tqarg(i), 0 ); } j = config->readNumEntry( "NumCategories", 0 ); for ( i=0; i<j; i++ ) - categories.append( new Category( config->readEntry( QString("CategoryName%1").arg(i), "" ), config->readEntry( QString("CategoryIcon%1").arg(i), "kaffeine" ) ) ); + categories.append( new Category( config->readEntry( TQString("CategoryName%1").tqarg(i), "" ), config->readEntry( TQString("CategoryIcon%1").tqarg(i), "kaffeine" ) ) ); allIcon = config->readEntry( "AllIcon", "kaffeine" ); tvIcon = config->readEntry( "TvIcon", "kdvbtv" ); radioIcon = config->readEntry( "RadioIcon", "kdvbra" ); @@ -512,31 +512,31 @@ void DVBconfig::saveConfig() config->writeEntry( "SenderPort", senderPort ); config->writeEntry( "ProbeMFE", probeMfe ); for ( i=0; i<(int)devList.count(); i++ ) { - config->writeEntry( QString("DVB%1").arg(i), devList.at(i)->source ); - config->writeEntry( QString("DVB%1_TIMEOUT").arg(i), devList.at(i)->tuningTimeout ); - config->writeEntry( QString("DVB%1_PRIORITY").arg(i), devList.at(i)->priority ); - config->writeEntry( QString("DVB%1_CAM_MAX").arg(i), devList.at(i)->camMaxService ); + config->writeEntry( TQString("DVB%1").tqarg(i), devList.at(i)->source ); + config->writeEntry( TQString("DVB%1_TIMEOUT").tqarg(i), devList.at(i)->tuningTimeout ); + config->writeEntry( TQString("DVB%1_PRIORITY").tqarg(i), devList.at(i)->priority ); + config->writeEntry( TQString("DVB%1_CAM_MAX").tqarg(i), devList.at(i)->camMaxService ); if ( devList.at(i)->type!=FE_QPSK ) continue; - config->writeEntry( QString("DVB%1_NLNB").arg(i), devList.at(i)->numLnb ); + config->writeEntry( TQString("DVB%1_NLNB").tqarg(i), devList.at(i)->numLnb ); for ( j=0; j<devList.at(i)->numLnb; j++ ) { - config->writeEntry( QString("DVB%1_LNB%2_switch").arg(i).arg(j), devList.at(i)->lnb[j].switchFreq ); - config->writeEntry( QString("DVB%1_LNB%2_lo").arg(i).arg(j), devList.at(i)->lnb[j].loFreq ); - config->writeEntry( QString("DVB%1_LNB%2_hi").arg(i).arg(j), devList.at(i)->lnb[j].hiFreq ); - config->writeEntry( QString("DVB%1_LNB%2_rotor").arg(i).arg(j), devList.at(i)->lnb[j].rotorType ); - config->writeEntry( QString("DVB%1_LNB%2_source").arg(i).arg(j), devList.at(i)->lnb[j].source ); - config->writeEntry( QString("DVB%1_LNB%2_position").arg(i).arg(j), devList.at(i)->lnb[j].position ); - config->writeEntry( QString("DVB%1_LNB%2_speed13v").arg(i).arg(j), devList.at(i)->lnb[j].speed13v ); - config->writeEntry( QString("DVB%1_LNB%2_speed18v").arg(i).arg(j), devList.at(i)->lnb[j].speed18v ); + config->writeEntry( TQString("DVB%1_LNB%2_switch").tqarg(i).tqarg(j), devList.at(i)->lnb[j].switchFreq ); + config->writeEntry( TQString("DVB%1_LNB%2_lo").tqarg(i).tqarg(j), devList.at(i)->lnb[j].loFreq ); + config->writeEntry( TQString("DVB%1_LNB%2_hi").tqarg(i).tqarg(j), devList.at(i)->lnb[j].hiFreq ); + config->writeEntry( TQString("DVB%1_LNB%2_rotor").tqarg(i).tqarg(j), devList.at(i)->lnb[j].rotorType ); + config->writeEntry( TQString("DVB%1_LNB%2_source").tqarg(i).tqarg(j), devList.at(i)->lnb[j].source ); + config->writeEntry( TQString("DVB%1_LNB%2_position").tqarg(i).tqarg(j), devList.at(i)->lnb[j].position ); + config->writeEntry( TQString("DVB%1_LNB%2_speed13v").tqarg(i).tqarg(j), devList.at(i)->lnb[j].speed13v ); + config->writeEntry( TQString("DVB%1_LNB%2_speed18v").tqarg(i).tqarg(j), devList.at(i)->lnb[j].speed18v ); } - config->writeEntry( QString("DVB%1_SEC_MINI").arg(i), devList.at(i)->secMini ); - config->writeEntry( QString("DVB%1_SEC_TWICE").arg(i), devList.at(i)->secTwice ); - config->writeEntry( QString("DVB%1_DOS2").arg(i), devList.at(i)->doS2 ); + config->writeEntry( TQString("DVB%1_SEC_MINI").tqarg(i), devList.at(i)->secMini ); + config->writeEntry( TQString("DVB%1_SEC_TWICE").tqarg(i), devList.at(i)->secTwice ); + config->writeEntry( TQString("DVB%1_DOS2").tqarg(i), devList.at(i)->doS2 ); } config->writeEntry( "NumCategories", categories.count() ); for ( i=0; i<(int)categories.count(); i++ ) { - config->writeEntry( QString("CategoryName%1").arg(i), categories.at(i)->name ); - config->writeEntry( QString("CategoryIcon%1").arg(i), categories.at(i)->icon ); + config->writeEntry( TQString("CategoryName%1").tqarg(i), categories.at(i)->name ); + config->writeEntry( TQString("CategoryIcon%1").tqarg(i), categories.at(i)->icon ); } config->writeEntry( "AllIcon", allIcon ); config->writeEntry( "TvIcon", tvIcon ); @@ -565,46 +565,46 @@ bool DVBconfig::firstRun() -DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, KaffeineDvbPlugin *p ) : - KDialogBase ( IconList, i18n("DVB Settings"), Ok|Cancel, Ok, parent, "dvbConfigDialog", true, true ) +DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, TQWidget *tqparent, KaffeineDvbPlugin *p ) : + KDialogBase ( IconList, i18n("DVB Settings"), Ok|Cancel, Ok, tqparent, "dvbConfigDialog", true, true ) { - QLabel *lab; + TQLabel *lab; KIconLoader *icon = new KIconLoader(); - QHBoxLayout *h1; - QString s; + TQHBoxLayout *h1; + TQString s; int i; - QVBoxLayout *vb; - QGroupBox *gb; - QGridLayout *grid, *sgrid; - QLabel *ident; - QLabel *dvbType; + TQVBoxLayout *vb; + TQGroupBox *gb; + TQGridLayout *grid, *sgrid; + TQLabel *ident; + TQLabel *dvbType; int gridLine; - QFrame *page; - QSpinBox *spin; + TQFrame *page; + TQSpinBox *spin; KPushButton *usals; - QWidget *swidg; - QStringList rotorList; rotorList<<i18n("No rotor")<<i18n("USALS rotor")<<i18n("Positions rotor")<<i18n("External positionner"); + TQWidget *swidg; + TQStringList rotorList; rotorList<<i18n("No rotor")<<i18n("USALS rotor")<<i18n("Positions rotor")<<i18n("External positionner"); dvbConfig = dc; timeoutSpin.setAutoDelete( true ); for ( i=0; i<(int)dvbConfig->devList.count(); i++ ) { - page = addPage( i18n("DVB Device")+" "+QString("%1:%2").arg(dvbConfig->devList.at(i)->adapter).arg(dvbConfig->devList.at(i)->tuner), i18n("Device Settings"), + page = addPage( i18n("DVB Device")+" "+TQString("%1:%2").tqarg(dvbConfig->devList.at(i)->adapter).tqarg(dvbConfig->devList.at(i)->tuner), i18n("Device Settings"), KGlobal::instance()->iconLoader()->loadIcon( "hwinfo", KIcon::NoGroup, KIcon::SizeMedium ) ); - vb = new QVBoxLayout( page, 6, 6 ); - gb = new QGroupBox( "", page ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); + vb = new TQVBoxLayout( page, 6, 6 ); + gb = new TQGroupBox( "", page ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); gridLine = 0; - lab = new QLabel( i18n("<qt><b>Name:</b></qt>"), gb ); + lab = new TQLabel( i18n("<qt><b>Name:</b></qt>"), gb ); grid->addWidget( lab, gridLine, 0 ); - ident = new QLabel( dvbConfig->devList.at(i)->name, gb ); + ident = new TQLabel( dvbConfig->devList.at(i)->name, gb ); grid->addMultiCellWidget( ident, gridLine, gridLine, 1, 3 ); ++gridLine; - lab = new QLabel( i18n("<qt><b>Type:</b></qt>"), gb ); + lab = new TQLabel( i18n("<qt><b>Type:</b></qt>"), gb ); grid->addWidget( lab, gridLine, 0 ); - dvbType = new QLabel( gb ); + dvbType = new TQLabel( gb ); switch ( dvbConfig->devList.at(i)->type ) { case FE_QAM : dvbType->setText( i18n("Cable") ); break; case FE_OFDM : dvbType->setText( i18n("Terrestrial") ); break; @@ -615,54 +615,54 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, if ( dvbConfig->devList.at(i)->hasCAM ) { grid->addWidget( dvbType, gridLine, 1 ); MCAMButton *camb = new MCAMButton( gb, i ); - connect( camb, SIGNAL(clicked(int)), pan, SLOT(camClicked(int)) ); + connect( camb, TQT_SIGNAL(clicked(int)), pan, TQT_SLOT(camClicked(int)) ); grid->addWidget( camb, gridLine, 2 ); } else grid->addMultiCellWidget( dvbType, gridLine, gridLine, 1, 3 ); ++gridLine; - lab = new QLabel( i18n("Tuner priority (0=Don't use):"), gb ); + lab = new TQLabel( i18n("Tuner priority (0=Don't use):"), gb ); grid->addWidget( lab, gridLine, 0 ); - spin = new QSpinBox( 0, 99, 1, gb ); + spin = new TQSpinBox( 0, 99, 1, gb ); spin->setValue( dvbConfig->devList.at(i)->priority ); priority.append( spin ); grid->addWidget( spin, gridLine, 1 ); ++gridLine; - lab = new QLabel( i18n("Tuner timeout :"), gb ); + lab = new TQLabel( i18n("Tuner timeout :"), gb ); grid->addWidget( lab, gridLine, 0 ); - spin = new QSpinBox( 500, 5000, 100, gb ); + spin = new TQSpinBox( 500, 5000, 100, gb ); spin->setValue( dvbConfig->devList.at(i)->tuningTimeout ); timeoutSpin.append( spin ); grid->addWidget( spin, gridLine, 1 ); - lab = new QLabel( i18n("(ms)"), gb ); + lab = new TQLabel( i18n("(ms)"), gb ); grid->addWidget( lab, gridLine, 2 ); ++gridLine; if ( dvbConfig->devList.at(i)->type==FE_QPSK ) { - doS2[i] = new QCheckBox( i18n("S2 capable device"), gb ); + doS2[i] = new TQCheckBox( i18n("S2 capable device"), gb ); doS2[i]->setChecked( dvbConfig->devList.at(i)->doS2 ); grid->addWidget( doS2[i], gridLine, 0 ); ++gridLine; - lab = new QLabel( i18n("Number of LNBs:"), gb ); + lab = new TQLabel( i18n("Number of LNBs:"), gb ); grid->addWidget( lab, gridLine, 0 ); satNumber[i] = new MSpinBox( gb, i ); - connect( satNumber[i], SIGNAL(signalValueChanged(int,int)), this, SLOT(satNumberChanged(int,int))); + connect( satNumber[i], TQT_SIGNAL(signalValueChanged(int,int)), this, TQT_SLOT(satNumberChanged(int,int))); grid->addWidget( satNumber[i], gridLine, 1 ); usals = new KPushButton( gb ); usals->setGuiItem( KGuiItem(i18n("Set rotor coordinates..."), icon->loadIconSet("move", KIcon::Small) ) ); - connect( usals, SIGNAL(clicked()), this, SLOT(setUsals())); + connect( usals, TQT_SIGNAL(clicked()), this, TQT_SLOT(setUsals())); grid->addWidget( usals, gridLine, 2 ); ++gridLine; - secMini[i] = new QCheckBox( i18n("Mini DiSEqC (A-B)."), gb ); + secMini[i] = new TQCheckBox( i18n("Mini DiSEqC (A-B)."), gb ); secMini[i]->setChecked( dvbConfig->devList.at(i)->secMini ); secMini[i]->setEnabled( false ); grid->addWidget( secMini[i], gridLine, 1 ); - secTwice[i] = new QCheckBox( i18n("Send DiSEqC commands twice."), gb ); + secTwice[i] = new TQCheckBox( i18n("Send DiSEqC commands twice."), gb ); secTwice[i]->setChecked( dvbConfig->devList.at(i)->secTwice ); grid->addWidget( secTwice[i], gridLine, 0 ); @@ -672,20 +672,20 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, lnb0[i]->setGuiItem( KGuiItem(i18n("LNB 1 settings..."), icon->loadIconSet("hwinfo", KIcon::Small) ) ); lnb0[i]->setEnabled(true); grid->addWidget( lnb0[i], gridLine, 0 ); - connect( lnb0[i], SIGNAL(clicked(int,int)), this, SLOT(setLnb(int,int))); + connect( lnb0[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setLnb(int,int))); rotor0[i] = new MComboBox( gb, i, 0 ); rotor0[i]->insertStringList( rotorList ); rotor0[i]->setCurrentItem( dvbConfig->devList.at(i)->lnb[0].rotorType ); grid->addWidget( rotor0[i], gridLine, 1 ); - connect( rotor0[i], SIGNAL(activated(int,int,int)), this, SLOT(setRotor(int,int,int))); - swidg = new QWidget( gb ); - sgrid = new QGridLayout( swidg, 1, 1, 0, 0 ); - sat0[i] = new QComboBox( swidg ); + connect( rotor0[i], TQT_SIGNAL(activated(int,int,int)), this, TQT_SLOT(setRotor(int,int,int))); + swidg = new TQWidget( gb ); + sgrid = new TQGridLayout( swidg, 1, 1, 0, 0 ); + sat0[i] = new TQComboBox( swidg ); sat0[i]->insertStringList( dvbConfig->getSourcesList(dvbConfig->devList.at(i)->type) ); sgrid->addWidget( sat0[i], 0, 0 ); src0[i] = new MPushButton( swidg, i, 0 ); src0[i]->setGuiItem( KGuiItem(i18n("Sources list...") ) ); - connect( src0[i], SIGNAL(clicked(int,int)), this, SLOT(setRotorSources(int,int)) ); + connect( src0[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setRotorSources(int,int)) ); sgrid->addWidget( src0[i], 1, 0 ); if ( dvbConfig->devList.at(i)->lnb[0].rotorType==0 ) { setSource( sat0[i], dvbConfig->devList.at(i)->lnb[0].source[0] ); @@ -701,23 +701,23 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, lnb1[i]->setGuiItem( KGuiItem(i18n("LNB 2 settings..."), icon->loadIconSet("hwinfo", KIcon::Small) ) ); lnb1[i]->setEnabled(false); grid->addWidget( lnb1[i], gridLine, 0 ); - connect( lnb1[i], SIGNAL(clicked(int,int)), this, SLOT(setLnb(int,int))); + connect( lnb1[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setLnb(int,int))); rotor1[i] = new MComboBox( gb, i, 1 ); rotor1[i]->setEnabled( false ); rotor1[i]->insertStringList( rotorList ); rotor1[i]->setCurrentItem( dvbConfig->devList.at(i)->lnb[1].rotorType ); grid->addWidget( rotor1[i], gridLine, 1 ); - connect( rotor1[i], SIGNAL(activated(int,int,int)), this, SLOT(setRotor(int,int,int))); - swidg = new QWidget( gb ); - sgrid = new QGridLayout( swidg, 1, 1, 0, 0 ); - sat1[i] = new QComboBox( swidg ); + connect( rotor1[i], TQT_SIGNAL(activated(int,int,int)), this, TQT_SLOT(setRotor(int,int,int))); + swidg = new TQWidget( gb ); + sgrid = new TQGridLayout( swidg, 1, 1, 0, 0 ); + sat1[i] = new TQComboBox( swidg ); sat1[i]->setEnabled(false); sat1[i]->insertStringList( dvbConfig->getSourcesList(dvbConfig->devList.at(i)->type) ); sgrid->addWidget( sat1[i], 0, 0 ); src1[i] = new MPushButton( swidg, i, 1 ); src1[i]->setEnabled(false); src1[i]->setGuiItem( KGuiItem(i18n("Sources list...") ) ); - connect( src1[i], SIGNAL(clicked(int,int)), this, SLOT(setRotorSources(int,int)) ); + connect( src1[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setRotorSources(int,int)) ); sgrid->addWidget( src1[i], 1, 0 ); if ( dvbConfig->devList.at(i)->lnb[1].rotorType==0 ) { setSource( sat1[i], dvbConfig->devList.at(i)->lnb[1].source[0] ); @@ -733,23 +733,23 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, lnb2[i]->setGuiItem( KGuiItem(i18n("LNB 3 settings..."), icon->loadIconSet("hwinfo", KIcon::Small) ) ); lnb2[i]->setEnabled(false); grid->addWidget( lnb2[i], gridLine, 0 ); - connect( lnb2[i], SIGNAL(clicked(int,int)), this, SLOT(setLnb(int,int))); + connect( lnb2[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setLnb(int,int))); rotor2[i] = new MComboBox( gb, i, 2 ); rotor2[i]->setEnabled(false); rotor2[i]->insertStringList( rotorList ); rotor2[i]->setCurrentItem( dvbConfig->devList.at(i)->lnb[2].rotorType ); grid->addWidget( rotor2[i], gridLine, 1 ); - connect( rotor2[i], SIGNAL(activated(int,int,int)), this, SLOT(setRotor(int,int,int))); - swidg = new QWidget( gb ); - sgrid = new QGridLayout( swidg, 1, 1, 0, 0 ); - sat2[i] = new QComboBox( swidg ); + connect( rotor2[i], TQT_SIGNAL(activated(int,int,int)), this, TQT_SLOT(setRotor(int,int,int))); + swidg = new TQWidget( gb ); + sgrid = new TQGridLayout( swidg, 1, 1, 0, 0 ); + sat2[i] = new TQComboBox( swidg ); sat2[i]->setEnabled(false); sat2[i]->insertStringList( dvbConfig->getSourcesList(dvbConfig->devList.at(i)->type) ); sgrid->addWidget( sat2[i], 0, 0 ); src2[i] = new MPushButton( swidg, i, 2 ); src2[i]->setEnabled(false); src2[i]->setGuiItem( KGuiItem(i18n("Sources list...") ) ); - connect( src2[i], SIGNAL(clicked(int,int)), this, SLOT(setRotorSources(int,int)) ); + connect( src2[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setRotorSources(int,int)) ); sgrid->addWidget( src2[i], 1, 0 ); if ( dvbConfig->devList.at(i)->lnb[2].rotorType==0 ) { setSource( sat2[i], dvbConfig->devList.at(i)->lnb[2].source[0] ); @@ -765,23 +765,23 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, lnb3[i]->setGuiItem( KGuiItem(i18n("LNB 4 settings..."), icon->loadIconSet("hwinfo", KIcon::Small) ) ); lnb3[i]->setEnabled(false); grid->addWidget( lnb3[i], gridLine, 0 ); - connect( lnb3[i], SIGNAL(clicked(int,int)), this, SLOT(setLnb(int,int))); + connect( lnb3[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setLnb(int,int))); rotor3[i] = new MComboBox( gb, i, 3 ); rotor3[i]->setEnabled(false); rotor3[i]->insertStringList( rotorList ); rotor3[i]->setCurrentItem( dvbConfig->devList.at(i)->lnb[3].rotorType ); grid->addWidget( rotor3[i], gridLine, 1 ); - connect( rotor3[i], SIGNAL(activated(int,int,int)), this, SLOT(setRotor(int,int,int))); - swidg = new QWidget( gb ); - sgrid = new QGridLayout( swidg, 1, 1, 0, 0 ); - sat3[i] = new QComboBox( swidg ); + connect( rotor3[i], TQT_SIGNAL(activated(int,int,int)), this, TQT_SLOT(setRotor(int,int,int))); + swidg = new TQWidget( gb ); + sgrid = new TQGridLayout( swidg, 1, 1, 0, 0 ); + sat3[i] = new TQComboBox( swidg ); sat3[i]->setEnabled(false); sat3[i]->insertStringList( dvbConfig->getSourcesList(dvbConfig->devList.at(i)->type) ); sgrid->addWidget( sat3[i], 0, 0 ); src3[i] = new MPushButton( swidg, i, 3 ); src3[i]->setEnabled(false); src3[i]->setGuiItem( KGuiItem(i18n("Sources list...") ) ); - connect( src3[i], SIGNAL(clicked(int,int)), this, SLOT(setRotorSources(int,int)) ); + connect( src3[i], TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(setRotorSources(int,int)) ); sgrid->addWidget( src3[i], 1, 0 ); if ( dvbConfig->devList.at(i)->lnb[3].rotorType==0 ) { setSource( sat3[i], dvbConfig->devList.at(i)->lnb[3].source[0] ); @@ -796,9 +796,9 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, satNumber[i]->setValue( dvbConfig->devList.at(i)->numLnb ); } else { - lab = new QLabel( i18n("Source:"), gb ); + lab = new TQLabel( i18n("Source:"), gb ); grid->addWidget( lab, gridLine, 0 ); - sat0[i] = new QComboBox( gb ); + sat0[i] = new TQComboBox( gb ); if ( dvbConfig->devList.at(i)->canAutoscan ) sat0[i]->insertItem( "AUTO" ); sat0[i]->insertStringList( dvbConfig->getSourcesList(dvbConfig->devList.at(i)->type) ); @@ -807,7 +807,7 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, ++gridLine; if ( dvbConfig->devList.at(i)->canAutoscan ) { - lab = new QLabel( i18n("<qt>This device seems to support the <b><i>autoscan</i></b> feature. " + lab = new TQLabel( i18n("<qt>This device seems to support the <b><i>autoscan</i></b> feature. " "You can choose <b>AUTO</b> in Source list to let Kaffeine " "search for a range of frequencies.<br>" "If <b><i>autoscan</i></b> fails to find your channels, choose a real Source in list.</qt>"), gb ); @@ -815,7 +815,7 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, ++gridLine; } } - lab = new QLabel( i18n("<qt><i>If you can't find your network/location in the list, you'll have to create one. " + lab = new TQLabel( i18n("<qt><i>If you can't find your network/location in the list, you'll have to create one. " "Look in $HOME/.kde/share/apps/kaffeine/dvb-x/ and take an existing file as start point. " "Fill in with the values for your network/location and give it a sensible name " "(follow the naming convention). If you think your new file could be usefull for others, send it to " @@ -823,80 +823,80 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, grid->addMultiCellWidget( lab, gridLine, gridLine, 0, 3 ); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); } page = addPage(i18n("Recording"),i18n("DVB Recording Options"), KGlobal::instance()->iconLoader()->loadIcon( "hdd_unmount", KIcon::NoGroup, KIcon::SizeMedium ) ); - vb = new QVBoxLayout( page, 6, 6 ); - gb = new QGroupBox( "", page ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); + vb = new TQVBoxLayout( page, 6, 6 ); + gb = new TQGroupBox( "", page ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); - lab = new QLabel( i18n("Records directory:"), gb ); + lab = new TQLabel( i18n("Records directory:"), gb ); grid->addWidget( lab, 0, 0 ); - recordDirLe = new QLineEdit( gb ); + recordDirLe = new TQLineEdit( gb ); recordDirLe->setReadOnly( true ); grid->addWidget( recordDirLe, 0, 1 ); - recordDirBtn = new QToolButton( gb ); + recordDirBtn = new TQToolButton( gb ); recordDirBtn->setIconSet( icon->loadIconSet("fileopen", KIcon::Small) ); grid->addWidget( recordDirBtn, 0, 2 ); - lab = new QLabel( i18n("Time shifting directory:"), gb ); + lab = new TQLabel( i18n("Time shifting directory:"), gb ); grid->addWidget( lab, 1, 0 ); - shiftDirLe = new QLineEdit( gb ); + shiftDirLe = new TQLineEdit( gb ); shiftDirLe->setReadOnly( true ); grid->addWidget( shiftDirLe, 1, 1 ); - shiftDirBtn = new QToolButton( gb ); + shiftDirBtn = new TQToolButton( gb ); shiftDirBtn->setIconSet( icon->loadIconSet("fileopen", KIcon::Small) ); grid->addWidget( shiftDirBtn, 1, 2 ); - lab = new QLabel( i18n("Begin margin:"), gb ); + lab = new TQLabel( i18n("Begin margin:"), gb ); grid->addWidget( lab, 2, 0 ); - beginSpin = new QSpinBox( gb ); - h1 = new QHBoxLayout(); + beginSpin = new TQSpinBox( gb ); + h1 = new TQHBoxLayout(); h1->addWidget( beginSpin ); - lab = new QLabel( i18n("(minutes)"), gb ); + lab = new TQLabel( i18n("(minutes)"), gb ); h1->addWidget( lab ); grid->addLayout( h1, 2, 1 ); - lab = new QLabel( i18n("End margin:"), gb ); + lab = new TQLabel( i18n("End margin:"), gb ); grid->addWidget( lab, 3, 0 ); - endSpin = new QSpinBox( gb ); - h1 = new QHBoxLayout(); + endSpin = new TQSpinBox( gb ); + h1 = new TQHBoxLayout(); h1->addWidget( endSpin ); - lab = new QLabel( i18n("(minutes)"), gb ); + lab = new TQLabel( i18n("(minutes)"), gb ); h1->addWidget( lab ); grid->addLayout( h1, 3, 1 ); - lab = new QLabel( i18n("Instant record duration:"), gb ); + lab = new TQLabel( i18n("Instant record duration:"), gb ); grid->addWidget( lab, 4, 0 ); - instantDurationSpin = new QSpinBox( 1, 1440, 1, gb ); - h1 = new QHBoxLayout(); + instantDurationSpin = new TQSpinBox( 1, 1440, 1, gb ); + h1 = new TQHBoxLayout(); h1->addWidget( instantDurationSpin ); - lab = new QLabel( i18n("(minutes)"), gb ); + lab = new TQLabel( i18n("(minutes)"), gb ); h1->addWidget( lab ); grid->addLayout( h1, 4, 1 ); - lab = new QLabel( i18n("Max file size (0=Unlimited):"), gb ); + lab = new TQLabel( i18n("Max file size (0=Unlimited):"), gb ); grid->addWidget( lab, 5, 0 ); - sizeFileSpin = new QSpinBox( 1, 9999, 1, gb ); + sizeFileSpin = new TQSpinBox( 1, 9999, 1, gb ); sizeFileSpin->setMinValue(0); - h1 = new QHBoxLayout(); + h1 = new TQHBoxLayout(); h1->addWidget( sizeFileSpin ); - lab = new QLabel( i18n("(MB)"), gb ); + lab = new TQLabel( i18n("(MB)"), gb ); h1->addWidget( lab ); grid->addLayout( h1, 5, 1 ); - lab = new QLabel( i18n("Filename Format:"), gb ); + lab = new TQLabel( i18n("Filename Format:"), gb ); grid->addWidget( lab, 7, 0 ); - filenameFormatLe = new QLineEdit( gb ); + filenameFormatLe = new TQLineEdit( gb ); grid->addWidget( filenameFormatLe, 7, 1 ); - helpNameBtn = new QToolButton( gb ); + helpNameBtn = new TQToolButton( gb ); helpNameBtn->setIconSet( icon->loadIconSet("help", KIcon::Small) ); grid->addWidget( helpNameBtn, 7, 2 ); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); recordDirLe->setText( dvbConfig->recordDir ); shiftDirLe->setText( dvbConfig->shiftDir ); @@ -908,25 +908,25 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, page = addPage(i18n("Broadcasting"),i18n("DVB Broadcasting"), KGlobal::instance()->iconLoader()->loadIcon( "network_local", KIcon::NoGroup, KIcon::SizeMedium ) ); - vb = new QVBoxLayout( page, 6, 6 ); - gb = new QGroupBox( "", page ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); + vb = new TQVBoxLayout( page, 6, 6 ); + gb = new TQGroupBox( "", page ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); - lab = new QLabel( i18n("Broadcast address:"), gb ); + lab = new TQLabel( i18n("Broadcast address:"), gb ); grid->addWidget( lab, 0, 0 ); - broadcastLe = new QLineEdit( gb ); + broadcastLe = new TQLineEdit( gb ); grid->addWidget( broadcastLe, 0, 1 ); - lab = new QLabel( i18n("Broadcast port:"), gb ); + lab = new TQLabel( i18n("Broadcast port:"), gb ); grid->addWidget( lab, 1, 0 ); - bportSpin = new QSpinBox( 1, 65535, 1, gb ); + bportSpin = new TQSpinBox( 1, 65535, 1, gb ); grid->addWidget( bportSpin, 1, 1 ); - lab = new QLabel( i18n("Info port:"), gb ); + lab = new TQLabel( i18n("Info port:"), gb ); grid->addWidget( lab, 2, 0 ); - sportSpin = new QSpinBox( 1, 65535, 1, gb ); + sportSpin = new TQSpinBox( 1, 65535, 1, gb ); grid->addWidget( sportSpin, 2, 1 ); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); broadcastLe->setText( dvbConfig->broadcastAddress ); bportSpin->setValue( dvbConfig->broadcastPort ); @@ -934,23 +934,23 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, page = addPage(i18n("Misc"),i18n("Misc"), KGlobal::instance()->iconLoader()->loadIcon( "misc", KIcon::NoGroup, KIcon::SizeMedium ) ); - vb = new QVBoxLayout( page, 6, 6 ); - gb = new QGroupBox( "", page ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); + vb = new TQVBoxLayout( page, 6, 6 ); + gb = new TQGroupBox( "", page ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); - probeMfe = new QCheckBox( i18n("Probe Multiple-Frontends (Restart required)."), gb ); + probeMfe = new TQCheckBox( i18n("Probe Multiple-Frontends (Restart required)."), gb ); probeMfe->setChecked( dvbConfig->probeMfe ); grid->addWidget( probeMfe, 0, 0 ); - lab = new QLabel( i18n("LiveShow ringbuffer size (MB) :"), gb ); + lab = new TQLabel( i18n("LiveShow ringbuffer size (MB) :"), gb ); grid->addWidget( lab, 1, 0 ); - ringBufSize = new QSpinBox( 2, 99, 1, gb ); + ringBufSize = new TQSpinBox( 2, 99, 1, gb ); ringBufSize->setValue( dvbConfig->ringBufSize ); grid->addWidget( ringBufSize, 1, 1 ); - lab = new QLabel( i18n("Default charset (restart needed):"), gb ); + lab = new TQLabel( i18n("Default charset (restart needed):"), gb ); grid->addWidget( lab, 2, 0 ); - charsetComb = new QComboBox( gb ); + charsetComb = new TQComboBox( gb ); charsetComb->insertItem( "ISO8859-1" ); charsetComb->insertItem( "ISO6937" ); if ( dvbConfig->defaultCharset=="ISO8859-1" ) @@ -959,39 +959,39 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, charsetComb->setCurrentItem( 1 ); grid->addWidget( charsetComb, 2, 1 ); - lab = new QLabel( i18n("Update scan data:"), gb ); + lab = new TQLabel( i18n("Update scan data:"), gb ); grid->addWidget( lab, 3, 0 ); updateBtn = new KPushButton( gb ); updateBtn->setGuiItem( KGuiItem(i18n("Download"), icon->loadIconSet("khtml_kget", KIcon::Small) ) ); grid->addWidget( updateBtn, 3, 1 ); - lab = new QLabel( i18n("Dump epg's events to \n~/kaffeine_dvb_events.tx:"), gb ); + lab = new TQLabel( i18n("Dump epg's events to \n~/kaffeine_dvb_events.tx:"), gb ); grid->addWidget( lab, 4, 0 ); dumpBtn = new KPushButton( gb ); dumpBtn->setGuiItem( KGuiItem(i18n("Dump"), icon->loadIconSet("filesave", KIcon::Small) ) ); grid->addWidget( dumpBtn, 4, 1 ); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); if ( p ) { page = addPage(i18n("DVB plugins"),i18n("DVB plugins"), KGlobal::instance()->iconLoader()->loadIcon( "misc", KIcon::NoGroup, KIcon::SizeMedium ) ); - vb = new QVBoxLayout( page, 6, 6 ); - gb = new QGroupBox( "", page ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); + vb = new TQVBoxLayout( page, 6, 6 ); + gb = new TQGroupBox( "", page ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); KPushButton *btn = new KPushButton( p->pluginName(), gb ); grid->addWidget( btn, 0, 0 ); - connect( btn, SIGNAL(clicked()), p, SLOT(configDialog()) ); + connect( btn, TQT_SIGNAL(clicked()), p, TQT_SLOT(configDialog()) ); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); } - connect( recordDirBtn, SIGNAL(clicked()), this, SLOT(setRecordDir()) ); - connect( shiftDirBtn, SIGNAL(clicked()), this, SLOT(setShiftDir()) ); - connect( updateBtn, SIGNAL(clicked()), this, SLOT(downloadData()) ); - connect( helpNameBtn, SIGNAL(clicked()), this, SLOT(fileTemplateHelp()) ); + connect( recordDirBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRecordDir()) ); + connect( shiftDirBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(setShiftDir()) ); + connect( updateBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(downloadData()) ); + connect( helpNameBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(fileTemplateHelp()) ); delete icon; } @@ -1000,30 +1000,30 @@ DvbConfigDialog::DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, void DvbConfigDialog::setUsals() { KDialogBase *dlg = new KDialogBase( this, "usalsConfigDialog", true, i18n("Rotors settings"), Ok|Cancel, Ok, true ); - QGridLayout *grid; - QWidget *page = new QWidget( dlg ); + TQGridLayout *grid; + TQWidget *page = new TQWidget( dlg ); dlg->setMainWidget( page ); - QVBoxLayout *vb = new QVBoxLayout( page, 6, 6 ); - QLabel *lab = new QLabel( i18n("Set your position coordinates for rotors:"), page ); + TQVBoxLayout *vb = new TQVBoxLayout( page, 6, 6 ); + TQLabel *lab = new TQLabel( i18n("Set your position coordinates for rotors:"), page ); vb->addWidget( lab ); - lab = new QLabel( "(Sydney: -33.8916, 151.2417 - New York: 40.7139, -74.0063)", page ); + lab = new TQLabel( "(Sydney: -33.8916, 151.2417 - New York: 40.7139, -74.0063)", page ); vb->addWidget( lab ); - grid = new QGridLayout( 0, 1, 1 ); - lab = new QLabel( i18n("Latitude:"), page ); + grid = new TQGridLayout( 0, 1, 1 ); + lab = new TQLabel( i18n("Latitude:"), page ); grid->addWidget( lab, 0, 0 ); - QLineEdit *latitude = new QLineEdit( page ); - latitude->setText( QString().setNum( dvbConfig->usalsLatitude ) ); + TQLineEdit *latitude = new TQLineEdit( page ); + latitude->setText( TQString().setNum( dvbConfig->usalsLatitude ) ); grid->addWidget( latitude, 0, 1 ); - lab = new QLabel( i18n("Longitude:"), page ); + lab = new TQLabel( i18n("Longitude:"), page ); grid->addWidget( lab, 1, 0 ); - QLineEdit *longitude = new QLineEdit( page ); - longitude->setText( QString().setNum( dvbConfig->usalsLongitude ) ); + TQLineEdit *longitude = new TQLineEdit( page ); + longitude->setText( TQString().setNum( dvbConfig->usalsLongitude ) ); grid->addWidget( longitude, 1, 1 ); vb->addLayout( grid ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); - if ( dlg->exec()==QDialog::Accepted ) { + if ( dlg->exec()==TQDialog::Accepted ) { dvbConfig->usalsLatitude = latitude->text().toDouble(); dvbConfig->usalsLongitude = longitude->text().toDouble(); for ( int i=0; i<(int)dvbConfig->devList.count(); i++ ) { @@ -1045,8 +1045,8 @@ void DvbConfigDialog::setRotorSources( int devNum, int lnbNum ) void DvbConfigDialog::setRotor( int index, int devNum, int lnbNum ) { - QComboBox *comb; - QPushButton *btn; + TQComboBox *comb; + TQPushButton *btn; switch ( lnbNum ) { case 0 : comb=sat0[devNum]; btn=src0[devNum]; break; @@ -1095,11 +1095,11 @@ loop: -void DvbConfigDialog::setSource( QComboBox *box, QString s ) +void DvbConfigDialog::setSource( TQComboBox *box, TQString s ) { int pos, i; - pos = s.find("|"); + pos = s.tqfind("|"); if ( pos>=0 ) s = s.right( s.length()-pos-1 ); for ( i=0; i<(int)box->count(); i++ ) { @@ -1148,7 +1148,7 @@ void DvbConfigDialog::fileTemplateHelp() void DvbConfigDialog::setRecordDir() { - QString s = KFileDialog::getExistingDirectory( recordDirLe->text().stripWhiteSpace() ); + TQString s = KFileDialog::getExistingDirectory( recordDirLe->text().stripWhiteSpace() ); if ( !s.isEmpty() ) recordDirLe->setText( s ); } @@ -1157,7 +1157,7 @@ void DvbConfigDialog::setRecordDir() void DvbConfigDialog::setShiftDir() { - QString s = KFileDialog::getExistingDirectory( shiftDirLe->text().stripWhiteSpace() ); + TQString s = KFileDialog::getExistingDirectory( shiftDirLe->text().stripWhiteSpace() ); if ( !s.isEmpty() ) shiftDirLe->setText( s ); } @@ -1166,7 +1166,7 @@ void DvbConfigDialog::setShiftDir() void DvbConfigDialog::accept() { - QString s; + TQString s; int i; if ( recordDirLe->text().stripWhiteSpace().isEmpty() ) { @@ -1184,12 +1184,12 @@ void DvbConfigDialog::accept() sportSpin->setFocus(); return; } - if ( !QRegExp("(\\d{1,3}\\.){3}\\d{1,3}").exactMatch( broadcastLe->text().stripWhiteSpace() ) ) { + if ( !TQRegExp("(\\d{1,3}\\.){3}\\d{1,3}").exactMatch( broadcastLe->text().stripWhiteSpace() ) ) { KMessageBox::sorry( this, i18n("Invalid broadcast address.") ); broadcastLe->setFocus(); return; } - if ( !filenameFormatLe->text().contains("%chan") && !filenameFormatLe->text().contains("%date") && !filenameFormatLe->text().contains("%name") ) { + if ( !filenameFormatLe->text().tqcontains("%chan") && !filenameFormatLe->text().tqcontains("%date") && !filenameFormatLe->text().tqcontains("%name") ) { KMessageBox::sorry( this, i18n("Invalid filename format.") ); filenameFormatLe->setFocus(); return; @@ -1271,61 +1271,61 @@ DvbConfigDialog::~DvbConfigDialog() -LnbConfig::LnbConfig( LNB *b, QWidget *parent ) : - KDialogBase ( parent, "lnbConfigDialog", true, i18n("LNB Settings"), Ok|Cancel, Ok, true ) +LnbConfig::LnbConfig( LNB *b, TQWidget *tqparent ) : + KDialogBase ( tqparent, "lnbConfigDialog", true, i18n("LNB Settings"), Ok|Cancel, Ok, true ) { - QGridLayout *grid; + TQGridLayout *grid; - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget( page ); lnb = b; - QVBoxLayout *vb = new QVBoxLayout( page, 6, 6 ); - univ = new QPushButton( i18n("Universal LNB"), page ); - connect( univ, SIGNAL(clicked()), this, SLOT(setUniversal()) ); + TQVBoxLayout *vb = new TQVBoxLayout( page, 6, 6 ); + univ = new TQPushButton( i18n("Universal LNB"), page ); + connect( univ, TQT_SIGNAL(clicked()), this, TQT_SLOT(setUniversal()) ); vb->addWidget( univ ); - cmono = new QPushButton( i18n("C-Band LNB"), page ); - connect( cmono, SIGNAL(clicked()), this, SLOT(setCBandMono()) ); + cmono = new TQPushButton( i18n("C-Band LNB"), page ); + connect( cmono, TQT_SIGNAL(clicked()), this, TQT_SLOT(setCBandMono()) ); vb->addWidget( cmono ); - cmulti = new QPushButton( i18n("C-Band Multipoint LNB"), page ); - connect( cmulti, SIGNAL(clicked()), this, SLOT(setCBandMulti()) ); + cmulti = new TQPushButton( i18n("C-Band Multipoint LNB"), page ); + connect( cmulti, TQT_SIGNAL(clicked()), this, TQT_SLOT(setCBandMulti()) ); vb->addWidget( cmulti ); - grid = new QGridLayout( 0, 1, 1 ); - nLO = new QButtonGroup( 3, Qt::Horizontal, page ); - connect( nLO, SIGNAL(clicked(int)), this, SLOT(setDual(int)) ); - new QRadioButton( i18n("Dual LO"), nLO ); - new QRadioButton( i18n("Single LO"), nLO ); - new QRadioButton( i18n("H/V LO"), nLO ); + grid = new TQGridLayout( 0, 1, 1 ); + nLO = new TQButtonGroup( 3, Qt::Horizontal, page ); + connect( nLO, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(setDual(int)) ); + new TQRadioButton( i18n("Dual LO"), nLO ); + new TQRadioButton( i18n("Single LO"), nLO ); + new TQRadioButton( i18n("H/V LO"), nLO ); grid->addMultiCellWidget( nLO, 0, 0, 0, 1 ); - slofLab = new QLabel( i18n("Dual LO switch frequency:")+i18n(" (MHz)"), page ); + slofLab = new TQLabel( i18n("Dual LO switch frequency:")+i18n(" (MHz)"), page ); grid->addWidget( slofLab, 1, 0 ); - slof = new QSpinBox( 0, 13000, 1, page ); + slof = new TQSpinBox( 0, 13000, 1, page ); grid->addWidget( slof, 1, 1 ); - loLab = new QLabel( i18n("Lo-band frequency:")+i18n(" (MHz)"), page ); + loLab = new TQLabel( i18n("Lo-band frequency:")+i18n(" (MHz)"), page ); grid->addWidget( loLab, 2, 0 ); - lo = new QSpinBox( 0, 13000, 1, page ); + lo = new TQSpinBox( 0, 13000, 1, page ); grid->addWidget( lo, 2, 1 ); - hiLab = new QLabel( i18n("Hi-band frequency:")+i18n(" (MHz)"), page ); + hiLab = new TQLabel( i18n("Hi-band frequency:")+i18n(" (MHz)"), page ); grid->addWidget( hiLab, 3, 0 ); - hi = new QSpinBox( 0, 13000, 1, page ); + hi = new TQSpinBox( 0, 13000, 1, page ); grid->addWidget( hi, 3, 1 ); - singleLab = new QLabel( i18n("Single LO frequency:")+i18n(" (MHz)"), page ); + singleLab = new TQLabel( i18n("Single LO frequency:")+i18n(" (MHz)"), page ); grid->addWidget( singleLab, 4, 0 ); - single = new QSpinBox( 0, 13000, 1, page ); + single = new TQSpinBox( 0, 13000, 1, page ); grid->addWidget( single, 4, 1 ); - verticalLab = new QLabel( i18n("Vertical pol. LO frequency:")+i18n(" (MHz)"), page ); + verticalLab = new TQLabel( i18n("Vertical pol. LO frequency:")+i18n(" (MHz)"), page ); grid->addWidget( verticalLab, 5, 0 ); - vertical = new QSpinBox( 0, 13000, 1, page ); + vertical = new TQSpinBox( 0, 13000, 1, page ); grid->addWidget( vertical, 5, 1 ); - horizontalLab = new QLabel( i18n("Horizontal pol. LO frequency:")+i18n(" (MHz)"), page ); + horizontalLab = new TQLabel( i18n("Horizontal pol. LO frequency:")+i18n(" (MHz)"), page ); grid->addWidget( horizontalLab, 6, 0 ); - horizontal = new QSpinBox( 0, 13000, 1, page ); + horizontal = new TQSpinBox( 0, 13000, 1, page ); grid->addWidget( horizontal, 6, 1 ); vb->addLayout( grid ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); slof->setValue( lnb->switchFreq ); @@ -1463,78 +1463,78 @@ void LnbConfig::accept() -RotorConfig::RotorConfig( Device *d, DVBconfig *c, int lnb, QWidget *parent ) : - KDialogBase ( parent, "rotorConfigDialog", true, i18n("Rotor Settings"), Ok|Cancel, Ok, true ) +RotorConfig::RotorConfig( Device *d, DVBconfig *c, int lnb, TQWidget *tqparent ) : + KDialogBase ( tqparent, "rotorConfigDialog", true, i18n("Rotor Settings"), Ok|Cancel, Ok, true ) { int i; - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget( page ); dev = d; config = c; lnbNum = lnb; - QVBoxLayout *vb = new QVBoxLayout( page, 6, 6 ); - QGridLayout *grid = new QGridLayout( 0, 1, 1 ); - QLabel *lab = new QLabel( i18n("Sattelite:"), page ); + TQVBoxLayout *vb = new TQVBoxLayout( page, 6, 6 ); + TQGridLayout *grid = new TQGridLayout( 0, 1, 1 ); + TQLabel *lab = new TQLabel( i18n("Sattelite:"), page ); grid->addWidget( lab, 0, 0 ); if ( dev->lnb[lnbNum].rotorType==2 ) { - lab = new QLabel( i18n("Position:"), page ); + lab = new TQLabel( i18n("Position:"), page ); grid->addWidget( lab, 0, 1 ); } - srcComb = new QComboBox( page ); + srcComb = new TQComboBox( page ); srcComb->insertStringList( config->getSourcesList( dev->type ) ); grid->addWidget( srcComb, 1, 0 ); - position = new QSpinBox( 0, 500, 1, page ); + position = new TQSpinBox( 0, 500, 1, page ); grid->addWidget( position, 1, 1 ); vb->addLayout( grid ); - vb->addItem( new QSpacerItem( 20, 10, QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + vb->addItem( new TQSpacerItem( 20, 10, TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); - addBtn = new QPushButton( i18n("Add to list"), page ); - connect( addBtn, SIGNAL(clicked()), this, SLOT(add()) ); + addBtn = new TQPushButton( i18n("Add to list"), page ); + connect( addBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(add()) ); vb->addWidget( addBtn ); - vb->addItem( new QSpacerItem( 20, 10, QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + vb->addItem( new TQSpacerItem( 20, 10, TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); - listView = new QListView( page ); + listView = new TQListView( page ); listView->addColumn( i18n("Sattelite:") ); vb->addWidget( listView ); - resetBtn = new QPushButton( i18n("Clear list"), page ); - connect( resetBtn, SIGNAL(clicked()), this, SLOT(reset()) ); + resetBtn = new TQPushButton( i18n("Clear list"), page ); + connect( resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset()) ); vb->addWidget( resetBtn ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); if ( dev->lnb[lnbNum].rotorType!=3 ) { - grid = new QGridLayout( 0, 1, 1 ); - lab = new QLabel( i18n("13V rotor speed:"), page ); + grid = new TQGridLayout( 0, 1, 1 ); + lab = new TQLabel( i18n("13V rotor speed:"), page ); grid->addWidget( lab, 0, 0 ); - speed13 = new QLineEdit( page ); - speed13->setText( QString().setNum( dev->lnb[lnbNum].speed13v ) ); + speed13 = new TQLineEdit( page ); + speed13->setText( TQString().setNum( dev->lnb[lnbNum].speed13v ) ); grid->addWidget( speed13, 0, 1 ); - lab = new QLabel( i18n("sec./ °"), page ); + lab = new TQLabel( i18n("sec./ °"), page ); grid->addWidget( lab, 0, 2 ); - lab = new QLabel( i18n("18V rotor speed:"), page ); + lab = new TQLabel( i18n("18V rotor speed:"), page ); grid->addWidget( lab, 1, 0 ); - speed18 = new QLineEdit( page ); - speed18->setText( QString().setNum( dev->lnb[lnbNum].speed18v ) ); + speed18 = new TQLineEdit( page ); + speed18->setText( TQString().setNum( dev->lnb[lnbNum].speed18v ) ); grid->addWidget( speed18, 1, 1 ); - lab = new QLabel( i18n("sec./ °"), page ); + lab = new TQLabel( i18n("sec./ °"), page ); grid->addWidget( lab, 1, 2 ); vb->addLayout( grid ); } - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); if ( dev->lnb[lnbNum].rotorType==2 ) { listView->addColumn( i18n("Position:") ); for ( i=0; i<(int)dev->lnb[lnbNum].source.count(); i++ ) - new QListViewItem( listView, dev->lnb[lnbNum].source[i], QString().setNum(dev->lnb[lnbNum].position[i]) ); + new TQListViewItem( listView, dev->lnb[lnbNum].source[i], TQString().setNum(dev->lnb[lnbNum].position[i]) ); } else { position->hide(); for ( i=0; i<(int)dev->lnb[lnbNum].source.count(); i++ ) - new QListViewItem( listView, dev->lnb[lnbNum].source[i] ); + new TQListViewItem( listView, dev->lnb[lnbNum].source[i] ); } } @@ -1552,10 +1552,10 @@ void RotorConfig::reset() void RotorConfig::add() { if ( position->isHidden() ) { - new QListViewItem( listView, srcComb->currentText() ); + new TQListViewItem( listView, srcComb->currentText() ); } else { - new QListViewItem( listView, srcComb->currentText(), QString().setNum(position->value()) ); + new TQListViewItem( listView, srcComb->currentText(), TQString().setNum(position->value()) ); } } @@ -1564,7 +1564,7 @@ void RotorConfig::add() void RotorConfig::accept() { - QListViewItem *it; + TQListViewItem *it; if ( dev->lnb[lnbNum].rotorType!=3 ) { dev->lnb[lnbNum].speed18v = speed18->text().toDouble(); diff --git a/kaffeine/src/input/dvb/dvbconfig.h b/kaffeine/src/input/dvb/dvbconfig.h index 04f2bf1..f44756e 100644 --- a/kaffeine/src/input/dvb/dvbconfig.h +++ b/kaffeine/src/input/dvb/dvbconfig.h @@ -21,14 +21,14 @@ #ifndef DVBCONFIG_H #define DVBCONFIG_H -#include <qspinbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qtoolbutton.h> -#include <qbuttongroup.h> -#include <qlistview.h> -#include <qcheckbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqtoolbutton.h> +#include <tqbuttongroup.h> +#include <tqlistview.h> +#include <tqcheckbox.h> #include <kdialogbase.h> #include <kpushbutton.h> @@ -42,11 +42,12 @@ using namespace KIO; -class MSpinBox : public QSpinBox +class MSpinBox : public TQSpinBox { Q_OBJECT + TQ_OBJECT public: - MSpinBox( QWidget *parent, int devNum ); + MSpinBox( TQWidget *tqparent, int devNum ); public slots: void slotValueChanged( int value ); signals: @@ -60,8 +61,9 @@ private: class MPushButton : public KPushButton { Q_OBJECT + TQ_OBJECT public: - MPushButton( QWidget *parent, int devNum, int lnbNum ); + MPushButton( TQWidget *tqparent, int devNum, int lnbNum ); private slots: void isClicked(); signals: @@ -73,11 +75,12 @@ private: -class MCAMButton : public QPushButton +class MCAMButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - MCAMButton( QWidget *parent, int devNum ); + MCAMButton( TQWidget *tqparent, int devNum ); private slots: void isClicked(); signals: @@ -88,11 +91,12 @@ private: -class MComboBox : public QComboBox +class MComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: - MComboBox( QWidget *parent, int devNum, int lnbNum ); + MComboBox( TQWidget *tqparent, int devNum, int lnbNum ); private slots: void isActivated( int index ); signals: @@ -114,9 +118,9 @@ public: unsigned int hiFreq; int rotorType; double speed13v, speed18v; - QStringList source; - QValueList<int> position; - QString currentSource; + TQStringList source; + TQValueList<int> position; + TQString currentSource; }; @@ -124,11 +128,11 @@ public: class Device { public: - Device( int anum, int tnum, fe_type_t t, const QString &n, bool as ); + Device( int anum, int tnum, fe_type_t t, const TQString &n, bool as ); int adapter, tuner; fe_type_t type; - QString name; - QString source; + TQString name; + TQString source; int numLnb; LNB lnb[4]; bool canAutoscan; @@ -147,20 +151,21 @@ public: class Category { public: - Category( const QString &tname, const QString &ticon ); - QString name; - QString icon; + Category( const TQString &tname, const TQString &ticon ); + TQString name; + TQString icon; }; -class DVBconfig : public QObject +class DVBconfig : public TQObject { Q_OBJECT + TQ_OBJECT public: - DVBconfig( const QString &dvbConf ); + DVBconfig( const TQString &dvbConf ); ~DVBconfig(); void readFirst(); void readConfig(); @@ -169,29 +174,29 @@ public: void saveDvbChanOrder( int s, int col ); void startup(); static bool haveDvbDevice(); - bool loadDvbData( QWidget *parent ); + bool loadDvbData( TQWidget *tqparent ); bool localData(); - QStringList getSourcesList( fe_type_t type ); + TQStringList getSourcesList( fe_type_t type ); bool haveData(); bool firstRun(); - void addCategory( const QString &name, const QString &icon ); - void removeCategory( const QString &name ); - void changeIconCategory( const QString &name, const QString &icon ); + void addCategory( const TQString &name, const TQString &icon ); + void removeCategory( const TQString &name ); + void changeIconCategory( const TQString &name, const TQString &icon ); KConfig *config; - QString recordDir, shiftDir, filenameFormat; + TQString recordDir, shiftDir, filenameFormat; int beginMargin, endMargin, instantDuration, sizeFile; - QSize epgSize, scanSize, timerSize; - QPtrList<Device> devList; - QPtrList<Category> categories; - QString allIcon, tvIcon, radioIcon; - QString dvbConfigDir; - QString dvbConfigIconsDir; - QString broadcastAddress; + TQSize epgSize, scanSize, timerSize; + TQPtrList<Device> devList; + TQPtrList<Category> categories; + TQString allIcon, tvIcon, radioIcon; + TQString dvbConfigDir; + TQString dvbConfigIconsDir; + TQString broadcastAddress; int broadcastPort, senderPort; int lastChannel; - QValueList<int> splitSizes; - QString defaultCharset; + TQValueList<int> splitSizes; + TQString defaultCharset; double usalsLatitude, usalsLongitude; int probeMfe; int ringBufSize; @@ -215,22 +220,23 @@ class DvbPanel; class DvbConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, QWidget *parent, KaffeineDvbPlugin *p ); + DvbConfigDialog( DvbPanel *pan, DVBconfig *dc, TQWidget *tqparent, KaffeineDvbPlugin *p ); ~DvbConfigDialog(); - void setSource( QComboBox *box, QString s ); + void setSource( TQComboBox *box, TQString s ); - QLineEdit *recordDirLe, *shiftDirLe, *broadcastLe, *filenameFormatLe; - QSpinBox *beginSpin, *endSpin, *instantDurationSpin, *bportSpin, *sportSpin, *sizeFileSpin; + TQLineEdit *recordDirLe, *shiftDirLe, *broadcastLe, *filenameFormatLe; + TQSpinBox *beginSpin, *endSpin, *instantDurationSpin, *bportSpin, *sportSpin, *sizeFileSpin; MSpinBox *satNumber[MAX_DEVICES]; - QCheckBox *secMini[MAX_DEVICES], *secTwice[MAX_DEVICES]; - QCheckBox *doS2[MAX_DEVICES]; - QComboBox *sat0[MAX_DEVICES]; - QComboBox *sat1[MAX_DEVICES]; - QComboBox *sat2[MAX_DEVICES]; - QComboBox *sat3[MAX_DEVICES]; + TQCheckBox *secMini[MAX_DEVICES], *secTwice[MAX_DEVICES]; + TQCheckBox *doS2[MAX_DEVICES]; + TQComboBox *sat0[MAX_DEVICES]; + TQComboBox *sat1[MAX_DEVICES]; + TQComboBox *sat2[MAX_DEVICES]; + TQComboBox *sat3[MAX_DEVICES]; MPushButton *src0[MAX_DEVICES]; MPushButton *src1[MAX_DEVICES]; MPushButton *src2[MAX_DEVICES]; @@ -244,13 +250,13 @@ public: MPushButton *lnb2[MAX_DEVICES]; MPushButton *lnb3[MAX_DEVICES]; KPushButton *updateBtn, *dumpBtn; - QToolButton *recordDirBtn, *shiftDirBtn, *helpNameBtn; + TQToolButton *recordDirBtn, *shiftDirBtn, *helpNameBtn; DVBconfig *dvbConfig; - QComboBox *charsetComb; - QPtrList<QSpinBox> timeoutSpin; - QPtrList<QSpinBox> priority; - QCheckBox *probeMfe; - QSpinBox *ringBufSize; + TQComboBox *charsetComb; + TQPtrList<TQSpinBox> timeoutSpin; + TQPtrList<TQSpinBox> priority; + TQCheckBox *probeMfe; + TQSpinBox *ringBufSize; private slots: @@ -274,10 +280,11 @@ protected slots: class LnbConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LnbConfig( LNB *b, QWidget *parent ); + LnbConfig( LNB *b, TQWidget *tqparent ); protected slots: @@ -289,11 +296,11 @@ protected slots: private: - QSpinBox *slof; - QSpinBox *lo, *hi, *single, *vertical, *horizontal; - QLabel *slofLab, *loLab, *hiLab, *singleLab, *verticalLab, *horizontalLab; - QButtonGroup *nLO; - QPushButton *univ, *cmono, *cmulti; + TQSpinBox *slof; + TQSpinBox *lo, *hi, *single, *vertical, *horizontal; + TQLabel *slofLab, *loLab, *hiLab, *singleLab, *verticalLab, *horizontalLab; + TQButtonGroup *nLO; + TQPushButton *univ, *cmono, *cmulti; LNB *lnb; }; @@ -303,10 +310,11 @@ private: class RotorConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - RotorConfig( Device *d, DVBconfig *c, int lnb, QWidget *parent ); + RotorConfig( Device *d, DVBconfig *c, int lnb, TQWidget *tqparent ); protected slots: @@ -319,11 +327,11 @@ private slots: private: - QSpinBox *position; - QComboBox *srcComb; - QListView *listView; - QPushButton *addBtn, *resetBtn; - QLineEdit *speed13, *speed18; + TQSpinBox *position; + TQComboBox *srcComb; + TQListView *listView; + TQPushButton *addBtn, *resetBtn; + TQLineEdit *speed13, *speed18; Device *dev; int lnbNum; diff --git a/kaffeine/src/input/dvb/dvbevents.cpp b/kaffeine/src/input/dvb/dvbevents.cpp index 13e1265..a6687bf 100644 --- a/kaffeine/src/input/dvb/dvbevents.cpp +++ b/kaffeine/src/input/dvb/dvbevents.cpp @@ -23,8 +23,8 @@ #include <sys/time.h> #include <sys/resource.h> -#include <qdatetime.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqfile.h> #include <klocale.h> #include <kstandarddirs.h> @@ -35,12 +35,12 @@ -DVBevents::DVBevents( QString devType, int anum, int tnum, const QString &charset, EventTable *table ) +DVBevents::DVBevents( TQString devType, int anum, int tnum, const TQString &charset, EventTable *table ) : KaffeineDVBsection( anum, tnum, charset ) { events = table; KaffeineEpgPlugin *plug; - QString plugName; + TQString plugName; int error; KTrader::OfferList offers = KTrader::self()->query("KaffeineEpgPlugin"); @@ -48,7 +48,7 @@ DVBevents::DVBevents( QString devType, int anum, int tnum, const QString &charse for ( KTrader::OfferList::Iterator it=offers.begin(); it!=end; ++it ) { error = 0; KService::Ptr ptr = (*it); - if ( !ptr->name().contains(devType) ) + if ( !ptr->name().tqcontains(devType) ) continue; plug = KParts::ComponentFactory::createPartInstanceFromService<KaffeineEpgPlugin>(ptr, 0, ptr->name().ascii(), 0, 0, 0, &error ); plugName = ptr->desktopEntryName(); @@ -88,7 +88,7 @@ DVBevents::~DVBevents() bool DVBevents::shortEventDesc( unsigned char *buf, EventDesc *desc ) { - QString name, text; + TQString name, text; int len, len2; ShortEvent *ev; @@ -122,7 +122,7 @@ bool DVBevents::extEventDesc( unsigned char *buf, EventDesc *desc ) { int loop, len1, len2; unsigned char *b = buf; - QString s; + TQString s; if ( !safeLen( b+7 ) ) return false; @@ -144,7 +144,7 @@ bool DVBevents::extEventDesc( unsigned char *buf, EventDesc *desc ) if ( !s.isEmpty() ) s = s+" : "; s = s+getText(b+2+len1,len2); - desc->extEvents.append( new QString( s ) ); + desc->extEvents.append( new TQString( s ) ); b +=(2+len1+len2); loop -=(2+len1+len2); } @@ -154,7 +154,7 @@ bool DVBevents::extEventDesc( unsigned char *buf, EventDesc *desc ) if ( !safeLen( b+1+len1 ) ) return false; s = getText(b+1,len1); - desc->extEvents.append( new QString( s ) ); + desc->extEvents.append( new TQString( s ) ); return true; } @@ -167,10 +167,10 @@ bool DVBevents::tableEIT( unsigned char* buffer ) int i, sec; EventDesc *desc=0, *itdesc=0; EventSid *slist; - QPtrList<EventDesc> *currentEvents; + TQPtrList<EventDesc> *currentEvents; bool nodesc, parse; - QDateTime start, cur, dt; - unsigned int cdt = QDateTime::currentDateTime().toTime_t(); + TQDateTime start, cur, dt; + unsigned int cdt = TQDateTime::tqcurrentDateTime().toTime_t(); tid = getBits(buf,0,8); length = getBits(buf,12,12); @@ -187,7 +187,7 @@ bool DVBevents::tableEIT( unsigned char* buffer ) return false; slist->lock(); currentEvents = slist->getEvents(); - QPtrListIterator<EventDesc> it( *currentEvents ); + TQPtrListIterator<EventDesc> it( *currentEvents ); while ( length>4 ) { nodesc=parse=false; @@ -280,7 +280,7 @@ bool DVBevents::tableEIT( unsigned char* buffer ) if ( !nodesc ) { if ( start==desc->startDateTime ) goto ifend; - currentEvents->take( currentEvents->find( desc ) ); + currentEvents->take( currentEvents->tqfind( desc ) ); } desc->startDateTime = start; for ( i=0; i<(int)currentEvents->count(); i++ ) { @@ -298,7 +298,7 @@ ifend: if ( parse ) ++(desc->sn); if ( nodesc ) { - cur = QDateTime::currentDateTime(); + cur = TQDateTime::tqcurrentDateTime(); dt = desc->startDateTime; sec = desc->duration.hour()*3600+desc->duration.minute()*60+desc->duration.second(); if ( dt.addSecs( sec )<cur || desc->title.length()<3 ) { @@ -332,7 +332,7 @@ bool DVBevents::safeLen( unsigned char* buf ) -bool DVBevents::go( QString src, int freqKHz, bool all ) +bool DVBevents::go( TQString src, int freqKHz, bool all ) { int tid, i; diff --git a/kaffeine/src/input/dvb/dvbevents.h b/kaffeine/src/input/dvb/dvbevents.h index e5d693d..e8985b4 100644 --- a/kaffeine/src/input/dvb/dvbevents.h +++ b/kaffeine/src/input/dvb/dvbevents.h @@ -21,7 +21,7 @@ #ifndef DVBEVENTS_H #define DVBEVENTS_H -#include <qptrlist.h> +#include <tqptrlist.h> #include "kaffeinedvbsection.h" #include "kaffeinedvbevents.h" @@ -33,9 +33,9 @@ class DVBevents : public KaffeineDVBsection public: - DVBevents( QString devType, int anum, int tnum, const QString &charset, EventTable *table ); + DVBevents( TQString devType, int anum, int tnum, const TQString &charset, EventTable *table ); ~DVBevents(); - bool go( QString src, int freqKHz, bool all=false ); + bool go( TQString src, int freqKHz, bool all=false ); void stop(); private: @@ -52,8 +52,8 @@ private: EventTable *events; EventSource *currentSrc; - QPtrList<KaffeineEpgPlugin> plugs; - QStringList plugNames; + TQPtrList<KaffeineEpgPlugin> plugs; + TQStringList plugNames; }; #endif /* DVBEVENTS_H */ diff --git a/kaffeine/src/input/dvb/dvbout.cpp b/kaffeine/src/input/dvb/dvbout.cpp index c398707..0002170 100644 --- a/kaffeine/src/input/dvb/dvbout.cpp +++ b/kaffeine/src/input/dvb/dvbout.cpp @@ -61,9 +61,9 @@ DVBout::DVBout( ChannelDesc chan, int anum, int tnum, KaffeineDvbPlugin *p ) timeShifting = beginLive = false; haveRec = haveLive = instantRec = haveBroadcast = false; patpmt = wpatpmt = false; - connect( &stopRecTimer, SIGNAL(timeout()), this, SLOT(stopRec()) ); - connect( &timerPatPmt, SIGNAL(timeout()), this, SLOT(setPatPmt()) ); - if ( !pids.contains(8192) ) + connect( &stopRecTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(stopRec()) ); + connect( &timerPatPmt, TQT_SIGNAL(timeout()), this, TQT_SLOT(setPatPmt()) ); + if ( !pids.tqcontains(8192) ) timerPatPmt.start(500); } @@ -109,7 +109,7 @@ void DVBout::writePat() tspat[0x0d] = tspat[0x0e] = 0x00; tspat[0x0f] = 0xe0; tspat[0x10] = 0x10; // Program Map PID pmtpid = 0xff; - while ( pids.contains( pmtpid ) ) pmtpid--; + while ( pids.tqcontains( pmtpid ) ) pmtpid--; tspat[0x11] = 0x03; tspat[0x12] = 0xe8; tspat[0x13] = 0xe0; tspat[0x14] = pmtpid; // Put CRC in ts[0x15...0x18] calculateCRC( tspat + 0x05, tspat + 0x15 ); @@ -250,7 +250,7 @@ bool DVBout::hasBroadcast() const -bool DVBout::doPause( const QString &name ) // called from dvbstream::run() +bool DVBout::doPause( const TQString &name ) // called from dvbstream::run() { if ( !haveLive ) return false; @@ -289,7 +289,7 @@ void DVBout::setPatPmt() -bool DVBout::goLive( const QString &name, int ringBufSize ) +bool DVBout::goLive( const TQString &name, int ringBufSize ) { if ( fdPipe ) return false; @@ -300,7 +300,7 @@ bool DVBout::goLive( const QString &name, int ringBufSize ) writePat(); writePmt(); - if ( !pids.contains(8192) ) + if ( !pids.tqcontains(8192) ) patpmt = wpatpmt = true; wbufSize = ringBufSize*1024*1024/(TS_SIZE*NTS); wBuf = new unsigned char[TS_SIZE*NTS*wbufSize]; @@ -368,9 +368,9 @@ void DVBout::stopBroadcast() -bool DVBout::goRec( const QString &name, int maxsize, RecTimer *t ) +bool DVBout::goRec( const TQString &name, int maxsize, RecTimer *t ) { - QString fname=name; + TQString fname=name; if ( haveRec ) return false; @@ -381,13 +381,13 @@ bool DVBout::goRec( const QString &name, int maxsize, RecTimer *t ) if (maxsize>0) { fileMaxSize = (long long int)1048576*(long long int)maxsize; - fname=fileName+"_"+QString().setNum(fileNumber); + fname=fileName+"_"+TQString().setNum(fileNumber); } else { fileMaxSize = 0; fname=fileName; } - if ( QFile(fname+".m2t").exists() ) + if ( TQFile(fname+".m2t").exists() ) renameFile( fname, ".m2t" ); writePat(); writePmt(); @@ -402,8 +402,8 @@ bool DVBout::goRec( const QString &name, int maxsize, RecTimer *t ) haveRec = true; if ( recTimer ) { - QTime t = recTimer->duration.addSecs( QDateTime::currentDateTime().secsTo(recTimer->begin) ); - stopRecTimer.start( QTime().msecsTo( t ), true ); + TQTime t = recTimer->duration.addSecs( TQDateTime::tqcurrentDateTime().secsTo(recTimer->begin) ); + stopRecTimer.start( TQTime().msecsTo( t ), true ); } else instantRec = true; @@ -413,14 +413,14 @@ bool DVBout::goRec( const QString &name, int maxsize, RecTimer *t ) -void DVBout::renameFile( QString &name, const QString &ext ) +void DVBout::renameFile( TQString &name, const TQString &ext ) { int index=1; - while ( QFile(name+"-"+QString().setNum(index)+ext).exists() ) + while ( TQFile(name+"-"+TQString().setNum(index)+ext).exists() ) index++; - name = name+"-"+QString().setNum(index); + name = name+"-"+TQString().setNum(index); } @@ -457,11 +457,11 @@ void DVBout::process( unsigned char *buf, int size ) { int i, pid; unsigned char *buffer=buf; - QString fname; + TQString fname; for ( i=0; i<size; i+=TS_SIZE ) { pid = (((buffer[1] & 0x1f) << 8) | buffer[2]); - if ( pids.contains( pid ) || pids.contains( 8192) ) { + if ( pids.tqcontains( pid ) || pids.tqcontains( 8192) ) { memcpy( thBuf+thWrite, buffer, TS_SIZE ); thWrite+=TS_SIZE; if ( thWrite==(TS_SIZE*NTS ) ) { @@ -496,8 +496,8 @@ void DVBout::process( unsigned char *buf, int size ) if ((fileMaxSize>0)&&(outFile.size()>=fileMaxSize)) { outFile.close(); fileNumber++; - fname=fileName+"_"+QString().setNum(fileNumber); - if (QFile(fname+"_"+QString().setNum(fileNumber)+".m2t").exists() ) + fname=fileName+"_"+TQString().setNum(fileNumber); + if (TQFile(fname+"_"+TQString().setNum(fileNumber)+".m2t").exists() ) renameFile( fname, ".m2t" ); outFile.setName( fname+".m2t" ); diff --git a/kaffeine/src/input/dvb/dvbout.h b/kaffeine/src/input/dvb/dvbout.h index a037c7d..b52e511 100644 --- a/kaffeine/src/input/dvb/dvbout.h +++ b/kaffeine/src/input/dvb/dvbout.h @@ -21,13 +21,13 @@ #ifndef DVBOUT_H #define DVBOUT_H -#include <qobject.h> -#include <qthread.h> -#include <qmutex.h> -#include <qstring.h> -#include <qfile.h> -#include <qtimer.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqthread.h> +#include <tqmutex.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqvaluelist.h> #include "channeldesc.h" #include "ts2rtp.h" @@ -35,32 +35,33 @@ class KaffeineDvbPlugin; -class DVBout : public QObject, public QThread +class DVBout : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: DVBout( ChannelDesc chan, int anum, int tnum, KaffeineDvbPlugin *p ); ~DVBout(); void process( unsigned char *buf, int size ); - bool goLive( const QString &name, int ringBufSize ); + bool goLive( const TQString &name, int ringBufSize ); void preStopLive(); void stopLive(); bool goBroadcast( Ts2Rtp *r ); void stopBroadcast(); - bool goRec( const QString &name, int maxsize, RecTimer *t ); + bool goRec( const TQString &name, int maxsize, RecTimer *t ); bool hasRec() const; bool hasLive() const; bool hasBroadcast() const; bool hasInstantRec() const; bool timeShiftMode() const; - bool doPause( const QString &name ); + bool doPause( const TQString &name ); void changeTimer( int ms ); - QValueList<int> pidsList() { return pids; } + TQValueList<int> pidsList() { return pids; } ChannelDesc channel; - QValueList<int> dmx, pids; + TQValueList<int> dmx, pids; RecTimer *recTimer; public slots: @@ -76,13 +77,13 @@ private: void writePmt(); void writePat(); void calculateCRC( unsigned char *p_begin, unsigned char *p_end ); - void renameFile( QString &name, const QString &ext ); + void renameFile( TQString &name, const TQString &ext ); int pmtpid; bool patpmt, wpatpmt; bool timeShifting; - QString pipeName; - QFile outFile, liveFile; + TQString pipeName; + TQFile outFile, liveFile; int fdPipe; Ts2Rtp *rtp; unsigned char thBuf[188*100]; @@ -94,13 +95,13 @@ private: int thWrite; bool beginLive; bool haveRec, haveLive, instantRec, haveBroadcast; - QTimer stopRecTimer, timerPatPmt; - QMutex mutex; + TQTimer stopRecTimer, timerPatPmt; + TQMutex mutex; KaffeineDvbPlugin *plug; void *plugHandle; int fileNumber; - QString fileName; + TQString fileName; long long int fileMaxSize; int wbufSize; diff --git a/kaffeine/src/input/dvb/dvbpanel.cpp b/kaffeine/src/input/dvb/dvbpanel.cpp index 1b62aec..058619a 100644 --- a/kaffeine/src/input/dvb/dvbpanel.cpp +++ b/kaffeine/src/input/dvb/dvbpanel.cpp @@ -20,17 +20,17 @@ #include <sys/statvfs.h> -#include <qlayout.h> -#include <qfile.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qapplication.h> -#include <qpopupmenu.h> -#include <qmap.h> +#include <tqlayout.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqapplication.h> +#include <tqpopupmenu.h> +#include <tqmap.h> #include <kiconloader.h> #include <klocale.h> @@ -63,44 +63,44 @@ -DIconViewItem::DIconViewItem( DvbPanel *pan, QIconView *parent, const QString &text, const QPixmap &icon ) - : KIconViewItem( parent, text, icon ) +DIconViewItem::DIconViewItem( DvbPanel *pan, TQIconView *tqparent, const TQString &text, const TQPixmap &icon ) + : KIconViewItem( tqparent, text, icon ) { panel = pan; } -void DIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragItem> & ) +void DIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) { - QString s; + TQString s; if ( !dropEnabled() ) return; - if ( QTextDrag::decode( e, s ) ) + if ( TQTextDrag::decode( e, s ) ) panel->moveChannel( text(), s ); } -DListView::DListView( QWidget *parent ) : KListView( parent ) +DListView::DListView( TQWidget *tqparent ) : KListView( tqparent ) { visibleItems = 0; } -QDragObject* DListView::dragObject() +TQDragObject* DListView::dragObject() { if ( currentItem() ) - return new QTextDrag( currentItem()->text(1), this ); + return new TQTextDrag( currentItem()->text(1), this ); else return 0; } -DvbPanel::DvbPanel( QWidget *parent, QObject *objParent, const char *name ) : KaffeineInput(objParent,name) +DvbPanel::DvbPanel( TQWidget *tqparent, TQObject *objParent, const char *name ) : KaffeineInput(objParent,name) { browseDvbStream = -1; plug = NULL; @@ -113,124 +113,124 @@ DvbPanel::DvbPanel( QWidget *parent, QObject *objParent, const char *name ) : Ka timers.setAutoDelete( true ); dvb.setAutoDelete( true ); - mainWidget = new QVBox( parent ); - mainWidget->setSizePolicy( QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred) ); - split = new QSplitter( mainWidget ); + mainWidget = new TQVBox( tqparent ); + mainWidget->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Preferred, TQSizePolicy::Preferred) ); + split = new TQSplitter( mainWidget ); split->setOpaqueResize( true ); - pbox = new QVBox( split ); + pbox = new TQVBox( split ); iconView = new KIconView( pbox ); - iconView->setVScrollBarMode( QScrollView::AlwaysOff ); - iconView->setHScrollBarMode( QScrollView::AlwaysOff ); + iconView->setVScrollBarMode( TQScrollView::AlwaysOff ); + iconView->setHScrollBarMode( TQScrollView::AlwaysOff ); iconView->horizontalScrollBar()->setFixedHeight( 0 ); - connect( iconView, SIGNAL(rightButtonPressed(QIconViewItem*,const QPoint&)), this, SLOT(catContextMenu(QIconViewItem*,const QPoint&)) ); - connect( iconView, SIGNAL(clicked(QIconViewItem*)), this, SLOT(catSelected(QIconViewItem*)) ); - iconView->setArrangement(QIconView::TopToBottom); + connect( iconView, TQT_SIGNAL(rightButtonPressed(TQIconViewItem*,const TQPoint&)), this, TQT_SLOT(catContextMenu(TQIconViewItem*,const TQPoint&)) ); + connect( iconView, TQT_SIGNAL(clicked(TQIconViewItem*)), this, TQT_SLOT(catSelected(TQIconViewItem*)) ); + iconView->setArrangement(TQIconView::TopToBottom); iconView->setMargin(0); iconView->setSpacing(0); iconView->setItemsMovable(false); - iconView->setResizeMode(QIconView::Adjust); - iconView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum ) ); - playerBox = new QVBox( pbox ); + iconView->setResizeMode(TQIconView::Adjust); + iconView->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); + playerBox = new TQVBox( pbox ); playerBox->setMinimumWidth( 200 ); - panel = new QFrame( split ); + panel = new TQFrame( split ); panel->setLineWidth(1); - panel->setFrameStyle(QFrame::Panel|QFrame::Sunken); + panel->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); split->moveToFirst( panel ); - split->setResizeMode( panel, QSplitter::KeepSize ); + split->setResizeMode( panel, TQSplitter::KeepSize ); - QVBoxLayout *vb = new QVBoxLayout( panel, 3, 3 ); - channelsBtn = new QToolButton( panel ); + TQVBoxLayout *vb = new TQVBoxLayout( panel, 3, 3 ); + channelsBtn = new TQToolButton( panel ); channelsBtn->setAutoRaise( true ); - QToolTip::add( channelsBtn, i18n("Channels")); - dateBtn = new QToolButton( panel ); + TQToolTip::add( channelsBtn, i18n("Channels")); + dateBtn = new TQToolButton( panel ); dateBtn->setAutoRaise( true ); - QToolTip::add( dateBtn, i18n("Timers")); - infoBtn = new QToolButton( panel ); + TQToolTip::add( dateBtn, i18n("Timers")); + infoBtn = new TQToolButton( panel ); infoBtn->setAutoRaise( true ); - QToolTip::add( infoBtn, i18n("Electronic Program Guide")); - osdBtn = new QToolButton( panel ); + TQToolTip::add( infoBtn, i18n("Electronic Program Guide")); + osdBtn = new TQToolButton( panel ); osdBtn->setAutoRaise( true ); - QToolTip::add( osdBtn, i18n("OSD")); - configBtn = new QToolButton( panel ); + TQToolTip::add( osdBtn, i18n("OSD")); + configBtn = new TQToolButton( panel ); configBtn->setAutoRaise( true ); - QToolTip::add( configBtn, i18n("DVB settings")); - recallBtn = new QToolButton( panel ); + TQToolTip::add( configBtn, i18n("DVB settings")); + recallBtn = new TQToolButton( panel ); recallBtn->setAutoRaise( true ); - QToolTip::add( recallBtn, i18n("Recall")); - QHBoxLayout *h1 = new QHBoxLayout(); - h1->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Minimum ) ); + TQToolTip::add( recallBtn, i18n("Recall")); + TQHBoxLayout *h1 = new TQHBoxLayout(); + h1->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); h1->addWidget( channelsBtn ); h1->addWidget( dateBtn ); h1->addWidget( infoBtn ); h1->addWidget( osdBtn ); h1->addWidget( configBtn ); h1->addWidget( recallBtn ); - h1->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Minimum ) ); + h1->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); vb->addLayout( h1 ); - h1 = new QHBoxLayout(); - searchBtn = new QToolButton( panel ); + h1 = new TQHBoxLayout(); + searchBtn = new TQToolButton( panel ); searchBtn->setAutoRaise( true ); - QToolTip::add( searchBtn, i18n("Search channel(s)")); - QLabel* filterLabel = new QLabel( i18n("Filter") + ":", panel ); + TQToolTip::add( searchBtn, i18n("Search channel(s)")); + TQLabel* filterLabel = new TQLabel( i18n("Filter") + ":", panel ); searchLE = new KLineEdit( panel ); - searchLE->setFocusPolicy( QWidget::ClickFocus ); + searchLE->setFocusPolicy( TQ_ClickFocus ); h1->addWidget( searchBtn ); h1->addWidget( filterLabel ); h1->addWidget( searchLE ); vb->addLayout( h1 ); channelsCb = new DListView( panel ); - channelsCb->setHScrollBarMode( QListView::AlwaysOff ); - //channelsCb->setPaletteBackgroundColor( QColor(255,255,200) ); - connect( channelsCb, SIGNAL(itemRenamed(QListViewItem*)), this, SLOT(channelNumberChanged(QListViewItem*)) ); - connect( channelsCb, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(channelSelected(QListViewItem*)) ); - connect( channelsCb, SIGNAL(clicked(QListViewItem*)), this, SLOT(channelClicked(QListViewItem*)) ); - connect( channelsCb, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)), this, SLOT(channelPopup(QListViewItem*,const QPoint&,int)) ); + channelsCb->setHScrollBarMode( TQListView::AlwaysOff ); + //channelsCb->setPaletteBackgroundColor( TQColor(255,255,200) ); + connect( channelsCb, TQT_SIGNAL(itemRenamed(TQListViewItem*)), this, TQT_SLOT(channelNumberChanged(TQListViewItem*)) ); + connect( channelsCb, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(channelSelected(TQListViewItem*)) ); + connect( channelsCb, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(channelClicked(TQListViewItem*)) ); + connect( channelsCb, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(channelPopup(TQListViewItem*,const TQPoint&,int)) ); channelsCb->setItemsRenameable( true ); channelsCb->addColumn( i18n("Number") ); channelsCb->addColumn( i18n("Name") ); channelsCb->addColumn( i18n("Source") ); channelsCb->setAllColumnsShowFocus( true ); - channelsCb->setSizePolicy( QSizePolicy (QSizePolicy::Preferred, QSizePolicy::MinimumExpanding) ); + channelsCb->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding) ); //channelsCb->setEnabled( false ); vb->addWidget( channelsCb ); - h1 = new QHBoxLayout(); - recordBtn = new QToolButton( panel ); - QToolTip::add( recordBtn, i18n("Instant Record") ); + h1 = new TQHBoxLayout(); + recordBtn = new TQToolButton( panel ); + TQToolTip::add( recordBtn, i18n("Instant Record") ); recordBtn->setToggleButton( true ); h1->addWidget( recordBtn ); - broadcastBtn = new QToolButton( panel ); - QToolTip::add( broadcastBtn, i18n("Broadcast") ); + broadcastBtn = new TQToolButton( panel ); + TQToolTip::add( broadcastBtn, i18n("Broadcast") ); h1->addWidget( broadcastBtn ); vb->addLayout( h1 ); - h1 = new QHBoxLayout(); - h1->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Minimum ) ); + h1 = new TQHBoxLayout(); + h1->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); shiftLed = new KLed( panel ); - shiftLed->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + shiftLed->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); shiftLed->setDarkFactor( 500 ); shiftLed->off(); - QToolTip::add( shiftLed, i18n("Time shifting") ); + TQToolTip::add( shiftLed, i18n("Time shifting") ); h1->addWidget( shiftLed ); - h1->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Minimum ) ); + h1->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); recordLed = new KLed( panel ); - recordLed->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - recordLed->setColor( QColor( 255,0,0 ) ); + recordLed->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + recordLed->setColor( TQColor( 255,0,0 ) ); recordLed->setDarkFactor( 500 ); recordLed->off(); - QToolTip::add( recordLed, i18n("Recording") ); + TQToolTip::add( recordLed, i18n("Recording") ); h1->addWidget( recordLed ); - h1->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Minimum ) ); + h1->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); broadcastLed = new KLed( panel ); - broadcastLed->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - broadcastLed->setColor( QColor( 255,128,0 ) ); + broadcastLed->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + broadcastLed->setColor( TQColor( 255,128,0 ) ); broadcastLed->setDarkFactor( 500 ); broadcastLed->off(); - QToolTip::add( broadcastLed, i18n("Broadcasting") ); + TQToolTip::add( broadcastLed, i18n("Broadcasting") ); h1->addWidget( broadcastLed ); - h1->addItem( new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Minimum ) ); + h1->addItem( new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); vb->addLayout( h1 ); KIconLoader *icon = new KIconLoader(); @@ -238,9 +238,9 @@ DvbPanel::DvbPanel( QWidget *parent, QObject *objParent, const char *name ) : Ka tvcPix = icon->loadIcon( "kdvbtvc", KIcon::Small ); raPix = icon->loadIcon( "kdvbra", KIcon::Small ); racPix = icon->loadIcon( "kdvbrac", KIcon::Small ); - QIconSet iconset; - iconset.setPixmap( icon->loadIcon( "filesave", KIcon::Small ), QIconSet::Small ); - iconset.setPixmap( icon->loadIcon( "player_record", KIcon::Small), QIconSet::Small, QIconSet::Normal, QIconSet::On ); + TQIconSet iconset; + iconset.setPixmap( icon->loadIcon( "filesave", KIcon::Small ), TQIconSet::Small ); + iconset.setPixmap( icon->loadIcon( "player_record", KIcon::Small), TQIconSet::Small, TQIconSet::Normal, TQIconSet::On ); recordBtn->setIconSet( iconset ); broadcastBtn->setIconSet( icon->loadIconSet("network_local", KIcon::Small) ); dateBtn->setIconSet( icon->loadIconSet("date", KIcon::Small) ); @@ -254,25 +254,25 @@ DvbPanel::DvbPanel( QWidget *parent, QObject *objParent, const char *name ) : Ka setXMLFile("kaffeinedvb.rc"); setupActions(); - connect( this, SIGNAL(zap(ChannelDesc*)), SLOT(dvbZap(ChannelDesc*)) ); - connect( configBtn, SIGNAL(clicked()), this, SLOT(showConfigDialog())); - connect( recallBtn, SIGNAL(clicked()), this, SLOT(recallZap())); - - connect( recordBtn, SIGNAL(clicked()), this, SLOT(setRecord()) ); - connect( broadcastBtn, SIGNAL(clicked()), this, SLOT(setBroadcast()) ); - connect( infoBtn, SIGNAL(clicked()), this, SLOT(showEvents()) ); - connect( channelsBtn, SIGNAL(clicked()), this, SLOT(scanner()) ); - connect( dateBtn, SIGNAL(clicked()), this, SLOT(showTimers()) ); - connect( osdBtn, SIGNAL(clicked()), this, SLOT(dvbOSD())); - connect( searchBtn, SIGNAL(clicked()), this, SLOT(resetSearch()) ); - connect(searchLE, SIGNAL(textChanged(const QString&)), this, SLOT(searchChannel(const QString&))); - - connect( &timersTimer, SIGNAL(timeout()), this, SLOT(checkTimers()) ); - connect( &osdTimer, SIGNAL(timeout()), this, SLOT(resetOSD()) ); - connect( &showOsdTimer, SIGNAL(timeout()), this, SLOT(dvbOSD()) ); - connect( &tuningTimer, SIGNAL(timeout()), this, SLOT(setTuning()) ); - connect( &stopTuningTimer, SIGNAL(timeout()), this, SLOT(setTuning()) ); - connect( &diskTimer, SIGNAL(timeout()), this, SLOT(diskStatus()) ); + connect( this, TQT_SIGNAL(zap(ChannelDesc*)), TQT_SLOT(dvbZap(ChannelDesc*)) ); + connect( configBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(showConfigDialog())); + connect( recallBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(recallZap())); + + connect( recordBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRecord()) ); + connect( broadcastBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(setBroadcast()) ); + connect( infoBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEvents()) ); + connect( channelsBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(scanner()) ); + connect( dateBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(showTimers()) ); + connect( osdBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(dvbOSD())); + connect( searchBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetSearch()) ); + connect(searchLE, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(searchChannel(const TQString&))); + + connect( &timersTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(checkTimers()) ); + connect( &osdTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(resetOSD()) ); + connect( &showOsdTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(dvbOSD()) ); + connect( &tuningTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTuning()) ); + connect( &stopTuningTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTuning()) ); + connect( &diskTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(disktqStatus()) ); setConfig(); @@ -295,7 +295,7 @@ void DvbPanel::togglePanel() -void DvbPanel::diskStatus() +void DvbPanel::disktqStatus() { double freemb; struct statvfs buf; @@ -307,37 +307,37 @@ void DvbPanel::diskStatus() freemb = (double)(((double)(buf.f_bavail)*(double)(buf.f_bsize))/(1024.0*1024.0)); if ( freemb<300 ) - emit showOSD( i18n("Warning: low disc space")+QString(" (%1").arg((int)freemb)+i18n("MB")+")", 5000, 3 ); + emit showOSD( i18n("Warning: low disc space")+TQString(" (%1").tqarg((int)freemb)+i18n("MB")+")", 5000, 3 ); } -void DvbPanel::channelPopup( QListViewItem *it, const QPoint &pos, int col ) +void DvbPanel::channelPopup( TQListViewItem *it, const TQPoint &pos, int col ) { - QPoint p=pos; + TQPoint p=pos; if ( !it ) return; int i=col, j; - QImage img; - QPixmap pix; - QString name = it->text(1); - QString s; + TQImage img; + TQPixmap pix; + TQString name = it->text(1); + TQString s; - QPopupMenu *pop = new QPopupMenu(); + TQPopupMenu *pop = new TQPopupMenu(); pop->insertItem( i18n("Select icon..."), 1 ); pop->insertItem( i18n("Edit..."), 2 ); i = 0; - i = pop->exec( QCursor::pos() ); + i = pop->exec( TQCursor::pos() ); switch ( i ) { case 0 : break; case 1 : - s = KFileDialog::getOpenFileName( QString::null, "image/png image/jpeg image/gif image/x-bmp image/x-xpm", 0, i18n("Choose channel icon")); + s = KFileDialog::getOpenFileName( TQString(), "image/png image/jpeg image/gif image/x-bmp image/x-xpm", 0, i18n("Choose channel icon")); if ( s.isEmpty() ) break; - img = QImage( s ); + img = TQImage( s ); if ( img.isNull() ) break; if ( img.width()>img.height() ) @@ -362,12 +362,12 @@ void DvbPanel::channelPopup( QListViewItem *it, const QPoint &pos, int col ) delete pop; } -bool DvbPanel::editChannel( QString &name ) +bool DvbPanel::editChannel( TQString &name ) { int j; ChannelDesc *chan=0; - QStringList list; - QPixmap pix; + TQStringList list; + TQPixmap pix; for ( j=0; j<(int)channels.count(); j++ ) { chan = channels.at(j); @@ -408,7 +408,7 @@ bool DvbPanel::editChannel( QString &name ) -void DvbPanel::getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ) +void DvbPanel::getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ) { uiNames.append( i18n("Digital TV") ); iconNames.append( "tv" ); @@ -417,7 +417,7 @@ void DvbPanel::getTargets( QStringList &uiNames, QStringList &iconNames, QString -bool DvbPanel::execTarget( const QString &target ) +bool DvbPanel::execTarget( const TQString &target ) { if ( target=="DVB" ) { if ( !channelsCb->isEnabled() ) { @@ -425,7 +425,7 @@ bool DvbPanel::execTarget( const QString &target ) return true; } emit showMe( this ); - QTimer::singleShot( 100, this, SLOT(playLastChannel()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(playLastChannel()) ); return true; } return false; @@ -435,41 +435,41 @@ bool DvbPanel::execTarget( const QString &target ) void DvbPanel::setupActions() { - new KAction(i18n("OSD Next Channel"), "next", CTRL+SHIFT+Key_W, this, SLOT(dvbOSDNext()), actionCollection(), "dvb_browse_next"); - new KAction(i18n("OSD Previous Channel"), "previous", CTRL+SHIFT+Key_Q, this, SLOT(dvbOSDPrev()), actionCollection(),"dvb_browse_prev"); - new KAction(i18n("OSD Zap"), "ok", CTRL+SHIFT+Key_E, this, SLOT(dvbOSDZap()), actionCollection(), "dvb_browse_zap"); - new KAction(i18n("OSD Next Event"), "down", CTRL+SHIFT+Key_S, this, SLOT(dvbOSDAdvance()), actionCollection(), "dvb_browse_advance"); - new KAction(i18n("OSD Previous Event"), "up", CTRL+SHIFT+Key_A, this, SLOT(dvbOSDRetreat()), actionCollection(), "dvb_browse_retreat"); - new KAction(i18n("Instant Record"), "filesave", 0, this, SLOT(setRecord()), actionCollection(), "dvb_instant_record"); - new KAction(i18n("Recall"), "reload", CTRL+SHIFT+Key_Z, this, SLOT(recallZap()), actionCollection(), "dvb_recall"); - new KAction(i18n("Show OSD"), "info", Key_O, this, SLOT(dvbOSD()), actionCollection(), "dvb_show_osd"); - new KAction(i18n("EPG..."), "view_text", Key_G, this, SLOT(showEvents()), actionCollection(), "dvb_show_epg"); - new KAction(i18n("Timers..."), "date", Key_T, this, SLOT(showTimers()), actionCollection(), "dvb_show_timers"); - new KAction(i18n("Broadcasting..."), "network_local", Key_B, this, SLOT(setBroadcast()), actionCollection(), "dvb_show_broadcast"); - new KAction(i18n("Channels..."), "kdvbtv", Key_C, this, SLOT(scanner()), actionCollection(), "dvb_channels"); - new KAction(i18n("Configure DVB..."), "configure", CTRL|Key_C, this, SLOT(showConfigDialog()), actionCollection(), "dvb_config"); + new KAction(i18n("OSD Next Channel"), "next", CTRL+SHIFT+Key_W, this, TQT_SLOT(dvbOSDNext()), actionCollection(), "dvb_browse_next"); + new KAction(i18n("OSD Previous Channel"), "previous", CTRL+SHIFT+Key_Q, this, TQT_SLOT(dvbOSDPrev()), actionCollection(),"dvb_browse_prev"); + new KAction(i18n("OSD Zap"), "ok", CTRL+SHIFT+Key_E, this, TQT_SLOT(dvbOSDZap()), actionCollection(), "dvb_browse_zap"); + new KAction(i18n("OSD Next Event"), "down", CTRL+SHIFT+Key_S, this, TQT_SLOT(dvbOSDAdvance()), actionCollection(), "dvb_browse_advance"); + new KAction(i18n("OSD Previous Event"), "up", CTRL+SHIFT+Key_A, this, TQT_SLOT(dvbOSDRetreat()), actionCollection(), "dvb_browse_retreat"); + new KAction(i18n("Instant Record"), "filesave", 0, this, TQT_SLOT(setRecord()), actionCollection(), "dvb_instant_record"); + new KAction(i18n("Recall"), "reload", CTRL+SHIFT+Key_Z, this, TQT_SLOT(recallZap()), actionCollection(), "dvb_recall"); + new KAction(i18n("Show OSD"), "info", Key_O, this, TQT_SLOT(dvbOSD()), actionCollection(), "dvb_show_osd"); + new KAction(i18n("EPG..."), "view_text", Key_G, this, TQT_SLOT(showEvents()), actionCollection(), "dvb_show_epg"); + new KAction(i18n("Timers..."), "date", Key_T, this, TQT_SLOT(showTimers()), actionCollection(), "dvb_show_timers"); + new KAction(i18n("Broadcasting..."), "network_local", Key_B, this, TQT_SLOT(setBroadcast()), actionCollection(), "dvb_show_broadcast"); + new KAction(i18n("Channels..."), "kdvbtv", Key_C, this, TQT_SLOT(scanner()), actionCollection(), "dvb_channels"); + new KAction(i18n("Configure DVB..."), "configure", CTRL|Key_C, this, TQT_SLOT(showConfigDialog()), actionCollection(), "dvb_config"); } -QWidget *DvbPanel::wantPlayerWindow() +TQWidget *DvbPanel::wantPlayerWindow() { return playerBox; } -QWidget *DvbPanel::inputMainWidget() +TQWidget *DvbPanel::inputMainWidget() { return mainWidget; } -void DvbPanel::searchChannel( const QString &text ) +void DvbPanel::searchChannel( const TQString &text ) { int i, c=-1; - QListViewItemIterator it( channelsCb ); + TQListViewItemIterator it( channelsCb ); if ( !it.current() ) return; for ( i=0; i<channelsCb->columns(); i++ ) { @@ -484,7 +484,7 @@ void DvbPanel::searchChannel( const QString &text ) channelsCb->visibleItems = 0; while ( it.current() ) { - if ( text.isEmpty() || it.current()->text( c ).contains( text, false ) ) { + if ( text.isEmpty() || it.current()->text( c ).tqcontains( text, false ) ) { it.current()->setVisible(true); ++channelsCb->visibleItems; } @@ -505,7 +505,7 @@ void DvbPanel::resetSearch() -void DvbPanel::channelNumberChanged( QListViewItem *it ) +void DvbPanel::channelNumberChanged( TQListViewItem *it ) { int i, j; bool ok; @@ -539,7 +539,7 @@ void DvbPanel::channelNumberChanged( QListViewItem *it ) -void DvbPanel::catSelected( QIconViewItem *it ) +void DvbPanel::catSelected( TQIconViewItem *it ) { if ( !it ) return; @@ -556,13 +556,13 @@ void DvbPanel::catSelected( QIconViewItem *it ) -void DvbPanel::catContextMenu( QIconViewItem *it, const QPoint &p ) +void DvbPanel::catContextMenu( TQIconViewItem *it, const TQPoint &p ) { bool ok; - QString name, icon; + TQString name, icon; int i=0, ret; - QPopupMenu *pop = new QPopupMenu(); + TQPopupMenu *pop = new TQPopupMenu(); if ( !it ) { pop->insertItem( i18n("New Category..."), 0 ); } @@ -574,8 +574,8 @@ void DvbPanel::catContextMenu( QIconViewItem *it, const QPoint &p ) i = pop->exec( p ); switch ( i ) { case 0 : - name = KInputDialog::getText( i18n("New Category"), i18n("Enter a name for this category:"), QString::null, &ok); - for ( QIconViewItem *qitem = iconView->firstItem(); qitem; qitem = qitem->nextItem() ) { + name = KInputDialog::getText( i18n("New Category"), i18n("Enter a name for this category:"), TQString(), &ok); + for ( TQIconViewItem *qitem = iconView->firstItem(); qitem; qitem = qitem->nextItem() ) { if ( qitem->text()==name ) ok = false; } @@ -607,11 +607,11 @@ void DvbPanel::catContextMenu( QIconViewItem *it, const QPoint &p ) -void DvbPanel::moveChannel( const QString &cat, const QString &name ) +void DvbPanel::moveChannel( const TQString &cat, const TQString &name ) { int i; ChannelDesc *chan; - QListViewItem *it; + TQListViewItem *it; for ( i=0; i<(int)channels.count(); i++ ) { chan = channels.at(i); @@ -635,29 +635,29 @@ void DvbPanel::dumpEvents() EventSource *esrc; EventTsid *et; EventSid *es; - QPtrList<EventDesc> *esEvents; + TQPtrList<EventDesc> *esEvents; EventDesc *desc; int i, k, j, m, n; - QString s; + TQString s; - QFile f( QDir::homeDirPath()+"/kaffeine_dvb_events.txt" ); + TQFile f( TQDir::homeDirPath()+"/kaffeine_dvb_events.txt" ); if ( f.open(IO_WriteOnly|IO_Truncate) ) { fprintf( stderr, "Creating events file.\n"); - QTextStream tt( &f ); - tt << "Saved: "+QDateTime::currentDateTime().toString( "dd-MM-yyyy hh:mm:ss" )+"\n"; + TQTextStream tt( &f ); + tt << "Saved: "+TQDateTime::tqcurrentDateTime().toString( "dd-MM-yyyy hh:mm:ss" )+"\n"; k= 0; for( i=0; i<events.getNSource(); i++ ) { if ( !(esrc=events.getNEventSource( i )) ) continue; - tt << esrc->getSource()+QString(" : %1 TS with events.\n").arg( esrc->getNTsid() ); + tt << esrc->getSource()+TQString(" : %1 TS with events.\n").tqarg( esrc->getNTsid() ); for ( m=0; m<esrc->getNTsid(); m++ ) { if ( !(et=esrc->getNEventTsid( m )) ) continue; - tt << QString("TSID %1 : %2 services with events\n").arg( et->getTsid() ).arg( et->getNSid() ); + tt << TQString("TSID %1 : %2 services with events\n").tqarg( et->getTsid() ).tqarg( et->getNSid() ); for ( n=0; n<et->getNSid(); n++ ) { if ( !(es=et->getNEventSid( n )) ) continue; - tt << QString(" SID %1 : %2 events\n").arg( es->getSid() ).arg( es->getNDesc() ); + tt << TQString(" SID %1 : %2 events\n").tqarg( es->getSid() ).tqarg( es->getNDesc() ); k+= es->getNDesc(); } } @@ -681,10 +681,10 @@ void DvbPanel::dumpEvents() if ( !(desc=esEvents->at( j )) ) continue; tt << "Source: "+desc->source+"\n"; - tt << QString("Network ID: %1\n").arg(desc->nid); - tt << QString("Transport Stream ID: %1\n").arg(desc->tsid); - tt << QString("Service ID: %1\n").arg(desc->sid); - tt << QString("Event ID: %1\n").arg(desc->eid); + tt << TQString("Network ID: %1\n").tqarg(desc->nid); + tt << TQString("Transport Stream ID: %1\n").tqarg(desc->tsid); + tt << TQString("Service ID: %1\n").tqarg(desc->sid); + tt << TQString("Event ID: %1\n").tqarg(desc->eid); tt << "Title: "+desc->title+"\n"; tt << "Subtitle: "+desc->subtitle+"\n"; tt << desc->startDateTime.toString( "dd-MM-yyyy hh:mm:ss" )+"\n"; @@ -714,9 +714,9 @@ void DvbPanel::dumpEvents() -void DvbPanel::channelClicked( QListViewItem *it ) +void DvbPanel::channelClicked( TQListViewItem *it ) { - QPtrListIterator<ChannelDesc> iter( channels ); + TQPtrListIterator<ChannelDesc> iter( channels ); ChannelDesc *itdesc, *desc=0; DvbStream *d = 0; @@ -893,12 +893,12 @@ void DvbPanel::dvbOSDRetreat() void DvbPanel::dvbOSD(ChannelDesc liveChannel, DvbStream *d, int timeShift /* = 0 */) { - QStringList list; + TQStringList list; EventSource *esrc; EventSid *es; - QPtrList<EventDesc> *esEvents; + TQPtrList<EventDesc> *esEvents; EventDesc *desc; - QString s; + TQString s; int i, j, k; int first=0; @@ -956,14 +956,14 @@ void DvbPanel::dvbOSD(ChannelDesc liveChannel, DvbStream *d, int timeShift /* = s = s+" - "; s = s+desc->title; if ( !osdMode && !first && !myshift ) { - QDateTime dt = QDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); int secs = desc->startDateTime.secsTo( dt ); - i = QTime().secsTo( desc->duration ); + i = TQTime().secsTo( desc->duration ); if ( i!=0 ) i = secs*100/i; if ( i>100 ) i = 100; - list.append( QString("BAR")+QString().setNum( i ) ); + list.append( TQString("BAR")+TQString().setNum( i ) ); ++first; } list.append( s ); @@ -1025,7 +1025,7 @@ void DvbPanel::setConfig() KIconViewItem* item = NULL; DvbStream *d; - QString s = locateLocal("appdata", ""); + TQString s = locateLocal("appdata", ""); dvbConfig = new DVBconfig( s ); item = new DIconViewItem(this, iconView, i18n("All"), KGlobal::iconLoader()->loadIcon(dvbConfig->allIcon, KIcon::NoGroup, KIcon::SizeSmallMedium)); iconView->setFixedHeight( item->height()+iconView->horizontalScrollBar()->height() ); @@ -1059,22 +1059,22 @@ void DvbPanel::setConfig() d = new DvbStream( dvbConfig->devList.at(i), dvbConfig->defaultCharset, &events ); d->setPlug( plug ); dvb.append( d ); - connect( d, SIGNAL(shifting(bool)), this, SLOT(setShiftLed(bool)) ); - connect( d, SIGNAL(isBroadcasting(bool)), this, SLOT(setBroadcastLed(bool)) ); - connect( d, SIGNAL(timerEnded(RecTimer*)), this, SLOT(killTimer(RecTimer*)) ); - connect( d, SIGNAL(isRecording(bool)), this, SLOT(setRecordLed(bool)) ); - connect( d, SIGNAL(playDvb()), this, SLOT(pipeOpened()) ); - } - fifoName = QDir::homeDirPath()+"/.kaxtv.ts"; - QFile f( fifoName ); + connect( d, TQT_SIGNAL(shifting(bool)), this, TQT_SLOT(setShiftLed(bool)) ); + connect( d, TQT_SIGNAL(isBroadcasting(bool)), this, TQT_SLOT(setBroadcastLed(bool)) ); + connect( d, TQT_SIGNAL(timerEnded(RecTimer*)), this, TQT_SLOT(killTimer(RecTimer*)) ); + connect( d, TQT_SIGNAL(isRecording(bool)), this, TQT_SLOT(setRecordLed(bool)) ); + connect( d, TQT_SIGNAL(playDvb()), this, TQT_SLOT(pipeOpened()) ); + } + fifoName = TQDir::homeDirPath()+"/.kaxtv.ts"; + TQFile f( fifoName ); if ( f.exists() ) f.remove(); if ( (mkfifo( fifoName.ascii(), 0644 ))<0 ) { perror( fifoName.latin1() ); fifoName = ""; } - fifoName1 = QDir::homeDirPath()+"/.kaxtv1.ts"; - QFile f1( fifoName1 ); + fifoName1 = TQDir::homeDirPath()+"/.kaxtv1.ts"; + TQFile f1( fifoName1 ); if ( f1.exists() ) f1.remove(); if ( (mkfifo( fifoName1.ascii(), 0644 ))<0 ) { @@ -1112,9 +1112,9 @@ loop: for ( i=0; i<(int)dvb.count(); i++ ) dvb.at(i)->probeCam(); DvbConfigDialog dlg( this, dvbConfig, mainWidget, plug ); - connect( dlg.dumpBtn, SIGNAL(clicked()), this, SLOT(dumpEvents()) ); + connect( dlg.dumpBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(dumpEvents()) ); ret = dlg.exec(); - disconnect( dlg.dumpBtn, SIGNAL(clicked()), this, SLOT(dumpEvents()) ); + disconnect( dlg.dumpBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(dumpEvents()) ); if ( ret==DvbConfigDialog::Rejected ) return; rtp->setSocket( dvbConfig->broadcastAddress, dvbConfig->broadcastPort, dvbConfig->senderPort ); @@ -1131,11 +1131,11 @@ void DvbPanel::camClicked( int devNum ) -QPtrList<Transponder> DvbPanel::getSourcesStatus() +TQPtrList<Transponder> DvbPanel::getSourcestqStatus() { int i, j; - QStringList list; - QPtrList<Transponder> ss; + TQStringList list; + TQPtrList<Transponder> ss; Transponder t; for ( i=0; i<(int)dvb.count(); i++ ) { @@ -1163,7 +1163,7 @@ void DvbPanel::fillChannelList( ChannelDesc *ch ) ChannelDesc *chan; KListViewItem *it, *visible=0; bool cont=false; - QPtrList<Transponder> trans = getSourcesStatus(); + TQPtrList<Transponder> trans = getSourcestqStatus(); trans.setAutoDelete( true ); searchLE->clear(); @@ -1193,7 +1193,7 @@ void DvbPanel::fillChannelList( ChannelDesc *ch ) } else if ( currentCategory!="All" && chan->category!=currentCategory ) continue; - it = new KListViewItem( channelsCb, QString().sprintf("%05d", chan->num), chan->name, chan->tp.source ); + it = new KListViewItem( channelsCb, TQString().sprintf("%05d", chan->num), chan->name, chan->tp.source ); if ( ch && ch==chan ) visible = it; it->setDragEnabled( true ); @@ -1228,7 +1228,7 @@ void DvbPanel::fillChannelList( ChannelDesc *ch ) DvbStream* DvbPanel::getWorkingDvb( int mode, ChannelDesc *chan ) { int i, ret; - QValueList<int> working; // free=0, hasLive=100, hasBroadcast=200, hasRec=300, can'tDoChannel=400 + TQValueList<int> working; // free=0, hasLive=100, hasBroadcast=200, hasRec=300, can'tDoChannel=400 for ( i=0; i<(int)dvb.count(); i++ ) working.append( 100-dvb.at(i)->getPriority() ); @@ -1276,7 +1276,7 @@ DvbStream* DvbPanel::getWorkingDvb( int mode, ChannelDesc *chan ) void DvbPanel::setBroadcast() { int ret, i; - QPtrList<ChannelDesc> list; + TQPtrList<ChannelDesc> list; bool live=false; DvbStream *d; @@ -1320,14 +1320,14 @@ void DvbPanel::checkTimers() bool live=false; RecTimer *t; ChannelDesc *chan; - QDateTime cur=QDateTime::currentDateTime(); + TQDateTime cur=TQDateTime::tqcurrentDateTime(); DvbStream *d; for ( i=0; i<(int)timers.count(); i++ ) { t = timers.at(i); if ( t->running ) continue; - if ( t->begin<=cur && cur<t->begin.addSecs(QTime().secsTo(t->duration)) ) { + if ( t->begin<=cur && cur<t->begin.addSecs(TQTime().secsTo(t->duration)) ) { chan = 0; for ( j=0; j<(int)channels.count(); j++ ) { if ( channels.at(j)->name==t->channel ) { @@ -1350,7 +1350,7 @@ void DvbPanel::checkTimers() } if ( d->startTimer( chan, dvbConfig->recordDir, dvbConfig->sizeFile, t, dvbConfig->filenameFormat ) ) { KProcess proc; - proc << QDir::homeDirPath()+"/bin/kaffeine_recording"; + proc << TQDir::homeDirPath()+"/bin/kaffeine_recording"; proc << "On"; proc.start( KProcess::DontCare ); t->running = 1; @@ -1380,7 +1380,7 @@ void DvbPanel::checkTimers() void DvbPanel::setRecord() { ChannelDesc curchan; - QString s=""; + TQString s=""; int ret, i, r=0; bool live=false; RecTimer *t, *rt; @@ -1406,17 +1406,17 @@ void DvbPanel::setRecord() s = desc->title; if ( s.isEmpty() ) { - if ( !dvbConfig->filenameFormat.contains("%chan") ) + if ( !dvbConfig->filenameFormat.tqcontains("%chan") ) s = curchan.name; - if ( !dvbConfig->filenameFormat.contains("%date") ) - s+="_"+QDateTime::currentDateTime().toString( "yyyyMMdd-hhmmss" ); + if ( !dvbConfig->filenameFormat.tqcontains("%date") ) + s+="_"+TQDateTime::tqcurrentDateTime().toString( "yyyyMMdd-hhmmss" ); } rt = new RecTimer(); rt->name = s; rt->channel = curchan.name; - rt->begin = QDateTime::currentDateTime(); - rt->duration = QTime( 0,0,0).addSecs( dvbConfig->instantDuration*60 ) ; + rt->begin = TQDateTime::tqcurrentDateTime(); + rt->duration = TQTime( 0,0,0).addSecs( dvbConfig->instantDuration*60 ) ; rt->running = 1; rt->mode = 0; @@ -1424,7 +1424,7 @@ void DvbPanel::setRecord() if ( ret==0 ) { if ( d->startTimer( &curchan, dvbConfig->recordDir, dvbConfig->sizeFile, rt, dvbConfig->filenameFormat ) ) { KProcess proc; - proc << QDir::homeDirPath()+"/bin/kaffeine_recording"; + proc << TQDir::homeDirPath()+"/bin/kaffeine_recording"; proc << "On"; proc.start( KProcess::DontCare ); @@ -1527,7 +1527,7 @@ void DvbPanel::killTimer( RecTimer *t ) for ( i=0; i<(int)timers.count(); i++ ) { if ( timers.at(i)==t ) { KProcess proc; - proc << QDir::homeDirPath()+"/bin/kaffeine_recording"; + proc << TQDir::homeDirPath()+"/bin/kaffeine_recording"; if ( recordLed->state()==KLed::On ) proc << "On"; else @@ -1590,30 +1590,30 @@ void DvbPanel::updateModeTimer( RecTimer *t ) void DvbPanel::showTimers() { int i; - QStringList list; - QMap<QString,QString> map; + TQStringList list; + TQMap<TQString,TQString> map; if ( channels.count()==0 ) { KMessageBox::sorry( 0, i18n("You may want to define some channel first!") ); return; } - for ( QPtrListIterator<ChannelDesc> it(channels); it.current(); ++it ) + for ( TQPtrListIterator<ChannelDesc> it(channels); it.current(); ++it ) map[it.current()->name] = it.current()->name; - QMap<QString,QString>::Iterator it; - QMap<QString,QString>::Iterator end(map.end()); + TQMap<TQString,TQString>::Iterator it; + TQMap<TQString,TQString>::Iterator end(map.end()); for ( it = map.begin(); it != end; ++it ) list.append( it.data() ); timersDialog = new KRecord( list, &timers, mainWidget, dvbConfig->timerSize ); for ( i=0; i<(int)dvb.count(); i++ ) { - connect( timersDialog, SIGNAL(updateTimer(RecTimer*,int)), dvb.at(i), SLOT(updateTimer(RecTimer*,int)) ); + connect( timersDialog, TQT_SIGNAL(updateTimer(RecTimer*,int)), dvb.at(i), TQT_SLOT(updateTimer(RecTimer*,int)) ); } - connect( this, SIGNAL(timersChanged()), timersDialog, SLOT(refresh()) ); + connect( this, TQT_SIGNAL(timersChanged()), timersDialog, TQT_SLOT(refresh()) ); timersDialog->exec(); for ( i=0; i<(int)dvb.count(); i++ ) { - disconnect( timersDialog, SIGNAL(updateTimer(RecTimer*,int)), dvb.at(i), SLOT(updateTimer(RecTimer*,int)) ); + disconnect( timersDialog, TQT_SIGNAL(updateTimer(RecTimer*,int)), dvb.at(i), TQT_SLOT(updateTimer(RecTimer*,int)) ); } - disconnect( this, SIGNAL(timersChanged()), timersDialog, SLOT(refresh()) ); + disconnect( this, TQT_SIGNAL(timersChanged()), timersDialog, TQT_SLOT(refresh()) ); dvbConfig->timerSize = timersDialog->size(); delete timersDialog; timersDialog = 0; @@ -1630,20 +1630,20 @@ int DvbPanel::getSNR( int device ) } -void DvbPanel::dvbNewTimer( QString name, QString channel, QString datetime, QString duration ) +void DvbPanel::dvbNewTimer( TQString name, TQString channel, TQString datetime, TQString duration ) { - newTimer( channel, name, QDateTime::fromString( datetime, Qt::ISODate ), QTime::fromString( duration ), false ); + newTimer( channel, name, TQDateTime::fromString( datetime, Qt::ISODate ), TQTime::fromString( duration ), false ); } -void DvbPanel::newTimer( QString channel, QString name, QDateTime begin, QTime duration, bool warn ) +void DvbPanel::newTimer( TQString channel, TQString name, TQDateTime begin, TQTime duration, bool warn ) { int i, r=0; RecTimer *t; RecTimer *rt = new RecTimer(); - rt->name = name.replace("/","_").replace(">","_").replace("<","_").replace(":","_").replace('"',"_").replace("\\","_").replace("|","_"); + rt->name = name.tqreplace("/","_").tqreplace(">","_").tqreplace("<","_").tqreplace(":","_").tqreplace('"',"_").tqreplace("\\","_").tqreplace("|","_"); rt->channel = channel; rt->begin = begin.addSecs( -(dvbConfig->beginMargin*60) ); rt->duration = duration.addSecs( (dvbConfig->beginMargin+dvbConfig->endMargin)*60 ) ; @@ -1692,12 +1692,12 @@ void DvbPanel::showEvents() { events.doClean( false ); KEvents dlg( &channels, &dvb, &events, mainWidget, dvbConfig->epgSize ); - connect( &dlg, SIGNAL(addTimer(QString,QString,QDateTime,QTime)), this, SLOT(newTimer(QString,QString,QDateTime,QTime)) ); - connect( &dlg, SIGNAL(zapTo(const QString &)), this, SLOT(channelSelected(const QString &)) ); + connect( &dlg, TQT_SIGNAL(addTimer(TQString,TQString,TQDateTime,TQTime)), this, TQT_SLOT(newTimer(TQString,TQString,TQDateTime,TQTime)) ); + connect( &dlg, TQT_SIGNAL(zapTo(const TQString &)), this, TQT_SLOT(channelSelected(const TQString &)) ); dlg.exec(); dvbConfig->epgSize = dlg.size(); - disconnect( &dlg, SIGNAL(addTimer(QString,QString,QDateTime,QTime)), this, SLOT(newTimer(QString,QString,QDateTime,QTime)) ); - disconnect( &dlg, SIGNAL(zapTo(const QString &)), this, SLOT(channelSelected(const QString &)) ); + disconnect( &dlg, TQT_SIGNAL(addTimer(TQString,TQString,TQDateTime,TQTime)), this, TQT_SLOT(newTimer(TQString,TQString,TQDateTime,TQTime)) ); + disconnect( &dlg, TQT_SIGNAL(zapTo(const TQString &)), this, TQT_SLOT(channelSelected(const TQString &)) ); events.doClean( true ); } @@ -1717,9 +1717,9 @@ void DvbPanel::setShiftLed( bool on ) -void DvbPanel::channelSelected( const QString &name ) +void DvbPanel::channelSelected( const TQString &name ) { - QPtrListIterator<ChannelDesc> iter( channels ); + TQPtrListIterator<ChannelDesc> iter( channels ); ChannelDesc *itdesc; iter.toFirst(); @@ -1734,9 +1734,9 @@ void DvbPanel::channelSelected( const QString &name ) -void DvbPanel::channelSelected( QListViewItem *it ) +void DvbPanel::channelSelected( TQListViewItem *it ) { - QPtrListIterator<ChannelDesc> iter( channels ); + TQPtrListIterator<ChannelDesc> iter( channels ); ChannelDesc *itdesc; if ( !it ) @@ -1825,7 +1825,7 @@ bool DvbPanel::playbackFinished( MRL& ) void DvbPanel::playLastChannel() { /*int ret, i, j; - QPtrList<ChannelDesc> list; + TQPtrList<ChannelDesc> list; bool live=false, ok=false; DvbStream *d; @@ -1844,7 +1844,7 @@ void DvbPanel::playLastChannel() } } if ( ! list.count() ) { - QTimer::singleShot( 2000, this, SLOT(playLastChannel()) ); + TQTimer::singleShot( 2000, this, TQT_SLOT(playLastChannel()) ); return; } d = getWorkingDvb( MODE_BROADCAST, list.at(0) ); @@ -1868,7 +1868,7 @@ void DvbPanel::playLastChannel() else fprintf( stderr, "Can't start broadcasting.\n"); - QTimer::singleShot( 2000, this, SLOT(playLastChannel()) ); + TQTimer::singleShot( 2000, this, TQT_SLOT(playLastChannel()) ); return;*/ @@ -1899,9 +1899,9 @@ void DvbPanel::next() if ( !channelsCb->isEnabled() ) return; - QListViewItem* nextItem; + TQListViewItem* nextItem; - QListViewItem* playingItem = channelsCb->findItem( QString().sprintf("%05d", dvbConfig->lastChannel), 0 ); + TQListViewItem* playingItem = channelsCb->tqfindItem( TQString().sprintf("%05d", dvbConfig->lastChannel), 0 ); if ( !playingItem == 0 ) // yes, it's in the current category { @@ -1925,9 +1925,9 @@ void DvbPanel::previous() if ( !channelsCb->isEnabled() ) return; - QListViewItem* prevItem; + TQListViewItem* prevItem; - QListViewItem* playingItem = channelsCb->findItem( QString().sprintf("%05d", dvbConfig->lastChannel), 0 ); + TQListViewItem* playingItem = channelsCb->tqfindItem( TQString().sprintf("%05d", dvbConfig->lastChannel), 0 ); if ( !playingItem == 0 ) // yes, it's in the current category { @@ -1987,13 +1987,13 @@ void DvbPanel::setTuning() void DvbPanel::finalZap( DvbStream *d, ChannelDesc *chan ) { - QString s, t; + TQString s, t; int i; emit setCurrentPlugin( this ); fprintf( stderr, "Tuning to: %s / autocount: %lu\n", chan->name.latin1(), autocount ); - QTime tm; + TQTime tm; tm.start(); if ( !d ) { @@ -2055,7 +2055,7 @@ void DvbPanel::finalZap( DvbStream *d, ChannelDesc *chan ) recallChannel = dvbConfig->lastChannel; dvbConfig->lastChannel = chan->num; } - //QTimer::singleShot( 3000, this, SLOT(playLastChannel()) ); + //TQTimer::singleShot( 3000, this, TQT_SLOT(playLastChannel()) ); } @@ -2074,7 +2074,7 @@ void DvbPanel::pauseLiveTV() if ( !d ) return; - timeShiftFileName = dvbConfig->shiftDir+"DVBLive-"+QDateTime::currentDateTime().toString("yyyyMMddThhmmss")+".m2t"; + timeShiftFileName = dvbConfig->shiftDir+"DVBLive-"+TQDateTime::tqcurrentDateTime().toString("yyyyMMddThhmmss")+".m2t"; if ( d->doPause( timeShiftFileName ) ) emit setTimeShiftFilename( timeShiftFileName ); } @@ -2118,13 +2118,13 @@ void DvbPanel::stopLive() bool DvbPanel::getChannelList() { bool ret=false; - QString s, c, t, u, type; + TQString s, c, t, u, type; int pos, tpos; ChannelDesc *chan; - QString src=""; + TQString src=""; int ns; KListViewItem *it; - QPixmap pix; + TQPixmap pix; maxChannelNumber = 0; minChannelNumber = -1; @@ -2143,18 +2143,18 @@ bool DvbPanel::getChannelList() } } - QFile f( locateLocal("appdata", "channels.dvb" ) ); + TQFile f( locateLocal("appdata", "channels.dvb" ) ); if ( f.open(IO_ReadOnly) ) { - QTextStream tt( &f ); + TQTextStream tt( &f ); while ( !tt.eof() ) { s = tt.readLine(); if ( s.startsWith("#") ) { - if ( s.contains("KaxTV") ) + if ( s.tqcontains("KaxTV") ) break; continue; } chan = new ChannelDesc(); - pos = s.find("|"); + pos = s.tqfind("|"); c = s.left( pos ); if ( c=="TV" || c=="TVC" ) chan->type=1; @@ -2163,13 +2163,13 @@ bool DvbPanel::getChannelList() if ( c=="TVC" || c=="RAC" ) chan->fta=1; s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->name = s.left( pos ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); c = s.left( pos ); s = s.right( s.length()-pos-1 ); - tpos = c.find("("); + tpos = c.tqfind("("); if ( tpos>0 ) chan->vpid = c.left(tpos).toUShort(); else @@ -2183,17 +2183,17 @@ bool DvbPanel::getChannelList() chan->vType = 2; if ( !chan->vpid ) chan->vType = 0; - pos = s.find("|"); + pos = s.tqfind("|"); c = s.left( pos ); s = s.right( s.length()-pos-1 ); - while ( (pos=c.find(","))!=-1 ) { + while ( (pos=c.tqfind(","))!=-1 ) { t = c.left(pos); chan->napid++; - if ( t.contains("(ac3)") ) { + if ( t.tqcontains("(ac3)") ) { chan->apid[chan->napid-1].ac3=1; t.remove("(ac3)"); } - if( (tpos=t.find("("))!=-1 ) { + if( (tpos=t.tqfind("("))!=-1 ) { t.remove(")"); chan->apid[chan->napid-1].lang=t.right( t.length()-tpos-1 ); t = t.left( tpos ); @@ -2201,16 +2201,16 @@ bool DvbPanel::getChannelList() chan->apid[chan->napid-1].pid=t.toUShort(); c = c.right( c.length()-pos-1 ); } - pos = s.find("|"); + pos = s.tqfind("|"); chan->ttpid = s.left(pos).toUShort(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->sid = s.left(pos).toUShort(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->tp.tsid = s.left(pos).toUShort(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); c = s.left(pos); if ( c.startsWith("T") ) { chan->tp.type=FE_OFDM; @@ -2230,17 +2230,17 @@ bool DvbPanel::getChannelList() chan->tp.source = "Atsc"; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->tp.freq = s.left(pos).toULong(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->tp.sr = s.left(pos).toULong(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); c = s.left( pos ); chan->tp.pol = c[0].latin1(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 0 : chan->tp.coderateH = FEC_NONE; break; case 12 : chan->tp.coderateH = FEC_1_2; break; @@ -2256,14 +2256,14 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.coderateH = FEC_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 0 : chan->tp.inversion = INVERSION_OFF; break; case 1 : chan->tp.inversion = INVERSION_ON; break; case -1 : chan->tp.inversion = INVERSION_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 8 : chan->tp.modulation = QPSK; break; case 16 : chan->tp.modulation = QAM_16; break; @@ -2279,7 +2279,7 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.modulation = QAM_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 0 : chan->tp.coderateL = FEC_NONE; break; case 12 : chan->tp.coderateL = FEC_1_2; break; @@ -2295,7 +2295,7 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.coderateL = FEC_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 8 : chan->tp.bandwidth = BANDWIDTH_8_MHZ; break; case 7 : chan->tp.bandwidth = BANDWIDTH_7_MHZ; break; @@ -2303,14 +2303,14 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.bandwidth = BANDWIDTH_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 2 : chan->tp.transmission = TRANSMISSION_MODE_2K; break; case 8 : chan->tp.transmission = TRANSMISSION_MODE_8K; break; case -1 : chan->tp.transmission = TRANSMISSION_MODE_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 32 : chan->tp.guard = GUARD_INTERVAL_1_32; break; case 16 : chan->tp.guard = GUARD_INTERVAL_1_16; break; @@ -2319,7 +2319,7 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.guard = GUARD_INTERVAL_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 0 : chan->tp.hierarchy = HIERARCHY_NONE; break; case 1 : chan->tp.hierarchy = HIERARCHY_1; break; @@ -2328,39 +2328,39 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.hierarchy = HIERARCHY_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->num = s.left(pos).toUInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); c = s.left( pos ); s = s.right( s.length()-pos-1 ); - while ( (pos=c.find(","))!=-1 ) { + while ( (pos=c.tqfind(","))!=-1 ) { t = c.left(pos); - tpos=t.find("("); + tpos=t.tqfind("("); ns = (int)chan->nsubpid; chan->subpid[ns].pid = t.left(tpos).toUShort(); t = t.right( t.length()-tpos-1 ); - tpos=t.find(")"); + tpos=t.tqfind(")"); chan->subpid[ns].type = t.left(tpos).toUShort(); t = t.right( t.length()-tpos-2 ); - tpos=t.find(")"); + tpos=t.tqfind(")"); chan->subpid[ns].page = t.left(tpos).toUShort(); t = t.right( t.length()-tpos-2 ); - tpos=t.find(")"); + tpos=t.tqfind(")"); chan->subpid[ns].id = t.left(tpos).toUShort(); t = t.right( t.length()-tpos-2 ); - tpos=t.find(")"); + tpos=t.tqfind(")"); chan->subpid[ns].lang = t.left(tpos); c = c.right( c.length()-pos-1 ); chan->nsubpid++; } - pos = s.find("|"); + pos = s.tqfind("|"); chan->category = s.left( pos ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->tp.nid = s.left(pos).toUShort(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); switch ( s.left(pos).toInt() ) { case 20 : chan->tp.rolloff = ROLLOFF_20; break; case 25 : chan->tp.rolloff = ROLLOFF_25; break; @@ -2368,7 +2368,7 @@ bool DvbPanel::getChannelList() case -1 : chan->tp.rolloff = ROLLOFF_AUTO; } s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); chan->tp.S2 = s.left(pos).toInt(); if ( chan->tp.source.isEmpty() ) { @@ -2377,7 +2377,7 @@ bool DvbPanel::getChannelList() } chan->pix.load( dvbConfig->dvbConfigIconsDir+chan->name ); - it = new KListViewItem( channelsCb, QString().sprintf("%05d", chan->num), chan->name, chan->tp.source ); + it = new KListViewItem( channelsCb, TQString().sprintf("%05d", chan->num), chan->name, chan->tp.source ); it->setDragEnabled( true ); if ( !chan->pix.isNull() ) it->setPixmap( 1, chan->pix ); @@ -2417,12 +2417,12 @@ bool DvbPanel::saveChannelList() { bool ret=false; int i, k; - QString s; + TQString s; ChannelDesc *chan=0; - QFile f( locateLocal("appdata", "channels.dvb" ) ); + TQFile f( locateLocal("appdata", "channels.dvb" ) ); if ( f.open(IO_WriteOnly|IO_Truncate) ) { - QTextStream tt( &f ); + TQTextStream tt( &f ); tt<<"#Generated by Kaffeine 0.5\n"; for( i=0; i<(int)channels.count(); i++ ) { chan = channels.at(i); @@ -2575,35 +2575,35 @@ bool DvbPanel::saveChannelList() bool DvbPanel::getTimerList() { bool ret=false; - QString s; + TQString s; int pos; RecTimer *t; - QFile f( locateLocal("appdata", "timers.dvb" ) ); + TQFile f( locateLocal("appdata", "timers.dvb" ) ); if ( f.open(IO_ReadOnly) ) { - QTextStream tt( &f ); + TQTextStream tt( &f ); while ( !tt.eof() ) { s = tt.readLine(); if ( s.startsWith("#") ) continue; t = new RecTimer(); - pos = s.find("|"); + pos = s.tqfind("|"); t->name = s.left( pos ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); t->channel = s.left( pos ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); - t->begin = QDateTime::fromString( s.left( pos ), Qt::ISODate ); + pos = s.tqfind("|"); + t->begin = TQDateTime::fromString( s.left( pos ), Qt::ISODate ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); - t->duration = QTime::fromString( s.left( pos ) ); + pos = s.tqfind("|"); + t->duration = TQTime::fromString( s.left( pos ) ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); //t->filetype = s.left( pos ).toInt(); t->mode = 0; s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); t->mode = s.left( pos ).toInt(); t->running = 0; timers.append( t ); @@ -2620,12 +2620,12 @@ bool DvbPanel::saveTimerList() { bool ret=false; int i; - QString s; + TQString s; RecTimer *t; - QFile f( locateLocal("appdata", "timers.dvb" ) ); + TQFile f( locateLocal("appdata", "timers.dvb" ) ); if ( f.open(IO_WriteOnly|IO_Truncate) ) { - QTextStream tt( &f ); + TQTextStream tt( &f ); tt<<"#Generated by Kaffeine 0.5\n"; for( i=0; i<(int)timers.count(); i++ ) { t = timers.at(i); diff --git a/kaffeine/src/input/dvb/dvbpanel.h b/kaffeine/src/input/dvb/dvbpanel.h index 444e641..18dcfc0 100644 --- a/kaffeine/src/input/dvb/dvbpanel.h +++ b/kaffeine/src/input/dvb/dvbpanel.h @@ -21,13 +21,13 @@ #ifndef DVBPANEL_H #define DVBPANEL_H -#include <qframe.h> -#include <qcombobox.h> -#include <qtoolbutton.h> -#include <qptrlist.h> -#include <qtimer.h> -#include <qsplitter.h> -#include <qvbox.h> +#include <tqframe.h> +#include <tqcombobox.h> +#include <tqtoolbutton.h> +#include <tqptrlist.h> +#include <tqtimer.h> +#include <tqsplitter.h> +#include <tqvbox.h> #include <kapp.h> #include <kpushbutton.h> @@ -56,13 +56,14 @@ class KaffeineDvbPlugin; class DListView : public KListView { Q_OBJECT + TQ_OBJECT public: - DListView( QWidget *parent ); + DListView( TQWidget *tqparent ); int visibleItems; protected: - virtual QDragObject* dragObject(); + virtual TQDragObject* dragObject(); }; @@ -70,9 +71,9 @@ protected: class DIconViewItem : public KIconViewItem { public: - DIconViewItem( DvbPanel *pan, QIconView *parent, const QString &text, const QPixmap &icon ); + DIconViewItem( DvbPanel *pan, TQIconView *tqparent, const TQString &text, const TQPixmap &icon ); protected: - void dropped( QDropEvent *e, const QValueList<QIconDragItem> & ); + void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ); private: DvbPanel *panel; }; @@ -82,10 +83,11 @@ private: class DvbPanel : public KaffeineInput { Q_OBJECT + TQ_OBJECT public: - DvbPanel( QWidget *parent, QObject *objParent, const char *name=0); + DvbPanel( TQWidget *tqparent, TQObject *objParent, const char *name=0); ~DvbPanel(); bool getChannelList(); bool saveChannelList(); @@ -93,11 +95,11 @@ public: void setConfig(); void enableLiveDvb( bool on ); void checkFirstRun(); - void moveChannel( const QString &cat, const QString &name ); + void moveChannel( const TQString &cat, const TQString &name ); // Reimplemented from KaffeineInput - QWidget *wantPlayerWindow(); - QWidget *inputMainWidget(); + TQWidget *wantPlayerWindow(); + TQWidget *inputMainWidget(); void toggleLayout( bool ); bool close(); bool nextTrack( MRL& ); @@ -105,20 +107,20 @@ public: bool currentTrack( MRL& ); bool trackNumber( int, MRL& ); bool playbackFinished( MRL& ); - void getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ); + void getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ); void togglePanel(); - bool execTarget( const QString& ); + bool execTarget( const TQString& ); void saveConfig(); //*************************************** - QPtrList<ChannelDesc> channels; - QPtrList<RecTimer> timers; - QPtrList<DvbStream> dvb; - QString fifoName, fifoName1, currentFifo; - QString timeShiftFileName; + TQPtrList<ChannelDesc> channels; + TQPtrList<RecTimer> timers; + TQPtrList<DvbStream> dvb; + TQString fifoName, fifoName1, currentFifo; + TQString timeShiftFileName; Ts2Rtp *rtp; - QVBox *mainWidget; - QVBox *playerBox, *pbox; + TQVBox *mainWidget; + TQVBox *playerBox, *pbox; public slots: @@ -150,9 +152,9 @@ public slots: void dvbOSDAdvance(); void dvbOSDRetreat(); - void dvbNewTimer( QString name, QString channel, QString datetime, QString duration ); + void dvbNewTimer( TQString name, TQString channel, TQString datetime, TQString duration ); int getSNR( int device ); - void diskStatus(); + void disktqStatus(); void camClicked( int devNum ); private: @@ -161,22 +163,22 @@ private: bool getTimerList(); bool saveTimerList(); void fillChannelList( ChannelDesc *ch=0 ); - QPtrList<Transponder> getSourcesStatus(); + TQPtrList<Transponder> getSourcestqStatus(); void updateModeTimer( RecTimer *t ); DvbStream* getWorkingDvb( int mode, ChannelDesc *chan ); void dvbOSD(ChannelDesc liveChannel, DvbStream *d, int timeShift = 0); DvbStream* getLiveDVBStream(); - QPixmap tvPix, raPix, tvcPix, racPix; - QSplitter *split; - QFrame *panel; + TQPixmap tvPix, raPix, tvcPix, racPix; + TQSplitter *split; + TQFrame *panel; KIconView *iconView; DListView *channelsCb; - QToolButton *broadcastBtn, *recordBtn; - QToolButton *dateBtn, *infoBtn, *channelsBtn, *configBtn, *osdBtn, *recallBtn; + TQToolButton *broadcastBtn, *recordBtn; + TQToolButton *dateBtn, *infoBtn, *channelsBtn, *configBtn, *osdBtn, *recallBtn; KLed *shiftLed, *recordLed, *broadcastLed; - QTimer timersTimer; + TQTimer timersTimer; DVBconfig *dvbConfig; KRecord *timersDialog; int updown; @@ -184,14 +186,14 @@ private: int currentChannelNumber; Cleaner *cleaner; int osdMode; - QTimer osdTimer; - QTimer showOsdTimer; - QString currentCategory; + TQTimer osdTimer; + TQTimer showOsdTimer; + TQString currentCategory; bool isTuning; - QTimer tuningTimer, stopTuningTimer; - QTimer diskTimer; + TQTimer tuningTimer, stopTuningTimer; + TQTimer diskTimer; KLineEdit *searchLE; - QToolButton *searchBtn; + TQToolButton *searchBtn; int recallChannel; int browseDvbStream; @@ -199,28 +201,28 @@ private: int browseDvbTimeShift; KaffeineDvbPlugin *plug; - QString plugName; + TQString plugName; EventTable events; private slots: - void searchChannel( const QString &text ); + void searchChannel( const TQString &text ); void resetSearch(); void checkTimers(); - bool editChannel( QString &name ); - void channelSelected( QListViewItem *it ); - void channelClicked( QListViewItem *it ); - void channelSelected( const QString &name ); - void channelPopup( QListViewItem *it, const QPoint &pos, int col ); + bool editChannel( TQString &name ); + void channelSelected( TQListViewItem *it ); + void channelClicked( TQListViewItem *it ); + void channelSelected( const TQString &name ); + void channelPopup( TQListViewItem *it, const TQPoint &pos, int col ); void dvbZap( ChannelDesc *chan ); void finalZap( DvbStream *d, ChannelDesc *chan ); - void newTimer( QString channel, QString name, QDateTime begin, QTime duration, bool warn=true ); + void newTimer( TQString channel, TQString name, TQDateTime begin, TQTime duration, bool warn=true ); void dumpEvents(); void resetOSD(); - void catContextMenu( QIconViewItem*, const QPoint& ); - void catSelected( QIconViewItem* ); - void channelNumberChanged( QListViewItem* ); + void catContextMenu( TQIconViewItem*, const TQPoint& ); + void catSelected( TQIconViewItem* ); + void channelNumberChanged( TQListViewItem* ); void pipeOpened(); void setTuning(); @@ -229,13 +231,13 @@ signals: void zap( ChannelDesc* ); void playDvb(); void timersChanged(); - void dvbOpen( const QString &filename, const QString &chanName, int haveVideo ); + void dvbOpen( const TQString &filename, const TQString &chanName, int haveVideo ); void dvbStop(); void dvbPause( bool pauseLive ); - void setTimeShiftFilename( const QString& ); - void showOSD( const QString &text, int duration, int priority ); - void showDvbOSD( const QStringList& ); - void showDvbOSD( const QString&, const QStringList& ); + void setTimeShiftFilename( const TQString& ); + void showOSD( const TQString &text, int duration, int priority ); + void showDvbOSD( const TQStringList& ); + void showDvbOSD( const TQString&, const TQStringList& ); void updateTimer(RecTimer*, int); }; diff --git a/kaffeine/src/input/dvb/dvbsi.cpp b/kaffeine/src/input/dvb/dvbsi.cpp index db29091..a436eff 100644 --- a/kaffeine/src/input/dvb/dvbsi.cpp +++ b/kaffeine/src/input/dvb/dvbsi.cpp @@ -23,7 +23,7 @@ #include <unistd.h> #include <sys/poll.h> -#include <qdir.h> +#include <tqdir.h> #include <kapplication.h> @@ -48,7 +48,7 @@ #define PSIP_TABLE_TYPE_TVCT 0xc8 #define PSIP_TABLE_TYPE_CVCT 0xc9 -NitSection::NitSection( QPtrList<Transponder> *tp, bool *end, bool *ok, int anum, int tnum ) : KaffeineDVBsection( anum, tnum ) +NitSection::NitSection( TQPtrList<Transponder> *tp, bool *end, bool *ok, int anum, int tnum ) : KaffeineDVBsection( anum, tnum ) { ended = end; transponders = tp; @@ -88,7 +88,7 @@ bool NitSection::getSection( int pid, int tid, int timeout ) int i, n=0; int skip=0; int last=1, current=0, loop=0; - QValueList<int> list; + TQValueList<int> list; if ( !setFilter( pid, tid, timeout ) ) return false; @@ -220,7 +220,7 @@ bool NitSection::tableNIT( unsigned char* buf ) void NitSection::satelliteDesc( unsigned char* buf, Transponder *trans ) { - QString s, t; + TQString s, t; trans->type = FE_QPSK; s = t.setNum( getBits(buf,16,32), 16 ); @@ -283,7 +283,7 @@ void NitSection::S2satelliteDesc( unsigned char* buf, Transponder *trans ) void NitSection::cableDesc( unsigned char* buf, Transponder *trans ) { - QString s, t; + TQString s, t; trans->type = FE_QAM; s = t.setNum( getBits(buf,16,32), 16 ); @@ -354,7 +354,7 @@ void NitSection::freqListDesc( unsigned char* buf, Transponder *trans ) { unsigned char len, type; unsigned char *b=buf; - QString s, t; + TQString s, t; unsigned long freq; len = getBits(b,8,8); @@ -390,7 +390,7 @@ void NitSection::freqListDesc( unsigned char* buf, Transponder *trans ) -DVBsi::DVBsi( bool *ok, int anum, int tnum, DvbStream *d, const QString &charset ) : KaffeineDVBsection( anum, tnum, charset ) +DVBsi::DVBsi( bool *ok, int anum, int tnum, DvbStream *d, const TQString &charset ) : KaffeineDVBsection( anum, tnum, charset ) { channels.setAutoDelete( true ); transponders.setAutoDelete( true ); @@ -433,7 +433,7 @@ bool DVBsi::tableSDT( unsigned char* buf ) { int length, loop; ChannelDesc *desc; - QString s; + TQString s; unsigned short tsid; unsigned short nid; @@ -478,7 +478,7 @@ bool DVBsi::tablePMT( unsigned char* buf ) int i; int pid=0; ChannelDesc *desc=0; - QString lang; + TQString lang; int ns; unsigned char st; bool audio, ac3; @@ -620,7 +620,7 @@ bool DVBsi::tablePAT( unsigned char *buf ) desc->tp.tsid = tsid; desc->sid = sid; desc->pmtpid = pmt; - desc->name = QString("TSID:%1-SID:%2").arg(tsid).arg(sid); + desc->name = TQString("TSID:%1-SID:%2").tqarg(tsid).tqarg(sid); } } @@ -635,7 +635,7 @@ bool DVBsi::getSection( int pid, int tid, int timeout, int sid ) int i, n=0; int skip=0; int last=1, current=0, loop=0; - QValueList<int> list, sidList; + TQValueList<int> list, sidList; int cursid; if ( !setFilter( pid, tid, timeout ) ) @@ -660,7 +660,7 @@ bool DVBsi::getSection( int pid, int tid, int timeout, int sid ) } cursid = getBits(buf+3,0,16); - if ( sid && cursid!=sid && !sidList.contains(cursid) ) { + if ( sid && cursid!=sid && !sidList.tqcontains(cursid) ) { sidList.append( cursid ); continue; } @@ -854,7 +854,7 @@ bool DVBsi::parseVCT( int pid, int tid, int timeout, int sid ) ChannelDesc *desc = new ChannelDesc(); desc->tp.tsid = channel_tsid; - desc->name = QString("%1-%2 %3").arg(major_channel_num).arg(minor_channel_num).arg(short_name); + desc->name = TQString("%1-%2 %3").tqarg(major_channel_num).tqarg(minor_channel_num).tqarg(short_name); desc->sid = program_number; if (access_controlled == 1) desc->fta = 1; @@ -931,12 +931,12 @@ void DVBsi::out( bool stopscan ) } if ( stopscan ) dvb->stopScan(); - KApplication::kApplication()->postEvent( this, new QTimerEvent( TIMER_EVENT_SCAN_END ) ); + KApplication::kApplication()->postEvent( this, new TQTimerEvent( TIMER_EVENT_SCAN_END ) ); } -void DVBsi::go( QPtrList<Transponder> trans, int mode ) +void DVBsi::go( TQPtrList<Transponder> trans, int mode ) { int i; @@ -954,7 +954,7 @@ void DVBsi::go( QPtrList<Transponder> trans, int mode ) -void DVBsi::timerEvent( QTimerEvent *e ) +void DVBsi::timerEvent( TQTimerEvent *e ) { switch ( e->timerId() ) { case TIMER_EVENT_SCAN_END : @@ -1107,14 +1107,14 @@ void DVBsi::run() fprintf(stderr,"dvbsi: The end :)\n"); isRunning = false; listChannels(); - KApplication::kApplication()->postEvent( this, new QTimerEvent( TIMER_EVENT_SCAN_END ) ); + KApplication::kApplication()->postEvent( this, new TQTimerEvent( TIMER_EVENT_SCAN_END ) ); } // !!!! only there for debugging !!!!!!!!!! bool DVBsi::listChannels() { - QString s,t; + TQString s,t; int i, valid=0; bool ac3; diff --git a/kaffeine/src/input/dvb/dvbsi.h b/kaffeine/src/input/dvb/dvbsi.h index 1146f85..0fe8999 100644 --- a/kaffeine/src/input/dvb/dvbsi.h +++ b/kaffeine/src/input/dvb/dvbsi.h @@ -31,7 +31,7 @@ class NitSection : public KaffeineDVBsection public: - NitSection( QPtrList<Transponder> *tp, bool *end, bool *ok, int anum, int tnum ); + NitSection( TQPtrList<Transponder> *tp, bool *end, bool *ok, int anum, int tnum ); ~NitSection(); bool getSection( int pid, int tid, int timeout=5000 ); bool tableNIT( unsigned char* buf ); @@ -43,7 +43,7 @@ public: void stop(); bool *ended; - QPtrList<Transponder> *transponders; + TQPtrList<Transponder> *transponders; protected: @@ -52,13 +52,14 @@ protected: -class DVBsi : public QObject, public KaffeineDVBsection +class DVBsi : public TQObject, public KaffeineDVBsection { Q_OBJECT + TQ_OBJECT public: - DVBsi( bool *ok, int anum, int tnum, DvbStream *d, const QString &charset ); + DVBsi( bool *ok, int anum, int tnum, DvbStream *d, const TQString &charset ); ~DVBsi(); bool getSection( int pid, int tid, int timeout=5000, int sid=0 ); bool listChannels(); @@ -72,8 +73,8 @@ public: virtual bool parseMGT( int pid, int tid, int timeout=5000, int sid=0 ); virtual bool parseVCT( int pid, int tid, int timeout=5000, int sid=0 ); - QPtrList<ChannelDesc> channels; - QPtrList<Transponder> transponders; + TQPtrList<ChannelDesc> channels; + TQPtrList<Transponder> transponders; DvbStream *dvb; int indexChannels; int progressTransponder; @@ -81,13 +82,13 @@ public: public slots: - void go( QPtrList<Transponder> trans, int mode=1 ); + void go( TQPtrList<Transponder> trans, int mode=1 ); void stop(); protected: virtual void run(); - virtual void timerEvent( QTimerEvent *e ); + virtual void timerEvent( TQTimerEvent *e ); private: diff --git a/kaffeine/src/input/dvb/dvbstream.cpp b/kaffeine/src/input/dvb/dvbstream.cpp index 77bee5c..377f119 100644 --- a/kaffeine/src/input/dvb/dvbstream.cpp +++ b/kaffeine/src/input/dvb/dvbstream.cpp @@ -38,8 +38,8 @@ #include <linux/dvb/dmx.h> -#include <qdir.h> -#include <qprogressdialog.h> +#include <tqdir.h> +#include <tqprogressdialog.h> #include <klocale.h> #include <kapplication.h> @@ -55,7 +55,7 @@ -DvbStream::DvbStream( Device *d, const QString &charset, EventTable *et ) +DvbStream::DvbStream( Device *d, const TQString &charset, EventTable *et ) { dvbDevice = d; isRunning = false; @@ -65,13 +65,13 @@ DvbStream::DvbStream( Device *d, const QString &charset, EventTable *et ) fdFrontend = fdDvr = 0; ndmx = 0; currentTransponder = Transponder(); - frontendName = QString("/dev/dvb/adapter%1/frontend%2").arg( dvbDevice->adapter ).arg( dvbDevice->tuner ); - dvrName = QString("/dev/dvb/adapter%1/dvr%2").arg( dvbDevice->adapter ).arg( dvbDevice->tuner ); - demuxName = QString("/dev/dvb/adapter%1/demux%2").arg( dvbDevice->adapter ).arg( dvbDevice->tuner ); + frontendName = TQString("/dev/dvb/adapter%1/frontend%2").tqarg( dvbDevice->adapter ).tqarg( dvbDevice->tuner ); + dvrName = TQString("/dev/dvb/adapter%1/dvr%2").tqarg( dvbDevice->adapter ).tqarg( dvbDevice->tuner ); + demuxName = TQString("/dev/dvb/adapter%1/demux%2").tqarg( dvbDevice->adapter ).tqarg( dvbDevice->tuner ); out.setAutoDelete( true ); - QString deviceType="NONE"; + TQString deviceType="NONE"; switch ( dvbDevice->type ) { case FE_QPSK: deviceType = "DVBS"; break; case FE_OFDM: deviceType = "DVBT"; break; @@ -84,7 +84,7 @@ DvbStream::DvbStream( Device *d, const QString &charset, EventTable *et ) cam = NULL; plug = NULL; - connect( &statusTimer, SIGNAL(timeout()), this, SLOT(checkStatus()) ); + connect( &statusTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(checktqStatus()) ); } @@ -118,24 +118,24 @@ void DvbStream::showCamDialog() -QStringList DvbStream::getSources( bool all ) +TQStringList DvbStream::getSources( bool all ) { if ( !all ) { if ( dvbDevice->type==FE_OFDM ) - return QStringList( "Terrestrial" ); + return TQStringList( "Terrestrial" ); if ( dvbDevice->type==FE_QAM ) - return QStringList( "Cable" ); + return TQStringList( "Cable" ); if ( dvbDevice->type==FE_ATSC ) - return QStringList( "Atsc" ); + return TQStringList( "Atsc" ); } - QStringList source; + TQStringList source; int i; if ( dvbDevice->type==FE_QPSK ) { for ( i=0; i<dvbDevice->numLnb; i++ ) source+= dvbDevice->lnb[i].source; } else { - QString s = dvbDevice->source; + TQString s = dvbDevice->source; source+= s.remove(0,2); } return source; @@ -158,7 +158,7 @@ bool DvbStream::canSource( ChannelDesc *chan ) return false; int i; for ( i=0; i<dvbDevice->numLnb; i++ ) { - if ( dvbDevice->lnb[i].source.contains(chan->tp.source) ) + if ( dvbDevice->lnb[i].source.tqcontains(chan->tp.source) ) return true; } return false; @@ -173,7 +173,7 @@ int DvbStream::getPriority() -int DvbStream::getSatPos( const QString &src ) +int DvbStream::getSatPos( const TQString &src ) { int i; @@ -181,7 +181,7 @@ int DvbStream::getSatPos( const QString &src ) return -1; for ( i=0; i<dvbDevice->numLnb; i++ ) - if ( dvbDevice->lnb[i].source.contains(src) ) + if ( dvbDevice->lnb[i].source.tqcontains(src) ) return i; return -1; } @@ -221,7 +221,7 @@ bool DvbStream::closeFe() -void DvbStream::connectStatus( bool con ) +void DvbStream::connecttqStatus( bool con ) { if ( con ) statusTimer.start( 1000 ); @@ -360,7 +360,7 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr ) freq*=1000; srate*=1000; - QTime t1 = QTime::currentTime(); + TQTime t1 = TQTime::currentTime(); if ( chan->tp.inversion==INVERSION_AUTO ) { if ( fe_info.caps & FE_CAN_INVERSION_AUTO ) @@ -375,8 +375,8 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr ) switch( fe_info.type ) { case FE_OFDM : { - QString s = fe_info.name; - //if ( s.contains("TerraTec/qanu USB2.0 Highspeed DVB-T Receiver") ) // cinergyT2 hack + TQString s = fe_info.name; + //if ( s.tqcontains("TerraTec/qanu USB2.0 Highspeed DVB-T Receiver") ) // cinergyT2 hack // freq+=167000; if (freq < 1000000) freq*=1000UL; @@ -452,8 +452,8 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr ) closeFe(); return false; } - fprintf( stderr, "Diseqc settings time = %d ms\n", t1.msecsTo( QTime::currentTime() ) ); - t1 = QTime::currentTime(); + fprintf( stderr, "Diseqc settings time = %d ms\n", t1.msecsTo( TQTime::currentTime() ) ); + t1 = TQTime::currentTime(); if ( chan->tp.S2 ) { fprintf(stderr,"\nTHIS IS DVB-S2 >>>>>>>>>>>>>>>>>>>\n"); cmdargs[0].cmd = DTV_DELIVERY_SYSTEM; cmdargs[0].u.data = SYS_DVBS2; @@ -513,7 +513,7 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr ) closeFe(); return false; } - QTime lockTime = QTime::currentTime(); + TQTime lockTime = TQTime::currentTime(); do { usleep( 100000 ); fprintf( stderr, "." ); @@ -526,7 +526,7 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr ) loop = 0; break; } - } while ( lockTime.msecsTo( QTime::currentTime() )<=dvbDevice->tuningTimeout ); + } while ( lockTime.msecsTo( TQTime::currentTime() )<=dvbDevice->tuningTimeout ); fprintf(stderr,"\n"); --loop; } @@ -537,7 +537,7 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr ) return false; } - fprintf( stderr, "Tuning time = %d ms\n", t1.msecsTo( QTime::currentTime() ) ); + fprintf( stderr, "Tuning time = %d ms\n", t1.msecsTo( TQTime::currentTime() ) ); if ( rotorMove ) dvbDevice->lnb[lnbPos].currentSource = chan->tp.source; @@ -654,7 +654,7 @@ void DvbStream::moveRotor( int switchPos, ChannelDesc *chan, int hiband, bool dv int rotor=0; int voltage18 = ( (chan->tp.pol=='H')||(chan->tp.pol=='h') ); int ci = 4 * switchPos + 2 * hiband + (voltage18 ? 1 : 0); - QString msg; + TQString msg; fprintf( stderr, "Driving rotor to %s\n", chan->tp.source.ascii() ); for ( i=0; i<(int)dvbDevice->lnb[switchPos].source.count(); i++ ) { @@ -697,16 +697,16 @@ void DvbStream::moveRotor( int switchPos, ChannelDesc *chan, int hiband, bool dv } } else { - QProgressDialog progress( msg, i18n("Cancel"), rotor*2, 0, "progress", true ); + TQProgressDialog progress( msg, i18n("Cancel"), rotor*2, 0, "progress", true ); for ( j=0; j<(rotor*2); j++ ) { progress.setProgress( j ); - qApp->processEvents(); + tqApp->processEvents(); if ( progress.wasCanceled() ) break; usleep( 500000 ); } progress.setProgress( rotor*2 ); - qApp->processEvents(); + tqApp->processEvents(); } if ( (ci/2)%2 ) { @@ -718,10 +718,10 @@ void DvbStream::moveRotor( int switchPos, ChannelDesc *chan, int hiband, bool dv -double DvbStream::getSourceAngle( QString source ) +double DvbStream::getSourceAngle( TQString source ) { double angle=1.0; - int pos = source.findRev("-"); + int pos = source.tqfindRev("-"); source.remove(0,pos+1); source = source.upper(); if ( source.endsWith("W") ) @@ -823,7 +823,7 @@ bool DvbStream::setPids( DVBout *o ) int i, dmx; struct dmx_pes_filter_params pesFilterParams; dmx_pes_type_t pestype = DMX_PES_OTHER; - QValueList<int> pidList; + TQValueList<int> pidList; pidList = o->pidsList(); @@ -869,9 +869,9 @@ void DvbStream::removePids( DVBout *o ) void DvbStream::removeOut( DVBout *o ) { - disconnect( o, SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); - disconnect( o, SIGNAL(playDvb()), this, SLOT(receivePlayDvb()) ); - disconnect( o, SIGNAL(shifting(bool)), this, SLOT(receiveShifting(bool)) ); + disconnect( o, TQT_SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, TQT_SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); + disconnect( o, TQT_SIGNAL(playDvb()), this, TQT_SLOT(receivePlayDvb()) ); + disconnect( o, TQT_SIGNAL(shifting(bool)), this, TQT_SLOT(receiveShifting(bool)) ); delOut = o; while ( delOut ) usleep(100); @@ -879,7 +879,7 @@ void DvbStream::removeOut( DVBout *o ) -bool DvbStream::checkStatus() +bool DvbStream::checktqStatus() { int32_t strength; fe_status_t festatus; @@ -887,19 +887,19 @@ bool DvbStream::checkStatus() strength=0; ioctl(fdFrontend,FE_READ_SIGNAL_STRENGTH,&strength); - emit signalStatus(strength*100/65535); + emit signaltqStatus(strength*100/65535); strength=0; ioctl(fdFrontend,FE_READ_SNR,&strength); - emit snrStatus(strength*100/65535); + emit snrtqStatus(strength*100/65535); memset( &festatus, 0, sizeof(festatus) ); ioctl(fdFrontend,FE_READ_STATUS,&festatus); if (festatus & FE_HAS_LOCK) - emit lockStatus( true ); + emit locktqStatus( true ); else { - emit lockStatus( false ); + emit locktqStatus( false ); ret = false; } @@ -985,7 +985,7 @@ void DvbStream::run() -bool DvbStream::doPause( const QString &name ) +bool DvbStream::doPause( const TQString &name ) { //if ( !hasVideo() ) return false; @@ -1029,12 +1029,12 @@ bool DvbStream::running() const void DvbStream::receivePlayDvb() { - KApplication::kApplication()->postEvent( this, new QTimerEvent( 500 ) ); + KApplication::kApplication()->postEvent( this, new TQTimerEvent( 500 ) ); } -void DvbStream::timerEvent( QTimerEvent* ev ) +void DvbStream::timerEvent( TQTimerEvent* ev ) { switch ( ev->timerId() ) { case 500: @@ -1101,7 +1101,7 @@ void DvbStream::stopBroadcast() { int i; DVBout *o=0; - QPtrList<DVBout> p; + TQPtrList<DVBout> p; for ( i=0; i<(int)out.count(); i++ ) { o = out.at(i); @@ -1139,14 +1139,14 @@ int DvbStream::canStartBroadcast( bool &live, ChannelDesc *chan ) -bool DvbStream::startBroadcast( QPtrList<ChannelDesc> *list, Ts2Rtp *rtp ) +bool DvbStream::startBroadcast( TQPtrList<ChannelDesc> *list, Ts2Rtp *rtp ) { int i, j; bool stop=false, newout; DVBout *o=0; int no=0; ChannelDesc *chan=list->at(0); - QPtrList<ChannelDesc> broadcastList; + TQPtrList<ChannelDesc> broadcastList; broadcastList.setAutoDelete( true ); if ( !isTuned() ) { @@ -1174,9 +1174,9 @@ bool DvbStream::startBroadcast( QPtrList<ChannelDesc> *list, Ts2Rtp *rtp ) if ( !o ) { o = new DVBout( *list->at(i), dvbDevice->adapter, dvbDevice->tuner, plug ); - connect( o, SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); - connect( o, SIGNAL(playDvb()), this, SLOT(receivePlayDvb()) ); - connect( o, SIGNAL(shifting(bool)), this, SLOT(receiveShifting(bool)) ); + connect( o, TQT_SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, TQT_SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); + connect( o, TQT_SIGNAL(playDvb()), this, TQT_SLOT(receivePlayDvb()) ); + connect( o, TQT_SIGNAL(shifting(bool)), this, TQT_SLOT(receiveShifting(bool)) ); out.append( o ); if ( !setPids( o ) ) { removePids( o ); @@ -1243,12 +1243,12 @@ int DvbStream::canStartTimer( bool &live, ChannelDesc *chan ) -bool DvbStream::startTimer( ChannelDesc *chan, QString path, int maxsize, RecTimer *t, QString name ) +bool DvbStream::startTimer( ChannelDesc *chan, TQString path, int maxsize, RecTimer *t, TQString name ) { int i; bool stop=false, newout=false; DVBout *o=0; - QPtrList<DVBout> p; + TQPtrList<DVBout> p; for ( i=0; i<(int)out.count(); i++ ) { if ( out.at(i)->channel.name==chan->name ) @@ -1288,9 +1288,9 @@ bool DvbStream::startTimer( ChannelDesc *chan, QString path, int maxsize, RecTim if ( !o ) { o = new DVBout( *chan, dvbDevice->adapter, dvbDevice->tuner, plug ); - connect( o, SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); - connect( o, SIGNAL(playDvb()), this, SLOT(receivePlayDvb()) ); - connect( o, SIGNAL(shifting(bool)), this, SLOT(receiveShifting(bool)) ); + connect( o, TQT_SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, TQT_SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); + connect( o, TQT_SIGNAL(playDvb()), this, TQT_SLOT(receivePlayDvb()) ); + connect( o, TQT_SIGNAL(shifting(bool)), this, TQT_SLOT(receiveShifting(bool)) ); out.append( o ); if ( !setPids( o ) ) { if ( stop ) @@ -1302,10 +1302,10 @@ bool DvbStream::startTimer( ChannelDesc *chan, QString path, int maxsize, RecTim newout = true; } - if ( t->mode && !name.contains("%date") ) + if ( t->mode && !name.tqcontains("%date") ) name+= "-%date"; - name = name.replace( "%chan", chan->name ).replace("%date", t->begin.toString( "yyyyMMdd-hhmmss" ) ).replace("%name", t->name ); - name = name.replace( "/", "_" ).replace( ">", "_" ).replace("<","_").replace(":","_").replace('"',"_").replace("\\","_").replace("|","_"); + name = name.tqreplace( "%chan", chan->name ).tqreplace("%date", t->begin.toString( "yyyyMMdd-hhmmss" ) ).tqreplace("%name", t->name ); + name = name.tqreplace( "/", "_" ).tqreplace( ">", "_" ).tqreplace("<","_").tqreplace(":","_").tqreplace('"',"_").tqreplace("\\","_").tqreplace("|","_"); name = path+name; if ( !o->goRec( name, maxsize, t ) ) { @@ -1330,7 +1330,7 @@ bool DvbStream::startTimer( ChannelDesc *chan, QString path, int maxsize, RecTim -int DvbStream::goLive( ChannelDesc *chan, const QString &pipeName, int ringBufSize ) +int DvbStream::goLive( ChannelDesc *chan, const TQString &pipeName, int ringBufSize ) { int i; bool stop=false; @@ -1364,9 +1364,9 @@ int DvbStream::goLive( ChannelDesc *chan, const QString &pipeName, int ringBufSi if ( !o ) { o = new DVBout( *chan, dvbDevice->adapter, dvbDevice->tuner, plug ); - connect( o, SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); - connect( o, SIGNAL(playDvb()), this, SLOT(receivePlayDvb()) ); - connect( o, SIGNAL(shifting(bool)), this, SLOT(receiveShifting(bool)) ); + connect( o, TQT_SIGNAL(endRecord(DVBout*,RecTimer*,bool)), this, TQT_SLOT(recordEnded(DVBout*,RecTimer*,bool)) ); + connect( o, TQT_SIGNAL(playDvb()), this, TQT_SLOT(receivePlayDvb()) ); + connect( o, TQT_SIGNAL(shifting(bool)), this, TQT_SLOT(receiveShifting(bool)) ); out.append( o ); if ( !setPids( o ) ) { if ( stop ) @@ -1414,7 +1414,7 @@ void DvbStream::stopLive( ChannelDesc *chan ) { int i; DVBout *o; - QPtrList<DVBout> p; + TQPtrList<DVBout> p; bool camUsed = false; fprintf(stderr,"Asked to stop\n"); @@ -1481,7 +1481,7 @@ void DvbStream::stopFrontend() void DvbStream::setScanning( bool b ) { - connectStatus( b ); + connecttqStatus( b ); } diff --git a/kaffeine/src/input/dvb/dvbstream.h b/kaffeine/src/input/dvb/dvbstream.h index fe85f04..f793aa0 100644 --- a/kaffeine/src/input/dvb/dvbstream.h +++ b/kaffeine/src/input/dvb/dvbstream.h @@ -24,12 +24,12 @@ #include <sys/poll.h> #include <sys/stat.h> -#include <qthread.h> -#include <qptrlist.h> -#include <qfile.h> -#include <qobject.h> -#include <qtimer.h> -#include <qstringlist.h> +#include <tqthread.h> +#include <tqptrlist.h> +#include <tqfile.h> +#include <tqobject.h> +#include <tqtimer.h> +#include <tqstringlist.h> #include "channeldesc.h" #include "dvbout.h" @@ -45,45 +45,46 @@ class EventTable; -class DvbStream : public QObject, public QThread +class DvbStream : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public : enum { ErrDontSwitchAudio=-1, ErrCantTune=1, ErrCantSetPids=2, ErrIsRecording=3, ErrNoLive=4, ErrCantOpenFile=5, ErrIsBroadcasting=6, ErrCamUsed=7 }; - DvbStream( Device *d, const QString &charset, EventTable *et ); + DvbStream( Device *d, const TQString &charset, EventTable *et ); ~DvbStream(); int getAdapter() { return dvbDevice->adapter; } int getTuner() { return dvbDevice->tuner; } fe_type_t getType() {return dvbDevice->type; } void setPlug( KaffeineDvbPlugin *p ); - QStringList getSources( bool all=false ); + TQStringList getSources( bool all=false ); bool canSource( ChannelDesc *chan ); int getPriority(); bool tuneDvb( ChannelDesc *chan, bool dvr=true ); void stopFrontend(); virtual void run(); - int goLive( ChannelDesc *chan, const QString &pipeName, int ringBufSize ); + int goLive( ChannelDesc *chan, const TQString &pipeName, int ringBufSize ); void preStopLive(); void stopLive( ChannelDesc *chan ); void stop(); void stopScan(); void setScanning( bool b ); bool hasVideo(); - bool doPause( const QString &name ); + bool doPause( const TQString &name ); bool timeShiftMode(); bool running() const; ChannelDesc getLiveChannel(); Transponder getCurrentTransponder(); unsigned long getCurrentFreq(); bool isTuned(); - bool startTimer( ChannelDesc *chan, QString path, int maxsize, RecTimer *t, QString filename ); + bool startTimer( ChannelDesc *chan, TQString path, int maxsize, RecTimer *t, TQString filename ); int canStartTimer( bool &live, ChannelDesc *chan ); int canStartBroadcast( bool &live, ChannelDesc *chan ); - bool startBroadcast( QPtrList<ChannelDesc> *list, Ts2Rtp *rtp ); + bool startBroadcast( TQPtrList<ChannelDesc> *list, Ts2Rtp *rtp ); void stopBroadcast(); bool hasRec(); bool hasBroadcast(); @@ -98,7 +99,7 @@ public : public slots: - bool checkStatus(); + bool checktqStatus(); void receivePlayDvb(); void recordEnded( DVBout *o, RecTimer *t, bool kill ); void receiveShifting( bool b ); @@ -106,7 +107,7 @@ public slots: protected: - void timerEvent( QTimerEvent* ev ); + void timerEvent( TQTimerEvent* ev ); private : @@ -115,8 +116,8 @@ private : void rotorCommand( int cmd, int n1=0, int n2=0, int n3=0 ); void gotoX( double azimuth ); double getAzimuth( double angle ); - double getSourceAngle( QString source ); - int getSatPos( const QString &src ); + double getSourceAngle( TQString source ); + int getSatPos( const TQString &src ); bool setPids( DVBout *o ); void removePids( DVBout *o ); void removeOut( DVBout *o ); @@ -124,25 +125,25 @@ private : void startReading(); bool openFe(); bool closeFe(); - void connectStatus( bool con ); + void connecttqStatus( bool con ); - QFile liveFile; + TQFile liveFile; bool timeShifting; - QPtrList<DVBout> out; + TQPtrList<DVBout> out; Device *dvbDevice; int waitPause; DVBout *delOut; Transponder currentTransponder; - QString frontendName; - QString dvrName; - QString demuxName; + TQString frontendName; + TQString dvrName; + TQString demuxName; int fdFrontend; int ndmx; int fdDvr, fdPipe; bool isRunning; - QTimer statusTimer; - QString timeShiftFileName; + TQTimer statusTimer; + TQString timeShiftFileName; DvbCam *cam; bool camProbed; int diseqcTwice; @@ -155,10 +156,10 @@ signals: void isBroadcasting(bool); void timerEnded(RecTimer*); - void errorMsg( QString ); - void snrStatus( int ); - void signalStatus( int ); - void lockStatus( bool ); + void errorMsg( TQString ); + void snrtqStatus( int ); + void signaltqStatus( int ); + void locktqStatus( bool ); void shifting( bool ); }; diff --git a/kaffeine/src/input/dvb/kevents.cpp b/kaffeine/src/input/dvb/kevents.cpp index c24d1c4..5284813 100644 --- a/kaffeine/src/input/dvb/kevents.cpp +++ b/kaffeine/src/input/dvb/kevents.cpp @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qlayout.h> -#include <qfile.h> -#include <qdir.h> -#include <qpopupmenu.h> -#include <qcursor.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qtooltip.h> +#include <tqlayout.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqtooltip.h> #include <klocale.h> #include <kiconloader.h> @@ -37,19 +37,19 @@ -EListViewItem::EListViewItem( QListView *parent, QString chanName, QString eBegin, QString eDuration, QString eTitle, EventDesc *desc ) : KListViewItem( parent, chanName, eBegin, eDuration, eTitle ) +EListViewItem::EListViewItem( TQListView *tqparent, TQString chanName, TQString eBegin, TQString eDuration, TQString eTitle, EventDesc *desc ) : KListViewItem( tqparent, chanName, eBegin, eDuration, eTitle ) { event = desc; } -int EListViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int EListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { EListViewItem *ei = (EListViewItem*)i; if ( col != 1 ) - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); if ( event->startDateTime<ei->event->startDateTime ) return -1; @@ -60,7 +60,7 @@ int EListViewItem::compare( QListViewItem *i, int col, bool ascending ) const -KEvents::KEvents( QPtrList<ChannelDesc> *chans, QPtrList<DvbStream> *d, EventTable *t, QWidget *parent, QSize size ) : QDialog( parent ) +KEvents::KEvents( TQPtrList<ChannelDesc> *chans, TQPtrList<DvbStream> *d, EventTable *t, TQWidget *tqparent, TQSize size ) : TQDialog( tqparent ) { dvb = d; events = t; @@ -68,9 +68,9 @@ KEvents::KEvents( QPtrList<ChannelDesc> *chans, QPtrList<DvbStream> *d, EventTab setCaption( i18n("Electronic Program Guide") ); - QGridLayout *grid = new QGridLayout( this, 1, 1, 11, 6, "grid"); - QHBoxLayout *hbox = new QHBoxLayout( 0, 0, 6, "hbox" ); - QVBoxLayout *vbox = new QVBoxLayout( 0, 0, 6 , "vbox"); + TQGridLayout *grid = new TQGridLayout( this, 1, 1, 11, 6, "grid"); + TQHBoxLayout *hbox = new TQHBoxLayout( 0, 0, 6, "hbox" ); + TQVBoxLayout *vbox = new TQVBoxLayout( 0, 0, 6 , "vbox"); resetBtn = new KPushButton( i18n("Refresh"), this ); hbox->addWidget( resetBtn ); @@ -81,36 +81,36 @@ KEvents::KEvents( QPtrList<ChannelDesc> *chans, QPtrList<DvbStream> *d, EventTab currentChannelEpgBtn = new KPushButton( i18n("Current Channel"), this ); hbox->addWidget( currentChannelEpgBtn ); - QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); hbox->addItem( spacer ); vbox->addLayout( hbox); - hbox = new QHBoxLayout(); + hbox = new TQHBoxLayout(); - searchBtn = new QToolButton( this ); + searchBtn = new TQToolButton( this ); searchBtn->setAutoRaise( true ); - QToolTip::add( searchBtn, i18n("Electronic Program Guide Search")); + TQToolTip::add( searchBtn, i18n("Electronic Program Guide Search")); hbox->addWidget( searchBtn ); - QLabel* filterLabel = new QLabel( i18n("Search") + ":", this ); + TQLabel* filterLabel = new TQLabel( i18n("Search") + ":", this ); hbox->addWidget( filterLabel ); searchLineEdit = new KLineEdit(this); hbox->addWidget( searchLineEdit ); - tvradioCb = new QCheckBox(i18n("TV "), this ); - QToolTip::add( tvradioCb, i18n("Search TV Channels only (omit Radio)")); + tvradioCb = new TQCheckBox(i18n("TV "), this ); + TQToolTip::add( tvradioCb, i18n("Search TV Channels only (omit Radio)")); tvradioCb->setChecked(true); hbox->addWidget( tvradioCb); - titleCb = new QCheckBox(i18n("Titles "), this ); - QToolTip::add( titleCb, i18n("Search Event Titles only (omit Description)")); + titleCb = new TQCheckBox(i18n("Titles "), this ); + TQToolTip::add( titleCb, i18n("Search Event Titles only (omit Description)")); titleCb->setChecked(true); hbox->addWidget( titleCb); - ftaCb = new QCheckBox(i18n("FTA "), this ); - QToolTip::add( ftaCb, i18n("Search Free to Air Channels only (omit PayTV)")); + ftaCb = new TQCheckBox(i18n("FTA "), this ); + TQToolTip::add( ftaCb, i18n("Search Free to Air Channels only (omit PayTV)")); ftaCb->setChecked(false); hbox->addWidget( ftaCb); @@ -129,7 +129,7 @@ KEvents::KEvents( QPtrList<ChannelDesc> *chans, QPtrList<DvbStream> *d, EventTab grid->addWidget( listView, 1, 0 ); grid->setRowStretch( 1, 4 ); - textBrow = new QTextBrowser( this ); + textBrow = new TQTextBrowser( this ); grid->addWidget( textBrow, 2, 0 ); grid->setRowStretch( 2, 2 ); @@ -140,21 +140,21 @@ KEvents::KEvents( QPtrList<ChannelDesc> *chans, QPtrList<DvbStream> *d, EventTab currentChannelEpgBtn->setGuiItem( KGuiItem(i18n("Current Channel"), icon->loadIconSet("date", KIcon::Small) ) ); searchBtn->setIconSet( icon->loadIconSet("locationbar_erase", KIcon::Small) ); - new EListViewItem( (QListView*)listView, "Une chaine", "99/99/99 99:99 9999", "99:99 99", "un titre de programme", 0 ); + new EListViewItem( (TQListView*)listView, "Une chaine", "99/99/99 99:99 9999", "99:99 99", "un titre de programme", 0 ); resize( size ); - connect( resetBtn , SIGNAL( pressed() ), this, SLOT( reset() ) ); - connect( allBtn , SIGNAL( clicked() ), this, SLOT( setScheduled() ) ); - connect( currentNextBtn , SIGNAL( clicked() ), this, SLOT( setCurrentNext() ) ); - connect( currentChannelEpgBtn, SIGNAL( clicked() ), this, SLOT( setCurrentChannelEpg() ) ); - connect( searchBtn, SIGNAL( clicked() ), this, SLOT(resetSearch()) ); - connect( searchLineEdit, SIGNAL( returnPressed() ), this, SLOT( epgSearch() ) ); + connect( resetBtn , TQT_SIGNAL( pressed() ), this, TQT_SLOT( reset() ) ); + connect( allBtn , TQT_SIGNAL( clicked() ), this, TQT_SLOT( setScheduled() ) ); + connect( currentNextBtn , TQT_SIGNAL( clicked() ), this, TQT_SLOT( setCurrentNext() ) ); + connect( currentChannelEpgBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setCurrentChannelEpg() ) ); + connect( searchBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT(resetSearch()) ); + connect( searchLineEdit, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( epgSearch() ) ); - connect( listView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ), - this, SLOT(mouseClickedSlot(int,QListViewItem*,const QPoint&,int)) ); + connect( listView, TQT_SIGNAL( mouseButtonClicked(int,TQListViewItem*,const TQPoint&,int) ), + this, TQT_SLOT(mouseClickedSlot(int,TQListViewItem*,const TQPoint&,int)) ); - connect( listView, SIGNAL(doubleClicked(QListViewItem*,const QPoint &,int)), - this, SLOT(zap(QListViewItem*,const QPoint &,int)) ); + connect( listView, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint &,int)), + this, TQT_SLOT(zap(TQListViewItem*,const TQPoint &,int)) ); setMode( 1 ); delete icon; @@ -165,7 +165,7 @@ void KEvents::resetSearch() searchLineEdit->clear(); } -void KEvents::checkEpgSearch(QString searchword) +void KEvents::checkEpgSearch(TQString searchword) { int i, j, k, m, n, l; EventSource *esrc; @@ -174,7 +174,7 @@ void KEvents::checkEpgSearch(QString searchword) EventDesc *desc; EListViewItem *itt=0; ChannelDesc *ch; - QString s, begin, duration, title; + TQString s, begin, duration, title; bool found; for( k=0; k<events->getNSource(); k++ ) { @@ -203,11 +203,11 @@ void KEvents::checkEpgSearch(QString searchword) break; found=false; - if(desc->title.upper().find(searchword.upper())!=-1) + if(desc->title.upper().tqfind(searchword.upper())!=-1) found=true; if(!desc->subtitle.isEmpty()) { - if(desc->subtitle.upper().find(searchword.upper())!=-1) + if(desc->subtitle.upper().tqfind(searchword.upper())!=-1) found=true; } @@ -216,7 +216,7 @@ void KEvents::checkEpgSearch(QString searchword) for ( l=0; l<(int)desc->extEvents.count(); l++ ) { s = *desc->extEvents.at(l); if(!s.isEmpty()) { - if(s.upper().find(searchword.upper())!=-1) { + if(s.upper().tqfind(searchword.upper())!=-1) { found=true; s=""; break; @@ -228,7 +228,7 @@ void KEvents::checkEpgSearch(QString searchword) for ( l=0; l<(int)desc->shortEvents.count(); l++ ) { s = desc->shortEvents.at(l)->name; if(!s.isEmpty()) { - if(s.upper().find(searchword.upper())!=-1) { + if(s.upper().tqfind(searchword.upper())!=-1) { found=true; s=""; break; @@ -236,7 +236,7 @@ void KEvents::checkEpgSearch(QString searchword) } s = desc->shortEvents.at(l)->text; if(!s.isEmpty()) { - if(s.upper().find(searchword.upper())!=-1) { + if(s.upper().tqfind(searchword.upper())!=-1) { found=true; s=""; break; @@ -252,7 +252,7 @@ void KEvents::checkEpgSearch(QString searchword) duration = desc->duration.toString("hh:mm"); title = desc->title; - itt = new EListViewItem( (QListView*)listView, ch->name, begin, duration, title, desc ); + itt = new EListViewItem( (TQListView*)listView, ch->name, begin, duration, title, desc ); if ( !ch->pix.isNull() ) itt->setPixmap( 0, ch->pix ); @@ -267,7 +267,7 @@ void KEvents::checkEpgSearch(QString searchword) void KEvents::epgSearch() { - QString text = searchLineEdit->text(); + TQString text = searchLineEdit->text(); if (text.stripWhiteSpace().isEmpty()) return; listView->clear(); @@ -289,23 +289,23 @@ void KEvents::setCurrentChannelEpg() } -void KEvents::zap( QListViewItem* it, const QPoint &p, int col ) +void KEvents::zap( TQListViewItem* it, const TQPoint &p, int col ) { - QPoint pt=p; + TQPoint pt=p; int c=col; c++; - if ( it->text(0) != QString::null ) + if ( it->text(0) != TQString() ) emit zapTo( it->text(0) ); } -void KEvents::mouseClickedSlot( int btn, QListViewItem *it, const QPoint &p, int c ) +void KEvents::mouseClickedSlot( int btn, TQListViewItem *it, const TQPoint &p, int c ) { int i=c; - QPoint pt=p; - QString s; + TQPoint pt=p; + TQString s; if ( !it ) return; @@ -313,14 +313,14 @@ void KEvents::mouseClickedSlot( int btn, QListViewItem *it, const QPoint &p, int switch ( btn ) { case Qt::RightButton : { - QPopupMenu *pop = new QPopupMenu(); + TQPopupMenu *pop = new TQPopupMenu(); pop->insertItem( i18n("View All Programs"), 1 ); pop->insertSeparator(); pop->insertItem( i18n("Add to Timers"), 2 ); if ( ei->event->running==4 ) pop->setItemEnabled( 2, false ); i = 0; - i = pop->exec( QCursor::pos() ); + i = pop->exec( TQCursor::pos() ); switch ( i ) { case 0 : break; @@ -381,7 +381,7 @@ void KEvents::setCurrentNext() void KEvents::setScheduled() { - QListViewItem *it = listView->currentItem(); + TQListViewItem *it = listView->currentItem(); if ( !it ) return; setMode( 2, it->text(0) ); @@ -389,7 +389,7 @@ void KEvents::setScheduled() -void KEvents::setMode( int m, QString name ) +void KEvents::setMode( int m, TQString name ) { int i; @@ -430,7 +430,7 @@ void KEvents::checkNewEvent() EventDesc *desc; EListViewItem *itt=0; ChannelDesc *ch; - QString s, t, channel, begin, duration, title; + TQString s, t, channel, begin, duration, title; if ( mode==2 ) { if ( !chan ) @@ -447,7 +447,7 @@ void KEvents::checkNewEvent() title = desc->title; if ( title.isEmpty() ) continue; - itt = new EListViewItem( (QListView*)listView, chan->name, begin, duration, title, desc ); + itt = new EListViewItem( (TQListView*)listView, chan->name, begin, duration, title, desc ); if ( !chan->pix.isNull() ) itt->setPixmap( 0, chan->pix ); } @@ -462,7 +462,7 @@ void KEvents::checkNewEvent() title = desc->title; if ( title.isEmpty() ) continue; - itt = new EListViewItem( (QListView*)listView, ch->name, begin, duration, title, desc ); + itt = new EListViewItem( (TQListView*)listView, ch->name, begin, duration, title, desc ); if ( !ch->pix.isNull() ) itt->setPixmap( 0, ch->pix ); } diff --git a/kaffeine/src/input/dvb/kevents.h b/kaffeine/src/input/dvb/kevents.h index 3779452..20828f5 100644 --- a/kaffeine/src/input/dvb/kevents.h +++ b/kaffeine/src/input/dvb/kevents.h @@ -21,10 +21,10 @@ #ifndef KEVENTS_H #define KEVENTS_H -#include <qtimer.h> -#include <qdialog.h> -#include <qdatetime.h> -#include <qtextbrowser.h> +#include <tqtimer.h> +#include <tqdialog.h> +#include <tqdatetime.h> +#include <tqtextbrowser.h> #include <klistview.h> #include <kpushbutton.h> @@ -41,47 +41,48 @@ class EListViewItem : public KListViewItem public: - EListViewItem( QListView *parent, QString chanName, QString eBegin, QString eDuration, QString eTitle, EventDesc *desc ); - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + EListViewItem( TQListView *tqparent, TQString chanName, TQString eBegin, TQString eDuration, TQString eTitle, EventDesc *desc ); + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; EventDesc *event; }; -class KEvents : public QDialog +class KEvents : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KEvents( QPtrList<ChannelDesc> *chans, QPtrList<DvbStream> *d, EventTable *t, QWidget *parent, QSize size ); + KEvents( TQPtrList<ChannelDesc> *chans, TQPtrList<DvbStream> *d, EventTable *t, TQWidget *tqparent, TQSize size ); ~KEvents(); private slots: - void mouseClickedSlot( int btn, QListViewItem *it, const QPoint &p, int c ); + void mouseClickedSlot( int btn, TQListViewItem *it, const TQPoint &p, int c ); void reset(); - void setMode( int m, QString name="" ); + void setMode( int m, TQString name="" ); void setScheduled(); void setCurrentNext(); void setCurrentChannelEpg(); void epgSearch(); void resetSearch(); - void zap( QListViewItem* it, const QPoint &p, int col ); + void zap( TQListViewItem* it, const TQPoint &p, int col ); private: - void checkEpgSearch(QString searchword); + void checkEpgSearch(TQString searchword); void checkNewEvent(); - QPtrList<DvbStream> *dvb; + TQPtrList<DvbStream> *dvb; EventTable *events; KListView *listView; KPushButton *resetBtn, *currentNextBtn, *allBtn, *currentChannelEpgBtn; - QToolButton *searchBtn; - QCheckBox *titleCb,*tvradioCb,*ftaCb; - QPtrList<ChannelDesc> *channels; - QTextBrowser *textBrow; + TQToolButton *searchBtn; + TQCheckBox *titleCb,*tvradioCb,*ftaCb; + TQPtrList<ChannelDesc> *channels; + TQTextBrowser *textBrow; int mode; ChannelDesc *chan; @@ -91,8 +92,8 @@ protected: signals: - void addTimer( QString channel, QString name, QDateTime begin, QTime duration ); - void zapTo( const QString &channel ); + void addTimer( TQString channel, TQString name, TQDateTime begin, TQTime duration ); + void zapTo( const TQString &channel ); }; #endif /* KEVENTS_H */ diff --git a/kaffeine/src/input/dvb/kgradprogress.cpp b/kaffeine/src/input/dvb/kgradprogress.cpp index 092cfb3..350566a 100644 --- a/kaffeine/src/input/dvb/kgradprogress.cpp +++ b/kaffeine/src/input/dvb/kgradprogress.cpp @@ -18,23 +18,23 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qpainter.h> -#include <qlabel.h> +#include <tqpainter.h> +#include <tqlabel.h> #include "kgradprogress.h" -KGradProgress::KGradProgress( QWidget *parent ) : QLabel( parent ) +KGradProgress::KGradProgress( TQWidget *tqparent ) : TQLabel( tqparent ) { barPix = 0; - colorUp = QColor( 0, 255, 0 ); - colorDown = QColor( 255, 0, 0 ); + colorUp = TQColor( 0, 255, 0 ); + colorDown = TQColor( 255, 0, 0 ); current = 0; - setFrameStyle( QFrame::Box | QFrame::Plain ); + setFrameStyle( TQFrame::Box | TQFrame::Plain ); setLineWidth(1); setMidLineWidth(0); - setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); + tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); } @@ -43,7 +43,7 @@ void KGradProgress::setProgress( int progress ) { current = progress; draw(); - repaint(false); + tqrepaint(false); } @@ -56,15 +56,15 @@ void KGradProgress::draw() int h = height() - ( 2*off ); int w = width() - ( 2*off ); int per; - QString s; - QFont f; + TQString s; + TQFont f; s = s.setNum( current )+"%"; per = current*w/100; if ( barPix ) delete barPix; - barPix = new QPixmap( w, h, -1, QPixmap::BestOptim ); - QPainter p( barPix ); + barPix = new TQPixmap( w, h, -1, TQPixmap::BestOptim ); + TQPainter p( barPix ); p.fillRect( 0, 0, w, h, paletteBackgroundColor() ); for ( j=0; j<per; j++ ) { @@ -76,29 +76,29 @@ void KGradProgress::draw() a = 255-(2*(j-w/2)*255/w); b = 255; } - p.setPen( QColor( a, b, 0 ) ); + p.setPen( TQColor( a, b, 0 ) ); for ( i=0; i<h; i++ ) p.drawPoint( j+off, i+off ); } f = font(); f.setPointSize( int(h/1.2) ); p.setFont( f ); - p.setPen( QColor( 0, 0, 0 ) ); + p.setPen( TQColor( 0, 0, 0 ) ); p.drawText( w/2, (h/2)+(f.pointSize()/2), s ); p.end(); } -void KGradProgress::resizeEvent( QResizeEvent *e ) +void KGradProgress::resizeEvent( TQResizeEvent *e ) { - QSize s=e->size(); + TQSize s=e->size(); draw(); } -void KGradProgress::paintEvent(QPaintEvent *event) +void KGradProgress::paintEvent(TQPaintEvent *event) { int x, y, w, h; @@ -106,24 +106,24 @@ void KGradProgress::paintEvent(QPaintEvent *event) w = width() - (2*x); h = height() - (2*y); - QLabel::paintEvent( event ); + TQLabel::paintEvent( event ); bitBlt( this, x, y, barPix, 0, 0, w, h, CopyROP ); } -QSize KGradProgress::sizeHint() +TQSize KGradProgress::tqsizeHint() { - QLabel lab( "This is a progress bar.", 0 ); - return QSize( lab.width(), int(font().pointSize()*1.2) ); + TQLabel lab( "This is a progress bar.", 0 ); + return TQSize( lab.width(), int(font().pointSize()*1.2) ); } -QSizePolicy KGradProgress::sizePolicy() +TQSizePolicy KGradProgress::sizePolicy() { - return QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); + return TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); } diff --git a/kaffeine/src/input/dvb/kgradprogress.h b/kaffeine/src/input/dvb/kgradprogress.h index a55591e..f2365d9 100644 --- a/kaffeine/src/input/dvb/kgradprogress.h +++ b/kaffeine/src/input/dvb/kgradprogress.h @@ -21,23 +21,24 @@ #ifndef KGRADPROGRESS_H #define KGRADPROGRESS_H -#include <qlabel.h> -#include <qpixmap.h> +#include <tqlabel.h> +#include <tqpixmap.h> -class KGradProgress : public QLabel +class KGradProgress : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KGradProgress( QWidget *parent ); + KGradProgress( TQWidget *tqparent ); ~KGradProgress(); - virtual void paintEvent(QPaintEvent *event); - virtual QSize sizeHint(); - virtual QSizePolicy sizePolicy(); + virtual void paintEvent(TQPaintEvent *event); + virtual TQSize tqsizeHint(); + virtual TQSizePolicy sizePolicy(); public slots: @@ -45,14 +46,14 @@ public slots: protected: - virtual void resizeEvent( QResizeEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); private: void draw(); - QPixmap *barPix; - QColor colorDown, colorUp; + TQPixmap *barPix; + TQColor colorDown, colorUp; int current; }; diff --git a/kaffeine/src/input/dvb/krecord.cpp b/kaffeine/src/input/dvb/krecord.cpp index 7e14036..a9a59a1 100644 --- a/kaffeine/src/input/dvb/krecord.cpp +++ b/kaffeine/src/input/dvb/krecord.cpp @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qlayout.h> -#include <qlabel.h> -#include <qfile.h> -#include <qdir.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqframe.h> #include <klocale.h> #include <kiconloader.h> @@ -32,13 +32,13 @@ -KRecord::KRecord( QStringList chanList, QPtrList<RecTimer> *t, QWidget *parent, QSize size ) : QDialog( parent ) +KRecord::KRecord( TQStringList chanList, TQPtrList<RecTimer> *t, TQWidget *tqparent, TQSize size ) : TQDialog( tqparent ) { timers = t; channelsList = chanList; - QVBoxLayout *vb = new QVBoxLayout( 0, 0, 6 ); - QLabel *lab = new QLabel( i18n("Timers list:"), this ); + TQVBoxLayout *vb = new TQVBoxLayout( 0, 0, 6 ); + TQLabel *lab = new TQLabel( i18n("Timers list:"), this ); vb->addWidget( lab ); list = new KListView( this ); @@ -50,7 +50,7 @@ KRecord::KRecord( QStringList chanList, QPtrList<RecTimer> *t, QWidget *parent, list->setResizePolicy( KListView::AutoOneFit ); list->setAllColumnsShowFocus( true ); list->setFullWidth( true ); - QListViewItem * item = new QListViewItem( list, 0 ); + TQListViewItem * item = new TQListViewItem( list, 0 ); item->setText( 0, "00" ); item->setText( 1, "Un nom assez long mais pas trop" ); item->setText( 2, "Une chaine du meme calibre" ); @@ -58,30 +58,30 @@ KRecord::KRecord( QStringList chanList, QPtrList<RecTimer> *t, QWidget *parent, item->setText( 4, "00:00mm" ); vb->addWidget( list ); - QVBoxLayout *vb1 = new QVBoxLayout( 0, 0, 6 ); + TQVBoxLayout *vb1 = new TQVBoxLayout( 0, 0, 6 ); newBtn = new KPushButton(i18n("New"), this); vb1->addWidget( newBtn ); editBtn = new KPushButton(i18n("Edit"), this); vb1->addWidget( editBtn ); deleteBtn = new KPushButton(i18n("Delete"), this); vb1->addWidget( deleteBtn ); - vb1->addItem( new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ) ); + vb1->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding ) ); - QHBoxLayout *hb = new QHBoxLayout( 0, 0, 6 ); + TQHBoxLayout *hb = new TQHBoxLayout( 0, 0, 6 ); hb->addLayout( vb ); hb->addLayout( vb1 ); - QHBoxLayout *hb1 = new QHBoxLayout( 0 ); - hb1->addItem( new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum ) ); + TQHBoxLayout *hb1 = new TQHBoxLayout( 0 ); + hb1->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum ) ); okBtn = new KPushButton(i18n("Close"), this); hb1->addWidget( okBtn ); - QVBoxLayout *vb2 = new QVBoxLayout( this, 6, 6 ); + TQVBoxLayout *vb2 = new TQVBoxLayout( this, 6, 6 ); vb2->addLayout( hb ); - QFrame *line = new QFrame( this, "line1" ); - line->setFrameStyle( QFrame::HLine ); - line->setFrameShadow( QFrame::Sunken ); - line->setFrameShape( QFrame::HLine ); + TQFrame *line = new TQFrame( this, "line1" ); + line->setFrameStyle( TQFrame::HLine ); + line->setFrameShadow( TQFrame::Sunken ); + line->setFrameShape( TQFrame::HLine ); vb2->addWidget( line ); vb2->addLayout( hb1 ); @@ -97,10 +97,10 @@ KRecord::KRecord( QStringList chanList, QPtrList<RecTimer> *t, QWidget *parent, setCaption( i18n("Timers") ); - connect( okBtn, SIGNAL(clicked()), this, SLOT(accept()) ); - connect( newBtn, SIGNAL(clicked()), this, SLOT(newTimer()) ); - connect( deleteBtn, SIGNAL(clicked()), this, SLOT(deleteTimer()) ); - connect( editBtn, SIGNAL(clicked()), this, SLOT(editTimer()) ); + connect( okBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) ); + connect( newBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(newTimer()) ); + connect( deleteBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteTimer()) ); + connect( editBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editTimer()) ); refresh(); resize( size ); @@ -111,10 +111,10 @@ KRecord::KRecord( QStringList chanList, QPtrList<RecTimer> *t, QWidget *parent, void KRecord::refresh() { - QListViewItem *after, *itt; + TQListViewItem *after, *itt; RecTimer *ti; int i; - QString s; + TQString s; list->clear(); list->setSorting( -1 ); @@ -125,7 +125,7 @@ void KRecord::refresh() else s = ""; s = s+ti->name;*/ s = ti->name; - itt = new KListViewItem( (QListView*)list, "", s, ti->channel, KGlobal::locale()->formatDateTime( ti->begin ), ti->duration.toString("hh:mm") ); + itt = new KListViewItem( (TQListView*)list, "", s, ti->channel, KGlobal::locale()->formatDateTime( ti->begin ), ti->duration.toString("hh:mm") ); if ( ti->mode ) itt->setPixmap( 0, yesRepeat ); if ( ti->running ) @@ -139,7 +139,7 @@ void KRecord::refresh() void KRecord::newTimer() { - QListViewItem *itt, *after; + TQListViewItem *itt, *after; RecTimer *t = new RecTimer(); t->running = 0; @@ -150,7 +150,7 @@ void KRecord::newTimer() if ( ret==KTimerEditor::Accepted ) { *t = dlg.timer; after = where( t, true ); - itt = new KListViewItem( (QListView*)list, "", t->name, t->channel, KGlobal::locale()->formatDateTime( t->begin ), t->duration.toString("hh:mm") ); + itt = new KListViewItem( (TQListView*)list, "", t->name, t->channel, KGlobal::locale()->formatDateTime( t->begin ), t->duration.toString("hh:mm") ); if ( t->mode ) itt->setPixmap( 0, yesRepeat ); if ( t->running ) @@ -165,7 +165,7 @@ void KRecord::newTimer() void KRecord::editTimer() { - QListViewItem *it, *after; + TQListViewItem *it, *after; int i=0; RecTimer *t, *tn=0; @@ -195,7 +195,7 @@ void KRecord::editTimer() for ( i=0; i<(int)timers->count(); i++ ) { if ( timers->at(i)==tn ) { if ( tn->running ) { - int ms = tn->begin.time().secsTo( QTime::currentTime() ); + int ms = tn->begin.time().secsTo( TQTime::currentTime() ); ms = ((dlg.timer.duration.hour()*3600+dlg.timer.duration.minute()*60)-ms)*1000; if ( ms<2000 ) ms = 0; @@ -221,7 +221,7 @@ void KRecord::editTimer() void KRecord::deleteTimer() { - QListViewItem *it; + TQListViewItem *it; int i=0, ret; KIconLoader *icon = new KIconLoader(); @@ -250,9 +250,9 @@ void KRecord::deleteTimer() -QListViewItem* KRecord::where( RecTimer *rt, bool add ) +TQListViewItem* KRecord::where( RecTimer *rt, bool add ) { - QListViewItem *it, *ret=0; + TQListViewItem *it, *ret=0; int i, r=0; RecTimer *t; diff --git a/kaffeine/src/input/dvb/krecord.h b/kaffeine/src/input/dvb/krecord.h index 6a9f1f3..5ba399e 100644 --- a/kaffeine/src/input/dvb/krecord.h +++ b/kaffeine/src/input/dvb/krecord.h @@ -21,8 +21,8 @@ #ifndef KRECORD_H #define KRECORD_H -#include <qdialog.h> -#include <qpixmap.h> +#include <tqdialog.h> +#include <tqpixmap.h> #include <kpushbutton.h> #include <klistview.h> @@ -32,16 +32,17 @@ -class KRecord : public QDialog +class KRecord : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KRecord( QStringList chanList, QPtrList<RecTimer> *t, QWidget *parent, QSize size ); + KRecord( TQStringList chanList, TQPtrList<RecTimer> *t, TQWidget *tqparent, TQSize size ); ~KRecord(); - QStringList channelsList; + TQStringList channelsList; protected slots: @@ -53,12 +54,12 @@ protected slots: private: - QListViewItem* where( RecTimer *rt, bool add=false ); + TQListViewItem* where( RecTimer *rt, bool add=false ); KPushButton *newBtn, *editBtn, *deleteBtn, *okBtn; KListView *list; - QPtrList<RecTimer> *timers; - QPixmap isRecording, yesRepeat; + TQPtrList<RecTimer> *timers; + TQPixmap isRecording, yesRepeat; signals: diff --git a/kaffeine/src/input/dvb/ktimereditor.cpp b/kaffeine/src/input/dvb/ktimereditor.cpp index 63993c0..c48cc49 100644 --- a/kaffeine/src/input/dvb/ktimereditor.cpp +++ b/kaffeine/src/input/dvb/ktimereditor.cpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> #include <kiconloader.h> @@ -29,64 +29,64 @@ -KTimerEditor::KTimerEditor( bool newone, QStringList &chanList, RecTimer t, QWidget *parent ) : QDialog( parent ) +KTimerEditor::KTimerEditor( bool newone, TQStringList &chanList, RecTimer t, TQWidget *tqparent ) : TQDialog( tqparent ) { int i; - QGridLayout *grid = new QGridLayout( 0, 1, 1, 11, 6 ); - QLabel *lab = new QLabel( i18n("Name:"), this ); + TQGridLayout *grid = new TQGridLayout( 0, 1, 1, 11, 6 ); + TQLabel *lab = new TQLabel( i18n("Name:"), this ); grid->addWidget( lab, 0, 0 ); - nameLe = new QLineEdit( this ); + nameLe = new TQLineEdit( this ); grid->addWidget( nameLe, 0, 1 ); - lab = new QLabel( i18n("Channel:"), this ); + lab = new TQLabel( i18n("Channel:"), this ); grid->addWidget( lab, 1, 0 ); - channelComb = new QComboBox( this ); + channelComb = new TQComboBox( this ); grid->addWidget( channelComb, 1, 1 ); - lab = new QLabel( i18n("Begin:"), this ); + lab = new TQLabel( i18n("Begin:"), this ); grid->addWidget( lab, 2, 0 ); - begin = new QDateTimeEdit( this ); + begin = new TQDateTimeEdit( this ); grid->addWidget( begin, 2, 1 ); - lab = new QLabel( i18n("Duration:"), this ); + lab = new TQLabel( i18n("Duration:"), this ); grid->addWidget( lab, 3, 0 ); - duration = new QTimeEdit( this ); + duration = new TQTimeEdit( this ); grid->addWidget( duration, 3, 1 ); - lab = new QLabel( i18n("End:"), this ); + lab = new TQLabel( i18n("End:"), this ); grid->addWidget( lab, 4, 0 ); - end = new QDateTimeEdit( this ); + end = new TQDateTimeEdit( this ); grid->addWidget( end, 4, 1 ); repeatBtn = new KPushButton( this ); grid->addWidget( repeatBtn, 5, 0 ); - repeatLab = new QLabel( this ); + repeatLab = new TQLabel( this ); grid->addWidget( repeatLab, 5, 1 ); - QFrame *line = new QFrame( this, "line1" ); - line->setFrameStyle( QFrame::HLine ); - line->setFrameShadow( QFrame::Sunken ); - line->setFrameShape( QFrame::HLine ); + TQFrame *line = new TQFrame( this, "line1" ); + line->setFrameStyle( TQFrame::HLine ); + line->setFrameShadow( TQFrame::Sunken ); + line->setFrameShape( TQFrame::HLine ); - QHBoxLayout *hb = new QHBoxLayout( 0, 0, 6 ); + TQHBoxLayout *hb = new TQHBoxLayout( 0, 0, 6 ); cancelBtn = new KPushButton( this ); hb->addWidget( cancelBtn ); - hb->addItem( new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum ) ); + hb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum ) ); okBtn = new KPushButton( this ); okBtn->setDefault( true ); hb->addWidget( okBtn ); - QVBoxLayout *vb = new QVBoxLayout( this, 6, 6 ); + TQVBoxLayout *vb = new TQVBoxLayout( this, 6, 6 ); vb->addLayout( grid ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding ) ); vb->addWidget( line ); vb->addLayout( hb ); timer = t; - //begin->dateEdit()->setOrder( QDateEdit::DMY ); + //begin->dateEdit()->setOrder( TQDateEdit::DMY ); channelComb->insertStringList( chanList ); if ( newone ) { - begin->setDateTime( QDateTime::currentDateTime() ); - duration->setTime( QTime(2,0,0) ); + begin->setDateTime( TQDateTime::tqcurrentDateTime() ); + duration->setTime( TQTime(2,0,0) ); } else { nameLe->setText( timer.name ); @@ -120,21 +120,21 @@ KTimerEditor::KTimerEditor( bool newone, QStringList &chanList, RecTimer t, QWid setCaption( i18n("Timer Editor") ); - connect( okBtn, SIGNAL(clicked()), this, SLOT(accept()) ); - connect( cancelBtn, SIGNAL(clicked()), this, SLOT(reject()) ); - connect( repeatBtn, SIGNAL(clicked()), this, SLOT(setRepeat()) ); - connect( begin, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(setMaxEnd(const QDateTime&)) ); - connect( end, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(setDuration(const QDateTime&)) ); - connect( duration, SIGNAL(valueChanged(const QTime&)), this, SLOT(setEnd(const QTime&)) ); + connect( okBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) ); + connect( cancelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()) ); + connect( repeatBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRepeat()) ); + connect( begin, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(setMaxEnd(const TQDateTime&)) ); + connect( end, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(setDuration(const TQDateTime&)) ); + connect( duration, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(setEnd(const TQTime&)) ); setMaxEnd( begin->dateTime() ); delete icon; } -void KTimerEditor::setMaxEnd( const QDateTime &dt ) +void KTimerEditor::setMaxEnd( const TQDateTime &dt ) { - QDateTime max = dt.addSecs( 23*3600+59*60+59 ); + TQDateTime max = dt.addSecs( 23*3600+59*60+59 ); end->dateEdit()->setMinValue( dt.date() ); end->dateEdit()->setMaxValue( max.date() ); setEnd( duration->time() ); @@ -142,20 +142,20 @@ void KTimerEditor::setMaxEnd( const QDateTime &dt ) -void KTimerEditor::setDuration( const QDateTime &dt ) +void KTimerEditor::setDuration( const TQDateTime &dt ) { - disconnect( duration, SIGNAL(valueChanged(const QTime&)), this, SLOT(setEnd(const QTime&)) ); - duration->setTime( QTime().addSecs( begin->dateTime().secsTo( dt ) ) ); - connect( duration, SIGNAL(valueChanged(const QTime&)), this, SLOT(setEnd(const QTime&)) ); + disconnect( duration, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(setEnd(const TQTime&)) ); + duration->setTime( TQTime().addSecs( begin->dateTime().secsTo( dt ) ) ); + connect( duration, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(setEnd(const TQTime&)) ); } -void KTimerEditor::setEnd( const QTime &t ) +void KTimerEditor::setEnd( const TQTime &t ) { - disconnect( end, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(setDuration(const QDateTime&)) ); - end->setDateTime( begin->dateTime().addSecs( QTime().secsTo( t ) ) ); - connect( end, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(setDuration(const QDateTime&)) ); + disconnect( end, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(setDuration(const TQDateTime&)) ); + end->setDateTime( begin->dateTime().addSecs( TQTime().secsTo( t ) ) ); + connect( end, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(setDuration(const TQDateTime&)) ); } @@ -185,22 +185,22 @@ void KTimerEditor::accept() return; } - if ( nameLe->text().stripWhiteSpace().contains("/") ) + if ( nameLe->text().stripWhiteSpace().tqcontains("/") ) goto stop; - if ( nameLe->text().stripWhiteSpace().contains(">") ) + if ( nameLe->text().stripWhiteSpace().tqcontains(">") ) goto stop; - if ( nameLe->text().stripWhiteSpace().contains("<") ) + if ( nameLe->text().stripWhiteSpace().tqcontains("<") ) goto stop; - if ( nameLe->text().stripWhiteSpace().contains("\\") ) + if ( nameLe->text().stripWhiteSpace().tqcontains("\\") ) goto stop; - if ( nameLe->text().stripWhiteSpace().contains(":") ) + if ( nameLe->text().stripWhiteSpace().tqcontains(":") ) goto stop; - if ( nameLe->text().stripWhiteSpace().contains("\"") ) + if ( nameLe->text().stripWhiteSpace().tqcontains("\"") ) goto stop; - if ( nameLe->text().stripWhiteSpace().contains("|") ) + if ( nameLe->text().stripWhiteSpace().tqcontains("|") ) goto stop; - if ( duration->time()<QTime(0,1) ) { + if ( duration->time()<TQTime(0,1) ) { KMessageBox::sorry( this, i18n("Duration must be at least 1 minute!") ); duration->setFocus(); return; diff --git a/kaffeine/src/input/dvb/ktimereditor.h b/kaffeine/src/input/dvb/ktimereditor.h index dfe1683..774a982 100644 --- a/kaffeine/src/input/dvb/ktimereditor.h +++ b/kaffeine/src/input/dvb/ktimereditor.h @@ -21,11 +21,11 @@ #ifndef KTIMEREDITOR_H #define KTIMEREDITOR_H -#include <qdialog.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qdatetimeedit.h> -#include <qlabel.h> +#include <tqdialog.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqdatetimeedit.h> +#include <tqlabel.h> #include <kpushbutton.h> @@ -35,21 +35,22 @@ -class KTimerEditor : public QDialog +class KTimerEditor : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KTimerEditor( bool newone, QStringList &chanList, RecTimer t, QWidget *parent ); + KTimerEditor( bool newone, TQStringList &chanList, RecTimer t, TQWidget *tqparent ); ~KTimerEditor(); KPushButton *okBtn, *cancelBtn, *repeatBtn; - QLabel *repeatLab; - QLineEdit *nameLe; - QComboBox *channelComb; - QDateTimeEdit *begin, *end; - QTimeEdit *duration; + TQLabel *repeatLab; + TQLineEdit *nameLe; + TQComboBox *channelComb; + TQDateTimeEdit *begin, *end; + TQTimeEdit *duration; RecTimer timer; public slots: @@ -59,9 +60,9 @@ public slots: protected slots: virtual void accept(); - void setDuration( const QDateTime &dt ); - void setEnd( const QTime &t ); - void setMaxEnd( const QDateTime &dt ); + void setDuration( const TQDateTime &dt ); + void setEnd( const TQTime &t ); + void setMaxEnd( const TQDateTime &dt ); }; #endif /* KTIMEREDITOR_H */ diff --git a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.cpp b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.cpp index afa5e55..beb5645 100644 --- a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.cpp +++ b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.cpp @@ -23,8 +23,8 @@ #include <sys/time.h> #include <sys/resource.h> -#include <qdatetime.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqfile.h> #include <klocale.h> #include <kstandarddirs.h> @@ -69,19 +69,19 @@ EventSid::EventSid( int s ) EventSid::~EventSid() { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); events.clear(); } void EventSid::remove( EventDesc *d ) { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); events.remove( d ); } EventDesc *EventSid::getEventDesc( int n ) { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); return events.at(n); } @@ -96,13 +96,13 @@ EventTsid::EventTsid( int n, int t ) EventTsid::~EventTsid() { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); sidList.clear(); } EventSid *EventTsid::getNEventSid( int n ) { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); return sidList.at( n ); } @@ -110,7 +110,7 @@ EventSid *EventTsid::getEventSid( int sid ) { int i; - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); for ( i=0; i<(int)sidList.count(); i++ ) { if ( sidList.at(i)->getSid()==sid ) return sidList.at(i); @@ -140,7 +140,7 @@ EventDesc *EventTsid::getEventDesc( int sid, int n ) -EventSource::EventSource( QString src ) +EventSource::EventSource( TQString src ) { source = src; tsidList.setAutoDelete( true ); @@ -148,13 +148,13 @@ EventSource::EventSource( QString src ) EventSource::~EventSource() { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); tsidList.clear(); } EventTsid *EventSource::getNEventTsid( int n ) { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); return tsidList.at( n ); } @@ -206,14 +206,14 @@ EventDesc *EventSource::getEventDesc( int nid, int tsid, int sid, int n ) EventTable::EventTable() { srcList.setAutoDelete( true ); - connect ( &cleanTimer, SIGNAL(timeout()), this, SLOT(setClean()) ); + connect ( &cleanTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setClean()) ); cleanTimer.start( 10000 ); epgLoaded = false; } EventTable::~EventTable() { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); srcList.clear(); } @@ -222,17 +222,17 @@ void EventTable::saveEpg() EventSource *esrc; EventTsid *et; EventSid *es; - QPtrList<EventDesc> *esEvents; + TQPtrList<EventDesc> *esEvents; EventDesc *desc; int i, k, j, m, n; - QCString c; + TQCString c; int count=0; unsigned char sync=0xff; - QTime t1=QTime::currentTime(); + TQTime t1=TQTime::currentTime(); - QFile f( locateLocal("appdata", "dvbepg.data" ) ); + TQFile f( locateLocal("appdata", "dvbepg.data" ) ); if ( f.open(IO_WriteOnly|IO_Truncate) ) { - QDataStream dt( &f ); + TQDataStream dt( &f ); for( i=0; i<getNSource(); i++ ) { if ( !(esrc=getNEventSource( i )) ) continue; @@ -283,7 +283,7 @@ void EventTable::saveEpg() } } f.close(); - fprintf( stderr, "Saved epg data : %d events (%d msecs)\n", count, t1.msecsTo(QTime::currentTime()) ); + fprintf( stderr, "Saved epg data : %d events (%d msecs)\n", count, t1.msecsTo(TQTime::currentTime()) ); } } @@ -297,16 +297,16 @@ void EventTable::loadEpg() char buf[EPGBUFSIZE]; int num=0; unsigned char sync; - QDateTime cur=QDateTime::currentDateTime(); - QTime t1=QTime::currentTime(); + TQDateTime cur=TQDateTime::tqcurrentDateTime(); + TQTime t1=TQTime::currentTime(); if ( epgLoaded ) return; epgLoaded = true; - QFile f( locateLocal("appdata", "dvbepg.data" ) ); + TQFile f( locateLocal("appdata", "dvbepg.data" ) ); if ( f.open(IO_ReadOnly) ) { - QDataStream dt( &f ); + TQDataStream dt( &f ); while (!dt.eof() ) { dt >> sync; if ( sync!=0xff ) { @@ -318,7 +318,7 @@ void EventTable::loadEpg() dt >> tmp; if ( !validString( f, desc, tmp, EPGBUFSIZE, num ) ) return; dt.readRawBytes( buf, tmp ); - desc->source = QString::fromUtf8( buf ); + desc->source = TQString::fromUtf8( buf ); dt >> desc->tid; dt >> desc->sid; dt >> desc->tsid; @@ -330,18 +330,18 @@ void EventTable::loadEpg() dt >> tmp; desc->startDateTime.setTime_t( tmp ); dt >> tmp; - desc->duration = QTime().addSecs( tmp ); + desc->duration = TQTime().addSecs( tmp ); dt >> count; for ( i=0; i<count; i++ ) { sev = new ShortEvent(); dt >> tmp; if ( !validString( f, desc, tmp, EPGBUFSIZE, num ) ) return; dt.readRawBytes( buf, tmp ); - sev->name = QString::fromUtf8( buf ); + sev->name = TQString::fromUtf8( buf ); dt >> tmp; if ( !validString( f, desc, tmp, EPGBUFSIZE, num ) ) return; dt.readRawBytes( buf, tmp ); - sev->text = QString::fromUtf8( buf ); + sev->text = TQString::fromUtf8( buf ); desc->shortEvents.append( sev ); } dt >> count; @@ -349,16 +349,16 @@ void EventTable::loadEpg() dt >> tmp; if ( !validString( f, desc, tmp, EPGBUFSIZE, num ) ) return; dt.readRawBytes( buf, tmp ); - desc->extEvents.append( new QString( QString::fromUtf8( buf ) ) ); + desc->extEvents.append( new TQString( TQString::fromUtf8( buf ) ) ); } dt >> tmp; if ( !validString( f, desc, tmp, EPGBUFSIZE, num ) ) return; dt.readRawBytes( buf, tmp ); - desc->title = QString::fromUtf8( buf ); + desc->title = TQString::fromUtf8( buf ); dt >> tmp; if ( !validString( f, desc, tmp, EPGBUFSIZE, num ) ) return; dt.readRawBytes( buf, tmp ); - desc->subtitle = QString::fromUtf8( buf ); + desc->subtitle = TQString::fromUtf8( buf ); if ( desc->startDateTime.addSecs( (desc->duration.hour()*3600)+(desc->duration.minute()*60)+desc->duration.second() )<cur ) delete desc; else { @@ -372,11 +372,11 @@ void EventTable::loadEpg() } } f.close(); - fprintf( stderr, "Loaded epg data : %d events (%d msecs)\n", num, t1.msecsTo(QTime::currentTime()) ); + fprintf( stderr, "Loaded epg data : %d events (%d msecs)\n", num, t1.msecsTo(TQTime::currentTime()) ); } } -bool EventTable::validString( QFile &f, EventDesc *d, int len, int buflen, int nev ) +bool EventTable::validString( TQFile &f, EventDesc *d, int len, int buflen, int nev ) { if ( len<1 || len>buflen ) { f.close(); @@ -412,11 +412,11 @@ void EventTable::run() EventTsid *et; EventSid *es; EventDesc *desc; - QDateTime dt, cur; + TQDateTime dt, cur; setpriority(PRIO_PROCESS, 0, 19); - cur = QDateTime::currentDateTime(); + cur = TQDateTime::tqcurrentDateTime(); for( k=0; k<getNSource(); k++ ) { if ( !(esrc=getNEventSource( k )) ) continue; @@ -439,15 +439,15 @@ void EventTable::run() EventSource *EventTable::getNEventSource( int n ) { - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); return srcList.at( n ); } -EventSource *EventTable::getEventSource( QString src ) +EventSource *EventTable::getEventSource( TQString src ) { int i; - QMutexLocker locker( &mutex ); + TQMutexLocker locker( &mutex ); for ( i=0; i<(int)srcList.count(); i++ ) { if ( srcList.at(i)->getSource()==src ) return srcList.at(i); @@ -457,7 +457,7 @@ EventSource *EventTable::getEventSource( QString src ) return es; } -EventDesc *EventTable::getEventDesc( QString src, int nid, int tsid, int sid, int n ) +EventDesc *EventTable::getEventDesc( TQString src, int nid, int tsid, int sid, int n ) { int i; EventSource *es=0; @@ -477,7 +477,7 @@ EventDesc *EventTable::getEventDesc( QString src, int nid, int tsid, int sid, in -KaffeineEpgPlugin::KaffeineEpgPlugin( QObject* parent, const char* name ) : KParts::Part( parent, name ) +KaffeineEpgPlugin::KaffeineEpgPlugin( TQObject* tqparent, const char* name ) : KParts::Part( tqparent, name ) { } diff --git a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.h b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.h index 07dbd16..1553786 100644 --- a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.h +++ b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbevents.h @@ -21,10 +21,10 @@ #ifndef KAFFEINEDVBEVENTS_H #define KAFFEINEDVBEVENTS_H -#include <qtimer.h> -#include <qmutex.h> -#include <qfile.h> -#include <qobject.h> +#include <tqtimer.h> +#include <tqmutex.h> +#include <tqfile.h> +#include <tqobject.h> #include <kparts/part.h> @@ -40,8 +40,8 @@ public: ShortEvent(); ~ShortEvent(); - QString name; - QString text; + TQString name; + TQString text; }; class EventDesc @@ -52,7 +52,7 @@ public: EventDesc(); ~EventDesc(); - QString source; + TQString source; unsigned char tid; unsigned short sid; unsigned short tsid; @@ -61,12 +61,12 @@ public: unsigned char lsn; unsigned short eid; unsigned char running; - QDateTime startDateTime; - QTime duration; - QPtrList<ShortEvent> shortEvents; - QPtrList<QString> extEvents; - QString title; - QString subtitle; + TQDateTime startDateTime; + TQTime duration; + TQPtrList<ShortEvent> shortEvents; + TQPtrList<TQString> extEvents; + TQString title; + TQString subtitle; unsigned int loop; }; @@ -80,14 +80,14 @@ public: int getSid() { return sid; } void lock() { mutex.lock(); } void unlock() { mutex.unlock(); } - QPtrList<EventDesc> *getEvents() { return &events; } + TQPtrList<EventDesc> *getEvents() { return &events; } EventDesc *getEventDesc( int n ); int getNDesc() { return events.count(); } void remove( EventDesc *d ); private: - QMutex mutex; + TQMutex mutex; int sid; - QPtrList<EventDesc> events; + TQPtrList<EventDesc> events; }; @@ -104,9 +104,9 @@ public: int getNSid() { return sidList.count(); } EventDesc *getEventDesc( int sid, int n ); private: - QMutex mutex; + TQMutex mutex; int tsid, nid; - QPtrList<EventSid> sidList; + TQPtrList<EventSid> sidList; }; @@ -114,29 +114,30 @@ private: class EventSource { public: - EventSource( QString src ); + EventSource( TQString src ); ~EventSource(); EventSid *getEventSid( int nid, int tsid, int sid ); EventTsid *getNEventTsid( int n ); int getNTsid() { return tsidList.count(); } EventDesc *getEventDesc( int nid, int tsid, int sid, int n ); - QString getSource() { return source; } + TQString getSource() { return source; } private: - QMutex mutex; - QString source; - QPtrList<EventTsid> tsidList; + TQMutex mutex; + TQString source; + TQPtrList<EventTsid> tsidList; }; -class EventTable : public QObject, public QThread +class EventTable : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: EventTable(); ~EventTable(); - EventSource *getEventSource( QString src ); - EventDesc *getEventDesc( QString src, int nid, int tsid, int sid, int n ); + EventSource *getEventSource( TQString src ); + EventDesc *getEventDesc( TQString src, int nid, int tsid, int sid, int n ); EventSource *getNEventSource( int n ); int getNSource() { return srcList.count(); } void doClean( bool b ); @@ -145,10 +146,10 @@ public: protected: virtual void run(); private: - bool validString( QFile &f, EventDesc *d, int len, int buflen, int nev ); - QMutex mutex; - QPtrList<EventSource> srcList; - QTimer cleanTimer; + bool validString( TQFile &f, EventDesc *d, int len, int buflen, int nev ); + TQMutex mutex; + TQPtrList<EventSource> srcList; + TQTimer cleanTimer; bool epgLoaded; private slots: void setClean(); @@ -159,10 +160,11 @@ private slots: class KDE_EXPORT KaffeineEpgPlugin : public KParts::Part, public KaffeineDVBsection { Q_OBJECT + TQ_OBJECT public: - KaffeineEpgPlugin( QObject* parent, const char* name ); + KaffeineEpgPlugin( TQObject* tqparent, const char* name ); virtual ~KaffeineEpgPlugin(); - virtual bool go( QString /*src*/, int /*freqKhz*/ ) { return false; } + virtual bool go( TQString /*src*/, int /*freqKhz*/ ) { return false; } virtual void stop() {} void setTable( EventTable *table ) { events = table; } diff --git a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.cpp b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.cpp index 54c912e..44619b7 100644 --- a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.cpp +++ b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.cpp @@ -41,14 +41,14 @@ KaffeineDVBsection::KaffeineDVBsection() -KaffeineDVBsection::KaffeineDVBsection( int anum, int tnum, const QString &charset ) +KaffeineDVBsection::KaffeineDVBsection( int anum, int tnum, const TQString &charset ) { initSection( anum, tnum, charset ); } -void KaffeineDVBsection::initSection( int anum, int tnum, const QString &charset ) +void KaffeineDVBsection::initSection( int anum, int tnum, const TQString &charset ) { defaultCharset = charset.ascii(); adapter = anum; @@ -70,7 +70,7 @@ KaffeineDVBsection::~KaffeineDVBsection() bool KaffeineDVBsection::setFilter( int pid, int tid, int timeout, bool checkcrc ) { struct dmx_sct_filter_params sctfilter; - QString demuxer = QString("/dev/dvb/adapter%1/demux%2").arg( adapter ).arg( tuner ); + TQString demuxer = TQString("/dev/dvb/adapter%1/demux%2").tqarg( adapter ).tqarg( tuner ); if ((fdDemux = open( demuxer.ascii(), O_RDWR | O_NONBLOCK )) < 0) { perror ("open failed"); @@ -131,7 +131,7 @@ unsigned int KaffeineDVBsection::getBits( unsigned char *b, int offbits, int nbi -bool KaffeineDVBsection::doIconv( QCString &s, QCString table, char *buffer, int buflen ) +bool KaffeineDVBsection::doIconv( TQCString &s, TQCString table, char *buffer, int buflen ) { size_t inSize, outSize=buflen; char *inBuf, *outBuf; @@ -155,13 +155,13 @@ bool KaffeineDVBsection::doIconv( QCString &s, QCString table, char *buffer, int -QString KaffeineDVBsection::getText( unsigned char *buf, int length ) +TQString KaffeineDVBsection::getText( unsigned char *buf, int length ) { - QCString s; - QString ret=""; + TQCString s; + TQString ret=""; int i=0; char buffer[1000]; - QCString table=defaultCharset; + TQCString table=defaultCharset; if ( length==0 ) return ""; @@ -170,7 +170,7 @@ QString KaffeineDVBsection::getText( unsigned char *buf, int length ) if ( buf[i]<0x20 && (i+2)<length ) { if ( !s.isEmpty() ) { if ( doIconv( s, table, buffer, sizeof(buffer) ) ) { - ret += QString::fromUtf8( buffer ); + ret += TQString::fromUtf8( buffer ); s = ""; } } @@ -220,7 +220,7 @@ QString KaffeineDVBsection::getText( unsigned char *buf, int length ) if ( !s.isEmpty() ) { if ( doIconv( s, table, buffer, sizeof(buffer) ) ) { - ret += QString::fromUtf8( buffer ); + ret += TQString::fromUtf8( buffer ); } } return ret; @@ -228,10 +228,10 @@ QString KaffeineDVBsection::getText( unsigned char *buf, int length ) -QString KaffeineDVBsection::langDesc( unsigned char* buf ) +TQString KaffeineDVBsection::langDesc( unsigned char* buf ) { char c[4]; - QString s; + TQString s; memset( mempcpy( c, buf+2, 3 ), 0, 1 ); s = c; @@ -240,19 +240,19 @@ QString KaffeineDVBsection::langDesc( unsigned char* buf ) -QTime KaffeineDVBsection::getTime( unsigned char *buf ) +TQTime KaffeineDVBsection::getTime( unsigned char *buf ) { int h, m, s; h = ((getBits(buf,0,4)*10)+getBits(buf,4,4))%24; m = ((getBits(buf,8,4)*10)+getBits(buf,12,4))%60; s = ((getBits(buf,16,4)*10)+getBits(buf,20,4))%60; - return QTime( h, m, s ); + return TQTime( h, m, s ); } -QDate KaffeineDVBsection::getDate( unsigned char *buf ) +TQDate KaffeineDVBsection::getDate( unsigned char *buf ) { int i, j, m, D, Y, M, k, mjd; @@ -268,12 +268,12 @@ QDate KaffeineDVBsection::getDate( unsigned char *buf ) Y = i+k+1900; M = m-1-k*12; - return QDate( (Y>=1970)?Y:1970, (M>0 && M<13)?M:1, (D>0 && D<32)?D:1 ); + return TQDate( (Y>=1970)?Y:1970, (M>0 && M<13)?M:1, (D>0 && D<32)?D:1 ); } -QDateTime KaffeineDVBsection::getDateTime( unsigned char *buf ) +TQDateTime KaffeineDVBsection::getDateTime( unsigned char *buf ) { /*int hh, mm, ss; int i, j, m, D, Y, M, k, mjd; @@ -293,8 +293,8 @@ QDateTime KaffeineDVBsection::getDateTime( unsigned char *buf ) mm = ((getBits(buf+2,8,4)*10)+getBits(buf+2,12,4))%60; ss = ((getBits(buf+2,16,4)*10)+getBits(buf+2,20,4))%60; - QDateTime dt( QDate( (Y>=1970)?Y:1970, (M>0 && M<13)?M:1, (D>0 && D<32)?D:1 ), QTime( hh, mm, ss ) ); - QDateTime u( QDate( 1970, 1, 1 ), QTime( 0, 0, 0 ) ); + TQDateTime dt( TQDate( (Y>=1970)?Y:1970, (M>0 && M<13)?M:1, (D>0 && D<32)?D:1 ), TQTime( hh, mm, ss ) ); + TQDateTime u( TQDate( 1970, 1, 1 ), TQTime( 0, 0, 0 ) ); sec = u.secsTo( dt ); u.setTime_t( sec ); // UTC to local return u;*/ @@ -323,8 +323,8 @@ QDateTime KaffeineDVBsection::getDateTime( unsigned char *buf ) time_t p=timegm(t); if ( p>0 ) { t = localtime(&p); - return QDateTime( QDate( t->tm_year+1900, t->tm_mon+1, t->tm_mday ), QTime( t->tm_hour, t->tm_min, t->tm_sec ) ); + return TQDateTime( TQDate( t->tm_year+1900, t->tm_mon+1, t->tm_mday ), TQTime( t->tm_hour, t->tm_min, t->tm_sec ) ); } else - return QDateTime( QDate( 1970, 1, 1 ), QTime( 0, 0, 0 ) ); + return TQDateTime( TQDate( 1970, 1, 1 ), TQTime( 0, 0, 0 ) ); } diff --git a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.h b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.h index af451f2..7ad3d46 100644 --- a/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.h +++ b/kaffeine/src/input/dvb/plugins/epg/kaffeinedvbsection.h @@ -24,40 +24,40 @@ #include <sys/poll.h> #include <linux/dvb/dmx.h> -#include <qthread.h> -#include <qdatetime.h> +#include <tqthread.h> +#include <tqdatetime.h> -class KaffeineDVBsection : public QThread +class KaffeineDVBsection : public TQThread { public: KaffeineDVBsection(); - KaffeineDVBsection( int anum, int tnum, const QString &charset="ISO8859-1" ); + KaffeineDVBsection( int anum, int tnum, const TQString &charset="ISO8859-1" ); ~KaffeineDVBsection(); - void initSection( int anum, int tnum, const QString &charset="ISO8859-1" ); + void initSection( int anum, int tnum, const TQString &charset="ISO8859-1" ); static unsigned int getBits( unsigned char *b, int offbits, int nbits ); protected: virtual void run() {} - QString langDesc( unsigned char* buf ); + TQString langDesc( unsigned char* buf ); bool setFilter( int pid, int tid, int timeout=5000, bool checkcrc=true ); void stopFilter(); - QString getText( unsigned char *buf, int length ); - bool doIconv( QCString &s, QCString table, char *buffer, int buflen ); - QTime getTime( unsigned char *buf ); - QDate getDate( unsigned char *buf ); - QDateTime getDateTime( unsigned char *buf ); + TQString getText( unsigned char *buf, int length ); + bool doIconv( TQCString &s, TQCString table, char *buffer, int buflen ); + TQTime getTime( unsigned char *buf ); + TQDate getDate( unsigned char *buf ); + TQDateTime getDateTime( unsigned char *buf ); int fdDemux; int indexChannels; bool isRunning; int adapter; int tuner; - QCString defaultCharset; + TQCString defaultCharset; struct pollfd pf[1]; }; diff --git a/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.cpp b/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.cpp index bd3e5b3..124bc3a 100644 --- a/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.cpp +++ b/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.cpp @@ -21,7 +21,7 @@ #include "kaffeinedvbplugin.h" #include "kaffeinedvbplugin.moc" -KaffeineDvbPlugin::KaffeineDvbPlugin(QObject* parent, const char* name) : KParts::Part( parent, name ) +KaffeineDvbPlugin::KaffeineDvbPlugin(TQObject* tqparent, const char* name) : KParts::Part( tqparent, name ) { } diff --git a/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.h b/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.h index f112397..8737297 100644 --- a/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.h +++ b/kaffeine/src/input/dvb/plugins/stream/kaffeinedvbplugin.h @@ -21,8 +21,8 @@ #ifndef KAFFEINEDVBPLUGIN_H #define KAFFEINEDVBPLUGIN_H -#include <qpopupmenu.h> -#include <qstring.h> +#include <tqpopupmenu.h> +#include <tqstring.h> #include <kparts/part.h> #include <kconfig.h> @@ -34,10 +34,11 @@ class KDE_EXPORT KaffeineDvbPlugin : public KParts::Part { Q_OBJECT + TQ_OBJECT public: - KaffeineDvbPlugin(QObject* parent, const char* name); + KaffeineDvbPlugin(TQObject* tqparent, const char* name); virtual ~KaffeineDvbPlugin(); - virtual QString pluginName() { return QString(); } + virtual TQString pluginName() { return TQString(); } // returns a "handle". virtual void* init( int /*sid*/ , int /*anum*/, int /*tnum*/, int /*fta*/ ) { return NULL; } diff --git a/kaffeine/src/input/dvb/scandialog.cpp b/kaffeine/src/input/dvb/scandialog.cpp index 4e1a14c..c63f316 100644 --- a/kaffeine/src/input/dvb/scandialog.cpp +++ b/kaffeine/src/input/dvb/scandialog.cpp @@ -18,18 +18,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qlayout.h> -#include <qdir.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlistview.h> -#include <qpopupmenu.h> -#include <qcursor.h> -#include <qwhatsthis.h> -#include <qapplication.h> -#include <qaccel.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqlistview.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> +#include <tqwhatsthis.h> +#include <tqapplication.h> +#include <tqaccel.h> #include <klocale.h> #include <kiconloader.h> @@ -41,19 +41,19 @@ -DListViewItem::DListViewItem( QListView *parent, ChannelDesc *desc, QString label1, QString label2 ) - : QListViewItem( parent, label1, label2 ) +DListViewItem::DListViewItem( TQListView *tqparent, ChannelDesc *desc, TQString label1, TQString label2 ) + : TQListViewItem( tqparent, label1, label2 ) { chan = desc; } -ScanDialog::ScanDialog( QPtrList<DvbStream> *d, QPtrList<ChannelDesc> *ch, QSize size, QString src, const QString &charset ) +ScanDialog::ScanDialog( TQPtrList<DvbStream> *d, TQPtrList<ChannelDesc> *ch, TQSize size, TQString src, const TQString &charset ) { - QString s; + TQString s; int i, j; - QStringList list, tmp; + TQStringList list, tmp; KIconLoader *icon = new KIconLoader(); tvPix = icon->loadIcon( "kdvbtv", KIcon::Small ); @@ -71,7 +71,7 @@ ScanDialog::ScanDialog( QPtrList<DvbStream> *d, QPtrList<ChannelDesc> *ch, QSize tmp = dvb->at(i)->getSources( true ); for ( j=0; j<(int)tmp.count(); j++ ) { if ( tmp[j].startsWith( "AUTO" ) ) - list.append( QString("AUTO(%1:%2)").arg(dvb->at(i)->getAdapter()).arg(dvb->at(i)->getTuner()) ); + list.append( TQString("AUTO(%1:%2)").tqarg(dvb->at(i)->getAdapter()).tqarg(dvb->at(i)->getTuner()) ); else list.append( tmp[j] ); } @@ -82,42 +82,42 @@ ScanDialog::ScanDialog( QPtrList<DvbStream> *d, QPtrList<ChannelDesc> *ch, QSize transponders.setAutoDelete( true ); - QGridLayout *statLayout = new QGridLayout( statusFrame, 1, 1, 11, 6 ); + TQGridLayout *statLayout = new TQGridLayout( statusFrame, 1, 1, 11, 6 ); - QLabel *lab = new QLabel( i18n("Signal:"), statusFrame ); + TQLabel *lab = new TQLabel( i18n("Signal:"), statusFrame ); statLayout->addWidget( lab, 0, 0 ); signal = new KGradProgress( statusFrame ); statLayout->addWidget( signal, 0, 1 ); - lab = new QLabel( i18n("SNR:"), statusFrame ); + lab = new TQLabel( i18n("SNR:"), statusFrame ); statLayout->addWidget( lab, 1, 0 ); snr = new KGradProgress( statusFrame ); statLayout->addWidget( snr, 1, 1 ); - lab = new QLabel( i18n("Tuned:"), statusFrame ); + lab = new TQLabel( i18n("Tuned:"), statusFrame ); statLayout->addWidget( lab, 2, 0 ); lock = new KLed( statusFrame, "lockLed" ); lock->setState( KLed::Off ); lock->setDarkFactor( 500 ); statLayout->addWidget( lock, 2, 1 ); - progress = new QProgressBar( 100, statusFrame ); + progress = new TQProgressBar( 100, statusFrame ); progress->setIndicatorFollowsStyle( false ); progress->setProgress( 0 ); statLayout->addMultiCellWidget( progress, 3, 3, 0, 1 ); - progressLab = new QLabel( statusFrame ); + progressLab = new TQLabel( statusFrame ); statLayout->addMultiCellWidget( progressLab, 4, 4, 0, 1 ); channelsList->clear(); foundList->clear(); foundList->setAllColumnsShowFocus( true ); - foundList->setSelectionMode( QListView::Extended ); + foundList->setSelectionMode( TQListView::Extended ); channelsList->setSorting( 1 ); // sort by source 1st than channel name channelsList->setAllColumnsShowFocus( true ); - channelsList->setSelectionMode( QListView::Extended ); + channelsList->setSelectionMode( TQListView::Extended ); ChannelDesc *chan; - QListViewItem *it; + TQListViewItem *it; for ( int i=0; i<(int)chandesc->count(); i++ ) { chan = chandesc->at(i); - it = new QListViewItem( channelsList, chan->name, chan->tp.source ); + it = new TQListViewItem( channelsList, chan->name, chan->tp.source ); if ( !chan->pix.isNull() ) it->setPixmap( 0, chan->pix ); else { @@ -136,9 +136,9 @@ ScanDialog::ScanDialog( QPtrList<DvbStream> *d, QPtrList<ChannelDesc> *ch, QSize } } - startBtn->setPaletteForegroundColor( QColor(255,0,0) ); + startBtn->setPaletteForegroundColor( TQColor(255,0,0) ); - connect( searchComb, SIGNAL(activated(int)), this, SLOT(setDvb(int)) ); + connect( searchComb, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDvb(int)) ); ds = dvb->at(0); ds->setScanning( true ); @@ -148,25 +148,25 @@ ScanDialog::ScanDialog( QPtrList<DvbStream> *d, QPtrList<ChannelDesc> *ch, QSize offsetGroup->hide(); bool ok=false; dvbsi = new DVBsi( &ok, ds->getAdapter(), ds->getTuner(), ds, defaultCharset ); - connect( ds, SIGNAL(snrStatus(int)), snr, SLOT(setProgress(int)) ); - connect( ds, SIGNAL(signalStatus(int)), signal, SLOT(setProgress(int)) ); - connect( ds, SIGNAL(lockStatus(bool)), this, SLOT(setLock(bool)) ); - connect( dvbsi, SIGNAL(end(bool)), this, SLOT(siEnded(bool)) ); - - connect( &checkTimer, SIGNAL( timeout() ), this, SLOT( checkNewChannel() ) ); - connect( &progressTimer, SIGNAL( timeout() ), this, SLOT( setProgress() ) ); - connect( startBtn, SIGNAL(toggled(bool)), this, SLOT(scan(bool)) ); - connect( addfilteredBtn, SIGNAL(clicked()), this, SLOT(addFiltered()) ); - connect( addselectedBtn, SIGNAL(clicked()), this, SLOT(addSelected()) ); - connect( channelsList, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)), this, SLOT(pop(QListViewItem*,const QPoint&,int)) ); - connect( channelsList, SIGNAL(doubleClicked(QListViewItem*,const QPoint &,int)), this, SLOT( slotChannelChanged(QListViewItem*,const QPoint &,int) ) ); - connect( newBtn, SIGNAL(clicked()), this, SLOT(newChannel()) ); - connect( delBtn, SIGNAL(clicked()), this, SLOT(deleteAll()) ); - connect( selectallBtn, SIGNAL(clicked()), this, SLOT(selectAll()) ); - - QAccel *ac = new QAccel( channelsList ); + connect( ds, TQT_SIGNAL(snrtqStatus(int)), snr, TQT_SLOT(setProgress(int)) ); + connect( ds, TQT_SIGNAL(signaltqStatus(int)), signal, TQT_SLOT(setProgress(int)) ); + connect( ds, TQT_SIGNAL(locktqStatus(bool)), this, TQT_SLOT(setLock(bool)) ); + connect( dvbsi, TQT_SIGNAL(end(bool)), this, TQT_SLOT(siEnded(bool)) ); + + connect( &checkTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( checkNewChannel() ) ); + connect( &progressTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( setProgress() ) ); + connect( startBtn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(scan(bool)) ); + connect( addfilteredBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addFiltered()) ); + connect( addselectedBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addSelected()) ); + connect( channelsList, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(pop(TQListViewItem*,const TQPoint&,int)) ); + connect( channelsList, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint &,int)), this, TQT_SLOT( slotChannelChanged(TQListViewItem*,const TQPoint &,int) ) ); + connect( newBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(newChannel()) ); + connect( delBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteAll()) ); + connect( selectallBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectAll()) ); + + TQAccel *ac = new TQAccel( channelsList ); ac->insertItem( Key_Delete, 100 ); - ac->connectItem( 100, this, SLOT(deleteChannel()) ); + ac->connectItem( 100, this, TQT_SLOT(deleteChannel()) ); resize( size ); delete icon; @@ -181,12 +181,12 @@ void ScanDialog::selectAll() -void ScanDialog::slotChannelChanged( QListViewItem *_channel, const QPoint &, int ) +void ScanDialog::slotChannelChanged( TQListViewItem *_channel, const TQPoint &, int ) { if ( !_channel ) return; - QPixmap pix; - QString s = _channel->text(0); + TQPixmap pix; + TQString s = _channel->text(0); if ( edit( s, pix ) ) { _channel->setText( 0, s ); _channel->setPixmap( 0, pix ); @@ -198,7 +198,7 @@ void ScanDialog::slotChannelChanged( QListViewItem *_channel, const QPoint &, in void ScanDialog::setDvb( int index ) { int i, pos=0; - QStringList list; + TQStringList list; bool ok=false; for ( i=0; i<(int)dvb->count(); i++ ) { @@ -209,20 +209,20 @@ void ScanDialog::setDvb( int index ) checkTimer.stop(); if ( progressTimer.isActive() ) progressTimer.stop(); - disconnect( ds, SIGNAL(snrStatus(int)), snr, SLOT(setProgress(int)) ); - disconnect( ds, SIGNAL(signalStatus(int)), signal, SLOT(setProgress(int)) ); - disconnect( ds, SIGNAL(lockStatus(bool)), this, SLOT(setLock(bool)) ); - disconnect( dvbsi, SIGNAL(end(bool)), this, SLOT(siEnded(bool)) ); + disconnect( ds, TQT_SIGNAL(snrtqStatus(int)), snr, TQT_SLOT(setProgress(int)) ); + disconnect( ds, TQT_SIGNAL(signaltqStatus(int)), signal, TQT_SLOT(setProgress(int)) ); + disconnect( ds, TQT_SIGNAL(locktqStatus(bool)), this, TQT_SLOT(setLock(bool)) ); + disconnect( dvbsi, TQT_SIGNAL(end(bool)), this, TQT_SLOT(siEnded(bool)) ); ds->setScanning( false ); dvbsi->stop(); delete dvbsi; ds = dvb->at(i); ds->setScanning( true ); dvbsi = new DVBsi( &ok, ds->getAdapter(), ds->getTuner(), ds, defaultCharset ); - connect( ds, SIGNAL(snrStatus(int)), snr, SLOT(setProgress(int)) ); - connect( ds, SIGNAL(signalStatus(int)), signal, SLOT(setProgress(int)) ); - connect( ds, SIGNAL(lockStatus(bool)), this, SLOT(setLock(bool)) ); - connect( dvbsi, SIGNAL(end(bool)), this, SLOT(siEnded(bool)) ); + connect( ds, TQT_SIGNAL(snrtqStatus(int)), snr, TQT_SLOT(setProgress(int)) ); + connect( ds, TQT_SIGNAL(signaltqStatus(int)), signal, TQT_SLOT(setProgress(int)) ); + connect( ds, TQT_SIGNAL(locktqStatus(bool)), this, TQT_SLOT(setLock(bool)) ); + connect( dvbsi, TQT_SIGNAL(end(bool)), this, TQT_SLOT(siEnded(bool)) ); break; } } @@ -234,22 +234,22 @@ void ScanDialog::setDvb( int index ) -void ScanDialog::pop( QListViewItem *it, const QPoint &pos, int col ) +void ScanDialog::pop( TQListViewItem *it, const TQPoint &pos, int col ) { - QPoint p=pos; + TQPoint p=pos; if ( !it ) return; int i=col; - QPixmap pix; - QString s = it->text(0); + TQPixmap pix; + TQString s = it->text(0); - QPopupMenu *pop = new QPopupMenu(); + TQPopupMenu *pop = new TQPopupMenu(); pop->insertItem( i18n("Edit..."), 1 ); pop->insertItem( i18n("Delete"), 2 ); i = 0; - i = pop->exec( QCursor::pos() ); + i = pop->exec( TQCursor::pos() ); switch ( i ) { case 0 : break; @@ -270,17 +270,17 @@ void ScanDialog::pop( QListViewItem *it, const QPoint &pos, int col ) void ScanDialog::deleteChannel() { - QListViewItem *it = channelsList->currentItem(); + TQListViewItem *it = channelsList->currentItem(); if ( it ) deleteChannel( it->text(0) ); } -void ScanDialog::deleteChannel( QString name ) +void ScanDialog::deleteChannel( TQString name ) { int j, i; - QListViewItem *it; + TQListViewItem *it; for ( j=0; j<(int)chandesc->count(); j++ ) { if ( chandesc->at(j)->name==name ) { @@ -311,7 +311,7 @@ void ScanDialog::deleteChannel( QString name ) void ScanDialog::newChannel() { ChannelDesc chan; - QStringList list; + TQStringList list; //int i; //for ( i=0; i<(int)searchComb->count(); i++ ) list.append( searchComb->text(i) ); @@ -330,7 +330,7 @@ void ScanDialog::newChannel() chandesc->remove(); if ( ret==ChannelEditor::Accepted ) { chandesc->append( new ChannelDesc( chan ) ); - QListViewItem *it = new QListViewItem( channelsList, chan.name ); + TQListViewItem *it = new TQListViewItem( channelsList, chan.name ); if ( chan.type==1 ) { if ( chan.fta ) it->setPixmap( 0, tvcPix ); @@ -365,11 +365,11 @@ void ScanDialog::deleteAll() -bool ScanDialog::edit( QString &name, QPixmap &pix ) +bool ScanDialog::edit( TQString &name, TQPixmap &pix ) { int j; ChannelDesc *chan=0; - QStringList list, tmp; + TQStringList list, tmp; int i; for ( i=0; i<(int)dvb->count(); i++ ) { @@ -410,15 +410,15 @@ bool ScanDialog::edit( QString &name, QPixmap &pix ) -void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) +void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src ) { Transponder *trans; - QString t; + TQString t; int pos; s = s.stripWhiteSpace(); trans = new Transponder(); - pos = s.find(" "); + pos = s.tqfind(" "); if ( s.left(pos)=="T" ) { trans->type=FE_OFDM; trans->source = "Terrestrial"; @@ -441,17 +441,17 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) } s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); trans->freq = s.left(pos).toULong()/1000; s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); if ( trans->type!=FE_ATSC ) - pos = s.find(" "); + pos = s.tqfind(" "); if ( trans->type==FE_QPSK ) { trans->pol = s.left(pos).lower()[0].latin1(); s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); } if ( trans->type!=FE_OFDM && trans->type!=FE_ATSC ) { trans->sr = s.left(pos).toULong()/1000; @@ -489,7 +489,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); if ( s.left(pos)=="1/2" ) trans->coderateH = FEC_1_2; else if ( s.left(pos)=="2/3" ) @@ -512,7 +512,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) trans->coderateH = FEC_AUTO; s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); if ( trans->type==FE_OFDM ) { if ( s.left(pos)=="1/2" ) trans->coderateL = FEC_1_2; @@ -542,7 +542,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); } if ( trans->type!=FE_QPSK ) { if ( s.left(pos)=="QPSK" ) @@ -563,7 +563,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) if ( trans->type==FE_OFDM ) { s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); if ( s.left(pos)=="8k" ) trans->transmission = TRANSMISSION_MODE_8K; else if ( s.left(pos)=="2k" ) @@ -573,7 +573,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); if ( s.left(pos)=="1/32" ) trans->guard = GUARD_INTERVAL_1_32; else if ( s.left(pos)=="1/16" ) @@ -587,7 +587,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) s = s.right( s.length()-pos-1 ); s = s.stripWhiteSpace(); - pos = s.find(" "); + pos = s.tqfind(" "); if ( s.left(pos)=="1" ) trans->hierarchy = HIERARCHY_1; else if ( s.left(pos)=="2" ) @@ -606,7 +606,7 @@ void ScanDialog::parseTp( QString s, fe_type_t type, QString src ) bool ScanDialog::getTransData() { - QString s=sourcesPath; + TQString s=sourcesPath; transponders.clear(); @@ -614,25 +614,25 @@ bool ScanDialog::getTransData() int i; for ( i=177; i<227; i+=7 ) { if ( offset07->isChecked() ) { - s = QString("T %1 7MHz AUTO AUTO AUTO AUTO AUTO AUTO").arg( (i*1000000)+500000 ); + s = TQString("T %1 7MHz AUTO AUTO AUTO AUTO AUTO AUTO").tqarg( (i*1000000)+500000 ); parseTp( s, ds->getType(), "" ); } if ( offset125p->isChecked() ) { - s = QString("T %1 7MHz AUTO AUTO AUTO AUTO AUTO AUTO").arg( (i*1000000)+500000+125000 ); + s = TQString("T %1 7MHz AUTO AUTO AUTO AUTO AUTO AUTO").tqarg( (i*1000000)+500000+125000 ); parseTp( s, ds->getType(), "" ); } } for ( i=474; i<859; i+=8 ) { if ( offset167m->isChecked() ) { - s = QString("T %1 8MHz AUTO AUTO AUTO AUTO AUTO AUTO").arg( (i*1000000)-167000 ); + s = TQString("T %1 8MHz AUTO AUTO AUTO AUTO AUTO AUTO").tqarg( (i*1000000)-167000 ); parseTp( s, ds->getType(), "" ); } if ( offset0->isChecked() ) { - s = QString("T %1 8MHz AUTO AUTO AUTO AUTO AUTO AUTO").arg( i*1000000 ); + s = TQString("T %1 8MHz AUTO AUTO AUTO AUTO AUTO AUTO").tqarg( i*1000000 ); parseTp( s, ds->getType(), "" ); } if ( offset167p->isChecked() ) { - s = QString("T %1 8MHz AUTO AUTO AUTO AUTO AUTO AUTO").arg( (i*1000000)+167000 ); + s = TQString("T %1 8MHz AUTO AUTO AUTO AUTO AUTO AUTO").tqarg( (i*1000000)+167000 ); parseTp( s, ds->getType(), "" ); } } @@ -648,9 +648,9 @@ bool ScanDialog::getTransData() return false; } s += searchComb->currentText(); - QFile f( s ); + TQFile f( s ); if ( f.open(IO_ReadOnly) ) { - QTextStream tt( &f ); + TQTextStream tt( &f ); while ( !tt.eof() ) { s = tt.readLine(); if ( s.startsWith("#") ) @@ -670,7 +670,7 @@ bool ScanDialog::getTransData() void ScanDialog::checkDuplicateName( ChannelDesc *chan ) { - QString org, name; + TQString org, name; int i, j=1; bool loop; @@ -680,7 +680,7 @@ void ScanDialog::checkDuplicateName( ChannelDesc *chan ) loop = false; for ( i=0; i<(int)chandesc->count(); i++ ) { if ( name==chandesc->at(i)->name ) { - name = org+"-"+QString().setNum(j); + name = org+"-"+TQString().setNum(j); loop = true; ++j; break; @@ -724,7 +724,7 @@ bool ScanDialog::checkChannUpdate( ChannelDesc *chan ) break; } } - chandesc->replace(i,new ChannelDesc(*chan)); + chandesc->tqreplace(i,new ChannelDesc(*chan)); return false; } } @@ -736,7 +736,7 @@ void ScanDialog::addSelected() { ChannelDesc *chan; DListViewItem *dit, *odit; - QListViewItem *it; + TQListViewItem *it; dit = (DListViewItem*)foundList->firstChild(); while( dit ) { @@ -757,7 +757,7 @@ void ScanDialog::addSelected() chan->num = chandesc->count()+1; } chandesc->append( new ChannelDesc( *chan ) ); - it = new QListViewItem( channelsList, chan->name ); + it = new TQListViewItem( channelsList, chan->name ); if ( chan->type==1 ) { if ( chan->fta ) it->setPixmap( 0, tvcPix ); @@ -795,7 +795,7 @@ void ScanDialog::working( bool b ) void ScanDialog::addFiltered() { ChannelDesc *chan; - QListViewItem *it; + TQListViewItem *it; DListViewItem *dit, *odit; int m = dvbsi->channels.count(); int t=0; @@ -803,7 +803,7 @@ void ScanDialog::addFiltered() working( true ); startBtn->setEnabled( false ); progress->setProgress(0); - qApp->processEvents(); + tqApp->processEvents(); dit = (DListViewItem*)foundList->firstChild(); while( dit ) { @@ -863,7 +863,7 @@ void ScanDialog::addFiltered() chan->num = chandesc->count()+1; chandesc->append( new ChannelDesc( *chan ) ); - it = new QListViewItem( channelsList, chan->name ); + it = new TQListViewItem( channelsList, chan->name ); if ( chan->type==1 ) { if ( chan->fta ) it->setPixmap( 0, tvcPix ); @@ -902,7 +902,7 @@ void ScanDialog::siEnded( bool b ) startBtn->setOn( !b ); working( false ); startBtn->setText( i18n("START scan") ); - startBtn->setPaletteForegroundColor( QColor(255,0,0) ); + startBtn->setPaletteForegroundColor( TQColor(255,0,0) ); } @@ -929,14 +929,14 @@ void ScanDialog::scan( bool b ) progressTimer.start( 1000 ); working( true ); startBtn->setText( i18n("STOP scan") ); - startBtn->setPaletteForegroundColor( QColor(0,255,0) ); + startBtn->setPaletteForegroundColor( TQColor(0,255,0) ); searchComb->setEnabled( false ); } else { - //setCursor(QCursor(Qt::WaitCursor)); + //setCursor(TQCursor(TQt::WaitCursor)); startBtn->setText( i18n("Stopping...") ); startBtn->setEnabled( false ); - qApp->processEvents(); + tqApp->processEvents(); dvbsi->stop(); checkTimer.stop(); progressTimer.stop(); @@ -946,10 +946,10 @@ void ScanDialog::scan( bool b ) setLock( false ); progress->setProgress( 0 ); working( false ); - //setCursor(QCursor(Qt::ArrowCursor)); + //setCursor(TQCursor(TQt::ArrowCursor)); startBtn->setText( i18n("START scan") ); startBtn->setEnabled( true ); - startBtn->setPaletteForegroundColor( QColor(255,0,0) ); + startBtn->setPaletteForegroundColor( TQColor(255,0,0) ); searchComb->setEnabled( true ); } } @@ -1010,7 +1010,7 @@ void ScanDialog::addFound( ChannelDesc *chan, bool scan ) int i; DListViewItem *it; - it = new DListViewItem( foundList, chan, QString( "%1").arg( chan->tp.snr ), chan->name ); + it = new DListViewItem( foundList, chan, TQString( "%1").tqarg( chan->tp.snr ), chan->name ); if ( chan->type==1 ) { if ( scan ) @@ -1030,7 +1030,7 @@ void ScanDialog::addFound( ChannelDesc *chan, bool scan ) } if ( scan ) - progressLab->setText( QString( i18n("Found: %1 TV - %2 radio") ).arg(ntv).arg(nradio) ); + progressLab->setText( TQString( i18n("Found: %1 TV - %2 radio") ).tqarg(ntv).tqarg(nradio) ); if ( chan->provider.isEmpty() ) return; for ( i=0; i<providerComb->count(); i++ ) { diff --git a/kaffeine/src/input/dvb/scandialog.h b/kaffeine/src/input/dvb/scandialog.h index b73e6d2..d4eb034 100644 --- a/kaffeine/src/input/dvb/scandialog.h +++ b/kaffeine/src/input/dvb/scandialog.h @@ -21,9 +21,9 @@ #ifndef SCANDIALOG_H #define SCANDIALOG_H -#include <qtimer.h> -#include <qprogressbar.h> -#include <qlabel.h> +#include <tqtimer.h> +#include <tqprogressbar.h> +#include <tqlabel.h> #include <kled.h> @@ -36,12 +36,12 @@ class DvbStream; -class DListViewItem : public QListViewItem +class DListViewItem : public TQListViewItem { public: - DListViewItem( QListView *parent, ChannelDesc *desc, QString label1, QString label2 ); + DListViewItem( TQListView *tqparent, ChannelDesc *desc, TQString label1, TQString label2 ); ChannelDesc *chan; }; @@ -51,14 +51,15 @@ public: class ScanDialog : public ScanDialogUI { Q_OBJECT + TQ_OBJECT public: - ScanDialog( QPtrList<DvbStream> *d, QPtrList<ChannelDesc> *ch, QSize size, QString src, const QString &charset ); + ScanDialog( TQPtrList<DvbStream> *d, TQPtrList<ChannelDesc> *ch, TQSize size, TQString src, const TQString &charset ); ~ScanDialog(); - QPtrList<Transponder> transponders; - QPtrList<ChannelDesc> *chandesc; + TQPtrList<Transponder> transponders; + TQPtrList<ChannelDesc> *chandesc; private slots: @@ -69,38 +70,38 @@ private slots: void addFiltered(); void addSelected(); void setProgress(); - void pop( QListViewItem *it, const QPoint &pos, int col ); + void pop( TQListViewItem *it, const TQPoint &pos, int col ); void deleteAll(); void selectAll(); void newChannel(); - void deleteChannel( QString name ); + void deleteChannel( TQString name ); void deleteChannel(); void setDvb(int); - void slotChannelChanged( QListViewItem*, const QPoint &, int ); + void slotChannelChanged( TQListViewItem*, const TQPoint &, int ); private: bool getTransData(); - bool edit( QString &name, QPixmap &pix ); + bool edit( TQString &name, TQPixmap &pix ); void working( bool b ); - void parseTp( QString s, fe_type_t type, QString src ); + void parseTp( TQString s, fe_type_t type, TQString src ); void addFound( ChannelDesc *chan, bool scan ); void checkDuplicateName( ChannelDesc *chan ); bool checkChannUpdate( ChannelDesc *chan ); - QPtrList<DvbStream> *dvb; + TQPtrList<DvbStream> *dvb; DvbStream *ds; KGradProgress *snr, *signal; - QProgressBar *progress; + TQProgressBar *progress; KLed *lock; DVBsi *dvbsi; - QTimer checkTimer, progressTimer; + TQTimer checkTimer, progressTimer; int nChannels; - QPixmap tvPix, raPix, tvcPix, racPix; + TQPixmap tvPix, raPix, tvcPix, racPix; int ntv, nradio; - QLabel *progressLab; - QString sourcesPath; - QString defaultCharset; + TQLabel *progressLab; + TQString sourcesPath; + TQString defaultCharset; }; #endif /* SCANDIALOG_H */ diff --git a/kaffeine/src/input/dvb/scandialogui.ui b/kaffeine/src/input/dvb/scandialogui.ui index cdc1059..8dea923 100644 --- a/kaffeine/src/input/dvb/scandialogui.ui +++ b/kaffeine/src/input/dvb/scandialogui.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ScanDialogUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>ScanDialogUI</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,23 +19,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox10</cstring> </property> @@ -46,7 +46,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -54,7 +54,7 @@ <string>(Right click to edit/delete)</string> </property> </widget> - <widget class="QListView" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQListView" row="1" column="0" rowspan="1" colspan="3"> <column> <property name="text"> <string>Name</string> @@ -92,7 +92,7 @@ <bool>false</bool> </property> </widget> - <widget class="QPushButton" row="2" column="0"> + <widget class="TQPushButton" row="2" column="0"> <property name="name"> <cstring>newBtn</cstring> </property> @@ -100,7 +100,7 @@ <string>New...</string> </property> </widget> - <widget class="QPushButton" row="2" column="2"> + <widget class="TQPushButton" row="2" column="2"> <property name="name"> <cstring>delBtn</cstring> </property> @@ -118,7 +118,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -127,15 +127,15 @@ </spacer> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>searchGroup</cstring> </property> @@ -146,12 +146,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="0" column="0"> + <widget class="TQComboBox" row="0" column="0"> <property name="name"> <cstring>searchComb</cstring> </property> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>offsetGroup</cstring> </property> @@ -162,7 +162,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="3"> + <widget class="TQCheckBox" row="1" column="3"> <property name="name"> <cstring>offset167m</cstring> </property> @@ -170,7 +170,7 @@ <string>-167</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -178,7 +178,7 @@ <string>(7MHz)</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -186,7 +186,7 @@ <string>(8MHz)</string> </property> </widget> - <widget class="QCheckBox" row="1" column="2"> + <widget class="TQCheckBox" row="1" column="2"> <property name="name"> <cstring>offset167p</cstring> </property> @@ -194,7 +194,7 @@ <string>+167</string> </property> </widget> - <widget class="QCheckBox" row="0" column="2" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>offset125p</cstring> </property> @@ -202,7 +202,7 @@ <string>+125</string> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>offset0</cstring> </property> @@ -213,7 +213,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>offset07</cstring> </property> @@ -228,7 +228,7 @@ </widget> </grid> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>startBtn</cstring> </property> @@ -257,14 +257,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>18</height> </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>statusFrame</cstring> </property> @@ -282,14 +282,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>19</height> </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>filtersGroup</cstring> </property> @@ -300,7 +300,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>radioCb</cstring> </property> @@ -316,7 +316,7 @@ <string>Radio</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>tvCb</cstring> </property> @@ -332,7 +332,7 @@ <string>TV</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>providerCb</cstring> </property> @@ -348,7 +348,7 @@ <string>Provider:</string> </property> </widget> - <widget class="QComboBox" row="3" column="1"> + <widget class="TQComboBox" row="3" column="1"> <property name="name"> <cstring>providerComb</cstring> </property> @@ -361,7 +361,7 @@ </sizepolicy> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>ftaCb</cstring> </property> @@ -379,7 +379,7 @@ </widget> </grid> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addselectedBtn</cstring> </property> @@ -395,7 +395,7 @@ <string><< Add Selected</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addfilteredBtn</cstring> </property> @@ -413,7 +413,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox11</cstring> </property> @@ -424,7 +424,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView" row="0" column="0"> + <widget class="TQListView" row="0" column="0"> <column> <property name="text"> <string>SNR</string> @@ -459,7 +459,7 @@ </sizepolicy> </property> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>selectallBtn</cstring> </property> @@ -485,9 +485,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -503,14 +503,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okBtn</cstring> </property> @@ -544,5 +544,5 @@ <tabstop>addselectedBtn</tabstop> <tabstop>addfilteredBtn</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/sender.cpp b/kaffeine/src/input/dvb/sender.cpp index 27e5d9d..f829f1a 100644 --- a/kaffeine/src/input/dvb/sender.cpp +++ b/kaffeine/src/input/dvb/sender.cpp @@ -34,7 +34,7 @@ Sender::Sender() -bool Sender::makeSenderSocket( const QString &addr, int m_senderPort ) +bool Sender::makeSenderSocket( const TQString &addr, int m_senderPort ) { int sockopt=1; diff --git a/kaffeine/src/input/dvb/sender.h b/kaffeine/src/input/dvb/sender.h index 22e3a08..d41584a 100644 --- a/kaffeine/src/input/dvb/sender.h +++ b/kaffeine/src/input/dvb/sender.h @@ -26,13 +26,13 @@ #include <arpa/inet.h> #include <unistd.h> -#include <qthread.h> -#include <qstring.h> -#include <qobject.h> +#include <tqthread.h> +#include <tqstring.h> +#include <tqobject.h> -class Sender : public QThread, public QObject +class Sender : public TQThread, public TQObject { public: @@ -48,11 +48,11 @@ public: protected: - bool makeSenderSocket( const QString &addr, int m_senderPort ); + bool makeSenderSocket( const TQString &addr, int m_senderPort ); void closeSender(); bool isRunning; - QString sendList; + TQString sendList; }; diff --git a/kaffeine/src/input/dvb/subeditor.cpp b/kaffeine/src/input/dvb/subeditor.cpp index 1863606..314cb29 100644 --- a/kaffeine/src/input/dvb/subeditor.cpp +++ b/kaffeine/src/input/dvb/subeditor.cpp @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qlistbox.h> -#include <qspinbox.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlistbox.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kmessagebox.h> #include <klocale.h> @@ -31,9 +31,9 @@ -SubEditor::SubEditor( ChannelDesc *chan, QWidget *parent ) : SubEditorUI( parent ) +SubEditor::SubEditor( ChannelDesc *chan, TQWidget *tqparent ) : SubEditorUI( tqparent ) { - QString s, t; + TQString s, t; int i; channel = chan; @@ -43,19 +43,19 @@ SubEditor::SubEditor( ChannelDesc *chan, QWidget *parent ) : SubEditorUI( parent if ( channel->nsubpid==channel->maxsubpid ) newBtn->setEnabled( false ); - connect( pidList, SIGNAL(highlighted(int)), this, SLOT(showProp(int)) ); - connect( upBtn, SIGNAL(clicked()), this, SLOT(itemUp()) ); - connect( downBtn, SIGNAL(clicked()), this, SLOT(itemDown()) ); - connect( delBtn, SIGNAL(clicked()), this, SLOT(itemDelete()) ); - connect( updateBtn, SIGNAL(clicked()), this, SLOT(itemUpdate()) ); - connect( newBtn, SIGNAL(clicked()), this, SLOT(itemNew()) ); + connect( pidList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(showProp(int)) ); + connect( upBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemUp()) ); + connect( downBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemDown()) ); + connect( delBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemDelete()) ); + connect( updateBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemUpdate()) ); + connect( newBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(itemNew()) ); } void SubEditor::insertItem( int index, bool updt ) { - QString s, t; + TQString s, t; s = t.setNum( channel->subpid[index].pid ); s = s+"("+t.setNum( channel->subpid[index].page )+")"; diff --git a/kaffeine/src/input/dvb/subeditor.h b/kaffeine/src/input/dvb/subeditor.h index 0a2b332..8b2c57c 100644 --- a/kaffeine/src/input/dvb/subeditor.h +++ b/kaffeine/src/input/dvb/subeditor.h @@ -29,10 +29,11 @@ class SubEditor : public SubEditorUI { Q_OBJECT + TQ_OBJECT public: - SubEditor( ChannelDesc *chan, QWidget *parent ); + SubEditor( ChannelDesc *chan, TQWidget *tqparent ); ~SubEditor(); private slots: diff --git a/kaffeine/src/input/dvb/subeditorui.ui b/kaffeine/src/input/dvb/subeditorui.ui index 790b089..9fe1eca 100644 --- a/kaffeine/src/input/dvb/subeditorui.ui +++ b/kaffeine/src/input/dvb/subeditorui.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SubEditorUI</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SubEditorUI</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -33,9 +33,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> @@ -51,14 +51,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>okBtn</cstring> </property> @@ -68,15 +68,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox10</cstring> </property> @@ -87,7 +87,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox" row="0" column="0"> + <widget class="TQListBox" row="0" column="0"> <item> <property name="text"> <string>New Item</string> @@ -99,31 +99,31 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>upBtn</cstring> </property> @@ -131,7 +131,7 @@ <string>Move Up</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>downBtn</cstring> </property> @@ -139,7 +139,7 @@ <string>Move Down</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>delBtn</cstring> </property> @@ -159,7 +159,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -178,30 +178,30 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>180</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>updateBtn</cstring> </property> @@ -209,7 +209,7 @@ <string><< Update Selected</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>newBtn</cstring> </property> @@ -219,7 +219,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox9</cstring> </property> @@ -230,15 +230,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -246,7 +246,7 @@ <string>Pid:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -254,7 +254,7 @@ <string>Page:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -262,7 +262,7 @@ <string>Sub page:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -272,15 +272,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>pidSpin</cstring> </property> @@ -288,7 +288,7 @@ <number>8191</number> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>pageSpin</cstring> </property> @@ -296,7 +296,7 @@ <number>99999</number> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>ancSpin</cstring> </property> @@ -304,7 +304,7 @@ <number>99999</number> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>langLe</cstring> </property> @@ -350,5 +350,5 @@ <tabstop>ancSpin</tabstop> <tabstop>langLe</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kaffeine/src/input/dvb/ts2rtp.cpp b/kaffeine/src/input/dvb/ts2rtp.cpp index 4784122..24ce175 100644 --- a/kaffeine/src/input/dvb/ts2rtp.cpp +++ b/kaffeine/src/input/dvb/ts2rtp.cpp @@ -65,7 +65,7 @@ Ts2Rtp::Ts2Rtp() psiBufferSize = 20*TS_SIZE; psiBuffer = (unsigned char*)malloc(psiBufferSize); - connect( &psiTimer, SIGNAL(timeout()), this, SLOT(setPSI()) ); + connect( &psiTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setPSI()) ); } @@ -81,7 +81,7 @@ Ts2Rtp::~Ts2Rtp() -void Ts2Rtp::setSocket( const QString &addr, int m_port, int m_senderPort ) +void Ts2Rtp::setSocket( const TQString &addr, int m_port, int m_senderPort ) { address = addr; port = m_port; @@ -90,11 +90,11 @@ void Ts2Rtp::setSocket( const QString &addr, int m_port, int m_senderPort ) -bool Ts2Rtp::addChannels( QPtrList<ChannelDesc> *channels ) +bool Ts2Rtp::addChannels( TQPtrList<ChannelDesc> *channels ) { int i, j, k, pmtpid=8191; ChannelDesc *desc, *d; - QValueList<int> pids; + TQValueList<int> pids; if ( !rtpSocket && !makeSocket() ) return false; @@ -102,16 +102,16 @@ bool Ts2Rtp::addChannels( QPtrList<ChannelDesc> *channels ) sendList = ""; for ( i=0; i<(int)channels->count(); i++ ) { desc = channels->at( i ); - sendList = sendList+desc->name+"|"+QString().setNum(desc->vpid)+"|"+QString().setNum(desc->apid[0].pid)+"|"; + sendList = sendList+desc->name+"|"+TQString().setNum(desc->vpid)+"|"+TQString().setNum(desc->apid[0].pid)+"|"; if ( desc->apid[0].ac3 ) sendList+= "y|"; else sendList+= "n|"; - sendList+= QString().setNum(desc->subpid[0].pid); + sendList+= TQString().setNum(desc->subpid[0].pid); sendList+= "|"; - sendList+= QString().setNum(desc->subpid[0].page); + sendList+= TQString().setNum(desc->subpid[0].page); sendList+= "|"; - sendList+= QString().setNum(desc->subpid[0].id); + sendList+= TQString().setNum(desc->subpid[0].id); sendList+= "|"; - sendList+= QString().setNum(desc->subpid[0].type); + sendList+= TQString().setNum(desc->subpid[0].type); sendList+= "|"; sendList+= desc->subpid[0].lang+"|"; for ( j=i; j<(int)channels->count(); j++ ) { @@ -123,7 +123,7 @@ bool Ts2Rtp::addChannels( QPtrList<ChannelDesc> *channels ) pids.append( d->apid[k].pid ); for ( k=0; k<d->nsubpid && k<MAX_DVBSUB; k++ ) pids.append( d->subpid[k].pid ); - while ( pmtpid==17 || pids.contains( pmtpid ) ) + while ( pmtpid==17 || pids.tqcontains( pmtpid ) ) --pmtpid; } desc->pmtpid = pmtpid--; @@ -261,7 +261,7 @@ void Ts2Rtp::setPSI() } -void Ts2Rtp::psiTables( QPtrList<ChannelDesc> *channels ) +void Ts2Rtp::psiTables( TQPtrList<ChannelDesc> *channels ) { unsigned char buf[15000]; int off, i, j, sectionOff, loopOff, descOff, max; diff --git a/kaffeine/src/input/dvb/ts2rtp.h b/kaffeine/src/input/dvb/ts2rtp.h index 36165e9..57ff246 100644 --- a/kaffeine/src/input/dvb/ts2rtp.h +++ b/kaffeine/src/input/dvb/ts2rtp.h @@ -31,8 +31,8 @@ #include <sys/socket.h> #include <arpa/inet.h> -#include <qptrlist.h> -#include <qtimer.h> +#include <tqptrlist.h> +#include <tqtimer.h> #include "sender.h" @@ -61,12 +61,13 @@ struct rtpheader { /* in network byte order */ class Ts2Rtp : public Sender { Q_OBJECT + TQ_OBJECT public: Ts2Rtp(); ~Ts2Rtp(); - void setSocket( const QString &addr, int m_port, int m_senderPort ); - bool addChannels( QPtrList<ChannelDesc> *channels ); + void setSocket( const TQString &addr, int m_port, int m_senderPort ); + bool addChannels( TQPtrList<ChannelDesc> *channels ); void removeChannels(); void process( unsigned char *buf, int size ); @@ -74,14 +75,14 @@ private: bool makeSocket(); void sendrtp( char *data, int len ); - void psiTables( QPtrList<ChannelDesc> *channels ); + void psiTables( TQPtrList<ChannelDesc> *channels ); void fillPackets( unsigned short pid, unsigned char *buf, int len, int &npack ); void calculateCRC( unsigned char *p_begin, unsigned char *p_end ); int rtpSocket; struct sockaddr_in rtpAddr; struct rtpheader hRtp; - QString address; + TQString address; int port, senderPort; unsigned char thBuf[188*10]; unsigned int CRC32[256]; @@ -89,7 +90,7 @@ private: unsigned char *psiBuffer; int psiBufferSize; int psiPackets; - QTimer psiTimer; + TQTimer psiTimer; bool writePsi; private slots: diff --git a/kaffeine/src/input/dvbclient/cdchannel.cpp b/kaffeine/src/input/dvbclient/cdchannel.cpp index 6b0fad1..41a235e 100644 --- a/kaffeine/src/input/dvbclient/cdchannel.cpp +++ b/kaffeine/src/input/dvbclient/cdchannel.cpp @@ -34,7 +34,7 @@ CdChannel::CdChannel() -CdChannel::CdChannel( const QString &n, int vp, int ap, int ac, int spid, int pg, int an, int tp, const QString &lg ) +CdChannel::CdChannel( const TQString &n, int vp, int ap, int ac, int spid, int pg, int an, int tp, const TQString &lg ) { name = n; vpid = vp; diff --git a/kaffeine/src/input/dvbclient/cdchannel.h b/kaffeine/src/input/dvbclient/cdchannel.h index 880d95e..1b56d80 100644 --- a/kaffeine/src/input/dvbclient/cdchannel.h +++ b/kaffeine/src/input/dvbclient/cdchannel.h @@ -21,7 +21,7 @@ #ifndef CDCHANNEL_H #define CDCHANNEL_H -#include <qstring.h> +#include <tqstring.h> @@ -31,15 +31,15 @@ class CdChannel public: CdChannel(); - CdChannel( const QString &n, int vp, int ap, int ac, int spid, int pg, int an, int tp, const QString &lg ); + CdChannel( const TQString &n, int vp, int ap, int ac, int spid, int pg, int an, int tp, const TQString &lg ); ~CdChannel(); - QString name; + TQString name; unsigned short vpid, apid; char ac3; unsigned short subpid, page, id; unsigned char type; - QString lang; + TQString lang; }; #endif /* CDCHANNEL_H */ diff --git a/kaffeine/src/input/dvbclient/cdcleaner.cpp b/kaffeine/src/input/dvbclient/cdcleaner.cpp index 58445a5..0a93c71 100644 --- a/kaffeine/src/input/dvbclient/cdcleaner.cpp +++ b/kaffeine/src/input/dvbclient/cdcleaner.cpp @@ -18,18 +18,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qdir.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqstringlist.h> #include "cdcleaner.h" -CdCleaner::CdCleaner( const QString &path ) +CdCleaner::CdCleaner( const TQString &path ) { livePath = path; - connect( &timer, SIGNAL(timeout()), this, SLOT(doClean()) ); + connect( &timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doClean()) ); timer.start( 60*1000 ); } @@ -44,12 +44,12 @@ CdCleaner::~CdCleaner() void CdCleaner::doClean() { - start( QThread::LowestPriority ); + start( TQThread::LowestPriority ); } -void CdCleaner::setPath( const QString &path ) +void CdCleaner::setPath( const TQString &path ) { livePath = path; } @@ -58,11 +58,11 @@ void CdCleaner::setPath( const QString &path ) void CdCleaner::run() { - QStringList list; - QDir d; + TQStringList list; + TQDir d; d.setPath( livePath ); - list = d.entryList( "DVBClient-*.ts", QDir::Files, QDir::Name ); + list = d.entryList( "DVBClient-*.ts", TQDir::Files, TQDir::Name ); if ( list.count()>1 ) d.remove( list[0] ); } diff --git a/kaffeine/src/input/dvbclient/cdcleaner.h b/kaffeine/src/input/dvbclient/cdcleaner.h index e4423d6..0f20bd5 100644 --- a/kaffeine/src/input/dvbclient/cdcleaner.h +++ b/kaffeine/src/input/dvbclient/cdcleaner.h @@ -21,23 +21,24 @@ #ifndef CDCLEANER_H #define CDCLEANER_H -#include <qobject.h> -#include <qthread.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqthread.h> +#include <tqstring.h> +#include <tqtimer.h> -class CdCleaner : public QObject, public QThread +class CdCleaner : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: - CdCleaner( const QString &path ); + CdCleaner( const TQString &path ); ~CdCleaner(); - void setPath( const QString &path ); + void setPath( const TQString &path ); protected: @@ -49,8 +50,8 @@ private slots: private: - QTimer timer; - QString livePath; + TQTimer timer; + TQString livePath; }; #endif /* CDCLEANER_H */ diff --git a/kaffeine/src/input/dvbclient/cddump.cpp b/kaffeine/src/input/dvbclient/cddump.cpp index 075025a..9775cc2 100644 --- a/kaffeine/src/input/dvbclient/cddump.cpp +++ b/kaffeine/src/input/dvbclient/cddump.cpp @@ -29,7 +29,7 @@ -CdDump::CdDump( const QString &pipe ) +CdDump::CdDump( const TQString &pipe ) { unsigned int i, j, k; @@ -43,7 +43,7 @@ CdDump::CdDump( const QString &pipe ) isRunning = false; fifoName = pipe; - connect( &timerPatPmt, SIGNAL(timeout()), this, SLOT(setPatPmt()) ); + connect( &timerPatPmt, TQT_SIGNAL(timeout()), this, TQT_SLOT(setPatPmt()) ); timerPatPmt.start( 500 ); } @@ -185,7 +185,7 @@ void CdDump::setPatPmt() -bool CdDump::go( const QString &ad, int port, CdChannel c ) +bool CdDump::go( const TQString &ad, int port, CdChannel c ) { int sockopt=1; @@ -262,7 +262,7 @@ CdDump::~CdDump() -bool CdDump::doPause( const QString &name ) +bool CdDump::doPause( const TQString &name ) { if ( !timeShifting ) { timeShiftFileName = name; diff --git a/kaffeine/src/input/dvbclient/cddump.h b/kaffeine/src/input/dvbclient/cddump.h index 695eb4b..27be1b8 100644 --- a/kaffeine/src/input/dvbclient/cddump.h +++ b/kaffeine/src/input/dvbclient/cddump.h @@ -27,11 +27,11 @@ #include <sys/socket.h> #include <arpa/inet.h> -#include <qthread.h> -#include <qobject.h> -#include <qstring.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqthread.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqtimer.h> #include "cdchannel.h" @@ -55,18 +55,19 @@ struct srtpheader { /* in network byte order */ -class CdDump : public QObject, public QThread +class CdDump : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public : - CdDump( const QString &pipe ); + CdDump( const TQString &pipe ); ~CdDump(); virtual void run(); - bool go( const QString &ad, int port, CdChannel c ); + bool go( const TQString &ad, int port, CdChannel c ); void stop(); - bool doPause( const QString &name ); + bool doPause( const TQString &name ); bool running() const; private slots: @@ -79,12 +80,12 @@ private : void writePat(); void calculateCRC( unsigned char *p_begin, unsigned char *p_end ); - QFile liveFile; + TQFile liveFile; bool timeShifting; - QString timeShiftFileName; + TQString timeShiftFileName; int waitPause; int fdPipe; - QString fifoName; + TQString fifoName; bool isRunning; int sock; struct sockaddr_in addr; @@ -93,7 +94,7 @@ private : unsigned char tspmt[188]; unsigned int CRC32[256]; int pmtpid; - QTimer timerPatPmt; + TQTimer timerPatPmt; bool patpmt; signals: diff --git a/kaffeine/src/input/dvbclient/cdlisten.cpp b/kaffeine/src/input/dvbclient/cdlisten.cpp index 89ea3c7..2493d11 100644 --- a/kaffeine/src/input/dvbclient/cdlisten.cpp +++ b/kaffeine/src/input/dvbclient/cdlisten.cpp @@ -29,7 +29,7 @@ CdListen::CdListen() { - connect( &timer, SIGNAL(timeout()), this, SLOT(updateList()) ); + connect( &timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateList()) ); } @@ -65,7 +65,7 @@ void CdListen::stop() -bool CdListen::go( const QString &ad, int port ) +bool CdListen::go( const TQString &ad, int port ) { if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { KMessageBox::information( 0, i18n("Can't open info socket."), i18n("DVB Client") ); diff --git a/kaffeine/src/input/dvbclient/cdlisten.h b/kaffeine/src/input/dvbclient/cdlisten.h index 2e1bc7e..3ae95e0 100644 --- a/kaffeine/src/input/dvbclient/cdlisten.h +++ b/kaffeine/src/input/dvbclient/cdlisten.h @@ -25,21 +25,22 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include <qobject.h> -#include <qthread.h> -#include <qtimer.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqthread.h> +#include <tqtimer.h> +#include <tqstring.h> -class CdListen : public QObject, public QThread +class CdListen : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: CdListen(); ~CdListen(); virtual void run(); - bool go( const QString &ad, int port ); + bool go( const TQString &ad, int port ); void stop(); private slots: @@ -51,12 +52,12 @@ private: int sock; struct sockaddr_in addr; bool isRunning; - QTimer timer; - QString currentList, newList; + TQTimer timer; + TQString currentList, newList; signals: - void listChanged( const QString& ); + void listChanged( const TQString& ); }; #endif /* CDLISTEN_H */ diff --git a/kaffeine/src/input/dvbclient/cdwidget.cpp b/kaffeine/src/input/dvbclient/cdwidget.cpp index f28d128..f71579d 100644 --- a/kaffeine/src/input/dvbclient/cdwidget.cpp +++ b/kaffeine/src/input/dvbclient/cdwidget.cpp @@ -18,9 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qapplication.h> -#include <qlayout.h> -#include <qdir.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqdir.h> #include <kiconloader.h> #include <klocale.h> @@ -29,19 +29,19 @@ -CdWidget::CdWidget( const QString &ad, int port, int info, const QString &tspath, QWidget *parent, QObject *objParent, const char *name ) +CdWidget::CdWidget( const TQString &ad, int port, int info, const TQString &tspath, TQWidget *tqparent, TQObject *objParent, const char *name ) : KaffeineInput( objParent, name ) { - mainWidget = new QVBox( parent ); - mainWidget->setSizePolicy( QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred) ); - split = new QSplitter( mainWidget ); + mainWidget = new TQVBox( tqparent ); + mainWidget->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Preferred, TQSizePolicy::Preferred) ); + split = new TQSplitter( mainWidget ); split->setOpaqueResize( true ); - playerBox = new QVBox( split ); + playerBox = new TQVBox( split ); playerBox->setMinimumWidth( 200 ); - channelsLb = new QListBox( split ); + channelsLb = new TQListBox( split ); split->moveToFirst( channelsLb ); - channelsLb->setSizePolicy( QSizePolicy (QSizePolicy::Preferred, QSizePolicy::MinimumExpanding) ); - split->setResizeMode( channelsLb, QSplitter::KeepSize ); + channelsLb->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding) ); + split->setResizeMode( channelsLb, TQSplitter::KeepSize ); cdAddress = ad; cdPort = port; @@ -62,8 +62,8 @@ CdWidget::CdWidget( const QString &ad, int port, int info, const QString &tspath listen = new CdListen(); listen->go( cdAddress, cdInfo ); - fifoName = QDir::homeDirPath()+"/.kaxclient.ts"; - QFile f( fifoName ); + fifoName = TQDir::homeDirPath()+"/.kaxclient.ts"; + TQFile f( fifoName ); if ( f.exists() ) f.remove(); if ( (mkfifo( fifoName.ascii(), 0644 ))<0 ) { perror( fifoName.latin1() ); @@ -72,8 +72,8 @@ CdWidget::CdWidget( const QString &ad, int port, int info, const QString &tspath } else { dump = new CdDump( fifoName ); - connect( channelsLb, SIGNAL(selected(const QString &)), this, SLOT(channelSelected(const QString &)) ); - connect( listen, SIGNAL(listChanged(const QString&)), this, SLOT(updateList(const QString&)) ); + connect( channelsLb, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(channelSelected(const TQString &)) ); + connect( listen, TQT_SIGNAL(listChanged(const TQString&)), this, TQT_SLOT(updateList(const TQString&)) ); } lastChannel = 0; @@ -93,7 +93,7 @@ void CdWidget::togglePanel() -void CdWidget::getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ) +void CdWidget::getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ) { uiNames.append( i18n("DVB Client") ); iconNames.append( "network" ); @@ -102,11 +102,11 @@ void CdWidget::getTargets( QStringList &uiNames, QStringList &iconNames, QString -bool CdWidget::execTarget( const QString &target ) +bool CdWidget::execTarget( const TQString &target ) { if ( target=="DVBCLIENT" ) { emit showMe( this ); - QTimer::singleShot( 100, this, SLOT(playLastChannel()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(playLastChannel()) ); return true; } return false; @@ -114,14 +114,14 @@ bool CdWidget::execTarget( const QString &target ) -QWidget* CdWidget::wantPlayerWindow() +TQWidget* CdWidget::wantPlayerWindow() { return playerBox; } -QWidget* CdWidget::inputMainWidget() +TQWidget* CdWidget::inputMainWidget() { return mainWidget; } @@ -142,7 +142,7 @@ CdWidget::~CdWidget() void CdWidget::loadConfig( KConfig* config ) { - QValueList<int> sl; + TQValueList<int> sl; config->setGroup("DVBClient"); sl = config->readIntListEntry("SplitSizes"); @@ -164,12 +164,12 @@ void CdWidget::saveConfig() -void CdWidget::updateList( const QString &list ) +void CdWidget::updateList( const TQString &list ) { - QString c; - QString s = list; + TQString c; + TQString s = list; int pos; - QString name, lang; + TQString name, lang; int apid, vpid, ac3, subpid, page, id, type; if ( dump->running() ) @@ -180,32 +180,32 @@ void CdWidget::updateList( const QString &list ) chan.clear(); if ( list=="quit" ) return; - while ( (pos = s.find("|"))!=-1 ) { + while ( (pos = s.tqfind("|"))!=-1 ) { name = s.left( pos ); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); vpid = s.left( pos ).toInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); apid = s.left( pos ).toInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); if ( s.left( pos )=="n" ) ac3 = 0; else ac3 = 1; s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); subpid = s.left( pos ).toInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); page = s.left( pos ).toInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); id = s.left( pos ).toInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); type = s.left( pos ).toInt(); s = s.right( s.length()-pos-1 ); - pos = s.find("|"); + pos = s.tqfind("|"); lang = s.left( pos ); s = s.right( s.length()-pos-1 ); chan.append( new CdChannel( name, vpid, apid, ac3, subpid, page, id, type, lang ) ); @@ -302,7 +302,7 @@ void CdWidget::previous() -void CdWidget::channelSelected( const QString &name ) +void CdWidget::channelSelected( const TQString &name ) { int i; @@ -324,7 +324,7 @@ void CdWidget::pauseLiveTV() if ( !dump ) return; if ( dump->running() ) { - timeShiftFileName = cdShiftDir+"DVBClient-"+QDateTime::currentDateTime().toString( Qt::ISODate )+".ts"; + timeShiftFileName = cdShiftDir+"DVBClient-"+TQDateTime::tqcurrentDateTime().toString( Qt::ISODate )+".ts"; if ( dump->doPause( timeShiftFileName ) ) emit setTimeShiftFilename( timeShiftFileName ); } } @@ -348,7 +348,7 @@ void CdWidget::enableLive( bool b ) -void CdWidget::setParam( const QString &ad, int port, int info, const QString &tspath ) +void CdWidget::setParam( const TQString &ad, int port, int info, const TQString &tspath ) { cdAddress = ad; cdPort = port; diff --git a/kaffeine/src/input/dvbclient/cdwidget.h b/kaffeine/src/input/dvbclient/cdwidget.h index 2862320..51d70fa 100644 --- a/kaffeine/src/input/dvbclient/cdwidget.h +++ b/kaffeine/src/input/dvbclient/cdwidget.h @@ -21,11 +21,11 @@ #ifndef CDWIDGET_H #define CDWIDGET_H -#include <qlistbox.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qvbox.h> -#include <qsplitter.h> +#include <tqlistbox.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqvbox.h> +#include <tqsplitter.h> #include <kconfig.h> @@ -39,34 +39,35 @@ class CdWidget : public KaffeineInput { Q_OBJECT + TQ_OBJECT public: - CdWidget( const QString &ad, int port, int info, const QString &tspath, QWidget *parent, QObject *objParent, const char *name ); + CdWidget( const TQString &ad, int port, int info, const TQString &tspath, TQWidget *tqparent, TQObject *objParent, const char *name ); ~CdWidget(); - void setParam( const QString &ad, int port, int info, const QString &tspath ); + void setParam( const TQString &ad, int port, int info, const TQString &tspath ); void enableLive( bool b ); void playNumChannel( int num ); void next(); void previous(); // Reimplemented from KaffeineInput - QWidget *wantPlayerWindow(); - QWidget *inputMainWidget(); + TQWidget *wantPlayerWindow(); + TQWidget *inputMainWidget(); bool nextTrack( MRL& ); bool previousTrack( MRL& ); bool currentTrack( MRL& ); bool trackNumber( int, MRL& ); bool playbackFinished( MRL& ); - void getTargets( QStringList &uiNames, QStringList &iconNames, QStringList &targetNames ); + void getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames ); void togglePanel(); - bool execTarget( const QString& ); + bool execTarget( const TQString& ); void saveConfig(); //*************************************** - QListBox *channelsLb; - QVBox *mainWidget; - QVBox *playerBox; + TQListBox *channelsLb; + TQVBox *mainWidget; + TQVBox *playerBox; public slots: @@ -78,30 +79,30 @@ private: void loadConfig( KConfig* config ); void saveConfig( KConfig* config ); - QSplitter *split; + TQSplitter *split; CdDump *dump; CdListen *listen; - QString cdAddress; + TQString cdAddress; int cdPort; int cdInfo; - QString cdShiftDir; - QPixmap tvPix, raPix; - QPtrList<CdChannel> chan; - QString fifoName; - QString timeShiftFileName; + TQString cdShiftDir; + TQPixmap tvPix, raPix; + TQPtrList<CdChannel> chan; + TQString fifoName; + TQString timeShiftFileName; CdCleaner *cleaner; int lastChannel; private slots: - void updateList( const QString &list ); - void channelSelected( const QString &name ); + void updateList( const TQString &list ); + void channelSelected( const TQString &name ); signals: - void dvbOpen(const QString&, const QString&, int); + void dvbOpen(const TQString&, const TQString&, int); void dvbStop(); - void setTimeShiftFilename( const QString& ); + void setTimeShiftFilename( const TQString& ); }; #endif /* CDWIDGET_H */ diff --git a/kaffeine/src/input/kaffeineinput.cpp b/kaffeine/src/input/kaffeineinput.cpp index 74d4a8b..0547c1c 100644 --- a/kaffeine/src/input/kaffeineinput.cpp +++ b/kaffeine/src/input/kaffeineinput.cpp @@ -20,7 +20,7 @@ #include "kaffeineinput.h" -KaffeineInput::KaffeineInput(QObject* parent, const char* name) : QObject( parent, name ) +KaffeineInput::KaffeineInput(TQObject* tqparent, const char* name) : TQObject( tqparent, name ) { } diff --git a/kaffeine/src/input/kaffeineinput.h b/kaffeine/src/input/kaffeineinput.h index 0670178..6b327f9 100644 --- a/kaffeine/src/input/kaffeineinput.h +++ b/kaffeine/src/input/kaffeineinput.h @@ -21,25 +21,26 @@ #ifndef KAFFEINEINPUT_H #define KAFFEINEINPUT_H -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> #include <kxmlguiclient.h> class MRL; -class KaffeineInput : public QObject, public KXMLGUIClient +class KaffeineInput : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - KaffeineInput(QObject* parent, const char* name); + KaffeineInput(TQObject* tqparent, const char* name); virtual ~KaffeineInput(); // if you want the player window to be displayed on one of your widgets, return a pointer to that one. - virtual QWidget *wantPlayerWindow() {return NULL;} + virtual TQWidget *wantPlayerWindow() {return NULL;} // you MUST return your main widget (the one containing all your gui). - virtual QWidget *inputMainWidget() {return NULL;} + virtual TQWidget *inputMainWidget() {return NULL;} // called when the user want next track and you are the current input. // fill the MRL and return true to play your next track. @@ -74,10 +75,10 @@ public: virtual void mergeMeta(const MRL&) {} // shortcuts buttons to be displayed in the start window. - virtual void getTargets( QStringList&/*uiNames*/, QStringList&/*iconNames*/, QStringList&/*targetNames*/ ) {} + virtual void getTargets( TQStringList&/*uiNames*/, TQStringList&/*iconNames*/, TQStringList&/*targetNames*/ ) {} // play shortcut, return false if the target is not yours; - virtual bool execTarget( const QString&/*target*/ ) {return false;} + virtual bool execTarget( const TQString&/*target*/ ) {return false;} // toggle your panel (show / hide) if any virtual void togglePanel() {} @@ -97,7 +98,7 @@ signals: void play(const MRL&, KaffeineInput*/*this*/); // emit that if you want a message to be displayed in statusbar. (do that only if you are the current input, e.g. after play()) - void statusBarMessage(const QString&); + void statusBarMessage(const TQString&); // emit that if you want to stop the player. Be aware that it'll end with a call to playerStopped(). // you usually don't need that. diff --git a/kaffeine/src/inputmanager.cpp b/kaffeine/src/inputmanager.cpp index 75bae51..b578449 100644 --- a/kaffeine/src/inputmanager.cpp +++ b/kaffeine/src/inputmanager.cpp @@ -37,7 +37,7 @@ #include "inputmanager.moc" -InputPlugin::InputPlugin( KaffeineInput *p, int ident, QString na ) +InputPlugin::InputPlugin( KaffeineInput *p, int ident, TQString na ) { plug = p; id = ident; @@ -52,10 +52,10 @@ InputPlugin::~InputPlugin() -InputManager::InputManager( Kaffeine *parent, QWidgetStack *ws, KMultiTabBar *mt ) - : QObject(parent) +InputManager::InputManager( Kaffeine *tqparent, TQWidgetStack *ws, KMultiTabBar *mt ) + : TQObject(tqparent) { - kaffeine = parent; + kaffeine = tqparent; stack = ws; mtBar = mt; plugs.setAutoDelete( true ); @@ -73,14 +73,14 @@ InputManager::~InputManager() -QSize InputManager::stackSize() +TQSize InputManager::stackSize() { return stack->size(); } -QWidget* InputManager::visibleWidget() const +TQWidget* InputManager::visibleWidget() const { return stack->visibleWidget(); } @@ -131,13 +131,13 @@ void InputManager::setCurrentPlugin( KaffeineInput *p ) -QString InputManager::activePlugin() +TQString InputManager::activePlugin() { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->plug==currentPlugin ) return it.current()->name; } - return QString(); + return TQString(); } @@ -146,9 +146,9 @@ void InputManager::showMe( KaffeineInput *p ) { int id=0; int p_id=0; - QWidget *widg; + TQWidget *widg; - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->plug->inputMainWidget()==currentMainWidget ) id = it.current()->id; if ( it.current()->plug==p ) { @@ -174,9 +174,9 @@ void InputManager::showMe( KaffeineInput *p ) -void InputManager::setActivePlugin( QString name ) +void InputManager::setActivePlugin( TQString name ) { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->name==name ) { currentPlugin = it.current()->plug; mtBar->setTab( 1, false ); @@ -198,7 +198,7 @@ void InputManager::showPlayer() if ( currentMainWidget==startWindow ) id = 1; else { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->plug->inputMainWidget()==currentMainWidget ) { if ( !it.current()->plug->showPlayer() ) return; @@ -218,13 +218,13 @@ void InputManager::togglePlaylist() { int currentPluginId=0, playlistPluginId=0; - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->name == i18n("Playlist") ) { playlistPluginId = it.current()->id; break; } } - for ( QPtrListIterator<InputPlugin> it2(plugs); it2.current(); ++it2 ) { + for ( TQPtrListIterator<InputPlugin> it2(plugs); it2.current(); ++it2 ) { if ( it2.current()->plug->inputMainWidget() == currentMainWidget ) { currentPluginId = it2.current()->id; break; @@ -255,7 +255,7 @@ void InputManager::togglePlaylist() void InputManager::addConfigKeys( KKeyDialog* kd ) { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) kd->insert( it.current()->plug->actionCollection(), it.current()->plug->name()); } @@ -263,7 +263,7 @@ void InputManager::addConfigKeys( KKeyDialog* kd ) bool InputManager::isPlaylistCurrent() { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->name == i18n("Playlist") ) { if ( it.current()->plug==currentPlugin ) return true; @@ -321,16 +321,16 @@ bool InputManager::playbackFinished( MRL &mrl ) -void InputManager::statusBarMessage( const QString &msg ) +void InputManager::statusBarMessage( const TQString &msg ) { - kaffeine->slotChangePlaylistStatus( msg ); + kaffeine->slotChangePlaylisttqStatus( msg ); } void InputManager::saveConfig() { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) it.current()->plug->saveConfig(); } @@ -338,7 +338,7 @@ void InputManager::saveConfig() bool InputManager::close() { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( !it.current()->plug->close() ) return false; } @@ -347,18 +347,18 @@ bool InputManager::close() -void InputManager::add( KaffeineInput *p, const QPixmap &icon, const QString &name ) +void InputManager::add( KaffeineInput *p, const TQPixmap &icon, const TQString &name ) { mtBar->appendTab( icon, nextId, name ); - connect( mtBar->tab( nextId ), SIGNAL(clicked(int)), this, SLOT(show(int)) ); + connect( mtBar->tab( nextId ), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(show(int)) ); stack->addWidget( p->inputMainWidget(), nextId ); plugs.append( new InputPlugin( p, nextId, name ) ); - connect( p, SIGNAL(play(const MRL&,KaffeineInput*)), this, SLOT(play(const MRL&,KaffeineInput*))); - connect( p, SIGNAL(setCurrentPlugin(KaffeineInput*)), this, SLOT(setCurrentPlugin(KaffeineInput*))); - connect( p, SIGNAL(statusBarMessage(const QString&)), this, SLOT(statusBarMessage(const QString&))); - connect( p, SIGNAL(stop()), this, SLOT(stop())); - connect( p, SIGNAL(pause()), this, SLOT(pause())); - connect( p, SIGNAL(showMe(KaffeineInput*)), this, SLOT(showMe(KaffeineInput*))); + connect( p, TQT_SIGNAL(play(const MRL&,KaffeineInput*)), this, TQT_SLOT(play(const MRL&,KaffeineInput*))); + connect( p, TQT_SIGNAL(setCurrentPlugin(KaffeineInput*)), this, TQT_SLOT(setCurrentPlugin(KaffeineInput*))); + connect( p, TQT_SIGNAL(statusBarMessage(const TQString&)), this, TQT_SLOT(statusBarMessage(const TQString&))); + connect( p, TQT_SIGNAL(stop()), this, TQT_SLOT(stop())); + connect( p, TQT_SIGNAL(pause()), this, TQT_SLOT(pause())); + connect( p, TQT_SIGNAL(showMe(KaffeineInput*)), this, TQT_SLOT(showMe(KaffeineInput*))); if ( !currentPlugin ) currentPlugin = plugs.current()->plug; ++nextId; @@ -367,33 +367,33 @@ void InputManager::add( KaffeineInput *p, const QPixmap &icon, const QString &na -void InputManager::addPlayerWidget( QWidget *w, const QPixmap &icon, const QString &name ) +void InputManager::addPlayerWidget( TQWidget *w, const TQPixmap &icon, const TQString &name ) { playerWidget = w; mtBar->appendTab( icon, 2, name ); - connect( mtBar->tab(2), SIGNAL(clicked(int)), this, SLOT(show(int)) ); + connect( mtBar->tab(2), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(show(int)) ); stack->addWidget( playerWidget, 2 ); } -void InputManager::addStartWindow( QWidget *w, const QPixmap &icon, const QString &name ) +void InputManager::addStartWindow( TQWidget *w, const TQPixmap &icon, const TQString &name ) { startWindow = w; mtBar->appendTab( icon, 1, name ); - connect( mtBar->tab(1), SIGNAL(clicked(int)), this, SLOT(show(int)) ); + connect( mtBar->tab(1), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(show(int)) ); stack->addWidget( startWindow, 1 ); mtBar->setTab( 1, true ); stack->raiseWidget( 1 ); oldMainWidget = currentMainWidget = startWindow; - connect( (StartWindow*)w, SIGNAL(execTarget(const QString&)), this, SLOT(execTarget(const QString&)) ); + connect( (StartWindow*)w, TQT_SIGNAL(execTarget(const TQString&)), this, TQT_SLOT(execTarget(const TQString&)) ); } -void InputManager::execTarget( const QString &target ) +void InputManager::execTarget( const TQString &target ) { - QPtrListIterator<InputPlugin> it(plugs); + TQPtrListIterator<InputPlugin> it(plugs); for ( it.toFirst(); it.current(); ++it ) { if ( it.current()->plug->execTarget( target ) ) return; @@ -405,7 +405,7 @@ void InputManager::execTarget( const QString &target ) void InputManager::makeTargets( KaffeineInput *p, bool make ) { int i; - QStringList uiNames, iconNames, targetNames; + TQStringList uiNames, iconNames, targetNames; StartWindow *sw = (StartWindow*)(startWindow); p->getTargets( uiNames, iconNames, targetNames ); @@ -422,7 +422,7 @@ void InputManager::makeTargets( KaffeineInput *p, bool make ) void InputManager::remove( KaffeineInput *p ) { InputPlugin *i=NULL; - QPtrListIterator<InputPlugin> it(plugs); + TQPtrListIterator<InputPlugin> it(plugs); for ( it.toFirst(); it.current(); ++it ) { if ( it.current()->plug==p ) { @@ -471,9 +471,9 @@ void InputManager::setPlayerContainer( PlayerContainer *pc ) { playerContainer = pc; if ( playerContainer ) { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->plug->inputMainWidget()==currentMainWidget ) { - playerContainer->reparent( it.current()->plug->wantPlayerWindow(), QPoint(0,0), true); + playerContainer->reparent( it.current()->plug->wantPlayerWindow(), TQPoint(0,0), true); playerContainer->show(); break; } @@ -485,14 +485,14 @@ void InputManager::setPlayerContainer( PlayerContainer *pc ) void InputManager::show( int id ) { - QWidget *widg = NULL; - QWidget *main = NULL; + TQWidget *widg = NULL; + TQWidget *main = NULL; if ( id==2 ) { if ( currentMainWidget==playerWidget ) return; if ( playerContainer ) { - playerContainer->reparent(playerWidget, QPoint(0,0), true); + playerContainer->reparent(playerWidget, TQPoint(0,0), true); currentMainWidget = playerWidget; } currentMainWidget = playerWidget; @@ -503,7 +503,7 @@ void InputManager::show( int id ) currentMainWidget = startWindow; } else { - for ( QPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { + for ( TQPtrListIterator<InputPlugin> it(plugs); it.current(); ++it ) { if ( it.current()->id==id ) { main = it.current()->plug->inputMainWidget(); if ( main==currentMainWidget ) { @@ -513,7 +513,7 @@ void InputManager::show( int id ) currentMainWidget = main; widg = it.current()->plug->wantPlayerWindow(); if ( widg && playerContainer ) - playerContainer->reparent(widg, QPoint(0,0), true); + playerContainer->reparent(widg, TQPoint(0,0), true); break; } } @@ -526,17 +526,17 @@ void InputManager::show( int id ) void InputManager::fullscreen( bool b ) { - QPtrListIterator<InputPlugin> it(plugs); + TQPtrListIterator<InputPlugin> it(plugs); int id=0; if ( b ) { - stack->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); + stack->tqsetSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored); oldMainWidget = currentMainWidget; show( 2 ); mtBar->hide(); } else { - stack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + stack->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); mtBar->show(); if ( oldMainWidget==startWindow ) id = 1; @@ -555,30 +555,30 @@ void InputManager::fullscreen( bool b ) /********/ -PlayerContainer::PlayerContainer(QWidget* parent, const char* name) : QVBox(parent, name) +PlayerContainer::PlayerContainer(TQWidget* tqparent, const char* name) : TQVBox(tqparent, name) { setAcceptDrops(true); setMouseTracking( true ); } -void PlayerContainer::dragEnterEvent (QDragEnterEvent* dev) +void PlayerContainer::dragEnterEvent (TQDragEnterEvent* dev) { kdDebug() << "PlayerContainer: drag enter event" << endl; - dev->accept(QUriDrag::canDecode(dev) || QTextDrag::canDecode(dev)); + dev->accept(TQUriDrag::canDecode(dev) || TQTextDrag::canDecode(dev)); } -void PlayerContainer::dropEvent(QDropEvent* dev) +void PlayerContainer::dropEvent(TQDropEvent* dev) { - QStringList urls,newurls; + TQStringList urls,newurls; - if (QUriDrag::decodeLocalFiles(dev, urls)) + if (TQUriDrag::decodeLocalFiles(dev, urls)) { if (urls.count()) { for (uint i=0; i < urls.count() ;i++) { - //KURL url(QUriDrag::unicodeUriToUri(urls[i])); + //KURL url(TQUriDrag::tqunicodeUriToUri(urls[i])); //newurls << url.path(-1); //kdDebug() << "Kaffeine: Dropped " << url.path() << endl; newurls << urls[i]; @@ -588,7 +588,7 @@ void PlayerContainer::dropEvent(QDropEvent* dev) } else { - QUriDrag::decodeToUnicodeUris(dev, urls); + TQUriDrag::decodeToUnicodeUris(dev, urls); if (urls.count()) emit signalURLDropEvent(urls); } @@ -596,8 +596,8 @@ void PlayerContainer::dropEvent(QDropEvent* dev) else if (strcmp(dev->format(), "text/x-moz-url") == 0) // for mozilla drops { - QByteArray data = dev->encodedData("text/plain"); - QString md(data); + TQByteArray data = dev->tqencodedData("text/plain"); + TQString md(data); emit signalURLDropEvent(md); } } diff --git a/kaffeine/src/inputmanager.h b/kaffeine/src/inputmanager.h index 06055d7..97e5449 100644 --- a/kaffeine/src/inputmanager.h +++ b/kaffeine/src/inputmanager.h @@ -25,10 +25,10 @@ #include <config.h> #endif -#include <qptrlist.h> -#include <qwidgetstack.h> -#include <qvbox.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqwidgetstack.h> +#include <tqvbox.h> +#include <tqstring.h> class KaffeineInput; class KMultiTabBar; @@ -38,20 +38,21 @@ class MRL; -class PlayerContainer : public QVBox +class PlayerContainer : public TQVBox { Q_OBJECT + TQ_OBJECT public: - PlayerContainer(QWidget* parent = 0, const char* name = 0); + PlayerContainer(TQWidget* tqparent = 0, const char* name = 0); virtual ~PlayerContainer() {} signals: - void signalURLDropEvent(const QStringList&); + void signalURLDropEvent(const TQStringList&); protected: - void dragEnterEvent (QDragEnterEvent*); - void dropEvent(QDropEvent*); + void dragEnterEvent (TQDragEnterEvent*); + void dropEvent(TQDropEvent*); }; @@ -60,31 +61,32 @@ protected: class InputPlugin { public: - InputPlugin( KaffeineInput *p, int ident, QString na ); + InputPlugin( KaffeineInput *p, int ident, TQString na ); ~InputPlugin(); KaffeineInput *plug; int id; - QString name; + TQString name; }; -class InputManager : public QObject +class InputManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - InputManager( Kaffeine *parent, QWidgetStack *ws, KMultiTabBar *mt ); + InputManager( Kaffeine *tqparent, TQWidgetStack *ws, KMultiTabBar *mt ); ~InputManager(); - void add( KaffeineInput *p, const QPixmap &icon, const QString &name ); - void addPlayerWidget( QWidget *w, const QPixmap &icon, const QString &name ); - void addStartWindow( QWidget *w, const QPixmap &icon, const QString &name ); + void add( KaffeineInput *p, const TQPixmap &icon, const TQString &name ); + void addPlayerWidget( TQWidget *w, const TQPixmap &icon, const TQString &name ); + void addStartWindow( TQWidget *w, const TQPixmap &icon, const TQString &name ); void remove( KaffeineInput *p ); void setPlayerContainer( PlayerContainer *pc ); void fullscreen( bool b ); - QString activePlugin(); - void setActivePlugin( QString name ); + TQString activePlugin(); + void setActivePlugin( TQString name ); void addConfigKeys( KKeyDialog* kd ); void showPlayer(); void togglePlaylist(); @@ -97,17 +99,17 @@ public: bool playbackFinished( MRL &mrl ); void mergeMeta(const MRL&); bool close(); - QSize stackSize(); - QWidget* visibleWidget() const; + TQSize stackSize(); + TQWidget* visibleWidget() const; bool isPlaylistCurrent(); public slots: - void execTarget( const QString& ); + void execTarget( const TQString& ); private slots: void show( int id ); void play( const MRL&, KaffeineInput* ); - void statusBarMessage( const QString& ); + void statusBarMessage( const TQString& ); void setCurrentPlugin( KaffeineInput* ); void stop(); void pause(); @@ -116,13 +118,13 @@ private slots: private: void makeTargets( KaffeineInput*, bool ); - QWidgetStack *stack; + TQWidgetStack *stack; KMultiTabBar *mtBar; - QPtrList<InputPlugin> plugs; - QWidget *playerWidget, *startWindow; - QWidget *currentMainWidget; + TQPtrList<InputPlugin> plugs; + TQWidget *playerWidget, *startWindow; + TQWidget *currentMainWidget; PlayerContainer *playerContainer; - QWidget *oldMainWidget; + TQWidget *oldMainWidget; KaffeineInput *currentPlugin; int nextId; Kaffeine *kaffeine; diff --git a/kaffeine/src/instwizard.cpp b/kaffeine/src/instwizard.cpp index eec6fa4..5203b38 100644 --- a/kaffeine/src/instwizard.cpp +++ b/kaffeine/src/instwizard.cpp @@ -30,11 +30,11 @@ #include <ktextbrowser.h> #include <kservice.h> -#include <qcheckbox.h> -#include <qvbox.h> -#include <qdir.h> -#include <qfile.h> -#include <qstringlist.h> +#include <tqcheckbox.h> +#include <tqvbox.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqstringlist.h> #include <kdeversion.h> #include <kapplication.h> @@ -49,7 +49,7 @@ void InstWizard::internalWizard() { - setCaption(i18n("Kaffeine %1 Installation Wizard").arg(KAFFEINE_VERSION)); + setCaption(i18n("Kaffeine %1 Installation Wizard").tqarg(KAFFEINE_VERSION)); resize(400,400); /************** installation check ************************/ @@ -61,14 +61,14 @@ void InstWizard::internalWizard() setHelpEnabled(page1, false); setFinishEnabled(page1, false); - QString infoString; - QTextStream info(&infoString, IO_WriteOnly); + TQString infoString; + TQTextStream info(&infoString, IO_WriteOnly); //KAFFEINE-PART info << "<b>" << i18n("Kaffeine-Xine") << "...</b><br>"; KService::Ptr service = KService::serviceByDesktopName("xine_part"); - if ((service) && (service->serviceTypes().contains("KaffeinePart"))) + if ((service) && (service->serviceTypes().tqcontains("KaffeinePart"))) info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; else info << "<font color=\"DarkRed\">" << i18n("Part not found. Please check your installation!") << "</font>"; @@ -79,36 +79,36 @@ void InstWizard::internalWizard() if (KDE::version() >= KDE_MAKE_VERSION(3,2,0)) info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; else - info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires KDE >= %1.").arg("3.2") << "</font>"; + info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires KDE >= %1.").tqarg("3.2") << "</font>"; //XINE-LIB //Should engine depending stuff be here? /* info << "<br><hr><b>" << "xine-lib" << "...</b><br>"; - QString xineVersion = xine_get_version_string(); + TQString xineVersion = xine_get_version_string(); info << i18n("Found version") << ": " << xineVersion << "<br>"; if (xine_check_version(1,0,0)) { int major, minor, sub; xine_get_version(&major, &minor, &sub); - if (xineVersion.contains("CVS", false)) + if (xineVersion.tqcontains("CVS", false)) info << "<font color=\"DarkBlue\">" << i18n("Developer version.") << "</font>"; - if ((major == 1) && (minor == 0) && (sub == 0) && (xineVersion.contains("rc", false))) + if ((major == 1) && (minor == 0) && (sub == 0) && (xineVersion.tqcontains("rc", false))) { - info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires xine-lib >= %1. Download the latest version here:").arg("1.0") << " <a href=\"http://www.xinehq.de\">http://www.xinehq.de</a>.</font>"; + info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires xine-lib >= %1. Download the latest version here:").tqarg("1.0") << " <a href=\"http://www.xinehq.de\">http://www.xinehq.de</a>.</font>"; } else info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; } else - info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires xine-lib >= %1. Download the latest version here:").arg("1.0") + info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires xine-lib >= %1. Download the latest version here:").tqarg("1.0") << " <a href=\"http://www.xinehq.de\">http://www.xinehq.de</a>.</font>"; */ //WIN32-CODECS info << "<hr><b>" << i18n("WIN32 Codecs") << "...</b><br>"; - QDir d("/usr/lib/win32"); - QStringList entries = d.entryList("wmv*"); + TQDir d("/usr/lib/win32"); + TQStringList entries = d.entryList("wmv*"); if (entries.count()) info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; else @@ -118,19 +118,19 @@ void InstWizard::internalWizard() //LIBDVDCSS info << "<br><hr><b>" << "libdvdcss" << "...</b><br>"; bool dvdcss = false; - d = QDir("/usr/lib"); + d = TQDir("/usr/lib"); entries = d.entryList("libdvdcss.so*"); if (entries.count()) dvdcss = true; else { - d = QDir("/usr/local/lib"); + d = TQDir("/usr/local/lib"); entries = d.entryList("libdvdcss.so*"); if (entries.count()) dvdcss = true; else { - d = QDir("/usr/lib64"); + d = TQDir("/usr/lib64"); entries = d.entryList("libdvdcss.so*"); if (entries.count()) dvdcss = true; @@ -146,12 +146,12 @@ void InstWizard::internalWizard() info << "<br><hr><b>" << i18n("DVD Drive") << "...</b><br>"; KProcess process; process << "/sbin/hdparm" << "-d" << "/dev/dvd"; - connect(&process, SIGNAL(receivedStdout(KProcess*,char*,int)), this, SLOT(slotStdout(KProcess*, char*, int))); + connect(&process, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), this, TQT_SLOT(slotStdout(KProcess*, char*, int))); process.start(KProcess::Block, KProcess::Stdout); - if (stdout.contains('1')) + if (stdout.tqcontains('1')) info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; - else if (stdout.contains('0')) + else if (stdout.tqcontains('0')) info << "<font color=\"DarkRed\">" << i18n("DMA mode off! For smooth DVD playback run as root:") + " \"hdparm -d1 /dev/dvd\".</font>"; else info << "<font color=\"DarkBlue\">" << i18n("Can't check DMA mode. Permission denied or no such device:") @@ -172,11 +172,11 @@ void InstWizard::internalWizard() //DISTRIBUTION info << "<br><hr><b>" << i18n("Distribution") << "...</b><br>"; - if (QFile::exists("/etc/SuSE-release")) + if (TQFile::exists("/etc/SuSE-release")) { - QFile file("/etc/SuSE-release"); + TQFile file("/etc/SuSE-release"); file.open(IO_ReadOnly); - QTextStream stream(&file); + TQTextStream stream(&file); info << "<font color=\"DarkBlue\">" << i18n("Found") << ": " << stream.readLine() << ". </font>" << i18n("The xine-lib shipped by SuSE \"may lack certain features because of legal requirements (potential patent violation)\". You should use the packages from here:") << " <a href=\"http://packman.links2linux.de/?action=124\">http://packman.links2linux.de</a>."; @@ -188,7 +188,7 @@ void InstWizard::internalWizard() info << "<hr><br><b>" << i18n("RESULT") << ":</b> "; - if (infoString.contains("DarkRed")) + if (infoString.tqcontains("DarkRed")) { info << i18n("Found some problems, but nevertheless Kaffeine may work."); } @@ -202,19 +202,19 @@ void InstWizard::internalWizard() page1->setText(infoString); /************** installation options **********************/ - QVBox* page2 = new QVBox(this); + TQVBox* page2 = new TQVBox(this); page2->setSpacing(20); - QCheckBox *m_useMMSHelper = new QCheckBox(i18n("Use Kaffeine as helper application for mms:// (Microsoft Media) streams"), page2); + TQCheckBox *m_useMMSHelper = new TQCheckBox(i18n("Use Kaffeine as helper application for mms:// (Microsoft Media) streams"), page2); if (!locateLocal("services", "mms.protocol")) m_useMMSHelper->setChecked(true); - QCheckBox *m_useRTSPHelper = new QCheckBox(i18n("Use Kaffeine as helper application for rtsp:// (Real Media and others) streams"), page2); + TQCheckBox *m_useRTSPHelper = new TQCheckBox(i18n("Use Kaffeine as helper application for rtsp:// (Real Media and others) streams"), page2); if (!locateLocal("services", "rtsp.protocol")) m_useRTSPHelper->setChecked(true); - QCheckBox *m_createDesktopIcon = new QCheckBox(i18n("Create a Kaffeine icon on desktop"), page2); - if (!QFile::exists( QDir::homeDirPath() + "/Desktop/kaffeine.desktop")) + TQCheckBox *m_createDesktopIcon = new TQCheckBox(i18n("Create a Kaffeine icon on desktop"), page2); + if (!TQFile::exists( TQDir::homeDirPath() + "/Desktop/kaffeine.desktop")) m_createDesktopIcon->setChecked(true); addPage(page2, i18n("Installation Options")); @@ -223,15 +223,15 @@ void InstWizard::internalWizard() setHelpEnabled(page2, false); setFinishEnabled(page2, true); - if (exec() == QDialog::Accepted) { + if (exec() == TQDialog::Accepted) { kdDebug() << "WizardDialog: finished pressed" << endl; KProcess process; - QStringList dirs = KGlobal::dirs()->findDirs("data", "kaffeine"); - QString homePath = KGlobal::dirs()->localkdedir(); + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kaffeine"); + TQString homePath = KGlobal::dirs()->localkdedir(); kdDebug() << "WizardDialog: KDE homedir: " << homePath << endl; - QString dataPath; + TQString dataPath; if (dirs[0].left(homePath.length()) != homePath) /* global data path */ dataPath = dirs[0]; else @@ -262,8 +262,8 @@ void InstWizard::internalWizard() if (m_createDesktopIcon->isChecked()) { - process << "cp" << dataPath + "kaffeine.desktop" << QDir::homeDirPath() + "/Desktop/kaffeine.desktop"; - kdDebug() << "WizardDialog: cp " << dataPath + "kaffeine.desktop" << " " << QDir::homeDirPath() + "/Desktop/kaffeine.desktop" << endl; + process << "cp" << dataPath + "kaffeine.desktop" << TQDir::homeDirPath() + "/Desktop/kaffeine.desktop"; + kdDebug() << "WizardDialog: cp " << dataPath + "kaffeine.desktop" << " " << TQDir::homeDirPath() + "/Desktop/kaffeine.desktop" << endl; process.start(KProcess::Block); process.clearArguments(); } @@ -272,7 +272,7 @@ void InstWizard::internalWizard() void InstWizard::slotStdout(KProcess *, char *buffer, int buflen) { - QString output = QString::fromLatin1(buffer, buflen); + TQString output = TQString::tqfromLatin1(buffer, buflen); kdDebug() << "WizardDialog: got from hdparm: " << output << "\n"; stdout.append(output); } diff --git a/kaffeine/src/instwizard.h b/kaffeine/src/instwizard.h index bf44d24..a85b643 100644 --- a/kaffeine/src/instwizard.h +++ b/kaffeine/src/instwizard.h @@ -32,6 +32,7 @@ class KProcess; class InstWizard : private KWizard { Q_OBJECT + TQ_OBJECT public: static void showWizard() { @@ -44,7 +45,7 @@ private: void internalWizard(); - QString stdout; + TQString stdout; InstWizard(const InstWizard &); InstWizard operator=(const InstWizard &); diff --git a/kaffeine/src/kaffeine.cpp b/kaffeine/src/kaffeine.cpp index 4411f27..8d47b3f 100644 --- a/kaffeine/src/kaffeine.cpp +++ b/kaffeine/src/kaffeine.cpp @@ -58,13 +58,13 @@ #include <kapplication.h> #include <kdeversion.h> -#include <qdir.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qinputdialog.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqinputdialog.h> #include <kurldrag.h> -#include <qsignalmapper.h> -#include <qdockarea.h> +#include <tqsignalmapper.h> +#include <tqdockarea.h> #include "kaffeine.moc" #include "kaffeinepart.h" @@ -140,7 +140,7 @@ Kaffeine::Kaffeine() : DCOPObject("KaffeineIface"), if ( DVBconfig::haveDvbDevice() ) { kdDebug() << "Found DVB device." << endl; - dvbPanel = new DvbPanel( 0, this, "dvbpanel" ); + dvbPanel = new DvbPanel( 0, TQT_TQOBJECT(this), "dvbpanel" ); } else { @@ -154,12 +154,12 @@ Kaffeine::Kaffeine() : DCOPObject("KaffeineIface"), //createStandardStatusBarAction(); createGUI("kaffeineui.rc"); - //statusBar()->insertItem(i18n("Entries: %1, Playtime: %2 (Total: %3, %4)").arg("0").arg("00:00:00").arg("0").arg("00:00:00"), 9, 0, true); - //statusBar()->insertItem(i18n("Entries: %1, Playtime: %2").arg("0").arg("0:00:00"), 9, 0, true); + //statusBar()->insertItem(i18n("Entries: %1, Playtime: %2 (Total: %3, %4)").tqarg("0").tqarg("00:00:00").tqarg("0").tqarg("00:00:00"), 9, 0, true); + //statusBar()->insertItem(i18n("Entries: %1, Playtime: %2").tqarg("0").tqarg("0:00:00"), 9, 0, true); //statusBar()->insertItem(i18n("No player"), 10, 0, true); - QString stamp = locateLocal("appdata", "wizard_stamp_v0.7.1"); - if ((!QFile::exists(stamp)) || args->isSet("wizard")) + TQString stamp = locateLocal("appdata", "wizard_stamp_v0.7.1"); + if ((!TQFile::exists(stamp)) || args->isSet("wizard")) { InstWizard::showWizard(); @@ -169,36 +169,36 @@ Kaffeine::Kaffeine() : DCOPObject("KaffeineIface"), process.clearArguments(); } - mainbox = new QHBox( this ); + mainbox = new TQHBox( this ); mainbox->setMouseTracking( true ); setCentralWidget(mainbox); KMultiTabBar *mtBar = new KMultiTabBar( KMultiTabBar::Vertical, mainbox ); mtBar->setPosition( KMultiTabBar::Left ); mtBar->setStyle( KMultiTabBar::VSNET ); - QWidgetStack *stack = new QWidgetStack( mainbox ); + TQWidgetStack *stack = new TQWidgetStack( mainbox ); stack->setMouseTracking( true ); inplug = new InputManager( this, stack, mtBar ); m_startWindow = new StartWindow( stack ); inplug->addStartWindow( m_startWindow, KGlobal::iconLoader()->loadIcon("kmenu", KIcon::Small), i18n("Start") ); - playerWidget = new QVBox( stack ); + playerWidget = new TQVBox( stack ); playerWidget->setMouseTracking( true ); inplug->addPlayerWidget( playerWidget, KGlobal::iconLoader()->loadIcon("kaffeine", KIcon::Small), i18n("Player Window") ); // playlist - m_playlist = new PlayList( stack, this ); + m_playlist = new PlayList( stack, TQT_TQOBJECT(this) ); inplug->add( m_playlist, KGlobal::iconLoader()->loadIcon("view_text", KIcon::Small), i18n( "Playlist") ); m_playlist->setFileFilter(DEFAULT_FILTER); guiFactory()->addClient( m_playlist ); - cddisc = new Disc( stack, this ); + cddisc = new Disc( stack, TQT_TQOBJECT(this) ); inplug->add( cddisc, KGlobal::iconLoader()->loadIcon("cdrom_unmount", KIcon::Small), i18n( "Audio CD") ); guiFactory()->addClient( cddisc ); - connect(m_playlist, SIGNAL(signalRequestForDVD(const QString&)), cddisc, SLOT(startDVD(const QString&))); - connect(m_playlist, SIGNAL(signalRequestForVCD(const QString&)), cddisc, SLOT(startVCD(const QString&))); - connect(m_playlist, SIGNAL(signalRequestForAudioCD(const QString&)), cddisc, SLOT(startCD(const QString&))); + connect(m_playlist, TQT_SIGNAL(signalRequestForDVD(const TQString&)), cddisc, TQT_SLOT(startDVD(const TQString&))); + connect(m_playlist, TQT_SIGNAL(signalRequestForVCD(const TQString&)), cddisc, TQT_SLOT(startVCD(const TQString&))); + connect(m_playlist, TQT_SIGNAL(signalRequestForAudioCD(const TQString&)), cddisc, TQT_SLOT(startCD(const TQString&))); #ifdef HAVE_DVB if ( dvbPanel ) @@ -209,7 +209,7 @@ Kaffeine::Kaffeine() : DCOPObject("KaffeineIface"), } #endif - QTextStream ts(&m_filter, IO_WriteOnly); + TQTextStream ts(&m_filter, IO_WriteOnly); ts << "|" << i18n("Supported Media Formats") << "\n" << "*.mp3 *.mpa *mpega *.m4a *.mpc *.mp+ *.MP3 *.MPA *.MPEGA *.M4A *.MPC *.MP+|" << i18n("MPEG Audio Files") << "\n" << "*.mjpeg *.mpg *.mpeg *.mp2 *.mpv *.vob *.MJPEG *.MPG *.MPEG *.MP2 *.MPV *.VOB|" << i18n("MPEG Video Files") << "\n" @@ -246,13 +246,13 @@ Kaffeine::Kaffeine() : DCOPObject("KaffeineIface"), else kdDebug() << "Window manager: not KWin - using save fullscreen mode" << endl; - connect(&m_screensaverTimer, SIGNAL(timeout()), this, SLOT(slotFakeKeyEvent())); + connect(&m_screensaverTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotFakeKeyEvent())); m_screensaverTimer.start( 55000 ); - connect( &m_numKeyHideTimer, SIGNAL(timeout()), this, SLOT(slotRequestForTrackNumber()) ); + connect( &m_numKeyHideTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotRequestForTrackNumber()) ); KAccel* accel = new KAccel(this); - accel->insert("Escape Fullscreen", Key_Escape, this, SLOT(slotEscapeFullscreen())); + accel->insert("Escape Fullscreen", Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotEscapeFullscreen())); loadConfig(); //slotChangeStatusbar(i18n("Kaffeine Player") + " " + KAFFEINE_VERSION); @@ -270,28 +270,28 @@ void Kaffeine::updateArgs() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString device = args->getOption("device"); + TQString device = args->getOption("device"); if (device != "default") { if (device.startsWith("system:/media/")) device = device.right(14).prepend("media:/"); KURL devicePath(device); DCOPRef mediamanager("kded", "mediamanager"); - DCOPReply reply = mediamanager.call("properties(QString)", devicePath.path(-1).right(1)); + DCOPReply reply = mediamanager.call("properties(TQString)", devicePath.path(-1).right(1)); if (reply.isValid()) { - QStringList properties = reply; + TQStringList properties = reply; device = properties[5]; kdDebug() << "DEVICE: " << device << "\n"; } else - device = QString(); + device = TQString(); } else - device = QString(); + device = TQString(); m_device = device; - QStringList urls; + TQStringList urls; for (int i = 0; i < args->count(); i++ ) { - QDir path; - QString url = QFile::decodeName(args->arg(i)); - if ((url.left(1) != "/") && (!url.contains("://")) && (url.lower() != "dvd") && (url.lower() != "vcd") + TQDir path; + TQString url = TQFile::decodeName(args->arg(i)); + if ((url.left(1) != "/") && (!url.tqcontains("://")) && (url.lower() != "dvd") && (url.lower() != "vcd") && (url.lower() != "audiocd") && (url.lower() != "cdda") && (url.lower() != "dvb")) { #if KDE_IS_VERSION(3,5,0) KURL u = KIO::NetAccess::mostLocalURL(args->url(i), 0); @@ -357,7 +357,7 @@ void Kaffeine::unloadCurrentPart() } } -void Kaffeine::slotLoadPart(const QString& desktopName) +void Kaffeine::slotLoadPart(const TQString& desktopName) { kdDebug() << "Kaffeine:: Try to load service: " << desktopName << endl; @@ -367,7 +367,7 @@ void Kaffeine::slotLoadPart(const QString& desktopName) KService::Ptr service = KService::serviceByDesktopName(desktopName); if (!service) { - KMessageBox::detailedError(this, i18n("Loading of player part '%1' failed.").arg(desktopName), i18n("%1 not found in search path.").arg(QString(desktopName)+ ".desktop")); + KMessageBox::detailedError(this, i18n("Loading of player part '%1' failed.").tqarg(desktopName), i18n("%1 not found in search path.").tqarg(TQString(desktopName)+ ".desktop")); return; } @@ -380,56 +380,56 @@ void Kaffeine::slotLoadPart(const QString& desktopName) //player container widget, will contain the player part m_playerContainer = new PlayerContainer(playerWidget); - connect(m_playerContainer, SIGNAL(signalURLDropEvent(const QStringList&)), this, SLOT(slotLoadURLS(const QStringList&))); + connect(m_playerContainer, TQT_SIGNAL(signalURLDropEvent(const TQStringList&)), TQT_TQOBJECT(this), TQT_SLOT(slotLoadURLS(const TQStringList&))); - if (service->serviceTypes().contains("KaffeinePart")) { + if (service->serviceTypes().tqcontains("KaffeinePart")) { kdDebug() << "This is a KaffeinePart..." << endl; int error = 0; - m_mediaPart = KParts::ComponentFactory::createPartInstanceFromService<KaffeinePart>(service, m_playerContainer, service->name().ascii(), this, 0, m_engineParameters, &error); + m_mediaPart = KParts::ComponentFactory::createPartInstanceFromService<KaffeinePart>(service, m_playerContainer, service->name().ascii(), TQT_TQOBJECT(this), 0, m_engineParameters, &error); if (error > 0) { - KMessageBox::detailedError(this, i18n("Loading of player part '%1' failed.").arg(service->name()), KLibLoader::self()->lastErrorMessage()); + KMessageBox::detailedError(this, i18n("Loading of player part '%1' failed.").tqarg(service->name()), KLibLoader::self()->lastErrorMessage()); } else { - connect(m_mediaPart, SIGNAL(setWindowCaption(const QString&)), this, SLOT(slotChangeCaption(const QString&))); - //connect(m_mediaPart, SIGNAL(setStatusBarText(const QString&)), this, SLOT(slotChangeStatusbar(const QString&))); - connect(m_mediaPart, SIGNAL(canceled(const QString&)), this, SLOT(slotLoadingCanceled(const QString&))); - connect(m_mediaPart, SIGNAL(signalPlaybackFailed()), this, SLOT(slotPlaybackFailed())); - connect(m_mediaPart, SIGNAL(signalTrackFinished()), this, SLOT(slotNext())); - connect(m_mediaPart, SIGNAL(signalNewMeta(const MRL &)), this, SLOT(slotMetaFromPlayer(const MRL &))); - connect(m_mediaPart, SIGNAL(signalNewFrameSize(const QSize&)), this, SLOT(slotNewFrameSize(const QSize&))); - connect(m_mediaPart, SIGNAL(signalRequestCurrentTrack()), this, SLOT(slotRequestForCurrentTrack())); - connect(m_mediaPart, SIGNAL(signalRequestNextTrack()), this, SLOT(slotRequestForNextTrack())); - connect(m_mediaPart, SIGNAL(signalRequestPreviousTrack()), this, SLOT(slotRequestForPreviousTrack())); - connect(m_mediaPart, SIGNAL(signalToggleMinimalMode()), this, SLOT(slotToggleMinimalModeFromPlayer())); + connect(m_mediaPart, TQT_SIGNAL(setWindowCaption(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeCaption(const TQString&))); + //connect(m_mediaPart, TQT_SIGNAL(setStatusBarText(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeStatusbar(const TQString&))); + connect(m_mediaPart, TQT_SIGNAL(canceled(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotLoadingCanceled(const TQString&))); + connect(m_mediaPart, TQT_SIGNAL(signalPlaybackFailed()), TQT_TQOBJECT(this), TQT_SLOT(slotPlaybackFailed())); + connect(m_mediaPart, TQT_SIGNAL(signalTrackFinished()), TQT_TQOBJECT(this), TQT_SLOT(slotNext())); + connect(m_mediaPart, TQT_SIGNAL(signalNewMeta(const MRL &)), TQT_TQOBJECT(this), TQT_SLOT(slotMetaFromPlayer(const MRL &))); + connect(m_mediaPart, TQT_SIGNAL(signalNewFrameSize(const TQSize&)), TQT_TQOBJECT(this), TQT_SLOT(slotNewFrameSize(const TQSize&))); + connect(m_mediaPart, TQT_SIGNAL(signalRequestCurrentTrack()), TQT_TQOBJECT(this), TQT_SLOT(slotRequestForCurrentTrack())); + connect(m_mediaPart, TQT_SIGNAL(signalRequestNextTrack()), TQT_TQOBJECT(this), TQT_SLOT(slotRequestForNextTrack())); + connect(m_mediaPart, TQT_SIGNAL(signalRequestPreviousTrack()), TQT_TQOBJECT(this), TQT_SLOT(slotRequestForPreviousTrack())); + connect(m_mediaPart, TQT_SIGNAL(signalToggleMinimalMode()), TQT_TQOBJECT(this), TQT_SLOT(slotToggleMinimalModeFromPlayer())); if ( service->library()=="libxinepart" ) - connect( this, SIGNAL(showOSD(const QString&,int,int)), m_mediaPart, SLOT(requestForOSD(const QString&,int,int)) ); + connect( this, TQT_SIGNAL(showOSD(const TQString&,int,int)), m_mediaPart, TQT_SLOT(requestForOSD(const TQString&,int,int)) ); #ifdef HAVE_DVB if ( service->library()=="libxinepart" && dvbPanel ) { - connect( dvbPanel, SIGNAL(dvbPause(bool)), m_mediaPart, SLOT(slotTogglePause(bool)) ); - connect( dvbPanel, SIGNAL(dvbOpen(const QString&,const QString&,int)), m_mediaPart, SLOT(slotDvbOpen(const QString&,const QString&,int)) ); - connect( dvbPanel, SIGNAL(dvbStop()), m_mediaPart, SLOT(slotStop()) ); - connect( m_mediaPart, SIGNAL(stopDvb()), dvbPanel, SLOT(stopLive()) ); - connect( m_mediaPart, SIGNAL(playerPause()), dvbPanel, SLOT(pauseLiveTV()) ); - connect( dvbPanel, SIGNAL(setTimeShiftFilename(const QString&)), m_mediaPart, SLOT(getTimeShiftFilename(const QString&)) ); - connect( dvbPanel, SIGNAL(showOSD(const QString&,int,int)), m_mediaPart, SLOT(requestForOSD(const QString&,int,int)) ); - connect( dvbPanel, SIGNAL(showDvbOSD(const QString&, const QStringList&)), m_mediaPart, SLOT(setDvbCurrentNext(const QString&, const QStringList&)) ); - connect( m_mediaPart, SIGNAL(dvbOSDHide()), dvbPanel, SLOT(dvbOSDHide())); + connect( dvbPanel, TQT_SIGNAL(dvbPause(bool)), m_mediaPart, TQT_SLOT(slotTogglePause(bool)) ); + connect( dvbPanel, TQT_SIGNAL(dvbOpen(const TQString&,const TQString&,int)), m_mediaPart, TQT_SLOT(slotDvbOpen(const TQString&,const TQString&,int)) ); + connect( dvbPanel, TQT_SIGNAL(dvbStop()), m_mediaPart, TQT_SLOT(slotStop()) ); + connect( m_mediaPart, TQT_SIGNAL(stopDvb()), dvbPanel, TQT_SLOT(stopLive()) ); + connect( m_mediaPart, TQT_SIGNAL(playerPause()), dvbPanel, TQT_SLOT(pauseLiveTV()) ); + connect( dvbPanel, TQT_SIGNAL(setTimeShiftFilename(const TQString&)), m_mediaPart, TQT_SLOT(getTimeShiftFilename(const TQString&)) ); + connect( dvbPanel, TQT_SIGNAL(showOSD(const TQString&,int,int)), m_mediaPart, TQT_SLOT(requestForOSD(const TQString&,int,int)) ); + connect( dvbPanel, TQT_SIGNAL(showDvbOSD(const TQString&, const TQStringList&)), m_mediaPart, TQT_SLOT(setDvbCurrentNext(const TQString&, const TQStringList&)) ); + connect( m_mediaPart, TQT_SIGNAL(dvbOSDHide()), dvbPanel, TQT_SLOT(dvbOSDHide())); dvbPanel->enableLiveDvb( true ); } #endif if ( service->library()=="libxinepart" && dvbClient ) { - connect( dvbClient, SIGNAL(dvbOpen(const QString&,const QString&,int)), m_mediaPart, SLOT(slotDvbOpen(const QString&,const QString&,int)) ); - connect( m_mediaPart, SIGNAL(stopDvb()), dvbClient, SLOT(stopLive()) ); - connect( dvbClient, SIGNAL(dvbStop()), m_mediaPart, SLOT(slotStop()) ); - connect( m_mediaPart, SIGNAL(playerPause()), dvbClient, SLOT(pauseLiveTV()) ); - connect( dvbClient, SIGNAL(setTimeShiftFilename(const QString&)), m_mediaPart, SLOT(getTimeShiftFilename(const QString&)) ); + connect( dvbClient, TQT_SIGNAL(dvbOpen(const TQString&,const TQString&,int)), m_mediaPart, TQT_SLOT(slotDvbOpen(const TQString&,const TQString&,int)) ); + connect( m_mediaPart, TQT_SIGNAL(stopDvb()), dvbClient, TQT_SLOT(stopLive()) ); + connect( dvbClient, TQT_SIGNAL(dvbStop()), m_mediaPart, TQT_SLOT(slotStop()) ); + connect( m_mediaPart, TQT_SIGNAL(playerPause()), dvbClient, TQT_SLOT(pauseLiveTV()) ); + connect( dvbClient, TQT_SIGNAL(setTimeShiftFilename(const TQString&)), m_mediaPart, TQT_SLOT(getTimeShiftFilename(const TQString&)) ); dvbClient->enableLive( true ); } m_currentPartService = desktopName; m_playlist->setFileFilter(DEFAULT_FILTER); - //QString playerName = service->name(); - QString playerName = m_mediaPart->instance()->aboutData()->programName(); + //TQString playerName = service->name(); + TQString playerName = m_mediaPart->instance()->aboutData()->programName(); if (playerName.length() > 20) { playerName.truncate(17); playerName = playerName + "..."; @@ -446,16 +446,16 @@ void Kaffeine::slotLoadPart(const QString& desktopName) inplug->setPlayerContainer( m_playerContainer ); } -void Kaffeine::slotLoadingCanceled(const QString& message) +void Kaffeine::slotLoadingCanceled(const TQString& message) { - QString name; + TQString name; if (m_mediaPart) { name = m_mediaPart->name(); delete m_mediaPart; m_mediaPart = NULL; } - KMessageBox::detailedError(this, i18n("Loading of player part '%1' failed.").arg(name), message); + KMessageBox::detailedError(this, i18n("Loading of player part '%1' failed.").tqarg(name), message); } void Kaffeine::slotPlaybackFailed() @@ -467,24 +467,24 @@ void Kaffeine::slotPlaybackFailed() m_mediaPart->closeURL(); } -void Kaffeine::load(const QString& url) +void Kaffeine::load(const TQString& url) { - load(QStringList(url)); + load(TQStringList(url)); } -void Kaffeine::load(const QStringList& urllist) +void Kaffeine::load(const TQStringList& urllist) { if (!urllist.count()) return; - if (urllist[0].contains(".kaffeine", false)) + if (urllist[0].tqcontains(".kaffeine", false)) { m_playlist->loadPlaylist(urllist[0]); } else { m_playlist->add(urllist, NULL); - QListViewItem* tmp = m_playlist->findByURL(urllist.first()); + TQListViewItem* tmp = m_playlist->findByURL(urllist.first()); if (tmp) { m_playlist->setCurrentEntry(tmp); @@ -493,7 +493,7 @@ void Kaffeine::load(const QStringList& urllist) } } -void Kaffeine::slotLoadURLS(const QStringList& list) +void Kaffeine::slotLoadURLS(const TQStringList& list) { loadTMP(list); } @@ -503,8 +503,8 @@ void Kaffeine::slotPlay(const MRL& mrl) if (m_mediaPart) { m_mediaPart->openURL(mrl); - if ( !mrl.mime().contains("audio") ) - QTimer::singleShot(300, this, SLOT(slotSwitchToPlayerWindow())); + if ( !mrl.mime().tqcontains("audio") ) + TQTimer::singleShot(300, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchToPlayerWindow())); } } @@ -587,7 +587,7 @@ void Kaffeine::slotNumKeyInput( int n ) return; } - QString s; + TQString s; if ( m_numKeyHideTimer.isActive() ) { m_numKeyHideTimer.stop(); @@ -635,17 +635,17 @@ void Kaffeine::slotMetaFromPlayer(const MRL &mrl) } /* -void Kaffeine::dragEnterEvent(QDragEnterEvent *dev) +void Kaffeine::dragEnterEvent(TQDragEnterEvent *dev) { kdDebug() << "Kaffeine: drag enter even" << endl; - dev->accept(QUriDrag::canDecode(dev) || QTextDrag::canDecode(dev)); + dev->accept(TQUriDrag::canDecode(dev) || TQTextDrag::canDecode(dev)); } -void Kaffeine::dropEvent(QDropEvent* dev) +void Kaffeine::dropEvent(TQDropEvent* dev) { - QStringList urls; + TQStringList urls; - if (QUriDrag::decodeToUnicodeUris(dev, urls)) + if (TQUriDrag::decodeToUnicodeUris(dev, urls)) { kdDebug() << "Kaffeine: " << urls.count() << " urls dropped..." << endl; load(urls); @@ -653,8 +653,8 @@ void Kaffeine::dropEvent(QDropEvent* dev) else if (strcmp(dev->format(), "text/x-moz-url") == 0) // for mozilla drops { - QByteArray data = dev->encodedData("text/plain"); - QString md(data); + TQByteArray data = dev->tqencodedData("text/plain"); + TQString md(data); load(md); } } @@ -663,35 +663,35 @@ void Kaffeine::dropEvent(QDropEvent* dev) void Kaffeine::setupActions() { /* file menu */ - KStdAction::open(this, SLOT(slotOpenFile()), actionCollection(), "file_open"); - new KAction(i18n("Open &URL..."), "www", CTRL|Key_U, this, SLOT(slotOpenURL()), actionCollection(), "file_open_url"); - new KAction(i18n("Open D&irectory..."), "folder_video", 0, this, SLOT(slotOpenDirectory()), actionCollection(), "file_open_directory"); - m_recent = KStdAction::openRecent(this, SLOT(slotPlayRecent(const KURL&)), actionCollection(), "file_open_recent"); - m_sleepAfterPlay = new KToggleAction(i18n("Quit && Shutoff Monitor After This Track"), 0, 0, this, SLOT(slotSleepAfterPlayMenu()), actionCollection(), "sleep_after_play"); - m_quitAfterPlay = new KToggleAction(i18n("Quit After This Track"), 0, 0, this, SLOT(slotQuitAfterPlayMenu()), actionCollection(), "quit_after_play"); - m_quitAfterPlaylist = new KToggleAction(i18n("Quit After Playlist"), 0, 0, this, SLOT(slotQuitAfterPlaylistMenu()), actionCollection(), "quit_after_playlist"); - KStdAction::quit(this, SLOT(slotQuit()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpenFile()), actionCollection(), "file_open"); + new KAction(i18n("Open &URL..."), "www", CTRL|Key_U, TQT_TQOBJECT(this), TQT_SLOT(slotOpenURL()), actionCollection(), "file_open_url"); + new KAction(i18n("Open D&irectory..."), "folder_video", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenDirectory()), actionCollection(), "file_open_directory"); + m_recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotPlayRecent(const KURL&)), actionCollection(), "file_open_recent"); + m_sleepAfterPlay = new KToggleAction(i18n("Quit && Shutoff Monitor After This Track"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSleepAfterPlayMenu()), actionCollection(), "sleep_after_play"); + m_quitAfterPlay = new KToggleAction(i18n("Quit After This Track"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotQuitAfterPlayMenu()), actionCollection(), "quit_after_play"); + m_quitAfterPlaylist = new KToggleAction(i18n("Quit After Playlist"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotQuitAfterPlaylistMenu()), actionCollection(), "quit_after_playlist"); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); /*view menu */ - m_fullscreen = KStdAction::fullScreen(this, SLOT(slotToggleFullscreen()), actionCollection(), this, "view_fullscreen"); - m_minimal = new KToggleAction(i18n("&Minimal Mode"), 0, Key_M, this, SLOT(slotToggleMinimalMode()), actionCollection(), "view_minimal"); - new KAction(i18n("Toggle &Playlist/Player"), 0, Key_P, this, SLOT(slotTogglePlaylist()), actionCollection(), "view_toggle_tab"); - m_originalAspect = new KToggleAction(i18n("Keep &Original Aspect"), 0, 0, this, SLOT(slotOriginalAspect()), actionCollection(), "view_original_aspect"); - m_autoResizeOff = new KToggleAction(i18n("Off"), 0, ALT|Key_0, this, SLOT(slotAutoresizeOff()), actionCollection(), "view_auto_resize_off"); - m_autoResizeOriginal = new KToggleAction(i18n("Original Size"), 0, ALT|Key_1, this, SLOT(slotAutoresizeOriginal()), actionCollection(), "view_auto_resize_original"); - m_autoResizeDouble = new KToggleAction(i18n("Double Size"), 0, ALT|Key_2, this, SLOT(slotAutoresizeDouble()), actionCollection(), "view_auto_resize_double"); - m_autoResizeTriple = new KToggleAction(i18n("Triple Size"), 0, ALT|Key_3, this, SLOT(slotAutoresizeTriple()), actionCollection(), "view_auto_resize_triple"); + m_fullscreen = KStdAction::fullScreen(TQT_TQOBJECT(this), TQT_SLOT(slotToggleFullscreen()), actionCollection(), this, "view_fullscreen"); + m_minimal = new KToggleAction(i18n("&Minimal Mode"), 0, Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotToggleMinimalMode()), actionCollection(), "view_minimal"); + new KAction(i18n("Toggle &Playlist/Player"), 0, Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotTogglePlaylist()), actionCollection(), "view_toggle_tab"); + m_originalAspect = new KToggleAction(i18n("Keep &Original Aspect"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOriginalAspect()), actionCollection(), "view_original_aspect"); + m_autoResizeOff = new KToggleAction(i18n("Off"), 0, ALT|Key_0, TQT_TQOBJECT(this), TQT_SLOT(slotAutoresizeOff()), actionCollection(), "view_auto_resize_off"); + m_autoResizeOriginal = new KToggleAction(i18n("Original Size"), 0, ALT|Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotAutoresizeOriginal()), actionCollection(), "view_auto_resize_original"); + m_autoResizeDouble = new KToggleAction(i18n("Double Size"), 0, ALT|Key_2, TQT_TQOBJECT(this), TQT_SLOT(slotAutoresizeDouble()), actionCollection(), "view_auto_resize_double"); + m_autoResizeTriple = new KToggleAction(i18n("Triple Size"), 0, ALT|Key_3, TQT_TQOBJECT(this), TQT_SLOT(slotAutoresizeTriple()), actionCollection(), "view_auto_resize_triple"); m_playersMenu = new KActionMenu(i18n("&Player Engine"), actionCollection(), "options_player"); - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::preferences(this, SLOT(slotPreferences()), actionCollection(), "options_preferences"); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection(), "options_preferences"); /* fill players action menu */ - QSignalMapper* mapper = new QSignalMapper(this); - connect(mapper, SIGNAL(mapped(const QString&)), this, SLOT(slotLoadPart(const QString&))); + TQSignalMapper* mapper = new TQSignalMapper(TQT_TQOBJECT(this)); + connect(mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotLoadPart(const TQString&))); KAction* action = NULL; - QStringList mediaParts; + TQStringList mediaParts; // check for kaffeine parts KTrader::OfferList offers = KTrader::self()->query("audio/x-mp3", "'KaffeinePart' in ServiceTypes"); @@ -700,7 +700,7 @@ void Kaffeine::setupActions() { KService::Ptr ptr = (*it); - action = new KAction(ptr->name(), ptr->icon(), 0, mapper, SLOT(map()), actionCollection()); + action = new KAction(ptr->name(), ptr->icon(), 0, mapper, TQT_SLOT(map()), actionCollection()); if (!ptr->comment().isNull()) action->setToolTip(ptr->comment()); mapper->setMapping(action, ptr->desktopEntryName()); @@ -708,7 +708,7 @@ void Kaffeine::setupActions() mediaParts.append(ptr->name()); } - QAccel *acn = new QAccel( this ); + TQAccel *acn = new TQAccel( this ); acn->insertItem( Key_0, 10 ); acn->insertItem( Key_1, 11 ); acn->insertItem( Key_2, 12 ); @@ -719,7 +719,7 @@ void Kaffeine::setupActions() acn->insertItem( Key_7, 17 ); acn->insertItem( Key_8, 18 ); acn->insertItem( Key_9, 19 ); - connect( acn, SIGNAL(activated(int)), this, SLOT(slotNumKeyInput(int)) ); + connect( acn, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotNumKeyInput(int)) ); } void Kaffeine::slotDVBNextBack(int dir) @@ -792,11 +792,11 @@ void Kaffeine::loadConfig() m_dvbClientAddress = config->readEntry("DvbClientAddress", "192.168.0.255"); m_dvbClientPort = config->readNumEntry("DvbClientPort", 1234); m_dvbClientInfo = config->readNumEntry("DvbClientInfo", 1235); - m_dvbClientShiftPath = config->readEntry("DvbClientShiftPath", QDir::homeDirPath() ); + m_dvbClientShiftPath = config->readEntry("DvbClientShiftPath", TQDir::homeDirPath() ); if ( m_dvbClientEnabled ) { - dvbClient = new CdWidget( m_dvbClientAddress, m_dvbClientPort, m_dvbClientInfo, m_dvbClientShiftPath, this, this, "cdwidget"); + dvbClient = new CdWidget( m_dvbClientAddress, m_dvbClientPort, m_dvbClientInfo, m_dvbClientShiftPath, this, TQT_TQOBJECT(this), "cdwidget"); inplug->add( dvbClient, KGlobal::iconLoader()->loadIcon("network", KIcon::Small), i18n( "DVB client") ); } else @@ -805,7 +805,7 @@ void Kaffeine::loadConfig() //inplug->setActivePlugin( config->readEntry("Active Browser", "") ); config->setGroup("Player Part"); - QString partName = config->readEntry("Last Service Desktop Name", DEFAULT_PLAYER_PART); + TQString partName = config->readEntry("Last Service Desktop Name", DEFAULT_PLAYER_PART); // don't load the old kaffeine_part. if ( partName=="kaffeine_part" ) partName=DEFAULT_PLAYER_PART; @@ -852,7 +852,7 @@ void Kaffeine::saveConfig() inplug->saveConfig(); } -void Kaffeine::showEvent(QShowEvent*) +void Kaffeine::showEvent(TQShowEvent*) { if (m_mediaPart) { @@ -863,7 +863,7 @@ void Kaffeine::showEvent(QShowEvent*) m_autoPaused = false; } -void Kaffeine::hideEvent (QHideEvent*) +void Kaffeine::hideEvent (TQHideEvent*) { if (m_mediaPart && m_pauseVideo) { @@ -882,17 +882,17 @@ void Kaffeine::slotPreferences() KaffeinePreferences dlg; dlg.setConfig(m_pauseVideo, m_embedSystemTray, m_osdDuration, m_useAlternateEncoding, m_alternateEncoding); dlg.setDvbClient( m_dvbClientEnabled, m_dvbClientAddress, m_dvbClientPort, m_dvbClientInfo, m_dvbClientShiftPath ); - connect(&dlg, SIGNAL(signalClearRecent()), this, SLOT(slotClearRecent())); - connect(&dlg, SIGNAL(signalEmbedSystemTray(bool)), this, SLOT(slotSystemTray(bool))); - connect(&dlg, SIGNAL(signalUseAlternateEncoding(bool)), this, SLOT(slotUseAlternateEncoding(bool))); - connect(&dlg, SIGNAL(signalAlternateEncoding(const QString&)), this, SLOT(slotAlternateEncoding(const QString&))); - connect(&dlg, SIGNAL(signalSetOSDTimeout(uint)), this, SLOT(slotSetOSDTimeout(uint))); - connect(&dlg, SIGNAL(signalPauseVideo(bool)), this, SLOT(slotPauseVideo(bool))); - connect(&dlg, SIGNAL(signalDvbClient(bool,const QString&,int,int,const QString&)), this, SLOT(slotDvbClient(bool,const QString&,int,int,const QString&))); + connect(&dlg, TQT_SIGNAL(signalClearRecent()), TQT_TQOBJECT(this), TQT_SLOT(slotClearRecent())); + connect(&dlg, TQT_SIGNAL(signalEmbedSystemTray(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSystemTray(bool))); + connect(&dlg, TQT_SIGNAL(signalUseAlternateEncoding(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotUseAlternateEncoding(bool))); + connect(&dlg, TQT_SIGNAL(signalAlternateEncoding(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotAlternateEncoding(const TQString&))); + connect(&dlg, TQT_SIGNAL(signalSetOSDTimeout(uint)), TQT_TQOBJECT(this), TQT_SLOT(slotSetOSDTimeout(uint))); + connect(&dlg, TQT_SIGNAL(signalPauseVideo(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotPauseVideo(bool))); + connect(&dlg, TQT_SIGNAL(signalDvbClient(bool,const TQString&,int,int,const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotDvbClient(bool,const TQString&,int,int,const TQString&))); dlg.exec(); } -void Kaffeine::slotDvbClient( bool enabled, const QString &address, int port, int info, const QString &tspath ) +void Kaffeine::slotDvbClient( bool enabled, const TQString &address, int port, int info, const TQString &tspath ) { if ( enabled!=m_dvbClientEnabled ) { @@ -903,14 +903,14 @@ void Kaffeine::slotDvbClient( bool enabled, const QString &address, int port, in } else { - dvbClient = new CdWidget(address, port, info, tspath, this, this, "cdwidget"); + dvbClient = new CdWidget(address, port, info, tspath, this, TQT_TQOBJECT(this), "cdwidget"); if ( m_mediaPart ) { - connect( dvbClient, SIGNAL(dvbOpen(const QString&,const QString&,int)), m_mediaPart, SLOT(slotDvbOpen(const QString&,const QString&,int)) ); - connect( m_mediaPart, SIGNAL(stopDvb()), dvbClient, SLOT(stopLive()) ); - connect( dvbClient, SIGNAL(dvbStop()), m_mediaPart, SLOT(slotStop()) ); - connect( m_mediaPart, SIGNAL(playerPause()), dvbClient, SLOT(pauseLiveTV()) ); - connect( dvbClient, SIGNAL(setTimeShiftFilename(const QString&)), m_mediaPart, SLOT(getTimeShiftFilename(const QString&)) ); + connect( dvbClient, TQT_SIGNAL(dvbOpen(const TQString&,const TQString&,int)), m_mediaPart, TQT_SLOT(slotDvbOpen(const TQString&,const TQString&,int)) ); + connect( m_mediaPart, TQT_SIGNAL(stopDvb()), dvbClient, TQT_SLOT(stopLive()) ); + connect( dvbClient, TQT_SIGNAL(dvbStop()), m_mediaPart, TQT_SLOT(slotStop()) ); + connect( m_mediaPart, TQT_SIGNAL(playerPause()), dvbClient, TQT_SLOT(pauseLiveTV()) ); + connect( dvbClient, TQT_SIGNAL(setTimeShiftFilename(const TQString&)), m_mediaPart, TQT_SLOT(getTimeShiftFilename(const TQString&)) ); dvbClient->enableLive( true ); } inplug->add( dvbClient, KGlobal::iconLoader()->loadIcon("network", KIcon::Small), i18n( "DVB client") ); @@ -959,8 +959,8 @@ void Kaffeine::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -977,12 +977,12 @@ void Kaffeine::slotSystemTray(bool embed) if (!m_systemTray) { m_systemTray = new SystemTray(this); - connect(m_systemTray, SIGNAL(signalPlay()), this, SLOT(slotPlayUnPause())); - connect(m_systemTray, SIGNAL(signalNext()), this, SLOT(slotRequestForNextTrack())); - connect(m_systemTray, SIGNAL(signalPrevious()), this, SLOT(slotRequestForPreviousTrack())); - connect(m_systemTray, SIGNAL(signalStop()), this, SLOT(slotStop())); - connect(m_systemTray, SIGNAL(signalMute()), this, SLOT(slotMute())); - connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotQuit())); + connect(m_systemTray, TQT_SIGNAL(signalPlay()), TQT_TQOBJECT(this), TQT_SLOT(slotPlayUnPause())); + connect(m_systemTray, TQT_SIGNAL(signalNext()), TQT_TQOBJECT(this), TQT_SLOT(slotRequestForNextTrack())); + connect(m_systemTray, TQT_SIGNAL(signalPrevious()), TQT_TQOBJECT(this), TQT_SLOT(slotRequestForPreviousTrack())); + connect(m_systemTray, TQT_SIGNAL(signalStop()), TQT_TQOBJECT(this), TQT_SLOT(slotStop())); + connect(m_systemTray, TQT_SIGNAL(signalMute()), TQT_TQOBJECT(this), TQT_SLOT(slotMute())); + connect(m_systemTray, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(slotQuit())); m_systemTray->show(); } } @@ -1013,7 +1013,7 @@ void Kaffeine::slotSleepAfterPlayMenu() { if (m_sleepAfterPlay->isChecked()) { - KMessageBox::information(this, i18n("This will quit Kaffeine and shut off the monitor's power after the file/playlist has finished. Option \"dpms\" must be in your X config file for the monitor to power off."), QString::null, "sleep_info", 1); + KMessageBox::information(this, i18n("This will quit Kaffeine and shut off the monitor's power after the file/playlist has finished. Option \"dpms\" must be in your X config file for the monitor to power off."), TQString(), "sleep_info", 1); } } #endif @@ -1071,11 +1071,11 @@ void Kaffeine::slotQuitAfterPlay() void Kaffeine::slotOpenFile() { - QString fileFilter = m_filter; + TQString fileFilter = m_filter; fileFilter.prepend(" *.m3u *.pls *.kaffeine *.M3U *.PLS *.KAFFEINE"); if (m_mediaPart) { - QString extensions = m_mediaPart->supportedExtensions(); + TQString extensions = m_mediaPart->supportedExtensions(); kdDebug() << extensions << endl; if (extensions.isNull()) extensions = DEFAULT_FILTER; @@ -1087,10 +1087,10 @@ void Kaffeine::slotOpenFile() KURL::List kurlList = KFileDialog::getOpenURLs(":kaffeine_openFile", fileFilter, 0, i18n("Open File(s)")); for (KURL::List::Iterator it = kurlList.begin(); it != kurlList.end(); ++it) - if ((*it).isLocalFile() && (*it).path().endsWith(".iso", false)) + if ((*it).isLocalFile() && (*it).path().tqendsWith(".iso", false)) (*it).setProtocol("dvd"); - QStringList urlList = kurlList.toStringList(); + TQStringList urlList = kurlList.toStringList(); if (urlList.count() > 0) load(urlList); @@ -1116,7 +1116,7 @@ void Kaffeine::slotSwitchToPlayerWindow() } } -void Kaffeine::slotCurrentTabChanged(QWidget*) +void Kaffeine::slotCurrentTabChanged(TQWidget*) { } @@ -1174,10 +1174,10 @@ void Kaffeine::slotToggleFullscreen() * uuuh, ugly :-) * make sure there is no frame border around the player window */ - QFrame* tabFrame = dynamic_cast<QFrame*>(m_playerContainer->parentWidget()); + TQFrame* tabFrame = dynamic_cast<TQFrame*>(m_playerContainer->tqparentWidget()); if (tabFrame) { - tabFrame->setFrameShape(QFrame::NoFrame); + tabFrame->setFrameShape(TQFrame::NoFrame); tabFrame->setLineWidth(0); } @@ -1193,10 +1193,10 @@ void Kaffeine::slotToggleFullscreen() else { // restore frame style - QFrame* tabFrame = dynamic_cast<QFrame*>(m_playerContainer->parentWidget()); + TQFrame* tabFrame = dynamic_cast<TQFrame*>(m_playerContainer->tqparentWidget()); if (tabFrame) { - tabFrame->setFrameStyle(QFrame::TabWidgetPanel | QFrame::Raised); + tabFrame->setFrameStyle(TQFrame::TabWidgetPanel | TQFrame::Raised); tabFrame->setLineWidth(0); } @@ -1252,16 +1252,16 @@ void Kaffeine::hideToolbars(bool hide) } } -void Kaffeine::mouseDoubleClickEvent(QMouseEvent*) +void Kaffeine::mouseDoubleClickEvent(TQMouseEvent*) { // kdDebug() << "Kaffeine: doubleclick" << endl; fullscreen(); } -void Kaffeine::mousePressEvent(QMouseEvent* mev) +void Kaffeine::mousePressEvent(TQMouseEvent* mev) { kdDebug() << "Kaffeine: Mouse press event" << endl; - if ( m_minimal->isChecked() && !m_fullscreen->isChecked() && (mev->button() == MidButton) ) { + if ( m_minimal->isChecked() && !m_fullscreen->isChecked() && (mev->button() == Qt::MidButton) ) { if (topDock()->isVisible()) { hideToolbars(true); //menuBar()->hide; @@ -1274,7 +1274,7 @@ void Kaffeine::mousePressEvent(QMouseEvent* mev) mev->ignore(); } -void Kaffeine::mouseMoveEvent(QMouseEvent* mev) +void Kaffeine::mouseMoveEvent(TQMouseEvent* mev) { //kdDebug() << "Kaffeine: Mouse move event" << endl; if ( m_fullscreen->isChecked() ) { @@ -1291,17 +1291,17 @@ void Kaffeine::mouseMoveEvent(QMouseEvent* mev) mev->ignore(); } -void Kaffeine::resizeEvent(QResizeEvent* rev) +void Kaffeine::resizeEvent(TQResizeEvent* rev) { /* FIXME: don't really work proper... */ KMainWindow::resizeEvent(rev); if ((!m_noResize) && (!m_fullscreen->isChecked()) && (m_originalAspect->isChecked()) && (m_videoSize.height() != 0) && (m_videoSize.width() != 0)) { - QSize player = inplug->stackSize(); + TQSize player = inplug->stackSize(); double ratio = (double)m_videoSize.height() / (double)m_videoSize.width(); int newHeight = (int)((double)player.width() * ratio); - QSize newSize = size() - QSize(0, player.height() - newHeight); + TQSize newSize = size() - TQSize(0, player.height() - newHeight); kdDebug() << "Kaffeine: resize to orignal aspect: old size: " << size().width() << "x" << size().height() << ", video size: " << m_videoSize.width() << "x" << m_videoSize.height() << ", video ratio: " << ratio @@ -1318,7 +1318,7 @@ void Kaffeine::resizeEvent(QResizeEvent* rev) void Kaffeine::slotOriginalAspect() { if (m_originalAspect->isChecked()) - Kaffeine::resizeEvent(new QResizeEvent(QSize(), QSize())); + Kaffeine::resizeEvent(new TQResizeEvent(TQSize(), TQSize())); } void Kaffeine::autoresize() @@ -1326,14 +1326,14 @@ void Kaffeine::autoresize() if ((!m_fullscreen->isChecked()) && (m_autoResizeFactor) && (m_videoSize.height() != 0) && (m_videoSize.width() != 0)) { - QSize player, newSize; + TQSize player, newSize; /* * we do the resize twice, because after the first resize toolbars area may be much heigher */ for (uint i = 0; i < 2; i++) { player = inplug->stackSize(); - newSize = size() - QSize(player.width() - m_videoSize.width() * m_autoResizeFactor, + newSize = size() - TQSize(player.width() - m_videoSize.width() * m_autoResizeFactor, player.height() - m_videoSize.height() * m_autoResizeFactor); kdDebug() << "Kaffeine: autoresize: old size: " << size().width() << "x" << size().height() << ", video size: " << m_videoSize.width() << "x" << m_videoSize.height() @@ -1380,7 +1380,7 @@ void Kaffeine::slotAutoresizeTriple() autoresize(); } -void Kaffeine::slotNewFrameSize(const QSize& size) +void Kaffeine::slotNewFrameSize(const TQSize& size) { kdDebug() << "Kaffeine: new video frame size: " << size.width() << "x" << size.height() << endl; m_videoSize = size; @@ -1390,11 +1390,11 @@ void Kaffeine::slotNewFrameSize(const QSize& size) void Kaffeine::slotOpenURL() { bool ok; - //QString url = QInputDialog::getText(i18n("Open URL"), i18n("Enter a URL:"), QLineEdit::Normal, "", &ok); - QString url = KInputDialog::getText(i18n("Open URL"), i18n("Enter a URL:"), "", &ok); + //TQString url = TQInputDialog::getText(i18n("Open URL"), i18n("Enter a URL:"), TQLineEdit::Normal, "", &ok); + TQString url = KInputDialog::getText(i18n("Open URL"), i18n("Enter a URL:"), "", &ok); if (ok) { - if ((!(url.left(1) == "/")) && (!url.contains(":/"))) + if ((!(url.left(1) == "/")) && (!url.tqcontains(":/"))) url.prepend("http://"); // assume http protocol load(url); } @@ -1402,17 +1402,17 @@ void Kaffeine::slotOpenURL() void Kaffeine::slotOpenDirectory() { - QString s; + TQString s; if (m_mediaPart) { - QString extensions = m_mediaPart->supportedExtensions(); + TQString extensions = m_mediaPart->supportedExtensions(); if (!extensions.isNull()) m_playlist->setFileFilter(extensions); } KURL path = KDirSelectDialog::selectDirectory(":kaffeine_openDir", false, 0, i18n("Open Folder")); - QString checkSystemURL = path.prettyURL(); + TQString checkSystemURL = path.prettyURL(); if (path.isValid()) { if (path.protocol() == "media") @@ -1425,7 +1425,7 @@ void Kaffeine::slotOpenDirectory() } else { s = path.path(); - if ( QDir(s).entryList().contains("VIDEO_TS") || QDir(s).entryList().contains("video_ts") ) + if ( TQDir(s).entryList().tqcontains("VIDEO_TS") || TQDir(s).entryList().tqcontains("video_ts") ) s = s.prepend("dvd://"); load( s ); } @@ -1433,34 +1433,34 @@ void Kaffeine::slotOpenDirectory() } /* -QString Kaffeine::askForOtherDevice(const QString& type) +TQString Kaffeine::askForOtherDevice(const TQString& type) { KDialogBase* dialog = new KDialogBase( 0, "askfordrive", true, i18n("Error"), KDialogBase::Ok|KDialogBase::Cancel); - QVBox* page = dialog->makeVBoxMainWidget(); + TQVBox* page = dialog->makeVBoxMainWidget(); page->setSpacing(5); page->setMargin(5); - new QLabel(i18n("No %1 in drive, or wrong path to device.").arg(type), page); - new QLabel(QString("\n") + i18n("Please select correct drive:"), page); + new TQLabel(i18n("No %1 in drive, or wrong path to device.").tqarg(type), page); + new TQLabel(TQString("\n") + i18n("Please select correct drive:"), page); DrivesCombo* drives = new DrivesCombo(page); if (dialog->exec() == KDialogBase::Accepted) { - QString newDrive = drives->currentText(); + TQString newDrive = drives->currentText(); delete dialog; return newDrive; } else { delete dialog; - return QString::null; + return TQString(); } } */ -bool Kaffeine::loadTMP(const QStringList& list) +bool Kaffeine::loadTMP(const TQStringList& list) { - QString device=""; - QStringList sublist("smi"); + TQString device=""; + TQStringList sublist("smi"); sublist << "srt" << "sub" << "txt" << "ssa" << "asc"; if ( !m_device.isEmpty() ) { device = m_device; @@ -1469,11 +1469,11 @@ bool Kaffeine::loadTMP(const QStringList& list) if (!list.count()) return false; - QStringList::ConstIterator end(list.end()); - for (QStringList::ConstIterator it = list.begin(); it != end; ++it) { - QString url = (*it).lower(); - QString ext = url; - ext = ext.remove( 0 , ext.findRev('.')+1 ).lower(); + TQStringList::ConstIterator end(list.end()); + for (TQStringList::ConstIterator it = list.begin(); it != end; ++it) { + TQString url = (*it).lower(); + TQString ext = url; + ext = ext.remove( 0 , ext.tqfindRev('.')+1 ).lower(); if (url == "dvd") { cddisc->startDVD( device ); return true; @@ -1490,10 +1490,10 @@ bool Kaffeine::loadTMP(const QStringList& list) playDvb(); return true; } - else if ( sublist.contains(ext)) { + else if ( sublist.tqcontains(ext)) { MRL mrl = m_playlist->getCurrent(); if (!mrl.isEmpty()) { - if (!mrl.subtitleFiles().contains(url)) { + if (!mrl.subtitleFiles().tqcontains(url)) { mrl.addSubtitleFile(*it); mrl.setCurrentSubtitle(mrl.subtitleFiles().size() - 1); m_mediaPart->openURL(mrl); @@ -1526,11 +1526,11 @@ void Kaffeine::slotQuit() KApplication::exit(0); } -void Kaffeine::closeEvent(QCloseEvent* e) +void Kaffeine::closeEvent(TQCloseEvent* e) { if (m_systemTray && !kapp->sessionSaving()) { - //KMessageBox::information(this, i18n("Closing the main window will keep Kaffeine running in the system tray. Use Quit from the File menu to quit the application."), QString::null, "system_tray_info"); + //KMessageBox::information(this, i18n("Closing the main window will keep Kaffeine running in the system tray. Use Quit from the File menu to quit the application."), TQString(), "system_tray_info"); hide(); e->ignore(); } @@ -1547,22 +1547,22 @@ void Kaffeine::closeEvent(QCloseEvent* e) void Kaffeine::slotClearRecent() { m_recent->clear(); - m_recent->setItems(QStringList()); + m_recent->setItems(TQStringList()); } -void Kaffeine::slotChangeStatusbar(const QString& ) +void Kaffeine::slotChangeStatusbar(const TQString& ) { // display the text on the statusbar //statusBar()->message(text, 5000); /* show for 5 seconds */ } -void Kaffeine::slotChangePlaylistStatus(const QString& ) +void Kaffeine::slotChangePlaylisttqStatus(const TQString& ) { //statusBar()->changeItem(text, 9); } -void Kaffeine::slotChangeCaption(const QString& text) +void Kaffeine::slotChangeCaption(const TQString& text) { // display the text on the caption setCaption(text); @@ -1591,7 +1591,7 @@ void Kaffeine::slotFakeKeyEvent() } } -/** slots for meta to unicode encoding **/ +/** slots for meta to tqunicode encoding **/ void Kaffeine::slotUseAlternateEncoding(bool useEncoding) { @@ -1599,7 +1599,7 @@ void Kaffeine::slotUseAlternateEncoding(bool useEncoding) m_playlist->useAlternateEncoding(useEncoding); } -void Kaffeine::slotAlternateEncoding(const QString& encoding) +void Kaffeine::slotAlternateEncoding(const TQString& encoding) { m_alternateEncoding = encoding; m_playlist->setAlternateEncoding(encoding); @@ -1619,12 +1619,12 @@ void Kaffeine::slotMute() /********* DCOP INTERFACE *********/ -void Kaffeine::openURL(QString url) +void Kaffeine::openURL(TQString url) { - loadTMP(QStringList(url)); + loadTMP(TQStringList(url)); } -void Kaffeine::appendURL(QString url) +void Kaffeine::appendURL(TQString url) { if (!m_playlist) return; m_playlist->add @@ -1698,46 +1698,46 @@ bool Kaffeine::isVideo() if (m_mediaPart) { if (m_mediaPart->isPlaying()) - return m_playlist->getCurrent().mime().contains("video"); + return m_playlist->getCurrent().mime().tqcontains("video"); else return false; } else - return m_playlist->getCurrent().mime().contains("video"); + return m_playlist->getCurrent().mime().tqcontains("video"); } -QString Kaffeine::title() +TQString Kaffeine::title() { if (!m_playlist) - return QString(); + return TQString(); return m_playlist->getCurrent().title(); } -QString Kaffeine::artist() +TQString Kaffeine::artist() { if (!m_playlist) - return QString(); + return TQString(); return m_playlist->getCurrent().artist(); } -QString Kaffeine::album() +TQString Kaffeine::album() { if (!m_playlist) - return QString(); + return TQString(); return m_playlist->getCurrent().album(); } -QString Kaffeine::track() +TQString Kaffeine::track() { if (!m_playlist) - return QString(); + return TQString(); return m_playlist->getCurrent().track(); } -QString Kaffeine::getFileName() +TQString Kaffeine::getFileName() { if (!m_playlist) - return QString(); + return TQString(); return m_playlist->getCurrent().url(); } @@ -1762,7 +1762,7 @@ int Kaffeine::getLength() { if (!m_playlist) return 0; - QTime length = m_playlist->getCurrent().length(); + TQTime length = m_playlist->getCurrent().length(); return length.hour() * 3600 + length.minute() * 60 + length.second(); } @@ -1881,7 +1881,7 @@ void Kaffeine::playDvb() #endif } -void Kaffeine::dvbNewTimer( QString name, QString channel, QString datetime, QString duration ) +void Kaffeine::dvbNewTimer( TQString name, TQString channel, TQString datetime, TQString duration ) { #ifdef HAVE_DVB if ( dvbPanel ) { diff --git a/kaffeine/src/kaffeine.h b/kaffeine/src/kaffeine.h index 2a0ad72..79ad0cc 100644 --- a/kaffeine/src/kaffeine.h +++ b/kaffeine/src/kaffeine.h @@ -26,8 +26,8 @@ #include <config.h> #endif -#include <qtimer.h> -#include <qvbox.h> +#include <tqtimer.h> +#include <tqvbox.h> #include <kmainwindow.h> #include <kparts/part.h> @@ -56,6 +56,7 @@ extern const KCmdLineOptions cmdLineOptions[]; class Kaffeine : public KMainWindow, private KaffeineIface { Q_OBJECT + TQ_OBJECT public: Kaffeine(); virtual ~Kaffeine(); @@ -66,15 +67,15 @@ private: /** * Use this method to load whatever file/URL you have */ - void load(const QStringList&); - void load(const QString&); + void load(const TQStringList&); + void load(const TQString&); /** * Load urls from command line into the "NEW" playlist * @returns if any url like "DVD", "VCD" was found */ - bool loadTMP(const QStringList&); + bool loadTMP(const TQStringList&); - void setDevice(const QString& device) + void setDevice(const TQString& device) { m_device = device; } @@ -82,8 +83,8 @@ private: /* * DCOP functions... */ - void openURL(QString url); - void appendURL(QString url); + void openURL(TQString url); + void appendURL(TQString url); void play(); void playAudioCD(); void playVCD(); @@ -95,11 +96,11 @@ private: void changePlaylist(); bool isPlaying(); bool isVideo(); - QString title(); - QString artist(); - QString album(); - QString track(); - QString getFileName(); + TQString title(); + TQString artist(); + TQString album(); + TQString track(); + TQString getFileName(); void random(); void fullscreen(); void minimal(); @@ -112,7 +113,7 @@ private: void mute(); void quit(); void setNumber( int num ); - void dvbNewTimer( QString name, QString channel, QString datetime, QString duration ); + void dvbNewTimer( TQString name, TQString channel, TQString datetime, TQString duration ); int dvbSNR( int device ); void dvbOSD(); void dvbOSDNextChannel(); @@ -124,24 +125,24 @@ private: public slots: void slotPlay(const MRL&); - void slotLoadURLS(const QStringList&); + void slotLoadURLS(const TQStringList&); void slotSwitchToPlayerWindow(); - void slotChangeStatusbar(const QString&); - void slotChangePlaylistStatus(const QString&); + void slotChangeStatusbar(const TQString&); + void slotChangePlaylisttqStatus(const TQString&); void slotStop(); void slotPlayUnPause(); private: - void showEvent(QShowEvent*); - void hideEvent(QHideEvent*); + void showEvent(TQShowEvent*); + void hideEvent(TQHideEvent*); - void closeEvent(QCloseEvent*); - // void dragEnterEvent(QDragEnterEvent*); - // void dropEvent(QDropEvent*); - void mouseDoubleClickEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); - void mousePressEvent(QMouseEvent*); - void resizeEvent(QResizeEvent*); + void closeEvent(TQCloseEvent*); + // void dragEnterEvent(TQDragEnterEvent*); + // void dropEvent(TQDropEvent*); + void mouseDoubleClickEvent(TQMouseEvent*); + void mouseMoveEvent(TQMouseEvent*); + void mousePressEvent(TQMouseEvent*); + void resizeEvent(TQResizeEvent*); private slots: void slotOpenFile(); @@ -150,7 +151,7 @@ private slots: void optionsConfigureToolbars(); void applyNewToolbarConfig(); void slotFakeKeyEvent(); - void slotChangeCaption(const QString&); + void slotChangeCaption(const TQString&); void slotOpenURL(); void slotOpenDirectory(); void slotPlaylistPlay(); @@ -172,15 +173,15 @@ private slots: void slotAutoresizeOriginal(); void slotAutoresizeDouble(); void slotAutoresizeTriple(); - void slotNewFrameSize(const QSize&); - void slotCurrentTabChanged(QWidget*); + void slotNewFrameSize(const TQSize&); + void slotCurrentTabChanged(TQWidget*); void slotClearRecent(); - void slotLoadPart(const QString&); - void slotLoadingCanceled(const QString&); + void slotLoadPart(const TQString&); + void slotLoadingCanceled(const TQString&); void slotPlaybackFailed(); void slotSystemTray(bool); void slotUseAlternateEncoding(bool); - void slotAlternateEncoding(const QString&); + void slotAlternateEncoding(const TQString&); void slotMute(); void slotSleepAfterPlay(); void slotSleepAfterPlayMenu(); @@ -189,7 +190,7 @@ private slots: void slotQuitAfterPlaylistMenu(); void slotSetOSDTimeout(uint); void slotPauseVideo(bool); - void slotDvbClient(bool,const QString&,int,int,const QString&); + void slotDvbClient(bool,const TQString&,int,int,const TQString&); void slotNumKeyInput( int ); void slotDVBNextBack( int ); @@ -200,15 +201,15 @@ private: void loadConfig(); void saveConfig(); void hideToolbars(bool); - QString askForOtherDevice(const QString&); + TQString askForOtherDevice(const TQString&); void unloadCurrentPart(); KaffeinePart* m_mediaPart; InputManager *inplug; - QHBox *mainbox; - QVBox *playerWidget; + TQHBox *mainbox; + TQVBox *playerWidget; PlayerContainer* m_playerContainer; PlayList* m_playlist; Disc *cddisc; @@ -219,12 +220,12 @@ private: StartWindow *m_startWindow; bool m_dvbClientEnabled; - QString m_dvbClientAddress; + TQString m_dvbClientAddress; int m_dvbClientPort; int m_dvbClientInfo; - QString m_dvbClientShiftPath; + TQString m_dvbClientShiftPath; SystemTray* m_systemTray; - QSize m_videoSize; + TQSize m_videoSize; bool m_noResize; bool m_embedSystemTray; bool m_sleepInfo; @@ -232,7 +233,7 @@ private: uint m_autoResizeFactor; bool m_useAlternateEncoding; - QString m_alternateEncoding; + TQString m_alternateEncoding; bool m_autoPaused; bool m_pauseVideo; @@ -242,11 +243,11 @@ private: bool haveXTest; int fakeKeycode; - QString m_currentPartService; + TQString m_currentPartService; - QString m_device; - QString m_filter; - QStringList m_engineParameters; + TQString m_device; + TQString m_filter; + TQStringList m_engineParameters; KRecentFilesAction* m_recent; KToggleFullScreenAction* m_fullscreen; @@ -263,13 +264,13 @@ private: KToggleAction* m_quitAfterPlaylist; bool m_statusBarVisible; - QTimer m_screensaverTimer; - QTimer m_numKeyHideTimer; + TQTimer m_screensaverTimer; + TQTimer m_numKeyHideTimer; int m_numKey; - QString m_captionCache; + TQString m_captionCache; signals: - void showOSD( const QString &text, int duration, int priority ); + void showOSD( const TQString &text, int duration, int priority ); private: Kaffeine(const Kaffeine &); diff --git a/kaffeine/src/kaffeineiface.h b/kaffeine/src/kaffeineiface.h index 0443c0b..cb5f6f3 100644 --- a/kaffeine/src/kaffeineiface.h +++ b/kaffeine/src/kaffeineiface.h @@ -32,10 +32,10 @@ class KaffeineIface : virtual public DCOPObject K_DCOP k_dcop: /* Add url to playlist and play it */ - virtual void openURL(QString url) = 0; + virtual void openURL(TQString url) = 0; /* Append url to playlist */ - virtual void appendURL(QString url) = 0; + virtual void appendURL(TQString url) = 0; /* Play next in playlist */ virtual void play() = 0; @@ -71,19 +71,19 @@ k_dcop: virtual bool isVideo() = 0; /* Returns current track title */ - virtual QString title() = 0; + virtual TQString title() = 0; /* Returns current artist */ - virtual QString artist() = 0; + virtual TQString artist() = 0; /* Returns current album */ - virtual QString album() = 0; + virtual TQString album() = 0; /* Returns current track */ - virtual QString track() = 0; + virtual TQString track() = 0; /* Returns current track file (media) name */ - virtual QString getFileName() = 0; + virtual TQString getFileName() = 0; /* Toggle random play */ virtual void random() = 0; @@ -122,7 +122,7 @@ k_dcop: virtual void setNumber(int num) = 0; /* Create new DVB timer. datetime=2006-08-28T19:45:00, duration=01:55:00 */ - virtual void dvbNewTimer(QString name, QString channel, QString datetime, QString duration) = 0; + virtual void dvbNewTimer(TQString name, TQString channel, TQString datetime, TQString duration) = 0; virtual int dvbSNR(int device) = 0; diff --git a/kaffeine/src/kmultitabbar.cpp b/kaffeine/src/kmultitabbar.cpp index 3937b3f..a0a1c15 100644 --- a/kaffeine/src/kmultitabbar.cpp +++ b/kaffeine/src/kmultitabbar.cpp @@ -27,28 +27,28 @@ #include "kmultitabbar.moc" #include "kmultitabbar_p.h" #include "kmultitabbar_p.moc" -#include <qbutton.h> -#include <qpopupmenu.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qtooltip.h> -#include <qfontmetrics.h> -#include <qstyle.h> +#include <tqbutton.h> +#include <tqpopupmenu.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqtooltip.h> +#include <tqfontmetrics.h> +#include <tqstyle.h> #include <kiconloader.h> #include <kdebug.h> -#include <qapplication.h> +#include <tqapplication.h> #include <math.h> #define NEARBYINT(i) ((int(float(i) + 0.5))) class KMultiTabBarTabPrivate { public: - QPixmap pix; + TQPixmap pix; }; -KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent) +KMultiTabBarInternal::KMultiTabBarInternal(TQWidget *tqparent, KMultiTabBar::KMultiTabBarMode bm):TQScrollView(tqparent) { m_expandedTabSize=-1; m_showActiveTabTexts=false; @@ -58,25 +58,25 @@ KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMulti setVScrollBarMode(AlwaysOff); if (bm==KMultiTabBar::Vertical) { - box=new QWidget(viewport()); - mainLayout=new QVBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQVBoxLayout(box); mainLayout->setAutoAdd(true); box->setFixedWidth(24); setFixedWidth(24); } else { - box=new QWidget(viewport()); - mainLayout=new QHBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQHBoxLayout(box); mainLayout->setAutoAdd(true); box->setFixedHeight(24); setFixedHeight(24); } addChild(box); setFrameStyle(NoFrame); - viewport()->setBackgroundMode(Qt::PaletteBackground); -/* box->setPaletteBackgroundColor(Qt::red); - setPaletteBackgroundColor(Qt::green);*/ + viewport()->setBackgroundMode(TQt::PaletteBackground); +/* box->setPaletteBackgroundColor(TQt::red); + setPaletteBackgroundColor(TQt::green);*/ } void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) @@ -93,15 +93,15 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) } else if (mainLayout==0) { if (m_barMode==KMultiTabBar::Vertical) { - box=new QWidget(viewport()); - mainLayout=new QVBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQVBoxLayout(box); box->setFixedWidth(24); setFixedWidth(24); } else { - box=new QWidget(viewport()); - mainLayout=new QHBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQHBoxLayout(box); box->setFixedHeight(24); setFixedHeight(24); } @@ -111,19 +111,19 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) mainLayout->setAutoAdd(true); } - viewport()->repaint(); + viewport()->tqrepaint(); } -void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy, int clipw, int cliph ) +void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph ) { - QScrollView::drawContents (paint , clipx, clipy, clipw, cliph ); + TQScrollView::drawContents (paint , clipx, clipy, clipw, cliph ); if (m_position==KMultiTabBar::Right) { - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height()); - paint->setPen(colorGroup().background().dark(120)); + paint->setPen(tqcolorGroup().background().dark(120)); paint->drawLine(1,0,1,viewport()->height()); @@ -131,28 +131,28 @@ void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy else if (m_position==KMultiTabBar::Left) { - paint->setPen(colorGroup().light()); + paint->setPen(tqcolorGroup().light()); paint->drawLine(23,0,23,viewport()->height()); paint->drawLine(22,0,22,viewport()->height()); - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height()); } else if (m_position==KMultiTabBar::Bottom) { - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,viewport()->width(),0); - paint->setPen(colorGroup().background().dark(120)); + paint->setPen(tqcolorGroup().background().dark(120)); paint->drawLine(0,1,viewport()->width(),1); } else { - paint->setPen(colorGroup().light()); + paint->setPen(tqcolorGroup().light()); paint->drawLine(0,23,viewport()->width(),23); paint->drawLine(0,22,viewport()->width(),22); -/* paint->setPen(colorGroup().shadow()); +/* paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,0,viewport()->height());*/ } @@ -160,12 +160,12 @@ void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy } -void KMultiTabBarInternal::contentsMousePressEvent(QMouseEvent *ev) +void KMultiTabBarInternal::contentsMousePressEvent(TQMouseEvent *ev) { ev->ignore(); } -void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev) +void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev) { ev->ignore(); } @@ -187,11 +187,11 @@ void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev) } else {diff=0; } -void KMultiTabBarInternal::resizeEvent(QResizeEvent *ev) { +void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { /* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<<endl; - kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl; - kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/ - if (ev) QScrollView::resizeEvent(ev); + kdDebug()<<"KMultiTabBarInternal::resizeEvent - box tqgeometry"<<box->tqgeometry()<<endl; + kdDebug()<<"KMultiTabBarInternal::resizeEvent - tqgeometry"<<tqgeometry()<<endl;*/ + if (ev) TQScrollView::resizeEvent(ev); if ( (m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) ){ @@ -329,25 +329,25 @@ void KMultiTabBarInternal::showActiveTabTexts(bool show) KMultiTabBarTab* KMultiTabBarInternal::tab(int id) const { - for (QPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){ + for (TQPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){ if (it.current()->id()==id) return it.current(); } return 0; } -bool KMultiTabBarInternal::eventFilter(QObject *, QEvent *e) { - if (e->type()==QEvent::Resize) resizeEvent(0); +bool KMultiTabBarInternal::eventFilter(TQObject *, TQEvent *e) { + if (e->type()==TQEvent::Resize) resizeEvent(0); return false; } -int KMultiTabBarInternal::appendTab(const QPixmap &pic ,int id,const QString& text) +int KMultiTabBarInternal::appendTab(const TQPixmap &pic ,int id,const TQString& text) { KMultiTabBarTab *tab; m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style)); tab->installEventFilter(this); tab->showActiveTabText(m_showActiveTabTexts); - if (m_style==KMultiTabBar::KONQSBC) + if (m_style==KMultiTabBar::KONTQSBC) { if (m_expandedTabSize<tab->neededSize()) { m_expandedTabSize=tab->neededSize(); @@ -379,13 +379,13 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p m_position=pos; for (uint i=0;i<m_tabs.count();i++) m_tabs.at(i)->setTabsPosition(m_position); - viewport()->repaint(); + viewport()->tqrepaint(); } -KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, QPopupMenu *popup, - int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style) - :QPushButton(QIconSet(),text,parent),m_style(style) +KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup, + int id,TQWidget *tqparent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style) + :TQPushButton(TQIconSet(),text,tqparent),m_style(style) { setIconSet(pic); setText(text); @@ -395,13 +395,13 @@ KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, Q setFixedHeight(24); setFixedWidth(24); m_id=id; - QToolTip::add(this,text); - connect(this,SIGNAL(clicked()),this,SLOT(slotClicked())); + TQToolTip::add(this,text); + connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked())); } -KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup, - int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style) - :QPushButton(QIconSet(),text,parent),m_style(style) +KMultiTabBarButton::KMultiTabBarButton(const TQString& text, TQPopupMenu *popup, + int id,TQWidget *tqparent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style) + :TQPushButton(TQIconSet(),text,tqparent),m_style(style) { setText(text); m_position=pos; @@ -410,8 +410,8 @@ KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup, setFixedHeight(24); setFixedWidth(24); m_id=id; - QToolTip::add(this,text); - connect(this,SIGNAL(clicked()),this,SLOT(slotClicked())); + TQToolTip::add(this,text); + connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked())); } KMultiTabBarButton::~KMultiTabBarButton() { @@ -421,11 +421,11 @@ int KMultiTabBarButton::id() const{ return m_id; } -void KMultiTabBarButton::setText(const QString& text) +void KMultiTabBarButton::setText(const TQString& text) { - QPushButton::setText(text); + TQPushButton::setText(text); m_text=text; - QToolTip::add(this,text); + TQToolTip::add(this,text); } void KMultiTabBarButton::slotClicked() @@ -436,72 +436,72 @@ void KMultiTabBarButton::slotClicked() void KMultiTabBarButton::setPosition(KMultiTabBar::KMultiTabBarPosition pos) { m_position=pos; - repaint(); + tqrepaint(); } void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style) { m_style=style; - repaint(); + tqrepaint(); } -void KMultiTabBarButton::hideEvent( QHideEvent* he) { - QPushButton::hideEvent(he); - KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget()); +void KMultiTabBarButton::hideEvent( TQHideEvent* he) { + TQPushButton::hideEvent(he); + KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(tqparentWidget()); if (tb) tb->updateSeparator(); } -void KMultiTabBarButton::showEvent( QShowEvent* he) { - QPushButton::showEvent(he); - KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget()); +void KMultiTabBarButton::showEvent( TQShowEvent* he) { + TQPushButton::showEvent(he); + KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(tqparentWidget()); if (tb) tb->updateSeparator(); } -QSize KMultiTabBarButton::sizeHint() const +TQSize KMultiTabBarButton::tqsizeHint() const { constPolish(); int w = 0, h = 0; // calculate contents size... -#ifndef QT_NO_ICONSET +#ifndef TQT_NO_ICONSET if ( iconSet() && !iconSet()->isNull() ) { - int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4; - int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height(); + int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; + int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height(); w += iw; - h = QMAX( h, ih ); + h = TQMAX( h, ih ); } #endif if ( isMenuButton() ) - w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this); + w += tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { - QPixmap *pm = (QPixmap *)pixmap(); + TQPixmap *pm = (TQPixmap *)pixmap(); w += pm->width(); h += pm->height(); } else { - QString s( text() ); + TQString s( text() ); bool empty = s.isEmpty(); if ( empty ) - s = QString::fromLatin1("XXXX"); - QFontMetrics fm = fontMetrics(); - QSize sz = fm.size( ShowPrefix, s ); + s = TQString::tqfromLatin1("XXXX"); + TQFontMetrics fm = fontMetrics(); + TQSize sz = fm.size( ShowPrefix, s ); if(!empty || !w) w += sz.width(); if(!empty || !h) - h = QMAX(h, sz.height()); + h = TQMAX(h, sz.height()); } - return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)). - expandedTo(QApplication::globalStrut())); + return (tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)). + expandedTo(TQApplication::globalStrut())); } -KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text, - int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos, +KMultiTabBarTab::KMultiTabBarTab(const TQPixmap& pic, const TQString& text, + int id,TQWidget *tqparent,KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style) - :KMultiTabBarButton(text,0,id,parent,pos,style), + :KMultiTabBarButton(text,0,id,tqparent,pos,style), m_showActiveTabText(false) { down = false; @@ -520,7 +520,7 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos) { if ((pos!=m_position) && ((pos==KMultiTabBar::Left) || (pos==KMultiTabBar::Right))) { if (!d->pix.isNull()) { - QWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F); + TQWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F); temp.rotate(180); d->pix=d->pix.xForm(temp); setIconSet(d->pix); @@ -528,26 +528,26 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos) } setPosition(pos); -// repaint(); +// tqrepaint(); } -void KMultiTabBarTab::setIcon(const QString& icon) +void KMultiTabBarTab::setIcon(const TQString& icon) { - QPixmap pic=SmallIcon(icon); + TQPixmap pic=SmallIcon(icon); setIcon(pic); } -void KMultiTabBarTab::setIcon(const QPixmap& icon) +void KMultiTabBarTab::setIcon(const TQPixmap& icon) { if (m_style!=KMultiTabBar::KDEV3) { if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) { - QWMatrix rotateMatrix; + TQWMatrix rotateMatrix; if (m_position==KMultiTabBar::Left) rotateMatrix.rotate(90); else rotateMatrix.rotate(-90); - QPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW + TQPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW d->pix=pic; setIconSet(pic); } else setIconSet(icon); @@ -570,23 +570,23 @@ void KMultiTabBarTab::setState(bool b) void KMultiTabBarTab::updateState() { - if (m_style!=KMultiTabBar::KONQSBC) { + if (m_style!=KMultiTabBar::KONTQSBC) { if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (down)) { - QPushButton::setText(m_text); + TQPushButton::setText(m_text); } else { - //kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty QString***************"<<endl; - QPushButton::setText(QString::null); + //kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty TQString***************"<<endl; + TQPushButton::setText(TQString()); } if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) { setFixedWidth(24); if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (down)) { - setFixedHeight(KMultiTabBarButton::sizeHint().width()); + setFixedHeight(KMultiTabBarButton::tqsizeHint().width()); } else setFixedHeight(36); } else { setFixedHeight(24); if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (down)) { - setFixedWidth(KMultiTabBarButton::sizeHint().width()); + setFixedWidth(KMultiTabBarButton::tqsizeHint().width()); } else setFixedWidth(36); } } else { @@ -601,13 +601,13 @@ void KMultiTabBarTab::updateState() else setFixedWidth(m_expandedSize); } - QApplication::sendPostedEvents(0,QEvent::Paint | QEvent::Move | QEvent::Resize | QEvent::LayoutHint); - QApplication::flush(); + TQApplication::sendPostedEvents(0,TQEvent::Paint | TQEvent::Move | TQEvent::Resize | TQEvent::LayoutHint); + TQApplication::flush(); } int KMultiTabBarTab::neededSize() { - return (((m_style!=KMultiTabBar::KDEV3)?24:0)+QFontMetrics(QFont()).width(m_text)+6); + return (((m_style!=KMultiTabBar::KDEV3)?24:0)+TQFontMetrics(TQFont()).width(m_text)+6); } void KMultiTabBarTab::setSize(int size) @@ -621,41 +621,41 @@ void KMultiTabBarTab::showActiveTabText(bool show) m_showActiveTabText=show; } -void KMultiTabBarTab::drawButtonLabel(QPainter *p) { +void KMultiTabBarTab::drawButtonLabel(TQPainter *p) { drawButton(p); } -void KMultiTabBarTab::drawButton(QPainter *paint) +void KMultiTabBarTab::drawButton(TQPainter *paint) { - if (m_style!=KMultiTabBar::KONQSBC) drawButtonStyled(paint); + if (m_style!=KMultiTabBar::KONTQSBC) drawButtonStyled(paint); else drawButtonClassic(paint); } -void KMultiTabBarTab::drawButtonStyled(QPainter *paint) { +void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) { - QSize sh; + TQSize sh; const int width = 36; // rotated const int height = 24; if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (down)) { if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) - sh=QSize(this->height(),this->width());//KMultiTabBarButton::sizeHint(); - else sh=QSize(this->width(),this->height()); + sh=TQSize(this->height(),this->width());//KMultiTabBarButton::tqsizeHint(); + else sh=TQSize(this->width(),this->height()); } else - sh=QSize(width,height); + sh=TQSize(width,height); - QPixmap pixmap( sh.width(),height); ///,sh.height()); + TQPixmap pixmap( sh.width(),height); ///,sh.height()); pixmap.fill(eraseColor()); - QPainter painter(&pixmap); + TQPainter painter(&pixmap); - QStyle::SFlags st=QStyle::Style_Default; + TQStyle::SFlags st=TQStyle::Style_Default; - st|=QStyle::Style_Enabled; + st|=TQStyle::Style_Enabled; - if (down) st|=QStyle::Style_On; + if (down) st|=TQStyle::Style_On; - style().drawControl(QStyle::CE_PushButton,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st); - style().drawControl(QStyle::CE_PushButtonLabel,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st); + tqstyle().tqdrawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), tqcolorGroup(),st); + tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), tqcolorGroup(),st); switch (m_position) { case KMultiTabBar::Left: @@ -671,69 +671,69 @@ void KMultiTabBarTab::drawButtonStyled(QPainter *paint) { paint->drawPixmap(0,0,pixmap); break; } -// style().drawControl(QStyle::CE_PushButtonLabel,painter,this, QRect(0,0,pixmap.width(),pixmap.height()), -// colorGroup(),QStyle::Style_Enabled); +// tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), +// tqcolorGroup(),TQStyle::Style_Enabled); } -void KMultiTabBarTab::drawButtonClassic(QPainter *paint) +void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) { - QPixmap pixmap; + TQPixmap pixmap; if ( iconSet()) - pixmap = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ); - paint->fillRect(0, 0, 24, 24, colorGroup().background()); + pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ); + paint->fillRect(0, 0, 24, 24, tqcolorGroup().background()); if (!down) { if (m_position==KMultiTabBar::Right) { - paint->fillRect(0,0,21,21,QBrush(colorGroup().background())); + paint->fillRect(0,0,21,21,TQBrush(tqcolorGroup().background())); - paint->setPen(colorGroup().background().dark(150)); + paint->setPen(tqcolorGroup().background().dark(150)); paint->drawLine(0,22,23,22); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,0,23); - paint->setPen(colorGroup().background().dark(120)); + paint->setPen(tqcolorGroup().background().dark(120)); paint->drawLine(1,0,1,23); } else if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top)) { - paint->fillRect(0,1,23,22,QBrush(colorGroup().background())); + paint->fillRect(0,1,23,22,TQBrush(tqcolorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(colorGroup().background().dark(120)); + paint->setPen(tqcolorGroup().background().dark(120)); paint->drawLine(23,0,23,23); - paint->setPen(colorGroup().light()); + paint->setPen(tqcolorGroup().light()); paint->drawLine(0,22,23,22); paint->drawLine(0,23,23,23); - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,23,0); - paint->setPen(colorGroup().background().dark(120)); + paint->setPen(tqcolorGroup().background().dark(120)); paint->drawLine(0,1,23,1); } else { - paint->setPen(colorGroup().background().dark(120)); + paint->setPen(tqcolorGroup().background().dark(120)); paint->drawLine(0,23,23,23); - paint->fillRect(0,0,23,21,QBrush(colorGroup().background())); + paint->fillRect(0,0,23,21,TQBrush(tqcolorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); - paint->setPen(colorGroup().light()); + paint->setPen(tqcolorGroup().light()); paint->drawLine(23,0,23,23); paint->drawLine(22,0,22,23); - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,0,0,23); } @@ -744,25 +744,25 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) { if (m_position==KMultiTabBar::Right) { - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,height()-1,23,height()-1); paint->drawLine(0,height()-2,23,height()-2); paint->drawLine(23,0,23,height()-1); paint->drawLine(22,0,22,height()-1); - paint->fillRect(0,0,21,height()-3,QBrush(colorGroup().light())); + paint->fillRect(0,0,21,height()-3,TQBrush(tqcolorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { if (height()<25+4) return; - QPixmap tpixmap(height()-25-3, width()-2); - QPainter painter(&tpixmap); + TQPixmap tpixmap(height()-25-3, width()-2); + TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light())); - painter.setPen(colorGroup().text()); - painter.drawText(0,+width()/2+QFontMetrics(QFont()).height()/2,m_text); + painter.setPen(tqcolorGroup().text()); + painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(90); kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl; @@ -773,26 +773,26 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) else if (m_position==KMultiTabBar::Top) { - paint->fillRect(0,0,width()-1,23,QBrush(colorGroup().light())); + paint->fillRect(0,0,width()-1,23,TQBrush(tqcolorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { - paint->setPen(colorGroup().text()); - paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text); + paint->setPen(tqcolorGroup().text()); + paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } } else if (m_position==KMultiTabBar::Bottom) { - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,23,width()-1,23); paint->drawLine(0,22,width()-1,22); - paint->fillRect(0,0,width()-1,21,QBrush(colorGroup().light())); + paint->fillRect(0,0,width()-1,21,TQBrush(tqcolorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { - paint->setPen(colorGroup().text()); - paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text); + paint->setPen(tqcolorGroup().text()); + paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } } @@ -800,23 +800,23 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) { - paint->setPen(colorGroup().shadow()); + paint->setPen(tqcolorGroup().shadow()); paint->drawLine(0,height()-1,23,height()-1); paint->drawLine(0,height()-2,23,height()-2); - paint->fillRect(0,0,23,height()-3,QBrush(colorGroup().light())); + paint->fillRect(0,0,23,height()-3,TQBrush(tqcolorGroup().light())); paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap); if (m_showActiveTabText) { if (height()<25+4) return; - QPixmap tpixmap(height()-25-3, width()-2); - QPainter painter(&tpixmap); + TQPixmap tpixmap(height()-25-3, width()-2); + TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(tqcolorGroup().light())); - painter.setPen(colorGroup().text()); - painter.drawText(tpixmap.width()-QFontMetrics(QFont()).width(m_text),+width()/2+QFontMetrics(QFont()).height()/2,m_text); + painter.setPen(tqcolorGroup().text()); + painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(-90); kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl; @@ -836,19 +836,19 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) -KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name):QWidget(parent,name) +KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, TQWidget *tqparent,const char *name):TQWidget(tqparent,name) { m_buttons.setAutoDelete(false); if (bm==Vertical) { - m_l=new QVBoxLayout(this); - setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, true); + m_l=new TQVBoxLayout(this); + tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true); // setFixedWidth(24); } else { - m_l=new QHBoxLayout(this); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, true); + m_l=new TQHBoxLayout(this); + tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true); // setFixedHeight(24); } m_l->setMargin(0); @@ -858,11 +858,11 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name setPosition((bm==KMultiTabBar::Vertical)?KMultiTabBar::Right:KMultiTabBar::Bottom); setStyle(VSNET); // setStyle(KDEV3); - //setStyle(KONQSBC); + //setStyle(KONTQSBC); m_l->insertWidget(0,m_internal); - m_l->insertWidget(0,m_btnTabSep=new QFrame(this)); + m_l->insertWidget(0,m_btnTabSep=new TQFrame(this)); m_btnTabSep->setFixedHeight(4); - m_btnTabSep->setFrameStyle(QFrame::Panel | QFrame::Sunken); + m_btnTabSep->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); m_btnTabSep->setLineWidth(2); m_btnTabSep->hide(); @@ -872,16 +872,16 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name KMultiTabBar::~KMultiTabBar() { } -/*int KMultiTabBar::insertButton(QPixmap pic,int id ,const QString&) +/*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&) { (new KToolbarButton(pic,id,m_internal))->show(); return 0; }*/ -int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,const QString&) +int KMultiTabBar::appendButton(const TQPixmap &pic ,int id,TQPopupMenu *popup,const TQString&) { KMultiTabBarButton *btn; - m_buttons.append(btn= new KMultiTabBarButton(pic,QString::null, + m_buttons.append(btn= new KMultiTabBarButton(pic,TQString(), popup,id,this,m_position,m_internal->m_style)); m_l->insertWidget(0,btn); btn->show(); @@ -891,7 +891,7 @@ int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,cons void KMultiTabBar::updateSeparator() { bool hideSep=true; - for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){ + for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){ if (it.current()->isVisibleTo(this)) { hideSep=false; break; @@ -902,16 +902,16 @@ void KMultiTabBar::updateSeparator() { } -int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text) +int KMultiTabBar::appendTab(const TQPixmap &pic ,int id ,const TQString& text) { m_internal->appendTab(pic,id,text); - connect( tab(id),SIGNAL(clicked(int)), this, SLOT(tabClicked(int)) ); + connect( tab(id),TQT_SIGNAL(clicked(int)), this, TQT_SLOT(tabClicked(int)) ); return 0; } void KMultiTabBar::tabClicked( int id ) { - for (QPtrListIterator<KMultiTabBarTab> it(m_internal->m_tabs);it.current();++it){ + for (TQPtrListIterator<KMultiTabBarTab> it(m_internal->m_tabs);it.current();++it){ if (it.current()->id()!=id && it.current()->down ) it.current()->setState(false); } @@ -919,7 +919,7 @@ void KMultiTabBar::tabClicked( int id ) KMultiTabBarButton* KMultiTabBar::button(int id) const { - for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){ + for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){ if (it.current()->id()!=id) return it.current(); } return 0; @@ -988,12 +988,12 @@ void KMultiTabBar::setPosition(KMultiTabBarPosition pos) for (uint i=0;i<m_buttons.count();i++) m_buttons.at(i)->setPosition(pos); } -void KMultiTabBar::fontChange(const QFont& /* oldFont */) +void KMultiTabBar::fontChange(const TQFont& /* oldFont */) { for (uint i=0;i<tabs()->count();i++) tabs()->at(i)->resize(); - repaint(); + tqrepaint(); } -QPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();} -QPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;} +TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();} +TQPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;} diff --git a/kaffeine/src/kmultitabbar.h b/kaffeine/src/kmultitabbar.h index a8567ee..0b3df44 100644 --- a/kaffeine/src/kmultitabbar.h +++ b/kaffeine/src/kmultitabbar.h @@ -26,17 +26,17 @@ #include <config.h> #endif -#include <qscrollview.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qpushbutton.h> - -class QPixmap; -class QPainter; -class QFrame; +#include <tqscrollview.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqpushbutton.h> + +class TQPixmap; +class TQPainter; +class TQFrame; class KMultiTabBarPrivate; class KMultiTabBarTabPrivate; @@ -50,22 +50,23 @@ class KMultiTabBarInternal; * should be raisable is left to the "user". *@author Joseph Wenninger */ -class /*KUTILS_EXPORT*/ KMultiTabBar: public QWidget +class /*KUTILS_EXPORT*/ KMultiTabBar: public TQWidget { Q_OBJECT + TQ_OBJECT public: - enum KMultiTabBarMode{Horizontal, Vertical}; + enum KMultiTabBarMode{Horizontal,Vertical}; enum KMultiTabBarPosition{Left, Right, Top, Bottom}; /** * VSNET == Visual Studio .Net like (only show the text of active tabs * KDEV3 == Kdevelop 3 like (always show the text) - * KONQSBC == konqy's classic sidebar style (unthemed), this one is disabled + * KONTQSBC == konqy's classic sidebar style (unthemed), this one is disabled * at the moment, but will be renabled soon too */ - enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff}; + enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONTQSBC=2, KDEV3ICON=3,STYLELAST=0xffff}; - KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0,const char *name=0); + KMultiTabBar(KMultiTabBarMode bm,TQWidget *tqparent=0,const char *name=0); virtual ~KMultiTabBar(); /** @@ -77,7 +78,7 @@ public: * @param popup A popup menu which should be displayed if the button is clicked * @param not_used_yet will be used for a popup text in the future */ - int appendButton(const QPixmap &pic,int id=-1,QPopupMenu* popup=0,const QString& not_used_yet=QString::null); + int appendButton(const TQPixmap &pic,int id=-1,TQPopupMenu* popup=0,const TQString& not_used_yet=TQString()); /** * remove a button with the given ID */ @@ -88,7 +89,7 @@ public: * @param id an arbitrary ID which can be used later on to identify the tab * @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint */ - int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null); + int appendTab(const TQPixmap &pic,int id=-1,const TQString& text=TQString()); /** * remove a tab with a given ID */ @@ -124,11 +125,11 @@ public: /** * be carefull, don't delete tabs yourself and don't delete the list itself */ - QPtrList<KMultiTabBarTab>* tabs(); + TQPtrList<KMultiTabBarTab>* tabs(); /** * be carefull, don't delete buttons yourself and don't delete the list itself */ - QPtrList<KMultiTabBarButton>* buttons(); + TQPtrList<KMultiTabBarButton>* buttons(); /** * might vanish, not sure yet @@ -138,13 +139,13 @@ private slots: void tabClicked(int id); protected: friend class KMultiTabBarButton; - virtual void fontChange( const QFont& ); + virtual void fontChange( const TQFont& ); void updateSeparator(); private: class KMultiTabBarInternal *m_internal; - QBoxLayout *m_l; - QFrame *m_btnTabSep; - QPtrList<KMultiTabBarButton> m_buttons; + TQBoxLayout *m_l; + TQFrame *m_btnTabSep; + TQPtrList<KMultiTabBarButton> m_buttons; KMultiTabBarPosition m_position; KMultiTabBarPrivate *d; }; @@ -152,14 +153,15 @@ private: /** * This class should never be created except with the appendButton call of KMultiTabBar */ -class /*KUTILS_EXPORT*/ KMultiTabBarButton: public QPushButton +class /*KUTILS_EXPORT*/ KMultiTabBarButton: public TQPushButton { Q_OBJECT + TQ_OBJECT public: - KMultiTabBarButton(const QPixmap& pic,const QString&, QPopupMenu *popup, - int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style); - KMultiTabBarButton(const QString&, QPopupMenu *popup, - int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style); + KMultiTabBarButton(const TQPixmap& pic,const TQString&, TQPopupMenu *popup, + int id,TQWidget *tqparent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style); + KMultiTabBarButton(const TQString&, TQPopupMenu *popup, + int id,TQWidget *tqparent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style); virtual ~KMultiTabBarButton(); int id() const; @@ -178,16 +180,16 @@ public slots: /** * modify the text of the button */ - void setText(const QString &); + void setText(const TQString &); - QSize sizeHint() const; + TQSize tqsizeHint() const; protected: KMultiTabBar::KMultiTabBarPosition m_position; KMultiTabBar::KMultiTabBarStyle m_style; - QString m_text; - virtual void hideEvent( class QHideEvent*); - virtual void showEvent( class QShowEvent*); + TQString m_text; + virtual void hideEvent( class TQHideEvent*); + virtual void showEvent( class TQShowEvent*); private: int m_id; KMultiTabBarButtonPrivate *d; @@ -207,8 +209,9 @@ protected slots: class /*KUTILS_EXPORT*/ KMultiTabBarTab: public KMultiTabBarButton { Q_OBJECT + TQ_OBJECT public: - KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent, + KMultiTabBarTab(const TQPixmap& pic,const TQString&,int id,TQWidget *tqparent, KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style); virtual ~KMultiTabBarTab(); /** @@ -232,17 +235,17 @@ protected: void setSize(int); int neededSize(); void updateState(); - virtual void drawButton(QPainter *); - virtual void drawButtonLabel(QPainter *); - void drawButtonStyled(QPainter *); - void drawButtonClassic(QPainter *); + virtual void drawButton(TQPainter *); + virtual void drawButtonLabel(TQPainter *); + void drawButtonStyled(TQPainter *); + void drawButtonClassic(TQPainter *); protected slots: virtual void slotClicked(); void setTabsPosition(KMultiTabBar::KMultiTabBarPosition); public slots: - virtual void setIcon(const QString&); - virtual void setIcon(const QPixmap&); + virtual void setIcon(const TQString&); + virtual void setIcon(const TQPixmap&); }; #endif /* KMULTITABBAR_H */ diff --git a/kaffeine/src/kmultitabbar_p.h b/kaffeine/src/kmultitabbar_p.h index d8a6cfc..f0dfa8d 100644 --- a/kaffeine/src/kmultitabbar_p.h +++ b/kaffeine/src/kmultitabbar_p.h @@ -25,26 +25,27 @@ #include <config.h> #endif -#include <qscrollview.h> +#include <tqscrollview.h> #include <kmultitabbar.h> -class KMultiTabBarInternal: public QScrollView +class KMultiTabBarInternal: public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm); - int appendTab(const QPixmap &,int=-1,const QString& =QString::null); + KMultiTabBarInternal(TQWidget *tqparent,KMultiTabBar::KMultiTabBarMode bm); + int appendTab(const TQPixmap &,int=-1,const TQString& =TQString()); KMultiTabBarTab *tab(int) const; void removeTab(int); void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos); void setStyle(enum KMultiTabBar::KMultiTabBarStyle style); void showActiveTabTexts(bool show); - QPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;} + TQPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;} private: friend class KMultiTabBar; - QWidget *box; - QBoxLayout *mainLayout; - QPtrList<KMultiTabBarTab> m_tabs; + TQWidget *box; + TQBoxLayout *mainLayout; + TQPtrList<KMultiTabBarTab> m_tabs; enum KMultiTabBar::KMultiTabBarPosition m_position; bool m_showActiveTabTexts; enum KMultiTabBar::KMultiTabBarStyle m_style; @@ -52,17 +53,17 @@ private: int m_lines; KMultiTabBar::KMultiTabBarMode m_barMode; protected: - virtual bool eventFilter(QObject *,QEvent*); - virtual void drawContents ( QPainter *, int, int, int, int); + virtual bool eventFilter(TQObject *,TQEvent*); + virtual void drawContents ( TQPainter *, int, int, int, int); /** - * [contentsM|m]ousePressEvent are reimplemented from QScrollView + * [contentsM|m]ousePressEvent are reimplemented from TQScrollView * in order to ignore all mouseEvents on the viewport, so that the - * parent can handle them. + * tqparent can handle them. */ - virtual void contentsMousePressEvent(QMouseEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void resizeEvent(QResizeEvent *); + virtual void contentsMousePressEvent(TQMouseEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void resizeEvent(TQResizeEvent *); }; #endif /* KMULTITABBAR_P_H */ diff --git a/kaffeine/src/player-parts/dummy-part/dummy_part.cpp b/kaffeine/src/player-parts/dummy-part/dummy_part.cpp index 7c52cf7..caf4e7b 100644 --- a/kaffeine/src/player-parts/dummy-part/dummy_part.cpp +++ b/kaffeine/src/player-parts/dummy-part/dummy_part.cpp @@ -27,14 +27,14 @@ typedef KParts::GenericFactory<DummyPart> DummyPartFactory; K_EXPORT_COMPONENT_FACTORY (libdummypart, DummyPartFactory); -DummyPart::DummyPart(QWidget* parentWidget, const char* widgetName, QObject* parent, const char* name, const QStringList& /*args*/) -: KaffeinePart(parent, name ? name : "DummyPart") +DummyPart::DummyPart(TQWidget* tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, const TQStringList& /*args*/) +: KaffeinePart(tqparent, name ? name : "DummyPart") { // we need an instance setInstance(DummyPartFactory::instance()); // m_player = new Player(this); - // m_player->setFocusPolicy(QWidget::ClickFocus); + // m_player->setFocusPolicy(TQ_ClickFocus); // setWidget(m_player); setXMLFile("dummy_part.rc"); @@ -114,7 +114,7 @@ void DummyPart::slotMute() void DummyPart::initActions() { - new KAction(i18n("Play"), "player_play", 0, this, SLOT(slotPlay()), actionCollection(), "player_play"); - new KAction(i18n("Pause"), "player_pause", Key_Space, this, SLOT(slotTogglePause()), actionCollection(), "player_pause"); - new KAction(i18n("Stop"), "player_stop", Key_Backspace, this, SLOT(slotStop()), actionCollection(), "player_stop"); + new KAction(i18n("Play"), "player_play", 0, this, TQT_SLOT(slotPlay()), actionCollection(), "player_play"); + new KAction(i18n("Pause"), "player_pause", Key_Space, this, TQT_SLOT(slotTogglePause()), actionCollection(), "player_pause"); + new KAction(i18n("Stop"), "player_stop", Key_Backspace, this, TQT_SLOT(slotStop()), actionCollection(), "player_stop"); } diff --git a/kaffeine/src/player-parts/dummy-part/dummy_part.h b/kaffeine/src/player-parts/dummy-part/dummy_part.h index 8f9a568..413d327 100644 --- a/kaffeine/src/player-parts/dummy-part/dummy_part.h +++ b/kaffeine/src/player-parts/dummy-part/dummy_part.h @@ -35,8 +35,9 @@ class DummyPart : public KaffeinePart { Q_OBJECT + TQ_OBJECT public: - DummyPart(QWidget*, const char*, QObject*, const char*, const QStringList&); + DummyPart(TQWidget*, const char*, TQObject*, const char*, const TQStringList&); virtual ~DummyPart(); /* diff --git a/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp b/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp index 22e747a..f5dc6ec 100644 --- a/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp @@ -33,10 +33,10 @@ #include <kmimetype.h> #include <kpopupmenu.h> -#include <qtimer.h> -#include <qslider.h> -#include <qfile.h> -#include <qtooltip.h> +#include <tqtimer.h> +#include <tqslider.h> +#include <tqfile.h> +#include <tqtooltip.h> #include "gstreamer_part.h" #include "gstreamer_part.moc" @@ -53,15 +53,15 @@ typedef KParts::GenericFactory<GStreamerPart> GStreamerPartFactory; K_EXPORT_COMPONENT_FACTORY (libgstreamerpart, GStreamerPartFactory); -GStreamerPart::GStreamerPart( QWidget* parentWidget, const char* /*widgetName*/, QObject* parent, const char* name, - const QStringList& /*args*/ ) - : KaffeinePart( parent, name ? name : "GStreamerPart" ), +GStreamerPart::GStreamerPart( TQWidget* tqparentWidget, const char* /*widgetName*/, TQObject* tqparent, const char* name, + const TQStringList& /*args*/ ) + : KaffeinePart( tqparent, name ? name : "GStreamerPart" ), m_play(NULL), m_videosink(NULL), m_audiosink(NULL), m_visual(NULL), m_videoSettings(NULL), - m_gstConfig(NULL), m_mute(false), m_logoPath(QString::null), m_posToolbar(NULL) + m_gstConfig(NULL), m_mute(false), m_logoPath(TQString()), m_posToolbar(NULL) { // we need an instance setInstance( GStreamerPartFactory::instance() ); - parentWidget->setPaletteBackgroundColor( QColor(0,0,0) ); //black + tqparentWidget->setPaletteBackgroundColor( TQColor(0,0,0) ); //black bus = NULL; @@ -77,9 +77,9 @@ GStreamerPart::GStreamerPart( QWidget* parentWidget, const char* /*widgetName*/, m_status = GST_STATE_NULL; kdDebug() << "GStreamerPart: Creating video window" << endl; - m_video = new VideoWindow( parentWidget, m_videosink ); - connect( m_video, SIGNAL(signalNewFrameSize(const QSize&)), this, SIGNAL(signalNewFrameSize(const QSize&)) ); - m_video->setFocusPolicy( QWidget::ClickFocus ); + m_video = new VideoWindow( tqparentWidget, m_videosink ); + connect( m_video, TQT_SIGNAL(signalNewFrameSize(const TQSize&)), this, TQT_SIGNAL(signalNewFrameSize(const TQSize&)) ); + m_video->setFocusPolicy( TQ_ClickFocus ); setWidget( m_video ); setXMLFile( "gstreamer_part.rc" ); @@ -92,7 +92,7 @@ GStreamerPart::GStreamerPart( QWidget* parentWidget, const char* /*widgetName*/, m_logoPath = locate( "data", "kaffeine/logo" ); kdDebug() << "GStreamerPart: Found logo animation: " << m_logoPath << endl; - connect( &busTimer, SIGNAL(timeout()), this, SLOT(slotReadBus()) ); + connect( &busTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotReadBus()) ); } @@ -178,8 +178,8 @@ bool GStreamerPart::openURL(const MRL& mrl) currentDevice = ""; - QString ext = m_mrl.kurl().fileName(); - ext = ext.remove( 0 , ext.findRev('.')+1 ).lower(); + TQString ext = m_mrl.kurl().fileName(); + ext = ext.remove( 0 , ext.tqfindRev('.')+1 ).lower(); if ( m_mrl.mime().isNull() ) { KMimeType::Ptr mime = KMimeType::findByURL( m_mrl.kurl().path() ); @@ -192,28 +192,28 @@ bool GStreamerPart::openURL(const MRL& mrl) || (ext == "asx") || (ext == "asf") || (ext == "wvx") || (ext == "wax") ) /* windows meta files */ { kdDebug() << "GStreamerPart: Check for kaffeine/noatun/m3u/pls/asx playlist\n"; - QString localFile; + TQString localFile; if ( KIO::NetAccess::download(m_mrl.kurl(), localFile, widget()) ) { - QFile file( localFile ); + TQFile file( localFile ); file.open( IO_ReadOnly ); - QTextStream stream( &file ); - QString firstLine = stream.readLine(); - QString secondLine = stream.readLine(); + TQTextStream stream( &file ); + TQString firstLine = stream.readLine(); + TQString secondLine = stream.readLine(); file.close(); - if ( secondLine.contains("kaffeine", false) ) { + if ( secondLine.tqcontains("kaffeine", false) ) { kdDebug() << "GStreamerPart: Try loading kaffeine playlist\n"; playlist = PlaylistImport::kaffeine( localFile, m_playlist ); } - if ( secondLine.contains("noatun", false) ) { + if ( secondLine.tqcontains("noatun", false) ) { kdDebug() << "GStreamerPart: Try loading noatun playlist\n"; playlist = PlaylistImport::noatun( localFile, m_playlist); } - if ( firstLine.contains("asx", false) ) { + if ( firstLine.tqcontains("asx", false) ) { kdDebug() << "GStreamerPart: Try loading asx playlist\n"; playlist = PlaylistImport::asx( localFile, m_playlist ); } - if ( firstLine.contains("[playlist]", false) ) { + if ( firstLine.tqcontains("[playlist]", false) ) { kdDebug() << "GStreamerPart: Try loading pls playlist\n"; playlist = PlaylistImport::pls( localFile, m_playlist ); } @@ -232,10 +232,10 @@ bool GStreamerPart::openURL(const MRL& mrl) } int pos; - QString s = mrl.url(); + TQString s = mrl.url(); if ( s.startsWith("cdda://") ) { s = s.remove("cdda://"); - if ( (pos=s.findRev("/"))>-1 ) { + if ( (pos=s.tqfindRev("/"))>-1 ) { currentDevice=s.left( pos ); s = s.right( s.length()-pos-1 ); } @@ -266,7 +266,7 @@ bool GStreamerPart::openURL(const MRL& mrl) m_playlist.append( m_mrl ); } - QTimer::singleShot(0, this, SLOT(slotPlay())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotPlay())); return true; } @@ -283,7 +283,7 @@ void GStreamerPart::slotPlay() emit setStatusBarText( i18n("Opening...") ); MRL curMRL = m_playlist[m_current]; m_url = curMRL.url(); - QString subUrl = QString::null; + TQString subUrl = TQString(); if ( (!curMRL.subtitleFiles().isEmpty()) && (curMRL.currentSubtitle() > -1) ) subUrl = curMRL.subtitleFiles()[curMRL.currentSubtitle()]; @@ -323,7 +323,7 @@ void GStreamerPart::slotPrevious() -void GStreamerPart::setDevice( QString device ) +void GStreamerPart::setDevice( TQString device ) { if ( !m_play ) return; @@ -375,7 +375,7 @@ void GStreamerPart::slotStop() gst_element_set_state( m_play, GST_STATE_READY ); if ( !m_logoPath.isNull() ) { m_url = m_logoPath; - gstPlay( m_logoPath, QString::null ); + gstPlay( m_logoPath, TQString() ); } } @@ -386,7 +386,7 @@ void GStreamerPart::slotVolume( int vol ) if ( !m_play ) return; - emit setStatusBarText(i18n("Volume") + ": " + QString::number(vol) + "%"); + emit setStatusBarText(i18n("Volume") + ": " + TQString::number(vol) + "%"); double v = vol * 0.01; kdDebug() << "GStreamerPart: Set volume to " << v << endl; g_object_set( G_OBJECT(m_play), "volume", v, NULL ); @@ -432,7 +432,7 @@ void GStreamerPart::slotMute() void GStreamerPart::slotSaturation( int sat ) { - emit setStatusBarText( i18n("Saturation") + ": " + QString::number(sat) ); + emit setStatusBarText( i18n("Saturation") + ": " + TQString::number(sat) ); g_object_set( G_OBJECT(m_videosink), "saturation", sat, NULL ); } @@ -440,7 +440,7 @@ void GStreamerPart::slotSaturation( int sat ) void GStreamerPart::slotHue( int hue ) { - emit setStatusBarText( i18n("Hue") + ": " + QString::number(hue) ); + emit setStatusBarText( i18n("Hue") + ": " + TQString::number(hue) ); g_object_set( G_OBJECT(m_videosink), "hue", hue, NULL ); } @@ -448,7 +448,7 @@ void GStreamerPart::slotHue( int hue ) void GStreamerPart::slotContrast( int contrast ) { - emit setStatusBarText( i18n("Contrast") + ": " + QString::number(contrast) ); + emit setStatusBarText( i18n("Contrast") + ": " + TQString::number(contrast) ); g_object_set( G_OBJECT(m_videosink), "contrast", contrast, NULL ); } @@ -456,7 +456,7 @@ void GStreamerPart::slotContrast( int contrast ) void GStreamerPart::slotBrightness( int brightness ) { - emit setStatusBarText( i18n("Brightness") + ": " + QString::number(brightness) ); + emit setStatusBarText( i18n("Brightness") + ": " + TQString::number(brightness) ); g_object_set( G_OBJECT(m_videosink), "brightness", brightness, NULL ); } @@ -474,9 +474,9 @@ void GStreamerPart::gstStateChanged() stateChanged("playing"); else stateChanged("not_playing"); - QString caption = m_mrl.title(); + TQString caption = m_mrl.title(); if ( !m_mrl.artist().isEmpty() ) - caption.append( QString(" (") + m_mrl.artist() + ")" ); + caption.append( TQString(" (") + m_mrl.artist() + ")" ); emit setWindowCaption(caption); emit setStatusBarText(i18n("Playing")); } @@ -504,10 +504,10 @@ void GStreamerPart::slotVideoSettings() g_object_get( G_OBJECT(m_videosink), "brightness", &bright, NULL ); m_videoSettings = new VideoSettings( hue, sat, contr, bright ); - connect( m_videoSettings, SIGNAL(signalNewBrightness(int)), this, SLOT(slotBrightness(int)) ); - connect( m_videoSettings, SIGNAL(signalNewContrast(int)), this, SLOT(slotContrast(int)) ); - connect( m_videoSettings, SIGNAL(signalNewHue(int)), this, SLOT(slotHue(int)) ); - connect( m_videoSettings, SIGNAL(signalNewSaturation(int)), this, SLOT(slotSaturation(int)) ); + connect( m_videoSettings, TQT_SIGNAL(signalNewBrightness(int)), TQT_TQOBJECT(this), TQT_SLOT(slotBrightness(int)) ); + connect( m_videoSettings, TQT_SIGNAL(signalNewContrast(int)), TQT_TQOBJECT(this), TQT_SLOT(slotContrast(int)) ); + connect( m_videoSettings, TQT_SIGNAL(signalNewHue(int)), TQT_TQOBJECT(this), TQT_SLOT(slotHue(int)) ); + connect( m_videoSettings, TQT_SIGNAL(signalNewSaturation(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSaturation(int)) ); } m_videoSettings->show(); @@ -541,7 +541,7 @@ void GStreamerPart::processMetaInfo() MRL mrl = m_playlist[m_current]; - if ( (mrl.title().contains("/") || mrl.title().contains(".") || (mrl.title().isEmpty())) + if ( (mrl.title().tqcontains("/") || mrl.title().tqcontains(".") || (mrl.title().isEmpty())) && !m_title.stripWhiteSpace().isEmpty() && m_title.length() > 1 ) mrl.setTitle( m_title ); if (mrl.artist().isEmpty() && !m_artist.stripWhiteSpace().isEmpty()) @@ -555,15 +555,15 @@ void GStreamerPart::processMetaInfo() if (mrl.comment().isEmpty() && !m_comment.stripWhiteSpace().isEmpty()) mrl.setComment(m_comment); if (mrl.length().isNull()) { - QTime length = QTime().addMSecs(m_timer->getTotalTimeMS()); + TQTime length = TQTime().addMSecs(m_timer->getTotalTimeMS()); if (!length.isNull()) mrl.setLength(length); } m_playlist[m_current] = mrl; - QString caption = mrl.title(); + TQString caption = mrl.title(); if (!mrl.artist().isEmpty()) - caption.append(QString(" (") + mrl.artist() + ")"); + caption.append(TQString(" (") + mrl.artist() + ")"); emit setWindowCaption(caption); /* if we don't have a playlist emit signalNewMeta() */ if (mrl.url() == m_mrl.url()) { @@ -576,8 +576,8 @@ void GStreamerPart::processMetaInfo() void GStreamerPart::slotInfo() { - QString info; - QTextStream ts(&info, IO_WriteOnly); + TQString info; + TQTextStream ts(&info, IO_WriteOnly); ts << "<qt><table width=\"90%\">"; ts << "<tr><td colspan=\"2\"><center><b>" << m_title << "</b></center></td></tr>"; if (!m_artist.isNull()) @@ -593,7 +593,7 @@ void GStreamerPart::slotInfo() if (!m_comment.isNull()) ts << "<tr><td><b>" << i18n("Comment") << ":</b></td><td> " << m_comment << "</td></tr>"; - QTime length = QTime().addMSecs(m_timer->getTotalTimeMS()); + TQTime length = TQTime().addMSecs(m_timer->getTotalTimeMS()); if (!length.isNull()) ts << "<tr><td><b>" << i18n("Length") << ":</b></td><td> " << length.toString("h:mm:ss") << "</td></tr>"; @@ -612,7 +612,7 @@ void GStreamerPart::slotInfo() -void GStreamerPart::slotSetVisualPlugin( const QString& name ) +void GStreamerPart::slotSetVisualPlugin( const TQString& name ) { if ( name != "none" ) { GstElement* visual = gst_element_factory_make( name.ascii(), "visualization" ); @@ -638,7 +638,7 @@ void GStreamerPart::slotSetVisualPlugin( const QString& name ) -void GStreamerPart::slotContextMenu( const QPoint& pos ) +void GStreamerPart::slotContextMenu( const TQPoint& pos ) { if (factory()) { KPopupMenu *pop = (KPopupMenu*)factory()->container("context_menu", this); @@ -692,52 +692,52 @@ void GStreamerPart::slotPrepareForFullscreen( bool fullscreen ) void GStreamerPart::initActions() { - new KAction(i18n("Toggle Minimal Mode"), 0, 0, this, SIGNAL(signalToggleMinimalMode()), actionCollection(), "player_minimal_mode"); - new KAction(i18n("Play"), "player_play", 0, this, SLOT(slotPlay()), actionCollection(), "player_play"); - new KAction(i18n("Pause"), "player_pause", Key_Space, this, SLOT(slotTogglePause()), actionCollection(), "player_pause"); - new KAction(i18n("Stop"), "player_stop", Key_Backspace, this, SLOT(slotStop()), actionCollection(), "player_stop"); - new KAction(i18n("&Next"), "player_end", Key_PageDown, this, SLOT(slotNext()), actionCollection(), "player_next"); - new KAction(i18n("&Previous"), "player_start", Key_PageUp, this, SLOT(slotPrevious()), actionCollection(), "player_previous"); + new KAction(i18n("Toggle Minimal Mode"), 0, 0, this, TQT_SIGNAL(signalToggleMinimalMode()), actionCollection(), "player_minimal_mode"); + new KAction(i18n("Play"), "player_play", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlay()), actionCollection(), "player_play"); + new KAction(i18n("Pause"), "player_pause", Key_Space, TQT_TQOBJECT(this), TQT_SLOT(slotTogglePause()), actionCollection(), "player_pause"); + new KAction(i18n("Stop"), "player_stop", Key_Backspace, TQT_TQOBJECT(this), TQT_SLOT(slotStop()), actionCollection(), "player_stop"); + new KAction(i18n("&Next"), "player_end", Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(slotNext()), actionCollection(), "player_next"); + new KAction(i18n("&Previous"), "player_start", Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(slotPrevious()), actionCollection(), "player_previous"); m_timer = new Timer(); new KWidgetAction(m_timer->getSlider(), i18n("Position"), 0, 0, 0, actionCollection(), "player_position"); - new KWidgetAction((QWidget*)m_timer->getLabel(), i18n("Playtime"), 0, 0, 0, actionCollection(), "player_playtime"); + new KWidgetAction((TQWidget*)m_timer->getLabel(), i18n("Playtime"), 0, 0, 0, actionCollection(), "player_playtime"); m_audioVisual = new KSelectAction(i18n("Audio &Visualization"), 0, actionCollection(), "audio_visual"); - connect(m_audioVisual, SIGNAL(activated(const QString&)), this, SLOT(slotSetVisualPlugin(const QString&))); + connect(m_audioVisual, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetVisualPlugin(const TQString&))); m_audioVisualPluginList.prepend("none"); m_audioVisual->setItems(m_audioVisualPluginList); - m_audioVisual->setCurrentItem(m_audioVisual->items().findIndex(m_visualPluginName)); - - new KAction(i18n("&Mute"), "player_mute", Key_U, this, SLOT(slotMute()), actionCollection(), "audio_mute"); - new KAction(i18n("&Auto"), "viewmagfit", Key_F5, m_video, SLOT(slotAspectRatioAuto()), actionCollection(), "aspect_auto"); - new KAction(i18n("&4:3"), "viewmagfit", Key_F6, m_video, SLOT(slotAspectRatio4_3()), actionCollection(), "aspect_43"); - new KAction(i18n("A&namorphic"), "viewmagfit", Key_F7, m_video, SLOT(slotAspectRatioAnamorphic()), actionCollection(), "aspect_anamorphic"); - new KAction(i18n("&DVB"), "viewmagfit", Key_F8, m_video, SLOT(slotAspectRatioDVB()), actionCollection(), "aspect_dvb"); - new KAction(i18n("&Square"), "viewmagfit", Key_F9, m_video, SLOT(slotAspectRatioSquare()), actionCollection(), "aspect_square"); - new KAction(i18n("&Video Settings"), "configure", Key_V, this, SLOT(slotVideoSettings()), actionCollection(), "video_settings"); - new KAction(i18n("Track &Info"), "info", 0 , this, SLOT(slotInfo()), actionCollection(), "player_track_info"); - - m_volume = new QSlider(Horizontal, 0); - QToolTip::add(m_volume, i18n("Volume")); + m_audioVisual->setCurrentItem(m_audioVisual->items().tqfindIndex(m_visualPluginName)); + + new KAction(i18n("&Mute"), "player_mute", Key_U, TQT_TQOBJECT(this), TQT_SLOT(slotMute()), actionCollection(), "audio_mute"); + new KAction(i18n("&Auto"), "viewmagfit", Key_F5, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatioAuto()), actionCollection(), "aspect_auto"); + new KAction(i18n("&4:3"), "viewmagfit", Key_F6, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatio4_3()), actionCollection(), "aspect_43"); + new KAction(i18n("A&namorphic"), "viewmagfit", Key_F7, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatioAnamorphic()), actionCollection(), "aspect_anamorphic"); + new KAction(i18n("&DVB"), "viewmagfit", Key_F8, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatioDVB()), actionCollection(), "aspect_dvb"); + new KAction(i18n("&Square"), "viewmagfit", Key_F9, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatioSquare()), actionCollection(), "aspect_square"); + new KAction(i18n("&Video Settings"), "configure", Key_V, TQT_TQOBJECT(this), TQT_SLOT(slotVideoSettings()), actionCollection(), "video_settings"); + new KAction(i18n("Track &Info"), "info", 0 , TQT_TQOBJECT(this), TQT_SLOT(slotInfo()), actionCollection(), "player_track_info"); + + m_volume = new TQSlider(Qt::Horizontal, 0); + TQToolTip::add(m_volume, i18n("Volume")); m_volume->setRange(0, 100); m_volume->setSteps(1, 5); m_volume->setFixedWidth(75); - connect(m_volume, SIGNAL(valueChanged(int)), this, SLOT(slotVolume(int))); + connect(m_volume, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotVolume(int))); slotSetVolume(m_savedVolume); new KWidgetAction(m_volume, i18n("Volume"), 0, 0, 0, actionCollection(), "audio_volume"); - new KAction(i18n("&GStreamer Engine Parameters"), "edit", 0, this, SLOT(slotConfigDialog()), actionCollection(), "settings_gst_parameter"); + new KAction(i18n("&GStreamer Engine Parameters"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigDialog()), actionCollection(), "settings_gst_parameter"); - connect(m_video, SIGNAL(signalRightClick(const QPoint&)), this, SLOT(slotContextMenu(const QPoint&))); + connect(m_video, TQT_SIGNAL(signalRightClick(const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(const TQPoint&))); } //Change audio sink on the fly -void GStreamerPart::setAudioSink( QString sinkName ) +void GStreamerPart::setAudioSink( TQString sinkName ) { GstElement* sink = gst_element_factory_make(sinkName.ascii(), "audiosink"); if ( !sink ) { - KMessageBox::error(0, i18n("Error: Can't init new Audio Driver %1 - using %2!").arg(sinkName).arg(m_audioSinkName)); + KMessageBox::error(0, i18n("Error: Can't init new Audio Driver %1 - using %2!").tqarg(sinkName).tqarg(m_audioSinkName)); return; } @@ -765,7 +765,7 @@ bool GStreamerPart::initGStreamer() /* check for visualization plugins */ GList* factories = gst_registry_get_feature_list(gst_registry_get_default (), GST_TYPE_ELEMENT_FACTORY); - QString name, cat; + TQString name, cat; while ( factories ) { name = GST_PLUGIN_FEATURE_NAME(factories->data); cat = gst_element_factory_get_klass(GST_ELEMENT_FACTORY(factories->data)); @@ -785,7 +785,7 @@ bool GStreamerPart::initGStreamer() */ m_audiosink = gst_element_factory_make( m_audioSinkName.ascii(), "audiosink" ); if ( !m_audiosink ) { - KMessageBox::error(0, i18n("Can't init Audio Driver '%1' - trying another one...").arg(m_audioSinkName)); + KMessageBox::error(0, i18n("Can't init Audio Driver '%1' - trying another one...").tqarg(m_audioSinkName)); if ( (m_audiosink = gst_element_factory_make("alsasink", "audiosink")) != NULL ) kdDebug() << "GStreamerPart: Using audio-driver: alsasink" << endl; else { @@ -809,7 +809,7 @@ bool GStreamerPart::initGStreamer() */ m_videosink = gst_element_factory_make( m_videoSinkName.ascii(), "videosink" ); if ( !m_videosink ) { - KMessageBox::error(0, i18n("Can't init Video Driver '%1' - trying another one...").arg(m_videoSinkName)); + KMessageBox::error(0, i18n("Can't init Video Driver '%1' - trying another one...").tqarg(m_videoSinkName)); if ((m_videosink = gst_element_factory_make("xvimagesink", "videosink")) != NULL) kdDebug() << "GStreamerPart: Using video-driver: xvimagesink" << endl; else { @@ -886,21 +886,21 @@ void GStreamerPart::deletePlaybin() -void GStreamerPart::gstPlay( const QString& trackUrl, const QString& subtitleUrl ) +void GStreamerPart::gstPlay( const TQString& trackUrl, const TQString& subtitleUrl ) { if ( !m_play && !createPlaybin() ) return; - m_title = QString::null; - m_artist = QString::null; - m_album = QString::null; - m_year = QString::null; - m_genre = QString::null; - m_track = QString::null; - m_comment = QString::null; - m_audioCodec = QString::null; - m_videoCodec = QString::null; - QString url = trackUrl; + m_title = TQString(); + m_artist = TQString(); + m_album = TQString(); + m_year = TQString(); + m_genre = TQString(); + m_track = TQString(); + m_comment = TQString(); + m_audioCodec = TQString(); + m_videoCodec = TQString(); + TQString url = trackUrl; if ( GST_STATE(m_play)!=GST_STATE_READY ) gst_element_set_state( m_play, GST_STATE_READY ); @@ -923,7 +923,7 @@ void GStreamerPart::gstPlay( const QString& trackUrl, const QString& subtitleUrl //process subtitle url if ( !subtitleUrl.isNull() ) { - QString sub = subtitleUrl; + TQString sub = subtitleUrl; if ( sub.left(7).lower() == "file://" ) { sub.insert(6, "/"); } @@ -953,7 +953,7 @@ void GStreamerPart::gstPlay( const QString& trackUrl, const QString& subtitleUrl void GStreamerPart::slotReadBus() { - //kdDebug() << "readBus : " << QTime::currentTime().toString("hh:mm:ss:zzz") << endl; + //kdDebug() << "readBus : " << TQTime::currentTime().toString("hh:mm:ss:zzz") << endl; if ( !bus ) return; @@ -985,7 +985,7 @@ void GStreamerPart::slotReadBus() if (m_url != m_logoPath) { errorMessage = error->message; errorDetails = debug; - QTimer::singleShot( 0, this, SLOT(slotEngineError()) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT(slotEngineError()) ); } g_error_free( error ); g_free( debug ); @@ -1065,7 +1065,7 @@ void GStreamerPart::foundTag( GstTagList *taglist ) success = true; } if ( gst_tag_list_get_uint(taglist, GST_TAG_TRACK_NUMBER, &intVal) && intVal > 0 ) { - m_track = QString::number(intVal); + m_track = TQString::number(intVal); success = true; } if ( gst_tag_list_get_string(taglist, GST_TAG_COMMENT, &string) && string ) { diff --git a/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.h b/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.h index 0f5c276..873b1cf 100644 --- a/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.h +++ b/kaffeine/src/player-parts/gstreamer-part/gstreamer_part.h @@ -38,8 +38,9 @@ class GStreamerPart : public KaffeinePart { Q_OBJECT + TQ_OBJECT public: - GStreamerPart( QWidget*, const char*, QObject*, const char*, const QStringList& ); + GStreamerPart( TQWidget*, const char*, TQObject*, const char*, const TQStringList& ); virtual ~GStreamerPart(); /* @@ -75,9 +76,9 @@ private slots: void slotHue( int ); /* -1000...1000 */ void slotContrast( int ); /* -1000...1000 */ void slotBrightness( int ); /* -1000...1000 */ - void slotContextMenu( const QPoint& pos ); + void slotContextMenu( const TQPoint& pos ); void slotInfo(); - void slotSetVisualPlugin( const QString& ); + void slotSetVisualPlugin( const TQString& ); void slotVideoSettings(); void slotConfigDialog(); void slotEngineError(); @@ -90,14 +91,14 @@ private: void deletePlaybin(); void loadConfig(); void saveConfig(); - void gstPlay( const QString& trackUrl, const QString& subtitleUrl ); + void gstPlay( const TQString& trackUrl, const TQString& subtitleUrl ); void initActions(); void showError(); void gstStateChanged(); void foundTag( GstTagList *taglist ); void processMetaInfo(); - void setAudioSink( QString sinkName ); - void setDevice( QString device ); + void setAudioSink( TQString sinkName ); + void setDevice( TQString device ); private: GstElement *m_play; @@ -107,44 +108,44 @@ private: GstBus *bus; GstState m_status; - QTimer busTimer; + TQTimer busTimer; VideoWindow* m_video; Timer* m_timer; VideoSettings* m_videoSettings; GStreamerConfig* m_gstConfig; - QSlider* m_volume; + TQSlider* m_volume; KSelectAction* m_audioVisual; MRL m_mrl; - QValueList<MRL> m_playlist; + TQValueList<MRL> m_playlist; uint m_current; bool m_mute; - QString m_logoPath; - - QString m_errorMsg; - QString m_errorDetails; - - QString m_url; - QString m_title; - QString m_artist; - QString m_album; - QString m_track; - QString m_year; - QString m_genre; - QString m_comment; - QString m_audioCodec; - QString m_videoCodec; - QString errorMessage; - QString errorDetails; - - QString m_audioSinkName; - QString m_videoSinkName; - QString m_visualPluginName; - QStringList m_audioVisualPluginList; - QStringList m_audioPluginList; - QStringList m_videoPluginList; - QString m_device, currentDevice; + TQString m_logoPath; + + TQString m_errorMsg; + TQString m_errorDetails; + + TQString m_url; + TQString m_title; + TQString m_artist; + TQString m_album; + TQString m_track; + TQString m_year; + TQString m_genre; + TQString m_comment; + TQString m_audioCodec; + TQString m_videoCodec; + TQString errorMessage; + TQString errorDetails; + + TQString m_audioSinkName; + TQString m_videoSinkName; + TQString m_visualPluginName; + TQStringList m_audioVisualPluginList; + TQStringList m_audioPluginList; + TQStringList m_videoPluginList; + TQString m_device, currentDevice; int m_savedVolume; int muteVolume; diff --git a/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.cpp b/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.cpp index 19025bc..dd843f5 100644 --- a/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.cpp @@ -25,93 +25,93 @@ #include <kiconloader.h> #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include "gstreamerconfig.h" #include "gstreamerconfig.moc" -GStreamerConfig::GStreamerConfig(const QStringList& audioDrivers, const QStringList& videoDrivers) : +GStreamerConfig::GStreamerConfig(const TQStringList& audioDrivers, const TQStringList& videoDrivers) : KDialogBase(KDialogBase::IconList, i18n("GStreamer Engine Parameters"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Cancel) { - setInitialSize(QSize(400,300), true); + setInitialSize(TQSize(400,300), true); - QFrame* frame = NULL; - QGridLayout* layout = NULL; - QLabel* label = NULL; + TQFrame* frame = NULL; + TQGridLayout* tqlayout = NULL; + TQLabel* label = NULL; //Audio Page frame = addPage(i18n("Audio"), i18n("Audio Options"), KGlobal::iconLoader()->loadIcon("sound", KIcon::Panel, KIcon::SizeMedium)); - layout = new QGridLayout(frame, 10, 2); - layout->setMargin(10); - layout->setSpacing(10); + tqlayout = new TQGridLayout(frame, 10, 2); + tqlayout->setMargin(10); + tqlayout->setSpacing(10); m_audioDriverBox = new KComboBox(frame); m_audioDriverBox->insertStringList(audioDrivers); - label = new QLabel(i18n("Prefered audio driver"), frame); - layout->addWidget(label, 1, 0); - layout->addWidget(m_audioDriverBox, 1, 1); - layout->addMultiCellWidget(new KSeparator(KSeparator::Horizontal, frame), 2, 2, 0, 1); + label = new TQLabel(i18n("Prefered audio driver"), frame); + tqlayout->addWidget(label, 1, 0); + tqlayout->addWidget(m_audioDriverBox, 1, 1); + tqlayout->addMultiCellWidget(new KSeparator(Qt::Horizontal, frame), 2, 2, 0, 1); //Video Page frame = addPage(i18n("Video"), i18n("Video Options"), KGlobal::iconLoader()->loadIcon("video", KIcon::Panel, KIcon::SizeMedium)); - layout = new QGridLayout(frame, 10, 2); - layout->setMargin(10); - layout->setSpacing(10); + tqlayout = new TQGridLayout(frame, 10, 2); + tqlayout->setMargin(10); + tqlayout->setSpacing(10); m_videoDriverBox = new KComboBox(frame); m_videoDriverBox->insertStringList(videoDrivers); - label = new QLabel(i18n("Prefered video driver")+ "*", frame); - layout->addWidget(label, 1, 0); - layout->addWidget(m_videoDriverBox, 1, 1); - layout->addMultiCellWidget(new KSeparator(KSeparator::Horizontal, frame), 2, 2, 0, 1); - layout->addWidget(new QLabel(QString("<small>") + i18n("* Restart required!") + "</small>", frame), 10, 1); + label = new TQLabel(i18n("Prefered video driver")+ "*", frame); + tqlayout->addWidget(label, 1, 0); + tqlayout->addWidget(m_videoDriverBox, 1, 1); + tqlayout->addMultiCellWidget(new KSeparator(Qt::Horizontal, frame), 2, 2, 0, 1); + tqlayout->addWidget(new TQLabel(TQString("<small>") + i18n("* Restart required!") + "</small>", frame), 10, 1); //Media page frame = addPage(i18n("Media"), i18n("Media Options"), KGlobal::iconLoader()->loadIcon("cdrom_unmount", KIcon::Panel, KIcon::SizeMedium)); - layout = new QGridLayout(frame, 10, 2); - layout->setMargin(10); - layout->setSpacing(10); + tqlayout = new TQGridLayout(frame, 10, 2); + tqlayout->setMargin(10); + tqlayout->setSpacing(10); m_driveEdit = new KLineEdit(frame); - label = new QLabel(i18n("CD, VCD, DVD drive"), frame); - layout->addWidget(label, 1, 0); - layout->addWidget(m_driveEdit, 1, 1); - layout->addMultiCellWidget(new KSeparator(KSeparator::Horizontal, frame), 2, 2, 0, 1); + label = new TQLabel(i18n("CD, VCD, DVD drive"), frame); + tqlayout->addWidget(label, 1, 0); + tqlayout->addWidget(m_driveEdit, 1, 1); + tqlayout->addMultiCellWidget(new KSeparator(Qt::Horizontal, frame), 2, 2, 0, 1); } GStreamerConfig::~GStreamerConfig() {} -QString GStreamerConfig::getAudioDriver() const +TQString GStreamerConfig::getAudioDriver() const { return m_audioDriverBox->currentText(); } -QString GStreamerConfig::getVideoDriver() const +TQString GStreamerConfig::getVideoDriver() const { return m_videoDriverBox->currentText(); } -QString GStreamerConfig::getDrive() const +TQString GStreamerConfig::getDrive() const { return m_driveEdit->text(); } -void GStreamerConfig::setDrive(const QString& drive) +void GStreamerConfig::setDrive(const TQString& drive) { m_driveEdit->setText(drive); } -void GStreamerConfig::setAudioDriver(const QString& name) +void GStreamerConfig::setAudioDriver(const TQString& name) { m_audioDriverBox->setCurrentText(name); } -void GStreamerConfig::setVideoDriver(const QString& name) +void GStreamerConfig::setVideoDriver(const TQString& name) { m_videoDriverBox->setCurrentText(name); } diff --git a/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.h b/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.h index f85d882..86d21b5 100644 --- a/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.h +++ b/kaffeine/src/player-parts/gstreamer-part/gstreamerconfig.h @@ -27,25 +27,26 @@ #include <kdialogbase.h> -class QString; -class QStringList; +class TQString; +class TQStringList; class KComboBox; class KLineEdit; class GStreamerConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GStreamerConfig(const QStringList& audioDrivers, const QStringList& videoDrivers); + GStreamerConfig(const TQStringList& audioDrivers, const TQStringList& videoDrivers); ~GStreamerConfig(); - QString getAudioDriver() const; - QString getVideoDriver() const; - QString getDrive() const; + TQString getAudioDriver() const; + TQString getVideoDriver() const; + TQString getDrive() const; - void setDrive(const QString& drive); - void setAudioDriver(const QString& name); - void setVideoDriver(const QString& name); + void setDrive(const TQString& drive); + void setAudioDriver(const TQString& name); + void setVideoDriver(const TQString& name); private: KComboBox* m_audioDriverBox; diff --git a/kaffeine/src/player-parts/gstreamer-part/timer.cpp b/kaffeine/src/player-parts/gstreamer-part/timer.cpp index 93d0116..0002fa2 100644 --- a/kaffeine/src/player-parts/gstreamer-part/timer.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/timer.cpp @@ -28,9 +28,9 @@ #include <klocale.h> #include <kdebug.h> -#include <qslider.h> -#include <qlabel.h> -#include <qtimer.h> +#include <tqslider.h> +#include <tqlabel.h> +#include <tqtimer.h> #include "timer.h" @@ -38,14 +38,14 @@ -Timer::Timer() : QObject() +Timer::Timer() : TQObject() { - m_label = new QLabel( "0:00 / 0:00", 0 ); - m_slider = new QSlider( Qt::Horizontal, 0 ); + m_label = new TQLabel( "0:00 / 0:00", 0 ); + m_slider = new TQSlider( Qt::Horizontal, 0 ); m_slider->setMinValue( 0 ); m_slider->setEnabled( false ); - connect( &updateTimer, SIGNAL(timeout()), SLOT(slotUpdate()) ); + connect( &updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdate()) ); m_pos = GST_CLOCK_TIME_NONE; m_len = GST_CLOCK_TIME_NONE; @@ -53,8 +53,8 @@ Timer::Timer() : QObject() m_play = NULL; seeking = false; - connect( m_slider, SIGNAL(sliderPressed()), this, SLOT(slotSeekStart()) ); - connect( m_slider, SIGNAL(sliderReleased()), this, SLOT(slotSeek()) ); + connect( m_slider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotSeekStart()) ); + connect( m_slider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotSeek()) ); } @@ -184,14 +184,14 @@ void Timer::stop() -QLabel* Timer::getLabel() const +TQLabel* Timer::getLabel() const { return m_label; } -QSlider* Timer::getSlider() const +TQSlider* Timer::getSlider() const { return m_slider; } diff --git a/kaffeine/src/player-parts/gstreamer-part/timer.h b/kaffeine/src/player-parts/gstreamer-part/timer.h index 9ee5bff..dd7506a 100644 --- a/kaffeine/src/player-parts/gstreamer-part/timer.h +++ b/kaffeine/src/player-parts/gstreamer-part/timer.h @@ -24,20 +24,21 @@ #ifndef TIMER_H #define TIMER_H -#include <qobject.h> +#include <tqobject.h> #include <gst/gst.h> -class QSlider; -class QLabel; -class QTimer; -class QTime; +class TQSlider; +class TQLabel; +class TQTimer; +class TQTime; -class Timer : public QObject +class Timer : public TQObject { Q_OBJECT + TQ_OBJECT public: Timer(); @@ -52,8 +53,8 @@ public: void seekPercent(uint percent); - QLabel* getLabel() const; - QSlider* getSlider() const; + TQLabel* getLabel() const; + TQSlider* getSlider() const; public slots: void slotSeekStart(); @@ -63,9 +64,9 @@ private slots: void slotUpdate(); private: - QTimer updateTimer; - QLabel *m_label; - QSlider *m_slider; + TQTimer updateTimer; + TQLabel *m_label; + TQSlider *m_slider; GstElement *m_play; bool seeking; diff --git a/kaffeine/src/player-parts/gstreamer-part/video.cpp b/kaffeine/src/player-parts/gstreamer-part/video.cpp index 0fc76cd..eda1d1b 100644 --- a/kaffeine/src/player-parts/gstreamer-part/video.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/video.cpp @@ -25,9 +25,9 @@ #include <config.h> #endif -#include <qpainter.h> -#include <qtimer.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqcursor.h> #include <kstatusbar.h> #include <ktoolbar.h> @@ -42,18 +42,18 @@ -VideoWindow::VideoWindow( QWidget *parent, GstElement *_element ) - : QWidget (parent), m_width(0), m_height(0), m_aspectRatio(AUTO) +VideoWindow::VideoWindow( TQWidget *tqparent, GstElement *_element ) + : TQWidget (tqparent), m_width(0), m_height(0), m_aspectRatio(AUTO) { m_play = NULL; gst_object_ref( GST_OBJECT (_element) ); m_element = _element; - setPaletteBackgroundColor(QColor(0,0,0)); //black + setPaletteBackgroundColor(TQColor(0,0,0)); //black setUpdatesEnabled(false); - connect( &m_mouseHideTimer, SIGNAL(timeout()), this, SLOT(slotHideMouse()) ); + connect( &m_mouseHideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotHideMouse()) ); } @@ -88,14 +88,14 @@ void VideoWindow::refresh() -void VideoWindow::paintEvent(QPaintEvent */*event*/) +void VideoWindow::paintEvent(TQPaintEvent */*event*/) { refresh(); } -void VideoWindow::mousePressEvent(QMouseEvent* mev) +void VideoWindow::mousePressEvent(TQMouseEvent* mev) { if ( mev->button()==Qt::RightButton ) { emit signalRightClick( mev->globalPos() ); @@ -131,10 +131,10 @@ void VideoWindow::newCapsset( const GstCaps *caps ) } } - QSize frame = getFrameSize(); + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); - //set correct geometry + //set correct tqgeometry setGeometry(); } @@ -174,10 +174,10 @@ void VideoWindow::newState() } m_width = 0; m_height = 0; - QSize frame = getFrameSize(); + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); - //set correct geometry + //set correct tqgeometry setGeometry(); } @@ -185,12 +185,12 @@ void VideoWindow::newState() void VideoWindow::setGeometry( int, int, int, int ) { - QSize frame = getFrameSize(); - QSize window = parentWidget()->size(); + TQSize frame = getFrameSize(); + TQSize window = tqparentWidget()->size(); int x = 0, y = 0, width = 0, height = 0; if ( frame.width() == 0 || frame.height() == 0 ) { - QWidget::setGeometry(0, 0, window.width(), window.height()); + TQWidget::setGeometry(0, 0, window.width(), window.height()); return; } @@ -211,7 +211,7 @@ void VideoWindow::setGeometry( int, int, int, int ) } //kdDebug() << "VideoWindow::setGeometry: " << x << " : " << y << " : " << width << " : " << height << endl; - QWidget::setGeometry( x, y, width, height ); + TQWidget::setGeometry( x, y, width, height ); } @@ -223,7 +223,7 @@ void VideoWindow::setGeometry() -void VideoWindow::correctByAspectRatio( QSize& frame ) +void VideoWindow::correctByAspectRatio( TQSize& frame ) { float factor = 0; @@ -232,7 +232,7 @@ void VideoWindow::correctByAspectRatio( QSize& frame ) case FOURBYTHREE: factor = 4.0 / 3.0; break; case ANAMORPHIC: factor = 16.0 / 9.0; break; case DVB: factor = 2.11; break; - case SQUARE: factor = 1.0; break; + case STQUARE: factor = 1.0; break; } float frameAspect = (float)frame.width() / (float)frame.height(); @@ -248,7 +248,7 @@ void VideoWindow::correctByAspectRatio( QSize& frame ) void VideoWindow::slotAspectRatioAuto() { m_aspectRatio = AUTO; - QSize frame = getFrameSize(); + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); setGeometry(); @@ -259,7 +259,7 @@ void VideoWindow::slotAspectRatioAuto() void VideoWindow::slotAspectRatio4_3() { m_aspectRatio = FOURBYTHREE; - QSize frame = getFrameSize(); + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); setGeometry(); @@ -270,7 +270,7 @@ void VideoWindow::slotAspectRatio4_3() void VideoWindow::slotAspectRatioAnamorphic() { m_aspectRatio = ANAMORPHIC; - QSize frame = getFrameSize(); + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); setGeometry(); @@ -281,7 +281,7 @@ void VideoWindow::slotAspectRatioAnamorphic() void VideoWindow::slotAspectRatioDVB() { m_aspectRatio = DVB; - QSize frame = getFrameSize(); + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); setGeometry(); @@ -291,8 +291,8 @@ void VideoWindow::slotAspectRatioDVB() void VideoWindow::slotAspectRatioSquare() { - m_aspectRatio = SQUARE; - QSize frame = getFrameSize(); + m_aspectRatio = STQUARE; + TQSize frame = getFrameSize(); correctByAspectRatio( frame ); emit signalNewFrameSize( frame ); setGeometry(); @@ -312,21 +312,21 @@ void VideoWindow::stopMouseHideTimer() { m_mouseHideTimer.stop(); setMouseTracking( false ); - setCursor( QCursor(Qt::ArrowCursor) ); + setCursor( TQCursor(TQt::ArrowCursor) ); } void VideoWindow::slotHideMouse() { - setCursor( QCursor(Qt::BlankCursor) ); + setCursor( TQCursor(TQt::BlankCursor) ); } -void VideoWindow::mouseMoveEvent( QMouseEvent *mev ) +void VideoWindow::mouseMoveEvent( TQMouseEvent *mev ) { - if ( cursor().shape() == Qt::BlankCursor ) - setCursor( QCursor(Qt::ArrowCursor) ); + if ( cursor().shape() == TQt::BlankCursor ) + setCursor( TQCursor(TQt::ArrowCursor) ); mev->ignore(); } diff --git a/kaffeine/src/player-parts/gstreamer-part/video.h b/kaffeine/src/player-parts/gstreamer-part/video.h index 5878066..a5d5263 100644 --- a/kaffeine/src/player-parts/gstreamer-part/video.h +++ b/kaffeine/src/player-parts/gstreamer-part/video.h @@ -24,21 +24,22 @@ #ifndef VIDEO_H #define VIDEO_H -#include <qwidget.h> +#include <tqwidget.h> #include <kapplication.h> -#include <qsize.h> +#include <tqsize.h> #include <gst/gst.h> -class VideoWindow : public QWidget +class VideoWindow : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VideoWindow( QWidget *parent, GstElement *element ); + VideoWindow( TQWidget *tqparent, GstElement *element ); ~VideoWindow (); enum AspectRatio { @@ -46,7 +47,7 @@ public: FOURBYTHREE, ANAMORPHIC, DVB, - SQUARE + STQUARE }; void newState(); @@ -55,17 +56,17 @@ public: void refresh(); - QSize getFrameSize() { return QSize(m_width, m_height); } + TQSize getFrameSize() { return TQSize(m_width, m_height); } void startMouseHideTimer(); void stopMouseHideTimer(); signals: - void signalNewFrameSize( const QSize& ); - void signalRightClick( const QPoint& ); + void signalNewFrameSize( const TQSize& ); + void signalRightClick( const TQPoint& ); public slots: -// void setGeometry(const QRect&); +// void setGeometry(const TQRect&); void setGeometry(); void setGeometry( int x, int y, int width, int heigth ); void slotAspectRatioAuto(); @@ -78,18 +79,18 @@ private slots: void slotHideMouse(); protected: - void paintEvent( QPaintEvent *event ); - void mousePressEvent( QMouseEvent* ); - void mouseMoveEvent( QMouseEvent* ); + void paintEvent( TQPaintEvent *event ); + void mousePressEvent( TQMouseEvent* ); + void mouseMoveEvent( TQMouseEvent* ); private: - void correctByAspectRatio( QSize &frame ); + void correctByAspectRatio( TQSize &frame ); private: GstElement *m_element, *m_play; int m_width, m_height; AspectRatio m_aspectRatio; - QTimer m_mouseHideTimer; + TQTimer m_mouseHideTimer; }; #endif /* VIDEO_H */ diff --git a/kaffeine/src/player-parts/gstreamer-part/videosettings.cpp b/kaffeine/src/player-parts/gstreamer-part/videosettings.cpp index 2e59359..099b546 100644 --- a/kaffeine/src/player-parts/gstreamer-part/videosettings.cpp +++ b/kaffeine/src/player-parts/gstreamer-part/videosettings.cpp @@ -20,65 +20,65 @@ #include <klocale.h> -#include <qslider.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qnamespace.h> +#include <tqslider.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqnamespace.h> #include "videosettings.h" #include "videosettings.moc" -VideoSettings::VideoSettings(int hue, int sat, int contr, int bright, QWidget *parent, const char *name) - : KDialogBase(KDialogBase::Plain, i18n("Video Settings"), KDialogBase::Default | KDialogBase::Close, KDialogBase::Close, parent, name, false) +VideoSettings::VideoSettings(int hue, int sat, int contr, int bright, TQWidget *tqparent, const char *name) + : KDialogBase(KDialogBase::Plain, i18n("Video Settings"), KDialogBase::Default | KDialogBase::Close, KDialogBase::Close, tqparent, name, false) { - setInitialSize(QSize(450,200), true); - QWidget* page = plainPage(); + setInitialSize(TQSize(450,200), true); + TQWidget* page = plainPage(); - QGridLayout* grid = new QGridLayout(page, 4, 2); + TQGridLayout* grid = new TQGridLayout(page, 4, 2); grid->setSpacing(5); - QLabel* hueText = new QLabel(i18n("Hue"), page); - hueText->setAlignment(AlignRight); - m_hueSlider = new QSlider(Qt::Horizontal, page); + TQLabel* hueText = new TQLabel(i18n("Hue"), page); + hueText->tqsetAlignment(AlignRight); + m_hueSlider = new TQSlider(Qt::Horizontal, page); m_hueSlider->setRange(-1000, 1000); m_hueSlider->setSteps(10, 100); m_hueSlider->setValue(hue); - connect(m_hueSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewHue(int))); + connect(m_hueSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewHue(int))); grid->addWidget(hueText, 0, 0); grid->addWidget(m_hueSlider, 0, 1); - QLabel* satText = new QLabel(i18n("Saturation"), page); - satText->setAlignment(AlignRight); - m_satSlider = new QSlider(Qt::Horizontal, page); + TQLabel* satText = new TQLabel(i18n("Saturation"), page); + satText->tqsetAlignment(AlignRight); + m_satSlider = new TQSlider(Qt::Horizontal, page); m_satSlider->setRange(-1000, 1000); m_satSlider->setSteps(10, 100); m_satSlider->setValue(sat); - connect(m_satSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewSaturation(int))); + connect(m_satSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewSaturation(int))); grid->addWidget(satText, 1, 0); grid->addWidget(m_satSlider, 1, 1); - QLabel* contrastText = new QLabel(i18n("Contrast"), page); - contrastText->setAlignment(AlignRight); - m_contrastSlider = new QSlider(Qt::Horizontal, page); + TQLabel* contrastText = new TQLabel(i18n("Contrast"), page); + contrastText->tqsetAlignment(AlignRight); + m_contrastSlider = new TQSlider(Qt::Horizontal, page); m_contrastSlider->setRange(-1000, 1000); m_contrastSlider->setSteps(10, 100); m_contrastSlider->setValue(contr); - connect(m_contrastSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewContrast(int))); + connect(m_contrastSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewContrast(int))); grid->addWidget(contrastText, 2, 0); grid->addWidget(m_contrastSlider, 2, 1); - QLabel* brightText = new QLabel(i18n("Brightness"), page); - brightText->setAlignment(AlignRight); - m_brightSlider = new QSlider(Qt::Horizontal, page); + TQLabel* brightText = new TQLabel(i18n("Brightness"), page); + brightText->tqsetAlignment(AlignRight); + m_brightSlider = new TQSlider(Qt::Horizontal, page); m_brightSlider->setRange(-1000, 1000); m_brightSlider->setSteps(10, 100); m_brightSlider->setValue(bright); - connect(m_brightSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewBrightness(int))); + connect(m_brightSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewBrightness(int))); grid->addWidget(brightText, 3, 0); grid->addWidget(m_brightSlider, 3, 1); - connect(this, SIGNAL(defaultClicked()), this, SLOT(slotSetDefaultValues())); + connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotSetDefaultValues())); } VideoSettings::~VideoSettings() diff --git a/kaffeine/src/player-parts/gstreamer-part/videosettings.h b/kaffeine/src/player-parts/gstreamer-part/videosettings.h index 62be08e..e2bf6c9 100644 --- a/kaffeine/src/player-parts/gstreamer-part/videosettings.h +++ b/kaffeine/src/player-parts/gstreamer-part/videosettings.h @@ -27,15 +27,16 @@ #include <kdialogbase.h> -class QSlider; +class TQSlider; class VideoSettings : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - VideoSettings(int hue, int sat, int contr, int bright, QWidget *parent=0, const char *name=0); + VideoSettings(int hue, int sat, int contr, int bright, TQWidget *tqparent=0, const char *name=0); ~VideoSettings(); signals: @@ -49,10 +50,10 @@ private slots: void slotSetDefaultValues(); private: - QSlider* m_hueSlider; - QSlider* m_satSlider; - QSlider* m_contrastSlider; - QSlider* m_brightSlider; + TQSlider* m_hueSlider; + TQSlider* m_satSlider; + TQSlider* m_contrastSlider; + TQSlider* m_brightSlider; }; #endif /* VIDEOSETTINGS_H */ diff --git a/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.cpp b/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.cpp index feaec12..9e3ad00 100644 --- a/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.cpp +++ b/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.cpp @@ -22,8 +22,8 @@ #include "kaffeinepart.moc" -KaffeinePart::KaffeinePart(QObject* parent, const char* name) - : KParts::ReadOnlyPart(parent, name) +KaffeinePart::KaffeinePart(TQObject* tqparent, const char* name) + : KParts::ReadOnlyPart(tqparent, name) { } diff --git a/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.h b/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.h index 4281c93..7acc956 100644 --- a/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.h +++ b/kaffeine/src/player-parts/kaffeine-part/kaffeinepart.h @@ -29,8 +29,8 @@ * Base-Class for Kaffeine-Parts. Derive from this class if you want to develop a player part for Kaffeine. * At least you have to reimplement openURL(const MRL&) and to emit signalTrackFinished()! * - * IMPORTANT: Forward the double-click, middle-click and wheel mouse-events to the parent widget (don't use - * QMouseEvent::accept())! + * IMPORTANT: Forward the double-click, middle-click and wheel mouse-events to the tqparent widget (don't use + * TQMouseEvent::accept())! * * @author Jürgen Kofler */ @@ -38,8 +38,9 @@ class KDE_EXPORT KaffeinePart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KaffeinePart(QObject* parent, const char* name); + KaffeinePart(TQObject* tqparent, const char* name); virtual ~KaffeinePart(); /* @@ -61,9 +62,9 @@ public: /* * Should look like "*.mp3 *.MP3 *.avi *.AVI", used as file filter for directory import */ - virtual QString supportedExtensions() + virtual TQString supportedExtensions() { - return QString::null; + return TQString(); } /* @@ -103,7 +104,7 @@ signals: /* * Frame size of video changed */ - void signalNewFrameSize(const QSize& frame); + void signalNewFrameSize(const TQSize& frame); /* * New meta information available diff --git a/kaffeine/src/player-parts/kaffeine-part/mrl.cpp b/kaffeine/src/player-parts/kaffeine-part/mrl.cpp index 9ab6e52..495003c 100644 --- a/kaffeine/src/player-parts/kaffeine-part/mrl.cpp +++ b/kaffeine/src/player-parts/kaffeine-part/mrl.cpp @@ -25,18 +25,18 @@ MRL::MRL() reset(); } -MRL::MRL(const KURL& url, const QString& title, const QTime& length, const QString& mime, - const QString& artist, const QString& album, const QString& track, - const QString& year, const QString& genre, const QString& comment, - const QStringList& subtitleFiles, const int currentSubtitle) : +MRL::MRL(const KURL& url, const TQString& title, const TQTime& length, const TQString& mime, + const TQString& artist, const TQString& album, const TQString& track, + const TQString& year, const TQString& genre, const TQString& comment, + const TQStringList& subtitleFiles, const int currentSubtitle) : m_url(url.prettyURL()), m_kurl(url), m_title(title), m_artist(artist), m_album(album), m_track(track), m_year(year), m_genre(genre), m_comment(comment), m_mime(mime), m_length(length), m_subtitleFiles(subtitleFiles), m_currentSubtitle(currentSubtitle) {} -MRL::MRL(const QString& url, const QString& title, const QTime& length, const QString& mime, - const QString& artist, const QString& album, const QString& track, - const QString& year, const QString& genre, const QString& comment, - const QStringList& subtitleFiles, const int currentSubtitle) : +MRL::MRL(const TQString& url, const TQString& title, const TQTime& length, const TQString& mime, + const TQString& artist, const TQString& album, const TQString& track, + const TQString& year, const TQString& genre, const TQString& comment, + const TQStringList& subtitleFiles, const int currentSubtitle) : m_url(url), m_kurl(KURL::fromPathOrURL(url)), m_title(title), m_artist(artist), m_album(album), m_track(track), m_year(year), m_genre(genre), m_comment(comment), m_mime(mime), m_length(length), m_subtitleFiles(subtitleFiles), m_currentSubtitle(currentSubtitle) diff --git a/kaffeine/src/player-parts/kaffeine-part/mrl.h b/kaffeine/src/player-parts/kaffeine-part/mrl.h index 04c6d27..3508848 100644 --- a/kaffeine/src/player-parts/kaffeine-part/mrl.h +++ b/kaffeine/src/player-parts/kaffeine-part/mrl.h @@ -21,8 +21,8 @@ #ifndef MRL_H #define MRL_H -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqdatetime.h> +#include <tqstringlist.h> #include <kurl.h> @@ -36,60 +36,60 @@ class KDE_EXPORT MRL public: MRL(); /* don't use this constructor to prevent encoding problems */ - MRL(const KURL& url, const QString& title = QString::null, const QTime& length = QTime(), const QString& mime = QString::null, - const QString& artist = QString::null, const QString& album = QString::null, const QString& track = QString::null, - const QString& year = QString::null, const QString& genre = QString::null, const QString& comment = QString::null, - const QStringList& subtitleFiles = QStringList(), const int currentSubtitle = -1); - MRL(const QString& url, const QString& title = QString::null, const QTime& length = QTime(), const QString& mime = QString::null, - const QString& artist = QString::null, const QString& album = QString::null, const QString& track = QString::null, - const QString& year = QString::null, const QString& genre = QString::null, const QString& comment = QString::null, - const QStringList& subtitleFiles = QStringList(), const int currentSubtitle = -1); + MRL(const KURL& url, const TQString& title = TQString(), const TQTime& length = TQTime(), const TQString& mime = TQString(), + const TQString& artist = TQString(), const TQString& album = TQString(), const TQString& track = TQString(), + const TQString& year = TQString(), const TQString& genre = TQString(), const TQString& comment = TQString(), + const TQStringList& subtitleFiles = TQStringList(), const int currentSubtitle = -1); + MRL(const TQString& url, const TQString& title = TQString(), const TQTime& length = TQTime(), const TQString& mime = TQString(), + const TQString& artist = TQString(), const TQString& album = TQString(), const TQString& track = TQString(), + const TQString& year = TQString(), const TQString& genre = TQString(), const TQString& comment = TQString(), + const TQStringList& subtitleFiles = TQStringList(), const int currentSubtitle = -1); virtual ~MRL(); - void reset() { m_url = QString::null; m_kurl = KURL(); } - bool isEmpty() { return (m_url == QString::null); } + void reset() { m_url = TQString(); m_kurl = KURL(); } + bool isEmpty() { return (m_url == TQString()); } - const QString& url() const { return m_url; } + const TQString& url() const { return m_url; } const KURL& kurl() const { return m_kurl; } - const QString& title() const { return m_title; } - const QString& artist() const { return m_artist; } - const QString& album() const { return m_album; } - const QString& track() const { return m_track; } - const QString& year() const { return m_year; } - const QString& genre() const { return m_genre; } - const QString& comment() const { return m_comment; } - const QString& mime() const { return m_mime; } - const QTime& length() const { return m_length; } - const QStringList& subtitleFiles() const { return m_subtitleFiles; } + const TQString& title() const { return m_title; } + const TQString& artist() const { return m_artist; } + const TQString& album() const { return m_album; } + const TQString& track() const { return m_track; } + const TQString& year() const { return m_year; } + const TQString& genre() const { return m_genre; } + const TQString& comment() const { return m_comment; } + const TQString& mime() const { return m_mime; } + const TQTime& length() const { return m_length; } + const TQStringList& subtitleFiles() const { return m_subtitleFiles; } int currentSubtitle() const { return m_currentSubtitle; } - void setURL(const QString& url) { m_url = url; m_kurl = KURL(url); } - void setTitle(const QString& title) { m_title = title; } - void setArtist(const QString& artist) { m_artist = artist; } - void setAlbum(const QString& album) { m_album = album; } - void setTrack(const QString& track) { m_track = track; } - void setYear(const QString& year) { m_year = year; } - void setGenre(const QString& genre) { m_genre = genre; } - void setComment(const QString& comment) { m_comment = comment; } - void setMime(const QString& mime) { m_mime = mime; } - void setLength(const QTime& length) { m_length = length; } - void setSubtitleFiles(const QStringList& urls) { m_subtitleFiles = urls; } - void addSubtitleFile(const QString& url) { m_subtitleFiles.append(url); } + void setURL(const TQString& url) { m_url = url; m_kurl = KURL(url); } + void setTitle(const TQString& title) { m_title = title; } + void setArtist(const TQString& artist) { m_artist = artist; } + void setAlbum(const TQString& album) { m_album = album; } + void setTrack(const TQString& track) { m_track = track; } + void setYear(const TQString& year) { m_year = year; } + void setGenre(const TQString& genre) { m_genre = genre; } + void setComment(const TQString& comment) { m_comment = comment; } + void setMime(const TQString& mime) { m_mime = mime; } + void setLength(const TQTime& length) { m_length = length; } + void setSubtitleFiles(const TQStringList& urls) { m_subtitleFiles = urls; } + void addSubtitleFile(const TQString& url) { m_subtitleFiles.append(url); } void setCurrentSubtitle(int sub) { m_currentSubtitle = sub; } private: - QString m_url; + TQString m_url; KURL m_kurl; - QString m_title; - QString m_artist; - QString m_album; - QString m_track; - QString m_year; - QString m_genre; - QString m_comment; - QString m_mime; - QTime m_length; - QStringList m_subtitleFiles; + TQString m_title; + TQString m_artist; + TQString m_album; + TQString m_track; + TQString m_year; + TQString m_genre; + TQString m_comment; + TQString m_mime; + TQTime m_length; + TQStringList m_subtitleFiles; int m_currentSubtitle; /* -1 -> off */ }; diff --git a/kaffeine/src/player-parts/kaffeine-part/playlistimport.cpp b/kaffeine/src/player-parts/kaffeine-part/playlistimport.cpp index 13b5d63..48b0eb8 100644 --- a/kaffeine/src/player-parts/kaffeine-part/playlistimport.cpp +++ b/kaffeine/src/player-parts/kaffeine-part/playlistimport.cpp @@ -18,28 +18,28 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qdom.h> -#include <qregexp.h> -#include <qxml.h> +#include <tqdom.h> +#include <tqregexp.h> +#include <tqxml.h> #include <kdebug.h> #include <kio/netaccess.h> #include "playlistimport.h" -class MyXMLParser : public QXmlDefaultHandler +class MyXMLParser : public TQXmlDefaultHandler { public: - QValueList<MRL> mrls; + TQValueList<MRL> mrls; bool isKaffeinePlaylist; MyXMLParser() : isKaffeinePlaylist(false) {} - bool startElement(const QString&, const QString&, - const QString &qname, const QXmlAttributes &att) + bool startElement(const TQString&, const TQString&, + const TQString &qname, const TQXmlAttributes &att) { if (qname == "playlist") @@ -55,11 +55,11 @@ public: if (qname != "entry") return true; - QStringList subs = QStringList(); + TQStringList subs = TQStringList(); int currentSub = -1; if ((!att.value("subs").isNull()) && (!att.value("subs").isEmpty())) - subs = QStringList::split("&",att.value("subs"),false); + subs = TQStringList::split("&",att.value("subs"),false); if ((!att.value("subs").isNull()) && (!att.value("subs").isEmpty())) { bool ok; @@ -71,20 +71,20 @@ public: // kdDebug() << "PlaylistImport: kaffeine import url: " << att.value("url") << endl; mrls.append(MRL(att.value("url"), att.value("title"), PlaylistImport::stringToTime(att.value("length")), att.value("mime"), att.value("artist"), att.value("album"), att.value("track"), - att.value("year"), att.value("genre"), QString::null, subs, currentSub)); + att.value("year"), att.value("genre"), TQString(), subs, currentSub)); return true; } }; -bool PlaylistImport::kaffeine(const QString& playlist, QValueList<MRL>& mrls) +bool PlaylistImport::kaffeine(const TQString& playlist, TQValueList<MRL>& mrls) { kdDebug() << "PlaylistImport: kaffeine: " << playlist << endl; - QFile file(playlist); + TQFile file(playlist); if (!file.open(IO_ReadOnly)) return false; - QXmlInputSource source(&file); - QXmlSimpleReader reader; + TQXmlInputSource source(TQT_TQIODEVICE(&file)); + TQXmlSimpleReader reader; MyXMLParser parser; reader.setContentHandler(&parser); @@ -97,25 +97,25 @@ bool PlaylistImport::kaffeine(const QString& playlist, QValueList<MRL>& mrls) } else { - QValueList<MRL>::ConstIterator end(parser.mrls.end()); - for (QValueList<MRL>::ConstIterator it = parser.mrls.begin(); it != end; ++it) + TQValueList<MRL>::ConstIterator end(parser.mrls.end()); + for (TQValueList<MRL>::ConstIterator it = parser.mrls.begin(); it != end; ++it) mrls.append(*it); return true; } } -class NoatunXMLParser : public QXmlDefaultHandler +class NoatunXMLParser : public TQXmlDefaultHandler { public: - QValueList<MRL> mrls; + TQValueList<MRL> mrls; bool isNoatunPlaylist; NoatunXMLParser(): isNoatunPlaylist(false) {} - bool startElement(const QString&, const QString &, - const QString &qname, const QXmlAttributes &att) + bool startElement(const TQString&, const TQString &, + const TQString &qname, const TQXmlAttributes &att) { if (qname == "playlist") @@ -131,21 +131,21 @@ public: if (qname != "item") return true; - QString title = att.value("title"); + TQString title = att.value("title"); if (title.isNull()) title = att.value("url"); bool ok; - QTime length; + TQTime length; int time = att.value("length").toInt(&ok); if ((ok) && (time > 0)) { - length = QTime().addMSecs(time); + length = TQTime().addMSecs(time); } kdDebug() << "PlaylistImport: noatun import url: " << att.value("url") << endl; - mrls.append(MRL(att.value("url"), title, length, QString::null, att.value("author"), + mrls.append(MRL(att.value("url"), title, length, TQString(), att.value("author"), att.value("album"), att.value("track"))); return true; @@ -153,14 +153,14 @@ public: }; -bool PlaylistImport::noatun(const QString& playlist, QValueList<MRL>& mrls) +bool PlaylistImport::noatun(const TQString& playlist, TQValueList<MRL>& mrls) { kdDebug() << "PlaylistImport: noatun: " << playlist << endl; - QFile file(playlist); + TQFile file(playlist); if (!file.open(IO_ReadOnly)) return false; - QXmlInputSource source(&file); - QXmlSimpleReader reader; + TQXmlInputSource source(TQT_TQIODEVICE(&file)); + TQXmlSimpleReader reader; NoatunXMLParser parser; reader.setContentHandler(&parser); @@ -173,26 +173,26 @@ bool PlaylistImport::noatun(const QString& playlist, QValueList<MRL>& mrls) } else { - QValueList<MRL>::ConstIterator end(parser.mrls.end()); - for (QValueList<MRL>::ConstIterator it = parser.mrls.begin(); it != end; ++it) + TQValueList<MRL>::ConstIterator end(parser.mrls.end()); + for (TQValueList<MRL>::ConstIterator it = parser.mrls.begin(); it != end; ++it) mrls.append(*it); return true; } } -bool PlaylistImport::m3u(const QString& playlist , QValueList<MRL>& mrls) +bool PlaylistImport::m3u(const TQString& playlist , TQValueList<MRL>& mrls) { kdDebug() << "PlaylistImport: m3u: " << playlist << endl; - QFile file(playlist); + TQFile file(playlist); if (!file.open(IO_ReadOnly)) return false; - QTextStream stream(&file); + TQTextStream stream(&file); // if (stream.readLine().upper() != "#EXTM3U") return false; - QString url; + TQString url; int time; bool ok; - QTime length; - QString title; + TQTime length; + TQString title; KURL kUrl; bool foundAnyUrl = false; KURL plurl(playlist); @@ -202,8 +202,8 @@ bool PlaylistImport::m3u(const QString& playlist , QValueList<MRL>& mrls) { url = stream.readLine(); time = 0; - title = QString::null; - length = QTime(); + title = TQString(); + length = TQTime(); if (url.left(1) == "#") { if (url.left(7).upper() == "#EXTINF") @@ -212,7 +212,7 @@ bool PlaylistImport::m3u(const QString& playlist , QValueList<MRL>& mrls) time = url.section(",", 0,0).toInt(&ok); if ((ok) && (time > 0)) { - length = QTime().addSecs(time); + length = TQTime().addSecs(time); } title = url.section(",",1,1); @@ -223,7 +223,7 @@ bool PlaylistImport::m3u(const QString& playlist , QValueList<MRL>& mrls) continue; } } - url.replace ('\\', '/'); /* for windows styled urls */ + url.tqreplace ('\\', '/'); /* for windows styled urls */ kUrl = KURL (plurl, url); /* maybe a relative url */ if (kUrl.isValid()) { @@ -253,13 +253,13 @@ bool PlaylistImport::m3u(const QString& playlist , QValueList<MRL>& mrls) return false; } -bool PlaylistImport::pls(const QString& playlist, QValueList<MRL>& mrls) +bool PlaylistImport::pls(const TQString& playlist, TQValueList<MRL>& mrls) { kdDebug() << "PlaylistImport: pls: " << playlist << endl; - QFile file(playlist); + TQFile file(playlist); if (!file.open(IO_ReadOnly)) return false; - QTextStream stream(&file); + TQTextStream stream(&file); //if (stream.readLine().upper() != "[PLAYLIST]") return false; @@ -269,16 +269,16 @@ bool PlaylistImport::pls(const QString& playlist, QValueList<MRL>& mrls) // Value of the "NumberOfEntries=#" line. uint numberOfEntries = 0; bool havePlaylistSection = false; - QString tmp; - QStringList lines; + TQString tmp; + TQStringList lines; // set Regexp keywords, Be case insensitive - const QRegExp regExp_NumberOfEntries("^NumberOfEntries\\s*=\\s*\\d+$", false); - const QRegExp regExp_File("^File\\d+\\s*=", false); - const QRegExp regExp_Title("^Title\\d+\\s*=", false); - const QRegExp regExp_Length("^Length\\d+\\s*=\\s*-?\\d+$", false); - const QRegExp regExp_Version("^Version\\s*=\\s*\\d+$", false); - const QString section_playlist("[playlist]"); + const TQRegExp regExp_NumberOfEntries("^NumberOfEntries\\s*=\\s*\\d+$", false); + const TQRegExp regExp_File("^File\\d+\\s*=", false); + const TQRegExp regExp_Title("^Title\\d+\\s*=", false); + const TQRegExp regExp_Length("^Length\\d+\\s*=\\s*-?\\d+$", false); + const TQRegExp regExp_Version("^Version\\s*=\\s*\\d+$", false); + const TQString section_playlist("[playlist]"); /* Preprocess the input data. * Read the lines into a buffer; Cleanup the line strings; @@ -296,13 +296,13 @@ bool PlaylistImport::pls(const QString& playlist, QValueList<MRL>& mrls) continue; } - if (tmp.contains(regExp_File)) { + if (tmp.tqcontains(regExp_File)) { entryCnt++; continue; } - if (tmp.contains(regExp_NumberOfEntries)) { - numberOfEntries = tmp.section('=', -1).stripWhiteSpace().toUInt(); + if (tmp.tqcontains(regExp_NumberOfEntries)) { + numberOfEntries = TQString(tmp.section('=', -1)).stripWhiteSpace().toUInt(); continue; } } @@ -327,11 +327,11 @@ bool PlaylistImport::pls(const QString& playlist, QValueList<MRL>& mrls) bool ok; uint index; bool inPlaylistSection = false; - QString* titles = new QString[entryCnt]; - QString* files = new QString[entryCnt]; - QTime* length = new QTime[entryCnt]; + TQString* titles = new TQString[entryCnt]; + TQString* files = new TQString[entryCnt]; + TQTime* length = new TQTime[entryCnt]; - QStringList::const_iterator i = lines.begin(), end = lines.end(); + TQStringList::const_iterator i = lines.begin(), end = lines.end(); for ( ; i != end; ++i) { if (!inPlaylistSection && havePlaylistSection) { /* The playlist begins with the "[playlist]" tag. @@ -341,40 +341,40 @@ bool PlaylistImport::pls(const QString& playlist, QValueList<MRL>& mrls) inPlaylistSection = true; continue; } - if ((*i).contains(regExp_File)) { + if ((*i).tqcontains(regExp_File)) { // Have a "File#=XYZ" line. index = extractIndex(*i); if (index > numberOfEntries || index == 0) continue; - files[index-1] = (*i).section('=', 1).stripWhiteSpace(); + files[index-1] = TQString((*i).section('=', 1)).stripWhiteSpace(); continue; } - if ((*i).contains(regExp_Title)) { + if ((*i).tqcontains(regExp_Title)) { // Have a "Title#=XYZ" line. index = extractIndex(*i); if (index > numberOfEntries || index == 0) continue; - titles[index-1] = (*i).section('=', 1).stripWhiteSpace(); + titles[index-1] = TQString((*i).section('=', 1)).stripWhiteSpace(); continue; } - if ((*i).contains(regExp_Length)) { + if ((*i).tqcontains(regExp_Length)) { // Have a "Length#=XYZ" line. index = extractIndex(*i); if (index > numberOfEntries || index == 0) continue; - tmp = (*i).section('=', 1).stripWhiteSpace(); + tmp = TQString((*i).section('=', 1)).stripWhiteSpace(); time = tmp.toInt(&ok); if ( !(ok) || !(time > 0) ) continue; - length[index-1] = QTime().addSecs(time); + length[index-1] = TQTime().addSecs(time); continue; } - if ((*i).contains(regExp_NumberOfEntries)) { + if ((*i).tqcontains(regExp_NumberOfEntries)) { // Have the "NumberOfEntries=#" line. continue; } - if ((*i).contains(regExp_Version)) { + if ((*i).tqcontains(regExp_Version)) { // Have the "Version=#" line. - tmp = (*i).section('=', 1).stripWhiteSpace(); + tmp = TQString((*i).section('=', 1)).stripWhiteSpace(); // We only support Version=2 if (tmp.toUInt(&ok) != 2) kdWarning() << "PlaylistImport: pls: Unsupported version." << endl; @@ -400,7 +400,7 @@ bool PlaylistImport::pls(const QString& playlist, QValueList<MRL>& mrls) } // Helper for pls import -uint PlaylistImport::extractIndex( const QString &str ) +uint PlaylistImport::extractIndex( const TQString &str ) { /* Extract the index number out of a .pls line. * Example: @@ -408,24 +408,24 @@ uint PlaylistImport::extractIndex( const QString &str ) */ bool ok = false; unsigned int ret; - QString tmp(str.section('=', 0, 0)); - tmp.remove(QRegExp("^\\D*")); + TQString tmp(str.section('=', 0, 0)); + tmp.remove(TQRegExp("^\\D*")); ret = tmp.stripWhiteSpace().toUInt(&ok); if (!ok) kdError() << "PlaylistImport: pls: Corrupt pls file, Error extracting index." << endl; return ret; } -bool PlaylistImport::ram(const MRL& playlist, QValueList<MRL>& mrls, QWidget* parent) +bool PlaylistImport::ram(const MRL& playlist, TQValueList<MRL>& mrls, TQWidget* tqparent) { - Q_ULONG result; + TQ_ULONG result; char buf[10]; kdDebug() << "PlaylistImport: ram: " << playlist.url() << endl; memset( buf, 0, 10 ); if (playlist.kurl().isLocalFile()) { - QFile file(playlist.kurl().path()); + TQFile file(playlist.kurl().path()); if (!file.open(IO_ReadOnly)) { kdError() << "PlaylistImport: Can't open " << playlist.url() << endl; return false; @@ -448,17 +448,17 @@ bool PlaylistImport::ram(const MRL& playlist, QValueList<MRL>& mrls, QWidget* pa kdDebug() << "PlaylistImport: Seems to be a ram playlist!" << endl; - QString localFile, url; - if (KIO::NetAccess::mimetype(playlist.kurl(), parent) == "application/vnd.rn-realmedia") { + TQString localFile, url; + if (KIO::NetAccess::mimetype(playlist.kurl(), tqparent) == "application/vnd.rn-realmedia") { kdDebug() << "PlaylistImport: Seems to be a real media file" << endl; return false; } - if (KIO::NetAccess::download(playlist.kurl(), localFile, parent)) + if (KIO::NetAccess::download(playlist.kurl(), localFile, tqparent)) { - QFile plFile(localFile); + TQFile plFile(localFile); if (!plFile.open(IO_ReadOnly)) return false; - QTextStream stream( &plFile ); + TQTextStream stream( &plFile ); while (!stream.eof()) { @@ -487,14 +487,14 @@ bool PlaylistImport::ram(const MRL& playlist, QValueList<MRL>& mrls, QWidget* pa * spec: http://msdn.microsoft.com/library/en-us/wmplay/mmp_sdk/asxelement.asp * **********************************************************************************/ -bool PlaylistImport::asx(const QString& playlist, QValueList<MRL>& mrls) +bool PlaylistImport::asx(const TQString& playlist, TQValueList<MRL>& mrls) { kdDebug() << "PlaylistImport: asx: " << playlist << endl; - QFile file(playlist); + TQFile file(playlist); if (!file.open(IO_ReadOnly)) return false; - QDomDocument doc; - QString errorMsg; + TQDomDocument doc; + TQString errorMsg; int errorLine, errorColumn; if (!doc.setContent(&file, &errorMsg, &errorLine, &errorColumn)) { @@ -503,26 +503,26 @@ bool PlaylistImport::asx(const QString& playlist, QValueList<MRL>& mrls) return false; } - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); - QString url; - QString title; - QString author; - QTime length; - QString duration; + TQString url; + TQString title; + TQString author; + TQTime length; + TQString duration; if (root.nodeName().lower() != "asx") return false; - QDomNode node = root.firstChild(); - QDomNode subNode; - QDomElement element; + TQDomNode node = root.firstChild(); + TQDomNode subNode; + TQDomElement element; while (!node.isNull()) { - url = QString::null; - title = QString::null; - author = QString::null; - length = QTime(); + url = TQString(); + title = TQString(); + author = TQString(); + length = TQTime(); if (node.nodeName().lower() == "entry") { subNode = node.firstChild(); @@ -544,7 +544,7 @@ bool PlaylistImport::asx(const QString& playlist, QValueList<MRL>& mrls) if ((subNode.nodeName().lower() == "duration") && (subNode.isElement())) { - duration = QString::null; + duration = TQString(); element = subNode.toElement(); if (element.hasAttribute("value")) duration = element.attribute("value"); @@ -577,7 +577,7 @@ bool PlaylistImport::asx(const QString& playlist, QValueList<MRL>& mrls) if (title.isNull()) title = url; kdDebug() << "PlaylistImport: asx import url: " << url << endl; - mrls.append(MRL(url, title, length, QString::null, author)); + mrls.append(MRL(url, title, length, TQString(), author)); } } node = node.nextSibling(); @@ -593,24 +593,24 @@ bool PlaylistImport::asx(const QString& playlist, QValueList<MRL>& mrls) * spec: http://www.w3.org/TR/REC-smil/ * ****************************************************************/ -bool PlaylistImport::smil(const QString& playlist, const MRL& baseMRL, QValueList<MRL>& mrls) +bool PlaylistImport::smil(const TQString& playlist, const MRL& baseMRL, TQValueList<MRL>& mrls) { kdDebug() << "PlaylistImport: smil: " << playlist << endl; - QFile file(playlist); + TQFile file(playlist); if (!file.open(IO_ReadOnly)) return false; - QDomDocument doc; + TQDomDocument doc; doc.setContent(&file); - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); if (root.nodeName().lower() != "smil") return false; bool anyURL = false; KURL kurl; - QString url; - QDomNodeList nodeList; - QDomNode node; - QDomElement element; + TQString url; + TQDomNodeList nodeList; + TQDomNode node; + TQDomElement element; //video sources... nodeList = doc.elementsByTagName("video"); @@ -618,7 +618,7 @@ bool PlaylistImport::smil(const QString& playlist, const MRL& baseMRL, QValueLis for (uint i = 0; i < nodeList.count(); i++) { node = nodeList.item(i); - url = QString::null; + url = TQString(); if ((node.nodeName().lower() == "video") && (node.isElement())) { element = node.toElement(); @@ -644,7 +644,7 @@ bool PlaylistImport::smil(const QString& playlist, const MRL& baseMRL, QValueLis for (uint i = 0; i < nodeList.count(); i++) { node = nodeList.item(i); - url = QString::null; + url = TQString(); if ((node.nodeName().lower() == "audio") && (node.isElement())) { element = node.toElement(); @@ -668,18 +668,18 @@ bool PlaylistImport::smil(const QString& playlist, const MRL& baseMRL, QValueLis return anyURL; } -QTime PlaylistImport::stringToTime(const QString& timeString) +TQTime PlaylistImport::stringToTime(const TQString& timeString) { int sec = 0; bool ok = false; - QStringList tokens = QStringList::split(':',timeString); + TQStringList tokens = TQStringList::split(':',timeString); sec += tokens[0].toInt(&ok)*3600; //hours sec += tokens[1].toInt(&ok)*60; //minutes sec += tokens[2].toInt(&ok); //secs if (ok) - return QTime().addSecs(sec); + return TQTime().addSecs(sec); else - return QTime(); + return TQTime(); } diff --git a/kaffeine/src/player-parts/kaffeine-part/playlistimport.h b/kaffeine/src/player-parts/kaffeine-part/playlistimport.h index 16420eb..2c4cf98 100644 --- a/kaffeine/src/player-parts/kaffeine-part/playlistimport.h +++ b/kaffeine/src/player-parts/kaffeine-part/playlistimport.h @@ -23,7 +23,7 @@ #include "mrl.h" -class QWidget; +class TQWidget; /* * static methods for playlist import @@ -33,18 +33,18 @@ class KDE_EXPORT PlaylistImport { public: - static bool kaffeine(const QString&, QValueList<MRL>&); - static bool noatun(const QString&, QValueList<MRL>&); - static bool m3u(const QString&, QValueList<MRL>&); - static bool pls(const QString&, QValueList<MRL>&); - static bool ram(const MRL&, QValueList<MRL>&, QWidget*); - static bool asx(const QString&, QValueList<MRL>&); - static bool smil(const QString&, const MRL&, QValueList<MRL>&); + static bool kaffeine(const TQString&, TQValueList<MRL>&); + static bool noatun(const TQString&, TQValueList<MRL>&); + static bool m3u(const TQString&, TQValueList<MRL>&); + static bool pls(const TQString&, TQValueList<MRL>&); + static bool ram(const MRL&, TQValueList<MRL>&, TQWidget*); + static bool asx(const TQString&, TQValueList<MRL>&); + static bool smil(const TQString&, const MRL&, TQValueList<MRL>&); /* helper */ - static QTime stringToTime(const QString&); + static TQTime stringToTime(const TQString&); private: - static uint extractIndex(const QString&); + static uint extractIndex(const TQString&); }; #endif /* PLAYLISTIMPORT_H */ diff --git a/kaffeine/src/player-parts/xine-part/deinterlacequality.cpp b/kaffeine/src/player-parts/xine-part/deinterlacequality.cpp index 70ca01d..5331c0f 100644 --- a/kaffeine/src/player-parts/xine-part/deinterlacequality.cpp +++ b/kaffeine/src/player-parts/xine-part/deinterlacequality.cpp @@ -22,19 +22,19 @@ #include <klocale.h> #include <kpushbutton.h> -#include <qcheckbox.h> -#include <qslider.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlabel.h> +#include <tqlayout.h> #include "deinterlacequality.h" #include "deinterlacequality.moc" -DeinterlaceQuality::DeinterlaceQuality(QWidget* filterDialog, QWidget *parent, const char *name) -:KDialogBase(parent, name, true, i18n("Deinterlace Quality"), KDialogBase::Close) +DeinterlaceQuality::DeinterlaceQuality(TQWidget* filterDialog, TQWidget *tqparent, const char *name) +:KDialogBase(tqparent, name, true, i18n("Deinterlace Quality"), KDialogBase::Close) { m_configStrings << "tvtime:method=Greedy2Frame,enabled=1,pulldown=vektor,framerate_mode=full,judder_correction=1,use_progressive_frame_flag=1,chroma_filter=1,cheap_mode=0"; m_configStrings << "tvtime:method=Greedy2Frame,enabled=1,pulldown=vektor,framerate_mode=full,judder_correction=0,use_progressive_frame_flag=1,chroma_filter=0,cheap_mode=0"; @@ -43,47 +43,47 @@ DeinterlaceQuality::DeinterlaceQuality(QWidget* filterDialog, QWidget *parent, c m_configStrings << "tvtime:method=LinearBlend,enabled=1,pulldown=none,framerate_mode=half_top,judder_correction=0,use_progressive_frame_flag=1,chroma_filter=0,cheap_mode=1"; m_configStrings << "tvtime:method=LineDoubler,enabled=1,pulldown=none,framerate_mode=half_top,judder_correction=0,use_progressive_frame_flag=1,chroma_filter=0,cheap_mode=1"; - setInitialSize(QSize(680, 480)); - QWidget* mainWidget = makeMainWidget(); - QGridLayout* grid = new QGridLayout( mainWidget, 9, 2 ); + setInitialSize(TQSize(680, 480)); + TQWidget* mainWidget = makeMainWidget(); + TQGridLayout* grid = new TQGridLayout( mainWidget, 9, 2 ); grid->setSpacing(5); grid->setMargin(5); - m_qualitySlider = new QSlider( QSlider::Vertical, mainWidget ); + m_qualitySlider = new TQSlider( Qt::Vertical, mainWidget ); m_qualitySlider->setRange(0, 5); m_qualitySlider->setSteps(1, 1); - m_qualitySlider->setTickmarks(QSlider::Right); + m_qualitySlider->setTickmarks(TQSlider::Right); grid->addMultiCellWidget(m_qualitySlider, 0, 5, 0, 0); - QLabel* level0Descr = new QLabel(i18n("<b>Very low cpu usage, worst quality.</b><br>Half of vertical resolution is lost. For some systems (with PCI video cards) this might decrease the cpu usage when compared to plain video playback (no deinterlacing)."), mainWidget); + TQLabel* level0Descr = new TQLabel(i18n("<b>Very low cpu usage, worst quality.</b><br>Half of vertical resolution is lost. For some systems (with PCI video cards) this might decrease the cpu usage when compared to plain video playback (no deinterlacing)."), mainWidget); grid->addWidget(level0Descr, 5, 1); - QLabel* level1Descr = new QLabel(i18n("<b>Low cpu usage, poor quality.</b><br>Image is blurred vertically so interlacing effects are removed."), mainWidget); + TQLabel* level1Descr = new TQLabel(i18n("<b>Low cpu usage, poor quality.</b><br>Image is blurred vertically so interlacing effects are removed."), mainWidget); grid->addWidget(level1Descr, 4, 1); - QLabel* level2Descr = new QLabel(i18n("<b>Medium cpu usage, medium quality.</b><br>Image is analysed and areas showing interlacing artifacts are fixed (interpolated)."), mainWidget); + TQLabel* level2Descr = new TQLabel(i18n("<b>Medium cpu usage, medium quality.</b><br>Image is analysed and areas showing interlacing artifacts are fixed (interpolated)."), mainWidget); grid->addWidget(level2Descr, 3, 1); - QLabel* level3Descr = new QLabel(i18n("<b>High cpu usage, good quality.</b><br>Conversion of dvd image format improves quality and fixes chroma upsampling bug."), mainWidget); + TQLabel* level3Descr = new TQLabel(i18n("<b>High cpu usage, good quality.</b><br>Conversion of dvd image format improves quality and fixes chroma upsampling bug."), mainWidget); grid->addWidget(level3Descr, 2, 1); - QLabel* level4Descr = new QLabel(i18n("<b>Very high cpu usage, great quality.</b><br>Besides using smart deinterlacing algorithms it will also double the frame rate (30->60fps) to match the field rate of TVs. Detects and reverts 3-2 pulldown. *"), mainWidget); + TQLabel* level4Descr = new TQLabel(i18n("<b>Very high cpu usage, great quality.</b><br>Besides using smart deinterlacing algorithms it will also double the frame rate (30->60fps) to match the field rate of TVs. Detects and reverts 3-2 pulldown. *"), mainWidget); grid->addWidget(level4Descr, 1, 1); - QLabel* level5Descr = new QLabel(i18n("<b>Very very high cpu usage, great quality with (experimental) improvements.</b><br>Enables judder correction (play films at their original 24 fps speed) and vertical color smoothing (fixes small color stripes seen in some dvds). *"), mainWidget); + TQLabel* level5Descr = new TQLabel(i18n("<b>Very very high cpu usage, great quality with (experimental) improvements.</b><br>Enables judder correction (play films at their original 24 fps speed) and vertical color smoothing (fixes small color stripes seen in some dvds). *"), mainWidget); grid->addWidget(level5Descr, 0, 1); - m_customBox = new QCheckBox(i18n("User defined"), mainWidget); + m_customBox = new TQCheckBox(i18n("User defined"), mainWidget); grid->addMultiCellWidget(m_customBox, 6, 6, 0, 1); - connect(m_customBox, SIGNAL(toggled(bool)), this, SLOT(slotCustomBoxToggled(bool))); + connect(m_customBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCustomBoxToggled(bool))); m_customConfigButton = new KPushButton(i18n("Configure tvtime Deinterlace Plugin..."), mainWidget); - m_customConfigButton->setSizePolicy(QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed)); + m_customConfigButton->tqsetSizePolicy(TQSizePolicy (TQSizePolicy::Minimum, TQSizePolicy::Fixed)); grid->addWidget(m_customConfigButton, 7, 1); - connect(m_customConfigButton, SIGNAL(clicked()), filterDialog, SLOT(show())); + connect(m_customConfigButton, TQT_SIGNAL(clicked()), filterDialog, TQT_SLOT(show())); - QLabel* note = new QLabel(i18n("* <i>May require a patched 2.4 kernel (like RedHat one) or 2.6 kernel.</i>"), mainWidget); - note->setAlignment(QLabel::WordBreak | QLabel::AlignVCenter); + TQLabel* note = new TQLabel(i18n("* <i>May require a patched 2.4 kernel (like RedHat one) or 2.6 kernel.</i>"), mainWidget); + note->tqsetAlignment(TQLabel::WordBreak | TQLabel::AlignVCenter); grid->addMultiCellWidget(note, 9, 9, 0, 1); } @@ -125,7 +125,7 @@ void DeinterlaceQuality::setQuality(uint qu) m_qualitySlider->setValue(qu-10); m_customBox->setChecked(true); } - connect(m_qualitySlider, SIGNAL(valueChanged(int)), this, SLOT(slotLevelChanged(int))); + connect(m_qualitySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotLevelChanged(int))); } uint DeinterlaceQuality::getQuality() const diff --git a/kaffeine/src/player-parts/xine-part/deinterlacequality.h b/kaffeine/src/player-parts/xine-part/deinterlacequality.h index 5a91ad4..6c289f2 100644 --- a/kaffeine/src/player-parts/xine-part/deinterlacequality.h +++ b/kaffeine/src/player-parts/xine-part/deinterlacequality.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef DEINTERLACEQUALITY_H -#define DEINTERLACEQUALITY_H +#ifndef DEINTERLACETQUALITY_H +#define DEINTERLACETQUALITY_H #include <kdialogbase.h> @@ -27,52 +27,54 @@ *@author Juergen Kofler */ -class QCheckBox; -class QSlider; -class QString; -class QStringList; +class TQCheckBox; +class TQSlider; +class TQString; +class TQStringList; class KPushButton; class DeinterlacerConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DeinterlacerConfigDialog(QWidget *parent=0, const char *name=0) - : KDialogBase( parent, name, true, i18n("Configure tvtime Deinterlace Plugin"), KDialogBase::Close ) + DeinterlacerConfigDialog(TQWidget *tqparent=0, const char *name=0) + : KDialogBase( tqparent, name, true, i18n("Configure tvtime Deinterlace Plugin"), KDialogBase::Close ) { - setInitialSize(QSize(450,400), true); + setInitialSize(TQSize(450,400), true); mainWidget = makeVBoxMainWidget(); } ~DeinterlacerConfigDialog() {} - QWidget* getMainWidget() const { return (QWidget*)mainWidget; } + TQWidget* getMainWidget() const { return (TQWidget*)mainWidget; } private: - QVBox* mainWidget; + TQVBox* mainWidget; }; class DeinterlaceQuality : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DeinterlaceQuality(QWidget* filterDialog, QWidget *parent=0, const char *name=0); + DeinterlaceQuality(TQWidget* filterDialog, TQWidget *tqparent=0, const char *name=0); ~DeinterlaceQuality(); void setQuality(uint); uint getQuality() const; signals: - void signalSetDeinterlaceConfig(const QString&); + void signalSetDeinterlaceConfig(const TQString&); private slots: void slotLevelChanged(int); void slotCustomBoxToggled(bool); private: - QStringList m_configStrings; - QSlider* m_qualitySlider; - QCheckBox* m_customBox; + TQStringList m_configStrings; + TQSlider* m_qualitySlider; + TQCheckBox* m_customBox; KPushButton* m_customConfigButton; }; -#endif /* DEINTERLACEQUALITY_H */ +#endif /* DEINTERLACETQUALITY_H */ diff --git a/kaffeine/src/player-parts/xine-part/equalizer.cpp b/kaffeine/src/player-parts/xine-part/equalizer.cpp index 12e5f92..ea60bf7 100644 --- a/kaffeine/src/player-parts/xine-part/equalizer.cpp +++ b/kaffeine/src/player-parts/xine-part/equalizer.cpp @@ -21,123 +21,123 @@ #include <klocale.h> #include <kdebug.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqlabel.h> #include "equalizer.h" #include "equalizer.moc" -Equalizer::Equalizer(QWidget *parent, const char *name) - : KDialogBase(KDialogBase::Plain, i18n("Equalizer Settings"), KDialogBase::Default | KDialogBase::Close, KDialogBase::Close, parent, name, false) +Equalizer::Equalizer(TQWidget *tqparent, const char *name) + : KDialogBase(KDialogBase::Plain, i18n("Equalizer Settings"), KDialogBase::Default | KDialogBase::Close, KDialogBase::Close, tqparent, name, false) { - setInitialSize(QSize(450,250), true); - reparent(parent, pos(), false); - QWidget* page = plainPage(); + setInitialSize(TQSize(450,250), true); + reparent(tqparent, pos(), false); + TQWidget* page = plainPage(); - QGridLayout* mainGrid = new QGridLayout( page, 3, 1 ); + TQGridLayout* mainGrid = new TQGridLayout( page, 3, 1 ); - on = new QCheckBox( i18n("On"), page ); + on = new TQCheckBox( i18n("On"), page ); mainGrid->addWidget( on, 0, 0 ); - connect(on, SIGNAL(toggled(bool)), this, SLOT(slotSetEnabled(bool))); + connect(on, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetEnabled(bool))); - volumeGain = new QCheckBox( i18n("Volume gain"), page ); - QToolTip::add(volumeGain, i18n("Volume Gain for Equalizer - If the sound becomes noisy disable this")); + volumeGain = new TQCheckBox( i18n("Volume gain"), page ); + TQToolTip::add(volumeGain, i18n("Volume Gain for Equalizer - If the sound becomes noisy disable this")); mainGrid->addWidget( volumeGain, 1, 0 ); - connect(volumeGain, SIGNAL(toggled(bool)), this, SIGNAL(signalSetVolumeGain(bool))); + connect(volumeGain, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(signalSetVolumeGain(bool))); - equalGroup = new QGroupBox( QString::null, page ); + equalGroup = new TQGroupBox( TQString(), page ); mainGrid->addWidget( equalGroup, 2, 0 ); - QGridLayout* equalGrid = new QGridLayout(equalGroup, 2, 10); + TQGridLayout* equalGrid = new TQGridLayout(equalGroup, 2, 10); equalGrid->setSpacing(5); equalGrid->setMargin(10); - QLabel* eq30Text = new QLabel("30Hz", equalGroup); - eq30Slider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq30Text = new TQLabel("30Hz", equalGroup); + eq30Slider = new TQSlider(Qt::Vertical, equalGroup); eq30Slider->setRange(-100, -1); eq30Slider->setSteps(1, 10); eq30Slider->setTickInterval(50); - eq30Slider->setTickmarks(QSlider::Right); - connect(eq30Slider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq30(int))); + eq30Slider->setTickmarks(TQSlider::Right); + connect(eq30Slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq30(int))); equalGrid->addWidget(eq30Text, 1, 0); equalGrid->addWidget(eq30Slider, 0, 0); - QLabel* eq60Text = new QLabel("60Hz", equalGroup); - eq60Slider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq60Text = new TQLabel("60Hz", equalGroup); + eq60Slider = new TQSlider(Qt::Vertical, equalGroup); eq60Slider->setRange(-100, -1); eq60Slider->setSteps(1, 10); - connect(eq60Slider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq60(int))); + connect(eq60Slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq60(int))); equalGrid->addWidget(eq60Text, 1, 1); equalGrid->addWidget(eq60Slider, 0, 1); - QLabel* eq125Text = new QLabel("125Hz", equalGroup); - eq125Slider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq125Text = new TQLabel("125Hz", equalGroup); + eq125Slider = new TQSlider(Qt::Vertical, equalGroup); eq125Slider->setRange(-100, -1); eq125Slider->setSteps(1, 10); - connect(eq125Slider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq125(int))); + connect(eq125Slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq125(int))); equalGrid->addWidget(eq125Text, 1, 2); equalGrid->addWidget(eq125Slider, 0, 2); - QLabel* eq250Text = new QLabel("250Hz", equalGroup); - eq250Slider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq250Text = new TQLabel("250Hz", equalGroup); + eq250Slider = new TQSlider(Qt::Vertical, equalGroup); eq250Slider->setRange(-100, -1); eq250Slider->setSteps(1, 10); - connect(eq250Slider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq250(int))); + connect(eq250Slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq250(int))); equalGrid->addWidget(eq250Text, 1, 3); equalGrid->addWidget(eq250Slider, 0, 3); - QLabel* eq500Text = new QLabel("500Hz", equalGroup); - eq500Slider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq500Text = new TQLabel("500Hz", equalGroup); + eq500Slider = new TQSlider(Qt::Vertical, equalGroup); eq500Slider->setRange(-100, -1); eq500Slider->setSteps(1, 10); - connect(eq500Slider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq500(int))); + connect(eq500Slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq500(int))); equalGrid->addWidget(eq500Text, 1, 4); equalGrid->addWidget(eq500Slider, 0, 4); - QLabel* eq1kText = new QLabel("1kHz", equalGroup); - eq1kSlider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq1kText = new TQLabel("1kHz", equalGroup); + eq1kSlider = new TQSlider(Qt::Vertical, equalGroup); eq1kSlider->setRange(-100, -1); eq1kSlider->setSteps(1, 10); - connect(eq1kSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq1k(int))); + connect(eq1kSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq1k(int))); equalGrid->addWidget(eq1kText, 1, 5); equalGrid->addWidget(eq1kSlider, 0, 5); - QLabel* eq2kText = new QLabel("2kHz", equalGroup); - eq2kSlider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq2kText = new TQLabel("2kHz", equalGroup); + eq2kSlider = new TQSlider(Qt::Vertical, equalGroup); eq2kSlider->setRange(-100, -1); eq2kSlider->setSteps(1, 10); - connect(eq2kSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq2k(int))); + connect(eq2kSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq2k(int))); equalGrid->addWidget(eq2kText, 1, 6); equalGrid->addWidget(eq2kSlider, 0, 6); - QLabel* eq4kText = new QLabel("4kHz", equalGroup); - eq4kSlider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq4kText = new TQLabel("4kHz", equalGroup); + eq4kSlider = new TQSlider(Qt::Vertical, equalGroup); eq4kSlider->setRange(-100, -1); eq4kSlider->setSteps(1, 10); - connect(eq4kSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq4k(int))); + connect(eq4kSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq4k(int))); equalGrid->addWidget(eq4kText, 1, 7); equalGrid->addWidget(eq4kSlider, 0, 7); - QLabel* eq8kText = new QLabel("8kHz", equalGroup); - eq8kSlider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq8kText = new TQLabel("8kHz", equalGroup); + eq8kSlider = new TQSlider(Qt::Vertical, equalGroup); eq8kSlider->setRange(-100, -1); eq8kSlider->setSteps(1, 10); - connect(eq8kSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq8k(int))); + connect(eq8kSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq8k(int))); equalGrid->addWidget(eq8kText, 1, 8); equalGrid->addWidget(eq8kSlider, 0, 8); - QLabel* eq16kText = new QLabel("16kHz", equalGroup); - eq16kSlider = new QSlider(Qt::Vertical, equalGroup); + TQLabel* eq16kText = new TQLabel("16kHz", equalGroup); + eq16kSlider = new TQSlider(Qt::Vertical, equalGroup); eq16kSlider->setRange(-100, -1); eq16kSlider->setSteps(1, 10); eq16kSlider->setTickInterval(50); - eq16kSlider->setTickmarks(QSlider::Left); - connect(eq16kSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewEq16k(int))); + eq16kSlider->setTickmarks(TQSlider::Left); + connect(eq16kSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewEq16k(int))); equalGrid->addWidget(eq16kText, 1, 9); equalGrid->addWidget(eq16kSlider, 0, 9); - connect(this, SIGNAL(defaultClicked()), this, SLOT(slotSetDefaultValues())); + connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotSetDefaultValues())); } diff --git a/kaffeine/src/player-parts/xine-part/equalizer.h b/kaffeine/src/player-parts/xine-part/equalizer.h index e912dcc..e2ce9a1 100644 --- a/kaffeine/src/player-parts/xine-part/equalizer.h +++ b/kaffeine/src/player-parts/xine-part/equalizer.h @@ -18,16 +18,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef EQUALIZER_H -#define EQUALIZER_H +#ifndef ETQUALIZER_H +#define ETQUALIZER_H #include <kdialogbase.h> #include <kconfig.h> -#include <qwidget.h> -#include <qslider.h> -#include <qgroupbox.h> -#include <qcheckbox.h> +#include <tqwidget.h> +#include <tqslider.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> /**equalizer widget *@author Juergen Kofler @@ -35,8 +35,9 @@ class Equalizer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Equalizer(QWidget *parent=0, const char *name=0); + Equalizer(TQWidget *tqparent=0, const char *name=0); ~Equalizer(); void ReadValues(KConfig* config); @@ -61,19 +62,19 @@ private slots: void slotSetEnabled( bool ); private: - QCheckBox* on; - QCheckBox* volumeGain; - QGroupBox* equalGroup; - QSlider* eq30Slider; - QSlider* eq60Slider; - QSlider* eq125Slider; - QSlider* eq250Slider; - QSlider* eq500Slider; - QSlider* eq1kSlider; - QSlider* eq2kSlider; - QSlider* eq4kSlider; - QSlider* eq8kSlider; - QSlider* eq16kSlider; + TQCheckBox* on; + TQCheckBox* volumeGain; + TQGroupBox* equalGroup; + TQSlider* eq30Slider; + TQSlider* eq60Slider; + TQSlider* eq125Slider; + TQSlider* eq250Slider; + TQSlider* eq500Slider; + TQSlider* eq1kSlider; + TQSlider* eq2kSlider; + TQSlider* eq4kSlider; + TQSlider* eq8kSlider; + TQSlider* eq16kSlider; }; -#endif /* EQUALIZER_H */ +#endif /* ETQUALIZER_H */ diff --git a/kaffeine/src/player-parts/xine-part/filterdialog.cpp b/kaffeine/src/player-parts/xine-part/filterdialog.cpp index 4468b31..0729377 100644 --- a/kaffeine/src/player-parts/xine-part/filterdialog.cpp +++ b/kaffeine/src/player-parts/xine-part/filterdialog.cpp @@ -25,32 +25,32 @@ #include <kiconloader.h> #include <kcombobox.h> -#include <qvbox.h> -#include <qstringlist.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qscrollview.h> +#include <tqvbox.h> +#include <tqstringlist.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqscrollview.h> #include "filterdialog.h" #include "filterdialog.moc" -FilterDialog::FilterDialog(const QStringList& audioFilters, const QStringList& videoFilters, QWidget *parent, const char *name) : - KDialogBase(KDialogBase::IconList, i18n("Effect Plugins"), KDialogBase::Ok, KDialogBase::Ok, parent, name, false) +FilterDialog::FilterDialog(const TQStringList& audioFilters, const TQStringList& videoFilters, TQWidget *tqparent, const char *name) : + KDialogBase(KDialogBase::IconList, i18n("Effect Plugins"), KDialogBase::Ok, KDialogBase::Ok, tqparent, name, false) { - reparent(parent, pos(), false); - setInitialSize(QSize(400,350), true); + reparent(tqparent, pos(), false); + setInitialSize(TQSize(400,350), true); /****** Audio Filters ******/ - QWidget* audioPage = addPage(i18n("Audio"), i18n("Audio Filters"), + TQWidget* audioPage = addPage(i18n("Audio"), i18n("Audio Filters"), KGlobal::iconLoader()->loadIcon("sound", KIcon::Panel, KIcon::SizeMedium)); - QGridLayout* audioGrid = new QGridLayout( audioPage, 3, 3 ); + TQGridLayout* audioGrid = new TQGridLayout( audioPage, 3, 3 ); audioGrid->setSpacing( 5 ); - QCheckBox* useAudioFiltersCB = new QCheckBox( audioPage ); + TQCheckBox* useAudioFiltersCB = new TQCheckBox( audioPage ); useAudioFiltersCB->setText( i18n("Enable audio filters") ); useAudioFiltersCB->setChecked( true ); - connect( useAudioFiltersCB, SIGNAL(toggled(bool)), this, SLOT(slotUseAudioFilters(bool))); + connect( useAudioFiltersCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotUseAudioFilters(bool))); audioGrid->addMultiCellWidget( useAudioFiltersCB, 0, 0, 0, 2 ); @@ -58,32 +58,32 @@ FilterDialog::FilterDialog(const QStringList& audioFilters, const QStringList& v m_audioFilterCombo->insertStringList( audioFilters ); m_addAudioButton = new KPushButton( i18n("Add Filter"), audioPage ); - connect( m_addAudioButton, SIGNAL( clicked() ), this, SLOT( slotAddAudioClicked() )); + connect( m_addAudioButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddAudioClicked() )); m_removeAudioButton = new KPushButton( i18n("Remove All Filters"), audioPage ); - connect( m_removeAudioButton, SIGNAL( clicked() ), this, SIGNAL( signalRemoveAllAudioFilters() )); + connect( m_removeAudioButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( signalRemoveAllAudioFilters() )); audioGrid->addWidget( m_audioFilterCombo, 1, 0 ); audioGrid->addWidget( m_removeAudioButton, 1, 2 ); audioGrid->addWidget( m_addAudioButton, 1, 1 ); - QScrollView* audioSv = new QScrollView( audioPage ); - audioSv->setResizePolicy(QScrollView::AutoOneFit); - m_audioFilterPage = new QVBox(audioSv->viewport()); + TQScrollView* audioSv = new TQScrollView( audioPage ); + audioSv->setResizePolicy(TQScrollView::AutoOneFit); + m_audioFilterPage = new TQVBox(audioSv->viewport()); m_audioFilterPage->setMargin( 5 ); audioSv->addChild(m_audioFilterPage); audioGrid->addMultiCellWidget( audioSv, 2, 2, 0, 2 ); /****** Video Filters ******/ - QWidget* videoPage = addPage(i18n("Video"), i18n("Video Filters"), + TQWidget* videoPage = addPage(i18n("Video"), i18n("Video Filters"), KGlobal::iconLoader()->loadIcon("video", KIcon::Panel, KIcon::SizeMedium)); - QGridLayout* videoGrid = new QGridLayout( videoPage, 3, 3 ); + TQGridLayout* videoGrid = new TQGridLayout( videoPage, 3, 3 ); videoGrid->setSpacing( 5 ); - QCheckBox* useVideoFiltersCB = new QCheckBox( videoPage ); + TQCheckBox* useVideoFiltersCB = new TQCheckBox( videoPage ); useVideoFiltersCB->setText( i18n("Enable video filters") ); useVideoFiltersCB->setChecked( true ); - connect( useVideoFiltersCB, SIGNAL(toggled(bool)), this, SLOT(slotUseVideoFilters(bool))); + connect( useVideoFiltersCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotUseVideoFilters(bool))); videoGrid->addMultiCellWidget( useVideoFiltersCB, 0, 0, 0, 2 ); @@ -91,17 +91,17 @@ FilterDialog::FilterDialog(const QStringList& audioFilters, const QStringList& v m_videoFilterCombo->insertStringList( videoFilters ); m_addVideoButton = new KPushButton( i18n("Add Filter"), videoPage ); - connect( m_addVideoButton, SIGNAL( clicked() ), this, SLOT( slotAddVideoClicked() )); + connect( m_addVideoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddVideoClicked() )); m_removeVideoButton = new KPushButton( i18n("Remove All Filters"), videoPage ); - connect( m_removeVideoButton, SIGNAL( clicked() ), this, SIGNAL( signalRemoveAllVideoFilters() )); + connect( m_removeVideoButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( signalRemoveAllVideoFilters() )); videoGrid->addWidget( m_videoFilterCombo, 1, 0 ); videoGrid->addWidget( m_removeVideoButton, 1, 2 ); videoGrid->addWidget( m_addVideoButton, 1, 1 ); - QScrollView* videoSv = new QScrollView( videoPage ); - videoSv->setResizePolicy(QScrollView::AutoOneFit); - m_videoFilterPage = new QVBox(videoSv->viewport()); + TQScrollView* videoSv = new TQScrollView( videoPage ); + videoSv->setResizePolicy(TQScrollView::AutoOneFit); + m_videoFilterPage = new TQVBox(videoSv->viewport()); m_videoFilterPage->setMargin( 5 ); videoSv->addChild(m_videoFilterPage); diff --git a/kaffeine/src/player-parts/xine-part/filterdialog.h b/kaffeine/src/player-parts/xine-part/filterdialog.h index c730f69..0506c01 100644 --- a/kaffeine/src/player-parts/xine-part/filterdialog.h +++ b/kaffeine/src/player-parts/xine-part/filterdialog.h @@ -24,9 +24,9 @@ #include <kdialogbase.h> class KComboBox; -class QVBox; -class QString; -class QStringList; +class TQVBox; +class TQString; +class TQStringList; /** *@author Juergen Kofler @@ -35,32 +35,33 @@ class QStringList; class FilterDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FilterDialog(const QStringList& audiofilters, const QStringList& videofilters, QWidget *parent=0, const char *name=0); + FilterDialog(const TQStringList& audiofilters, const TQStringList& videofilters, TQWidget *tqparent=0, const char *name=0); ~FilterDialog(); signals: - void signalCreateAudioFilter(const QString& name, QWidget* parent); + void signalCreateAudioFilter(const TQString& name, TQWidget* tqparent); void signalRemoveAllAudioFilters(); void signalUseAudioFilters(bool); - void signalCreateVideoFilter(const QString& name, QWidget* parent); + void signalCreateVideoFilter(const TQString& name, TQWidget* tqparent); void signalRemoveAllVideoFilters(); void signalUseVideoFilters(bool); private slots: - void slotAddAudioClicked() { emit signalCreateAudioFilter(m_audioFilterCombo->currentText(), (QWidget*)m_audioFilterPage); } + void slotAddAudioClicked() { emit signalCreateAudioFilter(m_audioFilterCombo->currentText(), (TQWidget*)m_audioFilterPage); } void slotUseAudioFilters(bool on); - void slotAddVideoClicked() { emit signalCreateVideoFilter(m_videoFilterCombo->currentText(), (QWidget*)m_videoFilterPage); } + void slotAddVideoClicked() { emit signalCreateVideoFilter(m_videoFilterCombo->currentText(), (TQWidget*)m_videoFilterPage); } void slotUseVideoFilters(bool on); private: KComboBox* m_audioFilterCombo; - QVBox* m_audioFilterPage; + TQVBox* m_audioFilterPage; KPushButton* m_addAudioButton; KPushButton* m_removeAudioButton; KComboBox* m_videoFilterCombo; - QVBox* m_videoFilterPage; + TQVBox* m_videoFilterPage; KPushButton* m_addVideoButton; KPushButton* m_removeVideoButton; }; diff --git a/kaffeine/src/player-parts/xine-part/kxinewidget.cpp b/kaffeine/src/player-parts/xine-part/kxinewidget.cpp index f6b032a..4a0207e 100644 --- a/kaffeine/src/player-parts/xine-part/kxinewidget.cpp +++ b/kaffeine/src/player-parts/xine-part/kxinewidget.cpp @@ -19,17 +19,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <qapplication.h> -#include <qwidget.h> -#include <qstringlist.h> - -#include <qtimer.h> -#include <qevent.h> -#include <qdir.h> -#include <qcursor.h> -#include <qimage.h> -#include <qdatetime.h> -#include <qtextcodec.h> +#include <tqapplication.h> +#include <tqwidget.h> +#include <tqstringlist.h> + +#include <tqtimer.h> +#include <tqevent.h> +#include <tqdir.h> +#include <tqcursor.h> +#include <tqimage.h> +#include <tqdatetime.h> +#include <tqtextcodec.h> #include <xine/xineutils.h> @@ -41,7 +41,7 @@ #include <X11/extensions/Xinerama.h> #endif -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY #include "kxinewidget.moc" #include <klocale.h> #include <kdebug.h> @@ -61,41 +61,41 @@ #define TIMER_EVENT_RESIZE_PARENT 300 -KXineWidget::KXineWidget(QWidget* parent, const char* name, - const QString& pathToConfigFile, const QString& pathToLogoFile, - const QString& audioDriver, const QString& videoDriver, +KXineWidget::KXineWidget(TQWidget* tqparent, const char* name, + const TQString& pathToConfigFile, const TQString& pathToLogoFile, + const TQString& audioDriver, const TQString& videoDriver, bool startManual, bool verbose) - : QWidget(parent,name), m_startXineManual(startManual), m_xineReady(false), + : TQWidget(tqparent,name), m_startXineManual(startManual), m_xineReady(false), m_logoFile(pathToLogoFile), m_preferedAudio(audioDriver), m_preferedVideo(videoDriver), m_xineVerbose(verbose), m_xineEngine(NULL), m_audioDriver(NULL), m_videoDriver(NULL), m_xineStream(NULL), connection(NULL), m_eventQueue(NULL), m_osd(NULL), m_osdUnscaled(false), m_osdShow(false), m_osdSize(0), m_osdFont(NULL), m_audioChoices(NULL), m_audioInfo(NULL), m_videoChoices(NULL), m_videoInfo(NULL), m_mixerInfo(NULL), m_osdShowInfo(NULL), m_osdSizeOptions(NULL), m_osdSizeInfo(NULL), m_osdFontInfo(NULL), -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY m_videoFiltersEnabled(true), m_audioFiltersEnabled(true), m_deinterlaceFilter(NULL), m_deinterlaceEnabled(false), m_visualPlugin(NULL), #else m_xinePost(NULL), m_postAudioSource(NULL), m_postInput(NULL), #endif - m_visualPluginName(QString::null), m_currentSpeed(Normal), m_softwareMixer(false), m_volumeGain(false), + m_visualPluginName(TQString()), m_currentSpeed(Normal), m_softwareMixer(false), m_volumeGain(false), m_currentZoom(100), m_currentZoomX(100), m_currentZoomY(100), m_currentAudio(0), m_currentSub(0), m_savedPos(0), m_autoresizeEnabled(false) { - setMinimumSize(QSize(20,20)); // set a size hint - setPaletteBackgroundColor(QColor(0,0,0)); //black + setMinimumSize(TQSize(20,20)); // set a size hint + setPaletteBackgroundColor(TQColor(0,0,0)); //black /* dvb */ TimeShiftFilename = ""; dvbHaveVideo = 0; dvbOSD = 0; dvbColor[0] = 0; - connect( &dvbOSDHideTimer, SIGNAL(timeout()), this, SLOT(dvbHideOSD()) ); + connect( &dvbOSDHideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(dvbHideOSD()) ); if (pathToConfigFile.isNull()) { debugOut("Using default config file ~/.xine/config"); - m_configFilePath = QDir::homeDirPath(); + m_configFilePath = TQDir::homeDirPath(); m_configFilePath.append("/.xine/config"); } else @@ -104,16 +104,16 @@ KXineWidget::KXineWidget(QWidget* parent, const char* name, if (!m_logoFile.isNull()) appendToQueue(m_logoFile); -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY m_videoFilterList.setAutoDelete(true); /*** delete post plugin on removing from list ***/ m_audioFilterList.setAutoDelete(true); /*** delete post plugin on removing from list ***/ #endif - connect(&m_posTimer, SIGNAL(timeout()), this, SLOT(slotSendPosition())); - connect(&m_lengthInfoTimer, SIGNAL(timeout()), this, SLOT(slotEmitLengthInfo())); - connect(&m_mouseHideTimer, SIGNAL(timeout()), this, SLOT(slotHideMouse())); - connect(&m_osdTimer, SIGNAL(timeout()), this, SLOT(slotOSDHide())); - connect(&m_recentMessagesTimer, SIGNAL(timeout()), this, SLOT(slotNoRecentMessage())); + connect(&m_posTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSendPosition())); + connect(&m_lengthInfoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotEmitLengthInfo())); + connect(&m_mouseHideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotHideMouse())); + connect(&m_osdTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotOSDHide())); + connect(&m_recentMessagesTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotNoRecentMessage())); setUpdatesEnabled(false); setMouseTracking(true); @@ -129,7 +129,7 @@ KXineWidget::~KXineWidget() m_posTimer.stop(); m_mouseHideTimer.stop(); -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY slotRemoveAllAudioFilters(); slotRemoveAllVideoFilters(); #endif @@ -141,7 +141,7 @@ KXineWidget::~KXineWidget() debugOut("Shut down xine engine"); -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY if (m_deinterlaceFilter) { debugOut("Unwire video filters"); @@ -153,14 +153,14 @@ KXineWidget::~KXineWidget() { debugOut("Unwire audio filters"); unwireAudioFilters(); - debugOut(QString("Dispose visual plugin: %1").arg(m_visualPluginName )); + debugOut(TQString("Dispose visual plugin: %1").tqarg(m_visualPluginName )); delete m_visualPlugin; m_visualPlugin = NULL; } #else if (m_xinePost) { - debugOut(QString("Dispose visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Dispose visual plugin: %1").tqarg(m_visualPluginName)); m_postAudioSource = xine_get_audio_source(m_xineStream); xine_post_wire_audio_port(m_postAudioSource, m_audioDriver); xine_post_dispose(m_xineEngine, m_xinePost); @@ -279,7 +279,7 @@ void KXineWidget::saveXineConfig() xine_config_update_entry (m_xineEngine, &config); } - debugOut(QString("Save xine config to: %1").arg(m_configFilePath)); + debugOut(TQString("Save xine config to: %1").tqarg(m_configFilePath)); xine_config_save(m_xineEngine, m_configFilePath.ascii()); } @@ -331,23 +331,23 @@ void KXineWidget::frameOutputCallback(void* p, int video_width, int video_height /* frame size changed */ if ( (video_width != vw->m_videoFrameWidth) || (video_height != vw->m_videoFrameHeight) ) { - debugOut(QString("New video frame size: %1x%2 - aspect ratio: %3").arg(video_width).arg(video_height).arg(video_aspect)); + debugOut(TQString("New video frame size: %1x%2 - aspect ratio: %3").tqarg(video_width).tqarg(video_height).tqarg(video_aspect)); vw->m_videoFrameWidth = video_width; vw->m_videoFrameHeight = video_height; vw->m_videoAspect = video_aspect; - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_FRAME_FORMAT_CHANGE)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_FRAME_FORMAT_CHANGE)); - /* auto-resize parent widget */ - if ((vw->m_autoresizeEnabled) && (vw->parentWidget()) && (vw->m_posTimer.isActive()) && (!vw->parentWidget()->isFullScreen()) + /* auto-resize tqparent widget */ + if ((vw->m_autoresizeEnabled) && (vw->tqparentWidget()) && (vw->m_posTimer.isActive()) && (!vw->tqparentWidget()->isFullScreen()) && (video_width > 0) && (video_height > 0)) { - vw->m_newParentSize = vw->parentWidget()->size() - QSize((vw->width() - video_width), vw->height() - video_height); + vw->m_newParentSize = vw->tqparentWidget()->size() - TQSize((vw->width() - video_width), vw->height() - video_height); - debugOut(QString("Resize video window to: %1x%2").arg(vw->m_newParentSize.width()).arg(vw->m_newParentSize.height())); + debugOut(TQString("Resize video window to: %1x%2").tqarg(vw->m_newParentSize.width()).tqarg(vw->m_newParentSize.height())); /* we should not do a resize() inside a xine thread, but post an event to the main thread */ - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_RESIZE_PARENT)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_RESIZE_PARENT)); } } } @@ -356,7 +356,7 @@ void KXineWidget::frameOutputCallback(void* p, int video_width, int video_height /* * XINE EVENT THREAD * only the QT event thread should do GUI operations, - * we use QApplication::postEvent() and a reimplementation of QObject::timerEvent() to + * we use TQApplication::postEvent() and a reimplementation of TQObject::timerEvent() to * make sure all critical jobs are done within the QT main thread context * * for more information see http://doc.trolltech.com/3.1/threads.html @@ -373,7 +373,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) case XINE_EVENT_UI_PLAYBACK_FINISHED: { debugOut("xine event: playback finished"); - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_PLAYBACK_FINISHED )); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_PLAYBACK_FINISHED )); break; } case XINE_EVENT_UI_CHANNELS_CHANGED: /* new channel informations */ @@ -381,9 +381,9 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) debugOut("xine event: channels changed"); int i,channels; char* lang = new char[128]; - QString slang; + TQString slang; int num; - QStringList tmp; + TQStringList tmp; bool update=false, sk; /*** get audio channels ***/ @@ -391,7 +391,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) channels = xine_get_stream_info(vw->m_xineStream, XINE_STREAM_INFO_MAX_AUDIO_CHANNEL); for(i = 0; i < channels; i++) { - slang = QString("%1.").arg(i+1); + slang = TQString("%1.").tqarg(i+1); if (xine_get_audio_lang(vw->m_xineStream, i, lang)) slang += lang; tmp << slang; @@ -415,7 +415,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) channels = xine_get_stream_info(vw->m_xineStream, XINE_STREAM_INFO_MAX_SPU_CHANNEL); for(i = 0; i<channels; i++) { - slang = QString("%1.").arg(i+1); + slang = TQString("%1.").tqarg(i+1); if (xine_get_spu_lang(vw->m_xineStream, i, lang)) slang += lang; tmp << slang; @@ -443,18 +443,18 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) } if ( update ) - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_CHANNELS)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_CHANNELS)); break; } case XINE_EVENT_UI_SET_TITLE: /* set new title */ { debugOut("xine event: ui set title"); xine_ui_data_t* xd = (xine_ui_data_t*)xineEvent->data; - vw->m_trackTitle = QString::fromLocal8Bit( (char*)xd->str ); + vw->m_trackTitle = TQString::fromLocal8Bit( (char*)xd->str ); vw->m_lengthInfoTries = 0; vw->m_lengthInfoTimer.start(1000); /* May be new Length on Changing DVD/VCD titles */ - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_TITLE)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_TITLE)); break; } case XINE_EVENT_PROGRESS: @@ -462,9 +462,9 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) debugOut("xine event: progress info"); xine_progress_data_t* pd = (xine_progress_data_t*)xineEvent->data; - vw->m_statusString = QString::fromLocal8Bit(pd->description) + " " + QString::number(pd->percent) + "%"; + vw->m_statusString = TQString::fromLocal8Bit(pd->description) + " " + TQString::number(pd->percent) + "%"; - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_STATUS)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_STATUS)); break; } case XINE_EVENT_DROPPED_FRAMES: @@ -472,7 +472,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) debugOut("xine event: dropped frames"); xine_dropped_frames_t* dropped = (xine_dropped_frames_t*)xineEvent->data; - warningOut(QString("Skipped frames: %1 - discarded frames: %2").arg(dropped->skipped_frames/10).arg(dropped->discarded_frames/10)); + warningOut(TQString("Skipped frames: %1 - discarded frames: %2").tqarg(dropped->skipped_frames/10).tqarg(dropped->discarded_frames/10)); break; } @@ -492,7 +492,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) vw->m_DVDButtonEntered = false; } - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_CHANGE_CURSOR)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_CHANGE_CURSOR)); break; } case XINE_EVENT_UI_NUM_BUTTONS: @@ -507,19 +507,19 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) xine_mrl_reference_data_t* mrldata = (xine_mrl_reference_data_t*)xineEvent->data; vw->m_newMRLReference = mrldata->mrl; - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_MRL_REFERENCE)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_MRL_REFERENCE)); break; } case XINE_EVENT_FRAME_FORMAT_CHANGE: { // debugOut("xine event: frame format change"); - // QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_FRAME_FORMAT_CHANGE)); + // TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_FRAME_FORMAT_CHANGE)); break; } case XINE_EVENT_AUDIO_LEVEL: { - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_VOLUME_LEVEL)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_VOLUME_LEVEL)); break; } case XINE_EVENT_UI_MESSAGE: @@ -527,13 +527,13 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) debugOut("xine event: xine message"); xine_ui_message_data_t *data = (xine_ui_message_data_t *)xineEvent->data; - QString message; + TQString message; switch(data->type) { case XINE_MSG_NO_ERROR: { - /* copy strings, and replace '\0' separators by '\n' */ + /* copy strings, and tqreplace '\0' separators by '\n' */ char* s = data->messages; char* d = new char[2000]; @@ -620,7 +620,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) { message = "@"+i18n("The specified file or url was not found. Please check it. "); if(data->explanation) - message = message + "(" + QString::fromLocal8Bit((char *) data + data->parameters) + ")"; + message = message + "(" + TQString::fromLocal8Bit((char *) data + data->parameters) + ")"; break; } case XINE_MSG_PERMISSION_ERROR: @@ -647,7 +647,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) case XINE_MSG_ENCRYPTED_SOURCE: { message = i18n("The source seems encrypted, and can't be read. "); - if (vw->m_trackURL.contains("dvd:/")) + if (vw->m_trackURL.tqcontains("dvd:/")) message = message + i18n("\nYour DVD is probably crypted. According to your country laws, you can or can't use libdvdcss to be able to read this disc. "); if(data->explanation) message = message + "(" + ((char *) data + data->parameters) + ")"; @@ -663,7 +663,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) } vw->m_xineMessage = message; - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_XINE_MESSAGE)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_XINE_MESSAGE)); break; } default: @@ -674,7 +674,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent) } } -void KXineWidget::timerEvent( QTimerEvent* tevent ) +void KXineWidget::timerEvent( TQTimerEvent* tevent ) { switch ( tevent->timerId() ) { @@ -682,10 +682,10 @@ void KXineWidget::timerEvent( QTimerEvent* tevent ) { if ( !TimeShiftFilename.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(slotPlayTimeShift())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPlayTimeShift())); break; } - if ( m_trackURL=="DVB" || m_trackURL.contains(".kaxtv") ) + if ( m_trackURL=="DVB" || m_trackURL.tqcontains(".kaxtv") ) break; #ifdef XINE_PARAM_GAPLESS_SWITCH @@ -700,7 +700,7 @@ void KXineWidget::timerEvent( QTimerEvent* tevent ) xine_stop(m_xineStream); } else - QTimer::singleShot(0, this, SLOT(slotPlay())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPlay())); break; } case TIMER_EVENT_NEW_CHANNELS: @@ -721,15 +721,15 @@ void KXineWidget::timerEvent( QTimerEvent* tevent ) } case TIMER_EVENT_NEW_STATUS: { - emit signalXineStatus(m_statusString); + emit signalXinetqStatus(m_statusString); break; } case TIMER_EVENT_CHANGE_CURSOR: { if (m_DVDButtonEntered) - setCursor(QCursor(Qt::PointingHandCursor)); + setCursor(TQCursor(TQt::PointingHandCursor)); else - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); break; } case TIMER_EVENT_NEW_MRL_REFERENCE: @@ -752,7 +752,7 @@ void KXineWidget::timerEvent( QTimerEvent* tevent ) else { //restart - warningOut(QString("Message: '%1' was blocked!").arg(m_xineMessage)); + warningOut(TQString("Message: '%1' was blocked!").tqarg(m_xineMessage)); m_recentMessagesTimer.start(1500); } break; @@ -770,7 +770,7 @@ void KXineWidget::timerEvent( QTimerEvent* tevent ) } case TIMER_EVENT_RESIZE_PARENT: { - parentWidget()->resize(m_newParentSize); + tqparentWidget()->resize(m_newParentSize); break; } default: break; @@ -788,14 +788,14 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry) { if (p == NULL) return; if (entry == NULL) return; -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY KXineWidget* vw = (KXineWidget*) p; xine_video_port_t* oldVideoDriver = vw->m_videoDriver; xine_video_port_t* noneVideoDriver; int pos, time, length; - debugOut(QString("New video driver: %1").arg(entry->enum_values[entry->num_value])); + debugOut(TQString("New video driver: %1").tqarg(entry->enum_values[entry->num_value])); if (vw->m_osd) { @@ -835,7 +835,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry) vw->unwireAudioFilters(); if (vw->m_visualPlugin) { - debugOut(QString("Dispose visual plugin: %1").arg(vw->m_visualPluginName)); + debugOut(TQString("Dispose visual plugin: %1").tqarg(vw->m_visualPluginName)); delete vw->m_visualPlugin; vw->m_visualPlugin = NULL; } @@ -855,8 +855,8 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry) if (!vw->m_videoDriver) { - vw->m_xineError = i18n("Error: Can't init new Video Driver %1 - using %2!").arg(entry->enum_values[entry->num_value]).arg(vw->m_videoDriverName); - QApplication::postEvent(vw, new QTimerEvent( TIMER_EVENT_NEW_XINE_ERROR)); + vw->m_xineError = i18n("Error: Can't init new Video Driver %1 - using %2!").tqarg(entry->enum_values[entry->num_value]).tqarg(vw->m_videoDriverName); + TQApplication::postEvent(vw, new TQTimerEvent( TIMER_EVENT_NEW_XINE_ERROR)); playing = false; vw->m_videoDriver = xine_open_video_driver(vw->m_xineEngine, #ifndef HAVE_XCB @@ -869,8 +869,8 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry) else { vw->m_videoDriverName = entry->enum_values[entry->num_value]; - vw->m_statusString = i18n("Using Video Driver: %1").arg(vw->m_videoDriverName); - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_STATUS)); + vw->m_statusString = i18n("Using Video Driver: %1").tqarg(vw->m_videoDriverName); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_STATUS)); } vw->m_xineStream = xine_stream_new(vw->m_xineEngine, vw->m_audioDriver, vw->m_videoDriver); @@ -887,7 +887,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry) vw->initOSD(); if (playing) - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_RESTART_PLAYBACK)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_RESTART_PLAYBACK)); #endif } @@ -897,12 +897,12 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry) { if (p == NULL) return; if (entry == NULL) return; -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY KXineWidget* vw = (KXineWidget*) p; int pos, time, length; - debugOut(QString("New audio driver: %1").arg(entry->enum_values[entry->num_value])); + debugOut(TQString("New audio driver: %1").tqarg(entry->enum_values[entry->num_value])); if (vw->m_osd) { @@ -931,7 +931,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry) vw->unwireAudioFilters(); if (vw->m_visualPlugin) { - debugOut(QString("Dispose visual plugin: %1").arg(vw->m_visualPluginName)); + debugOut(TQString("Dispose visual plugin: %1").tqarg(vw->m_visualPluginName)); delete vw->m_visualPlugin; vw->m_visualPlugin = NULL; } @@ -945,16 +945,16 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry) if (!vw->m_audioDriver) { - vw->m_xineError = i18n("Error: Can't init new Audio Driver %1 - using %2!").arg(entry->enum_values[entry->num_value]).arg(vw->m_audioDriverName); - QApplication::postEvent(vw, new QTimerEvent( TIMER_EVENT_NEW_XINE_ERROR)); + vw->m_xineError = i18n("Error: Can't init new Audio Driver %1 - using %2!").tqarg(entry->enum_values[entry->num_value]).tqarg(vw->m_audioDriverName); + TQApplication::postEvent(vw, new TQTimerEvent( TIMER_EVENT_NEW_XINE_ERROR)); playing = false; vw->m_audioDriver = xine_open_audio_driver(vw->m_xineEngine, vw->m_audioDriverName.ascii(), NULL); } else { vw->m_audioDriverName = entry->enum_values[entry->num_value]; - vw->m_statusString = i18n("Using Audio Driver: %1").arg(vw->m_audioDriverName); - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_STATUS)); + vw->m_statusString = i18n("Using Audio Driver: %1").tqarg(vw->m_audioDriverName); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_NEW_STATUS)); } vw->m_xineStream = xine_stream_new(vw->m_xineEngine, vw->m_audioDriver, vw->m_videoDriver); @@ -966,7 +966,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry) vw->initOSD(); if (playing) - QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_RESTART_PLAYBACK)); + TQApplication::postEvent(vw, new TQTimerEvent(TIMER_EVENT_RESTART_PLAYBACK)); #endif } @@ -1070,10 +1070,10 @@ bool KXineWidget::x11Event(XEvent *event) return false; } #else -void KXineWidget::paintEvent(QPaintEvent *event) +void KXineWidget::paintEvent(TQPaintEvent *event) { if (isXineReady()) { - const QRect &rect = event->rect(); + const TQRect &rect = event->rect(); xcb_expose_event_t xcb_event; memset(&xcb_event, 0, sizeof(xcb_event)); @@ -1088,7 +1088,7 @@ void KXineWidget::paintEvent(QPaintEvent *event) xine_port_send_gui_data(m_videoDriver, XINE_GUI_SEND_EXPOSE_EVENT, &xcb_event); } - QWidget::paintEvent(event); + TQWidget::paintEvent(event); } #endif @@ -1109,7 +1109,7 @@ bool KXineWidget::initXine() if (isXineReady()) return true; - emit signalXineStatus(i18n("Init xine...")); + emit signalXinetqStatus(i18n("Init xine...")); globalPosChanged(); /* get global pos of the window */ /**** INIT XINE DISPLAY ****/ @@ -1148,18 +1148,18 @@ bool KXineWidget::initXine() int count = 1; debugOut("Xinerama extension present"); XineramaQueryScreens(x11Display(), &count); - debugOut(QString("%1 screens detected").arg(count)); + debugOut(TQString("%1 screens detected").tqarg(count)); if (count > 1) // multihead -> assuming square pixels m_displayRatio = 1.0; } #endif - debugOut(QString("Display aspect ratio (v/h): %1").arg(m_displayRatio));*/ + debugOut(TQString("Display aspect ratio (v/h): %1").tqarg(m_displayRatio));*/ /**** INIT XINE ENGINE ****/ - debugOut(QString("Using xine version %1").arg(xine_get_version_string())); + debugOut(TQString("Using xine version %1").tqarg(xine_get_version_string())); m_xineEngine = xine_new(); if (!m_xineEngine) @@ -1173,10 +1173,10 @@ bool KXineWidget::initXine() /* load configuration */ - if (!QFile::exists(m_configFilePath)) + if (!TQFile::exists(m_configFilePath)) warningOut("No config file found, will create one..."); else - xine_config_load(m_xineEngine, QFile::encodeName(m_configFilePath)); + xine_config_load(m_xineEngine, TQFile::encodeName(m_configFilePath)); debugOut("Post-init xine engine"); @@ -1204,12 +1204,12 @@ bool KXineWidget::initXine() i = xine_config_register_enum(m_xineEngine, "audio.driver", 0, m_audioChoices, m_audioInfo, NULL, 10, &KXineWidget::audioDriverChangedCallback, this); - if (m_audioDriverList.contains(m_preferedAudio)) + if (m_audioDriverList.tqcontains(m_preferedAudio)) m_audioDriverName = m_preferedAudio; else m_audioDriverName = m_audioChoices[i]; - debugOut(QString("Use audio driver %1").arg(m_audioDriverName)); + debugOut(TQString("Use audio driver %1").tqarg(m_audioDriverName)); drivers = xine_list_video_output_plugins(m_xineEngine); i = 0; @@ -1230,12 +1230,12 @@ bool KXineWidget::initXine() i = xine_config_register_enum(m_xineEngine, "video.driver", 0, m_videoChoices, m_videoInfo, NULL, 10, &KXineWidget::videoDriverChangedCallback, this); - if (m_videoDriverList.contains(m_preferedVideo)) + if (m_videoDriverList.tqcontains(m_preferedVideo)) m_videoDriverName = m_preferedVideo; else m_videoDriverName = m_videoChoices[i]; - debugOut(QString("Use video driver %1").arg(m_videoDriverName)); + debugOut(TQString("Use video driver %1").tqarg(m_videoDriverName)); m_mixerInfo = strdup(i18n("Use software audio mixer").local8Bit()); m_softwareMixer = (bool)xine_config_register_bool(m_xineEngine, "audio.mixer_software", 1, m_mixerInfo, @@ -1307,7 +1307,7 @@ bool KXineWidget::initXine() if (!m_videoDriver && m_videoDriverName != "auto") { - emit signalXineError(i18n("Can't init Video Driver '%1' - trying 'auto'...").arg(m_videoDriverName)); + emit signalXineError(i18n("Can't init Video Driver '%1' - trying 'auto'...").tqarg(m_videoDriverName)); m_videoDriverName = "auto"; m_videoDriver = xine_open_video_driver(m_xineEngine, #ifndef HAVE_XCB @@ -1331,7 +1331,7 @@ bool KXineWidget::initXine() if (!m_audioDriver && m_audioDriverName != "auto") { - emit signalXineError(i18n("Can't init Audio Driver '%1' - trying 'auto'...").arg(m_audioDriverName)); + emit signalXineError(i18n("Can't init Audio Driver '%1' - trying 'auto'...").tqarg(m_audioDriverName)); m_audioDriverName = "auto"; m_audioDriver = xine_open_audio_driver (m_xineEngine, m_audioDriverName.ascii(), NULL); } @@ -1377,7 +1377,7 @@ bool KXineWidget::initXine() debugOut("xine init successful"); - emit signalXineStatus(i18n("Ready")); + emit signalXinetqStatus(i18n("Ready")); emit signalXineReady(); /** something to play? **/ @@ -1395,12 +1395,12 @@ void KXineWidget::initOSD() { if (!xine_osd_set_font(m_osd, m_osdFont, fontsizetable[m_osdSize])) { - debugOut(QString("Font ->%1<- specified for OSD doesn't exists.").arg(m_osdFont)); + debugOut(TQString("Font ->%1<- specified for OSD doesn't exists.").tqarg(m_osdFont)); free(m_osdFont); m_osdFont = strdup("sans"); xine_osd_set_font(m_osd, m_osdFont, fontsizetable[m_osdSize]); } - debugOut(QString("Font for OSD: %1").arg(m_osdFont)); + debugOut(TQString("Font for OSD: %1").tqarg(m_osdFont)); xine_osd_set_text_palette(m_osd, XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT, XINE_OSD_TEXT1); m_osdUnscaled = (xine_osd_get_capabilities(m_osd) & XINE_OSD_CAP_UNSCALED); if (m_osdUnscaled) @@ -1416,10 +1416,10 @@ void KXineWidget::initOSD() bool KXineWidget::playDvb() { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireAudioFilters(); - QPtrList<PostFilter> activeList; + TQPtrList<PostFilter> activeList; if (m_audioFilterList.count() && m_audioFiltersEnabled) activeList = m_audioFilterList; @@ -1428,7 +1428,7 @@ bool KXineWidget::playDvb() { if (!m_visualPlugin) { - debugOut(QString("Init visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Init visual plugin: %1").tqarg(m_visualPluginName)); m_visualPlugin = new PostFilter(m_visualPluginName, m_xineEngine, m_audioDriver, m_videoDriver, NULL); } @@ -1438,7 +1438,7 @@ bool KXineWidget::playDvb() { if (m_visualPlugin) { - debugOut(QString("Dispose visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Dispose visual plugin: %1").tqarg(m_visualPluginName)); delete m_visualPlugin; m_visualPlugin = NULL; } @@ -1465,11 +1465,11 @@ bool KXineWidget::playDvb() m_currentSpeed = Normal; m_trackHasChapters = false; - m_trackArtist = QString::null; - m_trackAlbum = QString::null; - m_trackNumber = QString::null; - m_trackYear = QString::null; - m_trackComment = QString::null; + m_trackArtist = TQString(); + m_trackAlbum = TQString(); + m_trackNumber = TQString(); + m_trackYear = TQString(); + m_trackComment = TQString(); m_trackIsSeekable = false; @@ -1484,7 +1484,7 @@ bool KXineWidget::playDvb() } else { - m_trackVideoCodec = QString::null; + m_trackVideoCodec = TQString(); m_videoFrameWidth = 0; m_videoFrameHeight = 0; m_trackVideoBitrate = 0; @@ -1498,7 +1498,7 @@ bool KXineWidget::playDvb() } else { - m_trackAudioCodec = QString::null; + m_trackAudioCodec = TQString(); m_trackAudioBitrate = 0; } @@ -1508,12 +1508,12 @@ bool KXineWidget::playDvb() m_posTimer.start(1000); emit signalXinePlaying(); - emit signalXineStatus(i18n("Playing")); + emit signalXinetqStatus(i18n("Playing")); return true; } -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN +#if Q_BYTE_ORDER == TQ_LITTLE_ENDIAN #define rgb2yuv(R,G,B) ((((((66*R+129*G+25*B+128)>>8)+16)<<8)|(((112*R-94*G-18*B+128)>>8)+128))<<8|(((-38*R-74*G+112*B+128)>>8)+128)) #else #define rgb2yuv(R,G,B) (((((((-38*R-74*G+112*B+128)>>8)+128)<<8)|(((112*R-94*G-18*B+128)>>8)+128))<<8|(((66*R+129*G+25*B+128)>>8)+16))<<8) @@ -1596,12 +1596,12 @@ void KXineWidget::initDvbPalette() dvbColor[DVB_COLOR_BAR] = rgb2yuv(255,128,0); dvbTrans[DVB_COLOR_BAR] = 8; } -void getOSDLine( xine_osd_t *osd, int w, QCString &dest, QCString &source ) +void getOSDLine( xine_osd_t *osd, int w, TQCString &dest, TQCString &source ) { int prevPos, pos, tw, th; bool wrap=false; - pos = source.find(" "); + pos = source.tqfind(" "); if ( pos==-1 ) { dest = source; source = ""; @@ -1618,7 +1618,7 @@ void getOSDLine( xine_osd_t *osd, int w, QCString &dest, QCString &source ) if ( pos==-1 ) break; prevPos = pos; - pos = source.find(" ",pos+1); + pos = source.tqfind(" ",pos+1); dest = source.left( pos ); } if ( wrap ) { @@ -1651,7 +1651,7 @@ void KXineWidget::dvbShowOSD() m_trackVideoBitrate = xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_VIDEO_BITRATE); } else { - m_trackVideoCodec = QString::null; + m_trackVideoCodec = TQString(); m_videoFrameWidth = 0; m_videoFrameHeight = 0; m_trackVideoBitrate = 0; @@ -1663,7 +1663,7 @@ void KXineWidget::dvbShowOSD() m_trackAudioBitrate = xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_AUDIO_BITRATE); } else { - m_trackAudioCodec = QString::null; + m_trackAudioCodec = TQString(); m_trackAudioBitrate = 0; } @@ -1686,7 +1686,7 @@ void KXineWidget::dvbShowOSD() dvbOSD = xine_osd_new( m_xineStream, border, h-border-100, w-(2*border), 100 ); } if ( dvbOSD ) { - QCString ct, cs; + TQCString ct, cs; if ( !dvbColor[0] ) initDvbPalette(); xine_osd_set_palette( dvbOSD, dvbColor, dvbTrans ); xine_osd_set_font( dvbOSD, m_osdFont, 16 ); @@ -1695,7 +1695,7 @@ void KXineWidget::dvbShowOSD() xine_osd_draw_rect( dvbOSD, 0, 0, w-(2*border), h-(2*border), DVB_TEXT_WHITE+1, 1 ); else xine_osd_draw_rect( dvbOSD, 0, 0, w-(2*border), 100, DVB_TEXT_WHITE+1, 1 ); - QString t = QTime::currentTime().toString( "hh:mm" ); + TQString t = TQTime::currentTime().toString( "hh:mm" ); int tw, th, len; xine_osd_get_text_size(dvbOSD, t.utf8(), &tw, &th); len = tw; @@ -1728,7 +1728,7 @@ void KXineWidget::dvbShowOSD() xine_osd_draw_text( dvbOSD, offset, 5, ct, DVB_TEXT_BLUE ); xine_osd_draw_line( dvbOSD, 5, 10+18, w-(2*border)-5, 10+18, DVB_COLOR_MAGENTA ); - QString s, c; + TQString s, c; int y=43; int pos; if ( dvbCurrentNext[0]=="E" ) { @@ -1738,7 +1738,7 @@ void KXineWidget::dvbShowOSD() } if ( !dvbCurrentNext[1].isEmpty() ) { s = dvbCurrentNext[1]; - pos = s.find("-"); + pos = s.tqfind("-"); c = s.left( pos+1 ); s = s.right( s.length()-pos-1 ); t = s; @@ -1791,7 +1791,7 @@ void KXineWidget::dvbShowOSD() continue; } s = dvbCurrentNext[ j ]; - pos = s.find("-"); + pos = s.tqfind("-"); c = s.left( pos+1 ); s = s.right( s.length()-pos-1 ); ct = cs = s.utf8(); @@ -1843,7 +1843,7 @@ void KXineWidget::dvbHideOSD() } } -void KXineWidget::setDvbCurrentNext( const QString &channelName, const QStringList &list ) +void KXineWidget::setDvbCurrentNext( const TQString &channelName, const TQStringList &list ) { if ( list[0]=="STOP" ) { dvbHideOSD(); @@ -1853,10 +1853,10 @@ void KXineWidget::setDvbCurrentNext( const QString &channelName, const QStringLi m_dvbChannelName = channelName; - QTimer::singleShot( 0, this, SLOT(dvbShowOSD()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(dvbShowOSD()) ); } -void KXineWidget::setDvb( const QString &pipeName, const QString &chanName, int haveVideo ) +void KXineWidget::setDvb( const TQString &pipeName, const TQString &chanName, int haveVideo ) { m_trackURL = /*"fifo://"+*/pipeName; m_trackTitle = chanName; @@ -1876,14 +1876,14 @@ bool KXineWidget::openDvb() m_lengthInfoTimer.stop(); m_posTimer.stop(); xine_set_param( m_xineStream, XINE_PARAM_METRONOM_PREBUFFER, 180000); - if (!xine_open(m_xineStream, QFile::encodeName(m_trackURL))) { + if (!xine_open(m_xineStream, TQFile::encodeName(m_trackURL))) { sendXineError(); return false; } else fprintf(stderr,"xine pipe opened %s\n", m_trackURL.ascii()); m_trackURL = "DVB"; - emit signalXineStatus(i18n("DVB: opening...")); - QTimer::singleShot( 0, this, SLOT(playDvb()) ); + emit signalXinetqStatus(i18n("DVB: opening...")); + TQTimer::singleShot( 0, this, TQT_SLOT(playDvb()) ); return true; } @@ -1893,7 +1893,7 @@ void KXineWidget::slotPlayTimeShift() m_lengthInfoTimer.stop(); m_posTimer.stop(); xine_set_param( m_xineStream, XINE_PARAM_METRONOM_PREBUFFER, 0); - if (!xine_open(m_xineStream, QFile::encodeName(TimeShiftFilename))) { + if (!xine_open(m_xineStream, TQFile::encodeName(TimeShiftFilename))) { sendXineError(); #ifdef XINE_PARAM_GAPLESS_SWITCH if ( xine_check_version(1,1,1) ) @@ -1930,19 +1930,19 @@ void KXineWidget::slotPlay() m_posTimer.stop(); m_currentSpeed = Normal; - setCursor(QCursor(Qt::WaitCursor)); + setCursor(TQCursor(TQt::WaitCursor)); m_trackURL = m_queue.first(); - m_queue.remove(m_queue.find(m_trackURL)); + m_queue.remove(m_queue.tqfind(m_trackURL)); if (m_trackURL != m_logoFile) - emit signalXineStatus(i18n("Opening...")); + emit signalXinetqStatus(i18n("Opening...")); /* check for external subtitle file or save url */ - m_trackSubtitleURL = QString::null; - m_trackSaveURL = QString::null; + m_trackSubtitleURL = TQString(); + m_trackSaveURL = TQString(); - /*for (int i = 1; i <= m_trackURL.contains('#'); i++) { + /*for (int i = 1; i <= m_trackURL.tqcontains('#'); i++) { ref = m_trackURL.section('#', i, i); if (ref.section(':', 0, 0) == "subtitle") m_trackSubtitleURL = ref.section(':', 1); @@ -1950,18 +1950,18 @@ void KXineWidget::slotPlay() m_trackSaveURL = ref.section(':', 1); }*/ - QString turl; + TQString turl; int pos; - if ( (pos=m_trackURL.find("#subtitle:"))>-1 ) { + if ( (pos=m_trackURL.tqfind("#subtitle:"))>-1 ) { turl = m_trackURL.left(pos); m_trackSubtitleURL = m_trackURL.right( m_trackURL.length()-pos ); - if ( (pos=m_trackSubtitleURL.find("#save:"))>-1 ) { + if ( (pos=m_trackSubtitleURL.tqfind("#save:"))>-1 ) { m_trackSaveURL = m_trackSubtitleURL.right( m_trackSubtitleURL.length()-pos ); m_trackSubtitleURL = m_trackSubtitleURL.left(pos); } } - else if ( (pos=m_trackURL.find("#save:"))>-1 ) { + else if ( (pos=m_trackURL.tqfind("#save:"))>-1 ) { turl = m_trackURL.left(pos); m_trackSaveURL = m_trackURL.right( m_trackURL.length()-pos ); } @@ -1970,21 +1970,21 @@ void KXineWidget::slotPlay() m_trackSubtitleURL.remove("#subtitle:"); m_trackSaveURL.remove("#save:"); - turl = turl.replace( "%", "%25" ).replace( "#", "%23" ).replace( ";", "%3b" ).replace( " ", "%20" ); + turl = turl.tqreplace( "%", "%25" ).tqreplace( "#", "%23" ).tqreplace( ";", "%3b" ).tqreplace( " ", "%20" ); if ( !m_trackSubtitleURL.isEmpty() ) - turl = turl + "#subtitle:" + m_trackSubtitleURL.replace( "%", "%25" ).replace( "#", "%23" ).replace( ";", "%3b" ).replace( " ", "%20" ); + turl = turl + "#subtitle:" + m_trackSubtitleURL.tqreplace( "%", "%25" ).tqreplace( "#", "%23" ).tqreplace( ";", "%3b" ).tqreplace( " ", "%20" ); if ( !m_trackSaveURL.isEmpty() ) - turl = turl + "#save:" + m_trackSaveURL.replace( "%", "%25" ).replace( "#", "%23" ).replace( ";", "%3b" ).replace( " ", "%20" ); + turl = turl + "#save:" + m_trackSaveURL.tqreplace( "%", "%25" ).tqreplace( "#", "%23" ).tqreplace( ";", "%3b" ).tqreplace( " ", "%20" ); if ( turl.startsWith("/") ) turl.prepend("file://"); - debugOut(QString("Playing: %1").arg(turl.local8Bit())); + debugOut(TQString("Playing: %1").tqarg(turl.local8Bit().data())); xine_set_param( m_xineStream, XINE_PARAM_METRONOM_PREBUFFER, 12000 ); - if (!xine_open(m_xineStream, QFile::encodeName(turl))) { + if (!xine_open(m_xineStream, TQFile::encodeName(turl))) { sendXineError(); - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); #ifdef XINE_PARAM_GAPLESS_SWITCH if ( xine_check_version(1,1,1) ) xine_set_param( m_xineStream, XINE_PARAM_GAPLESS_SWITCH, 0); @@ -1993,7 +1993,7 @@ void KXineWidget::slotPlay() } /**** use visualization ? ****/ -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireAudioFilters(); wireAudioFilters(); #else @@ -2002,7 +2002,7 @@ void KXineWidget::slotPlay() { if (m_visualPluginName && (!m_xinePost)) { - debugOut(QString("Init visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Init visual plugin: %1").tqarg(m_visualPluginName)); m_xinePost = xine_post_init(m_xineEngine, m_visualPluginName, 0, &m_audioDriver, &m_videoDriver); @@ -2016,7 +2016,7 @@ void KXineWidget::slotPlay() { if (m_xinePost) { - debugOut(QString("Dispose visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Dispose visual plugin: %1").tqarg(m_visualPluginName)); m_postAudioSource = xine_get_audio_source(m_xineStream); xine_post_wire_audio_port(m_postAudioSource, m_audioDriver); xine_post_dispose(m_xineEngine, m_xinePost); @@ -2031,7 +2031,7 @@ void KXineWidget::slotPlay() if (!xine_play(m_xineStream, savedPos, 0)) { sendXineError(); - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); return; } @@ -2040,37 +2040,37 @@ void KXineWidget::slotPlay() /** information requirement **/ - m_trackTitle = QString::null; + m_trackTitle = TQString(); bool currentUtf8Locale; - QTextCodec* testUtf8Local = QTextCodec::codecForLocale(); + TQTextCodec* testUtf8Local = TQTextCodec::codecForLocale(); if (!strcmp(testUtf8Local->name(),"UTF-8")) currentUtf8Locale = true; else currentUtf8Locale = false; - QTextCodec *CodecUtf8; - CodecUtf8 = QTextCodec::codecForName("UTF-8"); + TQTextCodec *CodecUtf8; + CodecUtf8 = TQTextCodec::codecForName("UTF-8"); - QString infotag; - infotag = QString::fromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_TITLE)); + TQString infotag; + infotag = TQString::tqfromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_TITLE)); if (currentUtf8Locale) m_trackTitle = infotag; else - m_trackTitle = QString::fromLocal8Bit(infotag.ascii()); + m_trackTitle = TQString::fromLocal8Bit(infotag.ascii()); if (CodecUtf8->heuristicContentMatch(infotag.ascii(), infotag.length()) >= 0) - m_trackTitle = QString::fromUtf8(infotag.ascii()); + m_trackTitle = TQString::fromUtf8(infotag.ascii()); if ((!m_trackTitle.isNull()) && (!m_trackTitle.isEmpty())) /* no meta? */ { - QString trackArtist=NULL; - QString trackAlbum=NULL; - QString trackComment=NULL; - trackArtist = QString::fromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_ARTIST)); - trackAlbum = QString::fromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_ALBUM)); - trackComment = QString::fromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_COMMENT)); + TQString trackArtist=NULL; + TQString trackAlbum=NULL; + TQString trackComment=NULL; + trackArtist = TQString::tqfromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_ARTIST)); + trackAlbum = TQString::tqfromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_ALBUM)); + trackComment = TQString::tqfromLatin1(xine_get_meta_info(m_xineStream, XINE_META_INFO_COMMENT)); if (currentUtf8Locale) { m_trackArtist = trackArtist; @@ -2079,27 +2079,27 @@ void KXineWidget::slotPlay() } else { - m_trackArtist = QString::fromLocal8Bit(trackArtist.ascii()); - m_trackAlbum = QString::fromLocal8Bit(trackAlbum.ascii()); - m_trackComment = QString::fromLocal8Bit(trackComment.ascii()); + m_trackArtist = TQString::fromLocal8Bit(trackArtist.ascii()); + m_trackAlbum = TQString::fromLocal8Bit(trackAlbum.ascii()); + m_trackComment = TQString::fromLocal8Bit(trackComment.ascii()); } if (CodecUtf8->heuristicContentMatch(trackArtist.ascii(), trackArtist.length()) >= 0) - m_trackArtist = QString::fromUtf8(trackArtist.ascii()); + m_trackArtist = TQString::fromUtf8(trackArtist.ascii()); if (CodecUtf8->heuristicContentMatch(trackAlbum.ascii(), trackAlbum.length()) >= 0) - m_trackAlbum = QString::fromUtf8(trackAlbum.ascii()); + m_trackAlbum = TQString::fromUtf8(trackAlbum.ascii()); if (CodecUtf8->heuristicContentMatch(trackComment.ascii(), trackComment.length()) >= 0) - m_trackComment = QString::fromUtf8(trackComment.ascii()); + m_trackComment = TQString::fromUtf8(trackComment.ascii()); m_trackYear = xine_get_meta_info(m_xineStream, XINE_META_INFO_YEAR); m_trackNumber = xine_get_meta_info(m_xineStream, XINE_META_INFO_TRACK_NUMBER); } else { - m_trackArtist = QString::null; - m_trackAlbum = QString::null; - m_trackNumber = QString::null; - m_trackYear = QString::null; - m_trackComment = QString::null; + m_trackArtist = TQString(); + m_trackAlbum = TQString(); + m_trackNumber = TQString(); + m_trackYear = TQString(); + m_trackComment = TQString(); } m_trackHasVideo = (bool)xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_HAS_VIDEO); @@ -2112,7 +2112,7 @@ void KXineWidget::slotPlay() } else { - m_trackVideoCodec = QString::null; + m_trackVideoCodec = TQString(); m_videoFrameWidth = 0; m_videoFrameHeight = 0; m_trackVideoBitrate = 0; @@ -2126,12 +2126,12 @@ void KXineWidget::slotPlay() } else { - m_trackAudioCodec = QString::null; + m_trackAudioCodec = TQString(); m_trackAudioBitrate = 0; } /*** we need a little delay for some meta info ***/ - QTimer::singleShot(1000, this, SLOT(slotGetInfoDelayed())); + TQTimer::singleShot(1000, this, TQT_SLOT(slotGetInfoDelayed())); m_trackLength = getLengthInfo(); @@ -2151,15 +2151,15 @@ void KXineWidget::slotPlay() slotSetAudioChannel(0); //refresh channel info if (m_trackURL != m_logoFile) m_posTimer.start(200); - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); if (m_trackURL != m_logoFile) { emit signalXinePlaying(); if (hasSaveURL()) - emit signalXineStatus(i18n("Recording")); + emit signalXinetqStatus(i18n("Recording")); else - emit signalXineStatus(i18n("Playing")); + emit signalXinetqStatus(i18n("Playing")); } } @@ -2189,21 +2189,21 @@ void KXineWidget::slotGetInfoDelayed() void KXineWidget::sendXineError() { - QString error; + TQString error; int errCode = xine_get_error(m_xineStream); - QString addInfo; - QString audioCodec = xine_get_meta_info(m_xineStream, XINE_META_INFO_AUDIOCODEC); - QString videoCodec = xine_get_meta_info(m_xineStream, XINE_META_INFO_VIDEOCODEC); + TQString addInfo; + TQString audioCodec = xine_get_meta_info(m_xineStream, XINE_META_INFO_AUDIOCODEC); + TQString videoCodec = xine_get_meta_info(m_xineStream, XINE_META_INFO_VIDEOCODEC); if ((!audioCodec.isEmpty()) || (!videoCodec.isEmpty())) { if (!audioCodec.isEmpty()) - addInfo.append(QString("(") + i18n("Audio Codec") + ": " + audioCodec + ")"); + addInfo.append(TQString("(") + i18n("Audio Codec") + ": " + audioCodec + ")"); if (!videoCodec.isEmpty()) - addInfo.append(QString("(") + i18n("Video Codec") + ": " + videoCodec + ")"); + addInfo.append(TQString("(") + i18n("Video Codec") + ": " + videoCodec + ")"); } else - addInfo.append(QString("(") + m_trackURL + ")"); + addInfo.append(TQString("(") + m_trackURL + ")"); switch (errCode) { @@ -2239,17 +2239,17 @@ void KXineWidget::sendXineError() { if (m_trackURL != m_logoFile) { - emit signalXineStatus(i18n("Error")); + emit signalXinetqStatus(i18n("Error")); emit signalXineError(error); } else - errorOut("Can't find/play logo file!"); + errorOut("Can't tqfind/play logo file!"); } else { errorOut(error); - errorOut(QString("Can't play: %1 - trying next").arg(m_trackURL)); - QTimer::singleShot(0, this, SLOT(slotPlay())); + errorOut(TQString("Can't play: %1 - trying next").tqarg(m_trackURL)); + TQTimer::singleShot(0, this, TQT_SLOT(slotPlay())); } } @@ -2261,26 +2261,26 @@ bool KXineWidget::isPlaying() const return false; } -QString KXineWidget::getXineLog() const +TQString KXineWidget::getXineLog() const { - QString logStr; + TQString logStr; int i = 0; - QTextStream ts(&logStr, IO_WriteOnly); + TQTextStream ts(&logStr, IO_WriteOnly); const char* const* log = xine_get_log(m_xineEngine, /* XINE_LOG_MSG*/ 0); if (log == NULL) - return QString(); + return TQString(); while(log[i]) { - ts << QString::fromLocal8Bit(log[i]); + ts << TQString::fromLocal8Bit(log[i]); i++; } return logStr; } -void KXineWidget::showOSDMessage(const QString& message, uint duration, int priority) +void KXineWidget::showOSDMessage(const TQString& message, uint duration, int priority) { if ((!m_osd) || (!m_osdShow) || (isHidden())) return; @@ -2290,7 +2290,7 @@ void KXineWidget::showOSDMessage(const QString& message, uint duration, int prio return; prevOsdPriority = priority; - //debugOut(QString("OSD: draw text: %1").arg(message)); + //debugOut(TQString("OSD: draw text: %1").tqarg(message)); xine_osd_clear(m_osd); xine_osd_draw_text(m_osd, 0, 0, message.local8Bit(), XINE_OSD_TEXT1); @@ -2308,12 +2308,12 @@ void KXineWidget::slotOSDHide() m_osdTimer.stop(); } -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY /****************** postprocessing filter management ****************/ -QStringList KXineWidget::getVideoFilterNames() const +TQStringList KXineWidget::getVideoFilterNames() const { - QStringList filters; + TQStringList filters; const char* const* plugins = xine_list_post_plugins_typed(m_xineEngine, XINE_POST_TYPE_VIDEO_FILTER); for (int i = 0; plugins[i]; i++) @@ -2323,9 +2323,9 @@ QStringList KXineWidget::getVideoFilterNames() const return filters; } -QStringList KXineWidget::getAudioFilterNames() const +TQStringList KXineWidget::getAudioFilterNames() const { - QStringList filters; + TQStringList filters; const char* const* plugins = xine_list_post_plugins_typed(m_xineEngine, XINE_POST_TYPE_AUDIO_FILTER); for (int i = 0; plugins[i]; i++) @@ -2336,42 +2336,42 @@ QStringList KXineWidget::getAudioFilterNames() const } #endif -void KXineWidget::slotCreateVideoFilter(const QString& name, QWidget* parent) +void KXineWidget::slotCreateVideoFilter(const TQString& name, TQWidget* tqparent) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireVideoFilters(); - PostFilter* filter = new PostFilter(name, m_xineEngine, m_audioDriver, m_videoDriver, parent); - connect(filter, SIGNAL(signalDeleteMe(PostFilter*)), this, SLOT(slotDeleteVideoFilter(PostFilter*))); + PostFilter* filter = new PostFilter(name, m_xineEngine, m_audioDriver, m_videoDriver, tqparent); + connect(filter, TQT_SIGNAL(signalDeleteMe(PostFilter*)), this, TQT_SLOT(slotDeleteVideoFilter(PostFilter*))); m_videoFilterList.append(filter); wireVideoFilters(); #else - parent = parent; - warningOut(QString("Not implemented [CreateVideoFilter %1]").arg(name)); + tqparent = tqparent; + warningOut(TQString("Not implemented [CreateVideoFilter %1]").tqarg(name)); #endif } -void KXineWidget::slotCreateAudioFilter(const QString& name, QWidget* parent) +void KXineWidget::slotCreateAudioFilter(const TQString& name, TQWidget* tqparent) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireAudioFilters(); - PostFilter* filter = new PostFilter(name, m_xineEngine, m_audioDriver, m_videoDriver, parent); - connect(filter, SIGNAL(signalDeleteMe(PostFilter*)), this, SLOT(slotDeleteAudioFilter(PostFilter*))); + PostFilter* filter = new PostFilter(name, m_xineEngine, m_audioDriver, m_videoDriver, tqparent); + connect(filter, TQT_SIGNAL(signalDeleteMe(PostFilter*)), this, TQT_SLOT(slotDeleteAudioFilter(PostFilter*))); m_audioFilterList.append(filter); wireAudioFilters(); #else - parent = parent; - warningOut(QString("Not implemented [CreateAudioFilter %1]").arg(name)); + tqparent = tqparent; + warningOut(TQString("Not implemented [CreateAudioFilter %1]").tqarg(name)); #endif } void KXineWidget::slotRemoveAllVideoFilters() { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireVideoFilters(); while (m_videoFilterList.count()) m_videoFilterList.removeLast(); @@ -2383,7 +2383,7 @@ void KXineWidget::slotRemoveAllVideoFilters() void KXineWidget::slotRemoveAllAudioFilters() { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireAudioFilters(); while (m_audioFilterList.count()) m_audioFilterList.removeLast(); @@ -2395,7 +2395,7 @@ void KXineWidget::slotRemoveAllAudioFilters() void KXineWidget::slotDeleteVideoFilter(PostFilter* filter) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireVideoFilters(); m_videoFilterList.remove(filter); wireVideoFilters(); @@ -2407,7 +2407,7 @@ void KXineWidget::slotDeleteVideoFilter(PostFilter* filter) void KXineWidget::slotDeleteAudioFilter(PostFilter* filter) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireAudioFilters(); m_audioFilterList.remove(filter); wireAudioFilters(); @@ -2417,7 +2417,7 @@ void KXineWidget::slotDeleteAudioFilter(PostFilter* filter) #endif } -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY void KXineWidget::unwireVideoFilters() { if (m_xineStream && m_videoDriver) @@ -2432,7 +2432,7 @@ void KXineWidget::wireVideoFilters() return; } - QPtrList<PostFilter> activeList; + TQPtrList<PostFilter> activeList; if (m_videoFilterList.count() && m_videoFiltersEnabled) activeList = m_videoFilterList; @@ -2467,7 +2467,7 @@ void KXineWidget::wireAudioFilters() return; } - QPtrList<PostFilter> activeList; + TQPtrList<PostFilter> activeList; if (m_audioFilterList.count() && m_audioFiltersEnabled) activeList = m_audioFilterList; @@ -2478,7 +2478,7 @@ void KXineWidget::wireAudioFilters() { if (!m_visualPlugin) { - debugOut(QString("Init visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Init visual plugin: %1").tqarg(m_visualPluginName)); m_visualPlugin = new PostFilter(m_visualPluginName, m_xineEngine, m_audioDriver, m_videoDriver, NULL); } @@ -2488,7 +2488,7 @@ void KXineWidget::wireAudioFilters() { if (m_visualPlugin) { - debugOut(QString("Dispose visual plugin: %1").arg(m_visualPluginName)); + debugOut(TQString("Dispose visual plugin: %1").tqarg(m_visualPluginName)); delete m_visualPlugin; m_visualPlugin = NULL; } @@ -2510,7 +2510,7 @@ void KXineWidget::wireAudioFilters() void KXineWidget::slotEnableVideoFilters(bool enable) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY m_videoFiltersEnabled = enable; unwireVideoFilters(); @@ -2523,7 +2523,7 @@ void KXineWidget::slotEnableVideoFilters(bool enable) void KXineWidget::slotEnableAudioFilters(bool enable) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY m_audioFiltersEnabled = enable; unwireAudioFilters(); @@ -2534,18 +2534,18 @@ void KXineWidget::slotEnableAudioFilters(bool enable) #endif } -#ifndef USE_QT_ONLY -QStringList KXineWidget::getAudioFilterConfig() +#ifndef USE_TQT_ONLY +TQStringList KXineWidget::getAudioFilterConfig() { - QStringList configStrings; + TQStringList configStrings; for (uint i=0; i<m_audioFilterList.count(); i++) configStrings << m_audioFilterList.at(i)->getConfig(); return configStrings; } -QStringList KXineWidget::getVideoFilterConfig() +TQStringList KXineWidget::getVideoFilterConfig() { - QStringList configStrings; + TQStringList configStrings; for (uint i=0; i<m_videoFilterList.count(); i++) configStrings << m_videoFilterList.at(i)->getConfig(); return configStrings; @@ -2554,9 +2554,9 @@ QStringList KXineWidget::getVideoFilterConfig() /**** visual plugin **********/ -QStringList KXineWidget::getVisualPlugins() const +TQStringList KXineWidget::getVisualPlugins() const { - QStringList visuals; + TQStringList visuals; const char* const* plugins = xine_list_post_plugins_typed(m_xineEngine, XINE_POST_TYPE_AUDIO_VISUALIZATION); for (int i = 0; plugins[i]; i++) @@ -2568,12 +2568,12 @@ QStringList KXineWidget::getVisualPlugins() const /**************** change visualization plugin *****************/ -void KXineWidget::slotSetVisualPlugin(const QString& visual) +void KXineWidget::slotSetVisualPlugin(const TQString& visual) { if (m_visualPluginName == visual) return; - debugOut(QString("New visualization plugin: %1").arg(visual)); + debugOut(TQString("New visualization plugin: %1").tqarg(visual)); -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY unwireAudioFilters(); if(m_visualPlugin) { @@ -2582,14 +2582,14 @@ void KXineWidget::slotSetVisualPlugin(const QString& visual) } if (visual == "none") - m_visualPluginName = QString::null; + m_visualPluginName = TQString(); else m_visualPluginName = visual; wireAudioFilters(); #else if (visual == "none") - m_visualPluginName = QString::null; + m_visualPluginName = TQString(); else m_visualPluginName = visual; @@ -2616,7 +2616,7 @@ void KXineWidget::slotSetVisualPlugin(const QString& visual) /*****/ -void KXineWidget::getAutoplayPlugins(QStringList& autoPlayList) const +void KXineWidget::getAutoplayPlugins(TQStringList& autoPlayList) const { char** pluginIds = NULL; int i = 0; @@ -2632,7 +2632,7 @@ void KXineWidget::getAutoplayPlugins(QStringList& autoPlayList) const } } -bool KXineWidget::getAutoplayPluginURLS(const QString& plugin, QStringList& list) +bool KXineWidget::getAutoplayPluginURLS(const TQString& plugin, TQStringList& list) { char** urls = NULL; int num; @@ -2660,7 +2660,7 @@ void KXineWidget::slotSetVolume(int vol) if (!isXineReady()) return; if (m_softwareMixer) { - //debugOut(QString("Set software amplification level: %1").arg(vol)); + //debugOut(TQString("Set software amplification level: %1").tqarg(vol)); if (m_volumeGain) xine_set_param(m_xineStream, XINE_PARAM_AUDIO_AMP_LEVEL, vol*2); else @@ -2668,10 +2668,10 @@ void KXineWidget::slotSetVolume(int vol) } else { - //debugOut(QString("Set audio mixer volume: %1").arg(vol)); + //debugOut(TQString("Set audio mixer volume: %1").tqarg(vol)); xine_set_param(m_xineStream, XINE_PARAM_AUDIO_VOLUME, vol); } - emit signalXineStatus(i18n("Volume") + ": " + QString::number(vol) +"%"); + emit signalXinetqStatus(i18n("Volume") + ": " + TQString::number(vol) +"%"); } uint KXineWidget::getVolume() const @@ -2707,12 +2707,12 @@ void KXineWidget::slotToggleMute() if (xine_get_param(m_xineStream, muteParam)) { xine_set_param(m_xineStream, muteParam, 0); /* mute off */ - emit signalXineStatus(i18n("Mute Off")); + emit signalXinetqStatus(i18n("Mute Off")); } else { xine_set_param(m_xineStream, muteParam, 1); /* mute on */ - emit signalXineStatus(i18n("Mute On")); + emit signalXinetqStatus(i18n("Mute On")); } } @@ -2724,13 +2724,13 @@ bool KXineWidget::SoftwareMixing() const return false; } -void KXineWidget::mouseMoveEvent(QMouseEvent* mev) +void KXineWidget::mouseMoveEvent(TQMouseEvent* mev) { if (!m_xineReady) return; - if (cursor().shape() == Qt::BlankCursor) + if (cursor().shape() == TQt::BlankCursor) { - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(TQt::ArrowCursor)); } x11_rectangle_t rect; @@ -2755,7 +2755,7 @@ void KXineWidget::mouseMoveEvent(QMouseEvent* mev) } -void KXineWidget::mousePressEvent(QMouseEvent* mev) +void KXineWidget::mousePressEvent(TQMouseEvent* mev) { if (!m_xineReady) return; int cur = cursor().shape(); @@ -2769,7 +2769,7 @@ void KXineWidget::mousePressEvent(QMouseEvent* mev) if (mev->button() == Qt::RightButton) { - if ( (cur == Qt::ArrowCursor) || (cur == Qt::BlankCursor) ) + if ( (cur == TQt::ArrowCursor) || (cur == TQt::BlankCursor) ) { emit signalRightClick(mev->globalPos()); mev->accept(); @@ -2779,7 +2779,7 @@ void KXineWidget::mousePressEvent(QMouseEvent* mev) if (mev->button() == Qt::LeftButton) { - if ( (cur == Qt::ArrowCursor) || (cur == Qt::BlankCursor) ) + if ( (cur == TQt::ArrowCursor) || (cur == TQt::BlankCursor) ) { emit signalLeftClick(mev->globalPos()); mev->ignore(); @@ -2804,23 +2804,23 @@ void KXineWidget::mousePressEvent(QMouseEvent* mev) input.x = rect.x; input.y = rect.y; xine_event_send (m_xineStream, &event); - mev->accept(); /* don't send event to parent */ + mev->accept(); /* don't send event to tqparent */ } } -void KXineWidget::mouseDoubleClickEvent(QMouseEvent* mev) +void KXineWidget::mouseDoubleClickEvent(TQMouseEvent* mev) { emit signalDoubleClick(); mev->ignore(); } -void KXineWidget::wheelEvent(QWheelEvent* e) +void KXineWidget::wheelEvent(TQWheelEvent* e) { int oldVal = getPosition(); if (oldVal == 0) // no valid position return; - float offset = log10( QABS(e->delta()) ) / 0.002; + float offset = log10( TQABS(e->delta()) ) / 0.002; int newVal = 0; if (e->delta()>0) newVal = oldVal - int(offset); @@ -2857,77 +2857,77 @@ void KXineWidget::slotStop() { m_posTimer.stop(); if ( m_lengthInfoTimer.isActive() ) m_lengthInfoTimer.stop(); - //emit signalNewPosition(0, QTime()); + //emit signalNewPosition(0, TQTime()); if ((m_logoFile.isNull()) && (isPlaying())) xine_stop(m_xineStream); else { appendToQueue(m_logoFile); - QTimer::singleShot(0, this, SLOT(slotPlay())); + TQTimer::singleShot(0, this, TQT_SLOT(slotPlay())); } - emit signalXineStatus(i18n("Stop")); + emit signalXinetqStatus(i18n("Stop")); } -void KXineWidget::slotSetAudiocdDevice(const QString& device) +void KXineWidget::slotSetAudiocdDevice(const TQString& device) { - debugOut(QString("Set AudioCD device to %1").arg(device)); + debugOut(TQString("Set AudioCD device to %1").tqarg(device)); xine_cfg_entry_t config; xine_config_lookup_entry(m_xineEngine, "input.cdda_device", &config); if (m_cachedCDPath.isNull()) m_cachedCDPath = config.str_value; - config.str_value = QFile::encodeName(device).data(); + config.str_value = TQFile::encodeName(device).data(); xine_config_update_entry (m_xineEngine, &config); } -void KXineWidget::slotSetVcdDevice(const QString& device) +void KXineWidget::slotSetVcdDevice(const TQString& device) { - debugOut(QString("Set VCD device to %1").arg(device)); + debugOut(TQString("Set VCD device to %1").tqarg(device)); xine_cfg_entry_t config; xine_config_lookup_entry(m_xineEngine, "input.vcd_device", &config); if (m_cachedVCDPath.isNull()) m_cachedVCDPath = config.str_value; - config.str_value = QFile::encodeName(device).data(); + config.str_value = TQFile::encodeName(device).data(); xine_config_update_entry (m_xineEngine, &config); } -void KXineWidget::slotSetDvdDevice(const QString& device) +void KXineWidget::slotSetDvdDevice(const TQString& device) { - debugOut(QString("Set DVD device to %1").arg(device)); + debugOut(TQString("Set DVD device to %1").tqarg(device)); xine_cfg_entry_t config; xine_config_lookup_entry(m_xineEngine, "input.dvd_device", &config); if (m_cachedDVDPath.isNull()) m_cachedDVDPath = config.str_value; - config.str_value = QFile::encodeName(device).data(); + config.str_value = TQFile::encodeName(device).data(); xine_config_update_entry (m_xineEngine, &config); } -QString KXineWidget::audiocdDevice() const +TQString KXineWidget::audiocdDevice() const { xine_cfg_entry_t config; xine_config_lookup_entry(m_xineEngine, "input.cdda_device", &config); - return QFile::decodeName(config.str_value); + return TQFile::decodeName(config.str_value); } -QString KXineWidget::vcdDevice() const +TQString KXineWidget::vcdDevice() const { xine_cfg_entry_t config; xine_config_lookup_entry(m_xineEngine, "input.vcd_device", &config); - return QFile::decodeName(config.str_value); + return TQFile::decodeName(config.str_value); } -QString KXineWidget::dvdDevice() const +TQString KXineWidget::dvdDevice() const { xine_cfg_entry_t config; xine_config_lookup_entry(m_xineEngine, "input.dvd_device", &config); - return QFile::decodeName(config.str_value); + return TQFile::decodeName(config.str_value); } uint KXineWidget::currentDVDTitleNumber() const @@ -2960,29 +2960,29 @@ uint KXineWidget::getDVDAngleCount() const return xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_DVD_ANGLE_COUNT); } -void KXineWidget::setStreamSaveDir(const QString& dir) +void KXineWidget::setStreamSaveDir(const TQString& dir) { xine_cfg_entry_t config; if (!xine_config_lookup_entry(m_xineEngine, "misc.save_dir", &config)) return; /* older xine-lib */ - debugOut(QString("Set misc.save_dir to: %1").arg(dir)); - config.str_value = QFile::encodeName(dir).data(); + debugOut(TQString("Set misc.save_dir to: %1").tqarg(dir)); + config.str_value = TQFile::encodeName(dir).data(); xine_config_update_entry (m_xineEngine, &config); } -const QString KXineWidget::getStreamSaveDir() +const TQString KXineWidget::getStreamSaveDir() { xine_cfg_entry_t config; - if (!xine_config_lookup_entry(m_xineEngine, "misc.save_dir", &config)) return QString::null; /* older xine-lib */ + if (!xine_config_lookup_entry(m_xineEngine, "misc.save_dir", &config)) return TQString(); /* older xine-lib */ - return QFile::decodeName(config.str_value); + return TQFile::decodeName(config.str_value); } void KXineWidget::setBroadcasterPort(const uint port) { - debugOut(QString("Set broadcaster port to %1").arg(port)); + debugOut(TQString("Set broadcaster port to %1").tqarg(port)); xine_set_param(m_xineStream, XINE_PARAM_BROADCASTER_PORT, port); } @@ -2997,7 +2997,7 @@ void KXineWidget::slotSpeedPause() xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE); m_posTimer.stop(); if (m_currentSpeed != Undefined) - emit signalXineStatus(i18n("Pause")); + emit signalXinetqStatus(i18n("Pause")); m_currentSpeed = Pause; } } @@ -3007,7 +3007,7 @@ void KXineWidget::slotSpeedNormal() xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); m_posTimer.start(200); m_currentSpeed = Normal; - emit signalXineStatus(i18n("Playing") + " "); + emit signalXinetqStatus(i18n("Playing") + " "); } void KXineWidget::slotSpeedFaster() @@ -3018,7 +3018,7 @@ void KXineWidget::slotSpeedFaster() { xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_FAST_4); m_currentSpeed = Fast2; - emit signalXineStatus(i18n("Fast Forward %1").arg("x2")); + emit signalXinetqStatus(i18n("Fast Forward %1").tqarg("x2")); break; } case Fast2: @@ -3035,14 +3035,14 @@ void KXineWidget::slotSpeedFaster() { xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_SLOW_2); m_currentSpeed = Slow1; - emit signalXineStatus(i18n("Slow Motion %1").arg("x1")); + emit signalXinetqStatus(i18n("Slow Motion %1").tqarg("x1")); break; } default: { xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_FAST_2); m_currentSpeed = Fast1; - emit signalXineStatus(i18n("Fast Forward %1").arg("x1")); + emit signalXinetqStatus(i18n("Fast Forward %1").tqarg("x1")); break; } } @@ -3056,7 +3056,7 @@ void KXineWidget::slotSpeedSlower() { xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_SLOW_4); m_currentSpeed = Slow2; - emit signalXineStatus(i18n("Slow Motion %1").arg("x2")); + emit signalXinetqStatus(i18n("Slow Motion %1").tqarg("x2")); break; } case Slow2: @@ -3073,39 +3073,39 @@ void KXineWidget::slotSpeedSlower() { xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_FAST_2); m_currentSpeed = Fast1; - emit signalXineStatus(i18n("Fast Forward %1").arg("x1")); + emit signalXinetqStatus(i18n("Fast Forward %1").tqarg("x1")); break; } default: { xine_set_param(m_xineStream, XINE_PARAM_SPEED, XINE_SPEED_SLOW_2); m_currentSpeed = Slow1; - emit signalXineStatus(i18n("Slow Motion %1").arg("x1")); + emit signalXinetqStatus(i18n("Slow Motion %1").tqarg("x1")); break; } } } -QString KXineWidget::getSupportedExtensions() const +TQString KXineWidget::getSupportedExtensions() const { return xine_get_file_extensions(m_xineEngine); } void KXineWidget::slotSetAudioChannel(int ch) { - debugOut(QString("Switch to audio channel %1").arg(ch-1)); + debugOut(TQString("Switch to audio channel %1").tqarg(ch-1)); xine_set_param(m_xineStream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, ch-1); } void KXineWidget::slotSetSubtitleChannel(int ch) { - debugOut(QString("Switch to subtitle channel %1").arg(ch-1)); + debugOut(TQString("Switch to subtitle channel %1").tqarg(ch-1)); xine_set_param(m_xineStream, XINE_PARAM_SPU_CHANNEL, ch-1); } -void KXineWidget::slotSetFileSubtitles(QString url) +void KXineWidget::slotSetFileSubtitles(TQString url) { int pos; int time; @@ -3152,9 +3152,9 @@ uint KXineWidget::getPosition() const return (uint)pos; } -QTime KXineWidget::getPlaytime() const +TQTime KXineWidget::getPlaytime() const { - if (!m_xineReady) return QTime(); + if (!m_xineReady) return TQTime(); int pos, time, length; @@ -3165,7 +3165,7 @@ QTime KXineWidget::getPlaytime() const if ( ret == 0 ) { debugOut("No valid stream position information"); - return QTime(); + return TQTime(); } return msToTime(time); @@ -3237,7 +3237,7 @@ void KXineWidget::slotSeekToPosition(int pos) start(); } -void KXineWidget::slotSeekToTime(const QTime& postime) +void KXineWidget::slotSeekToTime(const TQTime& postime) { if ( running() ) return; @@ -3249,7 +3249,7 @@ void KXineWidget::slotSeekToTime(const QTime& postime) if (m_currentSpeed == Pause) seekThreadPause = true; seekThreadPos = 0; - seekThreadTime = QTime().msecsTo(postime); + seekThreadTime = TQTime().msecsTo(postime); start(); } @@ -3278,10 +3278,10 @@ void KXineWidget::slotEnableAutoresize(bool enable) * tvtime deinterlacer plugin * ***************************************/ -#ifndef USE_QT_ONLY -void KXineWidget::createDeinterlacePlugin(const QString& config, QWidget* parent) +#ifndef USE_TQT_ONLY +void KXineWidget::createDeinterlacePlugin(const TQString& config, TQWidget* tqparent) { - m_deinterlaceFilter = new PostFilter(config.section(':',0,0), m_xineEngine, m_audioDriver, m_videoDriver, parent); + m_deinterlaceFilter = new PostFilter(config.section(':',0,0), m_xineEngine, m_audioDriver, m_videoDriver, tqparent); if( !m_deinterlaceFilter->getInput() || !m_deinterlaceFilter->getOutput() ) { delete m_deinterlaceFilter; @@ -3291,7 +3291,7 @@ void KXineWidget::createDeinterlacePlugin(const QString& config, QWidget* parent slotSetDeinterlaceConfig(config); } -const QString KXineWidget::getDeinterlaceConfig() const +const TQString KXineWidget::getDeinterlaceConfig() const { if (m_deinterlaceFilter) return m_deinterlaceFilter->getConfig(); @@ -3300,25 +3300,25 @@ const QString KXineWidget::getDeinterlaceConfig() const } #endif -void KXineWidget::slotSetDeinterlaceConfig(const QString& config) +void KXineWidget::slotSetDeinterlaceConfig(const TQString& config) { -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY if (m_deinterlaceFilter) m_deinterlaceFilter->setConfig(config); #else - warningOut(QString ("Not implemented [SetDeinterlaceConfig %1]").arg(config)); + warningOut(TQString ("Not implemented [SetDeinterlaceConfig %1]").tqarg(config)); #endif } void KXineWidget::slotToggleDeinterlace() { -#ifndef USE_QT_ONLY - QString s; +#ifndef USE_TQT_ONLY + TQString s; if (m_deinterlaceFilter) { m_deinterlaceEnabled = !m_deinterlaceEnabled; - debugOut(QString("Deinterlace enabled: %1").arg(m_deinterlaceEnabled)); + debugOut(TQString("Deinterlace enabled: %1").tqarg(m_deinterlaceEnabled)); if ( m_deinterlaceEnabled ) s = i18n("Deinterlace: on"); else s = i18n("Deinterlace: off"); showOSDMessage( s, 2000 ); @@ -3343,31 +3343,31 @@ void KXineWidget::slotToggleDeinterlace() void KXineWidget::slotAspectRatioAuto() { xine_set_param(m_xineStream, XINE_PARAM_VO_ASPECT_RATIO, XINE_VO_ASPECT_AUTO); - emit signalXineStatus(i18n("Aspect Ratio") + ": " + i18n("Auto")); + emit signalXinetqStatus(i18n("Aspect Ratio") + ": " + i18n("Auto")); } void KXineWidget::slotAspectRatio4_3() { xine_set_param(m_xineStream, XINE_PARAM_VO_ASPECT_RATIO, XINE_VO_ASPECT_4_3); - emit signalXineStatus(i18n("Aspect Ratio") + ": " + i18n("4:3")); + emit signalXinetqStatus(i18n("Aspect Ratio") + ": " + i18n("4:3")); } void KXineWidget::slotAspectRatioAnamorphic() { xine_set_param(m_xineStream, XINE_PARAM_VO_ASPECT_RATIO, XINE_VO_ASPECT_ANAMORPHIC); - emit signalXineStatus(i18n("Aspect Ratio") + ": " + i18n("16:9")); + emit signalXinetqStatus(i18n("Aspect Ratio") + ": " + i18n("16:9")); } void KXineWidget::slotAspectRatioSquare() { xine_set_param(m_xineStream, XINE_PARAM_VO_ASPECT_RATIO, XINE_VO_ASPECT_SQUARE); - emit signalXineStatus(i18n("Aspect Ratio") + ": " + i18n("1:1")); + emit signalXinetqStatus(i18n("Aspect Ratio") + ": " + i18n("1:1")); } void KXineWidget::slotAspectRatioDVB() { xine_set_param(m_xineStream, XINE_PARAM_VO_ASPECT_RATIO, XINE_VO_ASPECT_DVB); - emit signalXineStatus(i18n("Aspect Ratio") + ": " + i18n("2.11:1")); + emit signalXinetqStatus(i18n("Aspect Ratio") + ": " + i18n("2.11:1")); } void KXineWidget::slotZoomOutX() @@ -3376,7 +3376,7 @@ void KXineWidget::slotZoomOutX() { m_currentZoomX -= 5; xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_X, m_currentZoomX); - emit signalXineStatus(i18n("Zoom X") + ": " + QString::number(m_currentZoomX) + "%"); + emit signalXinetqStatus(i18n("Zoom X") + ": " + TQString::number(m_currentZoomX) + "%"); } } @@ -3386,7 +3386,7 @@ void KXineWidget::slotZoomInX() { m_currentZoomX += 5; xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_X, m_currentZoomX); - emit signalXineStatus(i18n("Zoom X") + ": " + QString::number(m_currentZoomX) + "%"); + emit signalXinetqStatus(i18n("Zoom X") + ": " + TQString::number(m_currentZoomX) + "%"); } } @@ -3396,7 +3396,7 @@ void KXineWidget::slotZoomOutY() { m_currentZoomY -= 5; xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_Y, m_currentZoomY); - emit signalXineStatus(i18n("Zoom Y") + ": " + QString::number(m_currentZoomY) + "%"); + emit signalXinetqStatus(i18n("Zoom Y") + ": " + TQString::number(m_currentZoomY) + "%"); } } @@ -3406,7 +3406,7 @@ void KXineWidget::slotZoomInY() { m_currentZoomY += 5; xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_Y, m_currentZoomY); - emit signalXineStatus(i18n("Zoom Y") + ": " + QString::number(m_currentZoomY) + "%"); + emit signalXinetqStatus(i18n("Zoom Y") + ": " + TQString::number(m_currentZoomY) + "%"); } } @@ -3418,7 +3418,7 @@ void KXineWidget::slotZoomOut() m_currentZoomX = m_currentZoomY = m_currentZoom; xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_X, m_currentZoom); xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_Y, m_currentZoom); - emit signalXineStatus(i18n("Zoom") + ": " + QString::number(m_currentZoom) + "%"); + emit signalXinetqStatus(i18n("Zoom") + ": " + TQString::number(m_currentZoom) + "%"); } } @@ -3430,7 +3430,7 @@ void KXineWidget::slotZoomIn() m_currentZoomX = m_currentZoomY = m_currentZoom; xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_X, m_currentZoom); xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_Y, m_currentZoom); - emit signalXineStatus(i18n("Zoom") + ": " + QString::number(m_currentZoom) + "%"); + emit signalXinetqStatus(i18n("Zoom") + ": " + TQString::number(m_currentZoom) + "%"); } } @@ -3440,10 +3440,10 @@ void KXineWidget::slotZoomOff() xine_set_param(m_xineStream, XINE_PARAM_VO_ZOOM_Y, 100); m_currentZoom = 100; m_currentZoomX = m_currentZoomY = m_currentZoom; - emit signalXineStatus(i18n("Zoom") + ": " + QString::number(m_currentZoom) + "%"); + emit signalXinetqStatus(i18n("Zoom") + ": " + TQString::number(m_currentZoom) + "%"); } -QTime KXineWidget::getLengthInfo() +TQTime KXineWidget::getLengthInfo() { int pos, time, length; @@ -3456,12 +3456,12 @@ QTime KXineWidget::getLengthInfo() return msToTime(length); } - return QTime(); + return TQTime(); } void KXineWidget::slotEmitLengthInfo() { - QTime length = getLengthInfo(); + TQTime length = getLengthInfo(); if (!(length.isNull())) { if ( m_trackURL!="DVB" ) m_lengthInfoTimer.stop(); @@ -3482,7 +3482,7 @@ void KXineWidget::slotEmitLengthInfo() void KXineWidget::globalPosChanged() { - QPoint g = mapToGlobal(QPoint(0,0)); + TQPoint g = mapToGlobal(TQPoint(0,0)); m_globalX = g.x(); m_globalY = g.y(); } @@ -3513,37 +3513,37 @@ void KXineWidget::getspuOffset(int& spuOffset) const void KXineWidget::slotSetHue(int hue) { xine_set_param(m_xineStream, XINE_PARAM_VO_HUE, hue); - emit signalXineStatus(i18n("Hue") + ": " + QString::number((hue*100)/65535) + "%"); + emit signalXinetqStatus(i18n("Hue") + ": " + TQString::number((hue*100)/65535) + "%"); } void KXineWidget::slotSetSaturation(int sat) { xine_set_param(m_xineStream, XINE_PARAM_VO_SATURATION, sat); - emit signalXineStatus(i18n("Saturation") + ": " + QString::number((sat*100)/65535) + "%"); + emit signalXinetqStatus(i18n("Saturation") + ": " + TQString::number((sat*100)/65535) + "%"); } void KXineWidget::slotSetContrast(int contrast) { xine_set_param(m_xineStream, XINE_PARAM_VO_CONTRAST, contrast); - emit signalXineStatus(i18n("Contrast") + ": " + QString::number((contrast*100)/65535) + "%"); + emit signalXinetqStatus(i18n("Contrast") + ": " + TQString::number((contrast*100)/65535) + "%"); } void KXineWidget::slotSetBrightness(int bright) { xine_set_param(m_xineStream, XINE_PARAM_VO_BRIGHTNESS, bright); - emit signalXineStatus(i18n("Brightness") + ": " + QString::number((bright*100)/65535) + "%"); + emit signalXinetqStatus(i18n("Brightness") + ": " + TQString::number((bright*100)/65535) + "%"); } void KXineWidget::slotSetAVOffset(int av) { xine_set_param(m_xineStream, XINE_PARAM_AV_OFFSET, av); - emit signalXineStatus(i18n("Audio/Video Offset") + ": " + QString::number(av/90) + i18n("msec")); + emit signalXinetqStatus(i18n("Audio/Video Offset") + ": " + TQString::number(av/90) + i18n("msec")); } void KXineWidget::slotSetSpuOffset(int spu) { xine_set_param(m_xineStream, XINE_PARAM_SPU_OFFSET, spu); - emit signalXineStatus(i18n("Subtitle Offset") + ": " + QString::number(spu/90) + i18n("msec")); + emit signalXinetqStatus(i18n("Subtitle Offset") + ": " + TQString::number(spu/90) + i18n("msec")); } @@ -3759,9 +3759,9 @@ void KXineWidget::stopMouseHideTimer() void KXineWidget::slotHideMouse() { - if (cursor().shape() == Qt::ArrowCursor) + if (cursor().shape() == TQt::ArrowCursor) { - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(TQt::BlankCursor)); } } @@ -3770,7 +3770,7 @@ void KXineWidget::slotHideMouse() * Take a Screenshot * ************************************************************/ -QImage KXineWidget::getScreenshot() const +TQImage KXineWidget::getScreenshot() const { uchar *rgbPile = NULL; int width, height; @@ -3778,15 +3778,15 @@ QImage KXineWidget::getScreenshot() const getScreenshot(rgbPile, width, height, scaleFactor); - if (!rgbPile) return QImage(); + if (!rgbPile) return TQImage(); - QImage screenShot(rgbPile, width, height, 32, 0, 0, QImage::IgnoreEndian); + TQImage screenShot(rgbPile, width, height, 32, 0, 0, TQImage::IgnoreEndian); if (scaleFactor >= 1.0) width = (int)((double) width * scaleFactor + 0.5); else height = (int)((double) height / scaleFactor + 0.5); - debugOut(QString("Screenshot: scale picture from %1x%2 to %3x%4").arg(screenShot.width()).arg(screenShot.height()).arg(width).arg(height)); + debugOut(TQString("Screenshot: scale picture from %1x%2 to %3x%4").tqarg(screenShot.width()).tqarg(screenShot.height()).tqarg(width).tqarg(height)); screenShot = screenShot.smoothScale(width, height); delete []rgbPile; @@ -3849,7 +3849,7 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide break; default: { - warningOut(QString("Screenshot: Format %1 not supportet!").arg((char*)&format)); + warningOut(TQString("Screenshot: Format %1 not supportet!").tqarg((char*)&format)); delete [] yuv; return; } @@ -3880,15 +3880,15 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide desired_ratio = 4.0 / 3.0; break; default: - warningOut(QString("Screenshot: Unknown aspect ratio: %1 - using 4:3").arg(ratio)); - case XINE_VO_ASPECT_SQUARE: + warningOut(TQString("Screenshot: Unknown aspect ratio: %1 - using 4:3").tqarg(ratio)); + case XINE_VO_ASPECT_STQUARE: debugOut("Screenshot: got video aspect: 1:1"); desired_ratio = image_ratio; break; } */ - debugOut(QString("Screenshot: using scale factor: %1").arg(m_videoAspect)); + debugOut(TQString("Screenshot: using scale factor: %1").tqarg(m_videoAspect)); scaleFactor = m_videoAspect; delete [] yuv; @@ -3899,42 +3899,42 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide * HELPER FUNCTIONS * ************************************************/ -QTime KXineWidget::msToTime(int msec) +TQTime KXineWidget::msToTime(int msec) { - QTime t; + TQTime t; t = t.addMSecs(msec); return t; } -#ifdef USE_QT_ONLY -QString KXineWidget::i18n(const char *text) +#ifdef USE_TQT_ONLY +TQString KXineWidget::i18n(const char *text) { - return QApplication::tr(text); + return TQApplication::tr(text); } #endif -void KXineWidget::debugOut (QString qsDebug) +void KXineWidget::debugOut (TQString qsDebug) { -#ifdef USE_QT_ONLY - QString qsDebugging = QString ("Debug: ") + qsDebug +"\n"; +#ifdef USE_TQT_ONLY + TQString qsDebugging = TQString ("Debug: ") + qsDebug +"\n"; printf ((const char *)qsDebugging); #else kdDebug() << "KXineWidget: " << (const char *)qsDebug.ascii() << "\n"; #endif } -void KXineWidget::errorOut (QString qsError) +void KXineWidget::errorOut (TQString qsError) { -#ifdef USE_QT_ONLY - QString qsErroring = QString ("Error: ") + qsError+ "\n"; +#ifdef USE_TQT_ONLY + TQString qsErroring = TQString ("Error: ") + qsError+ "\n"; printf ((const char *)qsErroring); #else kdError() << "KXineWidget: " << (const char *)qsError.ascii() << "\n"; #endif } -void KXineWidget::warningOut (QString qsWarning) +void KXineWidget::warningOut (TQString qsWarning) { -#ifdef USE_QT_ONLY - QString qsWarninging = QString ("Warning: ") + qsWarning + "\n"; +#ifdef USE_TQT_ONLY + TQString qsWarninging = TQString ("Warning: ") + qsWarning + "\n"; printf ((const char *)qsWarninging); #else kdWarning() << "KXineWidget: " << (const char *)qsWarning.ascii() << "\n"; @@ -4068,7 +4068,7 @@ uchar* KXineWidget::yv12ToRgb (uint8_t *src_y, uint8_t *src_u, uint8_t *src_v, i clip_8_bit (g); clip_8_bit (b); -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN +#if Q_BYTE_ORDER == TQ_LITTLE_ENDIAN rgb[(i * width + j) * 4 + 0] = b; rgb[(i * width + j) * 4 + 1] = g; rgb[(i * width + j) * 4 + 2] = r; diff --git a/kaffeine/src/player-parts/xine-part/kxinewidget.h b/kaffeine/src/player-parts/xine-part/kxinewidget.h index 91f3ebc..3456902 100644 --- a/kaffeine/src/player-parts/xine-part/kxinewidget.h +++ b/kaffeine/src/player-parts/xine-part/kxinewidget.h @@ -23,14 +23,14 @@ #define KXINEWIDGET_H /* define this if you want to use QT only - disables post plugin support (except visualization)! */ -//#define USE_QT_ONLY 1 +//#define USE_TQT_ONLY 1 /* Usage: * - * KXineWidget m_xine = new KXineWidget(parent); + * KXineWidget m_xine = new KXineWidget(tqparent); * m_xine->appendToQueue("the_best_song_of_the_world.mp3"); * - * You should at least connect to signalXineFatal(const QString&)! + * You should at least connect to signalXineFatal(const TQString&)! * */ @@ -39,21 +39,21 @@ #endif /* forward declaration */ -class QWidget; -class QString; -class QStringList; -class QMouseEvent; -class QTimerEvent; -class QTime; - -#include <qtimer.h> -#include <qptrlist.h> -#include <qthread.h> +class TQWidget; +class TQString; +class TQStringList; +class TQMouseEvent; +class TQTimerEvent; +class TQTime; + +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqthread.h> #include <X11/Xlib.h> #include <xine.h> -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY #include "postfilter.h" #else typedef int PostFilter; /* dummy type */ @@ -72,15 +72,16 @@ typedef int PostFilter; /* dummy type */ #define OSD_MESSAGE_LOW_PRIORITY 1 #define OSD_MESSAGE_NORMAL_PRIORITY 2 -class KXineWidget : public QWidget, public QThread +class KXineWidget : public TQWidget, public TQThread { Q_OBJECT + TQ_OBJECT public: - KXineWidget(QWidget *parent=0, const char *name=0, - const QString& pathToConfigFile = QString::null, const QString& pathToLogoFile = QString::null, - const QString& audioDriver = QString::null, const QString& videoDriver = QString::null, + KXineWidget(TQWidget *tqparent=0, const char *name=0, + const TQString& pathToConfigFile = TQString(), const TQString& pathToLogoFile = TQString(), + const TQString& audioDriver = TQString(), const TQString& videoDriver = TQString(), bool startManual = false, bool verbose = false); ~KXineWidget(); @@ -90,34 +91,34 @@ public: bool isXineReady() const { return m_xineReady; } bool isPlaying() const; Speed getSpeed() const { return m_currentSpeed; } - QString getXineLog() const; + TQString getXineLog() const; - void setQueue(const QStringList& urls) { m_queue = urls; } - void appendToQueue(const QString& url) { m_queue.append(url); } /* file to play; call slotPlay() to play queue... */ + void setQueue(const TQStringList& urls) { m_queue = urls; } + void appendToQueue(const TQString& url) { m_queue.append(url); } /* file to play; call slotPlay() to play queue... */ void clearQueue() { m_queue.clear(); } bool isQueueEmpty() const { return m_queue.empty(); } - void showOSDMessage(const QString& message, uint duration = DEFAULT_OSD_DURATION /* ms */, int priority = OSD_MESSAGE_NORMAL_PRIORITY); + void showOSDMessage(const TQString& message, uint duration = DEFAULT_OSD_DURATION /* ms */, int priority = OSD_MESSAGE_NORMAL_PRIORITY); /* stream info */ - const QString& getURL() const { return m_trackURL; } - const QString& getTitle() const { return m_trackTitle; } - const QString& getArtist() const { return m_trackArtist; } - const QString& getAlbum() const { return m_trackAlbum; } - const QString& getTrackNumber() const { return m_trackNumber; } //may return an empty string with xine-lib 1.0 - const QString& getGenre() const { return m_trackGenre; } - const QString& getYear() const { return m_trackYear; } - const QString& getComment() const { return m_trackComment; } - const QTime& getLength() const { return m_trackLength; } - const QString& getVideoCodec() const { return m_trackVideoCodec; } - QSize getVideoSize() const { return QSize(m_videoFrameWidth, m_videoFrameHeight); } + const TQString& getURL() const { return m_trackURL; } + const TQString& getTitle() const { return m_trackTitle; } + const TQString& getArtist() const { return m_trackArtist; } + const TQString& getAlbum() const { return m_trackAlbum; } + const TQString& getTrackNumber() const { return m_trackNumber; } //may return an empty string with xine-lib 1.0 + const TQString& getGenre() const { return m_trackGenre; } + const TQString& getYear() const { return m_trackYear; } + const TQString& getComment() const { return m_trackComment; } + const TQTime& getLength() const { return m_trackLength; } + const TQString& getVideoCodec() const { return m_trackVideoCodec; } + TQSize getVideoSize() const { return TQSize(m_videoFrameWidth, m_videoFrameHeight); } int getVideoWidth(); int getVideoHeight(); uint getVideoBitrate() const { return m_trackVideoBitrate; } - const QString& getAudioCodec() const { return m_trackAudioCodec; } + const TQString& getAudioCodec() const { return m_trackAudioCodec; } uint getAudioBitrate() const { return m_trackAudioBitrate; } - const QString& getSubtitleURL() const { return m_trackSubtitleURL; } - const QString& getSaveURL() const { return m_trackSaveURL; } + const TQString& getSubtitleURL() const { return m_trackSubtitleURL; } + const TQString& getSaveURL() const { return m_trackSaveURL; } bool hasVideo() const { return m_trackHasVideo; } bool hasAudio() const { return m_trackHasAudio; } bool hasChapters() const { return m_trackHasChapters; } @@ -127,43 +128,43 @@ public: uint getVolume() const; /* percent */ bool SoftwareMixing() const; - QTime getPlaytime() const; + TQTime getPlaytime() const; uint getPosition() const; /* 0..65535 */ void savePosition(const int pos) { (pos > 0) ? m_savedPos = pos : m_savedPos = 0; } /* plugin handling */ - QStringList getAudioDrivers() const { return m_audioDriverList; } - QStringList getVideoDrivers() const { return m_videoDriverList; } - void getAutoplayPlugins(QStringList& pluginNames) const; - bool getAutoplayPluginURLS(const QString& name, QStringList& urls); - QStringList getVisualPlugins() const; - -#ifndef USE_QT_ONLY - void createDeinterlacePlugin(const QString& configString, QWidget* parent); - const QString getDeinterlaceConfig() const; - QStringList getVideoFilterNames() const; - QStringList getAudioFilterNames() const; - QStringList getAudioFilterConfig(); - QStringList getVideoFilterConfig(); + TQStringList getAudioDrivers() const { return m_audioDriverList; } + TQStringList getVideoDrivers() const { return m_videoDriverList; } + void getAutoplayPlugins(TQStringList& pluginNames) const; + bool getAutoplayPluginURLS(const TQString& name, TQStringList& urls); + TQStringList getVisualPlugins() const; + +#ifndef USE_TQT_ONLY + void createDeinterlacePlugin(const TQString& configString, TQWidget* tqparent); + const TQString getDeinterlaceConfig() const; + TQStringList getVideoFilterNames() const; + TQStringList getAudioFilterNames() const; + TQStringList getAudioFilterConfig(); + TQStringList getVideoFilterConfig(); #endif - QString getSupportedExtensions() const; /* get mime types xine can play */ + TQString getSupportedExtensions() const; /* get mime types xine can play */ void playNextChapter() const; void playPreviousChapter() const; /* config stuff */ - void setStreamSaveDir(const QString& dir); - const QString getStreamSaveDir(); + void setStreamSaveDir(const TQString& dir); + const TQString getStreamSaveDir(); void setBroadcasterPort(const uint port); void getVideoSettings(int& hue, int& sat, int& contrast, int& bright, int& avOffset, int& spuOffset) const; void getspuOffset(int& spuOffset) const; /* disc drives devices*/ - QString audiocdDevice() const; - QString vcdDevice() const; - QString dvdDevice() const; + TQString audiocdDevice() const; + TQString vcdDevice() const; + TQString dvdDevice() const; /* dvd stuff */ uint currentDVDTitleNumber() const; @@ -174,7 +175,7 @@ public: uint getDVDAngleCount() const; /* take a screenshot */ - QImage getScreenshot() const; + TQImage getScreenshot() const; void getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& videoHeight, double& scaleFactor) const; /* get the xine engine, needed by the xine configuration dialog */ @@ -185,27 +186,27 @@ public: void startMouseHideTimer(); void stopMouseHideTimer(); - void globalPosChanged(); /* call this if global pos of parent was changed */ + void globalPosChanged(); /* call this if global pos of tqparent was changed */ signals: - void signalXineFatal(const QString& message); /** initXine() not successfull! **/ - void signalXineError(const QString& message); - void signalXineMessage(const QString& message); - void signalXineStatus(const QString& status); + void signalXineFatal(const TQString& message); /** initXine() not successfull! **/ + void signalXineError(const TQString& message); + void signalXineMessage(const TQString& message); + void signalXinetqStatus(const TQString& status); void signalXineReady(); void signalXinePlaying(); void signalHasChapters(bool); void signalPlaybackFinished(); - void signalNewChannels(const QStringList& audio, const QStringList& sub, int currentAudio, int currentSub); - void signalNewPosition(int, const QTime&); + void signalNewChannels(const TQStringList& audio, const TQStringList& sub, int currentAudio, int currentSub); + void signalNewPosition(int, const TQTime&); void signalTitleChanged(); void signalVideoSizeChanged(); void signalLengthChanged(); - void signalRightClick(const QPoint&); /* right-click on video window */ - void signalLeftClick(const QPoint&); + void signalRightClick(const TQPoint&); /* right-click on video window */ + void signalLeftClick(const TQPoint&); void signalMiddleClick(); void signalDoubleClick(); void signalSyncVolume(); @@ -224,14 +225,14 @@ public slots: void slotSpeedNormal(); void slotSpeedFaster(); void slotSpeedSlower(); - void slotSetVisualPlugin(const QString& name); + void slotSetVisualPlugin(const TQString& name); void slotSetAudioChannel(int); void slotSetSubtitleChannel(int); - void slotSetFileSubtitles(QString); + void slotSetFileSubtitles(TQString); void slotStartSeeking(); void slotSeekToPosition(int pos); void slotSeekToPositionBlocking(int pos); - void slotSeekToTime(const QTime&); + void slotSeekToTime(const TQTime&); void slotStopSeeking(); void slotEnableVideoFilters(bool enable); void slotEnableAudioFilters(bool enable); @@ -250,13 +251,13 @@ public slots: void slotZoomOutY(); void slotZoomInY(); void slotToggleDeinterlace(); - void slotSetDeinterlaceConfig(const QString&); + void slotSetDeinterlaceConfig(const TQString&); void slotGetInfoDelayed(); /* disc drive devices */ - void slotSetAudiocdDevice(const QString&); - void slotSetVcdDevice(const QString&); - void slotSetDvdDevice(const QString&); + void slotSetAudiocdDevice(const TQString&); + void slotSetVcdDevice(const TQString&); + void slotSetDvdDevice(const TQString&); void slotSetHue(int hue); void slotSetSaturation(int sat); @@ -292,8 +293,8 @@ public slots: void slotDVDMenuSelect(); /***** postprocess filters ****/ - void slotCreateVideoFilter(const QString& name, QWidget* parent); - void slotCreateAudioFilter(const QString& name, QWidget* parent); + void slotCreateVideoFilter(const TQString& name, TQWidget* tqparent); + void slotCreateAudioFilter(const TQString& name, TQWidget* tqparent); void slotDeleteVideoFilter(PostFilter* filter); void slotDeleteAudioFilter(PostFilter* filter); void slotRemoveAllVideoFilters(); @@ -307,11 +308,11 @@ protected slots: void slotNoRecentMessage(); protected: - void mouseMoveEvent(QMouseEvent*); - void mousePressEvent(QMouseEvent*); - void timerEvent(QTimerEvent*); - void mouseDoubleClickEvent(QMouseEvent*); - void wheelEvent(QWheelEvent*); + void mouseMoveEvent(TQMouseEvent*); + void mousePressEvent(TQMouseEvent*); + void timerEvent(TQTimerEvent*); + void mouseDoubleClickEvent(TQMouseEvent*); + void wheelEvent(TQWheelEvent*); void initOSD(); virtual void run(); @@ -319,7 +320,7 @@ private: #ifndef HAVE_XCB bool x11Event(XEvent *); #else - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); #endif /********* callbacks and threads ************/ @@ -343,8 +344,8 @@ private: protected: void sendXineError(); - QTime getLengthInfo(); -#ifndef USE_QT_ONLY + TQTime getLengthInfo(); +#ifndef USE_TQT_ONLY void wireVideoFilters(); void unwireVideoFilters(); void wireAudioFilters(); @@ -353,31 +354,31 @@ protected: /* HELPER FUNCTIONS */ public: -#ifdef USE_QT_ONLY - static QString i18n(const char *text); +#ifdef USE_TQT_ONLY + static TQString i18n(const char *text); #endif - static void debugOut(QString); - static void errorOut(QString); - static void warningOut(QString); - static QTime msToTime(int msec); + static void debugOut(TQString); + static void errorOut(TQString); + static void warningOut(TQString); + static TQTime msToTime(int msec); static void yuy2Toyv12(uint8_t *y, uint8_t *u, uint8_t *v, uint8_t *input, int width, int height); static uchar *yv12ToRgb(uint8_t *src_y, uint8_t *src_u, uint8_t *src_v, int width, int height); protected: - QStringList m_queue; + TQStringList m_queue; int seekThreadPos; int seekThreadTime; bool seekThreadPause; bool m_startXineManual; bool m_xineReady; - QString m_logoFile; - QString m_preferedAudio; - QString m_preferedVideo; + TQString m_logoFile; + TQString m_preferedAudio; + TQString m_preferedVideo; bool m_xineVerbose; - QString m_configFilePath; - QStringList m_audioDriverList; - QStringList m_videoDriverList; + TQString m_configFilePath; + TQStringList m_audioDriverList; + TQStringList m_videoDriverList; /*x11*/ #ifndef HAVE_XCB @@ -415,11 +416,11 @@ protected: char *xResInfo; char *yResInfo; -#ifndef USE_QT_ONLY +#ifndef USE_TQT_ONLY /*postfilter*/ - QPtrList<PostFilter> m_videoFilterList; + TQPtrList<PostFilter> m_videoFilterList; bool m_videoFiltersEnabled; - QPtrList<PostFilter> m_audioFilterList; + TQPtrList<PostFilter> m_audioFilterList; bool m_audioFiltersEnabled; PostFilter* m_deinterlaceFilter; bool m_deinterlaceEnabled; @@ -430,9 +431,9 @@ protected: xine_post_in_t* m_postInput; #endif - QString m_audioDriverName; - QString m_videoDriverName; - QString m_visualPluginName; + TQString m_audioDriverName; + TQString m_videoDriverName; + TQString m_visualPluginName; int m_videoFrameWidth; int m_videoFrameHeight; @@ -441,46 +442,46 @@ protected: int m_globalY; Speed m_currentSpeed; - QString m_xineMessage; - QString m_xineError; - QString m_statusString; + TQString m_xineMessage; + TQString m_xineError; + TQString m_statusString; bool m_softwareMixer; bool m_volumeGain; double m_displayRatio; - QString m_cachedCDPath, m_cachedVCDPath, m_cachedDVDPath; - QSize m_newParentSize; + TQString m_cachedCDPath, m_cachedVCDPath, m_cachedDVDPath; + TQSize m_newParentSize; int m_currentZoom; int m_currentZoomX, m_currentZoomY; - QStringList m_audioCh; - QStringList m_subCh; + TQStringList m_audioCh; + TQStringList m_subCh; int m_currentAudio, m_currentSub; int m_savedPos; bool m_autoresizeEnabled; bool m_DVDButtonEntered; - QString m_newMRLReference; + TQString m_newMRLReference; - QTimer m_posTimer; - QTimer m_lengthInfoTimer; + TQTimer m_posTimer; + TQTimer m_lengthInfoTimer; uint m_lengthInfoTries; - QTimer m_mouseHideTimer; - QTimer m_osdTimer; - QTimer m_recentMessagesTimer; - - QString m_trackURL; - QString m_trackTitle; - QString m_trackArtist; - QString m_trackAlbum; - QString m_trackNumber; - QString m_trackGenre; - QString m_trackYear; - QString m_trackComment; - QTime m_trackLength; - QString m_trackVideoCodec; + TQTimer m_mouseHideTimer; + TQTimer m_osdTimer; + TQTimer m_recentMessagesTimer; + + TQString m_trackURL; + TQString m_trackTitle; + TQString m_trackArtist; + TQString m_trackAlbum; + TQString m_trackNumber; + TQString m_trackGenre; + TQString m_trackYear; + TQString m_trackComment; + TQTime m_trackLength; + TQString m_trackVideoCodec; uint m_trackVideoBitrate; - QString m_trackAudioCodec; + TQString m_trackAudioCodec; uint m_trackAudioBitrate; - QString m_trackSubtitleURL; - QString m_trackSaveURL; + TQString m_trackSubtitleURL; + TQString m_trackSaveURL; bool m_trackHasVideo; bool m_trackHasAudio; bool m_trackHasChapters; @@ -491,11 +492,11 @@ signals: void stopDvb(); public: - QString TimeShiftFilename; + TQString TimeShiftFilename; public slots: - void setDvb( const QString &pipeName, const QString &chanName, int haveVideo ); - void setDvbCurrentNext( const QString &channelName, const QStringList &list ); + void setDvb( const TQString &pipeName, const TQString &chanName, int haveVideo ); + void setDvbCurrentNext( const TQString &channelName, const TQStringList &list ); bool openDvb(); bool playDvb(); void slotPlayTimeShift(); @@ -503,12 +504,12 @@ public slots: void dvbHideOSD(); private: - QString m_dvbChannelName; + TQString m_dvbChannelName; bool m_dvbSaveTitle; int dvbHaveVideo; - QTimer dvbOSDHideTimer; + TQTimer dvbOSDHideTimer; xine_osd_t *dvbOSD; - QStringList dvbCurrentNext; + TQStringList dvbCurrentNext; unsigned int dvbColor[256]; unsigned char dvbTrans[256]; void initDvbPalette(); diff --git a/kaffeine/src/player-parts/xine-part/positionslider.cpp b/kaffeine/src/player-parts/xine-part/positionslider.cpp index 9091dbe..ba61e65 100644 --- a/kaffeine/src/player-parts/xine-part/positionslider.cpp +++ b/kaffeine/src/player-parts/xine-part/positionslider.cpp @@ -26,11 +26,11 @@ #include "positionslider.moc" -PositionSlider::PositionSlider(Qt::Orientation o, QWidget *parent, const char* name) : - QSlider(o, parent, name), m_userChange(false) +PositionSlider::PositionSlider(Qt::Orientation o, TQWidget *tqparent, const char* name) : + TQSlider(o, tqparent, name), m_userChange(false) { - connect(this, SIGNAL(sliderPressed()), this ,SLOT(slotSliderPressed())); - connect(this, SIGNAL(sliderReleased()), this, SLOT(slotSliderReleased())); + connect(this, TQT_SIGNAL(sliderPressed()), this ,TQT_SLOT(slotSliderPressed())); + connect(this, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotSliderReleased())); installEventFilter(this); } @@ -71,9 +71,9 @@ void PositionSlider::slotSliderReleased() -void PositionSlider::wheelEvent(QWheelEvent* e) +void PositionSlider::wheelEvent(TQWheelEvent* e) { - float offset = log10( QABS(e->delta()) ) / 0.002; + float offset = log10( TQABS(e->delta()) ) / 0.002; int newVal = 0; if (e->delta()>0) newVal = value() - int(offset); @@ -87,21 +87,21 @@ void PositionSlider::wheelEvent(QWheelEvent* e) -bool PositionSlider::eventFilter(QObject *obj, QEvent *ev) +bool PositionSlider::eventFilter(TQObject *obj, TQEvent *ev) { - if( obj == this && (ev->type() == QEvent::MouseButtonPress || ev->type() == QEvent::MouseButtonDblClick) ) { - QMouseEvent *e = (QMouseEvent *)ev; - QRect r = sliderRect(); + if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) && (ev->type() == TQEvent::MouseButtonPress || ev->type() == TQEvent::MouseButtonDblClick) ) { + TQMouseEvent *e = (TQMouseEvent *)ev; + TQRect r = sliderRect(); - if( r.contains( e->pos() ) || e->button() != LeftButton ) + if( r.tqcontains( e->pos() ) || e->button() != Qt::LeftButton ) return false; int range = maxValue() - minValue(); - int pos = (orientation() == Horizontal) ? e->pos().x() : e->pos().y(); - int maxpos = (orientation() == Horizontal) ? width() : height(); + int pos = (orientation() ==Qt::Horizontal) ? e->pos().x() : e->pos().y(); + int maxpos = (orientation() ==Qt::Horizontal) ? width() : height(); int value = pos * range / maxpos + minValue(); - if (QApplication::reverseLayout()) + if (TQApplication::reverseLayout()) value = maxValue() - (value - minValue()); setPosition(value, true); diff --git a/kaffeine/src/player-parts/xine-part/positionslider.h b/kaffeine/src/player-parts/xine-part/positionslider.h index 34c78e6..654c716 100644 --- a/kaffeine/src/player-parts/xine-part/positionslider.h +++ b/kaffeine/src/player-parts/xine-part/positionslider.h @@ -23,14 +23,15 @@ #ifndef POSITIONSLIDER_H #define POSITIONSLIDER_H -#include <qslider.h> +#include <tqslider.h> -class PositionSlider : public QSlider +class PositionSlider : public TQSlider { Q_OBJECT + TQ_OBJECT public: - PositionSlider(Qt::Orientation, QWidget * parent = 0, const char* name = 0); + PositionSlider(Qt::Orientation, TQWidget * tqparent = 0, const char* name = 0); virtual ~PositionSlider(); void setPosition(int, bool); @@ -41,8 +42,8 @@ signals: void sliderLastMove(int); protected: - virtual void wheelEvent(QWheelEvent* e); - bool eventFilter(QObject *obj, QEvent *ev); + virtual void wheelEvent(TQWheelEvent* e); + bool eventFilter(TQObject *obj, TQEvent *ev); private slots: void slotSliderPressed(); diff --git a/kaffeine/src/player-parts/xine-part/postfilter.cpp b/kaffeine/src/player-parts/xine-part/postfilter.cpp index 32c898c..6895f29 100644 --- a/kaffeine/src/player-parts/xine-part/postfilter.cpp +++ b/kaffeine/src/player-parts/xine-part/postfilter.cpp @@ -24,20 +24,20 @@ #include <klocale.h> #include <kdebug.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qwidget.h> -#include <qobject.h> -#include <qstring.h> -#include <qgroupbox.h> -#include <qtextedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwidget.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqgroupbox.h> +#include <tqtextedit.h> #include <stdio.h> #include "postfilter.h" -PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* audioDriver, - xine_video_port_t* videoDriver, QWidget *parent) : QObject(parent), m_data(NULL), m_groupBox(NULL) +PostFilter::PostFilter(const TQString& name, xine_t* engine, xine_audio_port_t* audioDriver, + xine_video_port_t* videoDriver, TQWidget *tqparent) : TQObject(tqparent), m_data(NULL), m_groupBox(NULL) { m_filterName = name; kdDebug() << "PostFilter: Create Postprocessing Filter: " << m_filterName << endl; @@ -49,9 +49,9 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a { xine_post_in_t* inputAPI = NULL; - m_groupBox = new QGroupBox(name, parent); - m_groupBox->setSizePolicy(QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed)); - QGridLayout* grid = new QGridLayout(m_groupBox, 2, 2); + m_groupBox = new TQGroupBox(name, tqparent); + m_groupBox->tqsetSizePolicy(TQSizePolicy (TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + TQGridLayout* grid = new TQGridLayout(m_groupBox, 2, 2); grid->setMargin( 20 ); grid->setSpacing( 5 ); int row = 0; @@ -65,7 +65,7 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a m_data = new char[m_xinePostDescr->struct_size]; m_xinePostAPI->get_parameters(m_xinePost, m_data); - QLabel* descr; + TQLabel* descr; while (m_xinePostParameter->type != POST_PARAM_TYPE_LAST) { @@ -82,7 +82,7 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a PostFilterParameterCombo(m_xinePostParameter->name, m_xinePostParameter->offset, *(int*)(m_data+m_xinePostParameter->offset), m_xinePostParameter->enum_values, m_groupBox ); - connect(parameter, SIGNAL(signalIntValue(int, int)), this, SLOT(slotApplyIntValue(int, int))); + connect(parameter, TQT_SIGNAL(signalIntValue(int, int)), this, TQT_SLOT(slotApplyIntValue(int, int))); m_parameterList.append(parameter); grid->addWidget(parameter->getWidget(), row, 0); @@ -95,7 +95,7 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a (int)m_xinePostParameter->range_min, (int)m_xinePostParameter->range_max, m_groupBox); - connect(parameter, SIGNAL( signalIntValue(int, int)), this, SLOT( slotApplyIntValue(int, int))); + connect(parameter, TQT_SIGNAL( signalIntValue(int, int)), this, TQT_SLOT( slotApplyIntValue(int, int))); m_parameterList.append(parameter); grid->addWidget(parameter->getWidget(), row, 0); @@ -110,7 +110,7 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a (double)m_xinePostParameter->range_min, (double)m_xinePostParameter->range_max, m_groupBox); - connect(parameter, SIGNAL(signalDoubleValue(int, double)), this, SLOT(slotApplyDoubleValue(int, double))); + connect(parameter, TQT_SIGNAL(signalDoubleValue(int, double)), this, TQT_SLOT(slotApplyDoubleValue(int, double))); m_parameterList.append(parameter); grid->addWidget(parameter->getWidget(), row, 0); @@ -123,7 +123,7 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a (char*)(m_data+m_xinePostParameter->offset), m_xinePostParameter->size, m_groupBox); - connect( parameter, SIGNAL(signalCharValue(int, const QString&)), this, SLOT(slotApplyCharValue(int, const QString&))); + connect( parameter, TQT_SIGNAL(signalCharValue(int, const TQString&)), this, TQT_SLOT(slotApplyCharValue(int, const TQString&))); m_parameterList.append(parameter); grid->addWidget(parameter->getWidget(), row, 0); @@ -137,7 +137,7 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a PostFilterParameterBool(m_xinePostParameter->name, m_xinePostParameter->offset, (bool) *(int*)(m_data+m_xinePostParameter->offset), m_groupBox); - connect(parameter, SIGNAL(signalIntValue(int, int)), this, SLOT(slotApplyIntValue(int, int))); + connect(parameter, TQT_SIGNAL(signalIntValue(int, int)), this, TQT_SLOT(slotApplyIntValue(int, int))); m_parameterList.append(parameter); grid->addWidget(parameter->getWidget(), row, 0); @@ -146,30 +146,30 @@ PostFilter::PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* a default: break; } - descr = new QLabel(QString::fromUtf8(m_xinePostParameter->description ), m_groupBox); - descr->setAlignment(QLabel::WordBreak | QLabel::AlignVCenter); + descr = new TQLabel(TQString::fromUtf8(m_xinePostParameter->description ), m_groupBox); + descr->tqsetAlignment(TQLabel::WordBreak | TQLabel::AlignVCenter); grid->addWidget(descr, row, 1); row++; m_xinePostParameter++; } } - KSeparator* sep = new KSeparator(KSeparator::Horizontal, m_groupBox); + KSeparator* sep = new KSeparator(Qt::Horizontal, m_groupBox); grid->addMultiCellWidget(sep, row, row, 0, 1); row++; KPushButton* deleteButton = new KPushButton(i18n("Delete Filter"), m_groupBox); - deleteButton->setSizePolicy (QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed)); - connect(deleteButton, SIGNAL(clicked()), this, SLOT( slotDeletePressed())); + deleteButton->tqsetSizePolicy (TQSizePolicy (TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + connect(deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotDeletePressed())); grid->addWidget(deleteButton, row, 0); if(inputAPI) { KPushButton* helpButton = new KPushButton(i18n("Help"), m_groupBox); - helpButton->setSizePolicy(QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed)); - connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelpPressed())); + helpButton->tqsetSizePolicy(TQSizePolicy (TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + connect(helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelpPressed())); grid->addWidget(helpButton, row, 1); } - if (parent) + if (tqparent) m_groupBox->show(); } } @@ -199,7 +199,7 @@ void PostFilter::slotApplyDoubleValue(int offset, double val) m_xinePostAPI->set_parameters(m_xinePost, m_data); } -void PostFilter::slotApplyCharValue(int offset, const QString& val) +void PostFilter::slotApplyCharValue(int offset, const TQString& val) { kdDebug() << "PostFilter: " << m_filterName << " Apply char value '" << val << "' on offset " << offset << endl; sprintf((char *)(m_data+offset), "%s", val.latin1()); @@ -261,21 +261,21 @@ void PostFilter::slotHelpPressed() { kdDebug() << "PostFilter: Help pressed" << endl; - PostFilterHelp* filterHelp = new PostFilterHelp(NULL, m_filterName.ascii(), QString::fromUtf8(m_xinePostAPI->get_help())); + PostFilterHelp* filterHelp = new PostFilterHelp(NULL, m_filterName.ascii(), TQString::fromUtf8(m_xinePostAPI->get_help())); filterHelp->exec(); delete filterHelp; } -QString PostFilter::getConfig() +TQString PostFilter::getConfig() { /* * returns a string like "filtername:parameter=value,parameter=value,..." */ - QString configString; - QTextOStream configStream(&configString); + TQString configString; + TQTextOStream configStream(&configString); configStream << m_filterName << ":"; for (uint i = 0; i < m_parameterList.count(); i++) @@ -290,7 +290,7 @@ QString PostFilter::getConfig() return configString; } -void PostFilter::setConfig(const QString &configString) +void PostFilter::setConfig(const TQString &configString) { /* * expects a string like filtername:parameter=value,parameter=value,... @@ -299,7 +299,7 @@ void PostFilter::setConfig(const QString &configString) kdDebug() << "PostFilter: SetConfig " << configString << endl; - QString configStr; + TQString configStr; if (configString.section(':',0,0) == m_filterName) { configStr = configString.section(':',1,1); @@ -311,11 +311,11 @@ void PostFilter::setConfig(const QString &configString) return; } - for( int i = 0; i < configStr.contains(',') + 1; i++ ) + for( int i = 0; i < configStr.tqcontains(',') + 1; i++ ) { - QString parameterConfig = configStr.section(',', i, i); - QString parameterName = parameterConfig.section('=', 0, 0); - QString parameterValue = parameterConfig.section('=', 1, 1); + TQString parameterConfig = configStr.section(',', i, i); + TQString parameterName = parameterConfig.section('=', 0, 0); + TQString parameterValue = parameterConfig.section('=', 1, 1); parameterValue = parameterValue.remove('"'); for (uint j = 0; j < m_parameterList.count(); j++) @@ -329,62 +329,62 @@ void PostFilter::setConfig(const QString &configString) } } -PostFilterParameterInt::PostFilterParameterInt(const QString& name, int offset, int value, int min, int max, QWidget* parent) - : PostFilterParameter (name, offset, parent ) +PostFilterParameterInt::PostFilterParameterInt(const TQString& name, int offset, int value, int min, int max, TQWidget* tqparent) + : PostFilterParameter (name, offset, tqparent ) { - m_numInput = new KIntNumInput(value, parent); + m_numInput = new KIntNumInput(value, tqparent); m_numInput->setRange( min, max, 1, false); - connect(m_numInput, SIGNAL(valueChanged(int)), this, SLOT(slotIntValue(int))); + connect(m_numInput, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotIntValue(int))); } -PostFilterParameterDouble::PostFilterParameterDouble(const QString& name, int offset, double value, double min, double max, QWidget* parent) - : PostFilterParameter (name, offset, parent ) +PostFilterParameterDouble::PostFilterParameterDouble(const TQString& name, int offset, double value, double min, double max, TQWidget* tqparent) + : PostFilterParameter (name, offset, tqparent ) { - m_numInput = new KDoubleNumInput(parent); + m_numInput = new KDoubleNumInput(tqparent); m_numInput->setValue(value); m_numInput->setRange(min, max, 0.01, false); - connect(m_numInput, SIGNAL(valueChanged( double)), this, SLOT(slotDoubleValue( double))); + connect(m_numInput, TQT_SIGNAL(valueChanged( double)), this, TQT_SLOT(slotDoubleValue( double))); } -PostFilterParameterChar::PostFilterParameterChar(const QString& name, int offset, char *value, int size, QWidget* parent) - : PostFilterParameter (name, offset, parent ) +PostFilterParameterChar::PostFilterParameterChar(const TQString& name, int offset, char *value, int size, TQWidget* tqparent) + : PostFilterParameter (name, offset, tqparent ) { - m_charInput = new KLineEdit(value, parent); + m_charInput = new KLineEdit(value, tqparent); m_charInput->setMaxLength(size); - connect(m_charInput, SIGNAL(returnPressed(const QString&)), this, SLOT(slotCharValue(const QString&))); + connect(m_charInput, TQT_SIGNAL(returnPressed(const TQString&)), this, TQT_SLOT(slotCharValue(const TQString&))); } -PostFilterParameterCombo::PostFilterParameterCombo(const QString& name, int offset, int value, char **enums, QWidget* parent) - : PostFilterParameter (name, offset, parent) +PostFilterParameterCombo::PostFilterParameterCombo(const TQString& name, int offset, int value, char **enums, TQWidget* tqparent) + : PostFilterParameter (name, offset, tqparent) { - m_comboBox = new KComboBox(parent); + m_comboBox = new KComboBox(tqparent); for (int i = 0; enums[i]; i++) { m_comboBox->insertItem(enums[i]); } m_comboBox->setCurrentItem(value); - connect(m_comboBox, SIGNAL( activated(int)), this, SLOT( slotIntValue(int))); + connect(m_comboBox, TQT_SIGNAL( activated(int)), this, TQT_SLOT( slotIntValue(int))); } -PostFilterParameterBool::PostFilterParameterBool(const QString& name, int offset, bool value, QWidget* parent) - : PostFilterParameter (name, offset, parent ) +PostFilterParameterBool::PostFilterParameterBool(const TQString& name, int offset, bool value, TQWidget* tqparent) + : PostFilterParameter (name, offset, tqparent ) { - m_checkBox = new QCheckBox(parent); + m_checkBox = new TQCheckBox(tqparent); m_checkBox->setChecked(value); - connect(m_checkBox, SIGNAL(toggled(bool)), this, SLOT(slotBoolValue( bool))); + connect(m_checkBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotBoolValue( bool))); } -PostFilterHelp::PostFilterHelp(QWidget *parent, const char *name, const QString& text) - : KDialogBase( parent, name, true, QString(name) + " - " + i18n("Help"), KDialogBase::Close ) +PostFilterHelp::PostFilterHelp(TQWidget *tqparent, const char *name, const TQString& text) + : KDialogBase( tqparent, name, true, TQString(name) + " - " + i18n("Help"), KDialogBase::Close ) { - setInitialSize( QSize(500,500) ); + setInitialSize( TQSize(500,500) ); - QWidget* mainWidget = makeMainWidget(); - QGridLayout* grid = new QGridLayout( mainWidget, 1, 1 ); + TQWidget* mainWidget = makeMainWidget(); + TQGridLayout* grid = new TQGridLayout( mainWidget, 1, 1 ); grid->setSpacing( 5 ); - //QString help = QString::fromUtf8(text); - m_textEdit = new QTextEdit(text, QString::null, mainWidget, name); + //TQString help = TQString::fromUtf8(text); + m_textEdit = new TQTextEdit(text, TQString(), mainWidget, name); m_textEdit->setReadOnly(true); grid->addWidget(m_textEdit, 0, 0); } diff --git a/kaffeine/src/player-parts/xine-part/postfilter.h b/kaffeine/src/player-parts/xine-part/postfilter.h index ce04359..50be7ef 100644 --- a/kaffeine/src/player-parts/xine-part/postfilter.h +++ b/kaffeine/src/player-parts/xine-part/postfilter.h @@ -23,11 +23,11 @@ #define POSTFILTER_H /* forward declaration */ -class QWidget; -class QObject; -class QString; -class QGroupBox; -class QTextEdit; +class TQWidget; +class TQObject; +class TQString; +class TQGroupBox; +class TQTextEdit; class KPushButton; #include <klineedit.h> @@ -35,23 +35,24 @@ class KPushButton; #include <kcombobox.h> #include <kdialogbase.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <xine.h> -class PostFilterParameter : public QObject +class PostFilterParameter : public TQObject { Q_OBJECT + TQ_OBJECT public: - PostFilterParameter(const QString& name, int offset, QWidget* parent) - : QObject(parent, name.ascii()), m_offset(offset) + PostFilterParameter(const TQString& name, int offset, TQWidget* tqparent) + : TQObject(tqparent, name.ascii()), m_offset(offset) {} ~PostFilterParameter() {}; - virtual void setValue( const QString& ) = 0; - virtual QString getValue() = 0; - virtual QWidget *getWidget() = 0; + virtual void setValue( const TQString& ) = 0; + virtual TQString getValue() = 0; + virtual TQWidget *getWidget() = 0; protected: int m_offset; @@ -61,15 +62,16 @@ protected: class PostFilterParameterInt : public PostFilterParameter { Q_OBJECT + TQ_OBJECT public: - PostFilterParameterInt(const QString& name, int offset, int value, int min, int max, QWidget* parent); + PostFilterParameterInt(const TQString& name, int offset, int value, int min, int max, TQWidget* tqparent); ~PostFilterParameterInt() {}; - void setValue( const QString &value ) + void setValue( const TQString &value ) { int i = value.toInt(); m_numInput->setValue(i); slotIntValue(i); } - QString getValue() - { QString s; s.sprintf("%d", m_numInput->value()); return s; } - QWidget *getWidget() { return m_numInput; } + TQString getValue() + { TQString s; s.sprintf("%d", m_numInput->value()); return s; } + TQWidget *getWidget() { return m_numInput; } signals: void signalIntValue( int, int ); @@ -85,15 +87,16 @@ private: class PostFilterParameterDouble : public PostFilterParameter { Q_OBJECT + TQ_OBJECT public: - PostFilterParameterDouble(const QString& name, int offset, double value, double min, double max, QWidget* parent); + PostFilterParameterDouble(const TQString& name, int offset, double value, double min, double max, TQWidget* tqparent); ~PostFilterParameterDouble() {}; - void setValue( const QString &value ) + void setValue( const TQString &value ) { double d = value.toDouble(); m_numInput->setValue(d); slotDoubleValue(d); } - QString getValue() - { QString s; s.sprintf("%lf",m_numInput->value()); return s; } - QWidget *getWidget() { return m_numInput; } + TQString getValue() + { TQString s; s.sprintf("%lf",m_numInput->value()); return s; } + TQWidget *getWidget() { return m_numInput; } signals: void signalDoubleValue(int, double); @@ -109,20 +112,21 @@ private: class PostFilterParameterChar : public PostFilterParameter { Q_OBJECT + TQ_OBJECT public: - PostFilterParameterChar(const QString& name, int offset, char *value, int size, QWidget* parent); + PostFilterParameterChar(const TQString& name, int offset, char *value, int size, TQWidget* tqparent); ~PostFilterParameterChar() {}; - void setValue(const QString &value) + void setValue(const TQString &value) { m_charInput->setText(value); slotCharValue(value); } - QString getValue() { return m_charInput->text(); } - QWidget *getWidget() { return m_charInput; } + TQString getValue() { return m_charInput->text(); } + TQWidget *getWidget() { return m_charInput; } signals: - void signalCharValue(int, const QString&); + void signalCharValue(int, const TQString&); public slots: - void slotCharValue(const QString& val) { emit signalCharValue(m_offset, val); } + void slotCharValue(const TQString& val) { emit signalCharValue(m_offset, val); } private: KLineEdit* m_charInput; @@ -132,13 +136,14 @@ private: class PostFilterParameterCombo : public PostFilterParameter { Q_OBJECT + TQ_OBJECT public: - PostFilterParameterCombo(const QString& name, int offset, int value, char **enums, QWidget* parent); + PostFilterParameterCombo(const TQString& name, int offset, int value, char **enums, TQWidget* tqparent); ~PostFilterParameterCombo() {}; - void setValue(const QString &value) { m_comboBox->setCurrentItem(value); slotIntValue(m_comboBox->currentItem()); } - QString getValue() { return m_comboBox->currentText(); } - QWidget *getWidget() { return m_comboBox; } + void setValue(const TQString &value) { m_comboBox->setCurrentItem(value); slotIntValue(m_comboBox->currentItem()); } + TQString getValue() { return m_comboBox->currentText(); } + TQWidget *getWidget() { return m_comboBox; } signals: void signalIntValue(int, int); @@ -154,15 +159,16 @@ private: class PostFilterParameterBool : public PostFilterParameter { Q_OBJECT + TQ_OBJECT public: - PostFilterParameterBool(const QString& name, int offset, bool value, QWidget* parent); + PostFilterParameterBool(const TQString& name, int offset, bool value, TQWidget* tqparent); ~PostFilterParameterBool() {}; - void setValue(const QString &value) + void setValue(const TQString &value) { bool b = (bool)value.toInt(); m_checkBox->setChecked(b); slotBoolValue(b); } - QString getValue() - { QString s; s.sprintf("%d",(int)m_checkBox->isOn()); return s; } - QWidget *getWidget() { return m_checkBox; } + TQString getValue() + { TQString s; s.sprintf("%d",(int)m_checkBox->isOn()); return s; } + TQWidget *getWidget() { return m_checkBox; } signals: void signalIntValue(int, int); @@ -171,34 +177,36 @@ public slots: void slotBoolValue(bool val) { emit signalIntValue(m_offset, (int)val); } private: - QCheckBox* m_checkBox; + TQCheckBox* m_checkBox; }; class PostFilterHelp : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PostFilterHelp(QWidget *parent=0, const char *name=0, const QString& text = QString::null); + PostFilterHelp(TQWidget *tqparent=0, const char *name=0, const TQString& text = TQString()); ~PostFilterHelp(); private: - QTextEdit *m_textEdit; + TQTextEdit *m_textEdit; }; -class PostFilter : public QObject +class PostFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: - PostFilter(const QString& name, xine_t* engine, xine_audio_port_t* audioDriver, - xine_video_port_t* videoDriver, QWidget *parent); + PostFilter(const TQString& name, xine_t* engine, xine_audio_port_t* audioDriver, + xine_video_port_t* videoDriver, TQWidget *tqparent); ~PostFilter(); xine_post_in_t* getInput() const; xine_post_out_t* getOutput() const; - void setConfig(const QString &); - QString getConfig(); + void setConfig(const TQString &); + TQString getConfig(); signals: @@ -209,7 +217,7 @@ private slots: void slotDeletePressed() { emit signalDeleteMe(this); } void slotApplyIntValue(int offset, int val); void slotApplyDoubleValue(int offset, double val); - void slotApplyCharValue(int offset, const QString& val); + void slotApplyCharValue(int offset, const TQString& val); void slotHelpPressed(); private: @@ -220,10 +228,10 @@ private: xine_post_api_parameter_t* m_xinePostParameter; char* m_data; - QGroupBox* m_groupBox; - QString m_filterName; + TQGroupBox* m_groupBox; + TQString m_filterName; - QPtrList<PostFilterParameter> m_parameterList; + TQPtrList<PostFilterParameter> m_parameterList; }; #endif /* POSTFILTER_H */ diff --git a/kaffeine/src/player-parts/xine-part/screenshotpreview.cpp b/kaffeine/src/player-parts/xine-part/screenshotpreview.cpp index 300ff83..a4b64d1 100644 --- a/kaffeine/src/player-parts/xine-part/screenshotpreview.cpp +++ b/kaffeine/src/player-parts/xine-part/screenshotpreview.cpp @@ -20,16 +20,16 @@ #include <kglobalsettings.h> -#include <qpainter.h> -#include <qwidget.h> -#include <qimage.h> +#include <tqpainter.h> +#include <tqwidget.h> +#include <tqimage.h> #include "screenshotpreview.h" #include "screenshotpreview.moc" -ScreenshotPreview::ScreenshotPreview(const QImage& img, QWidget *parent, const char *name ) - : KPreviewWidgetBase(parent,name) +ScreenshotPreview::ScreenshotPreview(const TQImage& img, TQWidget *tqparent, const char *name ) + : KPreviewWidgetBase(tqparent,name) { setMinimumWidth(200); m_previewImg = img.copy(); /* deep copy */ @@ -49,21 +49,21 @@ void ScreenshotPreview::clearPreview() /* reimplemented to do nothing */ /* show preview picture */ -void ScreenshotPreview::paintEvent(QPaintEvent*) +void ScreenshotPreview::paintEvent(TQPaintEvent*) { int imgHeight, posy; imgHeight = (int)((double) m_previewImg.height() / m_previewImg.width() * (width()-5)); posy = (height() - imgHeight) / 2; - QString info = QString::number(m_previewImg.width()) + "x" + QString::number(m_previewImg.height()); + TQString info = TQString::number(m_previewImg.width()) + "x" + TQString::number(m_previewImg.height()); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); font.setPointSize(10); - QFontMetrics met(font); + TQFontMetrics met(font); - QPainter painter(this); - painter.drawImage(QRect(5, posy, width(), imgHeight), m_previewImg); + TQPainter painter(this); + painter.drawImage(TQRect(5, posy, width(), imgHeight), m_previewImg); painter.setFont(font); painter.drawText((width()-met.width(info))/2, posy + imgHeight + 20, info); diff --git a/kaffeine/src/player-parts/xine-part/screenshotpreview.h b/kaffeine/src/player-parts/xine-part/screenshotpreview.h index d3a62de..030059a 100644 --- a/kaffeine/src/player-parts/xine-part/screenshotpreview.h +++ b/kaffeine/src/player-parts/xine-part/screenshotpreview.h @@ -27,14 +27,15 @@ #include <kpreviewwidgetbase.h> -class QImage; -class QWidget; +class TQImage; +class TQWidget; class ScreenshotPreview : public KPreviewWidgetBase { Q_OBJECT + TQ_OBJECT public: - ScreenshotPreview(const QImage& img, QWidget *parent=0, const char *name=0); + ScreenshotPreview(const TQImage& img, TQWidget *tqparent=0, const char *name=0); ~ScreenshotPreview(); public slots: @@ -42,10 +43,10 @@ public slots: virtual void clearPreview(); protected: - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); private: - QImage m_previewImg; + TQImage m_previewImg; }; diff --git a/kaffeine/src/player-parts/xine-part/videosettings.cpp b/kaffeine/src/player-parts/xine-part/videosettings.cpp index e552df7..5768219 100644 --- a/kaffeine/src/player-parts/xine-part/videosettings.cpp +++ b/kaffeine/src/player-parts/xine-part/videosettings.cpp @@ -20,94 +20,94 @@ #include <klocale.h> -#include <qslider.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qnamespace.h> -#include <qgroupbox.h> +#include <tqslider.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqnamespace.h> +#include <tqgroupbox.h> #include "videosettings.h" #include "videosettings.moc" VideoSettings::VideoSettings(int hue, int sat, int contrast, int bright, - int avOffset, int spuOffset, QWidget *parent, const char *name) - : KDialogBase(KDialogBase::Plain, i18n("Video Settings"), KDialogBase::Default | KDialogBase::Close, KDialogBase::Close, parent, name, false) + int avOffset, int spuOffset, TQWidget *tqparent, const char *name) + : KDialogBase(KDialogBase::Plain, i18n("Video Settings"), KDialogBase::Default | KDialogBase::Close, KDialogBase::Close, tqparent, name, false) { - reparent(parent, pos(), false); - setInitialSize(QSize(450,250), true); - QWidget* page = plainPage(); + reparent(tqparent, pos(), false); + setInitialSize(TQSize(450,250), true); + TQWidget* page = plainPage(); - QVBoxLayout* b = new QVBoxLayout(page); + TQVBoxLayout* b = new TQVBoxLayout(page); - QGroupBox *videoGroup = new QGroupBox(QString::null, page); + TQGroupBox *videoGroup = new TQGroupBox(TQString(), page); b->addWidget(videoGroup); - QGridLayout* videoGrid = new QGridLayout(videoGroup, 6, 2); + TQGridLayout* videoGrid = new TQGridLayout(videoGroup, 6, 2); videoGrid->setSpacing(5); videoGrid->setMargin(10); - QLabel* hueText = new QLabel(i18n("Hue"), videoGroup); - hueText->setAlignment(AlignRight); - m_hueSlider = new QSlider(Qt::Horizontal, videoGroup); + TQLabel* hueText = new TQLabel(i18n("Hue"), videoGroup); + hueText->tqsetAlignment(AlignRight); + m_hueSlider = new TQSlider(Qt::Horizontal, videoGroup); m_hueSlider->setRange(0, 65535); m_hueSlider->setSteps(10, 1000); m_hueSlider->setValue(hue); - connect(m_hueSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewHue(int))); + connect(m_hueSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewHue(int))); videoGrid->addWidget(hueText, 0, 0); videoGrid->addWidget(m_hueSlider, 0, 1); - QLabel* satText = new QLabel(i18n("Saturation"), videoGroup); - satText->setAlignment(AlignRight); - m_satSlider = new QSlider(Qt::Horizontal, videoGroup); + TQLabel* satText = new TQLabel(i18n("Saturation"), videoGroup); + satText->tqsetAlignment(AlignRight); + m_satSlider = new TQSlider(Qt::Horizontal, videoGroup); m_satSlider->setRange(0, 65535); m_satSlider->setSteps(10, 1000); m_satSlider->setValue(sat); - connect(m_satSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewSaturation(int))); + connect(m_satSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewSaturation(int))); videoGrid->addWidget(satText, 1, 0); videoGrid->addWidget(m_satSlider, 1, 1); - QLabel* contrastText = new QLabel(i18n("Contrast"), videoGroup); - contrastText->setAlignment(AlignRight); - m_contrastSlider = new QSlider(Qt::Horizontal, videoGroup); + TQLabel* contrastText = new TQLabel(i18n("Contrast"), videoGroup); + contrastText->tqsetAlignment(AlignRight); + m_contrastSlider = new TQSlider(Qt::Horizontal, videoGroup); m_contrastSlider->setRange(0, 65535); m_contrastSlider->setSteps(10, 1000); m_contrastSlider->setValue(contrast); - connect(m_contrastSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewContrast(int))); + connect(m_contrastSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewContrast(int))); videoGrid->addWidget(contrastText, 2, 0); videoGrid->addWidget(m_contrastSlider, 2, 1); - QLabel* brightText = new QLabel(i18n("Brightness"), videoGroup); - brightText->setAlignment(AlignRight); - m_brightSlider = new QSlider(Qt::Horizontal, videoGroup); + TQLabel* brightText = new TQLabel(i18n("Brightness"), videoGroup); + brightText->tqsetAlignment(AlignRight); + m_brightSlider = new TQSlider(Qt::Horizontal, videoGroup); m_brightSlider->setRange(0, 65535); m_brightSlider->setSteps(10, 1000); m_brightSlider->setValue(bright); - connect(m_brightSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewBrightness(int))); + connect(m_brightSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewBrightness(int))); videoGrid->addWidget(brightText, 3, 0); videoGrid->addWidget(m_brightSlider, 3, 1); - QLabel* avOffsetText = new QLabel(i18n("Audio/Video Offset"), videoGroup); - avOffsetText->setAlignment(AlignRight); - m_avOffsetSlider = new QSlider(Qt::Horizontal, videoGroup); + TQLabel* avOffsetText = new TQLabel(i18n("Audio/Video Offset"), videoGroup); + avOffsetText->tqsetAlignment(AlignRight); + m_avOffsetSlider = new TQSlider(Qt::Horizontal, videoGroup); m_avOffsetSlider->setRange(-90000, 90000); // +/- 1 sec m_avOffsetSlider->setSteps(100, 10000); m_avOffsetSlider->setValue(avOffset); - connect(m_avOffsetSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewAVOffset(int))); + connect(m_avOffsetSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewAVOffset(int))); videoGrid->addWidget(avOffsetText, 4, 0); videoGrid->addWidget(m_avOffsetSlider, 4, 1); - QLabel* spuOffsetText = new QLabel(i18n("Subtitle Offset"), videoGroup); - spuOffsetText->setAlignment(AlignRight); - m_spuOffsetSlider = new QSlider(Qt::Horizontal, videoGroup); + TQLabel* spuOffsetText = new TQLabel(i18n("Subtitle Offset"), videoGroup); + spuOffsetText->tqsetAlignment(AlignRight); + m_spuOffsetSlider = new TQSlider(Qt::Horizontal, videoGroup); m_spuOffsetSlider->setRange(-90000, 90000); // +/- 1 sec m_spuOffsetSlider->setSteps(100, 10000); m_spuOffsetSlider->setValue(spuOffset); - connect(m_spuOffsetSlider, SIGNAL(valueChanged(int)), this, SIGNAL(signalNewSpuOffset(int))); + connect(m_spuOffsetSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(signalNewSpuOffset(int))); videoGrid->addWidget(spuOffsetText, 5, 0); videoGrid->addWidget(m_spuOffsetSlider, 5, 1); - connect(this, SIGNAL(defaultClicked()), this, SLOT(slotSetDefaultValues())); + connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotSetDefaultValues())); } diff --git a/kaffeine/src/player-parts/xine-part/videosettings.h b/kaffeine/src/player-parts/xine-part/videosettings.h index 7641bf8..2eff45a 100644 --- a/kaffeine/src/player-parts/xine-part/videosettings.h +++ b/kaffeine/src/player-parts/xine-part/videosettings.h @@ -27,16 +27,17 @@ #include <kdialogbase.h> -class QSlider; +class TQSlider; class VideoSettings : public KDialogBase { Q_OBJECT + TQ_OBJECT public: VideoSettings(int hue, int sat, int contrast, int bright, int avOffset, - int spuOffset, QWidget *parent=0, const char *name=0); + int spuOffset, TQWidget *tqparent=0, const char *name=0); ~VideoSettings(); signals: @@ -53,12 +54,12 @@ private slots: private: - QSlider* m_hueSlider; - QSlider* m_satSlider; - QSlider* m_contrastSlider; - QSlider* m_brightSlider; - QSlider* m_avOffsetSlider; - QSlider* m_spuOffsetSlider; + TQSlider* m_hueSlider; + TQSlider* m_satSlider; + TQSlider* m_contrastSlider; + TQSlider* m_brightSlider; + TQSlider* m_avOffsetSlider; + TQSlider* m_spuOffsetSlider; }; diff --git a/kaffeine/src/player-parts/xine-part/xine_part.cpp b/kaffeine/src/player-parts/xine-part/xine_part.cpp index 920a2ac..ff0e4d1 100644 --- a/kaffeine/src/player-parts/xine-part/xine_part.cpp +++ b/kaffeine/src/player-parts/xine-part/xine_part.cpp @@ -39,14 +39,14 @@ #include <kprotocolinfo.h> #include <ktoolbar.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qimage.h> -#include <qfontmetrics.h> -#include <qregexp.h> -#include <qtooltip.h> -#include <qdatetimeedit.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqimage.h> +#include <tqfontmetrics.h> +#include <tqregexp.h> +#include <tqtooltip.h> +#include <tqdatetimeedit.h> #include <xine/xineutils.h> @@ -66,9 +66,9 @@ typedef KParts::GenericFactory<XinePart> XinePartFactory; K_EXPORT_COMPONENT_FACTORY (libxinepart, XinePartFactory) -XinePart::XinePart(QWidget* parentWidget, const char* widgetName, QObject* parent, const char* name, const QStringList& args) +XinePart::XinePart(TQWidget* tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, const TQStringList& args) : DCOPObject("XinePartIface"), - KaffeinePart(parent, name ? name : "XinePart"), + KaffeinePart(tqparent, name ? name : "XinePart"), m_current(0), m_xine(NULL), m_pictureSettings(NULL), m_deinterlacerConfigWidget(NULL), m_filterDialog(NULL), m_embeddedContext(NULL) { @@ -80,8 +80,8 @@ XinePart::XinePart(QWidget* parentWidget, const char* widgetName, QObject* paren * * format: param="value" */ - QString audioDriver = QString::null; - QString videoDriver = QString::null; + TQString audioDriver = TQString(); + TQString videoDriver = TQString(); bool verbose = false; TimeShiftFilename = ""; @@ -101,7 +101,7 @@ XinePart::XinePart(QWidget* parentWidget, const char* widgetName, QObject* paren } if (args[i].left(7).lower() == "verbose") { - if (args[i].section( '"', 1, 1 ).lower() == "true") + if (TQString(args[i].section( '"', 1, 1 )).lower() == "true") { kdDebug() << "XinePart: Found parameter verbose, set xine engine verbosity to max..." << endl; verbose = true; @@ -113,17 +113,17 @@ XinePart::XinePart(QWidget* parentWidget, const char* widgetName, QObject* paren setInstance(XinePartFactory::instance()); // be careful - we may be embedded - QString configPath = locate("data", "kaffeine/xine-config"); - QString logoPath = locate("data", "kaffeine/logo"); + TQString configPath = locate("data", "kaffeine/xine-config"); + TQString logoPath = locate("data", "kaffeine/logo"); kdDebug() << "XinePart: Using xine-config file: " << configPath << endl; - m_xine = new KXineWidget(parentWidget, widgetName, configPath, logoPath, + m_xine = new KXineWidget(tqparentWidget, widgetName, configPath, logoPath, audioDriver, videoDriver, /* start xine manual*/true, verbose); - connect(m_xine, SIGNAL(signalXineFatal(const QString&)), this, SIGNAL(canceled(const QString&))); - connect(m_xine, SIGNAL(stopDvb()), this, SIGNAL(stopDvb())); - connect(m_xine, SIGNAL(signalDvbOSDHidden()), this, SIGNAL(dvbOSDHide())); - m_xine->setFocusPolicy(QWidget::ClickFocus); + connect(m_xine, TQT_SIGNAL(signalXineFatal(const TQString&)), this, TQT_SIGNAL(canceled(const TQString&))); + connect(m_xine, TQT_SIGNAL(stopDvb()), this, TQT_SIGNAL(stopDvb())); + connect(m_xine, TQT_SIGNAL(signalDvbOSDHidden()), this, TQT_SIGNAL(dvbOSDHide())); + m_xine->setFocusPolicy(TQ_ClickFocus); setWidget(m_xine); // set our XML-UI resource file @@ -131,8 +131,8 @@ XinePart::XinePart(QWidget* parentWidget, const char* widgetName, QObject* paren initActions(); initConnections(); - QTimer::singleShot(0, this, SLOT(slotDisableAllActions())); - m_oldPosition = m_xine->mapToGlobal(QPoint(0,0)); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotDisableAllActions())); + m_oldPosition = m_xine->mapToGlobal(TQPoint(0,0)); m_posCheckTimer.start(333); } @@ -168,8 +168,8 @@ bool XinePart::openURL(const MRL& mrl) m_current = 0; bool playlist = false; - QString ext = m_mrl.kurl().fileName(); - ext = ext.remove( 0 , ext.findRev('.')+1 ).lower(); + TQString ext = m_mrl.kurl().fileName(); + ext = ext.remove( 0 , ext.tqfindRev('.')+1 ).lower(); if (!m_mrl.mime().isNull()) { @@ -184,35 +184,35 @@ bool XinePart::openURL(const MRL& mrl) || (ext == "asx") || (ext == "asf") || (ext == "wvx") || (ext == "wax")) /* windows meta files */ { kdDebug() << "XinePart: Check for kaffeine/noatun/m3u/pls/asx playlist\n"; - QString localFile; + TQString localFile; if (KIO::NetAccess::download(m_mrl.kurl(), localFile, widget())) { - QFile file(localFile); + TQFile file(localFile); file.open(IO_ReadOnly); - QTextStream stream(&file); - QString firstLine = stream.readLine(); - QString secondLine = stream.readLine(); + TQTextStream stream(&file); + TQString firstLine = stream.readLine(); + TQString secondLine = stream.readLine(); file.close(); - if (secondLine.contains("kaffeine", false)) + if (secondLine.tqcontains("kaffeine", false)) { kdDebug() << "KafeinePart: Try loading kaffeine playlist\n"; playlist = PlaylistImport::kaffeine(localFile, m_playlist); } - if (secondLine.contains("noatun", false)) + if (secondLine.tqcontains("noatun", false)) { kdDebug() << "XinePart: Try loading noatun playlist\n"; playlist = PlaylistImport::noatun(localFile, m_playlist); } - if (firstLine.contains("asx", false)) + if (firstLine.tqcontains("asx", false)) { kdDebug() << "XinePart: Try loading asx playlist\n"; playlist = PlaylistImport::asx(localFile, m_playlist); } - if (firstLine.contains("smil", false)) + if (firstLine.tqcontains("smil", false)) { kdDebug() << "XinePart: Try loading smil playlist\n"; - if (KMessageBox::warningYesNo(0, i18n("SMIL (Synchronized Multimedia Integration Language) support is rudimentary!\nXinePart can now try to playback contained video sources without any layout. Proceed?"), QString::null, KStdGuiItem::yes(), KStdGuiItem::no(), "smil_warning") == KMessageBox::Yes) + if (KMessageBox::warningYesNo(0, i18n("SMIL (Synchronized Multimedia Integration Language) support is rudimentary!\nXinePart can now try to playback contained video sources without any tqlayout. Proceed?"), TQString(), KStdGuiItem::yes(), KStdGuiItem::no(), "smil_warning") == KMessageBox::Yes) { if (!PlaylistImport::smil(localFile, m_mrl, m_playlist)) { @@ -223,7 +223,7 @@ bool XinePart::openURL(const MRL& mrl) else return false; } - if (firstLine.contains("[playlist]", false)) + if (firstLine.tqcontains("[playlist]", false)) { kdDebug() << "XinePart: Try loading pls playlist\n"; playlist = PlaylistImport::pls(localFile, m_playlist); @@ -246,7 +246,7 @@ bool XinePart::openURL(const MRL& mrl) /* urls from audiocd kio-slave */ if (m_mrl.kurl().protocol() == "audiocd") { - QString audioTrack = QString::number(m_mrl.kurl().fileName().remove( QRegExp("\\D" ) ).left(2).toUInt()); + TQString audioTrack = TQString::number(m_mrl.kurl().fileName().remove( TQRegExp("\\D" ) ).left(2).toUInt()); m_mrl = MRL(audioTrack.prepend( "cdda:/" )); } @@ -299,12 +299,12 @@ void XinePart::slotPlay(bool forcePlay) /* * is protocol supported by xine or not known by KIO? */ - if ((QString(SUPPORTED_PROTOCOLS).contains(mrl.kurl().protocol())) + if ((TQString(SUPPORTED_PROTOCOLS).tqcontains(mrl.kurl().protocol())) || (!KProtocolInfo::isKnownProtocol(mrl.kurl()))) { - QString sub; + TQString sub; if ((!mrl.subtitleFiles().isEmpty()) && (mrl.currentSubtitle() > -1)) - sub = QString("#subtitle:%1").arg(mrl.subtitleFiles()[mrl.currentSubtitle()]); + sub = TQString("#subtitle:%1").tqarg(mrl.subtitleFiles()[mrl.currentSubtitle()]); m_xine->clearQueue(); m_xine->appendToQueue(mrl.url() + sub ); @@ -314,13 +314,13 @@ void XinePart::slotPlay(bool forcePlay) return; } else - QTimer::singleShot(0, m_xine, SLOT(slotPlay())); + TQTimer::singleShot(0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotPlay())); } else { kdDebug() << "XinePart: Protocol not supported by xine, try to download it..." << endl; - QString localFile; + TQString localFile; if (KIO::NetAccess::download(mrl.kurl(), localFile, widget())) { m_xine->clearQueue(); @@ -331,7 +331,7 @@ void XinePart::slotPlay(bool forcePlay) return; } else - QTimer::singleShot(0, m_xine, SLOT(slotPlay())); + TQTimer::singleShot(0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotPlay())); } else kdError() << "XinePart: " << KIO::NetAccess::lastErrorString() << endl; @@ -351,10 +351,10 @@ void XinePart::slotStop() uint title = m_xine->currentDVDTitleNumber(); uint chapter = m_xine->currentDVDChapterNumber(); - m_playlist[m_current] = MRL("dvd://" + QString::number(title) + "." + QString::number(chapter)); + m_playlist[m_current] = MRL("dvd://" + TQString::number(title) + "." + TQString::number(chapter)); } - QTimer::singleShot(0, m_xine, SLOT(slotStop())); + TQTimer::singleShot(0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotStop())); stateChanged("not_playing"); m_pauseButton->setChecked(false); m_playTime->setText("0:00:00"); @@ -399,28 +399,28 @@ void XinePart::slotPrevious() } } -void XinePart::requestForOSD( const QString &text, int duration, int priority ) +void XinePart::requestForOSD( const TQString &text, int duration, int priority ) { m_xine->showOSDMessage( text, duration, priority ); } -void XinePart::setDvbCurrentNext( const QString &channelName, const QStringList &list ) +void XinePart::setDvbCurrentNext( const TQString &channelName, const TQStringList &list ) { m_xine->setDvbCurrentNext( channelName, list ); } -void XinePart::slotDvbOpen( const QString &filename, const QString &chanName, int haveVideo ) +void XinePart::slotDvbOpen( const TQString &filename, const TQString &chanName, int haveVideo ) { if (!m_xine->isXineReady()) if (!m_xine->initXine()) return; m_playlist.clear(); m_xine->setDvb( filename, chanName, haveVideo ); - QTimer::singleShot(0, m_xine, SLOT(openDvb())); + TQTimer::singleShot(0, TQT_TQOBJECT(m_xine), TQT_SLOT(openDvb())); //m_xine->openDvb( filename, chanName, haveVideo ); } -void XinePart::getTimeShiftFilename( const QString &filename ) +void XinePart::getTimeShiftFilename( const TQString &filename ) { TimeShiftFilename = filename; m_xine->TimeShiftFilename = TimeShiftFilename; @@ -539,9 +539,9 @@ void XinePart::slotJumpIncrement(int increment) if (!m_xine->isSeekable()) return; - QTime timeNow; - QTime projectedTime; - QTime startTime; + TQTime timeNow; + TQTime projectedTime; + TQTime startTime; if (!m_xine->getLength().isNull()) { @@ -577,9 +577,9 @@ void XinePart::slotSaveStream() if (m_mrl.isEmpty()) return; - QString saveDir = m_xine->getStreamSaveDir(); + TQString saveDir = m_xine->getStreamSaveDir(); - KURL kurl = KFileDialog::getSaveURL(saveDir + "/" + m_playlist[m_current].kurl().fileName(), QString::null, 0, i18n("Save Stream As")); + KURL kurl = KFileDialog::getSaveURL(saveDir + "/" + m_playlist[m_current].kurl().fileName(), TQString(), 0, i18n("Save Stream As")); if (!kurl.isValid()) return; @@ -588,7 +588,7 @@ void XinePart::slotSaveStream() m_xine->clearQueue(); m_xine->appendToQueue(m_playlist[m_current].url() + "#save:" + kurl.path()); - QTimer::singleShot(0, m_xine, SLOT(slotPlay())); + TQTimer::singleShot(0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotPlay())); m_pauseButton->setChecked(false); } @@ -611,13 +611,13 @@ void XinePart::slotSetSubtitle(int channel) void XinePart::slotAddSubtitle(void) { - QString subtitleURL = KFileDialog::getOpenURL(m_mrl.kurl().directory(), + TQString subtitleURL = KFileDialog::getOpenURL(m_mrl.kurl().directory(), i18n("*.smi *.srt *.sub *.txt *.ssa *.asc|Subtitle Files\n*.*|All Files"), 0, i18n("Select Subtitle File")).path(); if (!(subtitleURL.isEmpty())) { - if (!m_playlist[m_current].subtitleFiles().contains(subtitleURL)) + if (!m_playlist[m_current].subtitleFiles().tqcontains(subtitleURL)) { m_playlist[m_current].addSubtitleFile(subtitleURL); } @@ -641,20 +641,20 @@ void XinePart::slotSetAudioChannel(int channel) m_xine->showOSDMessage(i18n("Audiochannel") + ": " + m_audioChannels->items()[channel], DEFAULT_OSD_DURATION); } -void XinePart::slotSetDVDTitle(const QString& titleStr) +void XinePart::slotSetDVDTitle(const TQString& titleStr) { bool ok; uint title = titleStr.toInt(&ok); if (ok && title > 0 && title <= m_xine->getDVDTitleCount()) { KURL url = m_mrl.kurl(); - url.addPath(QString::number(title)); + url.addPath(TQString::number(title)); m_playlist[m_current] = MRL(url); slotPlay(true); } } -void XinePart::slotSetDVDChapter(const QString& chapterStr) +void XinePart::slotSetDVDChapter(const TQString& chapterStr) { bool ok; uint chapter = chapterStr.toInt(&ok); @@ -662,7 +662,7 @@ void XinePart::slotSetDVDChapter(const QString& chapterStr) setDVDChapter(chapter); } -void XinePart::slotSetDVDAngle(const QString& angleStr) +void XinePart::slotSetDVDAngle(const TQString& angleStr) { bool ok; uint angle = angleStr.toInt(&ok); @@ -672,7 +672,7 @@ void XinePart::slotSetDVDAngle(const QString& angleStr) uint chapter = m_xine->currentDVDChapterNumber(); KURL url = m_mrl.kurl(); - url.addPath(QString::number(title) + "." + QString::number(chapter) + "." + QString::number(angle)); + url.addPath(TQString::number(title) + "." + TQString::number(chapter) + "." + TQString::number(angle)); m_playlist[m_current] = MRL(url); slotPlay(true); } @@ -685,13 +685,13 @@ void XinePart::setDVDChapter(uint chapter) uint title = m_xine->currentDVDTitleNumber(); KURL url = m_mrl.kurl(); - url.addPath(QString::number(title) + "." + QString::number(chapter)); + url.addPath(TQString::number(title) + "." + TQString::number(chapter)); m_playlist[m_current] = MRL(url); slotPlay(true); } } -void XinePart::slotChannelInfo(const QStringList& audio, const QStringList& sub, int currentAudio, int currentSub) +void XinePart::slotChannelInfo(const TQStringList& audio, const TQStringList& sub, int currentAudio, int currentSub) { kdDebug() << "XinePart: slotChannelInfo: currentAudio="<<currentAudio<< " currentSub="<<currentSub<<"\n"; m_audioChannels->setItems(audio); @@ -704,14 +704,14 @@ void XinePart::slotChannelInfo(const QStringList& audio, const QStringList& sub, } else { - QStringList subFiles = m_playlist[m_current].subtitleFiles(); - QStringList subs(i18n("off")); - QString sub; - QStringList::ConstIterator end(subFiles.end()); - for (QStringList::ConstIterator it = subFiles.begin(); it != end; ++it) + TQStringList subFiles = m_playlist[m_current].subtitleFiles(); + TQStringList subs(i18n("off")); + TQString sub; + TQStringList::ConstIterator end(subFiles.end()); + for (TQStringList::ConstIterator it = subFiles.begin(); it != end; ++it) { sub = (*it); - sub = sub.remove(0 , sub.findRev('/')+1); + sub = sub.remove(0 , sub.tqfindRev('/')+1); subs.append(sub); } m_subtitles->setItems(subs); @@ -721,19 +721,19 @@ void XinePart::slotChannelInfo(const QStringList& audio, const QStringList& sub, /* if we play a DVD enable and fill menus */ if (m_playlist[m_current].url().startsWith("dvd:/")) { - QStringList titles; - QStringList chapters; - QStringList angles; + TQStringList titles; + TQStringList chapters; + TQStringList angles; uint titlesCount = m_xine->getDVDTitleCount(); uint chaptersCount = m_xine->getDVDChapterCount(); uint anglesCount = m_xine->getDVDAngleCount(); for (uint i = 1; i <= titlesCount; i++) - titles.append(QString::number(i)); + titles.append(TQString::number(i)); for (uint i = 1; i <= chaptersCount; i++) - chapters.append(QString::number(i)); + chapters.append(TQString::number(i)); for (uint i = 1; i <= anglesCount; i++) - angles.append(QString::number(i)); + angles.append(TQString::number(i)); m_dvdTitles->setItems(titles); m_dvdTitles->setCurrentItem(m_xine->currentDVDTitleNumber() - 1); @@ -749,10 +749,10 @@ void XinePart::slotChannelInfo(const QStringList& audio, const QStringList& sub, } } -void XinePart::slotNewPosition(int pos, const QTime& playtime) +void XinePart::slotNewPosition(int pos, const TQTime& playtime) { - QTime length = m_xine->getLength(); - QTime calcLength; + TQTime length = m_xine->getLength(); + TQTime calcLength; //if (!m_xine->isSeekable() || length.isNull() || length < playtime) if (!m_xine->isSeekable() ) @@ -776,7 +776,7 @@ void XinePart::slotNewPosition(int pos, const QTime& playtime) else m_playTime->setText(calcLength.toString("h:mm:ss")); - QString timeMessage; + TQString timeMessage; if (m_isOsdTimer) { if (m_timerDirection == BACKWARD_TIMER || length.isNull() || length < playtime) @@ -786,17 +786,17 @@ void XinePart::slotNewPosition(int pos, const QTime& playtime) } else { - timeMessage = i18n("%1 of %2").arg(calcLength.toString("h:mm:ss")).arg(length.toString("h:mm:ss")); + timeMessage = i18n("%1 of %2").tqarg(calcLength.toString("h:mm:ss")).tqarg(length.toString("h:mm:ss")); m_xine->showOSDMessage(timeMessage, 600, OSD_MESSAGE_LOW_PRIORITY); } } currentPosition = (playtime.hour()*3600)+(playtime.minute()*60)+playtime.second(); } -QString XinePart::screenShot() +TQString XinePart::screenShot() { - QString filename = QDir::homeDirPath()+"/kaffeinedcopshot.jpg"; - QImage shot = m_xine->getScreenshot(); + TQString filename = TQDir::homeDirPath()+"/kaffeinedcopshot.jpg"; + TQImage shot = m_xine->getScreenshot(); if ( shot.save( filename, "JPEG" ) ) return filename; else @@ -805,7 +805,7 @@ QString XinePart::screenShot() void XinePart::slotScreenshot() { - QImage shot = m_xine->getScreenshot(); + TQImage shot = m_xine->getScreenshot(); KFileDialog dlg(":kaffeineMain_Screenshot", i18n("*.png|PNG-File\n*.bmp|BMP-File\n*.xbm|XBM-File"), 0, "save screenshot", true); @@ -817,12 +817,12 @@ void XinePart::slotScreenshot() dlg.setPreviewWidget(prev); dlg.exec(); - QString fileName = dlg.selectedFile(); + TQString fileName = dlg.selectedFile(); if (fileName.isEmpty()) return; - QString type = dlg.currentFilter(); + TQString type = dlg.currentFilter(); type = (type.remove(0,2)).upper(); kdDebug() << "XinePart: Save screenshot as " << type << "\n"; @@ -835,14 +835,14 @@ void XinePart::slotFilterDialog() if (!m_filterDialog) { m_filterDialog = new FilterDialog(m_xine->getAudioFilterNames(), m_xine->getVideoFilterNames()); - connect(m_filterDialog, SIGNAL(signalCreateAudioFilter(const QString&, QWidget*)), - m_xine, SLOT(slotCreateAudioFilter(const QString&, QWidget*))); - connect(m_filterDialog, SIGNAL(signalCreateVideoFilter(const QString&, QWidget*)), - m_xine, SLOT(slotCreateVideoFilter(const QString&, QWidget*))); - connect(m_filterDialog, SIGNAL(signalRemoveAllAudioFilters()), m_xine, SLOT(slotRemoveAllAudioFilters())); - connect(m_filterDialog, SIGNAL(signalRemoveAllVideoFilters()), m_xine, SLOT(slotRemoveAllVideoFilters())); - connect(m_filterDialog, SIGNAL(signalUseAudioFilters(bool)), m_xine, SLOT(slotEnableAudioFilters(bool))); - connect(m_filterDialog, SIGNAL(signalUseVideoFilters(bool)), m_xine, SLOT(slotEnableVideoFilters(bool))); + connect(m_filterDialog, TQT_SIGNAL(signalCreateAudioFilter(const TQString&, TQWidget*)), + m_xine, TQT_SLOT(slotCreateAudioFilter(const TQString&, TQWidget*))); + connect(m_filterDialog, TQT_SIGNAL(signalCreateVideoFilter(const TQString&, TQWidget*)), + m_xine, TQT_SLOT(slotCreateVideoFilter(const TQString&, TQWidget*))); + connect(m_filterDialog, TQT_SIGNAL(signalRemoveAllAudioFilters()), TQT_TQOBJECT(m_xine), TQT_SLOT(slotRemoveAllAudioFilters())); + connect(m_filterDialog, TQT_SIGNAL(signalRemoveAllVideoFilters()), TQT_TQOBJECT(m_xine), TQT_SLOT(slotRemoveAllVideoFilters())); + connect(m_filterDialog, TQT_SIGNAL(signalUseAudioFilters(bool)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotEnableAudioFilters(bool))); + connect(m_filterDialog, TQT_SIGNAL(signalUseVideoFilters(bool)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotEnableVideoFilters(bool))); } m_filterDialog->show(); m_filterDialog->raise(); @@ -852,10 +852,10 @@ void XinePart::slotDeinterlaceQuality() { if (!m_deinterlacerConfigWidget) return; - DeinterlaceQuality* deinterlaceQuality = new DeinterlaceQuality((QWidget*)m_deinterlacerConfigWidget); + DeinterlaceQuality* deinterlaceQuality = new DeinterlaceQuality((TQWidget*)m_deinterlacerConfigWidget); deinterlaceQuality->setQuality(m_lastDeinterlaceQuality); - connect(deinterlaceQuality, SIGNAL(signalSetDeinterlaceConfig(const QString&)), - m_xine, SLOT(slotSetDeinterlaceConfig(const QString&))); + connect(deinterlaceQuality, TQT_SIGNAL(signalSetDeinterlaceConfig(const TQString&)), + m_xine, TQT_SLOT(slotSetDeinterlaceConfig(const TQString&))); deinterlaceQuality->exec(); @@ -903,12 +903,12 @@ void XinePart::slotPictureSettings() int hue, sat, contrast, bright, avOffset, spuOffset; m_xine->getVideoSettings(hue, sat, contrast, bright, avOffset, spuOffset); m_pictureSettings = new VideoSettings(hue, sat, contrast, bright, avOffset, spuOffset); - connect(m_pictureSettings, SIGNAL(signalNewHue(int)), this, SLOT(slotSetHue(int))); - connect(m_pictureSettings, SIGNAL(signalNewSaturation(int)), this, SLOT(slotSetSaturation(int))); - connect(m_pictureSettings, SIGNAL(signalNewContrast(int)), this, SLOT(slotSetContrast(int))); - connect(m_pictureSettings, SIGNAL(signalNewBrightness(int)), this, SLOT(slotSetBrightness(int))); - connect(m_pictureSettings, SIGNAL(signalNewAVOffset(int)), m_xine, SLOT(slotSetAVOffset(int))); - connect(m_pictureSettings, SIGNAL(signalNewSpuOffset(int)), m_xine, SLOT(slotSetSpuOffset(int))); + connect(m_pictureSettings, TQT_SIGNAL(signalNewHue(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetHue(int))); + connect(m_pictureSettings, TQT_SIGNAL(signalNewSaturation(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetSaturation(int))); + connect(m_pictureSettings, TQT_SIGNAL(signalNewContrast(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetContrast(int))); + connect(m_pictureSettings, TQT_SIGNAL(signalNewBrightness(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetBrightness(int))); + connect(m_pictureSettings, TQT_SIGNAL(signalNewAVOffset(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetAVOffset(int))); + connect(m_pictureSettings, TQT_SIGNAL(signalNewSpuOffset(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetSpuOffset(int))); } m_pictureSettings->show(); m_pictureSettings->raise(); @@ -926,7 +926,7 @@ void XinePart::slotToggleBroadcastSend() if (m_broadcastSend->isChecked()) { - m_broadcastPort = (uint)KInputDialog::getInteger( QString::null, i18n("Broadcasting port:"), m_broadcastPort, 0, 1000000, 1, &ok); + m_broadcastPort = (uint)KInputDialog::getInteger( TQString(), i18n("Broadcasting port:"), m_broadcastPort, 0, 1000000, 1, &ok); if (!ok) { m_broadcastSend->setChecked(false); @@ -949,18 +949,18 @@ void XinePart::slotBroadcastReceive() } KDialogBase* dialog = new KDialogBase(0, "configmaster", true, i18n("Configure Receive Broadcast Stream"), KDialogBase::Ok|KDialogBase::Cancel); - QVBox* page = dialog->makeVBoxMainWidget(); - new QLabel(i18n("Sender address:"), page); + TQVBox* page = dialog->makeVBoxMainWidget(); + new TQLabel(i18n("Sender address:"), page); KLineEdit* address = new KLineEdit(m_broadcastAddress, page); - new QLabel(i18n("Port:"), page); - QSpinBox* port = new QSpinBox(0, 1000000, 1, page); + new TQLabel(i18n("Port:"), page); + TQSpinBox* port = new TQSpinBox(0, 1000000, 1, page); port->setValue(m_broadcastPort); if (dialog->exec() == KDialogBase::Accepted) { m_broadcastPort = port->value(); m_broadcastAddress = address->text(); - openURL(MRL(QString("slave://") + m_broadcastAddress + ":" + QString::number(m_broadcastPort))); + openURL(MRL(TQString("slave://") + m_broadcastAddress + ":" + TQString::number(m_broadcastPort))); } delete dialog; } @@ -970,13 +970,13 @@ void XinePart::slotJumpToPosition() if (!m_xine->isSeekable()) return; - KDialogBase* dialog = new KDialogBase( 0, "configmaster", true, QString::null, KDialogBase::Ok|KDialogBase::Cancel ); - QVBox* page = dialog->makeVBoxMainWidget(); + KDialogBase* dialog = new KDialogBase( 0, "configmaster", true, TQString(), KDialogBase::Ok|KDialogBase::Cancel ); + TQVBox* page = dialog->makeVBoxMainWidget(); page->setMargin(5); page->setSpacing(5); dialog->disableResize(); - new QLabel(i18n("Jump to position:"), page); - QTimeEdit* timeEdit = new QTimeEdit(page); + new TQLabel(i18n("Jump to position:"), page); + TQTimeEdit* timeEdit = new TQTimeEdit(page); if (!m_xine->getLength().isNull()) { timeEdit->setMaxValue(m_xine->getLength()); @@ -1001,7 +1001,7 @@ void XinePart::slotButtonTimerReleased() return; /* If short click toggle timer Mode*/ m_osdTimerEnabler.stop(); //kdDebug() << "XinePart: Toggling forward/backward Timer." << endl; - QTime length = m_xine->getLength(); + TQTime length = m_xine->getLength(); if (!length.isNull()) /* if length not available counting backwards has no meaning */ { @@ -1032,7 +1032,7 @@ void XinePart::slotConfigXine() delete xineConfigDialog; } -void XinePart::slotError(const QString& errMessage) +void XinePart::slotError(const TQString& errMessage) { if ((m_playlist.count() > 0) && (m_current < m_playlist.count() - 1)) { @@ -1047,18 +1047,18 @@ void XinePart::slotError(const QString& errMessage) } } -void XinePart::slotMessage(const QString& message) +void XinePart::slotMessage(const TQString& message) { - QString msg = message; + TQString msg = message; if ( msg.startsWith("@") ) { - if ( m_xine->isPlaying() && m_xine->getURL().contains("#") ) // do not warn for url containing # + if ( m_xine->isPlaying() && m_xine->getURL().tqcontains("#") ) // do not warn for url containing # return; msg.remove(0,1); } KMessageBox::information(0, msg, i18n("xine Message")); } -void XinePart::slotStatus(const QString& status) +void XinePart::slottqStatus(const TQString& status) { emit setStatusBarText(status); if ((status != i18n("Ready")) && (status != i18n("Playing"))) @@ -1069,11 +1069,11 @@ void XinePart::slotStatus(const QString& status) void XinePart::slotTrackPlaying() { - QString caption; + TQString caption; kdDebug() << "XinePart: xine is playing" << endl; m_pauseButton->setChecked(false); - QTimer::singleShot(100, this, SLOT(slotEnablePlayActions())); + TQTimer::singleShot(100, TQT_TQOBJECT(this), TQT_SLOT(slotEnablePlayActions())); if ( m_xine->getURL()=="DVB" ) { @@ -1088,8 +1088,8 @@ void XinePart::slotTrackPlaying() if (mrl.length().isNull()) /* no meta */ { - if ((!m_xine->getTitle().isEmpty()) && (!m_xine->getTitle().contains('/')) - && (m_xine->getTitle().contains(QRegExp("\\w")) > 2) && (m_xine->getTitle().left(5).lower() != "track")) + if ((!m_xine->getTitle().isEmpty()) && (!m_xine->getTitle().tqcontains('/')) + && (m_xine->getTitle().tqcontains(TQRegExp("\\w")) > 2) && (m_xine->getTitle().left(5).lower() != "track")) mrl.setTitle(m_xine->getTitle()); if ((mrl.artist().isEmpty()) && (!m_xine->getArtist().isEmpty())) mrl.setArtist(m_xine->getArtist()); @@ -1113,7 +1113,7 @@ void XinePart::slotTrackPlaying() caption = mrl.title(); if (!mrl.artist().isEmpty()) - caption.append(QString(" (") + mrl.artist() + ")"); + caption.append(TQString(" (") + mrl.artist() + ")"); emit setWindowCaption(caption); m_xine->showOSDMessage(caption, DEFAULT_OSD_DURATION); //emit signalNewFrameSize(m_xine->getVideoSize()); @@ -1151,7 +1151,7 @@ void XinePart::slotNewFrameSize() emit signalNewFrameSize(m_xine->getVideoSize()); } -void XinePart::slotContextMenu(const QPoint& pos) +void XinePart::slotContextMenu(const TQPoint& pos) { if (factory()) { @@ -1200,7 +1200,7 @@ void XinePart::slotInfo() { MRL mrl; if ( m_xine->getURL()=="DVB" ) - mrl=MRL( QString("DVB"), m_xine->getTitle() ); + mrl=MRL( TQString("DVB"), m_xine->getTitle() ); else { if ((m_mrl.isEmpty()) || (m_xine->getTitle().isNull())) @@ -1208,8 +1208,8 @@ void XinePart::slotInfo() mrl = m_playlist[m_current]; } - QString info; - QTextStream ts(&info, IO_WriteOnly); + TQString info; + TQTextStream ts(&info, IO_WriteOnly); ts << "<qt><table width=\"90%\">"; ts << "<tr><td colspan=\"2\"><center><b>" << mrl.title() << "</b></center></td></tr>"; if (!mrl.artist().isNull()) @@ -1228,7 +1228,7 @@ void XinePart::slotInfo() ts << "<br>"; ts << "<tr><td><b>" << i18n("Mime") << ":</b></td><td> " << mrl.mime() << "</td></tr>"; if (m_xine->hasAudio()) - ts << "<tr><td><b>" << i18n("Audio") << ":</b></td><td> " << m_xine->getAudioCodec() << " " << QString::number(m_xine->getAudioBitrate()/1000) + ts << "<tr><td><b>" << i18n("Audio") << ":</b></td><td> " << m_xine->getAudioCodec() << " " << TQString::number(m_xine->getAudioBitrate()/1000) << "kb/s</td></tr>"; if (m_xine->hasVideo()) ts << "<tr><td><b>" << i18n("Video") << ":</b></td><td> " << m_xine->getVideoCodec() << " " << m_xine->getVideoSize().width() << "x" @@ -1240,7 +1240,7 @@ void XinePart::slotInfo() if (m_xine->hasSaveURL()) ts << "<tr><td><b>" << i18n("Save Stream as") << ":</b></td><td> " << m_xine->getSaveURL() << "</td></tr>"; - ts << "<tr><td></td><td></td></tr>"; // added for better layout + ts << "<tr><td></td><td></td></tr>"; // added for better tqlayout ts << "</table></qt>"; KMessageBox::information(0, info, i18n("Track info") ); } @@ -1276,25 +1276,25 @@ void XinePart::slotFinalize() actionCollection()->action("file_save_screenshot")->plug(m_embeddedContext); actionCollection()->action("file_save_stream")->plug(m_embeddedContext); m_embeddedContext->insertSeparator(); - action = new KAction(i18n("Copy URL to Clipboard"), "editcopy", 0, this, SLOT(slotCopyToClipboard()), actionCollection(), "copy_to_clipboard"); + action = new KAction(i18n("Copy URL to Clipboard"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCopyToClipboard()), actionCollection(), "copy_to_clipboard"); action->plug(m_embeddedContext); - action = new KAction(i18n("Play in Kaffeine Externally"), "gear", 0, this, SLOT(slotLaunchExternally()), actionCollection(), "play_externally"); + action = new KAction(i18n("Play in Kaffeine Externally"), "gear", 0, TQT_TQOBJECT(this), TQT_SLOT(slotLaunchExternally()), actionCollection(), "play_externally"); action->plug(m_embeddedContext); } - QStringList visuals = m_xine->getVisualPlugins(); + TQStringList visuals = m_xine->getVisualPlugins(); visuals.prepend("none"); m_audioVisual->setItems(visuals); loadConfig(); - QTimer::singleShot(0, this, SLOT(slotEnableAllActions())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableAllActions())); } void XinePart::slotCopyToClipboard() { kdDebug() << "XinePart: Send URL to klipper: " << m_mrl.url() << endl; DCOPClient* client = KApplication::dcopClient(); - if (!client->send("klipper", "klipper", "setClipboardContents(QString)", m_mrl.url())) + if (!client->send("klipper", "klipper", "setClipboardContents(TQString)", m_mrl.url())) kdError() << "Can't send current URL to klipper" << endl; } @@ -1302,7 +1302,7 @@ void XinePart::slotLaunchExternally() { slotStop(); - QTimer::singleShot(1000, this, SLOT(slotLaunchDelayed())); + TQTimer::singleShot(1000, TQT_TQOBJECT(this), TQT_SLOT(slotLaunchDelayed())); } void XinePart::slotLaunchDelayed() @@ -1319,168 +1319,168 @@ void XinePart::initActions() { KAction* action = NULL; /* file menu */ - m_broadcastSend = new KToggleAction(i18n("&Send Broadcast Stream..."), 0, 0, this, SLOT(slotToggleBroadcastSend()), actionCollection(), "network_send"); - new KAction(i18n("&Receive Broadcast Stream..."), "network", 0, this, SLOT(slotBroadcastReceive()), actionCollection(), "network_receive"); - new KAction(i18n("&Save Screenshot..."), "frame_image", CTRL|Key_S, this, SLOT(slotScreenshot()), actionCollection(), "file_save_screenshot"); - action = new KAction(i18n("Save Stream..."), "player_record", Key_R, this, SLOT(slotSaveStream()), actionCollection(), "file_save_stream"); + m_broadcastSend = new KToggleAction(i18n("&Send Broadcast Stream..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleBroadcastSend()), actionCollection(), "network_send"); + new KAction(i18n("&Receive Broadcast Stream..."), "network", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBroadcastReceive()), actionCollection(), "network_receive"); + new KAction(i18n("&Save Screenshot..."), "frame_image", CTRL|Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotScreenshot()), actionCollection(), "file_save_screenshot"); + action = new KAction(i18n("Save Stream..."), "player_record", Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotSaveStream()), actionCollection(), "file_save_stream"); action->setWhatsThis(i18n("Saves current stream to harddisc. This feature was disabled for some formats (e.g. Real Media) to prevent potential legal problems.")); /* player menu */ - new KAction(i18n("Toggle Minimal Mode"), 0, 0, this, SIGNAL(signalToggleMinimalMode()), actionCollection(), "player_minimal_mode"); + new KAction(i18n("Toggle Minimal Mode"), 0, 0, this, TQT_SIGNAL(signalToggleMinimalMode()), actionCollection(), "player_minimal_mode"); - new KAction(i18n("Play"), "player_play", 0, this, SLOT(slotPlay()), actionCollection(), "player_play"); - m_pauseButton = new KToggleAction(i18n("Pause"), "player_pause", Key_Space, this, SLOT(slotTogglePause()), actionCollection(), "player_pause"); - new KAction(i18n("&Next"), "player_end", Key_PageDown, this, SLOT(slotNext()), actionCollection(), "player_next"); - new KAction(i18n("&Previous"), "player_start", Key_PageUp, this, SLOT(slotPrevious()), actionCollection(), "player_previous"); - new KAction(i18n("Stop"), "player_stop", Key_Backspace, this, SLOT(slotStop()), actionCollection(), "player_stop"); + new KAction(i18n("Play"), "player_play", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlay()), actionCollection(), "player_play"); + m_pauseButton = new KToggleAction(i18n("Pause"), "player_pause", Key_Space, TQT_TQOBJECT(this), TQT_SLOT(slotTogglePause()), actionCollection(), "player_pause"); + new KAction(i18n("&Next"), "player_end", Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(slotNext()), actionCollection(), "player_next"); + new KAction(i18n("&Previous"), "player_start", Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(slotPrevious()), actionCollection(), "player_previous"); + new KAction(i18n("Stop"), "player_stop", Key_Backspace, TQT_TQOBJECT(this), TQT_SLOT(slotStop()), actionCollection(), "player_stop"); - new KAction(i18n("&Fast Forward"), "player_fwd", ALT|Key_Right, this, SLOT(slotFastForward()), actionCollection(), "player_ff"); - new KAction(i18n("Slow &Motion"), 0, ALT|Key_Left, this, SLOT(slotSlowMotion()), actionCollection(), "player_slowmotion"); + new KAction(i18n("&Fast Forward"), "player_fwd", ALT|Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotFastForward()), actionCollection(), "player_ff"); + new KAction(i18n("Slow &Motion"), 0, ALT|Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotSlowMotion()), actionCollection(), "player_slowmotion"); - new KAction(i18n("Skip Forward (20s)"), NULL, Key_Right, this, SLOT(slotPosPlusSmall()), actionCollection(), "player_posplus_small"); - new KAction(i18n("Skip Backward (20s)"), NULL, Key_Left, this, SLOT(slotPosMinusSmall()), actionCollection(), "player_posminus_small"); - new KAction(i18n("Skip Forward (1m)"), NULL, CTRL|Key_PageUp, this, SLOT(slotPosPlusMedium()), actionCollection(), "player_posplus_medium"); - new KAction(i18n("Skip Backward (1m)"), NULL, CTRL|Key_PageDown, this, SLOT(slotPosMinusMedium()), actionCollection(), "player_posminus_medium"); - new KAction(i18n("Skip Forward (10m)"), NULL, ALT|Key_PageUp, this, SLOT(slotPosPlusLarge()), actionCollection(), "player_posplus_large"); - new KAction(i18n("Skip Backward (10m)"), NULL, ALT|Key_PageDown, this, SLOT(slotPosMinusLarge()), actionCollection(), "player_posminus_large"); - new KAction(i18n("Jump to Position..."), "goto", CTRL|Key_J, this, SLOT(slotJumpToPosition()), actionCollection(), "player_jump_to"); + new KAction(i18n("Skip Forward (20s)"), NULL, Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotPosPlusSmall()), actionCollection(), "player_posplus_small"); + new KAction(i18n("Skip Backward (20s)"), NULL, Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotPosMinusSmall()), actionCollection(), "player_posminus_small"); + new KAction(i18n("Skip Forward (1m)"), NULL, CTRL|Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(slotPosPlusMedium()), actionCollection(), "player_posplus_medium"); + new KAction(i18n("Skip Backward (1m)"), NULL, CTRL|Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(slotPosMinusMedium()), actionCollection(), "player_posminus_medium"); + new KAction(i18n("Skip Forward (10m)"), NULL, ALT|Key_PageUp, TQT_TQOBJECT(this), TQT_SLOT(slotPosPlusLarge()), actionCollection(), "player_posplus_large"); + new KAction(i18n("Skip Backward (10m)"), NULL, ALT|Key_PageDown, TQT_TQOBJECT(this), TQT_SLOT(slotPosMinusLarge()), actionCollection(), "player_posminus_large"); + new KAction(i18n("Jump to Position..."), "goto", CTRL|Key_J, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToPosition()), actionCollection(), "player_jump_to"); - new KAction(i18n("DVD Menu Left"), 0, CTRL|Key_Left, this, SLOT(slotDVDMenuLeft()), actionCollection(), "dvdmenuleft"); - new KAction(i18n("DVD Menu Right"), 0, CTRL|Key_Right, this, SLOT(slotDVDMenuRight()), actionCollection(), "dvdmenuright"); - new KAction(i18n("DVD Menu Up"), 0, CTRL|Key_Up, this, SLOT(slotDVDMenuUp()), actionCollection(), "dvdmenuup"); - new KAction(i18n("DVD Menu Down"), 0, CTRL|Key_Down, this, SLOT(slotDVDMenuDown()), actionCollection(), "dvdmenudown"); - new KAction(i18n("DVD Menu Select"), 0, CTRL|Key_Return, this, SLOT(slotDVDMenuSelect()), actionCollection(), "dvdmenuselect"); + new KAction(i18n("DVD Menu Left"), 0, CTRL|Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotDVDMenuLeft()), actionCollection(), "dvdmenuleft"); + new KAction(i18n("DVD Menu Right"), 0, CTRL|Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotDVDMenuRight()), actionCollection(), "dvdmenuright"); + new KAction(i18n("DVD Menu Up"), 0, CTRL|Key_Up, TQT_TQOBJECT(this), TQT_SLOT(slotDVDMenuUp()), actionCollection(), "dvdmenuup"); + new KAction(i18n("DVD Menu Down"), 0, CTRL|Key_Down, TQT_TQOBJECT(this), TQT_SLOT(slotDVDMenuDown()), actionCollection(), "dvdmenudown"); + new KAction(i18n("DVD Menu Select"), 0, CTRL|Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotDVDMenuSelect()), actionCollection(), "dvdmenuselect"); m_audioChannels = new KSelectAction(i18n("Audio Channel"), 0, actionCollection(), "audio_channels"); m_audioChannels->setToolTip(i18n("Select audio channel")); m_audioChannels->setComboWidth( 50 ); - connect(m_audioChannels, SIGNAL(activated(int)), this, SLOT(slotSetAudioChannel(int ))); - new KAction(i18n("&Next Audio Channel"), 0, 0, this, SLOT(slotNextAudioChannel()), actionCollection(), "next_audio_channels"); + connect(m_audioChannels, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetAudioChannel(int ))); + new KAction(i18n("&Next Audio Channel"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNextAudioChannel()), actionCollection(), "next_audio_channels"); m_audioVisual = new KSelectAction(i18n("Audio &Visualization"), 0, actionCollection(), "audio_visualization"); - connect(m_audioVisual, SIGNAL(activated(const QString&)), m_xine, SLOT(slotSetVisualPlugin(const QString&))); - new KAction(i18n("&Mute"), "player_mute", Key_U, this, SLOT(slotMute()), actionCollection(), "audio_mute"); - new KAction(i18n("Volume Up"), NULL, Key_Plus, this, SLOT(slotVolumeUp()), actionCollection(), "volume_increase"); - new KAction(i18n("Volume Down"), NULL, Key_Minus, this, SLOT(slotVolumeDown()), actionCollection(), "volume_decrease"); + connect(m_audioVisual, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetVisualPlugin(const TQString&))); + new KAction(i18n("&Mute"), "player_mute", Key_U, TQT_TQOBJECT(this), TQT_SLOT(slotMute()), actionCollection(), "audio_mute"); + new KAction(i18n("Volume Up"), NULL, Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(slotVolumeUp()), actionCollection(), "volume_increase"); + new KAction(i18n("Volume Down"), NULL, Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(slotVolumeDown()), actionCollection(), "volume_decrease"); - m_deinterlaceEnabled = new KToggleAction(i18n("&Deinterlace"), 0, Key_I, m_xine, SLOT(slotToggleDeinterlace()), actionCollection(), "video_deinterlace"); + m_deinterlaceEnabled = new KToggleAction(i18n("&Deinterlace"), 0, Key_I, TQT_TQOBJECT(m_xine), TQT_SLOT(slotToggleDeinterlace()), actionCollection(), "video_deinterlace"); m_deinterlaceEnabled->setWhatsThis(i18n("Activate this for interlaced streams, some DVD's for example.")); - new KAction(i18n("&Auto"), "viewmagfit", Key_F5, m_xine, SLOT(slotAspectRatioAuto()), actionCollection(), "aspect_auto"); - new KAction(i18n("&4:3"), "viewmagfit", Key_F6, m_xine, SLOT(slotAspectRatio4_3()), actionCollection(), "aspect_43"); - new KAction(i18n("A&namorphic"), "viewmagfit", Key_F7, m_xine, SLOT(slotAspectRatioAnamorphic()), actionCollection(), "aspect_anamorphic"); - new KAction(i18n("&DVB"), "viewmagfit", Key_F8, m_xine, SLOT(slotAspectRatioDVB()), actionCollection(), "aspect_dvb"); - new KAction(i18n("&Square"), "viewmagfit", Key_F9, m_xine, SLOT(slotAspectRatioSquare()), actionCollection(), "aspect_square"); - KStdAction::zoomIn(m_xine, SLOT(slotZoomIn()), actionCollection(), "zoom_in"); - KStdAction::zoomOut(m_xine, SLOT(slotZoomOut()), actionCollection(), "zoom_out"); - KStdAction::fitToPage(m_xine, SLOT(slotZoomOff()), actionCollection(), "zoom_off"); - new KAction(i18n("Zoom In Horizontal"), NULL, CTRL|Key_H, m_xine, SLOT(slotZoomInX()), actionCollection(), "zoom_in_x"); - new KAction(i18n("Zoom Out Horizontal"), NULL, CTRL|SHIFT|Key_H, m_xine, SLOT(slotZoomOutX()), actionCollection(), "zoom_out_x"); - new KAction(i18n("Zoom In Vertical"), NULL, CTRL|Key_V, m_xine, SLOT(slotZoomInY()), actionCollection(), "zoom_in_y"); - new KAction(i18n("Zoom Out Vertical"), NULL, CTRL|SHIFT|Key_V, m_xine, SLOT(slotZoomOutY()), actionCollection(), "zoom_out_y"); - new KAction(i18n("Deinterlace &Quality"), "blend", CTRL|Key_I, this, SLOT(slotDeinterlaceQuality()), actionCollection(), "video_deinterlace_quality"); - new KAction(i18n("&Video Settings"), "configure", Key_V, this, SLOT(slotPictureSettings()), actionCollection(), "video_picture"); - new KAction(i18n("&Equalizer"), NULL, Key_E, this, SLOT(slotEqualizer()), actionCollection(), "equalizer"); + new KAction(i18n("&Auto"), "viewmagfit", Key_F5, TQT_TQOBJECT(m_xine), TQT_SLOT(slotAspectRatioAuto()), actionCollection(), "aspect_auto"); + new KAction(i18n("&4:3"), "viewmagfit", Key_F6, TQT_TQOBJECT(m_xine), TQT_SLOT(slotAspectRatio4_3()), actionCollection(), "aspect_43"); + new KAction(i18n("A&namorphic"), "viewmagfit", Key_F7, TQT_TQOBJECT(m_xine), TQT_SLOT(slotAspectRatioAnamorphic()), actionCollection(), "aspect_anamorphic"); + new KAction(i18n("&DVB"), "viewmagfit", Key_F8, TQT_TQOBJECT(m_xine), TQT_SLOT(slotAspectRatioDVB()), actionCollection(), "aspect_dvb"); + new KAction(i18n("&Square"), "viewmagfit", Key_F9, TQT_TQOBJECT(m_xine), TQT_SLOT(slotAspectRatioSquare()), actionCollection(), "aspect_square"); + KStdAction::zoomIn(TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomIn()), actionCollection(), "zoom_in"); + KStdAction::zoomOut(TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomOut()), actionCollection(), "zoom_out"); + KStdAction::fitToPage(TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomOff()), actionCollection(), "zoom_off"); + new KAction(i18n("Zoom InQt::Horizontal"), NULL, CTRL|Key_H, TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomInX()), actionCollection(), "zoom_in_x"); + new KAction(i18n("Zoom OutQt::Horizontal"), NULL, CTRL|SHIFT|Key_H, TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomOutX()), actionCollection(), "zoom_out_x"); + new KAction(i18n("Zoom InQt::Vertical"), NULL, CTRL|Key_V, TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomInY()), actionCollection(), "zoom_in_y"); + new KAction(i18n("Zoom OutQt::Vertical"), NULL, CTRL|SHIFT|Key_V, TQT_TQOBJECT(m_xine), TQT_SLOT(slotZoomOutY()), actionCollection(), "zoom_out_y"); + new KAction(i18n("Deinterlace &Quality"), "blend", CTRL|Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotDeinterlaceQuality()), actionCollection(), "video_deinterlace_quality"); + new KAction(i18n("&Video Settings"), "configure", Key_V, TQT_TQOBJECT(this), TQT_SLOT(slotPictureSettings()), actionCollection(), "video_picture"); + new KAction(i18n("&Equalizer"), NULL, Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotEqualizer()), actionCollection(), "equalizer"); m_subtitles = new KSelectAction(i18n("Subtitle"), 0, actionCollection(), "player_subtitles"); m_subtitles->setToolTip(i18n("Select Subtitle")); m_subtitles->setComboWidth( 50 ); - connect(m_subtitles, SIGNAL(activated(int)), this, SLOT(slotSetSubtitle(int))); - new KAction(i18n("&Next Subtitle Channel"), 0, 0, this, SLOT(slotNextSubtitleChannel()), actionCollection(), "next_player_subtitles"); - new KAction(i18n("Delay Subtitle"), 0, CTRL|ALT|Key_Left, this, SLOT(slotDelaySubTitle()), actionCollection(), "adv_sub"); - new KAction(i18n("Advance Subtitle"), 0, CTRL|ALT|Key_Right, this, SLOT(slotAdvanceSubTitle()), actionCollection(), "delay_sub"); - new KAction(i18n("Add subtitle..."), 0, 0, this, SLOT(slotAddSubtitle()), actionCollection(), "add_subtitle"); - - new KAction(i18n("&Menu Toggle"), "view_detailed", Key_D, m_xine, SLOT(slotMenuToggle()), actionCollection(), "dvd_toggle"); - new KAction(i18n("&Title"), NULL, 0, m_xine, SLOT(slotMenuTitle()), actionCollection(), "dvd_title"); - new KAction(i18n("&Root"), NULL, 0, m_xine, SLOT(slotMenuRoot()), actionCollection(), "dvd_root"); - new KAction(i18n("&Subpicture"), NULL, 0, m_xine, SLOT(slotMenuSubpicture()), actionCollection(), "dvd_subpicture"); - new KAction(i18n("&Audio"), NULL, 0, m_xine, SLOT(slotMenuAudio()), actionCollection(), "dvd_audio"); - new KAction(i18n("An&gle"), NULL, 0, m_xine, SLOT(slotMenuAngle()), actionCollection(), "dvd_angle"); - new KAction(i18n("&Part"), NULL, 0, m_xine, SLOT(slotMenuPart()), actionCollection(), "dvd_part"); + connect(m_subtitles, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetSubtitle(int))); + new KAction(i18n("&Next Subtitle Channel"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNextSubtitleChannel()), actionCollection(), "next_player_subtitles"); + new KAction(i18n("Delay Subtitle"), 0, CTRL|ALT|Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotDelaySubTitle()), actionCollection(), "adv_sub"); + new KAction(i18n("Advance Subtitle"), 0, CTRL|ALT|Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotAdvanceSubTitle()), actionCollection(), "delay_sub"); + new KAction(i18n("Add subtitle..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddSubtitle()), actionCollection(), "add_subtitle"); + + new KAction(i18n("&Menu Toggle"), "view_detailed", Key_D, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuToggle()), actionCollection(), "dvd_toggle"); + new KAction(i18n("&Title"), NULL, 0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuTitle()), actionCollection(), "dvd_title"); + new KAction(i18n("&Root"), NULL, 0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuRoot()), actionCollection(), "dvd_root"); + new KAction(i18n("&Subpicture"), NULL, 0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuSubpicture()), actionCollection(), "dvd_subpicture"); + new KAction(i18n("&Audio"), NULL, 0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuAudio()), actionCollection(), "dvd_audio"); + new KAction(i18n("An&gle"), NULL, 0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuAngle()), actionCollection(), "dvd_angle"); + new KAction(i18n("&Part"), NULL, 0, TQT_TQOBJECT(m_xine), TQT_SLOT(slotMenuPart()), actionCollection(), "dvd_part"); m_dvdTitles = new KSelectAction(i18n("Titles"), 0, actionCollection(), "dvd_title_menu"); - connect(m_dvdTitles, SIGNAL(activated(const QString&)), this, SLOT(slotSetDVDTitle(const QString&))); + connect(m_dvdTitles, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetDVDTitle(const TQString&))); m_dvdChapters = new KSelectAction(i18n("Chapters"), 0, actionCollection(), "dvd_chapter_menu"); - connect(m_dvdChapters, SIGNAL(activated(const QString&)), this, SLOT(slotSetDVDChapter(const QString&))); + connect(m_dvdChapters, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetDVDChapter(const TQString&))); m_dvdAngles = new KSelectAction(i18n("Angles"), 0, actionCollection(), "dvd_angle_menu"); - connect(m_dvdAngles, SIGNAL(activated(const QString&)), this, SLOT(slotSetDVDAngle(const QString&))); + connect(m_dvdAngles, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetDVDAngle(const TQString&))); - new KAction(i18n("Track &Info"), "info", 0 , this, SLOT(slotInfo()), actionCollection(), "player_track_info"); - new KAction(i18n("Effect &Plugins..."), "filter", Key_X, this, SLOT(slotFilterDialog()), actionCollection(), "player_post_filters"); + new KAction(i18n("Track &Info"), "info", 0 , TQT_TQOBJECT(this), TQT_SLOT(slotInfo()), actionCollection(), "player_track_info"); + new KAction(i18n("Effect &Plugins..."), "filter", Key_X, TQT_TQOBJECT(this), TQT_SLOT(slotFilterDialog()), actionCollection(), "player_post_filters"); /* settings menu */ - new KAction(i18n("&xine Engine Parameters"), "edit", 0, this, SLOT(slotConfigXine()), actionCollection(), "settings_xine_parameter"); + new KAction(i18n("&xine Engine Parameters"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigXine()), actionCollection(), "settings_xine_parameter"); m_volume = new VolumeSlider(); - QToolTip::add + TQToolTip::add (m_volume, i18n("Volume")); m_volume->setRange(0, 100); m_volume->setSteps(1, 10); - m_volume->setFocusPolicy(QWidget::NoFocus); + m_volume->setFocusPolicy(TQ_NoFocus); m_volume->setFixedWidth(75); - connect(m_volume, SIGNAL(valueChanged(int)), this, SLOT(slotVolumeChanged(int))); - connect(m_xine, SIGNAL(signalSyncVolume()), this, SLOT(slotSyncVolume())); + connect(m_volume, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotVolumeChanged(int))); + connect(m_xine, TQT_SIGNAL(signalSyncVolume()), TQT_TQOBJECT(this), TQT_SLOT(slotSyncVolume())); new KWidgetAction(m_volume, i18n("Volume"), 0, 0, 0, actionCollection(), "audio_volume"); - m_position = new PositionSlider(Horizontal); - QToolTip::add + m_position = new PositionSlider(Qt::Horizontal); + TQToolTip::add (m_position, i18n("Position")); m_position->setRange(0, 65535); m_position->setSteps(100, 1000); m_position->setTracking(false); - m_position->setFocusPolicy(QWidget::NoFocus); + m_position->setFocusPolicy(TQ_NoFocus); m_position->setMinimumWidth(180); - connect(m_position, SIGNAL(sliderMoved(int)), m_xine, SLOT(slotSeekToPosition(int))); - connect(m_position, SIGNAL(sliderLastMove(int)), m_xine, SLOT(slotSeekToPositionBlocking(int))); - connect(m_position, SIGNAL(signalStartSeeking()), m_xine, SLOT(slotStartSeeking())); - connect(m_position, SIGNAL(signalStopSeeking()), m_xine, SLOT(slotStopSeeking())); + connect(m_position, TQT_SIGNAL(sliderMoved(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSeekToPosition(int))); + connect(m_position, TQT_SIGNAL(sliderLastMove(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSeekToPositionBlocking(int))); + connect(m_position, TQT_SIGNAL(signalStartSeeking()), TQT_TQOBJECT(m_xine), TQT_SLOT(slotStartSeeking())); + connect(m_position, TQT_SIGNAL(signalStopSeeking()), TQT_TQOBJECT(m_xine), TQT_SLOT(slotStopSeeking())); new KWidgetAction(m_position, i18n("Position"), 0, 0, 0, actionCollection(), "player_position"); - m_playTime = new QPushButton(0); - QToolTip::add + m_playTime = new TQPushButton(0); + TQToolTip::add (m_playTime, i18n("Short click: Toggle Timer Forward/Backward\nLong click: Toggle Timer OSD")); - QFontMetrics met(KGlobalSettings::generalFont()); + TQFontMetrics met(KGlobalSettings::generalFont()); m_playTime->setFixedWidth(met.width("-55:55:55") + 6); - m_playTime->setSizePolicy(QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed)); - m_playTime->setFocusPolicy(QWidget::NoFocus); + m_playTime->tqsetSizePolicy(TQSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed)); + m_playTime->setFocusPolicy(TQ_NoFocus); new KWidgetAction(m_playTime, i18n("Playtime"), 0, 0, 0, actionCollection(), "player_playtime"); - connect(m_playTime, SIGNAL(pressed()), this, SLOT(slotButtonTimerPressed())); - connect(m_playTime, SIGNAL(released()), this, SLOT(slotButtonTimerReleased())); + connect(m_playTime, TQT_SIGNAL(pressed()), TQT_TQOBJECT(this), TQT_SLOT(slotButtonTimerPressed())); + connect(m_playTime, TQT_SIGNAL(released()), TQT_TQOBJECT(this), TQT_SLOT(slotButtonTimerReleased())); m_playTime->setText("0:00:00"); m_equalizer = new Equalizer(); - connect(m_equalizer, SIGNAL(signalNewEq30(int)), m_xine, SLOT(slotSetEq30(int))); - connect(m_equalizer, SIGNAL(signalNewEq60(int)), m_xine, SLOT(slotSetEq60(int))); - connect(m_equalizer, SIGNAL(signalNewEq125(int)), m_xine, SLOT(slotSetEq125(int))); - connect(m_equalizer, SIGNAL(signalNewEq250(int)), m_xine, SLOT(slotSetEq250(int))); - connect(m_equalizer, SIGNAL(signalNewEq500(int)), m_xine, SLOT(slotSetEq500(int))); - connect(m_equalizer, SIGNAL(signalNewEq1k(int)), m_xine, SLOT(slotSetEq1k(int))); - connect(m_equalizer, SIGNAL(signalNewEq2k(int)), m_xine, SLOT(slotSetEq2k(int))); - connect(m_equalizer, SIGNAL(signalNewEq4k(int)), m_xine, SLOT(slotSetEq4k(int))); - connect(m_equalizer, SIGNAL(signalNewEq8k(int)), m_xine, SLOT(slotSetEq8k(int))); - connect(m_equalizer, SIGNAL(signalNewEq16k(int)), m_xine, SLOT(slotSetEq16k(int))); - connect(m_equalizer, SIGNAL(signalSetVolumeGain(bool)), m_xine, SLOT(slotSetVolumeGain(bool))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq30(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq30(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq60(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq60(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq125(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq125(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq250(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq250(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq500(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq500(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq1k(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq1k(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq2k(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq2k(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq4k(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq4k(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq8k(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq8k(int))); + connect(m_equalizer, TQT_SIGNAL(signalNewEq16k(int)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetEq16k(int))); + connect(m_equalizer, TQT_SIGNAL(signalSetVolumeGain(bool)), TQT_TQOBJECT(m_xine), TQT_SLOT(slotSetVolumeGain(bool))); } void XinePart::initConnections() { - connect(&m_posCheckTimer, SIGNAL(timeout()), this, SLOT(slotCheckMoved())); - connect(&m_osdTimerEnabler, SIGNAL(timeout()), this, SLOT(slotToggleOsdTimer())); - connect(m_xine, SIGNAL(signalXineReady()), this, SLOT(slotFinalize())); - connect(m_xine, SIGNAL(signalNewChannels(const QStringList&, const QStringList&, int, int )), - this, SLOT(slotChannelInfo(const QStringList&, const QStringList&, int, int ))); - connect(m_xine, SIGNAL(signalXinePlaying()), this, SLOT(slotTrackPlaying())); - connect(m_xine, SIGNAL(signalNewPosition(int, const QTime&)), this, SLOT(slotNewPosition(int, const QTime&))); - connect(m_xine, SIGNAL(signalXineStatus(const QString&)), this, SLOT(slotStatus(const QString&))); - connect(m_xine, SIGNAL(signalXineError(const QString&)), this, SLOT(slotError(const QString&))); - connect(m_xine, SIGNAL(signalXineMessage(const QString&)), this, SLOT(slotMessage(const QString&))); - connect(m_xine, SIGNAL(signalPlaybackFinished()), this, SLOT(slotPlaybackFinished())); - connect(m_xine, SIGNAL(signalTitleChanged()), this, SLOT(slotNewTitle())); - connect(m_xine, SIGNAL(signalLengthChanged()), this, SLOT(slotNewLength())); - connect(m_xine, SIGNAL(signalVideoSizeChanged()), this, SLOT(slotNewFrameSize())); - connect(m_xine, SIGNAL(signalRightClick(const QPoint&)), this, SLOT(slotContextMenu(const QPoint&))); + connect(&m_posCheckTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotCheckMoved())); + connect(&m_osdTimerEnabler, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotToggleOsdTimer())); + connect(m_xine, TQT_SIGNAL(signalXineReady()), TQT_TQOBJECT(this), TQT_SLOT(slotFinalize())); + connect(m_xine, TQT_SIGNAL(signalNewChannels(const TQStringList&, const TQStringList&, int, int )), + this, TQT_SLOT(slotChannelInfo(const TQStringList&, const TQStringList&, int, int ))); + connect(m_xine, TQT_SIGNAL(signalXinePlaying()), TQT_TQOBJECT(this), TQT_SLOT(slotTrackPlaying())); + connect(m_xine, TQT_SIGNAL(signalNewPosition(int, const TQTime&)), TQT_TQOBJECT(this), TQT_SLOT(slotNewPosition(int, const TQTime&))); + connect(m_xine, TQT_SIGNAL(signalXinetqStatus(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slottqStatus(const TQString&))); + connect(m_xine, TQT_SIGNAL(signalXineError(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotError(const TQString&))); + connect(m_xine, TQT_SIGNAL(signalXineMessage(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotMessage(const TQString&))); + connect(m_xine, TQT_SIGNAL(signalPlaybackFinished()), TQT_TQOBJECT(this), TQT_SLOT(slotPlaybackFinished())); + connect(m_xine, TQT_SIGNAL(signalTitleChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotNewTitle())); + connect(m_xine, TQT_SIGNAL(signalLengthChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotNewLength())); + connect(m_xine, TQT_SIGNAL(signalVideoSizeChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotNewFrameSize())); + connect(m_xine, TQT_SIGNAL(signalRightClick(const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(const TQPoint&))); } void XinePart::loadConfig() @@ -1501,8 +1501,8 @@ void XinePart::loadConfig() m_isOsdTimer = config->readBoolEntry("Osd Timer", false); config->setGroup("Visualization"); - QString visual = config->readEntry("Visual Plugin", "goom"); - m_audioVisual->setCurrentItem(m_audioVisual->items().findIndex(visual)); + TQString visual = config->readEntry("Visual Plugin", "goom"); + m_audioVisual->setCurrentItem(m_audioVisual->items().tqfindIndex(visual)); m_xine->slotSetVisualPlugin(visual); config->setGroup("Deinterlace"); @@ -1510,7 +1510,7 @@ void XinePart::loadConfig() m_lastDeinterlacerConfig = config->readEntry("Config String", DEFAULT_TVTIME_CONFIG); DeinterlacerConfigDialog* deinterlacerConfigDialog = new DeinterlacerConfigDialog(); m_xine->createDeinterlacePlugin(m_lastDeinterlacerConfig, deinterlacerConfigDialog->getMainWidget()); - m_deinterlacerConfigWidget = (QWidget*)deinterlacerConfigDialog; + m_deinterlacerConfigWidget = (TQWidget*)deinterlacerConfigDialog; bool deinterlaceEnabled = config->readBoolEntry("Enabled", true); if (deinterlaceEnabled) { @@ -1570,7 +1570,7 @@ void XinePart::saveConfig() of the part to xine */ void XinePart::slotCheckMoved() { - QPoint newPos = m_xine->mapToGlobal(QPoint(0,0)); + TQPoint newPos = m_xine->mapToGlobal(TQPoint(0,0)); if (newPos != m_oldPosition) { m_xine->globalPosChanged(); @@ -1589,7 +1589,7 @@ bool XinePart::isPaused() } #if 0 -void XinePart::audiocdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString& device) +void XinePart::audiocdMRLS(MRL::List& mrls, bool& ok, bool& supported, const TQString& device) { if (!m_xine->isXineReady()) { @@ -1604,7 +1604,7 @@ void XinePart::audiocdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QSt if (!device.isNull()) m_xine->slotSetAudiocdDevice(device); - QStringList list; + TQStringList list; if (!m_xine->getAutoplayPluginURLS("CD", list)) { ok = false; @@ -1615,29 +1615,29 @@ void XinePart::audiocdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QSt /* use xine to connect to CDDB */ xine_stream_t* xineStreamForMeta = xine_stream_new((xine_t*)m_xine->getXineEngine(), NULL, NULL); - KProgressDialog* progress = new KProgressDialog(0, "cddbprogress", QString::null, i18n("Looking for CDDB entries...")); + KProgressDialog* progress = new KProgressDialog(0, "cddbprogress", TQString(), i18n("Looking for CDDB entries...")); progress->progressBar()->setTotalSteps(list.count()); progress->show(); - QString title; + TQString title; bool cddb = true; for (uint i = 0; i < list.count(); i++) { mrl = MRL(list[i]); - mrl.setTitle(i18n("AudioCD Track %1").arg(i+1)); - mrl.setTrack(QString::number(i+1)); - if (xine_open(xineStreamForMeta, QFile::encodeName(mrl.url()))) + mrl.setTitle(i18n("AudioCD Track %1").tqarg(i+1)); + mrl.setTrack(TQString::number(i+1)); + if (xine_open(xineStreamForMeta, TQFile::encodeName(mrl.url()))) { if (cddb) { - title = QString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_TITLE)); + title = TQString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_TITLE)); if ((!title.isNull()) && (!title.isEmpty()) ) //no meta info { mrl.setTitle(title); - mrl.setArtist(QString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_ARTIST))); - mrl.setAlbum(QString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_ALBUM))); - mrl.setYear(QString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_YEAR))); - mrl.setGenre(QString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_GENRE))); - mrl.setTrack(QString::number(i+1)); + mrl.setArtist(TQString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_ARTIST))); + mrl.setAlbum(TQString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_ALBUM))); + mrl.setYear(TQString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_YEAR))); + mrl.setGenre(TQString::fromUtf8(xine_get_meta_info(xineStreamForMeta, XINE_META_INFO_GENRE))); + mrl.setTrack(TQString::number(i+1)); } else cddb = false; @@ -1648,7 +1648,7 @@ void XinePart::audiocdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QSt while(((ret = xine_get_pos_length(xineStreamForMeta, &pos, &time, &len)) == 0) && (++t < 5)) xine_usec_sleep(100000); if ( ( ret != 0 ) && (len > 0) ) - mrl.setLength(QTime().addMSecs(len)); + mrl.setLength(TQTime().addMSecs(len)); xine_close( xineStreamForMeta ); } @@ -1667,7 +1667,7 @@ void XinePart::audiocdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QSt ok = true; } -void XinePart::vcdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString& device) +void XinePart::vcdMRLS(MRL::List& mrls, bool& ok, bool& supported, const TQString& device) { if (!m_xine->isXineReady()) { @@ -1682,7 +1682,7 @@ void XinePart::vcdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString if (!device.isNull()) m_xine->slotSetVcdDevice(device); - QStringList list; + TQStringList list; if (!m_xine->getAutoplayPluginURLS("VCD", list)) { if (!m_xine->getAutoplayPluginURLS("VCDO", list)) @@ -1697,15 +1697,15 @@ void XinePart::vcdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString { mrl = MRL(list[i]); mrl.setMime("video/vcd"); - mrl.setTrack(QString::number(i+1)); - mrl.setTitle(i18n("VCD Track %1").arg(i+1)); + mrl.setTrack(TQString::number(i+1)); + mrl.setTitle(i18n("VCD Track %1").tqarg(i+1)); mrls.append(mrl); } if (mrls.count()) ok = true; } -void XinePart::dvdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString& device) +void XinePart::dvdMRLS(MRL::List& mrls, bool& ok, bool& supported, const TQString& device) { if (!m_xine->isXineReady()) { @@ -1720,7 +1720,7 @@ void XinePart::dvdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString if (!device.isNull()) m_xine->slotSetDvdDevice(device); - QStringList list; + TQStringList list; if (!m_xine->getAutoplayPluginURLS("DVD", list)) { ok = false; @@ -1733,7 +1733,7 @@ void XinePart::dvdMRLS(MRL::List& mrls, bool& ok, bool& supported, const QString mrl = MRL(list[i]); mrl.setMime("video/dvd"); mrl.setTitle("DVD"); - mrl.setTrack(QString::number(i+1)); + mrl.setTrack(TQString::number(i+1)); mrls.append(mrl); } if (mrls.count()) @@ -1824,16 +1824,16 @@ void XinePart::slotSetPosition(uint pos) m_xine->slotSeekToPosition((int)(pos * 655.35)); } -QString XinePart::supportedExtensions() +TQString XinePart::supportedExtensions() { if (!m_xine->isXineReady()) - return QString::null; + return TQString(); - QString ext = m_xine->getSupportedExtensions(); + TQString ext = m_xine->getSupportedExtensions(); ext = ext.remove("txt"); ext = "*." + ext; ext.append(" smil"); - ext = ext.replace( ' ', " *." ); + ext = ext.tqreplace( ' ', " *." ); ext = ext + " " + ext.upper(); return ext; @@ -2061,7 +2061,7 @@ void XinePart::zoomOff() /********** volume slider ****************/ -VolumeSlider::VolumeSlider() : QSlider(Horizontal, 0) +VolumeSlider::VolumeSlider() : TQSlider(Qt::Horizontal, 0) { installEventFilter(this); } @@ -2069,7 +2069,7 @@ VolumeSlider::VolumeSlider() : QSlider(Horizontal, 0) VolumeSlider::~VolumeSlider() {} -void VolumeSlider::wheelEvent(QWheelEvent* e) +void VolumeSlider::wheelEvent(TQWheelEvent* e) { int newVal = value(); if (e->delta() > 0) @@ -2080,23 +2080,23 @@ void VolumeSlider::wheelEvent(QWheelEvent* e) e->accept(); } -/*bool VolumeSlider::eventFilter(QObject *obj, QEvent *ev) +/*bool VolumeSlider::eventFilter(TQObject *obj, TQEvent *ev) { - if( obj == this && (ev->type() == QEvent::MouseButtonPress || - ev->type() == QEvent::MouseButtonDblClick) ) + if( obj == this && (ev->type() == TQEvent::MouseButtonPress || + ev->type() == TQEvent::MouseButtonDblClick) ) { - QMouseEvent *e = (QMouseEvent *)ev; - QRect r = sliderRect(); + TQMouseEvent *e = (TQMouseEvent *)ev; + TQRect r = sliderRect(); - if( r.contains( e->pos() ) || e->button() != LeftButton ) + if( r.tqcontains( e->pos() ) || e->button() != LeftButton ) return FALSE; int range = maxValue() - minValue(); - int pos = (orientation() == Horizontal) ? e->pos().x() : e->pos().y(); - int maxpos = (orientation() == Horizontal) ? width() : height(); + int pos = (orientation() ==Qt::Horizontal) ? e->pos().x() : e->pos().y(); + int maxpos = (orientation() ==Qt::Horizontal) ? width() : height(); int value = pos * range / maxpos + minValue(); - if (QApplication::reverseLayout()) + if (TQApplication::reverseLayout()) value = maxValue() - (value - minValue()); setValue(value); diff --git a/kaffeine/src/player-parts/xine-part/xine_part.h b/kaffeine/src/player-parts/xine-part/xine_part.h index 71769d3..78c809e 100644 --- a/kaffeine/src/player-parts/xine-part/xine_part.h +++ b/kaffeine/src/player-parts/xine-part/xine_part.h @@ -24,7 +24,7 @@ #include <kparts/factory.h> -#include <qtimer.h> +#include <tqtimer.h> #include "kaffeinepart.h" #include "xine_part_iface.h" @@ -32,13 +32,13 @@ #define FORWARD_TIMER 0 #define BACKWARD_TIMER 1 -class QWidget; -class QSlider; -class QLabel; -class QPushButton; +class TQWidget; +class TQSlider; +class TQLabel; +class TQPushButton; class MRL; class KXineWidget; -class QPoint; +class TQPoint; class KSelectAction; class KToggleAction; class Equalizer; @@ -56,8 +56,9 @@ class KPopupMenu; class XinePart : public KaffeinePart, public XinePartIface { Q_OBJECT + TQ_OBJECT public: - XinePart(QWidget*, const char*, QObject*, const char*, const QStringList&); + XinePart(TQWidget*, const char*, TQObject*, const char*, const TQStringList&); virtual ~XinePart(); /* @@ -72,7 +73,7 @@ public: void setDVDChapter(uint chapter); bool hasVideo(); - QString supportedExtensions(); + TQString supportedExtensions(); void* engine(); uint volume() const; /* percent */ uint position() const; /* percent */ @@ -105,7 +106,7 @@ public: void zoomIn(); void zoomOut(); void zoomOff(); - QString screenShot(); + TQString screenShot(); void nextAudioChannel(); void nextSubtitleChannel(); void speedFaster(); @@ -148,10 +149,10 @@ private slots: void slotNext(); void slotPrevious(); void slotSaveStream(); - void slotChannelInfo(const QStringList&, const QStringList&, int, int); + void slotChannelInfo(const TQStringList&, const TQStringList&, int, int); void slotSetSubtitle(int); void slotSetAudioChannel(int); - void slotNewPosition(int, const QTime&); + void slotNewPosition(int, const TQTime&); void slotVolumeChanged(int); void slotPictureSettings(); void slotEqualizer(); @@ -166,14 +167,14 @@ private slots: void slotToggleOsdTimer(); void slotScreenshot(); void slotConfigXine(); - void slotError(const QString&); - void slotMessage(const QString&); - void slotStatus(const QString&); + void slotError(const TQString&); + void slotMessage(const TQString&); + void slottqStatus(const TQString&); void slotNewTitle(); void slotNewLength(); void slotNewFrameSize(); void slotPlaybackFinished(); - void slotContextMenu(const QPoint&); + void slotContextMenu(const TQPoint&); void slotDisableAllActions(); void slotEnableAllActions(); void slotEnablePlayActions(); @@ -182,9 +183,9 @@ private slots: void slotLaunchDelayed(); void slotFastForward(); void slotSlowMotion(); - void slotSetDVDTitle(const QString&); - void slotSetDVDChapter(const QString&); - void slotSetDVDAngle(const QString&); + void slotSetDVDTitle(const TQString&); + void slotSetDVDChapter(const TQString&); + void slotSetDVDAngle(const TQString&); void slotDVDMenuLeft(); void slotDVDMenuRight(); void slotDVDMenuUp(); @@ -202,24 +203,24 @@ private: void saveConfig(); private: - QPoint m_oldPosition; - QTimer m_posCheckTimer; - QTimer m_osdTimerEnabler; /* Provide Long click on timer button */ - bool m_isOsdTimer; /* Status of Osd Timer (on/off) */ + TQPoint m_oldPosition; + TQTimer m_posCheckTimer; + TQTimer m_osdTimerEnabler; /* Provide Long click on timer button */ + bool m_isOsdTimer; /* tqStatus of Osd Timer (on/off) */ int m_timerDirection; /* Counting Up or Down */ int m_brightness, m_hue, m_contrast, m_saturation; MRL m_mrl; - QValueList<MRL> m_playlist; + TQValueList<MRL> m_playlist; uint m_current; uint m_lastDeinterlaceQuality; - QString m_lastDeinterlacerConfig; + TQString m_lastDeinterlacerConfig; uint m_broadcastPort; - QString m_broadcastAddress; + TQString m_broadcastAddress; - QSlider* m_volume; + TQSlider* m_volume; PositionSlider* m_position; - QPushButton* m_playTime; + TQPushButton* m_playTime; uint currentPosition; KSelectAction* m_audioChannels; @@ -235,20 +236,20 @@ private: KXineWidget* m_xine; VideoSettings* m_pictureSettings; Equalizer* m_equalizer; - QWidget* m_deinterlacerConfigWidget; + TQWidget* m_deinterlacerConfigWidget; FilterDialog* m_filterDialog; KPopupMenu* m_embeddedContext; /* dvb */ public: - QString TimeShiftFilename; + TQString TimeShiftFilename; public slots: - void slotDvbOpen( const QString &filename, const QString &chanName, int haveVideo ); - void getTimeShiftFilename( const QString &filename ); - void requestForOSD( const QString &text, int duration, int priority ); - void setDvbCurrentNext( const QString &channelname, const QStringList &list ); + void slotDvbOpen( const TQString &filename, const TQString &chanName, int haveVideo ); + void getTimeShiftFilename( const TQString &filename ); + void requestForOSD( const TQString &text, int duration, int priority ); + void setDvbCurrentNext( const TQString &channelname, const TQStringList &list ); signals: void stopDvb(); @@ -257,9 +258,9 @@ signals: }; -#include <qslider.h> +#include <tqslider.h> -class VolumeSlider : public QSlider +class VolumeSlider : public TQSlider { public: @@ -269,8 +270,8 @@ public: protected: - void wheelEvent(QWheelEvent* e); - //bool eventFilter(QObject *obj, QEvent *ev); + void wheelEvent(TQWheelEvent* e); + //bool eventFilter(TQObject *obj, TQEvent *ev); }; #endif /* XINEPART_H */ diff --git a/kaffeine/src/player-parts/xine-part/xine_part_iface.h b/kaffeine/src/player-parts/xine-part/xine_part_iface.h index 4380a84..7310f6e 100644 --- a/kaffeine/src/player-parts/xine-part/xine_part_iface.h +++ b/kaffeine/src/player-parts/xine-part/xine_part_iface.h @@ -124,7 +124,7 @@ k_dcop: virtual void zoomInY() = 0; virtual void zoomOutY() = 0; - virtual QString screenShot() = 0; + virtual TQString screenShot() = 0; virtual void nextAudioChannel() = 0; virtual void nextSubtitleChannel() = 0; diff --git a/kaffeine/src/player-parts/xine-part/xineconfig.cpp b/kaffeine/src/player-parts/xine-part/xineconfig.cpp index 55ec752..aab7a97 100644 --- a/kaffeine/src/player-parts/xine-part/xineconfig.cpp +++ b/kaffeine/src/player-parts/xine-part/xineconfig.cpp @@ -28,19 +28,19 @@ #include <kdebug.h> #include <kseparator.h> -#include <qcolor.h> -#include <qfont.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qvbox.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qptrlist.h> -#include <qstringlist.h> -#include <qlabel.h> -#include <qscrollview.h> -#include <qsignalmapper.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqvbox.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqptrlist.h> +#include <tqstringlist.h> +#include <tqlabel.h> +#include <tqscrollview.h> +#include <tqsignalmapper.h> #include "xineconfig.h" #include "xineconfig.moc" @@ -51,8 +51,8 @@ #define NON_EXPERT_OPTIONS NON_EXPERT_OPTIONS_NEW NON_EXPERT_OPTIONS_DEPRECATED -XineConfigEntry::XineConfigEntry(QWidget* parent, QGridLayout* grid, int row, xine_cfg_entry_t* entry) : - m_valueChanged(false), m_key(QString(entry->key)), m_numValue(entry->num_value), +XineConfigEntry::XineConfigEntry(TQWidget* tqparent, TQGridLayout* grid, int row, xine_cfg_entry_t* entry) : + m_valueChanged(false), m_key(TQString(entry->key)), m_numValue(entry->num_value), m_numDefault(entry->num_default), m_stringValue(entry->str_value), m_stringDefault(entry->str_default), m_stringEdit(NULL), m_enumEdit(NULL), m_numEdit(NULL), m_boolEdit(NULL) { @@ -62,18 +62,18 @@ XineConfigEntry::XineConfigEntry(QWidget* parent, QGridLayout* grid, int row, xi break; case XINE_CONFIG_TYPE_STRING: { - m_stringEdit = new KLineEdit(entry->str_value, parent); + m_stringEdit = new KLineEdit(entry->str_value, tqparent); if (!strcmp(entry->str_value,entry->str_default)) - m_stringEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_stringEdit->setPaletteForegroundColor(TQColor(darkMagenta)); else - m_stringEdit->setPaletteForegroundColor(QColor(black)); + m_stringEdit->setPaletteForegroundColor(TQColor(black)); grid->addWidget(m_stringEdit, row ,0); - connect(m_stringEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotStringChanged(const QString&))); + connect(m_stringEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotStringChanged(const TQString&))); break; } case XINE_CONFIG_TYPE_ENUM: { - m_enumEdit = new KComboBox(parent); + m_enumEdit = new KComboBox(tqparent); int i = 0; while (entry->enum_values[i]) { @@ -82,60 +82,60 @@ XineConfigEntry::XineConfigEntry(QWidget* parent, QGridLayout* grid, int row, xi } m_enumEdit->setCurrentItem(entry->num_value); if (entry->num_value == entry->num_default) - m_enumEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_enumEdit->setPaletteForegroundColor(TQColor(darkMagenta)); else - m_enumEdit->setPaletteForegroundColor(QColor(black)); + m_enumEdit->setPaletteForegroundColor(TQColor(black)); grid->addWidget(m_enumEdit, row, 0); - connect(m_enumEdit, SIGNAL(activated(int)), this, SLOT(slotNumChanged(int))); + connect(m_enumEdit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotNumChanged(int))); break; } case XINE_CONFIG_TYPE_NUM: { - m_numEdit = new QSpinBox(-999999, 999999, 1, parent); + m_numEdit = new TQSpinBox(-999999, 999999, 1, tqparent); m_numEdit->setValue(entry->num_value); if (entry->num_value == entry->num_default) - m_numEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_numEdit->setPaletteForegroundColor(TQColor(darkMagenta)); else - m_numEdit->setPaletteForegroundColor(QColor(black)); + m_numEdit->setPaletteForegroundColor(TQColor(black)); grid->addWidget(m_numEdit, row, 0); - connect(m_numEdit, SIGNAL(valueChanged(int)), this, SLOT(slotNumChanged(int))); + connect(m_numEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotNumChanged(int))); break; } case XINE_CONFIG_TYPE_RANGE: { - m_numEdit = new QSpinBox(parent); + m_numEdit = new TQSpinBox(tqparent); m_numEdit->setValue(entry->num_value); m_numEdit->setRange(entry->range_min, entry->range_max); if (entry->num_value == entry->num_default) - m_numEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_numEdit->setPaletteForegroundColor(TQColor(darkMagenta)); else - m_numEdit->setPaletteForegroundColor(QColor(black)); + m_numEdit->setPaletteForegroundColor(TQColor(black)); grid->addWidget(m_numEdit, row, 0); - connect(m_numEdit, SIGNAL(valueChanged(int)), this, SLOT(slotNumChanged(int))); + connect(m_numEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotNumChanged(int))); break; } case XINE_CONFIG_TYPE_BOOL: { - m_boolEdit = new QCheckBox(parent); + m_boolEdit = new TQCheckBox(tqparent); m_boolEdit->setChecked(entry->num_value); if (entry->num_value == entry->num_default) - m_boolEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_boolEdit->setPaletteForegroundColor(TQColor(darkMagenta)); else - m_boolEdit->setPaletteForegroundColor(QColor(black)); + m_boolEdit->setPaletteForegroundColor(TQColor(black)); grid->addWidget(m_boolEdit, row, 0); - connect(m_boolEdit, SIGNAL(toggled(bool)), this, SLOT(slotBoolChanged(bool))); + connect(m_boolEdit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotBoolChanged(bool))); break; } } - QString m_keyName(entry->key); - m_keyName.remove( 0, m_keyName.find(".") + 1 ); + TQString m_keyName(entry->key); + m_keyName.remove( 0, m_keyName.tqfind(".") + 1 ); - QLabel* description = new QLabel(m_keyName + "\n" + QString::fromLocal8Bit(entry->description), parent); - description->setAlignment( QLabel::WordBreak | QLabel::AlignVCenter ); + TQLabel* description = new TQLabel(m_keyName + "\n" + TQString::fromLocal8Bit(entry->description), tqparent); + description->tqsetAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter ); grid->addWidget(description, row, 1); - KSeparator* separator = new KSeparator(KSeparator::Horizontal, parent); + KSeparator* separator = new KSeparator(Qt::Horizontal, tqparent); grid->addMultiCellWidget(separator, row+1, row+1, 0, 1); } @@ -181,28 +181,28 @@ void XineConfigEntry::slotBoolChanged(bool val) m_valueChanged = true; if (m_numValue == m_numDefault) { - m_boolEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_boolEdit->setPaletteForegroundColor(TQColor(darkMagenta)); m_boolEdit->update(); } else { - m_boolEdit->setPaletteForegroundColor(QColor(black)); + m_boolEdit->setPaletteForegroundColor(TQColor(black)); m_boolEdit->update(); } } -void XineConfigEntry::slotStringChanged(const QString& val) +void XineConfigEntry::slotStringChanged(const TQString& val) { m_stringValue = val; m_valueChanged = true; if (m_stringValue == m_stringDefault) { - m_stringEdit->setPaletteForegroundColor(QColor(darkMagenta)); + m_stringEdit->setPaletteForegroundColor(TQColor(darkMagenta)); m_stringEdit->update(); } else { - m_stringEdit->setPaletteForegroundColor(QColor(black)); + m_stringEdit->setPaletteForegroundColor(TQColor(black)); m_stringEdit->update(); } } @@ -212,7 +212,7 @@ bool XineConfigEntry::valueChanged() const return m_valueChanged; } -const QString& XineConfigEntry::getKey() const +const TQString& XineConfigEntry::getKey() const { return m_key; } @@ -222,7 +222,7 @@ int XineConfigEntry::getNumValue() const return m_numValue; } -const QString& XineConfigEntry::getStringValue() const +const TQString& XineConfigEntry::getStringValue() const { return m_stringValue; } @@ -235,20 +235,20 @@ XineConfig::XineConfig(const xine_t* const xine) : KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, KDialogBase::Cancel) { - setInitialSize(QSize(650,500), true); + setInitialSize(TQSize(650,500), true); m_xine = (xine_t*)xine; - QStringList cats = getCategories(); - QTabWidget* tabWidget = NULL; - QFrame* xineFrame = NULL; - QVBoxLayout* xineLayout = NULL; - QVBox* xineBeginnerPage = NULL; - QVBox* xineExpertPage = NULL; - QString icon; + TQStringList cats = getCategories(); + TQTabWidget* tabWidget = NULL; + TQFrame* xineFrame = NULL; + TQVBoxLayout* xineLayout = NULL; + TQVBox* xineBeginnerPage = NULL; + TQVBox* xineExpertPage = NULL; + TQString icon; - QStringList::ConstIterator end ( cats.end()); - for (QStringList::ConstIterator it = cats.begin(); it != end; ++it) + TQStringList::ConstIterator end ( cats.end()); + for (TQStringList::ConstIterator it = cats.begin(); it != end; ++it) { // kdDebug() << "XineConfig: add page: " << *it << endl; if (*it == "audio") @@ -272,23 +272,23 @@ XineConfig::XineConfig(const xine_t* const xine) : else icon = "edit"; - xineFrame = addPage(*it, i18n("%1 Options").arg(*it), KGlobal::iconLoader()->loadIcon(icon, KIcon::Panel, + xineFrame = addPage(*it, i18n("%1 Options").tqarg(*it), KGlobal::iconLoader()->loadIcon(icon, KIcon::Panel, KIcon::SizeMedium)); - xineLayout = new QVBoxLayout(xineFrame, marginHint(), spacingHint()); - tabWidget = new QTabWidget(xineFrame); + xineLayout = new TQVBoxLayout(xineFrame, marginHint(), spacingHint()); + tabWidget = new TQTabWidget(xineFrame); xineLayout->addWidget(tabWidget); - xineBeginnerPage = new QVBox(tabWidget); + xineBeginnerPage = new TQVBox(tabWidget); xineBeginnerPage->setMargin(5); tabWidget->addTab(xineBeginnerPage, i18n("Beginner Options")); createPage(*it, false, xineBeginnerPage); - xineExpertPage = new QVBox(tabWidget); + xineExpertPage = new TQVBox(tabWidget); xineExpertPage->setMargin(5); tabWidget->addTab(xineExpertPage, i18n("Expert Options")); createPage(*it, true, xineExpertPage); } - connect(this, SIGNAL(okClicked()), SLOT(slotOkPressed())); - connect(this, SIGNAL(applyClicked()), SLOT(slotApplyPressed())); + connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotOkPressed())); + connect(this, TQT_SIGNAL(applyClicked()), TQT_SLOT(slotApplyPressed())); } XineConfig::~XineConfig() @@ -298,22 +298,22 @@ XineConfig::~XineConfig() kdDebug() << "XineConfig: destructed" << endl; } -void XineConfig::createPage(const QString& cat, bool expert, QWidget* parent) +void XineConfig::createPage(const TQString& cat, bool expert, TQWidget* tqparent) { xine_cfg_entry_t* ent; - QScrollView* sv = new QScrollView(parent); - sv->setResizePolicy(QScrollView::AutoOneFit); - parent = new QWidget(sv->viewport()); - sv->addChild(parent); + TQScrollView* sv = new TQScrollView(tqparent); + sv->setResizePolicy(TQScrollView::AutoOneFit); + tqparent = new TQWidget(sv->viewport()); + sv->addChild(tqparent); - QGridLayout* grid = new QGridLayout(parent, 20 ,2); + TQGridLayout* grid = new TQGridLayout(tqparent, 20 ,2); grid->setColStretch(1,8); grid->setSpacing(10); grid->setMargin(10); uint row = 0; - QString entCat; + TQString entCat; /*********** read in xine config entries ***********/ ent = new xine_cfg_entry_t; @@ -321,14 +321,14 @@ void XineConfig::createPage(const QString& cat, bool expert, QWidget* parent) do { - entCat = QString(ent->key); - entCat = entCat.left(entCat.find(".")); + entCat = TQString(ent->key); + entCat = entCat.left(entCat.tqfind(".")); if (entCat == cat) { - if (((!expert) && (QString(NON_EXPERT_OPTIONS).contains(ent->key))) || - ((expert) && (!QString(NON_EXPERT_OPTIONS).contains(ent->key)))) + if (((!expert) && (TQString(NON_EXPERT_OPTIONS).tqcontains(ent->key))) || + ((expert) && (!TQString(NON_EXPERT_OPTIONS).tqcontains(ent->key)))) { - m_entries.append(new XineConfigEntry(parent, grid, row, ent)); + m_entries.append(new XineConfigEntry(tqparent, grid, row, ent)); delete ent; ent = new xine_cfg_entry_t; row += 2; @@ -340,19 +340,19 @@ void XineConfig::createPage(const QString& cat, bool expert, QWidget* parent) delete ent; } -const QStringList XineConfig::getCategories() +const TQStringList XineConfig::getCategories() { - QStringList cats; + TQStringList cats; xine_cfg_entry_t* ent = new xine_cfg_entry_t; if (!xine_config_get_first_entry(m_xine, ent)) return cats; - QString entCat; + TQString entCat; do { - entCat = QString(ent->key); - entCat = entCat.left(entCat.find(".")); - if (cats.findIndex(entCat) == -1) + entCat = TQString(ent->key); + entCat = entCat.left(entCat.tqfind(".")); + if (cats.tqfindIndex(entCat) == -1) { // kdDebug() << "XineConfig: new category: " << entCat << endl; cats.append(entCat); @@ -370,7 +370,7 @@ const QStringList XineConfig::getCategories() void XineConfig::slotOkPressed() { slotApplyPressed(); - QDialog::close(); + TQDialog::close(); } /*************** apply changed entries *****************/ diff --git a/kaffeine/src/player-parts/xine-part/xineconfig.h b/kaffeine/src/player-parts/xine-part/xineconfig.h index c3c7532..65d019a 100644 --- a/kaffeine/src/player-parts/xine-part/xineconfig.h +++ b/kaffeine/src/player-parts/xine-part/xineconfig.h @@ -27,27 +27,28 @@ class KLineEdit; class KComboBox; -class QWidget; -class QHBox; -class QCheckBox; -class QSpinBox; -class QStringList; -class QGridLayout; +class TQWidget; +class TQHBox; +class TQCheckBox; +class TQSpinBox; +class TQStringList; +class TQGridLayout; #include <xine.h> /* stores a single config entry of the config file */ -class XineConfigEntry : public QHBox +class XineConfigEntry : public TQHBox { Q_OBJECT + TQ_OBJECT public: - XineConfigEntry(QWidget* parent, QGridLayout* grid, int row, xine_cfg_entry_t* entry); + XineConfigEntry(TQWidget* tqparent, TQGridLayout* grid, int row, xine_cfg_entry_t* entry); ~XineConfigEntry(); bool valueChanged() const; /* was the value changed by user? */ - const QString& getKey() const; /* the key (name) of the entry */ + const TQString& getKey() const; /* the key (name) of the entry */ int getNumValue() const; - const QString& getStringValue() const; + const TQString& getStringValue() const; void setValueUnchanged() { m_valueChanged = false; @@ -56,26 +57,27 @@ public: private slots: void slotNumChanged(int); void slotBoolChanged(bool); - void slotStringChanged(const QString&); + void slotStringChanged(const TQString&); private: bool m_valueChanged; - QString m_key; + TQString m_key; int m_numValue; int m_numDefault; - QString m_stringValue; - QString m_stringDefault; + TQString m_stringValue; + TQString m_stringDefault; KLineEdit* m_stringEdit; KComboBox* m_enumEdit; - QSpinBox* m_numEdit; - QCheckBox* m_boolEdit; + TQSpinBox* m_numEdit; + TQCheckBox* m_boolEdit; }; class XineConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: XineConfig(const xine_t* const xine); ~XineConfig(); @@ -85,11 +87,11 @@ private slots: void slotApplyPressed(); private: - void createPage(const QString& cat, bool expert, QWidget* parent); - const QStringList getCategories(); + void createPage(const TQString& cat, bool expert, TQWidget* tqparent); + const TQStringList getCategories(); private: - QPtrList<XineConfigEntry> m_entries; + TQPtrList<XineConfigEntry> m_entries; xine_t* m_xine; }; diff --git a/kaffeine/src/pref.cpp b/kaffeine/src/pref.cpp index 75b6ab0..0544d35 100644 --- a/kaffeine/src/pref.cpp +++ b/kaffeine/src/pref.cpp @@ -33,130 +33,130 @@ #include <kiconloader.h> #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqlineedit.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kcharsets.h> KaffeinePreferences::KaffeinePreferences() : KDialogBase(IconList,i18n("Kaffeine Setup"), Ok|Apply|Cancel, Ok) { - QGroupBox *gb; - QVBoxLayout *vb; - QGridLayout *grid; + TQGroupBox *gb; + TQVBoxLayout *vb; + TQGridLayout *grid; KIconLoader *icon = new KIconLoader(); - setInitialSize(QSize(400,400), false); + setInitialSize(TQSize(400,400), false); //-----------behavior---------------- - QFrame *behavior = addPage(i18n("Behavior"), i18n("Behavior"), KGlobal::iconLoader()->loadIcon("kaffeine", KIcon::Panel, KIcon::SizeMedium)); - vb = new QVBoxLayout( behavior, 6, 6 ); - gb = new QGroupBox( "", behavior ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); - m_pauseVideo = new QCheckBox(i18n("Pause video when window is minimized"), gb); + TQFrame *behavior = addPage(i18n("Behavior"), i18n("Behavior"), KGlobal::iconLoader()->loadIcon("kaffeine", KIcon::Panel, KIcon::SizeMedium)); + vb = new TQVBoxLayout( behavior, 6, 6 ); + gb = new TQGroupBox( "", behavior ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); + m_pauseVideo = new TQCheckBox(i18n("Pause video when window is minimized"), gb); grid->addMultiCellWidget(m_pauseVideo, 0, 0, 0, 1); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); //-----------appearance-------------- - QFrame *looknfeel = addPage(i18n("Appearance"), i18n("Appearance"),KGlobal::iconLoader()->loadIcon("looknfeel", KIcon::Panel, KIcon::SizeMedium)); - vb = new QVBoxLayout( looknfeel, 6, 6 ); - gb = new QGroupBox( "", looknfeel ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); - m_systemTray = new QCheckBox(i18n("Embed in system tray"), gb); - connect(m_systemTray, SIGNAL(toggled(bool)), this, SLOT(slotEmbedInTrayToggled(bool))); + TQFrame *looknfeel = addPage(i18n("Appearance"), i18n("Appearance"),KGlobal::iconLoader()->loadIcon("looknfeel", KIcon::Panel, KIcon::SizeMedium)); + vb = new TQVBoxLayout( looknfeel, 6, 6 ); + gb = new TQGroupBox( "", looknfeel ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); + m_systemTray = new TQCheckBox(i18n("Embed in system tray"), gb); + connect(m_systemTray, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEmbedInTrayToggled(bool))); grid->addMultiCellWidget(m_systemTray, 0, 0, 0, 1); - m_osdTimeout = new QSpinBox(gb); + m_osdTimeout = new TQSpinBox(gb); m_osdTimeout->setMinValue(0); m_osdTimeout->setMaxValue(60); m_osdTimeout->setSuffix(i18n(" sec")); m_osdTimeout->setSpecialValueText(i18n("off")); grid->addWidget(m_osdTimeout, 1,0); - QLabel* osdTimeoutLabel = new QLabel(i18n("Duration of title announcement in system tray"), gb); + TQLabel* osdTimeoutLabel = new TQLabel(i18n("Duration of title announcement in system tray"), gb); osdTimeoutLabel->setDisabled(true); - connect(m_systemTray, SIGNAL(toggled(bool)), osdTimeoutLabel, SLOT(setEnabled(bool))); + connect(m_systemTray, TQT_SIGNAL(toggled(bool)), osdTimeoutLabel, TQT_SLOT(setEnabled(bool))); grid->addWidget(osdTimeoutLabel, 1,1); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); //-----------dvbclient-------------- - QFrame *dc = addPage(i18n("DVB Client"), i18n("DVB Client"),KGlobal::iconLoader()->loadIcon("network_local", KIcon::Panel, KIcon::SizeMedium)); - vb = new QVBoxLayout( dc, 6, 6 ); - m_dcEnabled = new QCheckBox(i18n("Enable DVB client"), dc); + TQFrame *dc = addPage(i18n("DVB Client"), i18n("DVB Client"),KGlobal::iconLoader()->loadIcon("network_local", KIcon::Panel, KIcon::SizeMedium)); + vb = new TQVBoxLayout( dc, 6, 6 ); + m_dcEnabled = new TQCheckBox(i18n("Enable DVB client"), dc); vb->addWidget( m_dcEnabled ); - gb = new QGroupBox( "", dc ); + gb = new TQGroupBox( "", dc ); gb->setDisabled(true); - connect(m_dcEnabled, SIGNAL(toggled(bool)), gb, SLOT(setEnabled(bool))); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); - QLabel *lab = new QLabel( i18n("Broadcast address:"), gb ); + connect(m_dcEnabled, TQT_SIGNAL(toggled(bool)), gb, TQT_SLOT(setEnabled(bool))); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); + TQLabel *lab = new TQLabel( i18n("Broadcast address:"), gb ); grid->addWidget( lab, 0, 0 ); - m_dcAddress = new QLineEdit( gb ); + m_dcAddress = new TQLineEdit( gb ); grid->addWidget( m_dcAddress, 0, 1 ); - lab = new QLabel( i18n("Broadcast port:"), gb ); + lab = new TQLabel( i18n("Broadcast port:"), gb ); grid->addWidget( lab, 1, 0 ); - m_dcPort = new QSpinBox( 1, 65535, 1, gb ); + m_dcPort = new TQSpinBox( 1, 65535, 1, gb ); grid->addWidget( m_dcPort, 1, 1 ); - lab = new QLabel( i18n("Info port:"), gb ); + lab = new TQLabel( i18n("Info port:"), gb ); grid->addWidget( lab, 2, 0 ); - m_dcInfo = new QSpinBox( 1, 65535, 1, gb ); + m_dcInfo = new TQSpinBox( 1, 65535, 1, gb ); grid->addWidget( m_dcInfo, 2, 1 ); - lab = new QLabel( i18n("Time shifting directory:"), gb ); + lab = new TQLabel( i18n("Time shifting directory:"), gb ); grid->addWidget( lab, 3, 0 ); - m_shiftDirLe = new QLineEdit( gb ); + m_shiftDirLe = new TQLineEdit( gb ); m_shiftDirLe->setReadOnly( true ); grid->addWidget( m_shiftDirLe, 3, 1 ); - m_shiftDirBtn = new QToolButton( gb ); + m_shiftDirBtn = new TQToolButton( gb ); m_shiftDirBtn->setIconSet( icon->loadIconSet("fileopen", KIcon::Small) ); grid->addWidget( m_shiftDirBtn, 3, 2 ); - connect( m_shiftDirBtn, SIGNAL(clicked()), this, SLOT(setShiftDir()) ); + connect( m_shiftDirBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(setShiftDir()) ); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); //-----------misc---------------- - QFrame *misc = addPage(i18n("Misc"), i18n("Miscellaneous Options"),KGlobal::iconLoader()->loadIcon("misc", KIcon::Panel, KIcon::SizeMedium)); - vb = new QVBoxLayout( misc, 6, 6 ); - gb = new QGroupBox(1, Qt::Horizontal, "", misc); + TQFrame *misc = addPage(i18n("Misc"), i18n("Miscellaneous Options"),KGlobal::iconLoader()->loadIcon("misc", KIcon::Panel, KIcon::SizeMedium)); + vb = new TQVBoxLayout( misc, 6, 6 ); + gb = new TQGroupBox(1, Qt::Horizontal, "", misc); gb->setInsideMargin(20); gb->setInsideSpacing(6); - m_useAlternateEncoding = new QCheckBox(i18n("Use alternate (non-Unicode) encoding for Meta tags"), gb); - connect(m_useAlternateEncoding, SIGNAL(toggled(bool)), this, SLOT(slotUseAlternateEncodingToggled(bool))); + m_useAlternateEncoding = new TQCheckBox(i18n("Use alternate (non-Unicode) encoding for Meta tags"), gb); + connect(m_useAlternateEncoding, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotUseAlternateEncodingToggled(bool))); - m_alternateEncoding = new QComboBox(gb); - QStringList codecNames = KGlobal::charsets()->descriptiveEncodingNames(); + m_alternateEncoding = new TQComboBox(gb); + TQStringList codecNames = KGlobal::charsets()->descriptiveEncodingNames(); codecNames.sort(); m_alternateEncoding->insertStringList(codecNames); vb->addWidget( gb ); - gb = new QGroupBox( "", misc ); - grid = new QGridLayout( gb, 1, 1, 20, 6 ); + gb = new TQGroupBox( "", misc ); + grid = new TQGridLayout( gb, 1, 1, 20, 6 ); KPushButton* clearRecent = new KPushButton( i18n("Clear"), gb); - clearRecent->setSizePolicy( QSizePolicy (QSizePolicy::Minimum, QSizePolicy::Fixed)); - connect(clearRecent, SIGNAL(clicked()), this, SIGNAL(signalClearRecent())); + clearRecent->tqsetSizePolicy( TQSizePolicy (TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + connect(clearRecent, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(signalClearRecent())); grid->addWidget(clearRecent, 0, 0); - QLabel* clearLabel = new QLabel(i18n("Clear recent files list"), gb); + TQLabel* clearLabel = new TQLabel(i18n("Clear recent files list"), gb); grid->addWidget(clearLabel, 0, 1); vb->addWidget( gb ); - vb->addItem( new QSpacerItem( 20, 20, QSizePolicy::Ignored, QSizePolicy::Ignored ) ); + vb->addItem( new TQSpacerItem( 20, 20, TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); delete icon; - connect(this, SIGNAL(okClicked()), SLOT(slotOkPressed())); - connect(this, SIGNAL(applyClicked()), SLOT(slotApplyPressed())); + connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotOkPressed())); + connect(this, TQT_SIGNAL(applyClicked()), TQT_SLOT(slotApplyPressed())); } -void KaffeinePreferences::setConfig(bool pauseVideo, bool tray, uint duration, bool useEncoding, const QString& encoding) +void KaffeinePreferences::setConfig(bool pauseVideo, bool tray, uint duration, bool useEncoding, const TQString& encoding) { m_osdTimeout->setValue(duration); m_osdTimeout->setEnabled(tray); @@ -176,7 +176,7 @@ void KaffeinePreferences::setConfig(bool pauseVideo, bool tray, uint duration, b m_pauseVideo->setChecked(pauseVideo); } -void KaffeinePreferences::setDvbClient( bool enabled, const QString &address, int port, int info, const QString &tspath ) +void KaffeinePreferences::setDvbClient( bool enabled, const TQString &address, int port, int info, const TQString &tspath ) { m_dcEnabled->setChecked(enabled); m_dcAddress->setText(address); @@ -203,7 +203,7 @@ void KaffeinePreferences::slotOkPressed() void KaffeinePreferences::setShiftDir() { - QString s = KFileDialog::getExistingDirectory( m_shiftDirLe->text().stripWhiteSpace() ); + TQString s = KFileDialog::getExistingDirectory( m_shiftDirLe->text().stripWhiteSpace() ); if ( !s.isEmpty() ) m_shiftDirLe->setText( s ); } diff --git a/kaffeine/src/pref.h b/kaffeine/src/pref.h index ebc842c..da9e36e 100644 --- a/kaffeine/src/pref.h +++ b/kaffeine/src/pref.h @@ -25,34 +25,35 @@ #include <config.h> #endif -#include <qtoolbutton.h> +#include <tqtoolbutton.h> #include <kdialogbase.h> -class QCheckBox; -class QSpinBox; -class QComboBox; -class QLineEdit; +class TQCheckBox; +class TQSpinBox; +class TQComboBox; +class TQLineEdit; class KaffeinePreferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KaffeinePreferences(); virtual ~KaffeinePreferences() {} - void setConfig(bool pauseVideo, bool tray, uint duration, bool useEncoding, const QString& encoding); - void setDvbClient( bool enabled, const QString &address, int port, int info, const QString &tspath ); + void setConfig(bool pauseVideo, bool tray, uint duration, bool useEncoding, const TQString& encoding); + void setDvbClient( bool enabled, const TQString &address, int port, int info, const TQString &tspath ); signals: void signalClearRecent(); void signalEmbedSystemTray(bool); void signalUseAlternateEncoding(bool); - void signalAlternateEncoding(const QString&); + void signalAlternateEncoding(const TQString&); void signalSetOSDTimeout(uint); void signalPauseVideo(bool); - void signalDvbClient(bool,const QString&,int,int,const QString&); + void signalDvbClient(bool,const TQString&,int,int,const TQString&); private slots: void slotOkPressed(); @@ -62,17 +63,17 @@ private slots: void setShiftDir(); private: - QCheckBox* m_systemTray; - QSpinBox* m_osdTimeout; - QCheckBox* m_useAlternateEncoding; - QComboBox* m_alternateEncoding; - QCheckBox* m_pauseVideo; - QCheckBox* m_dcEnabled; - QLineEdit* m_dcAddress; - QSpinBox* m_dcPort; - QSpinBox* m_dcInfo; - QLineEdit *m_shiftDirLe; - QToolButton *m_shiftDirBtn; + TQCheckBox* m_systemTray; + TQSpinBox* m_osdTimeout; + TQCheckBox* m_useAlternateEncoding; + TQComboBox* m_alternateEncoding; + TQCheckBox* m_pauseVideo; + TQCheckBox* m_dcEnabled; + TQLineEdit* m_dcAddress; + TQSpinBox* m_dcPort; + TQSpinBox* m_dcInfo; + TQLineEdit *m_shiftDirLe; + TQToolButton *m_shiftDirBtn; }; #endif /* PREF_H */ diff --git a/kaffeine/src/startwindow.cpp b/kaffeine/src/startwindow.cpp index ba859f4..622d7b1 100644 --- a/kaffeine/src/startwindow.cpp +++ b/kaffeine/src/startwindow.cpp @@ -28,11 +28,11 @@ #include <kiconloader.h> #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qhbox.h> -#include <qcolor.h> -#include <qtooltip.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqhbox.h> +#include <tqcolor.h> +#include <tqtooltip.h> #include "version.h" #include "startwindow.h" @@ -40,10 +40,10 @@ -MToolButton::MToolButton( QWidget *parent, const QString& targ ) : QToolButton( parent ) +MToolButton::MToolButton( TQWidget *tqparent, const TQString& targ ) : TQToolButton( tqparent ) { target = targ; - connect( this, SIGNAL(clicked()), SLOT(mClicked()) ); + connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(mClicked()) ); } MToolButton::~MToolButton() @@ -57,42 +57,42 @@ void MToolButton::mClicked() -SLabel::SLabel( QWidget *parent ) : QLabel( parent ) +SLabel::SLabel( TQWidget *tqparent ) : TQLabel( tqparent ) { } -void SLabel::paintEvent( QPaintEvent *pe ) +void SLabel::paintEvent( TQPaintEvent *pe ) { - QLabel::paintEvent( pe ); - QColorGroup cg = parentWidget()->colorGroup(); - QColor base = cg.base(); - QColor selection = cg.highlight(); + TQLabel::paintEvent( pe ); + TQColorGroup cg = tqparentWidget()->tqcolorGroup(); + TQColor base = cg.base(); + TQColor selection = cg.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - setPaletteBackgroundColor( QColor(r, g, b) ); + setPaletteBackgroundColor( TQColor(r, g, b) ); } -StartWindow::StartWindow(QWidget* parent, const char* name) : QWidget(parent, name) +StartWindow::StartWindow(TQWidget* tqparent, const char* name) : TQWidget(tqparent, name) { - QVBoxLayout* mainLayout = new QVBoxLayout(this); + TQVBoxLayout* mainLayout = new TQVBoxLayout(this); mainLayout->setAutoAdd(true); mainLayout->setSpacing(0); label1 = new SLabel(this); - //label1->setPaletteBackgroundColor(QColor(238, 246, 255)); + //label1->setPaletteBackgroundColor(TQColor(238, 246, 255)); label1->setText("<center><font size=\"7\"><b>"+i18n("[Kaffeine Player]")+"</b></font></center>"); label2 = new SLabel(this); - //label2->setPaletteBackgroundColor(QColor(238, 246, 255)); - label2->setText(QString("<center><font size=\"5\">") + KAFFEINE_VERSION + "</font></center>"); + //label2->setPaletteBackgroundColor(TQColor(238, 246, 255)); + label2->setText(TQString("<center><font size=\"5\">") + KAFFEINE_VERSION + "</font></center>"); - panel = new QWidget( this ); - panel->setPaletteBackgroundColor(QColor("White")); - panel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::MinimumExpanding ) ); + panel = new TQWidget( this ); + panel->setPaletteBackgroundColor(TQColor("White")); + panel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding ) ); buttons.setAutoDelete( true ); } @@ -106,25 +106,25 @@ StartWindow::~StartWindow() -void StartWindow::registerTarget( const QString& uiName, const QString& pixName, const QString& targetName ) +void StartWindow::registerTarget( const TQString& uiName, const TQString& pixName, const TQString& targetName ) { MToolButton *btn = new MToolButton( panel, targetName ); - //QFont f = btn->font(); + //TQFont f = btn->font(); //f.setPointSize( f.pointSize()+2 ); //f.setBold(true); //btn->setFont( f ); - btn->setTextLabel( QString("&%1 %2").arg(buttons.count() + 1).arg(uiName)); - QToolTip::add(btn, uiName); - btn->setTextPosition( QToolButton::Under ); + btn->setTextLabel( TQString("&%1 %2").tqarg(buttons.count() + 1).tqarg(uiName)); + TQToolTip::add(btn, uiName); + btn->setTextPosition( TQToolButton::Under ); btn->setUsesTextLabel( true ); btn->setIconSet( KGlobal::iconLoader()->loadIconSet(pixName, KIcon::Panel) ); - QSize size = btn->sizeHint(); + TQSize size = btn->tqsizeHint(); size.setHeight( size.height()+5 ); btn->resize( size ); - connect( btn, SIGNAL(executed(const QString&)), this, SIGNAL(execTarget(const QString&)) ); + connect( btn, TQT_SIGNAL(executed(const TQString&)), this, TQT_SIGNAL(execTarget(const TQString&)) ); buttons.append( btn ); btn->show(); - arrangeButtons( QSize( width(),height() ) ); + arrangeButtons( TQSize( width(),height() ) ); } @@ -138,7 +138,7 @@ void StartWindow::execTarget(int index) -void StartWindow::unregisterTarget( const QString& targetName ) +void StartWindow::unregisterTarget( const TQString& targetName ) { int i; MToolButton *btn; @@ -147,7 +147,7 @@ void StartWindow::unregisterTarget( const QString& targetName ) btn = buttons.at(i); if ( btn->target==targetName ) { buttons.remove( btn ); - arrangeButtons( QSize( width(),height() ) ); + arrangeButtons( TQSize( width(),height() ) ); return; } } @@ -155,7 +155,7 @@ void StartWindow::unregisterTarget( const QString& targetName ) -void StartWindow::arrangeButtons( QSize e ) +void StartWindow::arrangeButtons( TQSize e ) { MToolButton *btn; int x, y; @@ -164,7 +164,7 @@ void StartWindow::arrangeButtons( QSize e ) int nnh; int ew = e.width(); int eh = e.height()-label1->height()-label2->height(); - QPtrListIterator<MToolButton> it(buttons); + TQPtrListIterator<MToolButton> it(buttons); nb = buttons.count(); if ( !nb ) @@ -213,7 +213,7 @@ void StartWindow::arrangeButtons( QSize e ) -void StartWindow::resizeEvent( QResizeEvent *e ) +void StartWindow::resizeEvent( TQResizeEvent *e ) { arrangeButtons( e->size() ); } diff --git a/kaffeine/src/startwindow.h b/kaffeine/src/startwindow.h index e46385f..76b35ee 100644 --- a/kaffeine/src/startwindow.h +++ b/kaffeine/src/startwindow.h @@ -26,68 +26,71 @@ #include <config.h> #endif -#include <qtoolbutton.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qlabel.h> +#include <tqtoolbutton.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqlabel.h> -class MToolButton : public QToolButton +class MToolButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - MToolButton( QWidget *parent, const QString& targ ); + MToolButton( TQWidget *tqparent, const TQString& targ ); ~MToolButton(); - QString target; + TQString target; private slots: void mClicked(); signals: - void executed( const QString& ); + void executed( const TQString& ); }; -class SLabel : public QLabel +class SLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - SLabel( QWidget *parent ); + SLabel( TQWidget *tqparent ); ~SLabel() {} protected: - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); }; -class StartWindow : public QWidget +class StartWindow : public TQWidget { Q_OBJECT + TQ_OBJECT public: - StartWindow( QWidget *parent = 0, const char *name = 0 ); + StartWindow( TQWidget *tqparent = 0, const char *name = 0 ); virtual ~StartWindow(); - void registerTarget( const QString& uiName, const QString& pixName, const QString& targetName ); - void unregisterTarget( const QString& targetName ); + void registerTarget( const TQString& uiName, const TQString& pixName, const TQString& targetName ); + void unregisterTarget( const TQString& targetName ); void execTarget( int index ); protected: - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); private: - void arrangeButtons( QSize e ); + void arrangeButtons( TQSize e ); - QPtrList<MToolButton> buttons; - QWidget *panel; + TQPtrList<MToolButton> buttons; + TQWidget *panel; SLabel *label1, *label2; signals: - void execTarget( const QString& ); + void execTarget( const TQString& ); }; #endif /* STARTWINDOW_H */ diff --git a/kaffeine/src/systemtray.cpp b/kaffeine/src/systemtray.cpp index 202f3e1..c7c838f 100644 --- a/kaffeine/src/systemtray.cpp +++ b/kaffeine/src/systemtray.cpp @@ -29,39 +29,39 @@ #include <kpopupmenu.h> #include <kaction.h> -#include <qtimer.h> -#include <qlabel.h> -#include <qtooltip.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqtooltip.h> #include "systemtray.h" #include "systemtray.moc" -class TitleLabel : public QLabel +class TitleLabel : public TQLabel { public: - TitleLabel() : QLabel(0, "tray_osd", WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WX11BypassWM) + TitleLabel() : TQLabel(0, "tray_osd", WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WX11BypassWM) {} virtual ~TitleLabel() {} protected: - void enterEvent(QEvent*) + void enterEvent(TQEvent*) { hide(); } }; -SystemTray::SystemTray(QWidget *parent, const char *name ) : KSystemTray(parent,name) +SystemTray::SystemTray(TQWidget *tqparent, const char *name ) : KSystemTray(tqparent,name) { kdDebug() << "SystemTray: Create System Tray" << endl; - KAction* play = new KAction(i18n("Play / Pause"), "player_play", 0, this, SIGNAL(signalPlay()), actionCollection(), "trayplay"); - KAction* next = new KAction(i18n("&Next"), "next", 0, this, SIGNAL(signalNext()), actionCollection(), "traynext"); - KAction* previous = new KAction(i18n("&Previous"), "previous", 0, this, SIGNAL(signalPrevious()), actionCollection(), "trayprevious"); - KAction* stop = new KAction(i18n("Stop"), "player_stop", 0, this, SIGNAL(signalStop()), actionCollection(), "traystop"); - KAction* mute = new KAction(i18n("&Mute"), "player_mute", 0, this, SIGNAL(signalMute()), actionCollection(), "traymute"); + KAction* play = new KAction(i18n("Play / Pause"), "player_play", 0, TQT_TQOBJECT(this), TQT_SIGNAL(signalPlay()), actionCollection(), "trayplay"); + KAction* next = new KAction(i18n("&Next"), "next", 0, TQT_TQOBJECT(this), TQT_SIGNAL(signalNext()), actionCollection(), "traynext"); + KAction* previous = new KAction(i18n("&Previous"), "previous", 0, TQT_TQOBJECT(this), TQT_SIGNAL(signalPrevious()), actionCollection(), "trayprevious"); + KAction* stop = new KAction(i18n("Stop"), "player_stop", 0, TQT_TQOBJECT(this), TQT_SIGNAL(signalStop()), actionCollection(), "traystop"); + KAction* mute = new KAction(i18n("&Mute"), "player_mute", 0, TQT_TQOBJECT(this), TQT_SIGNAL(signalMute()), actionCollection(), "traymute"); play->plug(contextMenu()); next->plug(contextMenu()); @@ -70,20 +70,20 @@ SystemTray::SystemTray(QWidget *parent, const char *name ) : KSystemTray(parent, mute->plug(contextMenu()); m_osd = new TitleLabel; - m_osd->setFrameStyle(QFrame::Panel | QFrame::Plain); + m_osd->setFrameStyle(TQFrame::Panel | TQFrame::Plain); m_osd->setLineWidth(1); - m_osd->setAlignment(SingleLine); - connect(&m_hideTimer, SIGNAL(timeout()), this, SLOT(slotHideOSD())); + m_osd->tqsetAlignment(SingleLine); + connect(&m_hideTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotHideOSD())); setPixmap(KGlobal::iconLoader()->loadIcon("kaffeine", KIcon::Panel, 22)); - QToolTip::add(this, i18n("Kaffeine Player")); + TQToolTip::add(this, i18n("Kaffeine Player")); } SystemTray::~SystemTray() {} -void SystemTray::wheelEvent(QWheelEvent *e) +void SystemTray::wheelEvent(TQWheelEvent *e) { if(e->delta() < 0) actionCollection()->action("traynext")->activate(); @@ -92,34 +92,34 @@ void SystemTray::wheelEvent(QWheelEvent *e) e->accept(); } -void SystemTray::mousePressEvent(QMouseEvent *e) +void SystemTray::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { - case LeftButton: - case RightButton: + case Qt::LeftButton: + case Qt::RightButton: default: KSystemTray::mousePressEvent(e); break; - case MidButton: - if(!rect().contains(e->pos())) + case Qt::MidButton: + if(!TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) return; actionCollection()->action("trayplay")->activate(); break; } } -void SystemTray::showTitle(const QString& title, uint secs) +void SystemTray::showTitle(const TQString& title, uint secs) { if (title.isEmpty()) return; - QToolTip::remove(this); // all the time remove it before add it. - QToolTip::add(this, title); + TQToolTip::remove(this); // all the time remove it before add it. + TQToolTip::add(this, title); if (secs > 0) { - m_osd->setText(QString("<nobr><b>") + title + "</b></nobr>"); + m_osd->setText(TQString("<nobr><b>") + title + "</b></nobr>"); m_osd->adjustSize(); - QPoint global = mapToGlobal(QPoint(0,0)); + TQPoint global = mapToGlobal(TQPoint(0,0)); m_osd->move(global.x() - m_osd->width() + 10, global.y() - m_osd->height() + 15); m_osd->show(); m_hideTimer.start(secs * 1000); diff --git a/kaffeine/src/systemtray.h b/kaffeine/src/systemtray.h index 8fb4128..27bfc39 100644 --- a/kaffeine/src/systemtray.h +++ b/kaffeine/src/systemtray.h @@ -27,7 +27,7 @@ #include <ksystemtray.h> -#include <qwidget.h> +#include <tqwidget.h> /** *@author Jürgen Kofler @@ -35,19 +35,20 @@ class TitleLabel; -class QTimer; +class TQTimer; class SystemTray : public KSystemTray { Q_OBJECT + TQ_OBJECT public: - SystemTray(QWidget *parent = 0, const char *name = 0); + SystemTray(TQWidget *tqparent = 0, const char *name = 0); virtual ~SystemTray(); - void showTitle(const QString&, uint secs = 5); + void showTitle(const TQString&, uint secs = 5); protected: - virtual void wheelEvent(QWheelEvent *e); - void mousePressEvent(QMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); + void mousePressEvent(TQMouseEvent *e); signals: void signalPlay(); @@ -61,7 +62,7 @@ private slots: private: TitleLabel* m_osd; - QTimer m_hideTimer; + TQTimer m_hideTimer; }; #endif /* SYSTEMTRAY_H */ |