mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Tomahawkified some sources.
This commit is contained in:
parent
9787e3bc08
commit
5c380b0b8c
@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
#include "actioncollection.h"
|
||||
#include <tomahawksettings.h>
|
||||
#include <utils/tomahawkutils.h>
|
||||
#include "tomahawksettings.h"
|
||||
#include "audio/audioengine.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
|
||||
ActionCollection* ActionCollection::s_instance = 0;
|
||||
ActionCollection* ActionCollection::instance()
|
||||
@ -53,22 +53,21 @@ ActionCollection::initActions()
|
||||
m_actionCollection[ "togglePrivacy" ] = privacyToggle;
|
||||
connect( m_actionCollection[ "togglePrivacy" ], SIGNAL( triggered() ), SLOT( togglePrivateListeningMode() ), Qt::UniqueConnection );
|
||||
|
||||
|
||||
m_actionCollection[ "loadPlaylist"] = new QAction( tr( "&Load Playlist" ), this );
|
||||
m_actionCollection[ "renamePlaylist"] = new QAction( tr( "&Rename Playlist" ), this );
|
||||
m_actionCollection[ "copyPlaylist"] = new QAction( tr( "&Copy Playlist Link" ), this );
|
||||
m_actionCollection[ "playPause"] = new QAction( tr( "&Play" ), this );
|
||||
m_actionCollection[ "stop"] = new QAction( tr( "&Stop" ), this );
|
||||
m_actionCollection[ "previousTrack"] = new QAction( tr( "&Previous Track" ), this );
|
||||
m_actionCollection[ "nextTrack"] = new QAction( tr( "&Next Track" ), this );
|
||||
m_actionCollection[ "quit"] = new QAction( tr( "&Quit" ), this );
|
||||
m_actionCollection[ "loadPlaylist" ] = new QAction( tr( "&Load Playlist" ), this );
|
||||
m_actionCollection[ "renamePlaylist" ] = new QAction( tr( "&Rename Playlist" ), this );
|
||||
m_actionCollection[ "copyPlaylist" ] = new QAction( tr( "&Copy Playlist Link" ), this );
|
||||
m_actionCollection[ "playPause" ] = new QAction( tr( "&Play" ), this );
|
||||
m_actionCollection[ "stop" ] = new QAction( tr( "&Stop" ), this );
|
||||
m_actionCollection[ "previousTrack" ] = new QAction( tr( "&Previous Track" ), this );
|
||||
m_actionCollection[ "nextTrack" ] = new QAction( tr( "&Next Track" ), this );
|
||||
m_actionCollection[ "quit" ] = new QAction( tr( "&Quit" ), this );
|
||||
|
||||
// connect actions to AudioEngine
|
||||
AudioEngine *ae = AudioEngine::instance();
|
||||
connect( m_actionCollection[ "playPause" ], SIGNAL( triggered() ), ae, SLOT( playPause() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "stop" ], SIGNAL( triggered() ), ae, SLOT( stop() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "previousTrack" ], SIGNAL( triggered() ), ae, SLOT( previous() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "nextTrack" ], SIGNAL( triggered() ), ae, SLOT( next() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "playPause" ], SIGNAL( triggered() ), ae, SLOT( playPause() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "stop" ], SIGNAL( triggered() ), ae, SLOT( stop() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "previousTrack" ], SIGNAL( triggered() ), ae, SLOT( previous() ), Qt::UniqueConnection );
|
||||
connect( m_actionCollection[ "nextTrack" ], SIGNAL( triggered() ), ae, SLOT( next() ), Qt::UniqueConnection );
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +85,7 @@ ActionCollection::getAction( const QString& name )
|
||||
return m_actionCollection.contains( name ) ? m_actionCollection[ name ] : 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ActionCollection::togglePrivateListeningMode()
|
||||
{
|
||||
|
@ -21,8 +21,7 @@
|
||||
|
||||
#include "dllmacro.h"
|
||||
|
||||
#include <QtGui/QAction>
|
||||
|
||||
#include <QAction>
|
||||
|
||||
class DLLEXPORT ActionCollection : public QObject
|
||||
{
|
||||
@ -36,7 +35,7 @@ public:
|
||||
|
||||
void initActions();
|
||||
|
||||
QAction* getAction( const QString &name );
|
||||
QAction* getAction( const QString& name );
|
||||
|
||||
public slots:
|
||||
void togglePrivateListeningMode();
|
||||
@ -44,7 +43,6 @@ public slots:
|
||||
signals:
|
||||
void privacyModeChanged();
|
||||
|
||||
|
||||
private:
|
||||
static ActionCollection* s_instance;
|
||||
|
||||
|
@ -115,7 +115,7 @@ Pipeline::addResolver( Resolver* r )
|
||||
|
||||
|
||||
void
|
||||
Pipeline::addExternalResolverFactory(ResolverFactoryFunc resolverFactory)
|
||||
Pipeline::addExternalResolverFactory( ResolverFactoryFunc resolverFactory )
|
||||
{
|
||||
m_resolverFactories << resolverFactory;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user