Also the soundSlider takes it first value from the preferences...
volMuteLabel->installEventFilter( hVolLabel );
controlLayout->addWidget( volMuteLabel, 3, 15 );
- volumeSlider = new SoundSlider( this );
+ volumeSlider = new SoundSlider( this, config_GetInt( p_intf, "qt-volume-complete" ) );
volumeSlider->setMaximumSize( QSize( 200, 40 ) );
volumeSlider->setMinimumSize( QSize( 80, 20 ) );
- controlLayout->addWidget( volumeSlider, 3, 16, 1, 2 );
- volumeSlider->setMaximum( VOLUME_MAX );
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) );
/* Volume control connection */
CONNECT( volumeSlider, valueChanged( int ), this, updateVolume( int ) );
#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.")
vlc_module_begin();
set_shortname( (char *)"Qt" );
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_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
#define SOUNDMAX 200 // % OR 400 ?
#define SOUNDSTEP 5 // %
-SoundSlider::SoundSlider( QWidget *_parent ) : QAbstractSlider( _parent )
+SoundSlider::SoundSlider( QWidget *_parent, bool b_hard ) : QAbstractSlider( _parent )
{
padding = 5;
- setRange( SOUNDMIN, SOUNDMAX );
+ setRange( SOUNDMIN, b_hard ? (2 * SOUNDMAX) : SOUNDMAX );
pixGradient = QPixmap( QSize( WLENGTH, WHEIGHT ) );
// QBixmap mask = QBitmap( QPixmap );
{
Q_OBJECT
public:
- SoundSlider( QWidget *_parent );
+ SoundSlider( QWidget *_parent, bool b_softamp );
virtual ~SoundSlider() {};
protected:
int padding;