Commit ee16e6bf authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - SPrefs: New icons from Tombigel.

parent a58ffe92
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "ui/sprefs_hotkeys.h" #include "ui/sprefs_hotkeys.h"
#include "ui/sprefs_interface.h" #include "ui/sprefs_interface.h"
#define ITEM_HEIGHT 50 #define ITEM_HEIGHT 64
/********************************************************************* /*********************************************************************
* The List of categories * The List of categories
...@@ -56,25 +56,29 @@ ...@@ -56,25 +56,29 @@
SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
QListWidget( _parent ), p_intf( _p_intf ) QListWidget( _parent ), p_intf( _p_intf )
{ {
setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) ); setIconSize( QSize( ITEM_HEIGHT * 2 ,ITEM_HEIGHT ) );
setAlternatingRowColors( true );
setViewMode(QListView::IconMode); setViewMode(QListView::IconMode);
setMovement(QListView::Static);
setMaximumWidth(200); setMaximumWidth(200);
setSpacing(0);
#define ADD_CATEGORY( id, label, icon ) \ // setAlternatingRowColors( true );
addItem( label ); \
item( id )->setIcon( QIcon( QPixmap( icon ) ) ); \ #define ADD_CATEGORY( id, label, icon ) \
item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) ); \ addItem( label ); \
item( id )->setTextAlignment(Qt::AlignHCenter); \ item( id )->setIcon( QIcon( ":/pixmaps/" #icon ) ) ; \
item( id )->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); item( id )->setTextAlignment( Qt::AlignHCenter ); \
item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) ); \
ADD_CATEGORY( SPrefsVideo, qtr("Video"), video_50x50_xpm ); item( id )->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
ADD_CATEGORY( SPrefsAudio, qtr("Audio"), audio_50x50_xpm );
ADD_CATEGORY( SPrefsVideo, qtr("Video"), spref_cone_Video_64.png );
ADD_CATEGORY( SPrefsAudio, qtr("Audio"), spref_cone_Audio_64.png );
ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input and Codecs"), ADD_CATEGORY( SPrefsInputAndCodecs, qtr("Input and Codecs"),
input_and_codecs_50x50_xpm ); spref_cone_Input_64.png );
ADD_CATEGORY( SPrefsInterface, qtr("Interface"), interface_50x50_xpm ); ADD_CATEGORY( SPrefsInterface, qtr("Interface"),
ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"), subtitles_50x50_xpm ); spref_cone_Interface_64.png );
ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"), hotkeys_50x50_xpm ); ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"),
spref_cone_Subtitles_64.png );
ADD_CATEGORY( SPrefsHotkeys, qtr("Hotkeys"), spref_cone_Hotkeys_64.png );
setCurrentRow( SPrefsInterface ); setCurrentRow( SPrefsInterface );
} }
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
* $Id$ * $Id$
* *
* Authors: Clément Stenac <zorglub@videolan.org> * Authors: Clément Stenac <zorglub@videolan.org>
* * Jean-Baptiste Kempf <jb@videolan.org>
*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
...@@ -40,25 +41,27 @@ PrefsDialog *PrefsDialog::instance = NULL; ...@@ -40,25 +41,27 @@ PrefsDialog *PrefsDialog::instance = NULL;
PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{ {
QGridLayout *main_layout = new QGridLayout(this); QGridLayout *main_layout = new QGridLayout( this );
setWindowTitle( qtr( "Preferences" ) ); setWindowTitle( qtr( "Preferences" ) );
resize( 800, 600 ); resize( 800, 650 );
setMaximumHeight (600); setMaximumHeight( 650 );
setMaximumWidth( 800 );
tree_panel = new QWidget(0); tree_panel = new QWidget( 0 );
tree_panel_l = new QHBoxLayout; tree_panel_l = new QHBoxLayout;
tree_panel->setLayout( tree_panel_l ); tree_panel->setLayout( tree_panel_l );
main_panel = new QWidget(0); main_panel = new QWidget( 0 );
main_panel_l = new QHBoxLayout; main_panel_l = new QHBoxLayout;
main_panel->setLayout( main_panel_l ); main_panel->setLayout( main_panel_l );
// Choice for types // Choice for types
types = new QGroupBox( "Show settings" ); types = new QGroupBox( "Show settings" );
types->setAlignment( Qt::AlignHCenter );
QHBoxLayout *types_l = new QHBoxLayout(0); QHBoxLayout *types_l = new QHBoxLayout(0);
types_l->setSpacing( 3 ); types_l->setMargin( 3 ); types_l->setSpacing( 3 ); types_l->setMargin( 3 );
small = new QRadioButton( "Basic", types ); types_l->addWidget( small ); small = new QRadioButton( "Basic", types ); types_l->addWidget( small );
all = new QRadioButton( "All", types ); types_l->addWidget( all ); all = new QRadioButton( "All", types ); types_l->addWidget( all );
types->setLayout(types_l); types->setLayout( types_l );
small->setChecked( true ); small->setChecked( true );
advanced_tree = NULL; advanced_tree = NULL;
...@@ -71,7 +74,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -71,7 +74,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
main_layout->addWidget( main_panel, 0, 1, 4, 1 ); main_layout->addWidget( main_panel, 0, 1, 4, 1 );
main_layout->setColumnMinimumWidth( 0, 200 ); main_layout->setColumnMinimumWidth( 0, 150 );
main_layout->setColumnStretch( 0, 1 ); main_layout->setColumnStretch( 0, 1 );
main_layout->setColumnStretch( 1,3 ); main_layout->setColumnStretch( 1,3 );
...@@ -169,7 +172,7 @@ void PrefsDialog::changeSimplePanel( QListWidgetItem *item ) ...@@ -169,7 +172,7 @@ void PrefsDialog::changeSimplePanel( QListWidgetItem *item )
} }
main_panel_l->addWidget( simple_panel ); main_panel_l->addWidget( simple_panel );
simple_panel->show(); simple_panel->show();
// panel_label->setText(qtr("Test")); // panel_label->setText(qtr("Test")); //FIXME
} }
void PrefsDialog::changePanel( QTreeWidgetItem *item ) void PrefsDialog::changePanel( QTreeWidgetItem *item )
...@@ -209,7 +212,7 @@ void PrefsDialog::showModulePrefs( char *psz_module ) ...@@ -209,7 +212,7 @@ void PrefsDialog::showModulePrefs( char *psz_module )
i_module++ ) i_module++ )
{ {
QTreeWidgetItem *module_item = subcat_item->child( i_module ); QTreeWidgetItem *module_item = subcat_item->child( i_module );
PrefsItemData *mod_data = module_item->data(0, Qt::UserRole). PrefsItemData *mod_data = module_item->data( 0, Qt::UserRole ).
value<PrefsItemData *>(); value<PrefsItemData *>();
if( !strcmp( mod_data->psz_name, psz_module ) ) { if( !strcmp( mod_data->psz_name, psz_module ) ) {
advanced_tree->setCurrentItem( module_item ); advanced_tree->setCurrentItem( module_item );
......
...@@ -11,5 +11,11 @@ ...@@ -11,5 +11,11 @@
<file alias="vlc128.png">../../../share/vlc128x128.png</file> <file alias="vlc128.png">../../../share/vlc128x128.png</file>
<file alias="noart.png">pixmaps/noart.png</file> <file alias="noart.png">pixmaps/noart.png</file>
<file>pixmaps/playlist_icon.png</file> <file>pixmaps/playlist_icon.png</file>
<file>pixmaps/spref_cone_Audio_64.png</file>
<file>pixmaps/spref_cone_Video_64.png</file>
<file>pixmaps/spref_cone_Input_64.png</file>
<file>pixmaps/spref_cone_Hotkeys_64.png</file>
<file>pixmaps/spref_cone_Subtitles_64.png</file>
<file>pixmaps/spref_cone_Interface_64.png</file>
</qresource> </qresource>
</RCC> </RCC>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment