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
d6742e01
Commit
d6742e01
authored
Aug 17, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: namespaces are now sufficient for designating event names
parent
087fcf43
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
89 deletions
+89
-89
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+7
-7
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+51
-51
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+30
-30
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+1
-1
No files found.
modules/gui/qt4/components/controller.cpp
View file @
d6742e01
...
@@ -938,7 +938,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
...
@@ -938,7 +938,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
switch
(
(
int
)
event
->
type
()
)
switch
(
(
int
)
event
->
type
()
)
{
{
/* This is used when the 'i' hotkey is used, to force quick toggle */
/* This is used when the 'i' hotkey is used, to force quick toggle */
case
IMEvent
:
:
FullscreenControlToggle
_Type
:
case
IMEvent
:
:
FullscreenControlToggle
:
vlc_mutex_lock
(
&
lock
);
vlc_mutex_lock
(
&
lock
);
b_fs
=
b_fullscreen
;
b_fs
=
b_fullscreen
;
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
...
@@ -955,7 +955,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
...
@@ -955,7 +955,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
}
}
break
;
break
;
/* Event called to Show the FSC on mouseChanged() */
/* Event called to Show the FSC on mouseChanged() */
case
IMEvent
:
:
FullscreenControlShow
_Type
:
case
IMEvent
:
:
FullscreenControlShow
:
vlc_mutex_lock
(
&
lock
);
vlc_mutex_lock
(
&
lock
);
b_fs
=
b_fullscreen
;
b_fs
=
b_fullscreen
;
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
...
@@ -965,12 +965,12 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
...
@@ -965,12 +965,12 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
break
;
break
;
/* Start the timer to hide later, called usually with above case */
/* Start the timer to hide later, called usually with above case */
case
IMEvent
:
:
FullscreenControlPlanHide
_Type
:
case
IMEvent
:
:
FullscreenControlPlanHide
:
if
(
!
b_mouse_over
)
// Only if the mouse is not over FSC
if
(
!
b_mouse_over
)
// Only if the mouse is not over FSC
planHideFSC
();
planHideFSC
();
break
;
break
;
/* Hide */
/* Hide */
case
IMEvent
:
:
FullscreenControlHide
_Type
:
case
IMEvent
:
:
FullscreenControlHide
:
hideFSC
();
hideFSC
();
break
;
break
;
default:
default:
...
@@ -1174,7 +1174,7 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
...
@@ -1174,7 +1174,7 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
FullscreenControllerWidgetMouseMoved
,
this
);
FullscreenControllerWidgetMouseMoved
,
this
);
/* Force fs hiding */
/* Force fs hiding */
IMEvent
*
eHide
=
new
IMEvent
(
IMEvent
::
FullscreenControlHide
_Type
,
0
);
IMEvent
*
eHide
=
new
IMEvent
(
IMEvent
::
FullscreenControlHide
,
0
);
QApplication
::
postEvent
(
this
,
eHide
);
QApplication
::
postEvent
(
this
,
eHide
);
}
}
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
...
@@ -1202,11 +1202,11 @@ void FullscreenControllerWidget::mouseChanged( vout_thread_t *, int i_mousex, in
...
@@ -1202,11 +1202,11 @@ void FullscreenControllerWidget::mouseChanged( vout_thread_t *, int i_mousex, in
if
(
b_toShow
)
if
(
b_toShow
)
{
{
/* Show event */
/* Show event */
IMEvent
*
eShow
=
new
IMEvent
(
IMEvent
::
FullscreenControlShow
_Type
,
0
);
IMEvent
*
eShow
=
new
IMEvent
(
IMEvent
::
FullscreenControlShow
,
0
);
QApplication
::
postEvent
(
this
,
eShow
);
QApplication
::
postEvent
(
this
,
eShow
);
/* Plan hide event */
/* Plan hide event */
IMEvent
*
eHide
=
new
IMEvent
(
IMEvent
::
FullscreenControlPlanHide
_Type
,
0
);
IMEvent
*
eHide
=
new
IMEvent
(
IMEvent
::
FullscreenControlPlanHide
,
0
);
QApplication
::
postEvent
(
this
,
eHide
);
QApplication
::
postEvent
(
this
,
eHide
);
}
}
}
}
...
...
modules/gui/qt4/input_manager.cpp
View file @
d6742e01
...
@@ -180,7 +180,7 @@ void InputManager::customEvent( QEvent *event )
...
@@ -180,7 +180,7 @@ void InputManager::customEvent( QEvent *event )
int
i_type
=
event
->
type
();
int
i_type
=
event
->
type
();
IMEvent
*
ple
=
static_cast
<
IMEvent
*>
(
event
);
IMEvent
*
ple
=
static_cast
<
IMEvent
*>
(
event
);
if
(
i_type
==
IMEvent
::
ItemChanged
_Type
)
if
(
i_type
==
IMEvent
::
ItemChanged
)
UpdateMeta
(
ple
->
item
()
);
UpdateMeta
(
ple
->
item
()
);
if
(
!
hasInput
()
)
if
(
!
hasInput
()
)
...
@@ -189,13 +189,13 @@ void InputManager::customEvent( QEvent *event )
...
@@ -189,13 +189,13 @@ void InputManager::customEvent( QEvent *event )
/* Actions */
/* Actions */
switch
(
i_type
)
switch
(
i_type
)
{
{
case
IMEvent
:
:
PositionUpdate
_Type
:
case
IMEvent
:
:
PositionUpdate
:
UpdatePosition
();
UpdatePosition
();
break
;
break
;
case
IMEvent
:
:
StatisticsUpdate
_Type
:
case
IMEvent
:
:
StatisticsUpdate
:
UpdateStats
();
UpdateStats
();
break
;
break
;
case
IMEvent
:
:
ItemChanged
_Type
:
case
IMEvent
:
:
ItemChanged
:
/* Ignore ItemChanged_Type event that does not apply to our input */
/* Ignore ItemChanged_Type event that does not apply to our input */
if
(
p_item
==
ple
->
item
()
)
if
(
p_item
==
ple
->
item
()
)
{
{
...
@@ -206,60 +206,60 @@ void InputManager::customEvent( QEvent *event )
...
@@ -206,60 +206,60 @@ void InputManager::customEvent( QEvent *event )
/* Update duration of file */
/* Update duration of file */
}
}
break
;
break
;
case
IMEvent
:
:
ItemStateChanged
_Type
:
case
IMEvent
:
:
ItemStateChanged
:
// TODO: Fusion with above state
// TODO: Fusion with above state
UpdateStatus
();
UpdateStatus
();
// UpdateName();
// UpdateName();
// UpdateNavigation(); This shouldn't be useful now
// UpdateNavigation(); This shouldn't be useful now
// UpdateTeletext(); Same
// UpdateTeletext(); Same
break
;
break
;
case
IMEvent
:
:
NameChanged
_Type
:
case
IMEvent
:
:
NameChanged
:
UpdateName
();
UpdateName
();
break
;
break
;
case
IMEvent
:
:
MetaChanged
_Type
:
case
IMEvent
:
:
MetaChanged
:
UpdateMeta
();
UpdateMeta
();
UpdateName
();
/* Needed for NowPlaying */
UpdateName
();
/* Needed for NowPlaying */
UpdateArt
();
/* Art is part of meta in the core */
UpdateArt
();
/* Art is part of meta in the core */
break
;
break
;
case
IMEvent
:
:
InfoChanged
_Type
:
case
IMEvent
:
:
InfoChanged
:
UpdateInfo
();
UpdateInfo
();
break
;
break
;
case
IMEvent
:
:
ItemTitleChanged
_Type
:
case
IMEvent
:
:
ItemTitleChanged
:
UpdateNavigation
();
UpdateNavigation
();
UpdateName
();
/* Display the name of the Chapter, if exists */
UpdateName
();
/* Display the name of the Chapter, if exists */
break
;
break
;
case
IMEvent
:
:
ItemRateChanged
_Type
:
case
IMEvent
:
:
ItemRateChanged
:
UpdateRate
();
UpdateRate
();
break
;
break
;
case
IMEvent
:
:
ItemEsChanged
_Type
:
case
IMEvent
:
:
ItemEsChanged
:
UpdateTeletext
();
UpdateTeletext
();
// We don't do anything ES related. Why ?
// We don't do anything ES related. Why ?
break
;
break
;
case
IMEvent
:
:
ItemTeletextChanged
_Type
:
case
IMEvent
:
:
ItemTeletextChanged
:
UpdateTeletext
();
UpdateTeletext
();
break
;
break
;
case
IMEvent
:
:
InterfaceVoutUpdate
_Type
:
case
IMEvent
:
:
InterfaceVoutUpdate
:
UpdateVout
();
UpdateVout
();
break
;
break
;
case
IMEvent
:
:
SynchroChanged
_Type
:
case
IMEvent
:
:
SynchroChanged
:
emit
synchroChanged
();
emit
synchroChanged
();
break
;
break
;
case
IMEvent
:
:
CachingEvent
_Type
:
case
IMEvent
:
:
CachingEvent
:
UpdateCaching
();
UpdateCaching
();
break
;
break
;
case
IMEvent
:
:
BookmarksChanged
_Type
:
case
IMEvent
:
:
BookmarksChanged
:
emit
bookmarksChanged
();
emit
bookmarksChanged
();
break
;
break
;
case
IMEvent
:
:
InterfaceAoutUpdate
_Type
:
case
IMEvent
:
:
InterfaceAoutUpdate
:
UpdateAout
();
UpdateAout
();
break
;
break
;
case
IMEvent
:
:
RecordingEvent
_Type
:
case
IMEvent
:
:
RecordingEvent
:
UpdateRecord
();
UpdateRecord
();
break
;
break
;
case
IMEvent
:
:
ProgramChanged
_Type
:
case
IMEvent
:
:
ProgramChanged
:
UpdateProgramEvent
();
UpdateProgramEvent
();
break
;
break
;
case
IMEvent
:
:
EPGEvent
_Type
:
case
IMEvent
:
:
EPGEvent
:
UpdateEPG
();
UpdateEPG
();
break
;
break
;
default:
default:
...
@@ -289,7 +289,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
...
@@ -289,7 +289,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
InputManager
*
im
=
(
InputManager
*
)
param
;
InputManager
*
im
=
(
InputManager
*
)
param
;
input_item_t
*
p_item
=
static_cast
<
input_item_t
*>
(
newval
.
p_address
);
input_item_t
*
p_item
=
static_cast
<
input_item_t
*>
(
newval
.
p_address
);
IMEvent
*
event
=
new
IMEvent
(
IMEvent
::
ItemChanged
_Type
,
p_item
);
IMEvent
*
event
=
new
IMEvent
(
IMEvent
::
ItemChanged
,
p_item
);
im
->
postUniqueEvent
(
im
,
event
);
im
->
postUniqueEvent
(
im
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -306,75 +306,75 @@ static int InputEvent( vlc_object_t *p_this, const char *,
...
@@ -306,75 +306,75 @@ static int InputEvent( vlc_object_t *p_this, const char *,
switch
(
newval
.
i_int
)
switch
(
newval
.
i_int
)
{
{
case
INPUT_EVENT_STATE
:
case
INPUT_EVENT_STATE
:
event
=
new
IMEvent
(
IMEvent
::
ItemStateChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
ItemStateChanged
);
break
;
break
;
case
INPUT_EVENT_RATE
:
case
INPUT_EVENT_RATE
:
event
=
new
IMEvent
(
IMEvent
::
ItemRateChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
ItemRateChanged
);
break
;
break
;
case
INPUT_EVENT_POSITION
:
case
INPUT_EVENT_POSITION
:
//case INPUT_EVENT_LENGTH:
//case INPUT_EVENT_LENGTH:
event
=
new
IMEvent
(
IMEvent
::
PositionUpdate
_Type
);
event
=
new
IMEvent
(
IMEvent
::
PositionUpdate
);
break
;
break
;
case
INPUT_EVENT_TITLE
:
case
INPUT_EVENT_TITLE
:
case
INPUT_EVENT_CHAPTER
:
case
INPUT_EVENT_CHAPTER
:
event
=
new
IMEvent
(
IMEvent
::
ItemTitleChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
ItemTitleChanged
);
break
;
break
;
case
INPUT_EVENT_ES
:
case
INPUT_EVENT_ES
:
event
=
new
IMEvent
(
IMEvent
::
ItemEsChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
ItemEsChanged
);
break
;
break
;
case
INPUT_EVENT_TELETEXT
:
case
INPUT_EVENT_TELETEXT
:
event
=
new
IMEvent
(
IMEvent
::
ItemTeletextChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
ItemTeletextChanged
);
break
;
break
;
case
INPUT_EVENT_STATISTICS
:
case
INPUT_EVENT_STATISTICS
:
event
=
new
IMEvent
(
IMEvent
::
StatisticsUpdate
_Type
);
event
=
new
IMEvent
(
IMEvent
::
StatisticsUpdate
);
break
;
break
;
case
INPUT_EVENT_VOUT
:
case
INPUT_EVENT_VOUT
:
event
=
new
IMEvent
(
IMEvent
::
InterfaceVoutUpdate
_Type
);
event
=
new
IMEvent
(
IMEvent
::
InterfaceVoutUpdate
);
break
;
break
;
case
INPUT_EVENT_AOUT
:
case
INPUT_EVENT_AOUT
:
event
=
new
IMEvent
(
IMEvent
::
InterfaceAoutUpdate
_Type
);
event
=
new
IMEvent
(
IMEvent
::
InterfaceAoutUpdate
);
break
;
break
;
case
INPUT_EVENT_ITEM_META
:
/* Codec MetaData + Art */
case
INPUT_EVENT_ITEM_META
:
/* Codec MetaData + Art */
b_unified
=
true
;
b_unified
=
true
;
event
=
new
IMEvent
(
IMEvent
::
MetaChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
MetaChanged
);
break
;
break
;
case
INPUT_EVENT_ITEM_INFO
:
/* Codec Info */
case
INPUT_EVENT_ITEM_INFO
:
/* Codec Info */
event
=
new
IMEvent
(
IMEvent
::
InfoChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
InfoChanged
);
break
;
break
;
case
INPUT_EVENT_ITEM_NAME
:
case
INPUT_EVENT_ITEM_NAME
:
event
=
new
IMEvent
(
IMEvent
::
NameChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
NameChanged
);
break
;
break
;
case
INPUT_EVENT_AUDIO_DELAY
:
case
INPUT_EVENT_AUDIO_DELAY
:
case
INPUT_EVENT_SUBTITLE_DELAY
:
case
INPUT_EVENT_SUBTITLE_DELAY
:
event
=
new
IMEvent
(
IMEvent
::
SynchroChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
SynchroChanged
);
break
;
break
;
case
INPUT_EVENT_CACHE
:
case
INPUT_EVENT_CACHE
:
event
=
new
IMEvent
(
IMEvent
::
CachingEvent
_Type
);
event
=
new
IMEvent
(
IMEvent
::
CachingEvent
);
break
;
break
;
case
INPUT_EVENT_BOOKMARK
:
case
INPUT_EVENT_BOOKMARK
:
event
=
new
IMEvent
(
IMEvent
::
BookmarksChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
BookmarksChanged
);
break
;
break
;
case
INPUT_EVENT_RECORD
:
case
INPUT_EVENT_RECORD
:
event
=
new
IMEvent
(
IMEvent
::
RecordingEvent
_Type
);
event
=
new
IMEvent
(
IMEvent
::
RecordingEvent
);
break
;
break
;
case
INPUT_EVENT_PROGRAM
:
case
INPUT_EVENT_PROGRAM
:
/* This is for PID changes */
/* This is for PID changes */
event
=
new
IMEvent
(
IMEvent
::
ProgramChanged
_Type
);
event
=
new
IMEvent
(
IMEvent
::
ProgramChanged
);
break
;
break
;
case
INPUT_EVENT_ITEM_EPG
:
case
INPUT_EVENT_ITEM_EPG
:
/* EPG data changed */
/* EPG data changed */
event
=
new
IMEvent
(
IMEvent
::
EPGEvent
_Type
);
event
=
new
IMEvent
(
IMEvent
::
EPGEvent
);
break
;
break
;
case
INPUT_EVENT_SIGNAL
:
case
INPUT_EVENT_SIGNAL
:
...
@@ -400,7 +400,7 @@ static int VbiEvent( vlc_object_t *, const char *,
...
@@ -400,7 +400,7 @@ static int VbiEvent( vlc_object_t *, const char *,
vlc_value_t
,
vlc_value_t
,
void
*
param
)
vlc_value_t
,
vlc_value_t
,
void
*
param
)
{
{
InputManager
*
im
=
(
InputManager
*
)
param
;
InputManager
*
im
=
(
InputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
IMEvent
::
ItemTeletextChanged
_Type
);
IMEvent
*
event
=
new
IMEvent
(
IMEvent
::
ItemTeletextChanged
);
QApplication
::
postEvent
(
im
,
event
);
QApplication
::
postEvent
(
im
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -1027,24 +1027,24 @@ void MainInputManager::customEvent( QEvent *event )
...
@@ -1027,24 +1027,24 @@ void MainInputManager::customEvent( QEvent *event )
// msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
// msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
switch
(
type
)
switch
(
type
)
{
{
case
PLEvent
:
:
PLItemAppended
_Type
:
case
PLEvent
:
:
PLItemAppended
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistItemAppended
(
plEv
->
getItemId
(),
plEv
->
getParentId
()
);
emit
playlistItemAppended
(
plEv
->
getItemId
(),
plEv
->
getParentId
()
);
return
;
return
;
case
PLEvent
:
:
PLItemRemoved
_Type
:
case
PLEvent
:
:
PLItemRemoved
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistItemRemoved
(
plEv
->
getItemId
()
);
emit
playlistItemRemoved
(
plEv
->
getItemId
()
);
return
;
return
;
case
PLEvent
:
:
PLEmpty
_Type
:
case
PLEvent
:
:
PLEmpty
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
playlistNotEmpty
(
plEv
->
getItemId
()
>=
0
);
emit
playlistNotEmpty
(
plEv
->
getItemId
()
>=
0
);
return
;
return
;
case
PLEvent
:
:
LeafToParent
_Type
:
case
PLEvent
:
:
LeafToParent
:
plEv
=
static_cast
<
PLEvent
*>
(
event
);
plEv
=
static_cast
<
PLEvent
*>
(
event
);
emit
leafBecameParent
(
plEv
->
getItemId
()
);
emit
leafBecameParent
(
plEv
->
getItemId
()
);
return
;
return
;
default:
default:
if
(
type
!=
IMEvent
::
ItemChanged
_Type
)
return
;
if
(
type
!=
IMEvent
::
ItemChanged
)
return
;
}
}
/* Should be PLItemChanged Event */
/* Should be PLItemChanged Event */
...
@@ -1215,7 +1215,7 @@ static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
...
@@ -1215,7 +1215,7 @@ static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
IMEvent
::
ItemChanged
_Type
);
IMEvent
*
event
=
new
IMEvent
(
IMEvent
::
ItemChanged
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -1226,7 +1226,7 @@ static int LeafToParent( vlc_object_t *p_this, const char *psz_var,
...
@@ -1226,7 +1226,7 @@ static int LeafToParent( vlc_object_t *p_this, const char *psz_var,
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
LeafToParent
_Type
,
newval
.
i_int
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
LeafToParent
,
newval
.
i_int
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -1249,9 +1249,9 @@ static int PLItemAppended
...
@@ -1249,9 +1249,9 @@ static int PLItemAppended
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
playlist_add_t
*
p_add
=
static_cast
<
playlist_add_t
*>
(
cur
.
p_address
);
playlist_add_t
*
p_add
=
static_cast
<
playlist_add_t
*>
(
cur
.
p_address
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
PLItemAppended
_Type
,
p_add
->
i_item
,
p_add
->
i_node
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
PLItemAppended
,
p_add
->
i_item
,
p_add
->
i_node
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
event
=
new
PLEvent
(
PLEvent
::
PLEmpty
_Type
,
p_add
->
i_item
,
0
);
event
=
new
PLEvent
(
PLEvent
::
PLEmpty
,
p_add
->
i_item
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -1263,12 +1263,12 @@ static int PLItemRemoved
...
@@ -1263,12 +1263,12 @@ static int PLItemRemoved
playlist_t
*
pl
=
(
playlist_t
*
)
obj
;
playlist_t
*
pl
=
(
playlist_t
*
)
obj
;
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
MainInputManager
*
mim
=
static_cast
<
MainInputManager
*>
(
data
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
PLItemRemoved
_Type
,
cur
.
i_int
,
0
);
PLEvent
*
event
=
new
PLEvent
(
PLEvent
::
PLItemRemoved
,
cur
.
i_int
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
// can't use playlist_IsEmpty( ) as it isn't true yet
// can't use playlist_IsEmpty( ) as it isn't true yet
if
(
pl
->
items
.
i_size
==
1
)
// lock is held
if
(
pl
->
items
.
i_size
==
1
)
// lock is held
{
{
event
=
new
PLEvent
(
PLEvent
::
PLEmpty
_Type
,
-
1
,
0
);
event
=
new
PLEvent
(
PLEvent
::
PLEmpty
,
-
1
,
0
);
QApplication
::
postEvent
(
mim
,
event
);
QApplication
::
postEvent
(
mim
,
event
);
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
modules/gui/qt4/input_manager.hpp
View file @
d6742e01
...
@@ -48,33 +48,33 @@ class IMEvent : public UniqueEvent
...
@@ -48,33 +48,33 @@ class IMEvent : public UniqueEvent
{
{
public:
public:
enum
event_types
{
enum
event_types
{
PositionUpdate
_Type
=
QEvent
::
User
+
IMEventTypeOffset
+
1
,
PositionUpdate
=
QEvent
::
User
+
IMEventTypeOffset
+
1
,
ItemChanged
_Type
,
ItemChanged
,
ItemStateChanged
_Type
,
ItemStateChanged
,
ItemTitleChanged
_Type
,
ItemTitleChanged
,
ItemRateChanged
_Type
,
ItemRateChanged
,
ItemEsChanged
_Type
,
ItemEsChanged
,
ItemTeletextChanged
_Type
,
ItemTeletextChanged
,
InterfaceVoutUpdate
_Type
,
InterfaceVoutUpdate
,
StatisticsUpdate
_Type
,
/*10*/
StatisticsUpdate
,
/*10*/
InterfaceAoutUpdate
_Type
,
InterfaceAoutUpdate
,
MetaChanged
_Type
,
MetaChanged
,
NameChanged
_Type
,
NameChanged
,
InfoChanged
_Type
,
InfoChanged
,
SynchroChanged
_Type
,
SynchroChanged
,
CachingEvent
_Type
,
CachingEvent
,
BookmarksChanged
_Type
,
BookmarksChanged
,
RecordingEvent
_Type
,
RecordingEvent
,
ProgramChanged
_Type
,
ProgramChanged
,
RandomChanged
_Type
,
RandomChanged
,
LoopOrRepeatChanged
_Type
,
LoopOrRepeatChanged
,
EPGEvent
_Type
,
EPGEvent
,
/* SignalChanged
_Type
, */
/* SignalChanged, */
FullscreenControlToggle
_Type
=
QEvent
::
User
+
IMEventTypeOffset
+
20
,
FullscreenControlToggle
=
QEvent
::
User
+
IMEventTypeOffset
+
20
,
FullscreenControlShow
_Type
,
FullscreenControlShow
,
FullscreenControlHide
_Type
,
FullscreenControlHide
,
FullscreenControlPlanHide
_Type
,
FullscreenControlPlanHide
,
};
};
IMEvent
(
event_types
type
,
input_item_t
*
p_input
=
NULL
)
IMEvent
(
event_types
type
,
input_item_t
*
p_input
=
NULL
)
:
UniqueEvent
(
(
QEvent
::
Type
)(
type
)
)
:
UniqueEvent
(
(
QEvent
::
Type
)(
type
)
)
...
@@ -102,10 +102,10 @@ class PLEvent : public QEvent
...
@@ -102,10 +102,10 @@ class PLEvent : public QEvent
public:
public:
enum
PLEventTypes
enum
PLEventTypes
{
{
PLItemAppended
_Type
=
QEvent
::
User
+
PLEventTypeOffset
+
1
,
PLItemAppended
=
QEvent
::
User
+
PLEventTypeOffset
+
1
,
PLItemRemoved
_Type
,
PLItemRemoved
,
LeafToParent
_Type
,
LeafToParent
,
PLEmpty
_Type
PLEmpty
};
};
PLEvent
(
PLEventTypes
t
,
int
i
,
int
p
=
0
)
PLEvent
(
PLEventTypes
t
,
int
i
,
int
p
=
0
)
:
QEvent
(
(
QEvent
::
Type
)(
t
)
),
i_item
(
i
),
i_parent
(
p
)
{}
:
QEvent
(
(
QEvent
::
Type
)(
t
)
),
i_item
(
i
),
i_parent
(
p
)
{}
...
...
modules/gui/qt4/main_interface.cpp
View file @
d6742e01
...
@@ -613,7 +613,7 @@ void MainInterface::toggleFSC()
...
@@ -613,7 +613,7 @@ void MainInterface::toggleFSC()
{
{
if
(
!
fullscreenControls
)
return
;
if
(
!
fullscreenControls
)
return
;
IMEvent
*
eShow
=
new
IMEvent
(
IMEvent
::
FullscreenControlToggle
_Type
);
IMEvent
*
eShow
=
new
IMEvent
(
IMEvent
::
FullscreenControlToggle
);
QApplication
::
postEvent
(
fullscreenControls
,
eShow
);
QApplication
::
postEvent
(
fullscreenControls
,
eShow
);
}
}
...
...
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