Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4bb2e692
Commit
4bb2e692
authored
May 18, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: use the provided Singleton class for ActionsManager
parent
84d9c73e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
modules/gui/qt4/actions_manager.cpp
modules/gui/qt4/actions_manager.cpp
+1
-4
modules/gui/qt4/actions_manager.hpp
modules/gui/qt4/actions_manager.hpp
+6
-14
No files found.
modules/gui/qt4/actions_manager.cpp
View file @
4bb2e692
...
@@ -35,10 +35,7 @@
...
@@ -35,10 +35,7 @@
#include "main_interface.hpp"
/* Show playlist */
#include "main_interface.hpp"
/* Show playlist */
#include "components/controller.hpp"
/* Toggle FSC controller width */
#include "components/controller.hpp"
/* Toggle FSC controller width */
ActionsManager
*
ActionsManager
::
instance
=
NULL
;
ActionsManager
::
ActionsManager
(
intf_thread_t
*
_p_i
)
ActionsManager
::
ActionsManager
(
intf_thread_t
*
_p_i
,
QObject
*
_parent
)
:
QObject
(
_parent
)
{
{
p_intf
=
_p_i
;
p_intf
=
_p_i
;
}
}
...
...
modules/gui/qt4/actions_manager.hpp
View file @
4bb2e692
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#endif
#endif
#include "qt4.hpp"
#include "qt4.hpp"
#include "util/singleton.hpp"
#include <QObject>
#include <QObject>
typedef
enum
actionType_e
typedef
enum
actionType_e
...
@@ -58,28 +59,18 @@ typedef enum actionType_e
...
@@ -58,28 +59,18 @@ typedef enum actionType_e
OPEN_SUB_ACTION
,
OPEN_SUB_ACTION
,
}
actionType_e
;
}
actionType_e
;
class
ActionsManager
:
public
QObject
class
ActionsManager
:
public
QObject
,
public
Singleton
<
ActionsManager
>
{
{
Q_OBJECT
Q_OBJECT
friend
class
Singleton
<
ActionsManager
>
;
public:
public:
static
ActionsManager
*
getInstance
(
intf_thread_t
*
_p_intf
,
QObject
*
_parent
=
0
)
{
if
(
!
instance
)
instance
=
new
ActionsManager
(
_p_intf
,
_parent
);
return
instance
;
}
static
void
killInstance
()
{
delete
instance
;
instance
=
NULL
;
}
private:
private:
ActionsManager
(
intf_thread_t
*
_p_i
);
virtual
~
ActionsManager
();
virtual
~
ActionsManager
();
static
ActionsManager
*
instance
;
ActionsManager
(
intf_thread_t
*
_p_i
,
QObject
*
_parent
);
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
public
slots
:
public
slots
:
...
@@ -90,6 +81,7 @@ public slots:
...
@@ -90,6 +81,7 @@ public slots:
void
record
();
void
record
();
void
skipForward
();
void
skipForward
();
void
skipBackward
();
void
skipBackward
();
protected
slots
:
protected
slots
:
void
fullscreen
();
void
fullscreen
();
void
snapshot
();
void
snapshot
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment