- /****************
- * Status Bar *
- ****************/
- /* Widgets Creation*/
- QStatusBar *statusBarr = statusBar();
-
- TimeLabel *timeLabel = new TimeLabel( p_intf );
- nameLabel = new QLabel( this );
- nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
- | Qt::TextSelectableByKeyboard );
- SpeedLabel *speedLabel = new SpeedLabel( p_intf, "1.00x", this );
-
- /* Styling those labels */
- timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
- speedLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );
- nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
-
- /* and adding those */
- statusBarr->addWidget( nameLabel, 8 );
- statusBarr->addPermanentWidget( speedLabel, 0 );
- statusBarr->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() );
-#if 0
- CONNECT( THEMIM->getIM(), encryptionChanged( bool ) , this, showCryptedLabel( bool ) );
-#endif
-}
-
-#if 0
-void MainInterface::showCryptedLabel( bool )
-{
- if( cryptedLabel == NULL )
- {
- cryptedLabel = new QLabel;
- cryptedLabel->setPixmap( QPixmap( ":/lock" ) );
- statusBar()->addWidget( cryptedLabel );
- }
-
- cryptedLabel->show();
-}
-#endif
-
-inline void MainInterface::initSystray()
-{
- bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
- bool b_systrayWanted = config_GetInt( p_intf, "qt-system-tray" );
-
- if( config_GetInt( p_intf, "qt-start-minimized") > 0 )
- {
- if( b_systrayAvailable )
- {
- b_systrayWanted = true;
- hide();
- }
- else
- msg_Err( p_intf, "cannot start minimized without system tray bar" );
- }
-
- if( b_systrayAvailable && b_systrayWanted )
- createSystray();
-}
+ settings->beginGroup( "MainWindow" );
+ delete controls;
+ delete inputC;
+ controls = new ControlsWidget( p_intf, false, this ); /* FIXME */
+ CONNECT( controls, advancedControlsToggled( bool ),
+ this, doComponentsUpdate() );
+ CONNECT( controls, sizeChanged(),
+ this, doComponentsUpdate() );
+ inputC = new InputControlsWidget( p_intf, this );