diff options
Diffstat (limited to 'amarok/src/magnatunebrowser')
27 files changed, 416 insertions, 416 deletions
diff --git a/amarok/src/magnatunebrowser/magnatunealbumdownloader.cpp b/amarok/src/magnatunebrowser/magnatunealbumdownloader.cpp index 974c85bd..cb43a7d9 100644 --- a/amarok/src/magnatunebrowser/magnatunealbumdownloader.cpp +++ b/amarok/src/magnatunebrowser/magnatunealbumdownloader.cpp @@ -51,14 +51,14 @@ void MagnatuneAlbumDownloader::downloadAlbum( MagnatuneDownloadInfo * info ) m_albumDownloadJob = KIO::file_copy( downloadUrl, KURL( m_tempDir.name() + m_currentAlbumFileName ), -1, true, false, false ); - connect( m_albumDownloadJob, SIGNAL( result( KIO::Job* ) ), SLOT( albumDownloadComplete( KIO::Job* ) ) ); + connect( m_albumDownloadJob, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( albumDownloadComplete( KIO::Job* ) ) ); Amarok::StatusBar::instance() ->newProgressOperation( m_albumDownloadJob ) .setDescription( i18n( "Downloading album" ) ) - .setAbortSlot( this, SLOT( albumDownloadAborted() ) ); + .setAbortSlot( this, TQT_SLOT( albumDownloadAborted() ) ); } -void MagnatuneAlbumDownloader::downloadCover( QString albumCoverUrlString, QString fileName ) +void MagnatuneAlbumDownloader::downloadCover( TQString albumCoverUrlString, TQString fileName ) { KURL downloadUrl( albumCoverUrlString ); @@ -66,11 +66,11 @@ void MagnatuneAlbumDownloader::downloadCover( QString albumCoverUrlString, QStri m_albumDownloadJob = KIO::file_copy( downloadUrl, KURL( m_tempDir.name() + fileName ), -1, true, false, false ); - connect( m_albumDownloadJob, SIGNAL( result( KIO::Job* ) ), SLOT( coverDownloadComplete( KIO::Job* ) ) ); + connect( m_albumDownloadJob, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( coverDownloadComplete( KIO::Job* ) ) ); Amarok::StatusBar::instance() ->newProgressOperation( m_albumDownloadJob ) .setDescription( i18n( "Downloading album cover" ) ) - .setAbortSlot( this, SLOT( coverDownloadAborted() ) ); + .setAbortSlot( this, TQT_SLOT( coverDownloadAborted() ) ); } @@ -90,7 +90,7 @@ void MagnatuneAlbumDownloader::albumDownloadComplete( KIO::Job * downloadJob ) //ok, now we have the .zip file downloaded. All we need is to unpack it to the desired location and add it to the collection. - QString unzipString = "unzip "+ KProcess::quote( m_tempDir.name() + m_currentAlbumFileName) + " -d " +KProcess::quote( m_currentAlbumUnpackLocation ) + " &"; + TQString unzipString = "unzip "+ KProcess::quote( m_tempDir.name() + m_currentAlbumFileName) + " -d " +KProcess::quote( m_currentAlbumUnpackLocation ) + " &"; debug() << "unpacking: " << unzipString << endl; @@ -106,8 +106,8 @@ void MagnatuneAlbumDownloader::albumDownloadComplete( KIO::Job * downloadJob ) MagnatuneAlbum album = MagnatuneDatabaseHandler::instance()->getAlbumById( m_currentAlbumId ); MagnatuneArtist artist = MagnatuneDatabaseHandler::instance()->getArtistById( album.getArtistId() ); - QString finalAlbumPath = m_currentAlbumUnpackLocation + "/" + artist.getName() + "/" + album.getName(); - QString coverUrlString = album.getCoverURL(); + TQString finalAlbumPath = m_currentAlbumUnpackLocation + "/" + artist.getName() + "/" + album.getName(); + TQString coverUrlString = album.getCoverURL(); @@ -117,11 +117,11 @@ void MagnatuneAlbumDownloader::albumDownloadComplete( KIO::Job * downloadJob ) m_albumDownloadJob = KIO::file_copy( downloadUrl, KURL( finalAlbumPath + "/cover.jpg" ), -1, true, false, false ); - connect( m_albumDownloadJob, SIGNAL( result( KIO::Job* ) ), SLOT( coverAddComplete( KIO::Job* ) ) ); + connect( m_albumDownloadJob, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( coverAddComplete( KIO::Job* ) ) ); Amarok::StatusBar::instance() ->newProgressOperation( m_albumDownloadJob ) .setDescription( i18n( "Adding album cover to collection" ) ) - .setAbortSlot( this, SLOT( coverAddAborted() ) ); + .setAbortSlot( this, TQT_SLOT( coverAddAborted() ) ); } else { diff --git a/amarok/src/magnatunebrowser/magnatunealbumdownloader.h b/amarok/src/magnatunebrowser/magnatunealbumdownloader.h index c247b70a..3ca0b802 100644 --- a/amarok/src/magnatunebrowser/magnatunealbumdownloader.h +++ b/amarok/src/magnatunebrowser/magnatunealbumdownloader.h @@ -25,7 +25,7 @@ #include <kio/job.h> #include <kio/jobclasses.h> -#include <qobject.h> +#include <tqobject.h> #include <ktempdir.h> /** @@ -41,7 +41,7 @@ public: ~MagnatuneAlbumDownloader(); - void downloadCover( QString albumCoverUrlString, QString fileName ); + void downloadCover( TQString albumCoverUrlString, TQString fileName ); signals: @@ -50,7 +50,7 @@ signals: * @param success true is download completed, false if download was cancelled. */ void downloadComplete(bool success); - void coverDownloadCompleted(QString coverFileName); + void coverDownloadCompleted(TQString coverFileName); public slots: /** @@ -62,8 +62,8 @@ public slots: protected: KIO::FileCopyJob * m_albumDownloadJob; - QString m_currentAlbumUnpackLocation; - QString m_currentAlbumFileName; + TQString m_currentAlbumUnpackLocation; + TQString m_currentAlbumFileName; int m_currentAlbumId; KTempDir m_tempDir; diff --git a/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp b/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp index 5bee5752..da56aba1 100644 --- a/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp +++ b/amarok/src/magnatunebrowser/magnatuneartistinfobox.cpp @@ -23,9 +23,9 @@ #include <khtmlview.h> -#include <qfile.h> +#include <tqfile.h> -MagnatuneArtistInfoBox::MagnatuneArtistInfoBox( QWidget *parentWidget, const char *widgetname ) +MagnatuneArtistInfoBox::MagnatuneArtistInfoBox( TQWidget *parentWidget, const char *widgetname ) : KHTMLPart( parentWidget, widgetname ) {} @@ -39,12 +39,12 @@ MagnatuneArtistInfoBox::displayArtistInfo( KURL url ) debug() << "displayArtistInfo started" << endl; // first get the entire artist html page - QString tempFile; - QString orgHtml; + TQString tempFile; + TQString orgHtml; m_infoDownloadJob = KIO::storedGet( url, false, false ); Amarok::StatusBar::instance() ->newProgressOperation( m_infoDownloadJob ).setDescription( i18n( "Fetching Artist Info" ) ); - connect( m_infoDownloadJob, SIGNAL( result( KIO::Job* ) ), SLOT( infoDownloadComplete( KIO::Job* ) ) ); + connect( m_infoDownloadJob, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( infoDownloadComplete( KIO::Job* ) ) ); return true; @@ -54,9 +54,9 @@ bool MagnatuneArtistInfoBox::displayAlbumInfo( MagnatuneAlbum *album ) { const MagnatuneArtist artist = MagnatuneDatabaseHandler::instance()->getArtistById( album->getArtistId() ); - const QString artistName = artist.getName(); + const TQString artistName = artist.getName(); - QString infoHtml = "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" " + TQString infoHtml = "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" " "CONTENT=\"text/html; charset=iso-8859-1\"></HEAD><BODY>"; infoHtml += "<div align=\"center\"><strong>"; @@ -68,7 +68,7 @@ MagnatuneArtistInfoBox::displayAlbumInfo( MagnatuneAlbum *album ) "\" align=\"middle\" border=\"1\">"; infoHtml += "<br><br>Genre: " + album->getMp3Genre(); - infoHtml += "<br>Release Year: " + QString::number( album->getLaunchDate().year() ); + infoHtml += "<br>Release Year: " + TQString::number( album->getLaunchDate().year() ); infoHtml += "<br><br>From Magnatune.com</div>"; infoHtml += "</BODY></HTML>"; @@ -94,9 +94,9 @@ MagnatuneArtistInfoBox::infoDownloadComplete( KIO::Job * downLoadJob ) return ; //not the right job, so let's ignore it KIO::StoredTransferJob* const storedJob = static_cast<KIO::StoredTransferJob*>( downLoadJob ); - QString info = QString( storedJob->data() ); + TQString info = TQString( storedJob->data() ); - QString trimmedInfo = extractArtistInfo( info ); + TQString trimmedInfo = extractArtistInfo( info ); //debug() << "html: " << trimmedInfo << endl; @@ -109,10 +109,10 @@ MagnatuneArtistInfoBox::infoDownloadComplete( KIO::Job * downLoadJob ) } -QString -MagnatuneArtistInfoBox::extractArtistInfo( QString artistPage ) +TQString +MagnatuneArtistInfoBox::extractArtistInfo( TQString artistPage ) { - QString trimmedHtml; + TQString trimmedHtml; int sectionStart = artistPage.find( "<!-- ARTISTBODY -->" ); @@ -133,7 +133,7 @@ MagnatuneArtistInfoBox::extractArtistInfo( QString artistPage ) } - QString infoHtml = "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" " + TQString infoHtml = "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" " "CONTENT=\"text/html; charset=iso-8859-1\"></HEAD><BODY>"; infoHtml += trimmedHtml; diff --git a/amarok/src/magnatunebrowser/magnatuneartistinfobox.h b/amarok/src/magnatunebrowser/magnatuneartistinfobox.h index 99c3a850..f730f317 100644 --- a/amarok/src/magnatunebrowser/magnatuneartistinfobox.h +++ b/amarok/src/magnatunebrowser/magnatuneartistinfobox.h @@ -44,7 +44,7 @@ public: * @param widgetname The name of this widget * @return New MagnatuneArtistInfoBox object */ - MagnatuneArtistInfoBox( QWidget *parentWidget, const char *widgetname ); + MagnatuneArtistInfoBox( TQWidget *parentWidget, const char *widgetname ); /** * Destructor @@ -78,7 +78,7 @@ protected: * @param artistPage The artist url * @return A string containing the artist info as html. */ - QString extractArtistInfo( QString artistPage ); + TQString extractArtistInfo( TQString artistPage ); /** * Helper method to reset the scrollbars when loading a new album diff --git a/amarok/src/magnatunebrowser/magnatunebrowser.cpp b/amarok/src/magnatunebrowser/magnatunebrowser.cpp index 3a8ff599..57bfc3f3 100644 --- a/amarok/src/magnatunebrowser/magnatunebrowser.cpp +++ b/amarok/src/magnatunebrowser/magnatunebrowser.cpp @@ -29,38 +29,38 @@ Boston, MA 02110-1301, USA. #include <kiconloader.h> //multiTabBar icons #include <ktempfile.h> -#include <qsplitter.h> -#include <qdragobject.h> -#include <qlabel.h> +#include <tqsplitter.h> +#include <tqdragobject.h> +#include <tqlabel.h> MagnatuneBrowser *MagnatuneBrowser::s_instance = 0; MagnatuneBrowser::MagnatuneBrowser( const char *name ) - : QVBox( 0, name ) + : TQVBox( 0, name ) { DEBUG_BLOCK initTopPanel( ); - QSplitter *spliter = new QSplitter( Qt::Vertical, this ); + TQSplitter *spliter = new TQSplitter( Qt::Vertical, this ); debug() << "Magnatune browser starting..." << endl; m_listView = new MagnatuneListView( spliter ); - m_popupMenu = new QPopupMenu( spliter, "MagnatuneMenu" ); + m_popupMenu = new TQPopupMenu( spliter, "MagnatuneMenu" ); m_artistInfobox = new MagnatuneArtistInfoBox( spliter, "ArtistInfoBox" ); initBottomPanel(); - //connect (m_listView, SIGNAL(executed(KListViewItem *)), this, SLOT(itemExecuted(KListViewItem *))); - connect( m_listView, SIGNAL( doubleClicked( QListViewItem * ) ), - this, SLOT( itemExecuted( QListViewItem * ) ) ); - connect( m_listView, SIGNAL( selectionChanged( QListViewItem * ) ), - this, SLOT( selectionChanged( QListViewItem * ) ) ); - connect( m_listView, SIGNAL( rightButtonClicked ( QListViewItem *, const QPoint &, int ) ), - this, SLOT( showPopupMenu( QListViewItem *, const QPoint &, int ) ) ); - connect( m_popupMenu, SIGNAL( aboutToShow() ), - this, SLOT( menuAboutToShow() ) ); + //connect (m_listView, TQT_SIGNAL(executed(KListViewItem *)), this, TQT_SLOT(itemExecuted(KListViewItem *))); + connect( m_listView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( itemExecuted( TQListViewItem * ) ) ); + connect( m_listView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + this, TQT_SLOT( selectionChanged( TQListViewItem * ) ) ); + connect( m_listView, TQT_SIGNAL( rightButtonClicked ( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( showPopupMenu( TQListViewItem *, const TQPoint &, int ) ) ); + connect( m_popupMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( menuAboutToShow() ) ); m_currentInfoUrl = ""; @@ -73,7 +73,7 @@ MagnatuneBrowser::MagnatuneBrowser( const char *name ) } -void MagnatuneBrowser::itemExecuted( QListViewItem * item ) +void MagnatuneBrowser::itemExecuted( TQListViewItem * item ) { DEBUG_BLOCK; switch ( item->depth() ) @@ -100,7 +100,7 @@ void MagnatuneBrowser::addTrackToPlaylist( MagnatuneTrack *item ) if ( !item ) return ; // sanity check debug() << "Magnatune browser: adding single track" << endl; - QString url = item->getHifiURL(); + TQString url = item->getHifiURL(); Playlist * playlist = Playlist::instance(); playlist->insertMedia( KURL( url ) ); } @@ -130,7 +130,7 @@ void MagnatuneBrowser::addArtistToPlaylist( MagnatuneArtist *item ) addAlbumToPlaylist( &( *it ) ); } -void MagnatuneBrowser::selectionChanged( QListViewItem *item ) +void MagnatuneBrowser::selectionChanged( TQListViewItem *item ) { if ( !item ) return ; // sanity check @@ -190,7 +190,7 @@ void MagnatuneBrowser::selectionChanged( QListViewItem *item ) } } -void MagnatuneBrowser::showPopupMenu( QListViewItem * item, const QPoint & pos, int /*column*/ ) +void MagnatuneBrowser::showPopupMenu( TQListViewItem * item, const TQPoint & pos, int /*column*/ ) { if ( !item ) return ; @@ -199,7 +199,7 @@ void MagnatuneBrowser::showPopupMenu( QListViewItem * item, const QPoint & pos, void MagnatuneBrowser::addSelectionToPlaylist( ) { - QListViewItem * selectedItem = m_listView->selectedItem(); + TQListViewItem * selectedItem = m_listView->selectedItem(); switch ( selectedItem->depth() ) { @@ -218,22 +218,22 @@ void MagnatuneBrowser::menuAboutToShow( ) { m_popupMenu->clear(); - QListViewItem *selectedItem = m_listView->selectedItem(); + TQListViewItem *selectedItem = m_listView->selectedItem(); if ( !selectedItem ) return ; switch ( selectedItem->depth() ) { case 0: - m_popupMenu->insertItem( i18n( "Add artist to playlist" ), this, SLOT( addSelectionToPlaylist() ) ); + m_popupMenu->insertItem( i18n( "Add artist to playlist" ), this, TQT_SLOT( addSelectionToPlaylist() ) ); break; case 1: - m_popupMenu->insertItem( i18n( "Add album to playlist" ), this, SLOT( addSelectionToPlaylist() ) ); - m_popupMenu->insertItem( i18n( "Purchase album" ), this, SLOT( purchaseSelectedAlbum() ) ); + m_popupMenu->insertItem( i18n( "Add album to playlist" ), this, TQT_SLOT( addSelectionToPlaylist() ) ); + m_popupMenu->insertItem( i18n( "Purchase album" ), this, TQT_SLOT( purchaseSelectedAlbum() ) ); break; case 2: - m_popupMenu->insertItem( i18n( "Add track to playlist" ), this, SLOT( addSelectionToPlaylist() ) ); - m_popupMenu->insertItem( i18n( "Purchase album" ), this, SLOT( purchaseAlbumContainingSelectedTrack() ) ); + m_popupMenu->insertItem( i18n( "Add track to playlist" ), this, TQT_SLOT( addSelectionToPlaylist() ) ); + m_popupMenu->insertItem( i18n( "Purchase album" ), this, TQT_SLOT( purchaseAlbumContainingSelectedTrack() ) ); } } @@ -258,7 +258,7 @@ void MagnatuneBrowser::purchaseSelectedAlbum( ) { m_purchaseHandler = new MagnatunePurchaseHandler(); m_purchaseHandler->setParent( this ); - connect( m_purchaseHandler, SIGNAL( purchaseCompleted( bool ) ), this, SLOT( purchaseCompleted( bool ) ) ); + connect( m_purchaseHandler, TQT_SIGNAL( purchaseCompleted( bool ) ), this, TQT_SLOT( purchaseCompleted( bool ) ) ); } MagnatuneListViewAlbumItem *selectedAlbum = dynamic_cast<MagnatuneListViewAlbumItem *>( m_listView->selectedItem() ); @@ -273,7 +273,7 @@ void MagnatuneBrowser::purchaseAlbumContainingSelectedTrack( ) { m_purchaseHandler = new MagnatunePurchaseHandler(); m_purchaseHandler->setParent( this ); - connect( m_purchaseHandler, SIGNAL( purchaseCompleted( bool ) ), this, SLOT( purchaseCompleted( bool ) ) ); + connect( m_purchaseHandler, TQT_SIGNAL( purchaseCompleted( bool ) ), this, TQT_SLOT( purchaseCompleted( bool ) ) ); } MagnatuneListViewTrackItem *selectedTrack = dynamic_cast<MagnatuneListViewTrackItem *>( m_listView->selectedItem() ); @@ -288,52 +288,52 @@ void MagnatuneBrowser::purchaseAlbumContainingSelectedTrack( ) void MagnatuneBrowser::initTopPanel( ) { - m_topPanel = new QHBox( this, "topPanel", 0 ); + m_topPanel = new TQHBox( this, "topPanel", 0 ); m_topPanel->setMaximumHeight( 24 ); m_topPanel->setSpacing( 2 ); m_topPanel->setMargin( 2 ); - new QLabel ( i18n( "Genre: " ), m_topPanel, "genreLabel", 0 ); + new TQLabel ( i18n( "Genre: " ), m_topPanel, "genreLabel", 0 ); - m_genreComboBox = new QComboBox( false, m_topPanel, "genreComboBox" ); + m_genreComboBox = new TQComboBox( false, m_topPanel, "genreComboBox" ); updateGenreBox(); - m_advancedFeaturesButton = new QPushButton( i18n( "Redownload" ), m_topPanel, "advancedButton" ); - connect( m_advancedFeaturesButton, SIGNAL( clicked() ), this, SLOT( processRedownload() ) ); + m_advancedFeaturesButton = new TQPushButton( i18n( "Redownload" ), m_topPanel, "advancedButton" ); + connect( m_advancedFeaturesButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( processRedownload() ) ); - connect( m_genreComboBox, SIGNAL( activated ( int ) ), this, SLOT( genreChanged() ) ); + connect( m_genreComboBox, TQT_SIGNAL( activated ( int ) ), this, TQT_SLOT( genreChanged() ) ); } void MagnatuneBrowser::initBottomPanel() { - m_bottomPanel = new QVBox( this, "bottomPanel", 0 ); + m_bottomPanel = new TQVBox( this, "bottomPanel", 0 ); m_bottomPanel->setMaximumHeight( 54 ); m_bottomPanel->setSpacing( 2 ); m_bottomPanel->setMargin( 2 ); - QHBox *hBox = new QHBox( m_bottomPanel, "bottomHBox", 0 ); + TQHBox *hBox = new TQHBox( m_bottomPanel, "bottomHBox", 0 ); hBox->setMaximumHeight( 24 ); hBox->setSpacing( 2 ); //hBox->setMargin( 2 ); - m_purchaseAlbumButton = new QPushButton( i18n( "Purchase Album" ), m_bottomPanel, "purchaseButton" ); + m_purchaseAlbumButton = new TQPushButton( i18n( "Purchase Album" ), m_bottomPanel, "purchaseButton" ); m_purchaseAlbumButton->setIconSet( SmallIconSet( Amarok::icon( "download" ) ) ); m_purchaseAlbumButton->setEnabled( false ); m_purchaseAlbumButton->setMaximumHeight( 24 ); - m_updateListButton = new QPushButton( i18n( "Update" ), hBox, "updateButton" ); + m_updateListButton = new TQPushButton( i18n( "Update" ), hBox, "updateButton" ); m_updateListButton->setIconSet( SmallIconSet( Amarok::icon( "rescan" ) ) ); - m_showInfoToggleButton = new QPushButton( i18n( "Show Info" ) , hBox, "showInfoCheckbox" ); + m_showInfoToggleButton = new TQPushButton( i18n( "Show Info" ) , hBox, "showInfoCheckbox" ); m_showInfoToggleButton->setToggleButton( true ); m_showInfoToggleButton->setIconSet( SmallIconSet( Amarok::icon( "info" ) ) ); m_showInfoToggleButton->setOn( true ); m_isInfoShown = true; - connect( m_showInfoToggleButton, SIGNAL( toggled( bool ) ), this, SLOT( showInfo( bool ) ) ); - connect( m_updateListButton, SIGNAL( clicked() ), this, SLOT( updateButtonClicked() ) ); - connect( m_purchaseAlbumButton, SIGNAL( clicked() ) , this, SLOT( purchaseButtonClicked() ) ); + connect( m_showInfoToggleButton, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( showInfo( bool ) ) ); + connect( m_updateListButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updateButtonClicked() ) ); + connect( m_purchaseAlbumButton, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( purchaseButtonClicked() ) ); } void MagnatuneBrowser::updateButtonClicked() @@ -349,9 +349,9 @@ bool MagnatuneBrowser::updateMagnatuneList() m_listDownloadJob = KIO::storedGet( KURL( "http://magnatune.com/info/album_info.xml" ), false, false ); Amarok::StatusBar::instance() ->newProgressOperation( m_listDownloadJob ) .setDescription( i18n( "Downloading Magnatune.com Database" ) ) - .setAbortSlot( this, SLOT( listDownloadCancelled() ) ); + .setAbortSlot( this, TQT_SLOT( listDownloadCancelled() ) ); - connect( m_listDownloadJob, SIGNAL( result( KIO::Job* ) ), SLOT( listDownloadComplete( KIO::Job* ) ) ); + connect( m_listDownloadJob, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( listDownloadComplete( KIO::Job* ) ) ); return true; } @@ -372,22 +372,22 @@ void MagnatuneBrowser::listDownloadComplete( KIO::Job * downLoadJob ) KIO::StoredTransferJob* const storedJob = static_cast<KIO::StoredTransferJob*>( downLoadJob ); - QString list = QString( storedJob->data() ); + TQString list = TQString( storedJob->data() ); KTempFile tfile; m_tempFileName = tfile.name(); - QFile file( m_tempFileName ); + TQFile file( m_tempFileName ); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << list; file.close(); } MagnatuneXmlParser * parser = new MagnatuneXmlParser( m_tempFileName ); - connect( parser, SIGNAL( doneParsing() ), SLOT( doneParsing() ) ); + connect( parser, TQT_SIGNAL( doneParsing() ), TQT_SLOT( doneParsing() ) ); ThreadManager::instance() ->queueJob( parser ); } @@ -423,7 +423,7 @@ void MagnatuneBrowser::updateList() { DEBUG_BLOCK - const QString genre = m_genreComboBox->currentText(); + const TQString genre = m_genreComboBox->currentText(); MagnatuneArtistList artists; artists = MagnatuneDatabaseHandler::instance() ->getArtistsByGenre( genre ); @@ -449,14 +449,14 @@ void MagnatuneBrowser::doneParsing() updateList(); updateGenreBox( ); updateList(); // stupid stupid hack.... - if( !QFile::remove( m_tempFileName ) ) + if( !TQFile::remove( m_tempFileName ) ) debug() << "Couldn't remove temp file at " << m_tempFileName << endl; - m_tempFileName = QString(); + m_tempFileName = TQString(); } void MagnatuneBrowser::updateGenreBox() { - const QStringList genres = MagnatuneDatabaseHandler::instance() ->getAlbumGenres(); + const TQStringList genres = MagnatuneDatabaseHandler::instance() ->getAlbumGenres(); m_genreComboBox->clear(); m_genreComboBox->insertItem ( "All" , 0 ); // should not be i18n'ed as it is diff --git a/amarok/src/magnatunebrowser/magnatunebrowser.h b/amarok/src/magnatunebrowser/magnatunebrowser.h index 1a374308..4f730902 100644 --- a/amarok/src/magnatunebrowser/magnatunebrowser.h +++ b/amarok/src/magnatunebrowser/magnatunebrowser.h @@ -33,12 +33,12 @@ #include <kio/job.h> #include <kio/jobclasses.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qvbox.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqvbox.h> @@ -104,14 +104,14 @@ private slots: * item in the list view. Ads item to playlist. * @param item The item that was double clicked */ - void itemExecuted( QListViewItem * item); + void itemExecuted( TQListViewItem * item); /** * Slot for recieving notification when a new item in the list is selected. * Adds the corrosponding artist or album info to the info view (if visible) * @param item The selected item */ - void selectionChanged( QListViewItem * item); + void selectionChanged( TQListViewItem * item); /** * Slot for recieving notifications about right clicks in the list view. @@ -120,7 +120,7 @@ private slots: * @param pos The position of the cursor at the time of thre right click * @param column The column of the item that was right clicked (unused) */ - void showPopupMenu( QListViewItem * item, const QPoint & pos, int column ); + void showPopupMenu( TQListViewItem * item, const TQPoint & pos, int column ); /** * Slot for recieving notification that the update button has been clicked. @@ -227,24 +227,24 @@ private: MagnatuneListView *m_listView; MagnatuneArtistInfoBox *m_artistInfobox; - QString m_currentInfoUrl; - QPopupMenu *m_popupMenu; + TQString m_currentInfoUrl; + TQPopupMenu *m_popupMenu; MagnatunePurchaseHandler *m_purchaseHandler; MagnatuneRedownloadHandler *m_redownloadHandler; - QHBox *m_topPanel; - QVBox *m_bottomPanel; - QPushButton *m_advancedFeaturesButton; - QPushButton *m_updateListButton; - QPushButton *m_purchaseAlbumButton; - QPushButton *m_showInfoToggleButton; + TQHBox *m_topPanel; + TQVBox *m_bottomPanel; + TQPushButton *m_advancedFeaturesButton; + TQPushButton *m_updateListButton; + TQPushButton *m_purchaseAlbumButton; + TQPushButton *m_showInfoToggleButton; - QComboBox *m_genreComboBox; + TQComboBox *m_genreComboBox; bool m_isInfoShown; bool m_purchaseInProgress; bool m_polished; - QString m_tempFileName; + TQString m_tempFileName; KIO::TransferJob * m_listDownloadJob; }; diff --git a/amarok/src/magnatunebrowser/magnatunedatabasehandler.cpp b/amarok/src/magnatunebrowser/magnatunedatabasehandler.cpp index 48a52599..e66700bc 100644 --- a/amarok/src/magnatunebrowser/magnatunedatabasehandler.cpp +++ b/amarok/src/magnatunebrowser/magnatunedatabasehandler.cpp @@ -48,19 +48,19 @@ MagnatuneDatabaseHandler::createDatabase( ) //Get database instance CollectionDB *db = CollectionDB::instance(); - QString tracksAutoIncrement = ""; - QString albumsAutoIncrement = ""; - QString artistAutoIncrement = ""; + TQString tracksAutoIncrement = ""; + TQString albumsAutoIncrement = ""; + TQString artistAutoIncrement = ""; if ( db->getDbConnectionType() == DbConnection::postgresql ) { - db->query( QString( "CREATE SEQUENCE magnatune_track_seq;" ) ); - db->query( QString( "CREATE SEQUENCE magnatune_album_seq;" ) ); - db->query( QString( "CREATE SEQUENCE magnatune_artist_seq;" ) ); + db->query( TQString( "CREATE SEQUENCE magnatune_track_seq;" ) ); + db->query( TQString( "CREATE SEQUENCE magnatune_album_seq;" ) ); + db->query( TQString( "CREATE SEQUENCE magnatune_artist_seq;" ) ); - tracksAutoIncrement = QString( "DEFAULT nextval('magnatune_track_seq')" ); - albumsAutoIncrement = QString( "DEFAULT nextval('magnatune_album_seq')" ); - artistAutoIncrement = QString( "DEFAULT nextval('magnatune_artist_seq')" ); + tracksAutoIncrement = TQString( "DEFAULT nextval('magnatune_track_seq')" ); + albumsAutoIncrement = TQString( "DEFAULT nextval('magnatune_album_seq')" ); + artistAutoIncrement = TQString( "DEFAULT nextval('magnatune_artist_seq')" ); } else if ( db->getDbConnectionType() == DbConnection::mysql ) @@ -72,7 +72,7 @@ MagnatuneDatabaseHandler::createDatabase( ) } // create table containing tracks - QString queryString = "CREATE TABLE magnatune_tracks (" + TQString queryString = "CREATE TABLE magnatune_tracks (" "id INTEGER PRIMARY KEY " + tracksAutoIncrement + ',' + "name " + db->textColumnType() + ',' + "track_number INTEGER," @@ -85,7 +85,7 @@ MagnatuneDatabaseHandler::createDatabase( ) debug() << "Creating mangnatune_tracks: " << queryString << endl; - QStringList result = db->query( queryString ); + TQStringList result = db->query( queryString ); //Create album table queryString = "CREATE TABLE magnatune_albums (" @@ -121,31 +121,31 @@ void MagnatuneDatabaseHandler::destroyDatabase( ) { CollectionDB *db = CollectionDB::instance(); - QStringList result = db->query( "DROP TABLE magnatune_tracks;" ); + TQStringList result = db->query( "DROP TABLE magnatune_tracks;" ); result = db->query( "DROP TABLE magnatune_albums;" ); result = db->query( "DROP TABLE magnatune_artists;" ); if ( db->getDbConnectionType() == DbConnection::postgresql ) { - db->query( QString( "DROP SEQUENCE magnatune_track_seq;" ) ); - db->query( QString( "DROP SEQUENCE magnatune_album_seq;" ) ); - db->query( QString( "DROP SEQUENCE magnatune_artist_seq;" ) ); + db->query( TQString( "DROP SEQUENCE magnatune_track_seq;" ) ); + db->query( TQString( "DROP SEQUENCE magnatune_album_seq;" ) ); + db->query( TQString( "DROP SEQUENCE magnatune_artist_seq;" ) ); } } int MagnatuneDatabaseHandler::insertTrack( MagnatuneTrack *track, int albumId, int artistId ) { - QString numberString; + TQString numberString; CollectionDB *db = CollectionDB::instance(); - QString queryString = "INSERT INTO magnatune_tracks ( name, track_number, length, " + TQString queryString = "INSERT INTO magnatune_tracks ( name, track_number, length, " "album_id, artist_id, preview_lofi, preview_hifi ) VALUES ( '" + db->escapeString( track->getName() ) + "', " - + QString::number( track->getTrackNumber() ) + ", " - + QString::number( track->getDuration() ) + ", " - + QString::number( albumId ) + ", " - + QString::number( artistId ) + ", '" + + TQString::number( track->getTrackNumber() ) + ", " + + TQString::number( track->getDuration() ) + ", " + + TQString::number( albumId ) + ", " + + TQString::number( artistId ) + ", '" + db->escapeString( track->getLofiURL() ) + "', '" + db->escapeString( track->getHifiURL() ) + "' );"; @@ -158,13 +158,13 @@ MagnatuneDatabaseHandler::insertTrack( MagnatuneTrack *track, int albumId, int a int MagnatuneDatabaseHandler::insertAlbum( MagnatuneAlbum *album, int artistId ) { - QString queryString; + TQString queryString; CollectionDB *db = CollectionDB::instance(); queryString = "INSERT INTO magnatune_albums ( name, year, artist_id, " "genre, album_code, cover_url ) VALUES ( '" + db->escapeString( db->escapeString( album->getName() ) ) + "', " - + QString::number( album->getLaunchDate().year() ) + ", " - + QString::number( artistId ) + ", '" + + TQString::number( album->getLaunchDate().year() ) + ", " + + TQString::number( artistId ) + ", '" + db->escapeString( album->getMp3Genre() ) + "', '" + album->getAlbumCode() + "', '" + db->escapeString( album->getCoverURL() ) + "' );"; @@ -179,7 +179,7 @@ MagnatuneDatabaseHandler::insertAlbum( MagnatuneAlbum *album, int artistId ) int MagnatuneDatabaseHandler::insertArtist( MagnatuneArtist *artist ) { - QString queryString; + TQString queryString; CollectionDB *db = CollectionDB::instance(); queryString = "INSERT INTO magnatune_artists ( name, artist_page, description, " "photo_url ) VALUES ( '" @@ -195,48 +195,48 @@ MagnatuneDatabaseHandler::insertArtist( MagnatuneArtist *artist ) int -MagnatuneDatabaseHandler::getArtistIdByExactName( QString name ) +MagnatuneDatabaseHandler::getArtistIdByExactName( TQString name ) { CollectionDB *db = CollectionDB::instance(); - QString queryString = "SELECT id from magnatune_artists WHERE name='" + db->escapeString( name ) + "';"; - QStringList result = db->query( queryString ); + TQString queryString = "SELECT id from magnatune_artists WHERE name='" + db->escapeString( name ) + "';"; + TQStringList result = db->query( queryString ); //debug() << "Looking for id of artist " << name << ":" << endl; if ( result.size() < 1 ) return -1; int artistId = result.first().toInt(); - //debug() << " Found: " << QString::number( artistId ) << ":" << endl; + //debug() << " Found: " << TQString::number( artistId ) << ":" << endl; return artistId; } -int MagnatuneDatabaseHandler::getAlbumIdByAlbumCode( QString albumcode ) +int MagnatuneDatabaseHandler::getAlbumIdByAlbumCode( TQString albumcode ) { CollectionDB *db = CollectionDB::instance(); - QString queryString = "SELECT id from magnatune_albums WHERE album_code='" + db->escapeString( albumcode ) + "';"; - QStringList result = db->query( queryString ); + TQString queryString = "SELECT id from magnatune_albums WHERE album_code='" + db->escapeString( albumcode ) + "';"; + TQStringList result = db->query( queryString ); //debug() << "Looking for id of album " << albumcode << ":" << endl; if ( result.size() < 1 ) return -1; int albumId = result.first().toInt(); - //debug() << " Found: " << QString::number( albumId ) << ":" << endl; + //debug() << " Found: " << TQString::number( albumId ) << ":" << endl; return albumId; } MagnatuneArtistList -MagnatuneDatabaseHandler::getArtistsByGenre( QString genre ) +MagnatuneDatabaseHandler::getArtistsByGenre( TQString genre ) { - QString genreSql = ""; + TQString genreSql = ""; if ( genre != "All" ) { @@ -245,7 +245,7 @@ MagnatuneDatabaseHandler::getArtistsByGenre( QString genre ) CollectionDB *db = CollectionDB::instance(); - QString queryString; + TQString queryString; queryString = "SELECT DISTINCT magnatune_artists.id, " "magnatune_artists.name, magnatune_artists.artist_page, " "magnatune_artists.description, magnatune_artists.photo_url " @@ -253,7 +253,7 @@ MagnatuneDatabaseHandler::getArtistsByGenre( QString genre ) "WHERE " + genreSql + "magnatune_albums.artist_id " "= magnatune_artists.id;"; - QStringList result = db->query( queryString ); + TQStringList result = db->query( queryString ); debug() << "Looking for artist in genre: " << genre << endl; @@ -287,10 +287,10 @@ MagnatuneDatabaseHandler::getArtistsByGenre( QString genre ) } MagnatuneAlbumList -MagnatuneDatabaseHandler::getAlbumsByArtistId( int id, QString genre ) +MagnatuneDatabaseHandler::getAlbumsByArtistId( int id, TQString genre ) { - QString genreSqlString; + TQString genreSqlString; if ( genre.isEmpty() ) { @@ -303,19 +303,19 @@ MagnatuneDatabaseHandler::getAlbumsByArtistId( int id, QString genre ) CollectionDB *db = CollectionDB::instance(); - QString queryString; + TQString queryString; queryString = "SELECT DISTINCT id, " "name, year, " "artist_id, genre, " "album_code, cover_url " "FROM magnatune_albums " - "WHERE artist_id = '" + QString::number( id ) + '\''; + "WHERE artist_id = '" + TQString::number( id ) + '\''; queryString += genreSqlString; queryString += ';'; - QStringList result = db->query( queryString ); + TQStringList result = db->query( queryString ); MagnatuneAlbumList list; @@ -333,7 +333,7 @@ MagnatuneDatabaseHandler::getAlbumsByArtistId( int id, QString genre ) album.setName( result.front() ); result.pop_front(); - album.setLaunchDate( QDate( result.front().toInt(), 1, 1 ) ); + album.setLaunchDate( TQDate( result.front().toInt(), 1, 1 ) ); result.pop_front(); album.setArtistId( result.front().toInt() ); @@ -362,16 +362,16 @@ MagnatuneDatabaseHandler::getTracksByAlbumId( int id ) CollectionDB *db = CollectionDB::instance(); - QString queryString; + TQString queryString; queryString = "SELECT DISTINCT id, " "name, track_number, " "length, album_id, " "artist_id, preview_lofi, " "preview_hifi " "FROM magnatune_tracks " - "WHERE album_id = '" + QString::number( id ) + "';"; + "WHERE album_id = '" + TQString::number( id ) + "';"; - QStringList result = db->query( queryString ); + TQStringList result = db->query( queryString ); MagnatuneTrackList list; @@ -418,13 +418,13 @@ MagnatuneDatabaseHandler::getTracksByAlbumId( int id ) } -QStringList +TQStringList MagnatuneDatabaseHandler::getAlbumGenres( ) { CollectionDB *db = CollectionDB::instance(); - QString queryString; + TQString queryString; queryString = "SELECT DISTINCT genre " "FROM magnatune_albums " "ORDER BY genre;"; @@ -438,7 +438,7 @@ MagnatuneDatabaseHandler::begin( ) CollectionDB *db = CollectionDB::instance(); - QString queryString = "BEGIN;"; + TQString queryString = "BEGIN;"; db->query( queryString ); } @@ -447,7 +447,7 @@ void MagnatuneDatabaseHandler::commit( ) { CollectionDB *db = CollectionDB::instance(); - QString queryString = "COMMIT;"; + TQString queryString = "COMMIT;"; db->query( queryString ); @@ -459,14 +459,14 @@ MagnatuneDatabaseHandler::getArtistById( int id ) CollectionDB *db = CollectionDB::instance(); - QString queryString; + TQString queryString; queryString = "SELECT id, " "name, artist_page, " "description, photo_url " "FROM magnatune_artists " - "WHERE id = '" + QString::number( id ) + "';"; + "WHERE id = '" + TQString::number( id ) + "';"; - QStringList result = db->query( queryString ); + TQStringList result = db->query( queryString ); MagnatuneArtist artist; @@ -501,15 +501,15 @@ MagnatuneDatabaseHandler::getAlbumById( int id ) CollectionDB *db = CollectionDB::instance(); - QString queryString; + TQString queryString; queryString = "SELECT id, " "name, year, " "artist_id, genre, " "album_code, cover_url " "FROM magnatune_albums " - "WHERE id = '" + QString::number( id ) + "';"; + "WHERE id = '" + TQString::number( id ) + "';"; - QStringList result = db->query( queryString ); + TQStringList result = db->query( queryString ); MagnatuneAlbum album; @@ -522,7 +522,7 @@ MagnatuneDatabaseHandler::getAlbumById( int id ) album.setName( result.front() ); result.pop_front(); - album.setLaunchDate( QDate( result.front().toInt(), 1, 1 ) ); + album.setLaunchDate( TQDate( result.front().toInt(), 1, 1 ) ); result.pop_front(); album.setArtistId( result.front().toInt() ); diff --git a/amarok/src/magnatunebrowser/magnatunedatabasehandler.h b/amarok/src/magnatunebrowser/magnatunedatabasehandler.h index 76d8e98c..f9af8e7c 100644 --- a/amarok/src/magnatunebrowser/magnatunedatabasehandler.h +++ b/amarok/src/magnatunebrowser/magnatunedatabasehandler.h @@ -23,7 +23,7 @@ #include "collectiondb.h" #include "magnatunetypes.h" -#include <qstringlist.h> +#include <tqstringlist.h> /** @@ -84,7 +84,7 @@ public: * @param name artist name to retrieve * @return id of artist. -1 if no artist is found */ - int getArtistIdByExactName(QString name); + int getArtistIdByExactName(TQString name); /** @@ -92,7 +92,7 @@ public: * @param albumcode The album code. * @return The id of the album, -1 if not foud. */ - int getAlbumIdByAlbumCode( QString albumcode ); + int getAlbumIdByAlbumCode( TQString albumcode ); /** * Returns all artist that has albums in a given genre. If an artist has both a Rock @@ -100,7 +100,7 @@ public: * @param genre the genre * @return A list of artist in the genre */ - MagnatuneArtistList getArtistsByGenre(QString genre); + MagnatuneArtistList getArtistsByGenre(TQString genre); /** * Returns the artist with a given id @@ -122,7 +122,7 @@ public: * @param genre Limits the albums to a specific genre. Use "All" to get all albums * @return List of albums. empty if none are found */ - MagnatuneAlbumList getAlbumsByArtistId(int id, QString genre); + MagnatuneAlbumList getAlbumsByArtistId(int id, TQString genre); /** * Retrieves all tracks on a given album @@ -142,7 +142,7 @@ public: * Retrieves a list of all genres present in the databse * @return A list of genres */ - QStringList getAlbumGenres(); + TQStringList getAlbumGenres(); /** * Begins a database transaction. Must be followed by a later call to commit() diff --git a/amarok/src/magnatunebrowser/magnatunedownloaddialog.cpp b/amarok/src/magnatunebrowser/magnatunedownloaddialog.cpp index 2c13f56c..6959139e 100644 --- a/amarok/src/magnatunebrowser/magnatunedownloaddialog.cpp +++ b/amarok/src/magnatunebrowser/magnatunedownloaddialog.cpp @@ -24,12 +24,12 @@ Boston, MA 02110-1301, USA. #include <kfiledialog.h> #include <kurlrequester.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qtextedit.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqtextedit.h> -MagnatuneDownloadDialog::MagnatuneDownloadDialog( QWidget *parent, const char *name, bool modal, WFlags fl ) +MagnatuneDownloadDialog::MagnatuneDownloadDialog( TQWidget *parent, const char *name, bool modal, WFlags fl ) : MagnatuneDownloadDialogBase( parent, name, modal, fl ) { downloadTargetURLRequester->fileDialog() ->setMode( KFile::Directory ); diff --git a/amarok/src/magnatunebrowser/magnatunedownloaddialog.h b/amarok/src/magnatunebrowser/magnatunedownloaddialog.h index 726900d2..6ecba1fc 100644 --- a/amarok/src/magnatunebrowser/magnatunedownloaddialog.h +++ b/amarok/src/magnatunebrowser/magnatunedownloaddialog.h @@ -23,7 +23,7 @@ #include "magnatunedownloaddialogbase.h" #include "magnatunedownloadinfo.h" -#include <qmap.h> +#include <tqmap.h> /** @@ -38,12 +38,12 @@ class MagnatuneDownloadDialog : public MagnatuneDownloadDialogBase public: /** * Overridden constructor. - * @param parent Pointer to the parent QWidget. + * @param parent Pointer to the parent TQWidget. * @param name Name of this widget. * @param modal Sets modal state. * @param fl Additional dialog flags. */ - MagnatuneDownloadDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); + MagnatuneDownloadDialog( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); /** * Destructor diff --git a/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp b/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp index 7671ce27..828c1cf3 100644 --- a/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp +++ b/amarok/src/magnatunebrowser/magnatunedownloadinfo.cpp @@ -23,11 +23,11 @@ #include "debug.h" -#include <qfile.h> +#include <tqfile.h> MagnatuneDownloadInfo::MagnatuneDownloadInfo() { - m_selectedDownloadFormat = QString::null; + m_selectedDownloadFormat = TQString::null; m_albumId = -1; } @@ -35,14 +35,14 @@ MagnatuneDownloadInfo::MagnatuneDownloadInfo() MagnatuneDownloadInfo::~MagnatuneDownloadInfo() {} -bool MagnatuneDownloadInfo::initFromFile( QString downloadInfoFileName ) +bool MagnatuneDownloadInfo::initFromFile( TQString downloadInfoFileName ) { - QString xml; + TQString xml; - QFile file( downloadInfoFileName ); + TQFile file( downloadInfoFileName ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.atEnd() ) { xml += (stream.readLine() + '\n'); @@ -58,7 +58,7 @@ bool MagnatuneDownloadInfo::initFromFile( QString downloadInfoFileName ) return initFromString( xml ); } -bool MagnatuneDownloadInfo::initFromString( QString downloadInfoString ) +bool MagnatuneDownloadInfo::initFromString( TQString downloadInfoString ) { //complete overkill to do a full SAX2 parser for this at the moment... I think.... @@ -197,17 +197,17 @@ bool MagnatuneDownloadInfo::initFromString( QString downloadInfoString ) return true; } -QString MagnatuneDownloadInfo::getUserName( ) +TQString MagnatuneDownloadInfo::getUserName( ) { return m_userName; } -QString MagnatuneDownloadInfo::getPassword( ) +TQString MagnatuneDownloadInfo::getPassword( ) { return m_password; } -QString MagnatuneDownloadInfo::getDownloadMessage( ) +TQString MagnatuneDownloadInfo::getDownloadMessage( ) { return m_downloadMessage; } @@ -217,7 +217,7 @@ DownloadFormatMap MagnatuneDownloadInfo::getFormatMap() return m_downloadFormats; } -void MagnatuneDownloadInfo::setFormatSelection( QString selectedFormat ) +void MagnatuneDownloadInfo::setFormatSelection( TQString selectedFormat ) { m_selectedDownloadFormat = selectedFormat; } @@ -229,7 +229,7 @@ bool MagnatuneDownloadInfo::isReadyForDownload( ) KURL MagnatuneDownloadInfo::getCompleteDownloadUrl( ) { - QString url = m_downloadFormats[ m_selectedDownloadFormat ]; + TQString url = m_downloadFormats[ m_selectedDownloadFormat ]; KURL downloadUrl(url); downloadUrl.setUser(m_userName); downloadUrl.setPass(m_password); @@ -237,12 +237,12 @@ KURL MagnatuneDownloadInfo::getCompleteDownloadUrl( ) return downloadUrl; } -void MagnatuneDownloadInfo::setUnpackUrl( QString unpackUrl ) +void MagnatuneDownloadInfo::setUnpackUrl( TQString unpackUrl ) { m_unpackUrl = unpackUrl; } -QString MagnatuneDownloadInfo::getUnpackLocation( ) +TQString MagnatuneDownloadInfo::getUnpackLocation( ) { return m_unpackUrl; } diff --git a/amarok/src/magnatunebrowser/magnatunedownloadinfo.h b/amarok/src/magnatunebrowser/magnatunedownloadinfo.h index 3e22d709..50fa4016 100644 --- a/amarok/src/magnatunebrowser/magnatunedownloadinfo.h +++ b/amarok/src/magnatunebrowser/magnatunedownloadinfo.h @@ -23,11 +23,11 @@ #include <kurl.h> -#include <qmap.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqstring.h> -typedef QMap<QString, QString> DownloadFormatMap; +typedef TQMap<TQString, TQString> DownloadFormatMap; /** Class for parsing and storing the info from a download xml file or string @@ -39,37 +39,37 @@ public: MagnatuneDownloadInfo(); ~MagnatuneDownloadInfo(); - bool initFromString( QString downloadInfoString ); - bool initFromFile( QString downloadInfoFileName ); + bool initFromString( TQString downloadInfoString ); + bool initFromFile( TQString downloadInfoFileName ); DownloadFormatMap getFormatMap(); - QString getUserName(); - QString getPassword(); - QString getDownloadMessage(); + TQString getUserName(); + TQString getPassword(); + TQString getDownloadMessage(); int getAlbumId(); - void setFormatSelection(QString selectedFormat); - void setUnpackUrl(QString unpackUrl); + void setFormatSelection(TQString selectedFormat); + void setUnpackUrl(TQString unpackUrl); void setAlbumId(int id); bool isReadyForDownload(); KURL getCompleteDownloadUrl(); - QString getUnpackLocation(); + TQString getUnpackLocation(); protected: DownloadFormatMap m_downloadFormats; - QString m_userName; - QString m_password; - QString m_downloadMessage; + TQString m_userName; + TQString m_password; + TQString m_downloadMessage; int m_albumId; //the following members are for storing the user selections regarding a download - QString m_unpackUrl; - QString m_selectedDownloadFormat; + TQString m_unpackUrl; + TQString m_selectedDownloadFormat; }; diff --git a/amarok/src/magnatunebrowser/magnatunelistview.cpp b/amarok/src/magnatunebrowser/magnatunelistview.cpp index cf4bef3c..3ea8a167 100644 --- a/amarok/src/magnatunebrowser/magnatunelistview.cpp +++ b/amarok/src/magnatunebrowser/magnatunelistview.cpp @@ -24,9 +24,9 @@ #include <kdeversion.h> #include <klocale.h> -#include <qcolor.h> +#include <tqcolor.h> -MagnatuneListView::MagnatuneListView( QWidget * parent ) +MagnatuneListView::MagnatuneListView( TQWidget * parent ) : KListView( parent ) { @@ -34,8 +34,8 @@ MagnatuneListView::MagnatuneListView( QWidget * parent ) addColumn( i18n( "Artist/Album/Track" ) ); addColumn( i18n( "Duration" ) ); - setColumnWidthMode( 0, QListView::Maximum ); - setResizeMode( QListView::LastColumn ); + setColumnWidthMode( 0, TQListView::Maximum ); + setResizeMode( TQListView::LastColumn ); setShowSortIndicator ( true ); diff --git a/amarok/src/magnatunebrowser/magnatunelistview.h b/amarok/src/magnatunebrowser/magnatunelistview.h index cb716215..2a7f7391 100644 --- a/amarok/src/magnatunebrowser/magnatunelistview.h +++ b/amarok/src/magnatunebrowser/magnatunelistview.h @@ -34,7 +34,7 @@ A specialized KListView that provides drag and drop functionality class MagnatuneListView : public KListView { public: - MagnatuneListView(QWidget * parent); + MagnatuneListView(TQWidget * parent); ~MagnatuneListView(); diff --git a/amarok/src/magnatunebrowser/magnatunelistviewitems.cpp b/amarok/src/magnatunebrowser/magnatunelistviewitems.cpp index 48992884..8ce1046c 100644 --- a/amarok/src/magnatunebrowser/magnatunelistviewitems.cpp +++ b/amarok/src/magnatunebrowser/magnatunelistviewitems.cpp @@ -24,7 +24,7 @@ #include <kiconloader.h> #include <klocale.h> -#include <qdatetime.h> +#include <tqdatetime.h> @@ -146,7 +146,7 @@ MagnatuneListViewTrackItem::MagnatuneListViewTrackItem( MagnatuneTrack track, KL { int trackNumber = track.getTrackNumber(); - QString trackNumberString = QString::number( trackNumber ); + TQString trackNumberString = TQString::number( trackNumber ); if (trackNumber < 10) trackNumberString = '0' + trackNumberString; @@ -154,9 +154,9 @@ MagnatuneListViewTrackItem::MagnatuneListViewTrackItem( MagnatuneTrack track, KL KListViewItem::setText( 0, trackNumberString + " - " + track.getName() ); - debug() << "track duration: " << QString::number( track.getDuration() ) << endl; + debug() << "track duration: " << TQString::number( track.getDuration() ) << endl; - QTime duration; + TQTime duration; duration = duration.addSecs(track.getDuration()); if (duration.hour() == 0) diff --git a/amarok/src/magnatunebrowser/magnatunepurchasedialog.cpp b/amarok/src/magnatunebrowser/magnatunepurchasedialog.cpp index 440f405e..aeaa6843 100644 --- a/amarok/src/magnatunebrowser/magnatunepurchasedialog.cpp +++ b/amarok/src/magnatunebrowser/magnatunepurchasedialog.cpp @@ -21,15 +21,15 @@ #include "magnatunedatabasehandler.h" #include "magnatunepurchasedialog.h" -#include <qcombobox.h> -#include <qlineedit.h> -#include <qmessagebox.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qlabel.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqmessagebox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqlabel.h> -MagnatunePurchaseDialog::MagnatunePurchaseDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) +MagnatunePurchaseDialog::MagnatunePurchaseDialog( TQWidget* parent, const char* name, bool modal, WFlags fl ) : magnatunePurchaseDialogBase( parent, name, modal, fl ) {} @@ -45,7 +45,7 @@ void MagnatunePurchaseDialog::setAlbum( const MagnatuneAlbum &album ) MagnatuneArtist artist = MagnatuneDatabaseHandler::instance()->getArtistById( album.getArtistId() ); artistEdit->setText( artist.getName() ); genresEdit->setText( album.getMp3Genre() ); - launchDateEdit->setText( QString::number( album.getLaunchDate().year() ) ); + launchDateEdit->setText( TQString::number( album.getLaunchDate().year() ) ); m_albumCode = album.getAlbumCode(); @@ -85,49 +85,49 @@ bool MagnatunePurchaseDialog::verifyEntries( ) // check all the entries for validity //cc number: - QString ccString = ccEdit->text(); + TQString ccString = ccEdit->text(); ccString.stripWhiteSpace (); - QRegExp ccExp( "^[\\d]{10,20}$" ); + TQRegExp ccExp( "^[\\d]{10,20}$" ); if ( !ccExp.exactMatch( ccString ) ) { - QMessageBox::information( this, "Invalid credit card number", + TQMessageBox::information( this, "Invalid credit card number", "The credit card number entered does not appear to be valid\n" ); return false; } //email - QString emailString = emailEdit->text(); + TQString emailString = emailEdit->text(); emailString.stripWhiteSpace (); - QRegExp emailExp( "^\\S+@\\S+\\.\\S+$" ); + TQRegExp emailExp( "^\\S+@\\S+\\.\\S+$" ); if ( !emailExp.exactMatch( emailString ) ) { - QMessageBox::information( this, "Invalid email", + TQMessageBox::information( this, "Invalid email", "The email address entered does not appear to be valid\n" ); return false; } //month - QString monthString = expMonthEdit->text(); + TQString monthString = expMonthEdit->text(); monthString.stripWhiteSpace (); - QRegExp monthExp( "^\\d{2}$" ); + TQRegExp monthExp( "^\\d{2}$" ); if ( !monthExp.exactMatch( monthString ) ) { - QMessageBox::information( this, "Invalid expiration month", + TQMessageBox::information( this, "Invalid expiration month", "The credit card expiration month does not appear to be valid\n" ); return false; } //month - QString yearString = expYearEdit->text(); + TQString yearString = expYearEdit->text(); yearString.stripWhiteSpace (); - QRegExp yearExp( "^\\d{2}$" ); + TQRegExp yearExp( "^\\d{2}$" ); if ( !yearExp.exactMatch( yearString ) ) { - QMessageBox::information( this, "Invalid expiration month", + TQMessageBox::information( this, "Invalid expiration month", "The credit card expiration year does not appear to be valid\n" ); return false; } @@ -140,9 +140,9 @@ bool MagnatunePurchaseDialog::verifyEntries( ) } -void MagnatunePurchaseDialog::setCover( QString coverFile ) +void MagnatunePurchaseDialog::setCover( TQString coverFile ) { - coverPixmapLabel->setPixmap( QPixmap( coverFile ) ); + coverPixmapLabel->setPixmap( TQPixmap( coverFile ) ); } diff --git a/amarok/src/magnatunebrowser/magnatunepurchasedialog.h b/amarok/src/magnatunebrowser/magnatunepurchasedialog.h index d87941c3..a10af868 100644 --- a/amarok/src/magnatunebrowser/magnatunepurchasedialog.h +++ b/amarok/src/magnatunebrowser/magnatunepurchasedialog.h @@ -31,12 +31,12 @@ public: /** * Overridden constructor. - * @param parent Pointer to the parent QWidget. + * @param parent Pointer to the parent TQWidget. * @param name Name of this widget. * @param modal Sets modal state. * @param fl Additional dialog flags. */ - MagnatunePurchaseDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); + MagnatunePurchaseDialog( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); /** * Destructor @@ -55,7 +55,7 @@ public: * Loads image into the cover label. * @param coverFile image file to load. */ - void setCover( QString coverFile ); + void setCover( TQString coverFile ); signals: @@ -71,7 +71,7 @@ signals: * @param albumCode The album code of the album. * @param amount The amount to pay (in us $) */ - void makePurchase( QString ccNumber, QString expYear, QString expMonth, QString name, QString email, QString albumCode, int amount ); + void makePurchase( TQString ccNumber, TQString expYear, TQString expMonth, TQString name, TQString email, TQString albumCode, int amount ); /** * Signal emitted if purchase operation is cancelled @@ -84,7 +84,7 @@ public slots: private: /*$PRIVATE_FUNCTIONS$*/ - QString m_albumCode; + TQString m_albumCode; /** * Helper function to verify that all entries are valid. diff --git a/amarok/src/magnatunebrowser/magnatunepurchasehandler.cpp b/amarok/src/magnatunebrowser/magnatunepurchasehandler.cpp index 6c04147d..fbfed0ba 100644 --- a/amarok/src/magnatunebrowser/magnatunepurchasehandler.cpp +++ b/amarok/src/magnatunebrowser/magnatunepurchasehandler.cpp @@ -25,12 +25,12 @@ Boston, MA 02110-1301, USA. #include <ktempdir.h> -#include <qdir.h> -#include <qfile.h> -#include <qmessagebox.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqmessagebox.h> MagnatunePurchaseHandler::MagnatunePurchaseHandler() - : QObject() + : TQObject() { m_downloadDialog = 0; @@ -55,12 +55,12 @@ void MagnatunePurchaseHandler::purchaseAlbum( const MagnatuneAlbum &album ) //Then we can show it on the purchase dialog as well as put it in the //same directory as the album. - QString albumCoverUrlString = album.getCoverURL(); + TQString albumCoverUrlString = album.getCoverURL(); if ( m_albumDownloader == 0 ) { m_albumDownloader = new MagnatuneAlbumDownloader(); - connect( m_albumDownloader, SIGNAL( coverDownloadCompleted( QString ) ), this, SLOT( showPurchaseDialog( QString ) ) ); + connect( m_albumDownloader, TQT_SIGNAL( coverDownloadCompleted( TQString ) ), this, TQT_SLOT( showPurchaseDialog( TQString ) ) ); } m_currentAlbumCoverName = album.getName() + " - cover.jpg"; @@ -70,7 +70,7 @@ void MagnatunePurchaseHandler::purchaseAlbum( const MagnatuneAlbum &album ) } -void MagnatunePurchaseHandler::showPurchaseDialog( QString coverTempLocation ) +void MagnatunePurchaseHandler::showPurchaseDialog( TQString coverTempLocation ) { if ( m_albumDownloader != 0 ) @@ -83,8 +83,8 @@ void MagnatunePurchaseHandler::showPurchaseDialog( QString coverTempLocation ) { m_purchaseDialog = new MagnatunePurchaseDialog( m_parent, "PurchaseDialog", true, 0 ); - connect( m_purchaseDialog, SIGNAL( makePurchase( QString, QString, QString, QString, QString, QString, int ) ), this, SLOT( processPayment( QString, QString, QString, QString, QString, QString, int ) ) ); - connect ( m_purchaseDialog, SIGNAL( cancelled() ), this, SLOT( albumPurchaseCancelled() ) ); + connect( m_purchaseDialog, TQT_SIGNAL( makePurchase( TQString, TQString, TQString, TQString, TQString, TQString, int ) ), this, TQT_SLOT( processPayment( TQString, TQString, TQString, TQString, TQString, TQString, int ) ) ); + connect ( m_purchaseDialog, TQT_SIGNAL( cancelled() ), this, TQT_SLOT( albumPurchaseCancelled() ) ); } @@ -101,20 +101,20 @@ void MagnatunePurchaseHandler::showPurchaseDialog( QString coverTempLocation ) } } -void MagnatunePurchaseHandler::processPayment( QString ccNumber, QString expYear, QString expMonth, QString name, QString email, QString albumCode, int amount ) +void MagnatunePurchaseHandler::processPayment( TQString ccNumber, TQString expYear, TQString expMonth, TQString name, TQString email, TQString albumCode, int amount ) { - QString amountString; + TQString amountString; amountString.setNum( amount, 10 ); - QString purchaseURL = "https://magnatune.com/buy/buy_dl_cc_xml?cc=" + ccNumber + "&mm=" + expMonth + "&yy=" + expYear + "&sku=" + albumCode + "&name=" + name + "&email=" + email + "&id=amarok&amount=" + amountString; + TQString purchaseURL = "https://magnatune.com/buy/buy_dl_cc_xml?cc=" + ccNumber + "&mm=" + expMonth + "&yy=" + expYear + "&sku=" + albumCode + "&name=" + name + "&email=" + email + "&id=amarok&amount=" + amountString; - QString debugPurchaseURL = "https://magnatune.com/buy/buy_dl_cc_xml?cc=**********&mm=**&yy=**&sku=" + albumCode + "&name=" + name + "&email=********&id=amarok&amount=" + amountString; + TQString debugPurchaseURL = "https://magnatune.com/buy/buy_dl_cc_xml?cc=**********&mm=**&yy=**&sku=" + albumCode + "&name=" + name + "&email=********&id=amarok&amount=" + amountString; debug() << "purchase url : " << debugPurchaseURL << endl; m_resultDownloadJob = KIO::storedGet( KURL( purchaseURL ), false, false ); Amarok::StatusBar::instance() ->newProgressOperation( m_resultDownloadJob ).setDescription( i18n( "Processing Payment" ) ); - connect( m_resultDownloadJob, SIGNAL( result( KIO::Job* ) ), SLOT( xmlDownloadComplete( KIO::Job* ) ) ); + connect( m_resultDownloadJob, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( xmlDownloadComplete( KIO::Job* ) ) ); } @@ -133,7 +133,7 @@ void MagnatunePurchaseHandler::xmlDownloadComplete( KIO::Job * downloadJob ) return ; //not the right job, so let's ignore it KIO::StoredTransferJob* const storedJob = static_cast<KIO::StoredTransferJob*>( downloadJob ); - QString resultXml = QString( storedJob->data() ); + TQString resultXml = TQString( storedJob->data() ); debug() << endl << endl << "result: " << resultXml << endl << endl; @@ -141,13 +141,13 @@ void MagnatunePurchaseHandler::xmlDownloadComplete( KIO::Job * downloadJob ) if ( m_albumDownloader == 0 ) { m_albumDownloader = new MagnatuneAlbumDownloader(); - connect( m_albumDownloader, SIGNAL( downloadComplete( bool ) ), this, SLOT( albumDownloadComplete( bool ) ) ); + connect( m_albumDownloader, TQT_SIGNAL( downloadComplete( bool ) ), this, TQT_SLOT( albumDownloadComplete( bool ) ) ); } if ( m_downloadDialog == 0 ) { m_downloadDialog = new MagnatuneDownloadDialog( m_parent, "downloaddialog", true, 0 ); - connect( m_downloadDialog, SIGNAL( downloadAlbum( MagnatuneDownloadInfo * ) ), m_albumDownloader, SLOT( downloadAlbum( MagnatuneDownloadInfo * ) ) ); + connect( m_downloadDialog, TQT_SIGNAL( downloadAlbum( MagnatuneDownloadInfo * ) ), m_albumDownloader, TQT_SLOT( downloadAlbum( MagnatuneDownloadInfo * ) ) ); } @@ -171,23 +171,23 @@ void MagnatunePurchaseHandler::xmlDownloadComplete( KIO::Job * downloadJob ) else { - QMessageBox::information( m_parent, "Could not process payment", + TQMessageBox::information( m_parent, "Could not process payment", "There seems to be an error in the information entered (check the credit card number), please try again\n" ); m_purchaseDialog->setEnabled( true ); } } -void MagnatunePurchaseHandler::setParent( QWidget * parent ) +void MagnatunePurchaseHandler::setParent( TQWidget * parent ) { m_parent = parent; } -void MagnatunePurchaseHandler::saveDownloadInfo( QString infoXml ) +void MagnatunePurchaseHandler::saveDownloadInfo( TQString infoXml ) { - QDir purchaseDir( Amarok::saveLocation( "magnatune.com/purchases/" ) ); + TQDir purchaseDir( Amarok::saveLocation( "magnatune.com/purchases/" ) ); debug() << "magnatune save location" << purchaseDir.absPath() << endl; @@ -199,10 +199,10 @@ void MagnatunePurchaseHandler::saveDownloadInfo( QString infoXml ) //Create file name MagnatuneArtist artist = MagnatuneDatabaseHandler::instance() ->getArtistById( m_currentAlbum.getArtistId() ); - QString artistName = artist.getName(); - QString fileName = artistName + " - " + m_currentAlbum.getName(); + TQString artistName = artist.getName(); + TQString fileName = artistName + " - " + m_currentAlbum.getName(); - QFile file( purchaseDir.absPath() + "/" + fileName ); + TQFile file( purchaseDir.absPath() + "/" + fileName ); //Skip if file already exists if ( file.exists () ) @@ -211,7 +211,7 @@ void MagnatunePurchaseHandler::saveDownloadInfo( QString infoXml ) //write info if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << infoXml << "\n"; file.close(); } diff --git a/amarok/src/magnatunebrowser/magnatunepurchasehandler.h b/amarok/src/magnatunebrowser/magnatunepurchasehandler.h index a1bf10b9..9889c66f 100644 --- a/amarok/src/magnatunebrowser/magnatunepurchasehandler.h +++ b/amarok/src/magnatunebrowser/magnatunepurchasehandler.h @@ -20,7 +20,7 @@ #ifndef MAGNATUNEPURCHASEHANDLER_H #define MAGNATUNEPURCHASEHANDLER_H -#include <qobject.h> +#include <tqobject.h> #include <kio/job.h> #include <kio/jobclasses.h> @@ -42,7 +42,7 @@ public: MagnatunePurchaseHandler(); ~MagnatunePurchaseHandler(); - void setParent( QWidget * parent ); + void setParent( TQWidget * parent ); /** * Starts a purchase operation * @param album The album to purchase @@ -58,14 +58,14 @@ private: //need a parent to pass to any dialogs we spawn - QWidget * m_parent; + TQWidget * m_parent; MagnatunePurchaseDialog * m_purchaseDialog; MagnatuneDownloadDialog * m_downloadDialog; MagnatuneAlbumDownloader * m_albumDownloader; MagnatuneAlbum m_currentAlbum; - QString m_currentAlbumCoverName; + TQString m_currentAlbumCoverName; - bool parseDownloadXml( QString xml ); + bool parseDownloadXml( TQString xml ); /** * This function saves the xml download info received from Magnatune.com after a @@ -76,19 +76,19 @@ private: * is genereated from the artist and album names. * @param infoXml The info to store. */ - void saveDownloadInfo(QString infoXml); + void saveDownloadInfo(TQString infoXml); protected slots: - void showPurchaseDialog( QString coverTempLocation ); + void showPurchaseDialog( TQString coverTempLocation ); void xmlDownloadComplete( KIO::Job* downLoadJob ); void albumDownloadComplete(bool success); void albumPurchaseCancelled(); public slots: - void processPayment( QString ccNumber, QString expYear, QString expMonth, QString name, QString email, QString albumCode, int amount ); + void processPayment( TQString ccNumber, TQString expYear, TQString expMonth, TQString name, TQString email, TQString albumCode, int amount ); diff --git a/amarok/src/magnatunebrowser/magnatuneredownloaddialog.cpp b/amarok/src/magnatunebrowser/magnatuneredownloaddialog.cpp index fc9f5aa4..5d7c1417 100644 --- a/amarok/src/magnatunebrowser/magnatuneredownloaddialog.cpp +++ b/amarok/src/magnatunebrowser/magnatuneredownloaddialog.cpp @@ -20,26 +20,26 @@ #include "magnatuneredownloaddialog.h" -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <klistview.h> -MagnatuneRedownloadDialog::MagnatuneRedownloadDialog(QWidget* parent, const char* name, bool modal, WFlags fl) +MagnatuneRedownloadDialog::MagnatuneRedownloadDialog(TQWidget* parent, const char* name, bool modal, WFlags fl) : magnatuneReDownloadDialogBase(parent,name, modal,fl) { redownloadButton->setEnabled ( false ); - redownloadListView->setColumnWidthMode( 0, QListView::Manual ); - redownloadListView->setResizeMode( QListView::LastColumn ); + redownloadListView->setColumnWidthMode( 0, TQListView::Manual ); + redownloadListView->setResizeMode( TQListView::LastColumn ); } MagnatuneRedownloadDialog::~MagnatuneRedownloadDialog() { } -void MagnatuneRedownloadDialog::setRedownloadItems( QStringList items ) +void MagnatuneRedownloadDialog::setRedownloadItems( TQStringList items ) { - for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) { + for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) { new KListViewItem(redownloadListView, (*it)); } diff --git a/amarok/src/magnatunebrowser/magnatuneredownloaddialog.h b/amarok/src/magnatunebrowser/magnatuneredownloaddialog.h index aaf51fd9..b42e61a1 100644 --- a/amarok/src/magnatunebrowser/magnatuneredownloaddialog.h +++ b/amarok/src/magnatunebrowser/magnatuneredownloaddialog.h @@ -23,22 +23,22 @@ #include "magnatuneredownloaddialogbase.h" -#include <qstringlist.h> +#include <tqstringlist.h> class MagnatuneRedownloadDialog : public magnatuneReDownloadDialogBase { Q_OBJECT public: - MagnatuneRedownloadDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); + MagnatuneRedownloadDialog( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); ~MagnatuneRedownloadDialog(); /*$PUBLIC_FUNCTIONS$*/ - void setRedownloadItems(QStringList items); + void setRedownloadItems(TQStringList items); signals: - void redownload(QString downloadInfoFileName); + void redownload(TQString downloadInfoFileName); void cancelled(); public slots: diff --git a/amarok/src/magnatunebrowser/magnatuneredownloadhandler.cpp b/amarok/src/magnatunebrowser/magnatuneredownloadhandler.cpp index a64819bf..d801267e 100644 --- a/amarok/src/magnatunebrowser/magnatuneredownloadhandler.cpp +++ b/amarok/src/magnatunebrowser/magnatuneredownloadhandler.cpp @@ -24,13 +24,13 @@ #include "debug.h" -#include "qdir.h" -#include "qmessagebox.h" +#include "tqdir.h" +#include "tqmessagebox.h" #include <klocale.h> -MagnatuneRedownloadHandler::MagnatuneRedownloadHandler(QWidget * parent) +MagnatuneRedownloadHandler::MagnatuneRedownloadHandler(TQWidget * parent) { m_parent = parent; m_redownloadDialog = 0; @@ -46,20 +46,20 @@ MagnatuneRedownloadHandler::~MagnatuneRedownloadHandler() void MagnatuneRedownloadHandler::showRedownloadDialog( ) { - QStringList previousDownloads = GetPurchaseList(); + TQStringList previousDownloads = GetPurchaseList(); if (previousDownloads.isEmpty()) { //No previously purchased track information found. No more to do here... - QMessageBox::information( m_parent, i18n( "No purchases found!" ) , + TQMessageBox::information( m_parent, i18n( "No purchases found!" ) , i18n( "No previous purchases have been found. Nothing to redownload..." ) + "\n" ); return; } if (m_redownloadDialog == 0) { m_redownloadDialog = new MagnatuneRedownloadDialog( m_parent ); - connect( m_redownloadDialog, SIGNAL( redownload( QString) ), this, SLOT( redownload( QString ) ) ); - connect( m_redownloadDialog, SIGNAL(cancelled() ), this, SLOT( selectionDialogCancelled() )); + connect( m_redownloadDialog, TQT_SIGNAL( redownload( TQString) ), this, TQT_SLOT( redownload( TQString ) ) ); + connect( m_redownloadDialog, TQT_SIGNAL(cancelled() ), this, TQT_SLOT( selectionDialogCancelled() )); } @@ -69,18 +69,18 @@ void MagnatuneRedownloadHandler::showRedownloadDialog( ) } -QStringList MagnatuneRedownloadHandler::GetPurchaseList( ) +TQStringList MagnatuneRedownloadHandler::GetPurchaseList( ) { - QDir purchaseInfoDir( Amarok::saveLocation( "magnatune.com/purchases/" ) ); + TQDir purchaseInfoDir( Amarok::saveLocation( "magnatune.com/purchases/" ) ); - purchaseInfoDir.setFilter( QDir::Files); - purchaseInfoDir.setSorting( QDir::Name ); + purchaseInfoDir.setFilter( TQDir::Files); + purchaseInfoDir.setSorting( TQDir::Name ); - const QFileInfoList *list = purchaseInfoDir.entryInfoList(); - QFileInfoListIterator it( *list ); - QFileInfo *fi; + const TQFileInfoList *list = purchaseInfoDir.entryInfoList(); + TQFileInfoListIterator it( *list ); + TQFileInfo *fi; - QStringList returnList; + TQStringList returnList; while ( (fi = it.current()) != 0 ) { returnList.append(fi->fileName()); @@ -91,24 +91,24 @@ QStringList MagnatuneRedownloadHandler::GetPurchaseList( ) } -void MagnatuneRedownloadHandler::redownload( QString storedInfoFileName ) +void MagnatuneRedownloadHandler::redownload( TQString storedInfoFileName ) { - QDir purchaseInfoDir( Amarok::saveLocation( "magnatune.com/purchases/" ) ); - QString absFileName = purchaseInfoDir.absPath() + '/' + storedInfoFileName; + TQDir purchaseInfoDir( Amarok::saveLocation( "magnatune.com/purchases/" ) ); + TQString absFileName = purchaseInfoDir.absPath() + '/' + storedInfoFileName; debug() << "Redownload file: " << absFileName << endl; if ( m_albumDownloader == 0 ) { m_albumDownloader = new MagnatuneAlbumDownloader(); - connect( m_albumDownloader, SIGNAL( downloadComplete( bool ) ), this, SLOT( albumDownloadComplete( bool ) ) ); + connect( m_albumDownloader, TQT_SIGNAL( downloadComplete( bool ) ), this, TQT_SLOT( albumDownloadComplete( bool ) ) ); } if (m_downloadDialog == 0) { m_downloadDialog = new MagnatuneDownloadDialog(m_parent); - connect( m_downloadDialog, SIGNAL( downloadAlbum( MagnatuneDownloadInfo * ) ), m_albumDownloader, SLOT( downloadAlbum( MagnatuneDownloadInfo * ) ) ); + connect( m_downloadDialog, TQT_SIGNAL( downloadAlbum( MagnatuneDownloadInfo * ) ), m_albumDownloader, TQT_SLOT( downloadAlbum( MagnatuneDownloadInfo * ) ) ); } @@ -123,7 +123,7 @@ void MagnatuneRedownloadHandler::redownload( QString storedInfoFileName ) else { - QMessageBox::information( m_parent, i18n( "Could not re-download album" ), + TQMessageBox::information( m_parent, i18n( "Could not re-download album" ), i18n( "There seems to be a problem with the selected redownload info file." ) + "\n" ); } diff --git a/amarok/src/magnatunebrowser/magnatuneredownloadhandler.h b/amarok/src/magnatunebrowser/magnatuneredownloadhandler.h index d7328895..8d981047 100644 --- a/amarok/src/magnatunebrowser/magnatuneredownloadhandler.h +++ b/amarok/src/magnatunebrowser/magnatuneredownloadhandler.h @@ -25,7 +25,7 @@ #include "magnatunedownloadinfo.h" #include "magnatuneredownloaddialog.h" -#include <qobject.h> +#include <tqobject.h> /** This class handles the redownloading of previously purchased albums @@ -33,10 +33,10 @@ This class handles the redownloading of previously purchased albums @author Nikolaj Hald Nielsen <[email protected]> */ -class MagnatuneRedownloadHandler : public QObject { +class MagnatuneRedownloadHandler : public TQObject { Q_OBJECT public: - MagnatuneRedownloadHandler(QWidget * parent); + MagnatuneRedownloadHandler(TQWidget * parent); ~MagnatuneRedownloadHandler(); @@ -51,15 +51,15 @@ signals: protected: - QWidget * m_parent; - QStringList GetPurchaseList( ); + TQWidget * m_parent; + TQStringList GetPurchaseList( ); MagnatuneRedownloadDialog * m_redownloadDialog; MagnatuneDownloadDialog * m_downloadDialog; MagnatuneAlbumDownloader * m_albumDownloader; protected slots: - void redownload(QString storedInfoFileName); + void redownload(TQString storedInfoFileName); void selectionDialogCancelled(); void albumDownloadComplete( bool success ); diff --git a/amarok/src/magnatunebrowser/magnatunetypes.cpp b/amarok/src/magnatunebrowser/magnatunetypes.cpp index eac3b6b0..4705cf05 100644 --- a/amarok/src/magnatunebrowser/magnatunetypes.cpp +++ b/amarok/src/magnatunebrowser/magnatunetypes.cpp @@ -39,42 +39,42 @@ int MagnatuneArtist::getId( ) const return m_id; } -void MagnatuneArtist::setName( QString name ) +void MagnatuneArtist::setName( TQString name ) { m_name = name; } -QString MagnatuneArtist::getName( ) const +TQString MagnatuneArtist::getName( ) const { return m_name; } -void MagnatuneArtist::setDescription( QString description ) +void MagnatuneArtist::setDescription( TQString description ) { m_description = description; } -QString MagnatuneArtist::getDescription( ) const +TQString MagnatuneArtist::getDescription( ) const { return m_description; } -void MagnatuneArtist::setPhotoURL( QString photoURL ) +void MagnatuneArtist::setPhotoURL( TQString photoURL ) { m_photoURL = photoURL; } -QString MagnatuneArtist::getPhotoURL( ) const +TQString MagnatuneArtist::getPhotoURL( ) const { return m_photoURL; } -void MagnatuneArtist::setHomeURL( QString homeURL ) +void MagnatuneArtist::setHomeURL( TQString homeURL ) { m_homeURL = homeURL; } -QString MagnatuneArtist::getHomeURL( ) const +TQString MagnatuneArtist::getHomeURL( ) const { return m_homeURL; } @@ -115,62 +115,62 @@ int MagnatuneAlbum::getArtistId( ) const } -void MagnatuneAlbum::setName( QString name ) +void MagnatuneAlbum::setName( TQString name ) { m_name = name; } -QString MagnatuneAlbum::getName( ) const +TQString MagnatuneAlbum::getName( ) const { return m_name; } -void MagnatuneAlbum::setCoverURL( QString coverURL ) +void MagnatuneAlbum::setCoverURL( TQString coverURL ) { m_coverURL = coverURL; } -QString MagnatuneAlbum::getCoverURL( ) const +TQString MagnatuneAlbum::getCoverURL( ) const { return m_coverURL; } -void MagnatuneAlbum::setLaunchDate( QDate launchDate ) +void MagnatuneAlbum::setLaunchDate( TQDate launchDate ) { m_launchDate = launchDate; } -QDate MagnatuneAlbum::getLaunchDate( ) const +TQDate MagnatuneAlbum::getLaunchDate( ) const { return m_launchDate; } -void MagnatuneAlbum::setAlbumCode( QString albumCode ) +void MagnatuneAlbum::setAlbumCode( TQString albumCode ) { m_albumCode = albumCode; } -QString MagnatuneAlbum::getAlbumCode( ) const +TQString MagnatuneAlbum::getAlbumCode( ) const { return m_albumCode; } -void MagnatuneAlbum::setMp3Genre( QString mp3Genre ) +void MagnatuneAlbum::setMp3Genre( TQString mp3Genre ) { m_mp3Genre = mp3Genre; } -QString MagnatuneAlbum::getMp3Genre( ) const +TQString MagnatuneAlbum::getMp3Genre( ) const { return m_mp3Genre; } -void MagnatuneAlbum::setMagnatuneGenres( QString magnatuneGenres ) +void MagnatuneAlbum::setMagnatuneGenres( TQString magnatuneGenres ) { m_magnatuneGenres = magnatuneGenres; } -QString MagnatuneAlbum::getMagnatuneGenres( ) const +TQString MagnatuneAlbum::getMagnatuneGenres( ) const { return m_magnatuneGenres; } @@ -226,12 +226,12 @@ int MagnatuneTrack::getAlbumId( ) const -void MagnatuneTrack::setName( QString name ) +void MagnatuneTrack::setName( TQString name ) { m_name = name; } -QString MagnatuneTrack::getName( ) const +TQString MagnatuneTrack::getName( ) const { return m_name; } @@ -256,22 +256,22 @@ int MagnatuneTrack::getDuration( ) const return m_duration; } -void MagnatuneTrack::setHifiURL( QString hifiURL ) +void MagnatuneTrack::setHifiURL( TQString hifiURL ) { m_hifiURL = hifiURL; } -QString MagnatuneTrack::getHifiURL( ) const +TQString MagnatuneTrack::getHifiURL( ) const { return m_hifiURL; } -void MagnatuneTrack::setLofiURL( QString lofiURL ) +void MagnatuneTrack::setLofiURL( TQString lofiURL ) { m_lofiURL = lofiURL; } -QString MagnatuneTrack::getLofiURL( ) const +TQString MagnatuneTrack::getLofiURL( ) const { return m_lofiURL; } diff --git a/amarok/src/magnatunebrowser/magnatunetypes.h b/amarok/src/magnatunebrowser/magnatunetypes.h index d11bef8e..fd87944b 100644 --- a/amarok/src/magnatunebrowser/magnatunetypes.h +++ b/amarok/src/magnatunebrowser/magnatunetypes.h @@ -21,9 +21,9 @@ #define MAGNATUNETYPES_H -#include <qdatetime.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqvaluelist.h> @@ -32,11 +32,11 @@ class MagnatuneArtist private: int m_id; - QString m_name; - QString m_genre; - QString m_description; - QString m_photoURL; - QString m_homeURL; + TQString m_name; + TQString m_genre; + TQString m_description; + TQString m_photoURL; + TQString m_homeURL; public: MagnatuneArtist(); @@ -44,17 +44,17 @@ public: void setId( int id ); int getId() const; - void setName( QString name ); - QString getName() const; + void setName( TQString name ); + TQString getName() const; - void setDescription( QString description ); - QString getDescription() const; + void setDescription( TQString description ); + TQString getDescription() const; - void setPhotoURL( QString photoURL ); - QString getPhotoURL() const; + void setPhotoURL( TQString photoURL ); + TQString getPhotoURL() const; - void setHomeURL( QString homeURL ); - QString getHomeURL() const; + void setHomeURL( TQString homeURL ); + TQString getHomeURL() const; }; @@ -62,12 +62,12 @@ class MagnatuneAlbum { private: int m_id; - QString m_name; - QString m_coverURL; - QDate m_launchDate; - QString m_albumCode; - QString m_mp3Genre; - QString m_magnatuneGenres; + TQString m_name; + TQString m_coverURL; + TQDate m_launchDate; + TQString m_albumCode; + TQString m_mp3Genre; + TQString m_magnatuneGenres; int m_artistId; public: @@ -76,23 +76,23 @@ public: void setId( int id ); int getId() const; - void setName( QString name ); - QString getName() const; + void setName( TQString name ); + TQString getName() const; - void setCoverURL( QString coverURL ); - QString getCoverURL() const; + void setCoverURL( TQString coverURL ); + TQString getCoverURL() const; - void setLaunchDate( QDate launchDate ); - QDate getLaunchDate() const; + void setLaunchDate( TQDate launchDate ); + TQDate getLaunchDate() const; - void setAlbumCode( QString albumCode ); - QString getAlbumCode() const; + void setAlbumCode( TQString albumCode ); + TQString getAlbumCode() const; - void setMp3Genre( QString mp3Genre ); - QString getMp3Genre() const; + void setMp3Genre( TQString mp3Genre ); + TQString getMp3Genre() const; - void setMagnatuneGenres( QString magnatuneGenres ); - QString getMagnatuneGenres() const; + void setMagnatuneGenres( TQString magnatuneGenres ); + TQString getMagnatuneGenres() const; void setArtistId( int artistId ); int getArtistId() const; @@ -104,11 +104,11 @@ class MagnatuneTrack { private: int m_id; - QString m_name; + TQString m_name; int m_trackNumber; int m_duration; - QString m_hifiURL; - QString m_lofiURL; + TQString m_hifiURL; + TQString m_lofiURL; int m_albumId; int m_artistId; @@ -118,8 +118,8 @@ public: void setId( int id ); int getId() const; - void setName( QString name ); - QString getName() const; + void setName( TQString name ); + TQString getName() const; void setTrackNumber( int trackNumber ); int getTrackNumber() const; @@ -127,11 +127,11 @@ public: void setDuration( int duration ); int getDuration() const; - void setHifiURL( QString hifiURL ); - QString getHifiURL() const; + void setHifiURL( TQString hifiURL ); + TQString getHifiURL() const; - void setLofiURL( QString lofiURL ); - QString getLofiURL() const; + void setLofiURL( TQString lofiURL ); + TQString getLofiURL() const; void setAlbumId( int albumId ); int getAlbumId() const; @@ -140,8 +140,8 @@ public: int getArtistId() const; }; -typedef QValueList<MagnatuneArtist> MagnatuneArtistList; -typedef QValueList<MagnatuneAlbum> MagnatuneAlbumList; -typedef QValueList<MagnatuneTrack> MagnatuneTrackList; +typedef TQValueList<MagnatuneArtist> MagnatuneArtistList; +typedef TQValueList<MagnatuneAlbum> MagnatuneAlbumList; +typedef TQValueList<MagnatuneTrack> MagnatuneTrackList; #endif diff --git a/amarok/src/magnatunebrowser/magnatunexmlparser.cpp b/amarok/src/magnatunebrowser/magnatunexmlparser.cpp index bff65ab7..ea17966c 100644 --- a/amarok/src/magnatunebrowser/magnatunexmlparser.cpp +++ b/amarok/src/magnatunebrowser/magnatunexmlparser.cpp @@ -24,7 +24,7 @@ #include "statusbar.h" -MagnatuneXmlParser::MagnatuneXmlParser( QString filename ) +MagnatuneXmlParser::MagnatuneXmlParser( TQString filename ) : ThreadManager::Job( "MagnatuneXmlParser" ) { m_currentArtist = ""; @@ -56,15 +56,15 @@ MagnatuneXmlParser::completeJob( ) } void -MagnatuneXmlParser::readConfigFile( QString filename ) +MagnatuneXmlParser::readConfigFile( TQString filename ) { m_nNumberOfTracks = 0; m_nNumberOfAlbums = 0; m_nNumberOfArtists = 0; - QDomDocument doc( "config" ); + TQDomDocument doc( "config" ); - QFile file( filename ); + TQFile file( filename ); if ( !file.open( IO_ReadOnly ) ) return ; if ( !doc.setContent( &file ) ) @@ -79,7 +79,7 @@ MagnatuneXmlParser::readConfigFile( QString filename ) MagnatuneDatabaseHandler::instance() ->createDatabase(); //run through all the elements - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); MagnatuneDatabaseHandler::instance() ->begin(); //start transaction (MAJOR speedup!!) @@ -91,9 +91,9 @@ MagnatuneXmlParser::readConfigFile( QString filename ) void -MagnatuneXmlParser::parseElement( QDomElement e ) +MagnatuneXmlParser::parseElement( TQDomElement e ) { - QString sElementName = e.tagName(); + TQString sElementName = e.tagName(); sElementName == "Album" ? parseAlbum( e ) : @@ -102,9 +102,9 @@ MagnatuneXmlParser::parseElement( QDomElement e ) void -MagnatuneXmlParser::parseChildren( QDomElement e ) +MagnatuneXmlParser::parseChildren( TQDomElement e ) { - QDomNode n = e.firstChild(); + TQDomNode n = e.firstChild(); while ( !n.isNull() ) { @@ -116,15 +116,15 @@ MagnatuneXmlParser::parseChildren( QDomElement e ) } void -MagnatuneXmlParser::parseAlbum( QDomElement e ) +MagnatuneXmlParser::parseAlbum( TQDomElement e ) { m_pCurrentAlbum = new MagnatuneAlbum(); m_pCurrentArtist = new MagnatuneArtist(); - QString sElementName; + TQString sElementName; - QDomNode n = e.firstChild(); - QDomElement childElement; + TQDomNode n = e.firstChild(); + TQDomElement childElement; while ( !n.isNull() ) { @@ -132,7 +132,7 @@ MagnatuneXmlParser::parseAlbum( QDomElement e ) { childElement = n.toElement(); - QString sElementName = childElement.tagName(); + TQString sElementName = childElement.tagName(); if ( sElementName == "albumname" ) @@ -148,8 +148,8 @@ MagnatuneXmlParser::parseAlbum( QDomElement e ) else if ( sElementName == "launchdate" ) { - QString dateString = childElement.text(); - QDate date = QDate::fromString( dateString, Qt::ISODate ); + TQString dateString = childElement.text(); + TQDate date = TQDate::fromString( dateString, Qt::ISODate ); m_pCurrentAlbum->setLaunchDate( date ); } @@ -223,21 +223,21 @@ MagnatuneXmlParser::parseAlbum( QDomElement e ) void -MagnatuneXmlParser::parseTrack( QDomElement e ) +MagnatuneXmlParser::parseTrack( TQDomElement e ) { - QString trackName; - QString trackNumber; - QString streamingUrl; + TQString trackName; + TQString trackNumber; + TQString streamingUrl; - QString sElementName; - QDomElement childElement; + TQString sElementName; + TQDomElement childElement; MagnatuneTrack currentTrack; - QDomNode n = e.firstChild(); + TQDomNode n = e.firstChild(); while ( !n.isNull() ) { @@ -247,7 +247,7 @@ MagnatuneXmlParser::parseTrack( QDomElement e ) childElement = n.toElement(); - QString sElementName = childElement.tagName(); + TQString sElementName = childElement.tagName(); if ( sElementName == "trackname" ) diff --git a/amarok/src/magnatunebrowser/magnatunexmlparser.h b/amarok/src/magnatunebrowser/magnatunexmlparser.h index 9a03b820..d8f3bc8e 100644 --- a/amarok/src/magnatunebrowser/magnatunexmlparser.h +++ b/amarok/src/magnatunebrowser/magnatunexmlparser.h @@ -24,9 +24,9 @@ #include "magnatunetypes.h" #include "threadmanager.h" -#include <qdom.h> -#include <qstring.h> -#include <qxml.h> +#include <tqdom.h> +#include <tqstring.h> +#include <tqxml.h> /** @@ -45,7 +45,7 @@ public: * @param fileName The file to parse * @return Pointer to new object */ - MagnatuneXmlParser( QString fileName ); + MagnatuneXmlParser( TQString fileName ); /** * The function that starts the actual work. Inherited fromThreadManager::Job @@ -69,7 +69,7 @@ public: * Reads, and starts parsing, file. Should not be used directly. * @param filename The file to read */ - void readConfigFile( QString filename ); + void readConfigFile( TQString filename ); signals: @@ -80,38 +80,38 @@ signals: private: - QString m_currentArtist; - QString m_currentArtistGenre; + TQString m_currentArtist; + TQString m_currentArtistGenre; /** * Parses a DOM element * @param e The element to parse */ - void parseElement( QDomElement e ); + void parseElement( TQDomElement e ); /** * Parses all children of a DOM element * @param e The element whose children is to be parsed */ - void parseChildren( QDomElement e ); + void parseChildren( TQDomElement e ); /** * Parse a DOM element representing an album * @param e The album element to parse */ - void parseAlbum( QDomElement e ); + void parseAlbum( TQDomElement e ); /** * Parse a DOM element representing a track * @param e The track element to parse */ - void parseTrack( QDomElement e ); + void parseTrack( TQDomElement e ); MagnatuneAlbum *m_pCurrentAlbum; MagnatuneArtist *m_pCurrentArtist; MagnatuneTrackList m_currentAlbumTracksList; - QString m_sFileName; + TQString m_sFileName; int m_nNumberOfTracks; int m_nNumberOfAlbums; |