layout->addWidget( prevButton );
layout->addWidget( nextButton );
- layout->addItem( new QSpacerItem( 40,20,
- QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ layout->addStretch( 10 );
layout->addWidget( new QLabel( qtr( "Current visualization" ) ) );
current = new QLabel( qtr( "None" ) );
bool b_fsCreation) :
QFrame( _p_mi ), p_intf( _p_i )
{
- controlLayout = new QGridLayout( );
-
- controlLayout->setSpacing( 0 );
- controlLayout->setLayoutMargins( 7, 5, 7, 3, 6 );
-
- if( !b_fsCreation )
- setLayout( controlLayout );
-
setSizePolicy( QSizePolicy::Preferred , QSizePolicy::Maximum );
/** The main Slider **/
slider = new InputSlider( Qt::Horizontal, NULL );
- controlLayout->addWidget( slider, 0, 1, 1, 16 );
/* Update the position when the IM has changed */
CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
slider, setPosition( float, int, int ) );
slowerButton->setMaximumSize( QSize( 26, 20 ) );
BUTTON_SET_ACT( slowerButton, "-", qtr( "Slower" ), slower() );
- controlLayout->addWidget( slowerButton, 0, 0 );
fasterButton = new QToolButton;
fasterButton->setAutoRaise( true );
fasterButton->setMaximumSize( QSize( 26, 20 ) );
BUTTON_SET_ACT( fasterButton, "+", qtr( "Faster" ), faster() );
- controlLayout->addWidget( fasterButton, 0, 17 );
/* advanced Controls handling */
b_advancedVisible = b_advControls;
advControls = new AdvControlsWidget( p_intf );
- controlLayout->addWidget( advControls, 1, 3, 2, 4, Qt::AlignBottom );
if( !b_advancedVisible ) advControls->hide();
/** Disc and Menus handling */
setupSmallButton( nextSectionButton );
discLayout->addWidget( nextSectionButton );
- controlLayout->addWidget( discFrame, 1, 10, 2, 3, Qt::AlignBottom );
-
BUTTON_SET_IMG( prevSectionButton, "", previous.png, "" );
BUTTON_SET_IMG( nextSectionButton, "", next.png, "" );
BUTTON_SET_IMG( menuButton, "", previous.png, qtr( "Menu" ) );
telexPage->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
telexLayout->addWidget( telexPage );
- if( !b_fsCreation )
- controlLayout->addWidget( telexFrame, 1, 10, 2, 4, Qt::AlignBottom );
telexFrame->hide(); /* default hidden */
CONNECT( telexPage, valueChanged( int ), THEMIM->getIM(),
playButton->setMinimumSize( QSize( 36, 36 ) );
playButton->setIconSize( QSize( 30, 30 ) );
- controlLayout->addWidget( playButton, 2, 0, 2, 2 );
-
- controlLayout->setColumnMinimumWidth( 2, 20 );
- controlLayout->setColumnStretch( 2, 0 );
/** Prev + Stop + Next Block **/
controlButLayout = new QHBoxLayout;
controlButLayout->addWidget( nextButton );
/* Add this block to the main layout */
- if( !b_fsCreation )
- controlLayout->addLayout( controlButLayout, 3, 3, 1, 3 );
BUTTON_SET_ACT_I( playButton, "", play.png, qtr( "Play" ), play() );
BUTTON_SET_ACT_I( prevButton, "" , previous.png,
BUTTON_SET_ACT_I( nextButton, "", next.png, qtr( "Next" ), next() );
BUTTON_SET_ACT_I( stopButton, "", stop.png, qtr( "Stop" ), stop() );
- controlLayout->setColumnMinimumWidth( 7, 20 );
- controlLayout->setColumnStretch( 7, 0 );
- controlLayout->setColumnStretch( 8, 0 );
- controlLayout->setColumnStretch( 9, 0 );
-
/*
* Other first Line buttons
*/
fullscreenButton = new QPushButton( "F" );
BUTTON_SET_ACT( fullscreenButton, "F", qtr( "Fullscreen" ), fullscreen() );
setupSmallButton( fullscreenButton );
- controlLayout->addWidget( fullscreenButton, 3, 10, Qt::AlignBottom );
-
- /** Playlist Button **/
- playlistButton = new QPushButton;
- setupSmallButton( playlistButton );
- controlLayout->addWidget( playlistButton, 3, 11, Qt::AlignBottom );
- BUTTON_SET_IMG( playlistButton, "" , playlist.png, qtr( "Show playlist" ) );
- CONNECT( playlistButton, clicked(), _p_mi, togglePlaylist() );
-
- /** extended Settings **/
- extSettingsButton = new QPushButton;
- BUTTON_SET_ACT( extSettingsButton, "Ex", qtr( "Extended settings" ),
- extSettings() );
- setupSmallButton( extSettingsButton );
- controlLayout->addWidget( extSettingsButton, 3, 12, Qt::AlignBottom );
-
- controlLayout->setColumnStretch( 13, 0 );
- controlLayout->setColumnMinimumWidth( 13, 24 );
- controlLayout->setColumnStretch( 14, 5 );
+
+ if( !b_fsCreation )
+ {
+ /** Playlist Button **/
+ playlistButton = new QPushButton;
+ setupSmallButton( playlistButton );
+ BUTTON_SET_IMG( playlistButton, "" , playlist.png, qtr( "Show playlist" ) );
+ CONNECT( playlistButton, clicked(), _p_mi, togglePlaylist() );
+
+ /** extended Settings **/
+ extSettingsButton = new QPushButton;
+ BUTTON_SET_ACT( extSettingsButton, "Ex", qtr( "Extended settings" ),
+ extSettings() );
+ setupSmallButton( extSettingsButton );
+ }
/* Volume */
hVolLabel = new VolumeClickHandler( p_intf, this );
volMuteLabel->setPixmap( QPixmap( ":/pixmaps/volume-medium.png" ) );
volMuteLabel->setToolTip( qtr( "Mute" ) );
volMuteLabel->installEventFilter( hVolLabel );
- controlLayout->addWidget( volMuteLabel, 3, 15, Qt::AlignBottom );
if( b_shiny )
{
volumeSlider->setMaximumSize( QSize( 200, 40 ) );
volumeSlider->setMinimumSize( QSize( 106, 30 ) );
volumeSlider->setFocusPolicy( Qt::NoFocus );
- controlLayout->addWidget( volumeSlider, 2, 16, 2 , 2, Qt::AlignBottom );
/* Set the volume from the config */
volumeSlider->setValue( ( config_GetInt( p_intf, "volume" ) ) *
CONNECT( volumeSlider, valueChanged( int ), this, updateVolume( int ) );
CONNECT( THEMIM, volumeChanged( void ), this, updateVolume( void ) );
+ if( !b_fsCreation )
+ {
+ controlLayout = new QGridLayout( this );
+
+ controlLayout->setSpacing( 0 );
+ controlLayout->setLayoutMargins( 7, 5, 7, 3, 6 );
+
+ controlLayout->addWidget( slider, 0, 1, 1, 16 );
+ controlLayout->addWidget( slowerButton, 0, 0 );
+ controlLayout->addWidget( fasterButton, 0, 17 );
+
+ controlLayout->addWidget( advControls, 1, 3, 2, 4, Qt::AlignBottom );
+ controlLayout->addWidget( discFrame, 1, 10, 2, 3, Qt::AlignBottom );
+ controlLayout->addWidget( telexFrame, 1, 10, 2, 4, Qt::AlignBottom );
+
+ controlLayout->addWidget( playButton, 2, 0, 2, 2 );
+ controlLayout->setColumnMinimumWidth( 2, 20 );
+ controlLayout->setColumnStretch( 2, 0 );
+
+ controlLayout->addLayout( controlButLayout, 3, 3, 1, 3 );
+ controlLayout->setColumnMinimumWidth( 7, 20 );
+ controlLayout->setColumnStretch( 7, 0 );
+ controlLayout->setColumnStretch( 8, 0 );
+ controlLayout->setColumnStretch( 9, 0 );
+
+ controlLayout->addWidget( fullscreenButton, 3, 10, Qt::AlignBottom );
+ controlLayout->addWidget( playlistButton, 3, 11, Qt::AlignBottom );
+ controlLayout->addWidget( extSettingsButton, 3, 12, Qt::AlignBottom );
+
+ controlLayout->setColumnStretch( 13, 0 );
+ controlLayout->setColumnMinimumWidth( 13, 24 );
+ controlLayout->setColumnStretch( 14, 5 );
+
+ controlLayout->addWidget( volMuteLabel, 3, 15, Qt::AlignBottom );
+ controlLayout->addWidget( volumeSlider, 2, 16, 2 , 2, Qt::AlignBottom );
+ }
+
updateInput();
}
b_telexEnabled = true;
}
}
+
void ControlsWidget::enableTeletext( bool b_enable )
{
telexFrame->setVisible( b_enable );
setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
QGridLayout *fsLayout = new QGridLayout( this );
- controlLayout->setSpacing( 0 );
- controlLayout->setLayoutMargins( 5, 1, 5, 1, 5 );
+ fsLayout->setLayoutMargins( 5, 1, 5, 1, 5 );
fsLayout->addWidget( slowerButton, 0, 0 );
slider->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum);