Commit d6742e01 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: namespaces are now sufficient for designating event names

parent 087fcf43
......@@ -938,7 +938,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
switch( (int)event->type() )
{
/* This is used when the 'i' hotkey is used, to force quick toggle */
case IMEvent::FullscreenControlToggle_Type:
case IMEvent::FullscreenControlToggle:
vlc_mutex_lock( &lock );
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
......@@ -955,7 +955,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
}
break;
/* Event called to Show the FSC on mouseChanged() */
case IMEvent::FullscreenControlShow_Type:
case IMEvent::FullscreenControlShow:
vlc_mutex_lock( &lock );
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
......@@ -965,12 +965,12 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
break;
/* 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
planHideFSC();
break;
/* Hide */
case IMEvent::FullscreenControlHide_Type:
case IMEvent::FullscreenControlHide:
hideFSC();
break;
default:
......@@ -1174,7 +1174,7 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
FullscreenControllerWidgetMouseMoved, this );
/* Force fs hiding */
IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlHide_Type, 0 );
IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlHide, 0 );
QApplication::postEvent( this, eHide );
}
vlc_mutex_unlock( &lock );
......@@ -1202,11 +1202,11 @@ void FullscreenControllerWidget::mouseChanged( vout_thread_t *, int i_mousex, in
if( b_toShow )
{
/* Show event */
IMEvent *eShow = new IMEvent( IMEvent::FullscreenControlShow_Type, 0 );
IMEvent *eShow = new IMEvent( IMEvent::FullscreenControlShow, 0 );
QApplication::postEvent( this, eShow );
/* Plan hide event */
IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlPlanHide_Type, 0 );
IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlPlanHide, 0 );
QApplication::postEvent( this, eHide );
}
}
......
This diff is collapsed.
......@@ -48,33 +48,33 @@ class IMEvent : public UniqueEvent
{
public:
enum event_types {
PositionUpdate_Type = QEvent::User + IMEventTypeOffset + 1,
ItemChanged_Type,
ItemStateChanged_Type,
ItemTitleChanged_Type,
ItemRateChanged_Type,
ItemEsChanged_Type,
ItemTeletextChanged_Type,
InterfaceVoutUpdate_Type,
StatisticsUpdate_Type, /*10*/
InterfaceAoutUpdate_Type,
MetaChanged_Type,
NameChanged_Type,
InfoChanged_Type,
SynchroChanged_Type,
CachingEvent_Type,
BookmarksChanged_Type,
RecordingEvent_Type,
ProgramChanged_Type,
RandomChanged_Type,
LoopOrRepeatChanged_Type,
EPGEvent_Type,
/* SignalChanged_Type, */
PositionUpdate = QEvent::User + IMEventTypeOffset + 1,
ItemChanged,
ItemStateChanged,
ItemTitleChanged,
ItemRateChanged,
ItemEsChanged,
ItemTeletextChanged,
InterfaceVoutUpdate,
StatisticsUpdate, /*10*/
InterfaceAoutUpdate,
MetaChanged,
NameChanged,
InfoChanged,
SynchroChanged,
CachingEvent,
BookmarksChanged,
RecordingEvent,
ProgramChanged,
RandomChanged,
LoopOrRepeatChanged,
EPGEvent,
/* SignalChanged, */
FullscreenControlToggle_Type = QEvent::User + IMEventTypeOffset + 20,
FullscreenControlShow_Type,
FullscreenControlHide_Type,
FullscreenControlPlanHide_Type,
FullscreenControlToggle = QEvent::User + IMEventTypeOffset + 20,
FullscreenControlShow,
FullscreenControlHide,
FullscreenControlPlanHide,
};
IMEvent( event_types type, input_item_t *p_input = NULL )
: UniqueEvent( (QEvent::Type)(type) )
......@@ -102,10 +102,10 @@ class PLEvent : public QEvent
public:
enum PLEventTypes
{
PLItemAppended_Type = QEvent::User + PLEventTypeOffset + 1,
PLItemRemoved_Type,
LeafToParent_Type,
PLEmpty_Type
PLItemAppended = QEvent::User + PLEventTypeOffset + 1,
PLItemRemoved,
LeafToParent,
PLEmpty
};
PLEvent( PLEventTypes t, int i, int p = 0 )
: QEvent( (QEvent::Type)(t) ), i_item(i), i_parent(p) {}
......
......@@ -613,7 +613,7 @@ void MainInterface::toggleFSC()
{
if( !fullscreenControls ) return;
IMEvent *eShow = new IMEvent( IMEvent::FullscreenControlToggle_Type );
IMEvent *eShow = new IMEvent( IMEvent::FullscreenControlToggle );
QApplication::postEvent( fullscreenControls, eShow );
}
......
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