+ /******************************
+ * VIDEO Panel Implementation *
+ ******************************/
+ START_SPREFS_CAT( Video , qtr("General video settings") );
+ CONFIG_GENERIC( "video", Bool, NULL, enableVideo );
+
+ CONFIG_GENERIC( "fullscreen", Bool, NULL, fullscreen );
+ CONFIG_GENERIC( "overlay", Bool, NULL, overlay );
+ CONFIG_GENERIC( "video-on-top", Bool, NULL, alwaysOnTop );
+ CONFIG_GENERIC( "video-deco", Bool, NULL, windowDecorations );
+ CONFIG_GENERIC( "skip-frames" , Bool, NULL, skipFrames );
+ CONFIG_GENERIC( "vout", Module, NULL, outputModule );
+
+#ifdef WIN32
+ CONFIG_GENERIC( "directx-wallpaper" , Bool , NULL, wallpaperMode );
+ CONFIG_GENERIC( "directx-device", StringList, NULL,
+ dXdisplayDevice );
+#else
+ ui.directXBox->setVisible( false );
+#endif
+
+ CONFIG_GENERIC_FILE( "snapshot-path", Directory, NULL,
+ snapshotsDirectory, snapshotsDirectoryBrowse );
+ CONFIG_GENERIC( "snapshot-prefix", String, NULL, snapshotsPrefix );
+ CONFIG_GENERIC( "snapshot-sequential", Bool, NULL,
+ snapshotsSequentialNumbering );
+ CONFIG_GENERIC( "snapshot-format", StringList, NULL,
+ snapshotsFormat );
+ END_SPREFS_CAT;
+
+ /******************************
+ * AUDIO Panel Implementation *
+ ******************************/
+ START_SPREFS_CAT( Audio, qtr("General audio settings") );
+
+ CONFIG_GENERIC( "audio", Bool, NULL, enableAudio );
+
+ /* hide if necessary */
+#ifdef WIN32
+ ui.OSSControl->hide();
+ ui.alsaControl->hide();
+#else
+ ui.DirectXControl->hide();
+#endif
+ ui.lastfm_user_edit->hide();
+ ui.lastfm_user_label->hide();
+ ui.lastfm_pass_edit->hide();
+ ui.lastfm_pass_label->hide();
+
+ /* General Audio Options */
+ CONFIG_GENERIC_NO_BOOL( "volume" , IntegerRangeSlider, NULL,
+ defaultVolume );
+ CONFIG_GENERIC( "audio-language" , String , NULL,
+ preferredAudioLanguage );
+
+ CONFIG_GENERIC( "spdif", Bool, NULL, spdifBox );
+ CONFIG_GENERIC( "force-dolby-surround" , IntegerList , NULL,
+ detectionDolby );
+
+ CONFIG_GENERIC( "headphone-dolby" , Bool , NULL, headphoneEffect );
+
+ CONFIG_GENERIC_NO_BOOL( "norm-max-level" , Float , NULL,
+ volNormSpin );
+ CONFIG_GENERIC( "audio-visual" , Module , NULL, visualisation);
+
+ /* Audio Output Specifics */
+ CONFIG_GENERIC( "aout", Module, NULL, outputModule );
+
+ CONNECT( ui.outputModule, currentIndexChanged( int ),
+ this, updateAudioOptions( int ) );
+
+#ifndef WIN32
+ if( module_Exists( p_intf, "alsa" ) )
+ {
+ CONFIG_GENERIC( "alsadev" , StringList , ui.alsaLabel,
+ alsaDevice );
+ }
+ if( module_Exists( p_intf, "oss" ) )
+ {
+ CONFIG_GENERIC_FILE( "dspdev" , File , ui.OSSLabel, OSSDevice,
+ OSSBrowse );
+ }
+#else
+ CONFIG_GENERIC( "directx-audio-device", IntegerList,
+ ui.DirectXLabel, DirectXDevice );
+#endif
+ // File exists everywhere
+ CONFIG_GENERIC_FILE( "audiofile-file" , File , ui.fileLabel,
+ fileName, fileBrowseButton );
+
+ optionWidgets.append( ui.alsaControl );
+ optionWidgets.append( ui.OSSControl );
+ optionWidgets.append( ui.DirectXControl );
+ optionWidgets.append( ui.fileControl );
+ optionWidgets.append( ui.outputModule );
+ optionWidgets.append( ui.volNormBox );
+ updateAudioOptions( ui.outputModule->currentIndex() );
+
+ /* LastFM */
+ if( module_Exists( p_intf, "audioscrobbler" ) )
+ {
+ CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label,
+ lastfm_user_edit );
+ CONFIG_GENERIC( "lastfm-password", String, ui.lastfm_pass_label,
+ lastfm_pass_edit );
+
+ if( config_ExistIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ) )
+ ui.lastfm->setChecked( true );
+ else
+ ui.lastfm->setChecked( false );
+ CONNECT( ui.lastfm, stateChanged( int ), this ,
+ lastfm_Changed( int ) );
+ }
+ else
+ ui.lastfm->hide();
+
+ /* Normalizer */
+
+ CONNECT( ui.volNormBox, toggled( bool ), ui.volNormSpin,
+ setEnabled( bool ) );
+ qs_filter = qfu( config_GetPsz( p_intf, "audio-filter" ) );
+ bool b_normalizer = ( qs_filter.contains( "volnorm" ) );
+ {
+ ui.volNormBox->setChecked( b_normalizer );
+ ui.volNormSpin->setEnabled( b_normalizer );
+ }