MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
{
/* Variables initialisation */
- // need_components_update = false;
bgWidget = NULL;
videoWidget = NULL;
playlistWidget = NULL;
controls = NULL;
inputC = NULL;
- b_hideAfterCreation = false;
+ b_hideAfterCreation = false; // --qt-start-minimized
playlistVisible = false; // FIXME remove
input_name = "";
-
i_bg_height = 0;
+
/* Ask for Privacy */
FirstRun::CheckAndRun( this, p_intf );
setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
/* Set The Video In emebedded Mode or not */
- videoEmbeddedFlag = var_InheritBool( p_intf, "embedded-video" );
+ b_videoEmbedded = var_InheritBool( p_intf, "embedded-video" );
/* Does the interface resize to video size or the opposite */
b_keep_size = !var_InheritBool( p_intf, "qt-video-autoresize" );
i_visualmode = var_InheritInteger( p_intf, "qt-display-mode" );
/* Do we want anoying popups or not */
- notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
+ b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
/* Set the other interface settings */
settings = getSettings();
settings->setValue( "mainBasedSize", mainBasedSize );
settings->setValue( "mainVideoSize", mainVideoSize );
- if( bgWidget )
- settings->setValue( "backgroundSize", bgWidget->size() );
+ settings->setValue( "backgroundSize", bgWidget->size() );
/* Save this size */
QVLCTools::saveWidgetPosition(settings, this);
*****************************/
void MainInterface::recreateToolbars()
{
+ // FIXME: do the same for the FSC
//msg_Dbg( p_intf, "Recreating the toolbars" );
settings->beginGroup( "MainWindow" );
delete controls;
/* And video Outputs */
- if( videoEmbeddedFlag )
+ if( b_videoEmbedded )
{
videoWidget = new VideoWidget( p_intf );
stackCentralW->insertWidget( VIDEO_TAB, videoWidget );
{
#ifdef DEBUG_INTF
msg_Dbg( p_intf, "Stack Size: %i - %i", stackCentralW->size().height(), size().width() );
- if( videoEmbeddedFlag )
+ if( b_videoEmbedded )
msg_Dbg( p_intf, "Stack Size: %i - %i",
stackCentralW->widget( VIDEO_TAB )->size().height(),
stackCentralW->widget( VIDEO_TAB )->size().width() );
QVLCMenu::PopupMenu( p_intf, false );
}
-void MainInterface::toggleFSC()
-{
- if( !fullscreenControls ) return;
-
- IMEvent *eShow = new IMEvent( FullscreenControlToggle_Type, 0 );
- QApplication::postEvent( fullscreenControls, eShow );
-}
-
void MainInterface::popupMenu( const QPoint &p )
{
- /* Ow, that's ugly: don't show the popup menu if cursor over
+ /* FIXME
+ * Ow, that's ugly: don't show the popup menu if cursor over
* the main menu bar or the status bar */
if( !childAt( p ) || ( ( childAt( p ) != menuBar() )
&& ( childAt( p )->parentWidget() != statusBar() ) ) )
QVLCMenu::PopupMenu( p_intf, true );
}
+void MainInterface::toggleFSC()
+{
+ if( !fullscreenControls ) return;
+
+ IMEvent *eShow = new IMEvent( FullscreenControlToggle_Type, 0 );
+ QApplication::postEvent( fullscreenControls, eShow );
+}
+
/****************************************************************************
* Video Handling
****************************************************************************/
/**
* NOTE:
- * You must note change the state of this object or other Qt4 UI objects,
+ * You must not change the state of this object or other Qt4 UI objects,
* from the video output thread - only from the Qt4 UI main loop thread.
* All window provider queries must be handled through signals or events.
* That's why we have all those emit statements...
else
{
sysTray->setToolTip( name );
- if( notificationEnabled && ( isHidden() || isMinimized() ) )
+ if( b_notificationEnabled && ( isHidden() || isMinimized() ) )
{
sysTray->showMessage( qtr( "VLC media player" ), name,
QSystemTrayIcon::NoIcon, 3000 );
protected:
void dropEventPlay( QDropEvent *, bool);
#ifdef WIN32
- bool winEvent( MSG *, long * );
+ virtual bool winEvent( MSG *, long * );
#endif
virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void resizeEvent( QResizeEvent * event );
private:
+ /* Main Widgets Creation */
void createMainWidget( QSettings* );
void createStatusBar();
void createPlaylist();
/* Systray */
- void handleSystray();
void createSystray();
+ void handleSystray();
void initSystray();
+ /* Mess about stackWidget */
void showTab( int i_tab );
void restoreStackOldWidget();
void showVideo() { showTab( VIDEO_TAB ); }
void showBg() { showTab( BACKG_TAB ); }
void hideStackWidget() { showTab( HIDDEN_TAB ); }
+ /* */
QSettings *settings;
#ifndef HAVE_MAEMO
QSystemTrayIcon *sysTray;
InputControlsWidget *inputC;
FullscreenControllerWidget *fullscreenControls;
QStackedWidget *stackCentralW;
+
/* Video */
VideoWidget *videoWidget;
};
int stackCentralOldState;
-// bool videoIsActive; ///< Having a video now / THEMIM->hasV
- bool videoEmbeddedFlag; ///< Want an external Video Window
+ /* Flags */
+ bool b_notificationEnabled; /// Systray Notifications
+ bool b_keep_size; ///< persistent resizeable window
+ bool b_videoEmbedded; ///< Want an external Video Window
+ bool b_hideAfterCreation;
+ int i_visualmode; ///< Visual Mode
+
+ /* States */
bool playlistVisible; ///< Is the playlist visible ?
- bool visualSelectorEnabled;
- bool notificationEnabled; /// Systray Notifications
+// bool videoIsActive; ///< Having a video now / THEMIM->hasV
+// bool b_visualSelectorEnabled;
+ bool b_plDocked; ///< Is the playlist docked ?
- bool b_keep_size; ///< persistent resizeable window
QSize mainBasedSize; ///< based Wnd (normal mode only)
QSize mainVideoSize; ///< Wnd with video (all modes)
- int i_visualmode; ///< Visual Mode
- bool b_plDocked;
int i_bg_height; ///< Save height of bgWidget
- bool b_hideAfterCreation;
#ifdef WIN32
HIMAGELIST himl;