Commit 2814beeb authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4: Preferences, Simple_Preferences. A bit more, but a lot of things are missing...

parent e60de0fe
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vlc_config_cat.h> #include <vlc_config_cat.h>
#include <assert.h> #include <assert.h>
//TODO Rename all advanced to hotkeys since they will be no advanced section
#include "pixmaps/advanced_50x50.xpm" #include "pixmaps/advanced_50x50.xpm"
#include "pixmaps/audio_50x50.xpm" #include "pixmaps/audio_50x50.xpm"
#include "pixmaps/input_and_codecs_50x50.xpm" #include "pixmaps/input_and_codecs_50x50.xpm"
...@@ -72,7 +73,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -72,7 +73,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
// ADD_CATEGORY( SPrefsPlaylist, qtr("Playlist"), playlist_50x50_xpm ); // ADD_CATEGORY( SPrefsPlaylist, qtr("Playlist"), playlist_50x50_xpm );
ADD_CATEGORY( SPrefsInterface, qtr("Interface"), interface_50x50_xpm ); ADD_CATEGORY( SPrefsInterface, qtr("Interface"), interface_50x50_xpm );
ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"), subtitles_50x50_xpm ); ADD_CATEGORY( SPrefsSubtitles, qtr("Subtitles"), subtitles_50x50_xpm );
ADD_CATEGORY( SPrefsAdvanced, qtr("Advanced"), advanced_50x50_xpm ); ADD_CATEGORY( SPrefsAdvanced, qtr("Hotkeys"), advanced_50x50_xpm );
setCurrentRow( SPrefsInterface ); setCurrentRow( SPrefsInterface );
} }
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QPushButton> #include <QPushButton>
#include <QCheckBox> #include <QCheckBox>
#include <QScrollArea>
#include <QLabel>
PrefsDialog *PrefsDialog::instance = NULL; PrefsDialog *PrefsDialog::instance = NULL;
PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
...@@ -42,6 +43,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -42,6 +43,7 @@ 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, 450 ); resize( 800, 450 );
setMaximumHeight (450);
tree_panel = new QWidget(0); tree_panel = new QWidget(0);
tree_panel_l = new QHBoxLayout; tree_panel_l = new QHBoxLayout;
...@@ -50,28 +52,48 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -50,28 +52,48 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
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" );
QHBoxLayout *tl = new QHBoxLayout(0); QHBoxLayout *types_l = new QHBoxLayout(0);
tl->setSpacing( 3 ); tl->setMargin( 3 ); types_l->setSpacing( 3 ); types_l->setMargin( 3 );
small = new QRadioButton( "Basic", types ); tl->addWidget( small ); small = new QRadioButton( "Basic", types ); types_l->addWidget( small );
all = new QRadioButton( "All", types ); tl->addWidget( all ); all = new QRadioButton( "All", types ); types_l->addWidget( all );
types->setLayout(tl); types->setLayout(types_l);
small->setChecked( true ); small->setChecked( true );
// Title Label
QLabel *panel_label = new QLabel;
QFont labelFont = QApplication::font( static_cast<QWidget*>(0) );
labelFont.setPointSize( labelFont.pointSize() + 4 );
labelFont.setBold( true );
panel_label->setFont( labelFont );
// Title <hr>
QFrame *title_line = new QFrame;
title_line->setFrameShape(QFrame::HLine);
title_line->setFrameShadow(QFrame::Sunken);
QScrollArea *scrollArea = new QScrollArea;
advanced_tree = NULL; advanced_tree = NULL;
simple_tree = NULL; simple_tree = NULL;
simple_panel = NULL; simple_panel = NULL;
advanced_panel = NULL; advanced_panel = NULL;
main_layout->addWidget( types, 0,0,1,1 ); main_layout->addWidget( tree_panel, 0, 0, 3, 1 );
main_layout->addWidget( tree_panel, 1,0,1,1 ); main_layout->addWidget( types, 3, 0, 1, 1 );
main_layout->addWidget( main_panel, 0, 1, 2, 1 );
main_layout->addWidget( panel_label, 0, 1, 1, 1 );
main_layout->addWidget( title_line, 1, 1, 1, 1 );
main_layout->addWidget( main_panel, 2, 1, 2, 1 );
main_layout->setColumnMinimumWidth( 0, 200 ); main_layout->setColumnMinimumWidth( 0, 200 );
main_layout->setColumnStretch( 0, 1 ); main_layout->setColumnStretch( 0, 1 );
main_layout->setColumnStretch( 1,3 ); main_layout->setColumnStretch( 1,3 );
main_layout->setRowStretch( 2, 4);
setSmall(); setSmall();
QPushButton *save, *cancel; QPushButton *save, *cancel;
...@@ -79,9 +101,10 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -79,9 +101,10 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
&save, _("Save"), &save, _("Save"),
&cancel, _("Cancel"), &cancel, _("Cancel"),
NULL, NULL ); NULL, NULL );
main_layout->addLayout( buttonsLayout, 2,0, 1 ,3 ); main_layout->addLayout( buttonsLayout, 4, 0, 1 ,3 );
setLayout( main_layout ); setLayout( main_layout );
BUTTONACT( save, save() ); BUTTONACT( save, save() );
BUTTONACT( cancel, cancel() ); BUTTONACT( cancel, cancel() );
BUTTONACT( small, setSmall() ); BUTTONACT( small, setSmall() );
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>418</width> <width>418</width>
<height>597</height> <height>533</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
...@@ -30,22 +30,6 @@ ...@@ -30,22 +30,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox_3" > <widget class="QGroupBox" name="groupBox_3" >
<property name="title" > <property name="title" >
...@@ -282,7 +266,6 @@ p, li { white-space: pre-wrap; } ...@@ -282,7 +266,6 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<includes/>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>
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