Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
2bdbd381
Commit
2bdbd381
authored
Oct 23, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Qt] Privatise what can be privatised in menu class
parent
46ff46ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
24 deletions
+37
-24
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+37
-24
No files found.
modules/gui/qt4/menus.hpp
View file @
2bdbd381
...
@@ -46,13 +46,13 @@ class QSystemTrayIcon;
...
@@ -46,13 +46,13 @@ class QSystemTrayIcon;
class
MenuItemData
:
public
QObject
class
MenuItemData
:
public
QObject
{
{
Q_OBJECT
Q_OBJECT
public:
public:
MenuItemData
(
QObject
*
parent
,
vlc_object_t
*
p
,
int
_i_type
,
vlc_value_t
_val
,
const
char
*
_var
)
:
QObject
(
parent
)
MenuItemData
(
QObject
*
parent
,
vlc_object_t
*
_p_obj
,
int
_i_type
,
vlc_value_t
_val
,
const
char
*
_var
)
:
QObject
(
parent
)
{
{
p_obj
=
p
;
p_obj
=
_p_obj
;
i_val_type
=
_i_type
;
i_val_type
=
_i_type
;
val
=
_val
;
val
=
_val
;
psz_var
=
strdup
(
_var
);
psz_var
=
strdup
(
_var
);
...
@@ -63,19 +63,42 @@ public:
...
@@ -63,19 +63,42 @@ public:
if
(
(
i_val_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
if
(
(
i_val_type
&
VLC_VAR_TYPE
)
==
VLC_VAR_STRING
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
}
}
vlc_object_t
*
p_obj
;
vlc_object_t
*
p_obj
;
int
i_val_type
;
vlc_value_t
val
;
vlc_value_t
val
;
char
*
psz_var
;
char
*
psz_var
;
private:
int
i_val_type
;
};
};
class
QVLCMenu
:
public
QObject
class
QVLCMenu
:
public
QObject
{
{
Q_OBJECT
;
Q_OBJECT
;
friend
class
MenuFunc
;
public:
public:
/* Main bar creation */
static
void
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
,
bool
);
static
void
createMenuBar
(
MainInterface
*
mi
,
intf_thread_t
*
,
bool
);
/* Menus */
/* Popups Menus */
static
void
PopupMenu
(
intf_thread_t
*
,
bool
);
static
void
AudioPopupMenu
(
intf_thread_t
*
);
static
void
VideoPopupMenu
(
intf_thread_t
*
);
static
void
MiscPopupMenu
(
intf_thread_t
*
);
/* Systray */
static
void
updateSystrayMenu
(
MainInterface
*
,
intf_thread_t
*
,
bool
b_force_visible
=
false
);
/* Actions */
static
void
DoAction
(
intf_thread_t
*
,
QObject
*
);
/* HACK for minimalView */
static
QAction
*
minimalViewAction
;
private:
/* All main Menus */
static
QMenu
*
FileMenu
(
intf_thread_t
*
);
static
QMenu
*
FileMenu
(
intf_thread_t
*
);
static
QMenu
*
SDMenu
(
intf_thread_t
*
);
static
QMenu
*
SDMenu
(
intf_thread_t
*
);
static
QMenu
*
ToolsMenu
(
intf_thread_t
*
);
static
QMenu
*
ToolsMenu
(
intf_thread_t
*
);
...
@@ -88,23 +111,9 @@ public:
...
@@ -88,23 +111,9 @@ public:
static
QMenu
*
HelpMenu
(
QMenu
*
);
static
QMenu
*
HelpMenu
(
QMenu
*
);
/* Popups Menus */
/* Popups Menus */
static
void
AudioPopupMenu
(
intf_thread_t
*
);
static
void
VideoPopupMenu
(
intf_thread_t
*
);
static
void
MiscPopupMenu
(
intf_thread_t
*
);
static
void
PopupMenu
(
intf_thread_t
*
,
bool
);
static
void
PopupMenuStaticEntries
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
);
static
void
PopupMenuStaticEntries
(
intf_thread_t
*
p_intf
,
QMenu
*
menu
);
static
void
PopupMenuControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
static
void
PopupMenuControlEntries
(
QMenu
*
menu
,
intf_thread_t
*
p_intf
,
input_thread_t
*
p_input
);
input_thread_t
*
p_input
);
/* Systray */
static
void
updateSystrayMenu
(
MainInterface
*
,
intf_thread_t
*
,
bool
b_force_visible
=
false
);
/* Actions */
static
void
DoAction
(
intf_thread_t
*
,
QObject
*
);
/* HACK for minimalView */
static
QAction
*
minimalViewAction
;
private:
/* Generic automenu methods */
/* Generic automenu methods */
static
QMenu
*
Populate
(
intf_thread_t
*
,
QMenu
*
current
,
static
QMenu
*
Populate
(
intf_thread_t
*
,
QMenu
*
current
,
vector
<
const
char
*>&
,
vector
<
vlc_object_t
*>&
,
vector
<
const
char
*>&
,
vector
<
vlc_object_t
*>&
,
...
@@ -115,7 +124,10 @@ private:
...
@@ -115,7 +124,10 @@ private:
static
void
UpdateItem
(
intf_thread_t
*
,
QMenu
*
,
const
char
*
,
static
void
UpdateItem
(
intf_thread_t
*
,
QMenu
*
,
const
char
*
,
vlc_object_t
*
,
bool
);
vlc_object_t
*
,
bool
);
static
int
CreateChoicesMenu
(
QMenu
*
,
const
char
*
,
vlc_object_t
*
,
bool
);
static
int
CreateChoicesMenu
(
QMenu
*
,
const
char
*
,
vlc_object_t
*
,
bool
);
/* recentMRL menu */
static
QMenu
*
recentsMenu
;
static
QMenu
*
recentsMenu
;
public
slots
:
public
slots
:
static
void
updateRecents
(
intf_thread_t
*
);
static
void
updateRecents
(
intf_thread_t
*
);
};
};
...
@@ -130,12 +142,13 @@ public:
...
@@ -130,12 +142,13 @@ public:
{
{
switch
(
id
)
switch
(
id
)
{
{
case
1
:
QVLCMenu
::
AudioMenu
(
p_intf
,
menu
);
break
;
case
1
:
QVLCMenu
::
AudioMenu
(
p_intf
,
menu
);
break
;
case
2
:
QVLCMenu
::
VideoMenu
(
p_intf
,
menu
);
break
;
case
2
:
QVLCMenu
::
VideoMenu
(
p_intf
,
menu
);
break
;
case
3
:
QVLCMenu
::
NavigMenu
(
p_intf
,
menu
);
break
;
case
3
:
QVLCMenu
::
NavigMenu
(
p_intf
,
menu
);
break
;
case
4
:
QVLCMenu
::
InterfacesMenu
(
p_intf
,
menu
);
break
;
case
4
:
QVLCMenu
::
InterfacesMenu
(
p_intf
,
menu
);
break
;
}
}
};
};
private:
int
id
;
int
id
;
QMenu
*
menu
;
QMenu
*
menu
;
};
};
...
...
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