mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Style cleanup.
This commit is contained in:
@@ -171,11 +171,11 @@ SourceTreeView::setupMenus()
|
|||||||
{
|
{
|
||||||
if ( m_latchManager->isLatched( source ) )
|
if ( m_latchManager->isLatched( source ) )
|
||||||
{
|
{
|
||||||
QAction *latchOffAction = ActionCollection::instance()->getAction( "latchOff" );
|
QAction* latchOffAction = ActionCollection::instance()->getAction( "latchOff" );
|
||||||
m_latchMenu.addAction( latchOffAction );
|
m_latchMenu.addAction( latchOffAction );
|
||||||
connect( latchOffAction, SIGNAL( triggered() ), SLOT( latchOff() ) );
|
connect( latchOffAction, SIGNAL( triggered() ), SLOT( latchOff() ) );
|
||||||
m_latchMenu.addSeparator();
|
m_latchMenu.addSeparator();
|
||||||
QAction *latchRealtimeAction = ActionCollection::instance()->getAction( "realtimeFollowingAlong" );
|
QAction* latchRealtimeAction = ActionCollection::instance()->getAction( "realtimeFollowingAlong" );
|
||||||
latchRealtimeAction->setChecked( source->playlistInterface()->latchMode() == Tomahawk::PlaylistModes::RealTime );
|
latchRealtimeAction->setChecked( source->playlistInterface()->latchMode() == Tomahawk::PlaylistModes::RealTime );
|
||||||
m_latchMenu.addAction( latchRealtimeAction );
|
m_latchMenu.addAction( latchRealtimeAction );
|
||||||
connect( latchRealtimeAction, SIGNAL( toggled( bool ) ), SLOT( latchModeToggled( bool ) ) );
|
connect( latchRealtimeAction, SIGNAL( toggled( bool ) ), SLOT( latchModeToggled( bool ) ) );
|
||||||
@@ -183,13 +183,13 @@ SourceTreeView::setupMenus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *loadPlaylistAction = ActionCollection::instance()->getAction( "loadPlaylist" );
|
QAction* loadPlaylistAction = ActionCollection::instance()->getAction( "loadPlaylist" );
|
||||||
m_playlistMenu.addAction( loadPlaylistAction );
|
m_playlistMenu.addAction( loadPlaylistAction );
|
||||||
QAction *renamePlaylistAction = ActionCollection::instance()->getAction( "renamePlaylist" );
|
QAction* renamePlaylistAction = ActionCollection::instance()->getAction( "renamePlaylist" );
|
||||||
m_playlistMenu.addAction( renamePlaylistAction );
|
m_playlistMenu.addAction( renamePlaylistAction );
|
||||||
m_playlistMenu.addSeparator();
|
m_playlistMenu.addSeparator();
|
||||||
|
|
||||||
QAction *copyPlaylistAction = m_playlistMenu.addAction( tr( "&Copy Link" ) );
|
QAction* copyPlaylistAction = m_playlistMenu.addAction( tr( "&Copy Link" ) );
|
||||||
|
|
||||||
if ( type == SourcesModel::StaticPlaylist )
|
if ( type == SourcesModel::StaticPlaylist )
|
||||||
{
|
{
|
||||||
@@ -197,7 +197,7 @@ SourceTreeView::setupMenus()
|
|||||||
connect( exportPlaylist, SIGNAL( triggered() ), this, SLOT( exportPlaylist() ) );
|
connect( exportPlaylist, SIGNAL( triggered() ), this, SLOT( exportPlaylist() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *deletePlaylistAction = m_playlistMenu.addAction( tr( "&Delete %1" ).arg( SourcesModel::rowTypeToString( type ) ) );
|
QAction* deletePlaylistAction = m_playlistMenu.addAction( tr( "&Delete %1" ).arg( SourcesModel::rowTypeToString( type ) ) );
|
||||||
|
|
||||||
QString addToText;
|
QString addToText;
|
||||||
if ( type == SourcesModel::StaticPlaylist )
|
if ( type == SourcesModel::StaticPlaylist )
|
||||||
@@ -207,7 +207,7 @@ SourceTreeView::setupMenus()
|
|||||||
else if ( type == SourcesModel::Station )
|
else if ( type == SourcesModel::Station )
|
||||||
addToText = tr( "Add to my Stations" );
|
addToText = tr( "Add to my Stations" );
|
||||||
|
|
||||||
QAction *addToLocalAction = m_roPlaylistMenu.addAction( addToText );
|
QAction* addToLocalAction = m_roPlaylistMenu.addAction( addToText );
|
||||||
|
|
||||||
m_roPlaylistMenu.addAction( copyPlaylistAction );
|
m_roPlaylistMenu.addAction( copyPlaylistAction );
|
||||||
deletePlaylistAction->setEnabled( !readonly );
|
deletePlaylistAction->setEnabled( !readonly );
|
||||||
@@ -703,7 +703,7 @@ SourceTreeView::dropEvent( QDropEvent* event )
|
|||||||
if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << "Current Event";
|
qDebug() << Q_FUNC_INFO << "Current Event";
|
||||||
DropJob *dropThis = new DropJob;
|
DropJob* dropThis = new DropJob;
|
||||||
dropThis->setDropTypes( DropJob::Playlist );
|
dropThis->setDropTypes( DropJob::Playlist );
|
||||||
dropThis->setDropAction( DropJob::Create );
|
dropThis->setDropAction( DropJob::Create );
|
||||||
dropThis->parseMimeData( event->mimeData() );
|
dropThis->parseMimeData( event->mimeData() );
|
||||||
@@ -732,7 +732,7 @@ SourceTreeView::dropEvent( QDropEvent* event )
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SourceTreeView::keyPressEvent( QKeyEvent *event )
|
SourceTreeView::keyPressEvent( QKeyEvent* event )
|
||||||
{
|
{
|
||||||
if ( ( event->key() == Qt::Key_Delete || event->key() == Qt::Key_Backspace ) && !selectionModel()->selectedIndexes().isEmpty() )
|
if ( ( event->key() == Qt::Key_Delete || event->key() == Qt::Key_Backspace ) && !selectionModel()->selectedIndexes().isEmpty() )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user