[vlc-devel] commit: Qt: deinline createStatusBar() and explicit statusBar creation. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Feb 13 11:10:44 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb 13 11:10:09 2009 +0100| [f509b90d14a08b1fb6b4e6584c56e4ce5a6bb086] | committer: Jean-Baptiste Kempf
Qt: deinline createStatusBar() and explicit statusBar creation.
No feature change.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f509b90d14a08b1fb6b4e6584c56e4ce5a6bb086
---
modules/gui/qt4/main_interface.cpp | 13 ++++++++-----
modules/gui/qt4/main_interface.hpp | 3 ++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index eb5b7ed..e7dfb1e 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -148,7 +148,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
/* StatusBar Creation */
- createStatusBar();
+ setStatusBar( createStatusBar() );
/********************
* Input Manager *
@@ -311,8 +311,10 @@ MainInterface::~MainInterface()
* Main UI handling *
*****************************/
-inline void MainInterface::createStatusBar()
+QStatusBar * MainInterface::createStatusBar()
{
+ QStatusBar *statusBar = new QStatusBar;
+
/****************
* Status Bar *
****************/
@@ -329,15 +331,16 @@ inline void MainInterface::createStatusBar()
nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
/* and adding those */
- statusBar()->addWidget( nameLabel, 8 );
- statusBar()->addPermanentWidget( speedLabel, 0 );
- statusBar()->addPermanentWidget( timeLabel, 0 );
+ statusBar->addWidget( nameLabel, 8 );
+ statusBar->addPermanentWidget( speedLabel, 0 );
+ statusBar->addPermanentWidget( timeLabel, 0 );
/* timeLabel behaviour:
- double clicking opens the goto time dialog
- right-clicking and clicking just toggle between remaining and
elapsed time.*/
CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
+ return statusBar;
}
inline void MainInterface::initSystray()
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 95e0a78..8528171 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -49,6 +49,7 @@ class FullscreenControllerWidget;
class SpeedControlWidget;
class QMenu;
class QSize;
+class QStatusBar;
enum {
CONTROLS_HIDDEN = 0x0,
@@ -117,7 +118,7 @@ private:
void createSystray();
void initSystray();
- void createStatusBar();
+ QStatusBar * createStatusBar();
/* Video */
VideoWidget *videoWidget;
More information about the vlc-devel
mailing list