Commit f509b90d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: deinline createStatusBar() and explicit statusBar creation.

No feature change.
parent 0ee99df5
...@@ -148,7 +148,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -148,7 +148,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled ); QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
/* StatusBar Creation */ /* StatusBar Creation */
createStatusBar(); setStatusBar( createStatusBar() );
/******************** /********************
* Input Manager * * Input Manager *
...@@ -311,8 +311,10 @@ MainInterface::~MainInterface() ...@@ -311,8 +311,10 @@ MainInterface::~MainInterface()
* Main UI handling * * Main UI handling *
*****************************/ *****************************/
inline void MainInterface::createStatusBar() QStatusBar * MainInterface::createStatusBar()
{ {
QStatusBar *statusBar = new QStatusBar;
/**************** /****************
* Status Bar * * Status Bar *
****************/ ****************/
...@@ -329,15 +331,16 @@ inline void MainInterface::createStatusBar() ...@@ -329,15 +331,16 @@ inline void MainInterface::createStatusBar()
nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel); nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
/* and adding those */ /* and adding those */
statusBar()->addWidget( nameLabel, 8 ); statusBar->addWidget( nameLabel, 8 );
statusBar()->addPermanentWidget( speedLabel, 0 ); statusBar->addPermanentWidget( speedLabel, 0 );
statusBar()->addPermanentWidget( timeLabel, 0 ); statusBar->addPermanentWidget( timeLabel, 0 );
/* timeLabel behaviour: /* timeLabel behaviour:
- double clicking opens the goto time dialog - double clicking opens the goto time dialog
- right-clicking and clicking just toggle between remaining and - right-clicking and clicking just toggle between remaining and
elapsed time.*/ elapsed time.*/
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() ); CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
return statusBar;
} }
inline void MainInterface::initSystray() inline void MainInterface::initSystray()
......
...@@ -49,6 +49,7 @@ class FullscreenControllerWidget; ...@@ -49,6 +49,7 @@ class FullscreenControllerWidget;
class SpeedControlWidget; class SpeedControlWidget;
class QMenu; class QMenu;
class QSize; class QSize;
class QStatusBar;
enum { enum {
CONTROLS_HIDDEN = 0x0, CONTROLS_HIDDEN = 0x0,
...@@ -117,7 +118,7 @@ private: ...@@ -117,7 +118,7 @@ private:
void createSystray(); void createSystray();
void initSystray(); void initSystray();
void createStatusBar(); QStatusBar * createStatusBar();
/* Video */ /* Video */
VideoWidget *videoWidget; VideoWidget *videoWidget;
......
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