b_hideAfterCreation = false; // --qt-start-minimized
playlistVisible = false;
input_name = "";
- i_bg_height = 0;
/* Ask for Privacy */
this, handleKeyPress( QKeyEvent * ) );
}
- CONNECT( this, askUpdate(), this, doComponentsUpdate() );
CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() );
/** END of CONNECTS**/
controls = new ControlsWidget( p_intf, false, this ); /* FIXME */
CONNECT( controls, advancedControlsToggled( bool ),
- this, doComponentsUpdate() );
+ this, adaptGeometry() );
CONNECT( controls, sizeChanged(),
- this, doComponentsUpdate() );
+ this, adaptGeometry() );
inputC = new InputControlsWidget( p_intf, this );
controls = new ControlsWidget( p_intf,
settings->value( "adv-controls", false ).toBool(), this );
CONNECT( controls, advancedControlsToggled( bool ),
- this, doComponentsUpdate() );
+ this, adaptGeometry() );
CONNECT( controls, sizeChanged(),
- this, doComponentsUpdate() );
+ this, adaptGeometry() );
inputC = new InputControlsWidget( p_intf, this );
mainLayout->insertWidget( 2, inputC );
**********************************************************************/
/* This function is called:
- - toggling of minimal View
- - through askUpdate() by Vout thread request video and resize video (zoom)
- Advanced buttons toggled
+ - Toolbar geom changed
*/
-void MainInterface::doComponentsUpdate()
+void MainInterface::adaptGeometry()
{
-#if 0
- if( isFullScreen() || isMaximized() ) return;
-
-// msg_Warn( p_intf, "Updating the geometry" );
- /* Here we resize to sizeHint() and not adjustsize because we want
- the videoWidget to be exactly the correctSize */
+ resize( sizeHint() );
#ifdef DEBUG_INTF
debug();
-#endif
- /* This is WRONG, but I believe there is a Qt bug here */
- setMinimumSize( 0, 0 );
- //resize( sizeHint() );
-
- //adjustSize() ; /* This is not needed, but might help in the future */
#endif
}
}
}
-
-
/* Asynchronous call from the WindowClose function */
void MainInterface::releaseVideo( void )
{
- emit askReleaseVideo( );
+ emit askReleaseVideo();
}
/* Function that is CONNECTED to the previous emit */
void MainInterface::releaseVideoSlot( void )
{
- videoWidget->release( );
+ videoWidget->release();
restoreStackOldWidget();
/* We don't want to have a blank video to popup */
stackCentralOldWidget = bgWidget;
-
- /* Try to resize, except when you are in Fullscreen mode */
-// doComponentsUpdate();
}
/* Asynchronous call from WindowControl function */
}
}
- i_bg_height = stackCentralW->height();
-
menuBar()->setVisible( !b_switch );
controls->setVisible( !b_switch );
statusBar()->setVisible( !b_switch );
inputC->setVisible( !b_switch );
- doComponentsUpdate();
-
emit minimalViewToggled( b_switch );
}
/* toggling advanced controls buttons */
-void MainInterface::toggleAdvanced()
+void MainInterface::toggleAdvancedButtons()
{
controls->toggleAdvanced();
// if( fullscreenControls ) fullscreenControls->toggleAdvanced();
visualSelector->hide();
visualSelectorEnabled = false;
}
- doComponentsUpdate();
}
#endif
friend class PlaylistWidget;
public:
+ /* tors */
MainInterface( intf_thread_t *);
virtual ~MainInterface();
/* Video requests from core */
- WId getVideo( int *pi_x, int *pi_y,
+ WId getVideo( int *pi_x, int *pi_y,
unsigned int *pi_width, unsigned int *pi_height );
- void releaseVideo( void );
- int controlVideo( int i_query, va_list args );
+ void releaseVideo( void );
+ int controlVideo( int i_query, va_list args );
/* Getters */
#ifndef HAVE_MAEMO
int getControlsVisibilityStatus();
bool isPlDocked() { return ( b_plDocked != false ); }
- /* Sizehint() */
-// virtual QSize sizeHint() const;
-
protected:
void dropEventPlay( QDropEvent *, bool);
#ifdef WIN32
/* Systray */
void createSystray();
- void handleSystray();
void initSystray();
+ void handleSystray();
- /* Mess about stackWidget */
+ /* Central StackWidget Management */
void showTab( QWidget *);
void showVideo();
void showBg();
QSystemTrayIcon *sysTray;
QMenu *systrayMenu;
#endif
+
QString input_name;
QVBoxLayout *mainLayout;
ControlsWidget *controls;
QSize mainBasedSize; ///< based Wnd (normal mode only)
QSize mainVideoSize; ///< Wnd with video (all modes)
- int i_bg_height; ///< Save height of bgWidget
#ifdef WIN32
HIMAGELIST himl;
#ifndef HAVE_MAEMO
void toggleUpdateSystrayMenu();
#endif
- void toggleAdvanced();
+ void toggleAdvancedButtons();
void toggleFullScreen();
void toggleFSC();
+
void popupMenu( const QPoint& );
void changeThumbbarButtons( int );
void debug();
void destroyPopupMenu();
void recreateToolbars();
- void doComponentsUpdate();
+ void adaptGeometry();
void setName( const QString& );
void setVLCWindowsTitle( const QString& title = "" );
#if 0
void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int );
void askVideoSetFullScreen( bool );
- void askUpdate();
void minimalViewToggled( bool );
void fullscreenInterfaceToggled( bool );