Commit 91c06c7d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: actions_manager: Change constructor and inline some functions.

parent f011c163
...@@ -37,15 +37,13 @@ ...@@ -37,15 +37,13 @@
ActionsManager * ActionsManager::instance = NULL; ActionsManager * ActionsManager::instance = NULL;
ActionsManager::ActionsManager( intf_thread_t * _p_i, QObject *_parent ) ActionsManager::ActionsManager( intf_thread_t * _p_i, QObject *_parent )
: QObject( _parent ) : QObject( _parent )
{ {
p_intf = _p_i; p_intf = _p_i;
} }
ActionsManager::~ActionsManager() ActionsManager::~ActionsManager(){}
{
}
//* Actions */
void ActionsManager::doAction( int id_action ) void ActionsManager::doAction( int id_action )
{ {
switch( id_action ) switch( id_action )
...@@ -92,7 +90,7 @@ void ActionsManager::doAction( int id_action ) ...@@ -92,7 +90,7 @@ void ActionsManager::doAction( int id_action )
} }
} }
void ActionsManager::stop() inline void ActionsManager::stop()
{ {
THEMIM->stop(); THEMIM->stop();
} }
...@@ -108,12 +106,12 @@ void ActionsManager::play() ...@@ -108,12 +106,12 @@ void ActionsManager::play()
THEMIM->togglePlayPause(); THEMIM->togglePlayPause();
} }
void ActionsManager::prev() inline void ActionsManager::prev()
{ {
THEMIM->prev(); THEMIM->prev();
} }
void ActionsManager::next() inline void ActionsManager::next()
{ {
THEMIM->next(); THEMIM->next();
} }
...@@ -146,27 +144,27 @@ void ActionsManager::snapshot() ...@@ -146,27 +144,27 @@ void ActionsManager::snapshot()
} }
} }
void ActionsManager::extSettings() inline void ActionsManager::extSettings()
{ {
THEDP->extendedDialog(); THEDP->extendedDialog();
} }
void ActionsManager::reverse() inline void ActionsManager::reverse()
{ {
THEMIM->getIM()->reverse(); THEMIM->getIM()->reverse();
} }
void ActionsManager::slower() inline void ActionsManager::slower()
{ {
THEMIM->getIM()->slower(); THEMIM->getIM()->slower();
} }
void ActionsManager::faster() inline void ActionsManager::faster()
{ {
THEMIM->getIM()->faster(); THEMIM->getIM()->faster();
} }
void ActionsManager::playlist() inline void ActionsManager::playlist()
{ {
if( p_intf->p_sys->p_mi ) p_intf->p_sys->p_mi->togglePlaylist(); if( p_intf->p_sys->p_mi ) p_intf->p_sys->p_mi->togglePlaylist();
} }
......
...@@ -57,10 +57,10 @@ class ActionsManager : public QObject ...@@ -57,10 +57,10 @@ class ActionsManager : public QObject
Q_OBJECT Q_OBJECT
public: public:
static ActionsManager *getInstance( intf_thread_t *_p_intf ) static ActionsManager *getInstance( intf_thread_t *_p_intf, QObject *_parent = 0 )
{ {
if( !instance ) if( !instance )
instance = new ActionsManager( _p_intf ); instance = new ActionsManager( _p_intf, _parent );
return instance; return instance;
} }
static void killInstance() static void killInstance()
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
private: private:
static ActionsManager *instance; static ActionsManager *instance;
ActionsManager( intf_thread_t *_p_i, QObject *_parent = 0 ); ActionsManager( intf_thread_t *_p_i, QObject *_parent );
intf_thread_t *p_intf; intf_thread_t *p_intf;
protected slots: protected slots:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment