#include <QVBoxLayout>
#include <QScrollArea>
+#include <QStyleFactory>
+#include <QSettings>
#include <QtAlgorithms>
-#include <string>
-
#define ICON_HEIGHT 64
#ifdef WIN32
-#include "vistaassoc.h"
+# include <vlc_windows_interfaces.h>
#endif
/*********************************************************************
ui.hwYUVBox->setVisible( false );
#endif
- CONFIG_GENERIC( "deinterlace-mode", StringList, ui.deinterLabel, deinterlaceBox );
+ CONFIG_GENERIC( "deinterlace", StringList, ui.deinterLabel, deinterlaceBox );
CONFIG_GENERIC( "aspect-ratio", String, ui.arLabel, arLine );
CONFIG_GENERIC_FILE( "snapshot-path", Directory, ui.dirLabel,
else
ui.lastfm->setChecked( false );
- ui.lastfm_zone->setEnabled( ui.lastfm->isChecked() );
+ ui.lastfm_zone->setVisible( ui.lastfm->isChecked() );
CONNECT( ui.lastfm, toggled( bool ),
- ui.lastfm_zone, setEnabled( bool ) );
+ ui.lastfm_zone, setVisible( bool ) );
CONNECT( ui.lastfm, stateChanged( int ),
this, lastfm_Changed( int ) );
}
free( psz_dvddiscpath );
free( psz_vcddiscpath );
}
+ CONFIG_GENERIC_FILE( "dvd", File, ui.DVDLabel,
+ ui.DVDDevice, ui.DVDBrowse );
CONFIG_GENERIC_FILE( "input-record-path", Directory, ui.recordLabel,
ui.recordPath, ui.recordBrowse );
CONFIG_GENERIC_NO_BOOL( "ffmpeg-pp-q", Integer, ui.ppLabel,
PostProcLevel );
CONFIG_GENERIC( "avi-index", IntegerList, ui.aviLabel, AviRepair );
- CONFIG_GENERIC( "rtsp-tcp", Bool, NULL, RTSP_TCPBox );
+
+ /* live555 module prefs */
+ CONFIG_GENERIC( "rtsp-tcp", Bool, NULL,
+ live555TransportRTSP_TCPRadio );
+ if ( !module_exists( "live555" ) )
+ {
+ ui.live555TransportRTSP_TCPRadio->hide();
+ ui.live555TransportHTTPRadio->hide();
+ ui.live555TransportLabel->hide();
+ }
#ifdef WIN32
CONFIG_GENERIC( "prefer-system-codecs", Bool, NULL, systemCodecBox );
#else
ui.systemCodecBox->hide();
+ ui.systemCodecLabel->hide();
#endif
optionWidgets.append( ui.DVDDevice );
optionWidgets.append( ui.cachingCombo );
if (module_exists ("pvr"))
TestCaC( "pvr-caching" );
#endif
- TestCaCi( "rtsp-caching", 4 ); TestCaCi( "ftp-caching", 2 );
+ if (module_exists ("livedotcom"))
+ TestCaCi( "rtsp-caching", 4 );
+ TestCaCi( "ftp-caching", 2 );
TestCaCi( "http-caching", 4 );
if (module_exists ("access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 );
* Interface Panel *
*******************/
START_SPREFS_CAT( Interface, qtr("Interface Settings") );
- ui.defaultLabel->setFont( italicFont );
+// ui.defaultLabel->setFont( italicFont );
ui.skinsLabel->setText(
qtr( "This is VLC's skinnable interface. You can download other skins at" )
+ QString( " <a href=\"http://www.videolan.org/vlc/skins.php\">VLC skins website</a>." ) );
ui.languageBox->hide();
ui.assoBox->hide();
#endif
-
/* interface */
char *psz_intf = config_GetPsz( p_intf, "intf" );
if( psz_intf )
optionWidgets.append( ui.skins );
optionWidgets.append( ui.qt4 );
+#if !defined(NDEBUG) || !defined( WIN32)
+ ui.stylesCombo->addItem( qtr("System's default") );
+ ui.stylesCombo->addItems( QStyleFactory::keys() );
+ ui.stylesCombo->setCurrentIndex( ui.stylesCombo->findText(
+ getSettings()->value( "MainWindow/QtStyle", "" ).toString() ) );
+ ui.stylesCombo->insertSeparator( 1 );
+
+ CONNECT( ui.stylesCombo, currentIndexChanged( QString ), this, changeStyle( QString ) );
+ optionWidgets.append( ui.stylesCombo );
+#else
+ ui.stylesCombo->hide();
+ optionWidgets.append( NULL );
+#endif
ui.skins_zone->setEnabled( ui.skins->isChecked() );
CONNECT( ui.skins, toggled( bool ), ui.skins_zone, setEnabled( bool ) );
addWidget( preview, 1, 0, 1, 2 );
CONNECT( ui.displayModeBox, currentIndexChanged( int ),
preview, setPreview( int ) );
-
+ InterfacePreviewWidget *skinspreview = new InterfacePreviewWidget( this );
+ skinspreview->setPreview(3); /* skins_preview resource index */
+ ( (QGridLayout *) ui.LooknfeelBox->layout() )->
+ addWidget( skinspreview, 7, 0, 1, 2 );
+
CONFIG_GENERIC( "qt-display-mode", IntegerList, ui.displayLabel,
displayModeBox );
CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo );
CONFIG_GENERIC( "qt-updates-notif", Bool, NULL, updatesBox );
CONFIG_GENERIC_NO_BOOL( "qt-updates-days", Integer, NULL,
updatesDays );
- ui.updatenotifier_zone->setEnabled( ui.updatesBox->isChecked() );
+ ui.updatesDays->setEnabled( ui.updatesBox->isChecked() );
CONNECT( ui.updatesBox, toggled( bool ),
- ui.updatenotifier_zone, setEnabled( bool ) );
+ ui.updatesDays, setEnabled( bool ) );
#else
ui.updatesBox->hide();
- ui.updatenotifier_zone->hide();
+ ui.updatesDays->hide();
#endif
/* ONE INSTANCE options */
#if defined( WIN32 ) || defined( HAVE_DBUS ) || defined(__APPLE__)
encoding );
CONFIG_GENERIC( "sub-language", String, ui.subLangLabel,
preferredLanguage );
- CONFIG_GENERIC_FILE( "freetype-font", File, ui.fontLabel, ui.font,
- ui.fontBrowse );
+ CONFIG_GENERIC_NO_BOOL( "freetype-font", Font, ui.fontLabel, font );
CONFIG_GENERIC( "freetype-color", IntegerList, ui.fontColorLabel,
fontColor );
CONFIG_GENERIC( "freetype-rel-fontsize", IntegerList,
case SPrefsInputAndCodecs:
{
/* Device default selection */
- const char *psz_devicepath =
- qtu( qobject_cast<QLineEdit *>(optionWidgets[inputLE] )->text() );
+ char *psz_devicepath =
+ strdup( qtu( qobject_cast<QLineEdit *>(optionWidgets[inputLE] )->text() ) );
if( !EMPTY_STR( psz_devicepath ) )
{
config_PutPsz( p_intf, "dvd", psz_devicepath );
config_PutPsz( p_intf, "vcd", psz_devicepath );
config_PutPsz( p_intf, "cd-audio", psz_devicepath );
+ free( psz_devicepath );
}
#define CaCi( name, int ) config_PutInt( p_intf, name, int * i_comboValue )
config_PutPsz( p_intf, "intf", "skins2" );
if( qobject_cast<QRadioButton *>(optionWidgets[qtRB])->isChecked() )
config_PutPsz( p_intf, "intf", "qt" );
+ if( qobject_cast<QComboBox *>(optionWidgets[styleCB]) )
+ getSettings()->setValue( "MainWindow/QtStyle",
+ qobject_cast<QComboBox *>(optionWidgets[styleCB])->currentText() );
+
break;
}
config_RemoveIntf( VLC_OBJECT( p_intf ), "audioscrobbler" );
}
+void SPrefsPanel::changeStyle( QString s_style )
+{
+ QApplication::setStyle( s_style );
+
+ /* force refresh on all widgets */
+ QWidgetList widgets = QApplication::allWidgets();
+ QWidgetList::iterator it = widgets.begin();
+ while( it != widgets.end() ) {
+ (*it)->update();
+ it++;
+ };
+}
+
#ifdef WIN32
#include <QDialogButtonBox>
#include <QHeaderView>
#include "util/registry.hpp"
+#include <string>
bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
QTreeWidgetItem* parent, QVLCRegistry *qvReg )