/*****************************
* DA Control Widget !
*****************************/
-ControlsWidget::ControlsWidget( intf_thread_t *_p_i, bool b_advControls ) :
+ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
+ bool b_advControls,
+ bool b_shiny ) :
QFrame( NULL ), p_intf( _p_i )
{
controlLayout = new QGridLayout( this );
volMuteLabel->installEventFilter( hVolLabel );
controlLayout->addWidget( volMuteLabel, 3, 15 );
- volumeSlider = new SoundSlider( this,
+ if( b_shiny )
+ {
+ volumeSlider = new SoundSlider( this,
config_GetInt( p_intf, "volume-step" ),
config_GetInt( p_intf, "qt-volume-complete" ) );
+ }
+ else
+ {
+ volumeSlider = new QSlider( this );
+ volumeSlider->setOrientation( Qt::Horizontal );
+ }
volumeSlider->setMaximumSize( QSize( 200, 40 ) );
volumeSlider->setMinimumSize( QSize( 80, 20 ) );
volumeSlider->setFocusPolicy( Qt::NoFocus );
controlLayout->addWidget( volumeSlider, 3, 16, 1, 2 );
/* Set the volume from the config */
- volumeSlider->setValue( (config_GetInt( p_intf, "volume" ) )* VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
+ volumeSlider->setValue( ( config_GetInt( p_intf, "volume" ) ) *
+ VOLUME_MAX / (AOUT_VOLUME_MAX/2) );
/* Volume control connection */
CONNECT( volumeSlider, valueChanged( int ), this, updateVolume( int ) );
class QGridLayout;
class VolumeClickHandler;
class SoundSlider;
+class QAbstractSlider;
class ControlsWidget : public QFrame
{
Q_OBJECT
public:
- ControlsWidget( intf_thread_t *, bool );
+ /* p_intf, advanced control visible or not, blingbling or not */
+ ControlsWidget( intf_thread_t *, bool, bool );
virtual ~ControlsWidget();
QPushButton *playlistButton;
- SoundSlider *volumeSlider;
void setStatus( int );
void enableInput( bool );
void enableVideo( bool );
QPushButton *slowerButton, *fasterButton;
AdvControlsWidget *advControls;
QLabel *volMuteLabel;
+ QAbstractSlider *volumeSlider;
bool b_advancedVisible;
private slots:
#define UPDATER_TEXT N_("Activate the new updates notification")
#define UPDATER_LONGTEXT N_("Activate the automatic notification of new " \
"versions of the software. It runs once a week." )
-
+
#define COMPLETEVOL_TEXT N_("Allow the volume to be set to 400%" )
#define COMPLETEVOL_LONGTEXT N_("Allow the volume to have range from 0% to " \
"400%, instead of 0% to 200%. This option " \
"can distort the audio, since it uses " \
"software amplification.")
+#define BLING_TEXT N_("Use non native buttons and volume slider")
+
vlc_module_begin();
set_shortname( (char *)"Qt" );
set_description( (char*)_("Qt interface") );
set_description( "Dialogs provider" );
set_capability( "dialogs provider", 51 );
+ add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
+ NOTIFICATION_LONGTEXT, VLC_FALSE );
+ add_float_with_range( "qt-opacity", 1., 0.1, 1., NULL, OPACITY_TEXT,
+ OPACITY_LONGTEXT, VLC_FALSE );
+
add_bool( "qt-always-video", VLC_FALSE, NULL, ALWAYS_VIDEO_TEXT,
ALWAYS_VIDEO_LONGTEXT, VLC_TRUE );
add_bool( "qt-system-tray", VLC_TRUE, NULL, SYSTRAY_TEXT,
add_bool( "qt-minimal-view", VLC_FALSE, NULL, MINIMAL_TEXT,
MINIMAL_TEXT, VLC_TRUE );
- add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT,
- COMPLETEVOL_LONGTEXT, VLC_TRUE);
add_bool( "qt-name-in-title", VLC_TRUE, NULL, TITLE_TEXT,
TITLE_LONGTEXT, VLC_FALSE );
+ add_bool( "qt-blingbling", VLC_TRUE, NULL, BLING_TEXT,
+ BLING_TEXT, VLC_FALSE );
+
+ add_bool( "qt-volume-complete", VLC_FALSE, NULL, COMPLETEVOL_TEXT,
+ COMPLETEVOL_LONGTEXT, VLC_TRUE);
add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
FILEDIALOG_PATH_TEXT, VLC_TRUE);
change_autosave();
change_internal();
- add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
- NOTIFICATION_LONGTEXT, VLC_FALSE );
- add_float_with_range( "qt-opacity", 1., 0.1, 1., NULL, OPACITY_TEXT,
- OPACITY_LONGTEXT, VLC_FALSE );
-
add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT,
ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
add_bool( "qt-advanced-pref", VLC_FALSE, NULL, ADVANCED_PREFS_TEXT,