summaryrefslogtreecommitdiffstats
path: root/amarok/src/playlist.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-01-02 11:36:41 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-01-15 10:10:50 +0900
commitf52f91d7ba8f99e3b9d33d4404d9f21a8b3fb497 (patch)
tree83fa1908b581e4c8a7b14ea3204b8f40d39e296b /amarok/src/playlist.cpp
parent00fe96f0930e9cd78404576f0812f71a06d42574 (diff)
downloadamarok-f52f91d7ba8f99e3b9d33d4404d9f21a8b3fb497.tar.gz
amarok-f52f91d7ba8f99e3b9d33d4404d9f21a8b3fb497.zip
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'amarok/src/playlist.cpp')
-rw-r--r--amarok/src/playlist.cpp144
1 files changed, 72 insertions, 72 deletions
diff --git a/amarok/src/playlist.cpp b/amarok/src/playlist.cpp
index 68be8148..c1374263 100644
--- a/amarok/src/playlist.cpp
+++ b/amarok/src/playlist.cpp
@@ -205,28 +205,28 @@ Playlist::Playlist( TQWidget *parent )
{
s_instance = this;
- connect( CollectionDB::instance(), TQT_SIGNAL(fileMoved(const TQString&,
- const TQString&, const TQString&)), TQT_SLOT(updateEntriesUrl(const TQString&,
+ connect( CollectionDB::instance(), TQ_SIGNAL(fileMoved(const TQString&,
+ const TQString&, const TQString&)), TQ_SLOT(updateEntriesUrl(const TQString&,
const TQString&, const TQString&)) );
- connect( CollectionDB::instance(), TQT_SIGNAL(uniqueIdChanged(const TQString&,
- const TQString&, const TQString&)), TQT_SLOT(updateEntriesUniqueId(const TQString&,
+ connect( CollectionDB::instance(), TQ_SIGNAL(uniqueIdChanged(const TQString&,
+ const TQString&, const TQString&)), TQ_SLOT(updateEntriesUniqueId(const TQString&,
const TQString&, const TQString&)) );
- connect( CollectionDB::instance(), TQT_SIGNAL(fileDeleted(const TQString&,
- const TQString&)), TQT_SLOT(updateEntriesStatusDeleted(const TQString&, const TQString&)) );
- connect( CollectionDB::instance(), TQT_SIGNAL(fileAdded(const TQString&,
- const TQString&)), TQT_SLOT(updateEntriesStatusAdded(const TQString&, const TQString&)) );
- connect( CollectionDB::instance(), TQT_SIGNAL(filesAdded(const TQMap<TQString,TQString>&)),
- TQT_SLOT(updateEntriesStatusAdded(const TQMap<TQString,TQString>&)) );
+ connect( CollectionDB::instance(), TQ_SIGNAL(fileDeleted(const TQString&,
+ const TQString&)), TQ_SLOT(updateEntriesStatusDeleted(const TQString&, const TQString&)) );
+ connect( CollectionDB::instance(), TQ_SIGNAL(fileAdded(const TQString&,
+ const TQString&)), TQ_SLOT(updateEntriesStatusAdded(const TQString&, const TQString&)) );
+ connect( CollectionDB::instance(), TQ_SIGNAL(filesAdded(const TQMap<TQString,TQString>&)),
+ TQ_SLOT(updateEntriesStatusAdded(const TQMap<TQString,TQString>&)) );
initStarPixmaps();
EngineController* const ec = EngineController::instance();
- connect( ec, TQT_SIGNAL(orderPrevious()), TQT_SLOT(playPrevTrack()) );
- connect( ec, TQT_SIGNAL(orderNext( const bool )), TQT_SLOT(playNextTrack( const bool )) );
- connect( ec, TQT_SIGNAL(orderCurrent()), TQT_SLOT(playCurrentTrack()) );
+ connect( ec, TQ_SIGNAL(orderPrevious()), TQ_SLOT(playPrevTrack()) );
+ connect( ec, TQ_SIGNAL(orderNext( const bool )), TQ_SLOT(playNextTrack( const bool )) );
+ connect( ec, TQ_SIGNAL(orderCurrent()), TQ_SLOT(playCurrentTrack()) );
- connect( this, TQT_SIGNAL( itemCountChanged( int, int, int, int, int, int ) ), ec, TQT_SLOT( playlistChanged() ) );
+ connect( this, TQ_SIGNAL( itemCountChanged( int, int, int, int, int, int ) ), ec, TQ_SLOT( playlistChanged() ) );
setShowSortIndicator( true );
@@ -293,48 +293,48 @@ Playlist::Playlist( TQWidget *parent )
setColumnAlignment( PlaylistItem::PlayCount, TQt::AlignCenter );
- connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
- this, TQT_SLOT( doubleClicked( TQListViewItem* ) ) );
- connect( this, TQT_SIGNAL( returnPressed( TQListViewItem* ) ),
- this, TQT_SLOT( activate( TQListViewItem* ) ) );
- connect( this, TQT_SIGNAL( mouseButtonPressed( int, TQListViewItem*, const TQPoint&, int ) ),
- this, TQT_SLOT( slotMouseButtonPressed( int, TQListViewItem*, const TQPoint&, int ) ) );
- connect( this, TQT_SIGNAL( queueChanged( const PLItemList &, const PLItemList & ) ),
- this, TQT_SLOT( slotQueueChanged( const PLItemList &, const PLItemList & ) ) );
- connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ),
- this, TQT_SLOT( writeTag( TQListViewItem*, const TQString&, int ) ) );
- connect( this, TQT_SIGNAL( aboutToClear() ),
- this, TQT_SLOT( saveUndoState() ) );
- connect( CollectionDB::instance(), TQT_SIGNAL( scoreChanged( const TQString&, float ) ),
- this, TQT_SLOT( scoreChanged( const TQString&, float ) ) );
- connect( CollectionDB::instance(), TQT_SIGNAL( ratingChanged( const TQString&, int ) ),
- this, TQT_SLOT( ratingChanged( const TQString&, int ) ) );
- connect( CollectionDB::instance(), TQT_SIGNAL( fileMoved( const TQString&, const TQString& ) ),
- this, TQT_SLOT( fileMoved( const TQString&, const TQString& ) ) );
- connect( header(), TQT_SIGNAL( indexChange( int, int, int ) ),
- this, TQT_SLOT( columnOrderChanged() ) ),
+ connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ this, TQ_SLOT( doubleClicked( TQListViewItem* ) ) );
+ connect( this, TQ_SIGNAL( returnPressed( TQListViewItem* ) ),
+ this, TQ_SLOT( activate( TQListViewItem* ) ) );
+ connect( this, TQ_SIGNAL( mouseButtonPressed( int, TQListViewItem*, const TQPoint&, int ) ),
+ this, TQ_SLOT( slotMouseButtonPressed( int, TQListViewItem*, const TQPoint&, int ) ) );
+ connect( this, TQ_SIGNAL( queueChanged( const PLItemList &, const PLItemList & ) ),
+ this, TQ_SLOT( slotQueueChanged( const PLItemList &, const PLItemList & ) ) );
+ connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ),
+ this, TQ_SLOT( writeTag( TQListViewItem*, const TQString&, int ) ) );
+ connect( this, TQ_SIGNAL( aboutToClear() ),
+ this, TQ_SLOT( saveUndoState() ) );
+ connect( CollectionDB::instance(), TQ_SIGNAL( scoreChanged( const TQString&, float ) ),
+ this, TQ_SLOT( scoreChanged( const TQString&, float ) ) );
+ connect( CollectionDB::instance(), TQ_SIGNAL( ratingChanged( const TQString&, int ) ),
+ this, TQ_SLOT( ratingChanged( const TQString&, int ) ) );
+ connect( CollectionDB::instance(), TQ_SIGNAL( fileMoved( const TQString&, const TQString& ) ),
+ this, TQ_SLOT( fileMoved( const TQString&, const TQString& ) ) );
+ connect( header(), TQ_SIGNAL( indexChange( int, int, int ) ),
+ this, TQ_SLOT( columnOrderChanged() ) ),
- connect( &Glow::timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotGlowTimer()) );
+ connect( &Glow::timer, TQ_SIGNAL(timeout()), TQ_SLOT(slotGlowTimer()) );
TDEActionCollection* const ac = Amarok::actionCollection();
- TDEAction *copy = KStdAction::copy( this, TQT_SLOT( copyToClipboard() ), ac, "playlist_copy" );
- KStdAction::selectAll( this, TQT_SLOT( selectAll() ), ac, "playlist_select_all" );
+ TDEAction *copy = KStdAction::copy( this, TQ_SLOT( copyToClipboard() ), ac, "playlist_copy" );
+ KStdAction::selectAll( this, TQ_SLOT( selectAll() ), ac, "playlist_select_all" );
- m_clearButton = new TDEAction( i18n( "clear playlist", "&Clear" ), Amarok::icon( "playlist_clear" ), 0, this, TQT_SLOT( clear() ), ac, "playlist_clear" );
- m_undoButton = KStdAction::undo( this, TQT_SLOT( undo() ), ac, "playlist_undo" );
- m_redoButton = KStdAction::redo( this, TQT_SLOT( redo() ), ac, "playlist_redo" );
+ m_clearButton = new TDEAction( i18n( "clear playlist", "&Clear" ), Amarok::icon( "playlist_clear" ), 0, this, TQ_SLOT( clear() ), ac, "playlist_clear" );
+ m_undoButton = KStdAction::undo( this, TQ_SLOT( undo() ), ac, "playlist_undo" );
+ m_redoButton = KStdAction::redo( this, TQ_SLOT( redo() ), ac, "playlist_redo" );
m_undoButton ->setIcon( Amarok::icon( "undo" ) );
m_redoButton ->setIcon( Amarok::icon( "redo" ) );
- new TDEAction( i18n( "&Repopulate" ), Amarok::icon( "playlist_refresh" ), 0, this, TQT_SLOT( repopulate() ), ac, "repopulate" );
- new TDEAction( i18n( "S&huffle" ), "rebuild", CTRL+Key_H, this, TQT_SLOT( shuffle() ), ac, "playlist_shuffle" );
- TDEAction *gotoCurrent = new TDEAction( i18n( "&Go To Current Track" ), Amarok::icon( "music" ), CTRL+Key_J, this, TQT_SLOT( showCurrentTrack() ), ac, "playlist_show" );
- new TDEAction( i18n( "&Remove Duplicate && Dead Entries" ), 0, this, TQT_SLOT( removeDuplicates() ), ac, "playlist_remove_duplicates" );
- new TDEAction( i18n( "&Queue Selected Tracks" ), Amarok::icon( "queue_track" ), CTRL+Key_D, this, TQT_SLOT( queueSelected() ), ac, "queue_selected" );
+ new TDEAction( i18n( "&Repopulate" ), Amarok::icon( "playlist_refresh" ), 0, this, TQ_SLOT( repopulate() ), ac, "repopulate" );
+ new TDEAction( i18n( "S&huffle" ), "rebuild", CTRL+Key_H, this, TQ_SLOT( shuffle() ), ac, "playlist_shuffle" );
+ TDEAction *gotoCurrent = new TDEAction( i18n( "&Go To Current Track" ), Amarok::icon( "music" ), CTRL+Key_J, this, TQ_SLOT( showCurrentTrack() ), ac, "playlist_show" );
+ new TDEAction( i18n( "&Remove Duplicate && Dead Entries" ), 0, this, TQ_SLOT( removeDuplicates() ), ac, "playlist_remove_duplicates" );
+ new TDEAction( i18n( "&Queue Selected Tracks" ), Amarok::icon( "queue_track" ), CTRL+Key_D, this, TQ_SLOT( queueSelected() ), ac, "queue_selected" );
TDEToggleAction *stopafter = new TDEToggleAction( i18n( "&Stop Playing After Track" ), Amarok::icon( "stop" ), CTRL+ALT+Key_V,
- this, TQT_SLOT( toggleStopAfterCurrentItem() ), ac, "stop_after" );
+ this, TQ_SLOT( toggleStopAfterCurrentItem() ), ac, "stop_after" );
{ // TDEAction idiocy -- shortcuts don't work until they've been plugged into a menu
TDEPopupMenu asdf;
@@ -349,10 +349,10 @@ Playlist::Playlist( TQWidget *parent )
}
//ensure we update action enabled states when repeat Playlist is toggled
- connect( ac->action( "repeat" ), TQT_SIGNAL(activated( int )), TQT_SLOT(updateNextPrev()) );
- connect( ac->action( "repeat" ), TQT_SIGNAL( activated( int ) ), TQT_SLOT( generateInfo() ) );
- connect( ac->action( "favor_tracks" ), TQT_SIGNAL( activated( int ) ), TQT_SLOT( generateInfo() ) );
- connect( ac->action( "random_mode" ), TQT_SIGNAL( activated( int ) ), TQT_SLOT( generateInfo() ) );
+ connect( ac->action( "repeat" ), TQ_SIGNAL(activated( int )), TQ_SLOT(updateNextPrev()) );
+ connect( ac->action( "repeat" ), TQ_SIGNAL( activated( int ) ), TQ_SLOT( generateInfo() ) );
+ connect( ac->action( "favor_tracks" ), TQ_SIGNAL( activated( int ) ), TQ_SLOT( generateInfo() ) );
+ connect( ac->action( "random_mode" ), TQ_SIGNAL( activated( int ) ), TQ_SLOT( generateInfo() ) );
// undostates are written in chronological order, so this is a clever way to get them back in the correct order :)
@@ -382,14 +382,14 @@ Playlist::Playlist( TQWidget *parent )
columnResizeEvent( header()->count(), 0, 0 );
//do after you resize all the columns
- connect( header(), TQT_SIGNAL(sizeChange( int, int, int )), TQT_SLOT(columnResizeEvent( int, int, int )) );
+ connect( header(), TQ_SIGNAL(sizeChange( int, int, int )), TQ_SLOT(columnResizeEvent( int, int, int )) );
- connect( this, TQT_SIGNAL( contentsMoving( int, int ) ), TQT_SLOT( slotContentsMoving() ) );
+ connect( this, TQ_SIGNAL( contentsMoving( int, int ) ), TQ_SLOT( slotContentsMoving() ) );
- connect( App::instance(), TQT_SIGNAL( useScores( bool ) ), this, TQT_SLOT( slotUseScores( bool ) ) );
- connect( App::instance(), TQT_SIGNAL( useRatings( bool ) ), this, TQT_SLOT( slotUseRatings( bool ) ) );
- connect( App::instance(), TQT_SIGNAL( moodbarPrefs( bool, bool, int, bool ) ),
- this, TQT_SLOT( slotMoodbarPrefs( bool, bool, int, bool ) ) );
+ connect( App::instance(), TQ_SIGNAL( useScores( bool ) ), this, TQ_SLOT( slotUseScores( bool ) ) );
+ connect( App::instance(), TQ_SIGNAL( useRatings( bool ) ), this, TQ_SLOT( slotUseRatings( bool ) ) );
+ connect( App::instance(), TQ_SIGNAL( moodbarPrefs( bool, bool, int, bool ) ),
+ this, TQ_SLOT( slotMoodbarPrefs( bool, bool, int, bool ) ) );
Amarok::ToolTip::add( this, viewport() );
@@ -398,15 +398,15 @@ Playlist::Playlist( TQWidget *parent )
setTabOrderedRenaming( false );
m_filtertimer = new TQTimer( this );
- connect( m_filtertimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setDelayedFilter()) );
+ connect( m_filtertimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(setDelayedFilter()) );
- connect( MountPointManager::instance(), TQT_SIGNAL(mediumConnected( int )),
- TQT_SLOT(mediumChange( int )) );
- connect( MountPointManager::instance(), TQT_SIGNAL(mediumRemoved( int )),
- TQT_SLOT(mediumChange( int )) );
+ connect( MountPointManager::instance(), TQ_SIGNAL(mediumConnected( int )),
+ TQ_SLOT(mediumChange( int )) );
+ connect( MountPointManager::instance(), TQ_SIGNAL(mediumRemoved( int )),
+ TQ_SLOT(mediumChange( int )) );
m_clicktimer = new TQTimer( this );
- connect( m_clicktimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSingleClick()) );
+ connect( m_clicktimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotSingleClick()) );
}
Playlist::~Playlist()
@@ -1960,7 +1960,7 @@ Playlist::countChanged()
if( !m_itemCountDirty )
{
m_itemCountDirty = true;
- TQTimer::singleShot( 0, this, TQT_SLOT( slotCountChanged() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( slotCountChanged() ) );
}
}
@@ -3469,7 +3469,7 @@ Playlist::deleteSelectedFiles() //SLOT
removeSelectedItems();
foreachType( KURL::List, urls )
CollectionDB::instance()->emitFileDeleted( (*it).path() );
- TQTimer::singleShot( 0, CollectionView::instance(), TQT_SLOT( renderView() ) );
+ TQTimer::singleShot( 0, CollectionView::instance(), TQ_SLOT( renderView() ) );
}
}
@@ -3891,7 +3891,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
popup.insertItem( SmallIconSet( Amarok::icon( "save" ) ), i18n("S&ave as Playlist..."), SAVE_PLAYLIST );
}
- popup.insertItem( SmallIconSet( Amarok::icon( "remove_from_playlist" ) ), i18n( "Re&move From Playlist" ), this, TQT_SLOT( removeSelectedItems() ), Key_Delete, REMOVE );
+ popup.insertItem( SmallIconSet( Amarok::icon( "remove_from_playlist" ) ), i18n( "Re&move From Playlist" ), this, TQ_SLOT( removeSelectedItems() ), Key_Delete, REMOVE );
popup.insertSeparator();
@@ -3905,7 +3905,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
fileMenu.insertItem( SmallIconSet( "document-save-as" ), i18n("&Copy Track to Collection...", "&Copy %n Tracks to Collection...", itemCount), COPY_TO_COLLECTION );
fileMenu.insertItem( SmallIconSet( "document-save-as" ), i18n("&Move Track to Collection...", "&Move %n Tracks to Collection...", itemCount), MOVE_TO_COLLECTION );
}
- fileMenu.insertItem( SmallIconSet( Amarok::icon( "remove" ) ), i18n("&Delete File...", "&Delete %n Selected Files...", itemCount ), this, TQT_SLOT( deleteSelectedFiles() ), SHIFT+Key_Delete, DELETE );
+ fileMenu.insertItem( SmallIconSet( Amarok::icon( "remove" ) ), i18n("&Delete File...", "&Delete %n Selected Files...", itemCount ), this, TQ_SLOT( deleteSelectedFiles() ), SHIFT+Key_Delete, DELETE );
popup.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n("Manage &Files"), &fileMenu, FILE_MENU );
if( itemCount == 1 )
@@ -4404,7 +4404,7 @@ void Playlist::ensureItemCentered( TQListViewItem *item )
//HACK -- apparently the various metrics aren't reliable while the UI is still updating & stuff
m_itemToReallyCenter = item;
- TQTimer::singleShot( 0, this, TQT_SLOT( reallyEnsureItemCentered() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( reallyEnsureItemCentered() ) );
}
void
@@ -4600,7 +4600,7 @@ Playlist::slotMouseButtonPressed( int button, TQListViewItem *after, const TQPoi
void Playlist::slotContentsMoving()
{
Amarok::ToolTip::hideTips();
- TQTimer::singleShot( 0, this, TQT_SLOT( contentsMouseMoveEvent() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( contentsMouseMoveEvent() ) );
}
void
@@ -4822,12 +4822,12 @@ Playlist::showTagDialog( TQPtrList<TQListViewItem> items )
// connects
connect(
child( "OkButton" ),
- TQT_SIGNAL(clicked()),
- TQT_SLOT(accept()) );
+ TQ_SIGNAL(clicked()),
+ TQ_SLOT(accept()) );
connect(
child( "CancelButton" ),
- TQT_SIGNAL(clicked()),
- TQT_SLOT(reject()) );
+ TQ_SIGNAL(clicked()),
+ TQ_SLOT(reject()) );
}
TQString command() { return static_cast<KLineEdit*>(child("Command"))->text(); }