#include "dialogs_provider.hpp" /* Opening Dialogs */
#include "input_manager.hpp"
+#include "actions_manager.hpp"
#include "util/input_slider.hpp" /* InputSlider */
#include "util/customwidgets.hpp" /* qEventToKey */
/* Main action provider */
toolbarActionsMapper = new QSignalMapper( this );
- CONNECT( toolbarActionsMapper, mapped( int ), this, doAction( int ) );
+ CONNECT( toolbarActionsMapper, mapped( int ),
+ ActionsManager::getInstance( p_intf ), doAction( int ) );
CONNECT( THEMIM->getIM(), statusChanged( int ), this, setStatus( int ) );
}
emit inputIsRecordable( b_hasInput &&
var_GetBool( THEMIM->getInput(), "can-record" ) );
+
+ emit inputIsTrickPlayable( b_hasInput &&
+ var_GetBool( THEMIM->getInput(), "can-rewind" ) );
}
/* Generic button setup */
/* Open the generic config line for the toolbar, parse it
* and create the widgets accordingly */
-void AbstractController::parseAndCreate( QString config,
+void AbstractController::parseAndCreate( const QString& config,
QBoxLayout *controlLayout )
{
QStringList list = config.split( ";", QString::SkipEmptyParts ) ;
CONNECT_MAP( a ); \
SET_MAPPING( a, b );
#define BUTTON_SET_BAR( a_button ) \
- a_button->setToolTip( tooltipL[button] ); \
+ a_button->setToolTip( qtr( tooltipL[button] ) ); \
a_button->setIcon( QIcon( iconL[button] ) );
#define BUTTON_SET_BAR2( button, image, tooltip ) \
button->setToolTip( tooltip ); \
bool b_flat = options & WIDGET_FLAT;
bool b_big = options & WIDGET_BIG;
bool b_shiny = options & WIDGET_SHINY;
+ bool b_special = false;
QWidget *widget = NULL;
switch( button )
CONNECT_MAP_SET( recordButton, RECORD_ACTION );
BUTTON_SET_BAR( recordButton );
ENABLE_ON_INPUT( recordButton );
+ recordButton->setCheckable( true );
+ CONNECT( THEMIM->getIM(), recordingStateChanged( bool ),
+ recordButton, setChecked( bool ) );
widget = recordButton;
}
break;
case ATOB_BUTTON: {
AtoB_Button *ABButton = new AtoB_Button;
setupButton( ABButton );
+ ABButton->setShortcut( qtr("Shift+L") );
BUTTON_SET_BAR( ABButton );
ENABLE_ON_INPUT( ABButton );
CONNECT_MAP_SET( ABButton, ATOB_ACTION );
widget = telexFrame();
widget->hide();
break;
+ case VOLUME_SPECIAL:
+ b_special = true;
case VOLUME:
{
- SoundWidget *snd = new SoundWidget( this, p_intf, b_shiny );
+ SoundWidget *snd = new SoundWidget( this, p_intf, b_shiny, b_special );
widget = snd;
}
break;
setupButton( reverseButton );
CONNECT_MAP_SET( reverseButton, REVERSE_ACTION );
BUTTON_SET_BAR( reverseButton );
- ENABLE_ON_INPUT( reverseButton );
+ reverseButton->setCheckable( true );
+ /* You should, of COURSE change this to the correct event,
+ when/if we have one, that tells us if trickplay is possible . */
+ CONNECT( this, inputIsTrickPlayable( bool ), reverseButton, setVisible( bool ) );
+ reverseButton->setVisible( false );
widget = reverseButton;
}
break;
widget = skipFwButton;
}
break;
+ case QUIT_BUTTON: {
+ QToolButton *quitButton = new QToolButton;
+ setupButton( quitButton );
+ CONNECT_MAP_SET( quitButton, QUIT_ACTION );
+ BUTTON_SET_BAR( quitButton );
+ widget = quitButton;
+ }
+ break;
default:
msg_Warn( p_intf, "This should not happen %i", button );
break;
/* Customize Buttons */
if( b_flat || b_big )
{
- QToolButton *tmpButton = qobject_cast<QToolButton *>(widget);
- if( tmpButton )
+ QFrame *frame = qobject_cast<QFrame *>(widget);
+ if( frame )
{
- if( b_flat )
- tmpButton->setAutoRaise( b_flat );
- if( b_big )
- {
- tmpButton->setFixedSize( QSize( 32, 32 ) );
- tmpButton->setIconSize( QSize( 26, 26 ) );
- }
+ QList<QToolButton *> allTButtons = frame->findChildren<QToolButton *>();
+ for( int i = 0; i < allTButtons.size(); i++ )
+ applyAttributes( allTButtons[i], b_flat, b_big );
+ }
+ else
+ {
+ QToolButton *tmpButton = qobject_cast<QToolButton *>(widget);
+ if( tmpButton )
+ applyAttributes( tmpButton, b_flat, b_big );
}
}
return widget;
}
+void AbstractController::applyAttributes( QToolButton *tmpButton, bool b_flat, bool b_big )
+{
+ if( tmpButton )
+ {
+ if( b_flat )
+ tmpButton->setAutoRaise( b_flat );
+ if( b_big )
+ {
+ tmpButton->setFixedSize( QSize( 32, 32 ) );
+ tmpButton->setIconSize( QSize( 26, 26 ) );
+ }
+ }
+}
+
QFrame *AbstractController::discFrame()
{
/** Disc and Menus handling */
QToolButton *prevSectionButton = new QToolButton( discFrame );
setupButton( prevSectionButton );
- BUTTON_SET_BAR2( prevSectionButton, dvd_prev,
+ BUTTON_SET_BAR2( prevSectionButton, toolbar/dvd_prev,
qtr("Previous Chapter/Title" ) );
discLayout->addWidget( prevSectionButton );
QToolButton *menuButton = new QToolButton( discFrame );
setupButton( menuButton );
discLayout->addWidget( menuButton );
- BUTTON_SET_BAR2( menuButton, dvd_menu, qtr( "Menu" ) );
+ BUTTON_SET_BAR2( menuButton, toolbar/dvd_menu, qtr( "Menu" ) );
QToolButton *nextSectionButton = new QToolButton( discFrame );
setupButton( nextSectionButton );
discLayout->addWidget( nextSectionButton );
- BUTTON_SET_BAR2( nextSectionButton, dvd_next,
+ BUTTON_SET_BAR2( nextSectionButton, toolbar/dvd_next,
qtr("Next Chapter/Title" ) );
/* Change the navigation button display when the IM
sectionNext() );
CONNECT( menuButton, clicked(), THEMIM->getIM(),
sectionMenu() );
+ connect( THEMIM->getIM(), SIGNAL( titleChanged( bool ) ),
+ this, SIGNAL( sizeChanged() ) );
return discFrame;
}
/**
* Telextext QFrame
**/
- TeletextController *telexFrame = new TeletextController;
+ QFrame *telexFrame = new QFrame;
QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame );
telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
CONNECT( THEMIM->getIM(), teletextPossible( bool ),
telexFrame, setVisible( bool ) );
+ connect( THEMIM->getIM(), SIGNAL( teletextPossible( bool ) ),
+ this, SIGNAL( sizeChanged() ) );
/* On/Off button */
QToolButton *telexOn = new QToolButton;
- telexFrame->telexOn = telexOn;
setupButton( telexOn );
- BUTTON_SET_BAR2( telexOn, tv, qtr( "Teletext Activation" ) );
+ BUTTON_SET_BAR2( telexOn, toolbar/tv, qtr( "Teletext Activation" ) );
+ telexOn->setEnabled( false );
+ telexOn->setCheckable( true );
+
telexLayout->addWidget( telexOn );
/* Teletext Activation and set */
CONNECT( telexOn, clicked( bool ),
THEMIM->getIM(), activateTeletext( bool ) );
- CONNECT( THEMIM->getIM(), teletextActivated( bool ),
- telexFrame, enableTeletextButtons( bool ) );
-
+ CONNECT( THEMIM->getIM(), teletextPossible( bool ),
+ telexOn, setEnabled( bool ) );
/* Transparency button */
QToolButton *telexTransparent = new QToolButton;
- telexFrame->telexTransparent = telexTransparent;
setupButton( telexTransparent );
- BUTTON_SET_BAR2( telexTransparent, tvtelx,
+ BUTTON_SET_BAR2( telexTransparent, toolbar/tvtelx,
qtr( "Toggle Transparency " ) );
telexTransparent->setEnabled( false );
+ telexTransparent->setCheckable( true );
telexLayout->addWidget( telexTransparent );
/* Transparency change and set */
CONNECT( telexTransparent, clicked( bool ),
THEMIM->getIM(), telexSetTransparency( bool ) );
CONNECT( THEMIM->getIM(), teletextTransparencyActivated( bool ),
- telexFrame, toggleTeletextTransparency( bool ) );
+ telexTransparent, setChecked( bool ) );
/* Page setting */
- QSpinBox *telexPage = new QSpinBox;
- telexFrame->telexPage = telexPage;
+ QSpinBox *telexPage = new QSpinBox( telexFrame );
telexPage->setRange( 0, 999 );
telexPage->setValue( 100 );
telexPage->setAccelerated( true );
CONNECT( THEMIM->getIM(), newTelexPageSet( int ),
telexPage, setValue( int ) );
+ CONNECT( THEMIM->getIM(), teletextActivated( bool ), telexPage, setEnabled( bool ) );
+ CONNECT( THEMIM->getIM(), teletextActivated( bool ), telexTransparent, setEnabled( bool ) );
+ CONNECT( THEMIM->getIM(), teletextActivated( bool ), telexOn, setChecked( bool ) );
return telexFrame;
}
#undef CONNECT_MAP
#undef SET_MAPPING
#undef CONNECT_MAP_SET
#undef BUTTON_SET_BAR
+#undef BUTTON_SET_BAR2
#undef ENABLE_ON_VIDEO
#undef ENABLE_ON_INPUT
-//* Actions */
-void AbstractController::doAction( int id_action )
-{
- switch( id_action )
- {
- case PLAY_ACTION:
- play(); break;
- case PREVIOUS_ACTION:
- prev(); break;
- case NEXT_ACTION:
- next(); break;
- case STOP_ACTION:
- stop(); break;
- case SLOWER_ACTION:
- slower(); break;
- case FASTER_ACTION:
- faster(); break;
- case FULLSCREEN_ACTION:
- fullscreen(); break;
- case EXTENDED_ACTION:
- extSettings(); break;
- case PLAYLIST_ACTION:
- playlist(); break;
- case SNAPSHOT_ACTION:
- snapshot(); break;
- case RECORD_ACTION:
- record(); break;
- case ATOB_ACTION:
- THEMIM->getIM()->setAtoB(); break;
- case FRAME_ACTION:
- frame(); break;
- case REVERSE_ACTION:
- reverse(); break;
- case SKIP_BACK_ACTION:
- var_SetInteger( p_intf->p_libvlc, "key-pressed",
- ACTIONID_JUMP_BACKWARD_SHORT );
- break;
- case SKIP_FW_ACTION:
- var_SetInteger( p_intf->p_libvlc, "key-pressed",
- ACTIONID_JUMP_FORWARD_SHORT );
- break;
- default:
- msg_Dbg( p_intf, "Action: %i", id_action );
- break;
- }
-}
-
-void AbstractController::stop()
-{
- THEMIM->stop();
-}
-
-void AbstractController::play()
-{
- if( THEPL->current.i_size == 0 )
- {
- /* The playlist is empty, open a file requester */
- THEDP->openFileDialog();
- return;
- }
- THEMIM->togglePlayPause();
-}
-
-void AbstractController::prev()
-{
- THEMIM->prev();
-}
-
-void AbstractController::next()
-{
- THEMIM->next();
-}
-
-/**
- * TODO
- * This functions toggle the fullscreen mode
- * If there is no video, it should first activate Visualisations...
- * This has also to be fixed in enableVideo()
- */
-void AbstractController::fullscreen()
-{
- vout_thread_t *p_vout =
- (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
- if( p_vout)
- {
- var_SetBool( p_vout, "fullscreen", !var_GetBool( p_vout, "fullscreen" ) );
- vlc_object_release( p_vout );
- }
-}
-
-void AbstractController::snapshot()
-{
- vout_thread_t *p_vout =
- (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
- if( p_vout )
- {
- vout_Control( p_vout, VOUT_SNAPSHOT );
- vlc_object_release( p_vout );
- }
-}
-
-void AbstractController::extSettings()
-{
- THEDP->extendedDialog();
-}
-
-void AbstractController::reverse()
-{
- THEMIM->getIM()->reverse();
-}
-
-void AbstractController::slower()
-{
- THEMIM->getIM()->slower();
-}
-
-void AbstractController::faster()
-{
- THEMIM->getIM()->faster();
-}
-
-void AbstractController::playlist()
-{
- if( p_intf->p_sys->p_mi ) p_intf->p_sys->p_mi->togglePlaylist();
-}
-
-void AbstractController::record()
-{
- input_thread_t *p_input = THEMIM->getInput();
- if( p_input )
- {
- /* This method won't work fine if the stream can't be cut anywhere */
- const bool b_recording = var_GetBool( p_input, "record" );
- var_SetBool( p_input, "record", !b_recording );
-#if 0
- else
- {
- /* 'record' access-filter is not loaded, we open Save dialog */
- input_item_t *p_item = input_GetItem( p_input );
- if( !p_item )
- return;
-
- char *psz = input_item_GetURI( p_item );
- if( psz )
- THEDP->streamingDialog( NULL, psz, true );
- }
-#endif
- }
-}
-
-void AbstractController::frame()
-{
- input_thread_t *p_input = THEMIM->getInput();
- if( p_input )
- var_SetVoid( p_input, "frame-next" );
-}
-
#include <QHBoxLayout>
/*****************************
* DA Control Widget !
QHBoxLayout *controlLayout1 = new QHBoxLayout;
controlLayout1->setSpacing( 0 );
- QString line1 = getSettings()->value( "MainWindow/MainToolbar1",
- "64;36;37;38;65").toString();
+ QString line1 = getSettings()->value( "MainToolbar1", MAIN_TB1_DEFAULT )
+ .toString();
parseAndCreate( line1, controlLayout1 );
- /* QString line2 = QString( "%1-2;%2;%3;%4;%5;%6;%6;%7;%8;%9;%6;%10;%11-4")
- .arg( PLAY_BUTTON ) .arg( WIDGET_SPACER )
- .arg( PREVIOUS_BUTTON ) .arg( STOP_BUTTON )
- .arg( NEXT_BUTTON ) .arg( WIDGET_SPACER )
- .arg( FULLSCREEN_BUTTON ) .arg( PLAYLIST_BUTTON )
- .arg( EXTENDED_BUTTON ) .arg( WIDGET_SPACER_EXTEND )
- .arg( VOLUME );
- msg_Dbg( p_intf, "%s", qtu( line2 )); */
-
QHBoxLayout *controlLayout2 = new QHBoxLayout;
controlLayout2->setSpacing( 0 );
- QString line2 = getSettings()->value( "MainWindow/MainToolbar2",
- "0-2;64;3;1;4;64;7;10;9;65;34-4" ).toString();
+ QString line2 = getSettings()->value( "MainToolbar2", MAIN_TB2_DEFAULT )
+ .toString();
parseAndCreate( line2, controlLayout2 );
if( !b_advancedVisible && advControls ) advControls->hide();
controlLayout->setMargin( 0 );
controlLayout->setSpacing( 0 );
- /* QString line = QString( "%1;%2;%3").arg( RECORD_BUTTON )
- .arg( SNAPSHOT_BUTTON )
- .arg( ATOB_BUTTON )
- .arg( FRAME_BUTTON ); */
-
- QString line = getSettings()->value( "MainWindow/AdvToolbar",
- "12;11;13;14" ).toString();
+ QString line = getSettings()->value( "AdvToolbar", ADV_TB_DEFAULT )
+ .toString();
parseAndCreate( line, controlLayout );
}
controlLayout->setMargin( 0 );
controlLayout->setSpacing( 0 );
- /* QString line = QString( "%1-%2;%3;%4-%2")
- .arg( SLOWER_BUTTON ).arg( WIDGET_FLAT )
- .arg( INPUT_SLIDER )
- .arg( FASTER_BUTTON ); */
- QString line = getSettings()->value( "MainWindow/InputToolbar",
- "5-1;33;6-1" ).toString();
+ QString line = getSettings()->value( "InputToolbar", INPT_TB_DEFAULT ).toString();
parseAndCreate( line, controlLayout );
}
/**********************************************************************
* Fullscrenn control widget
**********************************************************************/
-FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
- : AbstractController( _p_i )
+FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *_parent )
+ : AbstractController( _p_i, _parent )
{
i_mouse_last_x = -1;
i_mouse_last_y = -1;
setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
QVBoxLayout *controlLayout2 = new QVBoxLayout( this );
- controlLayout2->setLayoutMargins( 5, 2, 5, 2, 5 );
+ controlLayout2->setLayoutMargins( 4, 6, 4, 2, 5 );
/* First line */
InputControlsWidget *inputC = new InputControlsWidget( p_intf, this );
controlLayout2->addWidget( inputC );
- /* Second line */
-/* QString line = QString( "%1-2;%2;%3;%4;%5;%2;%6;%2;%7;%2;%8;%9;%10-4")
- .arg( PLAY_BUTTON )
- .arg( WIDGET_SPACER )
- .arg( PREVIOUS_BUTTON )
- .arg( STOP_BUTTON )
- .arg( NEXT_BUTTON )
- .arg( MENU_BUTTONS )
- .arg( TELETEXT_BUTTONS )
- .arg( DEFULLSCREEN_BUTTON )
- .arg( WIDGET_SPACER_EXTEND )
- .arg( TIME_LABEL )
- .arg( VOLUME ); */
-
controlLayout = new QHBoxLayout;
- QString line = getSettings()->value( "MainWindow/FSCtoolbar",
- "0-2;64;3;1;4;64;36;64;37;64;8;65;35-4;34" ).toString();
+ QString line = getSettings()->value( "MainWindow/FSCtoolbar", FSC_TB_DEFAULT ).toString();
parseAndCreate( line, controlLayout );
controlLayout2->addLayout( controlLayout );
CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
#endif
- adjustSize (); /* need to get real width and height for moving */
+ vlc_mutex_init_recursive( &lock );
-#ifdef WIN32TRICK
- setWindowOpacity( 0.0 );
- b_fscHidden = true;
- adjustSize();
- show();
-#endif
+ CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
+ this, setVoutList( vout_thread_t **, int ) );
- vlc_mutex_init_recursive( &lock );
+ /* First Move */
+ QPoint pos1 = getSettings()->value( "FullScreen/pos" ).toPoint();
+ int number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
+ if( QApplication::desktop()->screenGeometry( number ).contains( pos1, true ) )
+ {
+ move( pos1 );
+ i_screennumber = number;
+ screenRes = QApplication::desktop()->screenGeometry(number);
+ }
+ else
+ {
+ centerFSC( number );
+ }
- CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ), this, setVoutList( vout_thread_t **, int ) );
}
FullscreenControllerWidget::~FullscreenControllerWidget()
vlc_mutex_destroy( &lock );
}
+void FullscreenControllerWidget::centerFSC( int number )
+{
+ screenRes = QApplication::desktop()->screenGeometry(number);
+
+ /* screen has changed, calculate new position */
+ QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (sizeHint().width() / 2),
+ screenRes.y() + screenRes.height() - sizeHint().height());
+ move( pos );
+
+ i_screennumber = number;
+}
+
/**
* Show fullscreen controller
*/
void FullscreenControllerWidget::showFSC()
{
adjustSize();
- /* center down */
+
int number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
- if( number != i_screennumber )
- {
- msg_Dbg( p_intf, "Calculation fullscreen controllers center");
- /* screen has changed, calculate new position */
- QRect screenRes = QApplication::desktop()->screenGeometry(number);
- QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (width() / 2),
- screenRes.y() + screenRes.height() - height());
- move( pos );
- i_screennumber = number;
- }
-#ifdef WIN32TRICK
- // after quiting and going to fs, we need to call show()
- if( isHidden() )
- show();
- if( b_fscHidden )
+
+ if( number != i_screennumber ||
+ screenRes != QApplication::desktop()->screenGeometry(number) )
{
- b_fscHidden = false;
- setWindowOpacity( 1.0 );
+ centerFSC( number );
+ msg_Dbg( p_intf, "Recentering the Fullscreen Controller" );
}
-#else
- show();
-#endif
#if HAVE_TRANSPARENCY
setWindowOpacity( DEFAULT_OPACITY );
#endif
-}
-/**
- * Hide fullscreen controller
- * FIXME: under windows it have to be done by moving out of screen
- * because hide() doesnt work
- */
-void FullscreenControllerWidget::hideFSC()
-{
-#ifdef WIN32TRICK
- b_fscHidden = true;
- setWindowOpacity( 0.0 ); // simulate hidding
-#else
- hide();
-#endif
+ show();
}
/**
}
else
{
-#ifdef WIN32TRICK
- if ( windowOpacity() > 0.0 && !b_fscHidden )
-#else
if ( windowOpacity() > 0.0 )
-#endif
{
/* we should use 0.01 because of 100 pieces ^^^
but than it cannt be done in time */
switch( event->type() )
{
+ /* This is used when the 'i' hotkey is used, to force quick toggle */
case FullscreenControlToggle_Type:
vlc_mutex_lock( &lock );
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
+
if( b_fs )
{
-#ifdef WIN32TRICK
- if( b_fscHidden )
-#else
if( isHidden() )
-#endif
{
p_hideTimer->stop();
showFSC();
hideFSC();
}
break;
+ /* Event called to Show the FSC on mouseChanged() */
case FullscreenControlShow_Type:
vlc_mutex_lock( &lock );
b_fs = b_fullscreen;
vlc_mutex_unlock( &lock );
-#ifdef WIN32TRICK
- if( b_fs && b_fscHidden )
-#else
- if( b_fs && !isVisible() )
-#endif
+ if( b_fs )
showFSC();
+
break;
- case FullscreenControlHide_Type:
- hideFSC();
- break;
+ /* Start the timer to hide later, called usually with above case */
case FullscreenControlPlanHide_Type:
if( !b_mouse_over ) // Only if the mouse is not over FSC
planHideFSC();
break;
+ /* Hide */
+ case FullscreenControlHide_Type:
+ hideFSC();
+ break;
default:
break;
}
*/
void FullscreenControllerWidget::mouseMoveEvent( QMouseEvent *event )
{
- if ( event->buttons() == Qt::LeftButton )
+ if( event->buttons() == Qt::LeftButton )
{
+ if( i_mouse_last_x == -1 || i_mouse_last_y == -1 )
+ return;
+
int i_moveX = event->globalX() - i_mouse_last_x;
int i_moveY = event->globalY() - i_mouse_last_y;
{
i_mouse_last_x = event->globalX();
i_mouse_last_y = event->globalY();
+ event->accept();
+}
+
+void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
+{
+ i_mouse_last_x = -1;
+ i_mouse_last_y = -1;
+ event->accept();
}
/**
p_hideTimer->stop();
#if HAVE_TRANSPARENCY
p_slowHideTimer->stop();
+ setWindowOpacity( DEFAULT_OPACITY );
#endif
event->accept();
}
fullscreenChanged( p_vout, false, 0 );
vout.removeAll( p_vout );
vlc_mutex_unlock( &lock );
+
+ vlc_object_release( VLC_OBJECT(p_vout) );
}
/* Vout to track */
foreach( vout_thread_t *p_vout, add )
{
- vlc_object_hold( (vlc_object_t*)p_vout );
+ vlc_object_hold( VLC_OBJECT(p_vout) );
vlc_mutex_lock( &lock );
vout.append( p_vout );
/* Force fs hidding */
IMEvent *eHide = new IMEvent( FullscreenControlHide_Type, 0 );
- QApplication::postEvent( this, static_cast<QEvent *>(eHide) );
+ QApplication::postEvent( this, eHide );
}
vlc_mutex_unlock( &lock );
}
+
/**
* Mouse change callback (show/hide the controller on mouse movement)
*/
{
/* Show event */
IMEvent *eShow = new IMEvent( FullscreenControlShow_Type, 0 );
- QApplication::postEvent( this, static_cast<QEvent *>(eShow) );
+ QApplication::postEvent( this, eShow );
/* Plan hide event */
IMEvent *eHide = new IMEvent( FullscreenControlPlanHide_Type, 0 );
- QApplication::postEvent( this, static_cast<QEvent *>(eHide) );
+ QApplication::postEvent( this, eHide );
}
}