Commit 4b4d1dc6 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4- SImple Prefs: Subtitles and TextTitles.

parent d3144118
...@@ -100,12 +100,25 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -100,12 +100,25 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
case SPrefs ## name: \ case SPrefs ## name: \
{ \ { \
Ui::SPrefs ## name ui; \ Ui::SPrefs ## name ui; \
ui.setupUi( this ); ui.setupUi( panel );
#define END_SPREFS_CAT \ #define END_SPREFS_CAT \
break; \ break; \
} }
QVBoxLayout *panel_layout = new QVBoxLayout();
QString head;
QWidget *panel = new QWidget();
// 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);
switch( number ) switch( number )
{ {
...@@ -165,6 +178,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -165,6 +178,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
START_SPREFS_CAT( Hotkeys ); START_SPREFS_CAT( Hotkeys );
END_SPREFS_CAT; END_SPREFS_CAT;
} }
panel_layout->addWidget(panel_label);
panel_layout->addWidget(title_line);
panel_layout->addWidget( panel );
this->setLayout(panel_layout);
} }
void SPrefsPanel::apply() void SPrefsPanel::apply()
......
...@@ -52,7 +52,6 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -52,7 +52,6 @@ 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 *types_l = new QHBoxLayout(0); QHBoxLayout *types_l = new QHBoxLayout(0);
...@@ -62,20 +61,6 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -62,20 +61,6 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
types->setLayout(types_l); 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;
...@@ -84,9 +69,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf ) ...@@ -84,9 +69,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
main_layout->addWidget( tree_panel, 0, 0, 3, 1 ); main_layout->addWidget( tree_panel, 0, 0, 3, 1 );
main_layout->addWidget( types, 3, 0, 1, 1 ); main_layout->addWidget( types, 3, 0, 1, 1 );
main_layout->addWidget( panel_label, 0, 1, 1, 1 ); main_layout->addWidget( main_panel, 0, 1, 4, 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 );
...@@ -186,6 +169,7 @@ void PrefsDialog::changeSimplePanel( QListWidgetItem *item ) ...@@ -186,6 +169,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"));
} }
void PrefsDialog::changePanel( QTreeWidgetItem *item ) void PrefsDialog::changePanel( QTreeWidgetItem *item )
......
...@@ -41,6 +41,7 @@ class QWidget; ...@@ -41,6 +41,7 @@ class QWidget;
class QCheckBox; class QCheckBox;
class QListWidget; class QListWidget;
class QListWidgetItem; class QListWidgetItem;
class QLabel;
class PrefsDialog : public QVLCFrame class PrefsDialog : public QVLCFrame
{ {
...@@ -74,6 +75,8 @@ private: ...@@ -74,6 +75,8 @@ private:
QGridLayout *main_layout; QGridLayout *main_layout;
// QLabel *panel_label;
static PrefsDialog *instance; static PrefsDialog *instance;
private slots: private slots:
void changePanel( QTreeWidgetItem *); void changePanel( QTreeWidgetItem *);
......
<ui version="4.0" > <ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>SPrefsSubtitles</class> <class>SPrefsSubtitles</class>
<widget class="QWidget" name="SPrefsSubtitles" > <widget class="QWidget" name="SPrefsSubtitles" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>548</width> <width>427</width>
<height>306</height> <height>359</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QVBoxLayout" >
<property name="margin" > <property name="margin" >
<number>9</number> <number>9</number>
</property> </property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<item row="2" column="0" colspan="2" > <item>
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>On Scrren Display</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="checkBox" >
<property name="text" >
<string>Enable OSD</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
<property name="tristate" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Subtitles languages</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Subtitles preferred language</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="encoding" />
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="preferredLanguage" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Default Encoding</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" > <widget class="QGroupBox" name="groupBox" >
<property name="title" > <property name="title" >
<string>Display Settings</string> <string>Display Settings</string>
...@@ -84,29 +144,8 @@ ...@@ -84,29 +144,8 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="1" >
<widget class="QComboBox" name="encoding" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Default Encoding</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Subtitles preferred language</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="preferredLanguage" />
</item>
</layout> </layout>
</widget> </widget>
<pixmapfunction></pixmapfunction>
<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