Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
bb89e917
Commit
bb89e917
authored
Oct 12, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: simplify previewWidgets creation.
Btw, you really shouldn't use C cast on QObjects
parent
b0b8f87c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
10 deletions
+39
-10
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+1
-2
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+4
-0
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+2
-8
modules/gui/qt4/ui/sprefs_interface.ui
modules/gui/qt4/ui/sprefs_interface.ui
+32
-0
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
bb89e917
...
@@ -200,8 +200,7 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
...
@@ -200,8 +200,7 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
/*******************************************************
/*******************************************************
* Simple widgets
* Simple widgets
*******************************************************/
*******************************************************/
InterfacePreviewWidget
::
InterfacePreviewWidget
InterfacePreviewWidget
::
InterfacePreviewWidget
(
QWidget
*
parent
)
:
QLabel
(
parent
)
(
QWidget
*
parent
)
:
QLabel
(
parent
,
0
)
{
{
setGeometry
(
0
,
0
,
128
,
100
);
setGeometry
(
0
,
0
,
128
,
100
);
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
bb89e917
...
@@ -64,6 +64,10 @@ class InterfacePreviewWidget : public QLabel
...
@@ -64,6 +64,10 @@ class InterfacePreviewWidget : public QLabel
public:
public:
InterfacePreviewWidget
(
QWidget
*
);
InterfacePreviewWidget
(
QWidget
*
);
public
slots
:
public
slots
:
/* 0: sample_classic, aka VLC 0.8.6
1: sample_complete, aka MPC
2: sample_minimal, aka WMP12 minimal
3: sample_skins */
void
setPreview
(
int
);
void
setPreview
(
int
);
};
};
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
bb89e917
...
@@ -542,15 +542,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -542,15 +542,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui
.
native_zone
->
setEnabled
(
ui
.
qt4
->
isChecked
()
);
ui
.
native_zone
->
setEnabled
(
ui
.
qt4
->
isChecked
()
);
CONNECT
(
ui
.
qt4
,
toggled
(
bool
),
ui
.
native_zone
,
setEnabled
(
bool
)
);
CONNECT
(
ui
.
qt4
,
toggled
(
bool
),
ui
.
native_zone
,
setEnabled
(
bool
)
);
InterfacePreviewWidget
*
preview
=
new
InterfacePreviewWidget
(
this
);
(
(
QGridLayout
*
)
ui
.
LooknfeelBox
->
layout
()
)
->
addWidget
(
preview
,
1
,
0
,
1
,
2
);
CONNECT
(
ui
.
displayModeBox
,
currentIndexChanged
(
int
),
CONNECT
(
ui
.
displayModeBox
,
currentIndexChanged
(
int
),
preview
,
setPreview
(
int
)
);
ui
.
mainPreview
,
setPreview
(
int
)
);
InterfacePreviewWidget
*
skinspreview
=
new
InterfacePreviewWidget
(
this
);
ui
.
skinsPreview
->
setPreview
(
3
);
/* skins_preview resource index */
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
,
CONFIG_GENERIC
(
"qt-display-mode"
,
IntegerList
,
ui
.
displayLabel
,
displayModeBox
);
displayModeBox
);
...
...
modules/gui/qt4/ui/sprefs_interface.ui
View file @
bb89e917
...
@@ -61,6 +61,9 @@
...
@@ -61,6 +61,9 @@
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Album art download policy:
</string>
<string>
Album art download policy:
</string>
</property>
</property>
<property
name=
"buddy"
>
<cstring>
artFetcher
</cstring>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"0"
column=
"2"
colspan=
"2"
>
<item
row=
"0"
column=
"2"
colspan=
"2"
>
...
@@ -126,6 +129,9 @@
...
@@ -126,6 +129,9 @@
<property
name=
"margin"
>
<property
name=
"margin"
>
<number>
5
</number>
<number>
5
</number>
</property>
</property>
<property
name=
"buddy"
>
<cstring>
recentlyPlayedFilters
</cstring>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"2"
column=
"2"
colspan=
"2"
>
<item
row=
"2"
column=
"2"
colspan=
"2"
>
...
@@ -164,6 +170,9 @@
...
@@ -164,6 +170,9 @@
<property
name=
"alignment"
>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
</set>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
</set>
</property>
</property>
<property
name=
"buddy"
>
<cstring>
language
</cstring>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
...
@@ -392,6 +401,9 @@
...
@@ -392,6 +401,9 @@
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Force window style:
</string>
<string>
Force window style:
</string>
</property>
</property>
<property
name=
"buddy"
>
<cstring>
stylesCombo
</cstring>
</property>
</widget>
</widget>
</item>
</item>
</layout>
</layout>
...
@@ -410,11 +422,31 @@
...
@@ -410,11 +422,31 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"InterfacePreviewWidget"
name=
"mainPreview"
>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
<property
name=
"buddy"
>
<cstring>
displayModeBox
</cstring>
</property>
</widget>
</item>
<item
row=
"7"
column=
"0"
colspan=
"2"
>
<widget
class=
"InterfacePreviewWidget"
name=
"skinsPreview"
/>
</item>
</layout>
</layout>
</widget>
</widget>
</item>
</item>
</layout>
</layout>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>
InterfacePreviewWidget
</class>
<extends>
QLabel
</extends>
<header>
components/preferences_widgets.hpp
</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstops>
<tabstop>
OneInterfaceMode
</tabstop>
<tabstop>
OneInterfaceMode
</tabstop>
<tabstop>
artFetcher
</tabstop>
<tabstop>
artFetcher
</tabstop>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment