diff options
Diffstat (limited to 'amarok/src/playlistbrowseritem.cpp')
-rw-r--r-- | amarok/src/playlistbrowseritem.cpp | 360 |
1 files changed, 180 insertions, 180 deletions
diff --git a/amarok/src/playlistbrowseritem.cpp b/amarok/src/playlistbrowseritem.cpp index 1eb0c426..9f807c14 100644 --- a/amarok/src/playlistbrowseritem.cpp +++ b/amarok/src/playlistbrowseritem.cpp @@ -143,7 +143,7 @@ PlaylistBrowserEntry::setKept( bool k ) void PlaylistBrowserEntry::updateInfo() { - PlaylistBrowser::instance()->setInfo( TQString::null, TQString::null ); + PlaylistBrowser::instance()->setInfo( TQString(), TQString() ); return; } @@ -156,15 +156,15 @@ PlaylistBrowserEntry::slotDoubleClicked() void PlaylistBrowserEntry::slotRenameItem() { - TQListViewItem *parent = KListViewItem::parent(); + TQListViewItem *tqparent = KListViewItem::tqparent(); - while( parent ) + while( tqparent ) { - if( !static_cast<PlaylistBrowserEntry*>( parent )->isKept() ) + if( !static_cast<PlaylistBrowserEntry*>( tqparent )->isKept() ) return; - if( !parent->parent() ) + if( !tqparent->tqparent() ) break; - parent = parent->parent(); + tqparent = tqparent->tqparent(); } setRenameEnabled( 0, true ); @@ -181,8 +181,8 @@ PlaylistBrowserEntry::slotPostRenameItem( const TQString /*newName*/ ) /// CLASS PlaylistCategory //////////////////////////////////////////////////////////////////////////// -PlaylistCategory::PlaylistCategory( TQListView *parent, TQListViewItem *after, const TQString &t, bool isFolder ) - : PlaylistBrowserEntry( parent, after ) +PlaylistCategory::PlaylistCategory( TQListView *tqparent, TQListViewItem *after, const TQString &t, bool isFolder ) + : PlaylistBrowserEntry( tqparent, after ) , m_title( t ) , m_id( -1 ) , m_folder( isFolder ) @@ -194,8 +194,8 @@ PlaylistCategory::PlaylistCategory( TQListView *parent, TQListViewItem *after, c } -PlaylistCategory::PlaylistCategory( PlaylistCategory *parent, TQListViewItem *after, const TQString &t, bool isFolder ) - : PlaylistBrowserEntry( parent, after ) +PlaylistCategory::PlaylistCategory( PlaylistCategory *tqparent, TQListViewItem *after, const TQString &t, bool isFolder ) + : PlaylistBrowserEntry( tqparent, after ) , m_title( t ) , m_id( -1 ) , m_folder( isFolder ) @@ -207,8 +207,8 @@ PlaylistCategory::PlaylistCategory( PlaylistCategory *parent, TQListViewItem *af } -PlaylistCategory::PlaylistCategory( TQListView *parent, TQListViewItem *after, const TQDomElement &xmlDefinition, bool isFolder ) - : PlaylistBrowserEntry( parent, after ) +PlaylistCategory::PlaylistCategory( TQListView *tqparent, TQListViewItem *after, const TQDomElement &xmlDefinition, bool isFolder ) + : PlaylistBrowserEntry( tqparent, after ) , m_id( -1 ) , m_folder( isFolder ) { @@ -219,8 +219,8 @@ PlaylistCategory::PlaylistCategory( TQListView *parent, TQListViewItem *after, c } -PlaylistCategory::PlaylistCategory( PlaylistCategory *parent, TQListViewItem *after, const TQDomElement &xmlDefinition ) - : PlaylistBrowserEntry( parent, after ) +PlaylistCategory::PlaylistCategory( PlaylistCategory *tqparent, TQListViewItem *after, const TQDomElement &xmlDefinition ) + : PlaylistBrowserEntry( tqparent, after ) , m_id( -1 ) , m_folder( true ) { @@ -230,8 +230,8 @@ PlaylistCategory::PlaylistCategory( PlaylistCategory *parent, TQListViewItem *af setPixmap( 0, SmallIcon( Amarok::icon( "files" ) ) ); } -PlaylistCategory::PlaylistCategory( PlaylistCategory *parent, TQListViewItem *after, const TQString &t, const int id ) - : PlaylistBrowserEntry( parent, after ) +PlaylistCategory::PlaylistCategory( PlaylistCategory *tqparent, TQListViewItem *after, const TQString &t, const int id ) + : PlaylistBrowserEntry( tqparent, after ) , m_title( t ) , m_id( id ) , m_folder( true ) @@ -249,8 +249,8 @@ void PlaylistCategory::okRename( int col ) if( m_id < 0 ) return; // update the database entry to have the correct name - const int parentId = parent() ? static_cast<PlaylistCategory*>(parent())->id() : 0; - CollectionDB::instance()->updatePodcastFolder( m_id, text(0), parentId, isOpen() ); + const int tqparentId = tqparent() ? static_cast<PlaylistCategory*>(tqparent())->id() : 0; + CollectionDB::instance()->updatePodcastFolder( m_id, text(0), tqparentId, isOpen() ); } void PlaylistCategory::setXml( const TQDomElement &xml ) @@ -399,10 +399,10 @@ PlaylistCategory::showContextMenu( const TQPoint &position ) enum Actions { RENAME, REMOVE, CREATE, PLAYLIST, PLAYLIST_IMPORT, SMART, STREAM, DYNAMIC, LASTFM, LASTFMCUSTOM, PODCAST, REFRESH, CONFIG, INTERVAL }; - TQListViewItem *parentCat = this; + TQListViewItem *tqparentCat = this; - while( parentCat->parent() ) - parentCat = parentCat->parent(); + while( tqparentCat->tqparent() ) + tqparentCat = tqparentCat->tqparent(); bool isPodcastFolder = false; @@ -412,37 +412,37 @@ PlaylistCategory::showContextMenu( const TQPoint &position ) menu.insertSeparator(); } - if( parentCat == static_cast<TQListViewItem*>( PlaylistBrowser::instance()->m_playlistCategory) ) + if( tqparentCat == static_cast<TQListViewItem*>( PlaylistBrowser::instance()->m_playlistCategory) ) { menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("Create Playlist..."), PLAYLIST ); menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("Import Playlist..."), PLAYLIST_IMPORT ); } - else if( parentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_smartCategory) ) + else if( tqparentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_smartCategory) ) menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("New Smart Playlist..."), SMART ); - else if( parentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_dynamicCategory) ) + else if( tqparentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_dynamicCategory) ) menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("New Dynamic Playlist..."), DYNAMIC ); - else if( parentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_streamsCategory) ) + else if( tqparentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_streamsCategory) ) menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("Add Radio Stream..."), STREAM ); - else if( parentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_lastfmCategory) ) + else if( tqparentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_lastfmCategory) ) { menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("Add Last.fm Radio..."), LASTFM ); menu.insertItem( SmallIconSet(Amarok::icon( "add_playlist" )), i18n("Add Custom Last.fm Radio..."), LASTFMCUSTOM ); } - else if( parentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_podcastCategory) ) + else if( tqparentCat == static_cast<TQListViewItem*>(PlaylistBrowser::instance()->m_podcastCategory) ) { isPodcastFolder = true; menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n("Add Podcast..."), PODCAST ); menu.insertItem( SmallIconSet( Amarok::icon( "refresh" ) ), i18n("Refresh All Podcasts"), REFRESH ); menu.insertSeparator(); menu.insertItem( SmallIconSet( Amarok::icon( "configure" ) ), i18n( "&Configure Podcasts..." ), CONFIG ); - if( parentCat->childCount() == 0 ) + if( tqparentCat->childCount() == 0 ) menu.setItemEnabled( CONFIG, false ); - if( parentCat == this ) + if( tqparentCat == this ) menu.insertItem( SmallIconSet( Amarok::icon( "configure" ) ), i18n("Scan Interval..."), INTERVAL ); } @@ -514,7 +514,7 @@ PlaylistCategory::showContextMenu( const TQPoint &position ) break; } name = i18n("Folder"); - if( c ) name = i18n("Folder %1").arg(c); + if( c ) name = i18n("Folder %1").tqarg(c); if( tracker == firstChild() && !isCategory( tracker ) ) tracker = 0; newFolder = new PlaylistCategory( this, tracker, name, true ); @@ -553,8 +553,8 @@ PlaylistCategory::paintCell( TQPainter *p, const TQColorGroup &cg, int column, i /// CLASS PlaylistEntry //////////////////////////////////////////////////////////////////////////// -PlaylistEntry::PlaylistEntry( TQListViewItem *parent, TQListViewItem *after, const KURL &url, int tracks, int length ) - : PlaylistBrowserEntry( parent, after ) +PlaylistEntry::PlaylistEntry( TQListViewItem *tqparent, TQListViewItem *after, const KURL &url, int tracks, int length ) + : PlaylistBrowserEntry( tqparent, after ) , m_url( url ) , m_length( length ) , m_trackCount( tracks ) @@ -583,8 +583,8 @@ PlaylistEntry::PlaylistEntry( TQListViewItem *parent, TQListViewItem *after, con } -PlaylistEntry::PlaylistEntry( TQListViewItem *parent, TQListViewItem *after, const TQDomElement &xmlDefinition ) - : PlaylistBrowserEntry( parent, after ) +PlaylistEntry::PlaylistEntry( TQListViewItem *tqparent, TQListViewItem *after, const TQDomElement &xmlDefinition ) + : PlaylistBrowserEntry( tqparent, after ) , m_loading( false ) , m_loaded( false ) , m_dynamic( false ) @@ -600,7 +600,7 @@ PlaylistEntry::PlaylistEntry( TQListViewItem *parent, TQListViewItem *after, con if( title.isEmpty() ) { title = fileBaseName( m_url.path() ); - title.replace( '_', ' ' ); + title.tqreplace( '_', ' ' ); } setText( 0, title ); @@ -642,7 +642,7 @@ void PlaylistEntry::load() startAnimation(); connect( &m_animationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimation()) ); - //delete all children, so that we don't duplicate things + //delete all tqchildren, so that we don't duplicate things while( firstChild() ) delete firstChild(); @@ -687,7 +687,7 @@ void PlaylistEntry::insertTracks( TQListViewItem *after, TQValueList<MetaBundle> { int pos = 0; if( after ) { - pos = m_trackList.find( static_cast<PlaylistTrackItem*>(after)->trackInfo() ) + 1; + pos = m_trackList.tqfind( static_cast<PlaylistTrackItem*>(after)->trackInfo() ) + 1; if( pos == -1 ) return; } @@ -756,7 +756,7 @@ void PlaylistEntry::customEvent( TQCustomEvent *e ) if ( str.isEmpty() ) str = fileBaseName( m_url.path() ); - str.replace( '_', ' ' ); + str.tqreplace( '_', ' ' ); setText( 0, str ); foreachType( BundleList, playlist->bundles ) @@ -784,14 +784,14 @@ void PlaylistEntry::customEvent( TQCustomEvent *e ) stopAnimation(); //stops the loading animation if( m_trackCount && !m_dynamic && !isDynamic() ) setOpen( true ); - else listView()->repaintItem( this ); + else listView()->tqrepaintItem( this ); m_trackCount = m_trackList.count(); } /** * We destroy the tracks on collapsing the entry. However, if we are using dynamic mode, then we leave them - * because adding from a custom list is problematic if the entry has no children. Using load() is not effective + * because adding from a custom list is problematic if the entry has no tqchildren. Using load() is not effective * since this is a threaded operation and would require pulling apart the entire class to make it work. */ @@ -814,7 +814,7 @@ void PlaylistEntry::setOpen( bool open ) } else if( !isDynamic() || !m_dynamic ) { //collapse - //delete all children + //delete all tqchildren while( firstChild() ) delete firstChild(); @@ -855,10 +855,10 @@ void PlaylistEntry::updateInfo() TQString str = "<html><body><table width=\"100%\" border=\"0\">"; - str += body.arg( i18n( "Playlist" ), text(0) ); - str += body.arg( i18n( "Number of tracks" ), TQString::number(m_trackCount) ); - str += body.arg( i18n( "Length" ), MetaBundle::prettyTime( m_length ) ); - str += body.arg( i18n( "Location" ), m_url.prettyURL() ); + str += body.tqarg( i18n( "Playlist" ), text(0) ); + str += body.tqarg( i18n( "Number of tracks" ), TQString::number(m_trackCount) ); + str += body.tqarg( i18n( "Length" ), MetaBundle::prettyTime( m_length ) ); + str += body.tqarg( i18n( "Location" ), m_url.prettyURL() ); str += "</table></body></html>"; PlaylistBrowser::instance()->setInfo( text(0), str ); @@ -875,11 +875,11 @@ void PlaylistEntry::showContextMenu( const TQPoint &position ) { KPopupMenu menu( listView() ); - enum Id { LOAD, APPEND, QUEUE, RENAME, DELETE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC }; + enum Id { LOAD, APPEND, TQUEUE, RENAME, DELETE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC }; menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD ); menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND ); - menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE ); + menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE ); if( MediaBrowser::isAvailable() ) { @@ -906,7 +906,7 @@ void PlaylistEntry::showContextMenu( const TQPoint &position ) case APPEND: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append ); break; - case QUEUE: + case TQUEUE: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue ); break; case RENAME: @@ -951,7 +951,7 @@ void PlaylistEntry::setDynamic( bool enable ) m_dynamic = enable; } - listView()->repaintItem( this ); + listView()->tqrepaintItem( this ); } void PlaylistEntry::setup() @@ -1053,19 +1053,19 @@ TQDomElement PlaylistEntry::xml() const /// CLASS PlaylistTrackItem //////////////////////////////////////////////////////////////////////////////// -PlaylistTrackItem::PlaylistTrackItem( TQListViewItem *parent, TQListViewItem *after, TrackItemInfo *info ) - : PlaylistBrowserEntry( parent, after ) +PlaylistTrackItem::PlaylistTrackItem( TQListViewItem *tqparent, TQListViewItem *after, TrackItemInfo *info ) + : PlaylistBrowserEntry( tqparent, after ) , m_trackInfo( info ) { setDragEnabled( true ); setRenameEnabled( 0, false ); - PlaylistEntry *p = dynamic_cast<PlaylistEntry *>(parent); + PlaylistEntry *p = dynamic_cast<PlaylistEntry *>(tqparent); if(!p) - debug() << "parent: " << parent << " is not a PlaylistEntry" << endl; - if( p && p->text( 0 ).contains( info->artist() ) ) + debug() << "tqparent: " << tqparent << " is not a PlaylistEntry" << endl; + if( p && p->text( 0 ).tqcontains( info->artist() ) ) setText( 0, info->title() ); else - setText( 0, i18n("%1 - %2").arg( info->artist(), info->title() ) ); + setText( 0, i18n("%1 - %2").tqarg( info->artist(), info->title() ) ); } const KURL &PlaylistTrackItem::url() @@ -1082,11 +1082,11 @@ void PlaylistTrackItem::slotDoubleClicked() void PlaylistTrackItem::showContextMenu( const TQPoint &position ) { KPopupMenu menu( listView() ); - enum Actions { LOAD, APPEND, QUEUE, BURN, REMOVE, INFO }; + enum Actions { LOAD, APPEND, TQUEUE, BURN, REMOVE, INFO }; menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD ); menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND ); - menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), QUEUE ); + menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), TQUEUE ); menu.insertSeparator(); @@ -1105,7 +1105,7 @@ void PlaylistTrackItem::showContextMenu( const TQPoint &position ) case APPEND: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append ); break; - case QUEUE: + case TQUEUE: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue ); break; case BURN: @@ -1121,7 +1121,7 @@ void PlaylistTrackItem::showContextMenu( const TQPoint &position ) TagDialog* dialog = new TagDialog( url() ); dialog->show(); } - else KMessageBox::sorry( PlaylistBrowser::instance(), i18n( "This file does not exist: %1" ).arg( url().path() ) ); + else KMessageBox::sorry( PlaylistBrowser::instance(), i18n( "This file does not exist: %1" ).tqarg( url().path() ) ); } } @@ -1155,8 +1155,8 @@ TrackItemInfo::TrackItemInfo( const MetaBundle &mb ) /// CLASS StreamEntry //////////////////////////////////////////////////////////////////////////// -StreamEntry::StreamEntry( TQListViewItem *parent, TQListViewItem *after, const KURL &u, const TQString &t ) - : PlaylistBrowserEntry( parent, after ) +StreamEntry::StreamEntry( TQListViewItem *tqparent, TQListViewItem *after, const KURL &u, const TQString &t ) + : PlaylistBrowserEntry( tqparent, after ) , m_title( t ) , m_url( u ) { @@ -1172,8 +1172,8 @@ StreamEntry::StreamEntry( TQListViewItem *parent, TQListViewItem *after, const K setText( 0, m_title ); } -StreamEntry::StreamEntry( TQListViewItem *parent, TQListViewItem *after, const TQDomElement &xmlDefinition ) - : PlaylistBrowserEntry( parent, after ) +StreamEntry::StreamEntry( TQListViewItem *tqparent, TQListViewItem *after, const TQDomElement &xmlDefinition ) + : PlaylistBrowserEntry( tqparent, after ) { setDragEnabled( true ); setRenameEnabled( 0, true ); @@ -1212,7 +1212,7 @@ void StreamEntry::updateInfo() TQString str = "<html><body><table width=\"100%\" border=\"0\">"; - str += body.arg( i18n( "URL" ), m_url.prettyURL() ); + str += body.tqarg( i18n( "URL" ), m_url.prettyURL() ); str += "</table></body></html>"; PlaylistBrowser::instance()->setInfo( text(0), str ); @@ -1291,11 +1291,11 @@ void StreamEntry::showContextMenu( const TQPoint &position ) { KPopupMenu menu( listView() ); - enum Actions { LOAD, APPEND, QUEUE, EDIT, REMOVE }; + enum Actions { LOAD, APPEND, TQUEUE, EDIT, REMOVE }; menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD ); menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND ); - menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE ); + menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE ); menu.insertSeparator(); // Forbid editing non removable items @@ -1316,7 +1316,7 @@ StreamEntry::showContextMenu( const TQPoint &position ) case APPEND: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append ); break; - case QUEUE: + case TQUEUE: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue ); break; case EDIT: @@ -1354,8 +1354,8 @@ TQDomElement LastFmEntry::xml() const /// CLASS StreamEditor //////////////////////////////////////////////////////////////////////////// -StreamEditor::StreamEditor( TQWidget *parent, const TQString &title, const TQString &url, bool readonly ) - : KDialogBase( parent, "StreamEditor", true, TQString::null, Ok|Cancel) +StreamEditor::StreamEditor( TQWidget *tqparent, const TQString &title, const TQString &url, bool readonly ) + : KDialogBase( tqparent, "StreamEditor", true, TQString(), Ok|Cancel) { makeGridMainWidget( 2, Qt::Horizontal ); @@ -1387,16 +1387,16 @@ StreamEditor::StreamEditor( TQWidget *parent, const TQString &title, const TQStr ///////////////////////////////////////////////////////////////////////////// /// CLASS DynamicEntry //////////////////////////////////////////////////////////////////////////// -DynamicEntry::DynamicEntry( TQListViewItem *parent, TQListViewItem *after, const TQString &name ) - : PlaylistBrowserEntry( parent, after, name ) +DynamicEntry::DynamicEntry( TQListViewItem *tqparent, TQListViewItem *after, const TQString &name ) + : PlaylistBrowserEntry( tqparent, after, name ) , DynamicMode( name ) { setPixmap( 0, SmallIcon( Amarok::icon( "dynamic" ) ) ); setDragEnabled( true ); } -DynamicEntry::DynamicEntry( TQListViewItem *parent, TQListViewItem *after, const TQDomElement &xmlDefinition ) - : PlaylistBrowserEntry( parent, after ) +DynamicEntry::DynamicEntry( TQListViewItem *tqparent, TQListViewItem *after, const TQDomElement &xmlDefinition ) + : PlaylistBrowserEntry( tqparent, after ) , DynamicMode( xmlDefinition.attribute( "name" ) ) { setPixmap( 0, SmallIcon( Amarok::icon( "dynamic" ) ) ); @@ -1511,15 +1511,15 @@ DynamicEntry::showContextMenu( const TQPoint &position ) /// CLASS PodcastChannel //////////////////////////////////////////////////////////////////////////// -PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, const KURL &url ) - : PlaylistBrowserEntry( parent, after ) +PodcastChannel::PodcastChannel( TQListViewItem *tqparent, TQListViewItem *after, const KURL &url ) + : PlaylistBrowserEntry( tqparent, after ) , m_polished( true ) // we get the items immediately if url is given , m_url( url ) , m_fetching( false ) , m_updating( false ) , m_new( false ) , m_hasProblem( false ) - , m_parent( static_cast<PlaylistCategory*>(parent) ) + , m_tqparent( static_cast<PlaylistCategory*>(tqparent) ) , m_settingsValid( false ) { setDragEnabled( true ); @@ -1531,16 +1531,16 @@ PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, c fetch(); } -PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, const KURL &url, +PodcastChannel::PodcastChannel( TQListViewItem *tqparent, TQListViewItem *after, const KURL &url, const TQDomNode &channelSettings ) - : PlaylistBrowserEntry( parent, after ) + : PlaylistBrowserEntry( tqparent, after ) , m_polished( true ) // we get the items immediately if url is given , m_url( url ) , m_fetching( false ) , m_updating( false ) , m_new( false ) , m_hasProblem( false ) - , m_parent( static_cast<PlaylistCategory*>(parent) ) + , m_tqparent( static_cast<PlaylistCategory*>(tqparent) ) , m_settingsValid( true ) { setDragEnabled( true ); @@ -1554,17 +1554,17 @@ PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, c fetch(); } -PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, +PodcastChannel::PodcastChannel( TQListViewItem *tqparent, TQListViewItem *after, const KURL &url, const TQDomNode &channelSettings, const TQDomDocument &xmlDefinition ) - : PlaylistBrowserEntry( parent, after ) + : PlaylistBrowserEntry( tqparent, after ) , m_polished( true ) //automatically load the channel , m_url( url ) , m_fetching( false ) , m_updating( false ) , m_new( false ) , m_hasProblem( false ) - , m_parent( static_cast<PlaylistCategory*>(parent) ) + , m_tqparent( static_cast<PlaylistCategory*>(tqparent) ) , m_settingsValid( true ) { TQDomNode type = xmlDefinition.namedItem("rss"); @@ -1581,8 +1581,8 @@ PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, setPixmap( 0, SmallIcon( Amarok::icon( "podcast" ) ) ); } -PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, const PodcastChannelBundle &pcb ) - : PlaylistBrowserEntry( parent, after ) +PodcastChannel::PodcastChannel( TQListViewItem *tqparent, TQListViewItem *after, const PodcastChannelBundle &pcb ) + : PlaylistBrowserEntry( tqparent, after ) , m_bundle( pcb ) , m_polished( false ) , m_url( pcb.url() ) @@ -1590,7 +1590,7 @@ PodcastChannel::PodcastChannel( TQListViewItem *parent, TQListViewItem *after, c , m_updating( false ) , m_new( false ) , m_hasProblem( false ) - , m_parent( static_cast<PlaylistCategory*>(parent) ) + , m_tqparent( static_cast<PlaylistCategory*>(tqparent) ) , m_settingsValid( true ) { setText( 0, title() ); @@ -1929,7 +1929,7 @@ PodcastChannel::setXml( const TQDomNode &xml, const int feedType ) setText( 0, t ); - TQString l = TQString::null; + TQString l = TQString(); if( isAtom ) l = xml.namedItem( "link" ).toElement().attribute( "rel" ); @@ -1964,7 +1964,7 @@ PodcastChannel::setXml( const TQDomNode &xml, const int feedType ) delete settings; m_bundle.setImageURL( KURL::fromPathOrURL( img ) ); - m_bundle.setParentId( m_parent->id() ); + m_bundle.setParentId( m_tqparent->id() ); if( !m_updating ) { // don't reinsert on a refresh debug() << "Adding podcast to database" << endl; @@ -2056,8 +2056,8 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType ) TQString guid = xml.namedItem( "guid" ).toElement().text(); if( !guid.isEmpty() ) { - command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND guid='%2';") - .arg( CollectionDB::instance()->escapeString( url().url() ), + command = TQString("SELECT id FROM podcastepisodes WHERE tqparent='%1' AND guid='%2';") + .tqarg( CollectionDB::instance()->escapeString( url().url() ), CollectionDB::instance()->escapeString( guid ) ); TQStringList values = CollectionDB::instance()->query( command ); return !values.isEmpty(); @@ -2065,8 +2065,8 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType ) TQString episodeTitle = xml.namedItem( "title" ).toElement().text(); KURL episodeURL = xml.namedItem( "enclosure" ).toElement().attribute( "url" ); - command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND url='%2' AND title='%3';") - .arg( CollectionDB::instance()->escapeString( url().url() ), + command = TQString("SELECT id FROM podcastepisodes WHERE tqparent='%1' AND url='%2' AND title='%3';") + .tqarg( CollectionDB::instance()->escapeString( url().url() ), CollectionDB::instance()->escapeString( episodeURL.url() ), CollectionDB::instance()->escapeString( episodeTitle ) ); TQStringList values = CollectionDB::instance()->query( command ); @@ -2079,15 +2079,15 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType ) TQString guid = xml.namedItem( "id" ).toElement().text(); if( !guid.isEmpty() ) { - command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND guid='%2';") - .arg( CollectionDB::instance()->escapeString( url().url() ), + command = TQString("SELECT id FROM podcastepisodes WHERE tqparent='%1' AND guid='%2';") + .tqarg( CollectionDB::instance()->escapeString( url().url() ), CollectionDB::instance()->escapeString( guid ) ); TQStringList values = CollectionDB::instance()->query( command ); return !values.isEmpty(); } TQString episodeTitle = xml.namedItem("title").toElement().text(); - TQString episodeURL = TQString::null; + TQString episodeURL = TQString(); TQDomNode n = xml.namedItem("link"); for( ; !n.isNull(); n = n.nextSibling() ) { @@ -2098,8 +2098,8 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType ) } } - command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND url='%2' AND title='%3';") - .arg( CollectionDB::instance()->escapeString( url().url() ), + command = TQString("SELECT id FROM podcastepisodes WHERE tqparent='%1' AND url='%2' AND title='%3';") + .tqarg( CollectionDB::instance()->escapeString( url().url() ), CollectionDB::instance()->escapeString( episodeURL ), CollectionDB::instance()->escapeString( episodeTitle ) ); TQStringList values = CollectionDB::instance()->query( command ); @@ -2113,15 +2113,15 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType ) void PodcastChannel::setParent( PlaylistCategory *newParent ) { - if( newParent != m_parent ) + if( newParent != m_tqparent ) { - m_parent->takeItem( this ); + m_tqparent->takeItem( this ); newParent->insertItem( this ); newParent->sortChildItems( 0, true ); - m_parent = newParent; + m_tqparent = newParent; } - m_bundle.setParentId( m_parent->id() ); + m_bundle.setParentId( m_tqparent->id() ); CollectionDB::instance()->updatePodcastChannel( m_bundle ); } @@ -2136,15 +2136,15 @@ PodcastChannel::updateInfo() TQString str = "<html><body><table width=\"100%\" border=\"0\">"; - str += body.arg( i18n( "Description" ), description() ); - str += body.arg( i18n( "Website" ), link().prettyURL() ); - str += body.arg( i18n( "Copyright" ), copyright() ); - str += body.arg( i18n( "URL" ), m_url.prettyURL() ); + str += body.tqarg( i18n( "Description" ), description() ); + str += body.tqarg( i18n( "Website" ), link().prettyURL() ); + str += body.tqarg( i18n( "Copyright" ), copyright() ); + str += body.tqarg( i18n( "URL" ), m_url.prettyURL() ); str += "</table>"; str += i18n( "<p> <b>Episodes</b></p><ul>" ); for( TQListViewItem *c = firstChild(); c; c = c->nextSibling() ) { - str += TQString("<li>%1</li>").arg( static_cast<PodcastEpisode*>(c)->title() ); + str += TQString("<li>%1</li>").tqarg( static_cast<PodcastEpisode*>(c)->title() ); } str += "</ul></body></html>"; @@ -2299,11 +2299,11 @@ PodcastChannel::showContextMenu( const TQPoint &position ) { KPopupMenu menu( listView() ); - enum Actions { LOAD, APPEND, QUEUE, DELETE, RESCAN, LISTENED, NEW, CONFIG }; + enum Actions { LOAD, APPEND, TQUEUE, DELETE, RESCAN, LISTENED, NEW, CONFIG }; menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD ); menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND ); - menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE ); + menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE ); menu.insertSeparator(); menu.insertItem( SmallIconSet( Amarok::icon( "remove" ) ), i18n( "&Delete" ), DELETE ); menu.insertItem( SmallIconSet( Amarok::icon( "refresh" ) ), i18n( "&Check for Updates" ), RESCAN ); @@ -2323,7 +2323,7 @@ PodcastChannel::showContextMenu( const TQPoint &position ) PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append ); break; - case QUEUE: + case TQUEUE: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue ); break; @@ -2355,10 +2355,10 @@ PodcastChannel::showContextMenu( const TQPoint &position ) /// @note we fucking hate itunes for taking over podcasts and inserting /// their own attributes. //////////////////////////////////////////////////////////////////////////// -PodcastEpisode::PodcastEpisode( TQListViewItem *parent, TQListViewItem *after, +PodcastEpisode::PodcastEpisode( TQListViewItem *tqparent, TQListViewItem *after, const TQDomElement &xml, const int feedType, const bool &isNew ) - : PlaylistBrowserEntry( parent, after ) - , m_parent( parent ) + : PlaylistBrowserEntry( tqparent, after ) + , m_tqparent( tqparent ) , m_fetching( false ) , m_onDisk( false ) , m_localUrl( KURL() ) @@ -2428,10 +2428,10 @@ PodcastEpisode::PodcastEpisode( TQListViewItem *parent, TQListViewItem *after, if( title.isEmpty() ) title = link.fileName(); - KURL parentUrl = static_cast<PodcastChannel*>(parent)->url(); + KURL tqparentUrl = static_cast<PodcastChannel*>(tqparent)->url(); m_bundle.setDBId( -1 ); m_bundle.setURL( link ); - m_bundle.setParent( parentUrl ); + m_bundle.setParent( tqparentUrl ); m_bundle.setTitle( title ); m_bundle.setSubtitle( subtitle ); m_bundle.setAuthor( author ); @@ -2452,9 +2452,9 @@ PodcastEpisode::PodcastEpisode( TQListViewItem *parent, TQListViewItem *after, setRenameEnabled( 0, false ); } -PodcastEpisode::PodcastEpisode( TQListViewItem *parent, TQListViewItem *after, PodcastEpisodeBundle &bundle ) - : PlaylistBrowserEntry( parent, after ) - , m_parent( parent ) +PodcastEpisode::PodcastEpisode( TQListViewItem *tqparent, TQListViewItem *after, PodcastEpisodeBundle &bundle ) + : PlaylistBrowserEntry( tqparent, after ) + , m_tqparent( tqparent ) , m_bundle( bundle ) , m_fetching( false ) , m_onDisk( false ) @@ -2550,7 +2550,7 @@ PodcastEpisode::downloadMedia() connect( &m_animationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimation()) ); KURL localDir; - PodcastChannel *channel = dynamic_cast<PodcastChannel*>(m_parent); + PodcastChannel *channel = dynamic_cast<PodcastChannel*>(m_tqparent); if( channel ) localDir = KURL::fromPathOrURL( channel->saveLocation() ); else @@ -2565,7 +2565,7 @@ PodcastEpisode::downloadMedia() Amarok::StatusBar::instance()->newProgressOperation( m_podcastEpisodeJob ) .setDescription( title().isEmpty() ? i18n( "Downloading Podcast Media" ) - : i18n( "Downloading Podcast \"%1\"" ).arg( title() ) ) + : i18n( "Downloading Podcast \"%1\"" ).tqarg( title() ) ) .setAbortSlot( this, TQT_SLOT( abortDownload()) ) .setProgressSignal( m_podcastEpisodeJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ) ); @@ -2587,8 +2587,8 @@ void PodcastEpisode::createLocalDir( const KURL &localDir ) TQString localDirString = localDir.path(); if( !TQFile::exists( localDirString ) ) { - TQString parentDirString = localDir.directory( true, true ); - createLocalDir( parentDirString ); + TQString tqparentDirString = localDir.directory( true, true ); + createLocalDir( tqparentDirString ); TQDir dir( localDirString ); dir.mkdir( localDirString ); } @@ -2633,7 +2633,7 @@ void PodcastEpisode::downloadResult( KIO::Job * transferJob ) setLocalUrl( m_localUrl ); - PodcastChannel *channel = dynamic_cast<PodcastChannel *>( m_parent ); + PodcastChannel *channel = dynamic_cast<PodcastChannel *>( m_tqparent ); if( channel && channel->autotransfer() && MediaBrowser::isAvailable() ) { addToMediaDevice(); @@ -2658,7 +2658,7 @@ void PodcastEpisode::addToMediaDevice() { MetaBundle *bundle = new MetaBundle( localUrl() ); - PodcastChannel *channel = dynamic_cast<PodcastChannel *>( m_parent ); + PodcastChannel *channel = dynamic_cast<PodcastChannel *>( m_tqparent ); if(channel && !channel->title().isEmpty()) bundle->setAlbum(channel->title()); if(!title().isEmpty()) @@ -2687,11 +2687,11 @@ PodcastEpisode::setNew( const bool &n ) updatePixmap(); CollectionDB::instance()->updatePodcastEpisode( dBId(), m_bundle ); - // if we mark an item as listened, we might need to update the parent + // if we mark an item as listened, we might need to update the tqparent if( n == true ) - static_cast<PodcastChannel*>(m_parent)->setNew( true ); + static_cast<PodcastChannel*>(m_tqparent)->setNew( true ); else - static_cast<PodcastChannel*>(m_parent)->checkAndSetNew(); + static_cast<PodcastChannel*>(m_tqparent)->checkAndSetNew(); } void @@ -2776,7 +2776,7 @@ PodcastEpisode::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int if( fmName.width( name ) > _width ) { //decapitateString removes the channels title from the epsiodes title - name = Amarok::decapitateString( name, static_cast<PodcastChannel *>(m_parent)->title() ); + name = Amarok::decapitateString( name, static_cast<PodcastChannel *>(m_tqparent)->title() ); if( fmName.width( name ) > _width ) name = KStringHandler::rPixelSqueeze( name, pBuf.fontMetrics(), _width ); } @@ -2794,13 +2794,13 @@ PodcastEpisode::updateInfo() TQString str = "<html><body><table width=\"100%\" border=\"0\">"; - //str += body.arg( i18n( "Title" ), m_bundle.title() ); - str += body.arg( i18n( "Description" ), m_bundle.description() ); - str += body.arg( i18n( "Date" ), m_bundle.date() ); - str += body.arg( i18n( "Author" ), m_bundle.author() ); - str += body.arg( i18n( "Type" ), m_bundle.type() ); - str += body.arg( i18n( "URL" ), m_bundle.url().prettyURL() ); - str += body.arg( i18n( "Local URL" ), isOnDisk() ? localUrl().prettyURL() : i18n( "n/a" ) ); + //str += body.tqarg( i18n( "Title" ), m_bundle.title() ); + str += body.tqarg( i18n( "Description" ), m_bundle.description() ); + str += body.tqarg( i18n( "Date" ), m_bundle.date() ); + str += body.tqarg( i18n( "Author" ), m_bundle.author() ); + str += body.tqarg( i18n( "Type" ), m_bundle.type() ); + str += body.tqarg( i18n( "URL" ), m_bundle.url().prettyURL() ); + str += body.tqarg( i18n( "Local URL" ), isOnDisk() ? localUrl().prettyURL() : i18n( "n/a" ) ); str += "</table></body></html>"; PlaylistBrowser::instance()->setInfo( text(0), str ); @@ -2826,10 +2826,10 @@ PodcastEpisode::showContextMenu( const TQPoint &position ) { KPopupMenu menu( listView() ); - enum Actions { LOAD, APPEND, QUEUE, GET, ASSOCIATE, DELETE, MEDIA_DEVICE, LISTENED, NEW, OPEN_WITH /* has to be last */ }; + enum Actions { LOAD, APPEND, TQUEUE, GET, ASSOCIATE, DELETE, MEDIA_DEVICE, LISTENED, NEW, OPEN_WITH /* has to be last */ }; menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD ); menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND ); - menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), QUEUE ); + menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), TQUEUE ); int accuracy = 0; KMimeType::Ptr mimetype; @@ -2891,7 +2891,7 @@ PodcastEpisode::showContextMenu( const TQPoint &position ) PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append ); break; - case QUEUE: + case TQUEUE: PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue ); break; @@ -2977,14 +2977,14 @@ class AssociatePodcastDialog : public KDialogBase public: AssociatePodcastDialog( PodcastEpisode *item ) - : KDialogBase( Amarok::mainWindow(), "associatepodcastdialog", true, i18n("Select Local File for %1").arg(item->title()), Ok|Cancel, Ok, false ) + : KDialogBase( Amarok::mainWindow(), "associatepodcastdialog", true, i18n("Select Local File for %1").tqarg(item->title()), Ok|Cancel, Ok, false ) { TQVBox* vbox = makeVBoxMainWidget(); vbox->setSpacing( KDialog::spacingHint() ); m_urlRequester = new KURLRequester( vbox ); - if( dynamic_cast<PodcastChannel *>(item->parent()) ) - m_urlRequester->setURL( static_cast<PodcastChannel *>(item->parent())->saveLocation() ); + if( dynamic_cast<PodcastChannel *>(item->tqparent()) ) + m_urlRequester->setURL( static_cast<PodcastChannel *>(item->tqparent())->saveLocation() ); } KURL url() const { return KURL::fromPathOrURL( m_urlRequester->url() ); } }; @@ -3007,8 +3007,8 @@ PodcastEpisode::associateWithLocalFile() /// CLASS SmartPlaylist //////////////////////////////////////////////////////////////////////////// -SmartPlaylist::SmartPlaylist( TQListViewItem *parent, TQListViewItem *after, const TQString &name, const TQString &query ) - : PlaylistBrowserEntry( parent, after, name ) +SmartPlaylist::SmartPlaylist( TQListViewItem *tqparent, TQListViewItem *after, const TQString &name, const TQString &query ) + : PlaylistBrowserEntry( tqparent, after, name ) , m_sqlForTags( query ) , m_title( name ) , m_dynamic( false ) @@ -3019,8 +3019,8 @@ SmartPlaylist::SmartPlaylist( TQListViewItem *parent, TQListViewItem *after, con setText( 0, name ); } -SmartPlaylist::SmartPlaylist( TQListViewItem *parent, TQListViewItem *after, const TQString &name, const TQString &urls, const TQString &tags ) - : PlaylistBrowserEntry( parent, after, name ) +SmartPlaylist::SmartPlaylist( TQListViewItem *tqparent, TQListViewItem *after, const TQString &name, const TQString &urls, const TQString &tags ) + : PlaylistBrowserEntry( tqparent, after, name ) , m_sqlForTags( tags ) , m_title( name ) , m_dynamic( false ) @@ -3032,8 +3032,8 @@ SmartPlaylist::SmartPlaylist( TQListViewItem *parent, TQListViewItem *after, con } -SmartPlaylist::SmartPlaylist( TQListViewItem *parent, TQListViewItem *after, const TQDomElement &xmlDefinition ) - : PlaylistBrowserEntry( parent, after ) +SmartPlaylist::SmartPlaylist( TQListViewItem *tqparent, TQListViewItem *after, const TQDomElement &xmlDefinition ) + : PlaylistBrowserEntry( tqparent, after ) , m_after( after ) , m_dynamic( false ) { @@ -3045,7 +3045,7 @@ SmartPlaylist::SmartPlaylist( TQListViewItem *parent, TQListViewItem *after, con int SmartPlaylist::length() { TQString sql = query(); - sql.replace(TQRegExp("SELECT.*FROM"), "SELECT COUNT(*) FROM"); + sql.tqreplace(TQRegExp("SELECT.*FROM"), "SELECT COUNT(*) FROM"); CollectionDB *db = CollectionDB::instance(); TQStringList result = db->query( sql ); @@ -3069,7 +3069,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) static TQStringList years; static TQStringList labels; - //Delete all children before + //Delete all tqchildren before while( firstChild() ) delete firstChild(); @@ -3086,8 +3086,8 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) genres = CollectionDB::instance()->genreList(); } foreach( genres ) { - m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ), - TQString(queryChildren).replace( + m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), + TQString(queryChildren).tqreplace( "(*ExpandString*)", *it) ); } } @@ -3096,8 +3096,8 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) artists = CollectionDB::instance()->artistList(); } foreach( artists ) { - m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).arg( *it ), - TQString(queryChildren).replace( + m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ), + TQString(queryChildren).tqreplace( "(*ExpandString*)", *it) ); } } @@ -3106,8 +3106,8 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) composers = CollectionDB::instance()->composerList(); } foreach( composers ) { - m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).arg( *it ), - TQString(queryChildren).replace( + m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ), + TQString(queryChildren).tqreplace( "(*ExpandString*)", *it) ); } } @@ -3116,8 +3116,8 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) albums = CollectionDB::instance()->albumList(); } foreach( albums ) { - m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ), - TQString(queryChildren).replace( + m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), + TQString(queryChildren).tqreplace( "(*ExpandString*)", *it) ); } } @@ -3126,8 +3126,8 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) years = CollectionDB::instance()->yearList(); } foreach( years ) { - m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ), - TQString(queryChildren).replace( + m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), + TQString(queryChildren).tqreplace( "(*ExpandString*)", *it) ); } } @@ -3136,7 +3136,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml ) labels = CollectionDB::instance()->labelList(); } foreach( labels ) { - m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ), TQString(queryChildren).replace("(*ExpandString*)", *it) ); + m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), TQString(queryChildren).tqreplace("(*ExpandString*)", *it) ); } } } @@ -3147,20 +3147,20 @@ TQString SmartPlaylist::query() { if ( m_sqlForTags.isEmpty() ) m_sqlForTags = xmlToQuery( m_xml ); // duplicate string, thread-safely (TQDeepCopy is not thread-safe) - return TQString( m_sqlForTags.unicode(), m_sqlForTags.length() ) - .replace( "(*CurrentTimeT*)" , - TQString::number(TQDateTime::currentDateTime().toTime_t()) ) - .replace( "(*ListOfFields*)" , QueryBuilder::dragSQLFields() ) - .replace( "(*MountedDeviceSelection*)" , + return TQString( m_sqlForTags.tqunicode(), m_sqlForTags.length() ) + .tqreplace( "(*CurrentTimeT*)" , + TQString::number(TQDateTime::tqcurrentDateTime().toTime_t()) ) + .tqreplace( "(*ListOfFields*)" , QueryBuilder::dragSTQLFields() ) + .tqreplace( "(*MountedDeviceSelection*)" , CollectionDB::instance()->deviceidSelection() ); } // static -QString +TQString SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */) { QueryBuilder qb; - qb.initSQLDrag(); + qb.initSTQLDrag(); // This code is partly copied from SmartPlaylistEditor -- but refactoring // to have it common would involve adding an internal data structure for smart // playlist queries. I think having the XML be that data structure is almost as good, @@ -3181,7 +3181,7 @@ SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */) TQDomElement criteria = criteriaList.item( j ).toElement(); TQString field = criteria.attribute( "field" ); int table; - Q_INT64 value; + TQ_INT64 value; if ( !qb.getField( field, &table, &value ) ) continue; TQStringList filters; @@ -3246,7 +3246,7 @@ SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */) } - if ( condition == i18n( "contains" ) ) + if ( condition == i18n( "tqcontains" ) ) qb.addFilter( table, value, filters[0] ); else if ( condition == i18n( "does not contain" ) ) qb.excludeFilter( table, value, filters[0]) ; @@ -3317,7 +3317,7 @@ SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */) } else { // normal sort int table; - Q_INT64 value; + TQ_INT64 value; if ( !qb.getField( field, &table, &value ) ) continue; qb.sortBy( table, value, orderby.attribute( "order" ) == "DESC" ); } @@ -3328,8 +3328,8 @@ SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */) // expand by, if needed if ( forExpand ) { - // TODO: The most efficient way would be to pass the children the XML - // and what to expand by, then have the children compute the query as needed. + // TODO: The most efficient way would be to pass the tqchildren the XML + // and what to expand by, then have the tqchildren compute the query as needed. // This could save a few megs of RAM for queries, but this patch is getting // too big already, right now. Ovy TQDomNodeList expandbyList = xml.elementsByTagName( "expandby" ); @@ -3377,8 +3377,8 @@ bool SmartPlaylist::isTimeOrdered() const TQString sql = query(); - return ! ( ( sql.find( createDate, false ) == -1 ) /*not create ordered*/ && - ( sql.find( accessDate, false ) == -1 ) /*not access ordered*/ ); + return ! ( ( sql.tqfind( createDate, false ) == -1 ) /*not create ordered*/ && + ( sql.tqfind( accessDate, false ) == -1 ) /*not access ordered*/ ); } void SmartPlaylist::slotDoubleClicked() @@ -3394,11 +3394,11 @@ void SmartPlaylist::showContextMenu( const TQPoint &position ) { KPopupMenu menu( listView() ); - enum Actions { LOAD, ADD, QUEUE, EDIT, REMOVE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC }; + enum Actions { LOAD, ADD, TQUEUE, EDIT, REMOVE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC }; menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD ); menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), ADD ); - menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE ); + menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE ); if( MediaBrowser::isAvailable() ) { menu.insertSeparator(); @@ -3426,7 +3426,7 @@ void SmartPlaylist::showContextMenu( const TQPoint &position ) case ADD: Playlist::instance()->insertMediaSql( query(), Playlist::Append ); break; - case QUEUE: + case TQUEUE: Playlist::instance()->insertMediaSql( query(), Playlist::Queue ); break; case EDIT: @@ -3454,8 +3454,8 @@ void SmartPlaylist::slotPostRenameItem( const TQString newName ) xml().setAttribute( "name", newName ); } -ShoutcastBrowser::ShoutcastBrowser( PlaylistCategory *parent ) - : PlaylistCategory( parent, 0, i18n( "Shoutcast Streams" ) ) +ShoutcastBrowser::ShoutcastBrowser( PlaylistCategory *tqparent ) + : PlaylistCategory( tqparent, 0, i18n( "Shoutcast Streams" ) ) , m_downloading( false ) , m_cj( 0 ) , m_loading1( new TQPixmap( locate("data", "amarok/images/loading1.png" ) ) ) @@ -3581,7 +3581,7 @@ void ShoutcastBrowser::doneGenreDownload( KIO::Job *job, const KURL &from, const { TQDomElement e = n.toElement(); // try to convert the node to an element. const TQString name = e.attribute( "name" ); - if( !name.isNull() && !bannedGenres.contains( name.lower() ) && !genreMapping.contains( name ) ) + if( !name.isNull() && !bannedGenres.tqcontains( name.lower() ) && !genreMapping.tqcontains( name ) ) { last = new ShoutcastGenre( this, last, name ); genreCache[ name ] = last; // so we can append genres later if needed @@ -3620,7 +3620,7 @@ ShoutcastGenre::ShoutcastGenre( ShoutcastBrowser *browser, TQListViewItem *after { setExpandable( true ); setKept( false ); - m_genre = genre.replace( "&", "%26" ); //fix & + m_genre = genre.tqreplace( "&", "%26" ); //fix & } void ShoutcastGenre::slotDoubleClicked() @@ -3712,7 +3712,7 @@ void ShoutcastGenre::doneListDownload( KIO::Job *job, const KURL &from, const KU TQDomElement e = n.toElement(); // try to convert the node to an element. if( e.hasAttribute( "name" ) ) { - if( !e.attribute( "name" ).isNull() && ! m_stations.contains( e.attribute( "name" ) ) ) + if( !e.attribute( "name" ).isNull() && ! m_stations.tqcontains( e.attribute( "name" ) ) ) { m_stations << e.attribute( "name" ); StreamEntry* entry = new StreamEntry( this, this, |