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
8071564e
Commit
8071564e
authored
Oct 23, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - initial actions support for StringListConfigs in preferences... To be tested a lot more...
parent
711de3fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+37
-1
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+4
-0
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
8071564e
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
#include <QFontDialog>
#include <QFontDialog>
#include <QGroupBox>
#include <QGroupBox>
#include <QTreeWidgetItem>
#include <QTreeWidgetItem>
#include <QSignalMapper>
QString
formatTooltip
(
const
QString
&
tooltip
)
QString
formatTooltip
(
const
QString
&
tooltip
)
{
{
QString
formatted
=
QString
formatted
=
...
@@ -364,6 +364,42 @@ StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
...
@@ -364,6 +364,42 @@ StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
l
->
addWidget
(
label
,
line
,
0
);
l
->
addWidget
(
label
,
line
,
0
);
l
->
addWidget
(
combo
,
line
,
1
,
Qt
::
AlignRight
);
l
->
addWidget
(
combo
,
line
,
1
,
Qt
::
AlignRight
);
}
}
if
(
p_item
->
i_action
)
{
QSignalMapper
*
signalMapper
=
new
QSignalMapper
(
this
);
/* Some stringLists like Capture listings have action associated */
for
(
int
i
=
0
;
i
<
p_item
->
i_action
;
i
++
)
{
QPushButton
*
button
=
new
QPushButton
(
qfu
(
p_item
->
ppsz_action_text
[
i
]
));
CONNECT
(
button
,
clicked
(),
signalMapper
,
map
()
);
signalMapper
->
setMapping
(
button
,
i
);
l
->
addWidget
(
button
,
line
,
2
+
i
,
Qt
::
AlignRight
);
}
CONNECT
(
signalMapper
,
mapped
(
int
),
this
,
actionRequested
(
int
)
);
}
}
void
StringListConfigControl
::
actionRequested
(
int
i_action
)
{
/* Supplementary check for boundaries */
if
(
i_action
<
0
||
i_action
>=
p_item
->
i_action
)
return
;
vlc_value_t
val
;
val
.
psz_string
=
qtu
(
(
combo
->
itemData
(
combo
->
currentIndex
()
).
toString
()
)
);
p_item
->
ppf_action
[
i_action
](
p_this
,
getName
(),
val
,
val
,
0
);
if
(
p_item
->
b_dirty
)
{
combo
->
clear
();
finish
(
true
);
p_item
->
b_dirty
=
VLC_FALSE
;
}
}
}
StringListConfigControl
::
StringListConfigControl
(
vlc_object_t
*
_p_this
,
StringListConfigControl
::
StringListConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QLabel
*
_label
,
QComboBox
*
_combo
,
module_config_t
*
_p_item
,
QLabel
*
_label
,
QComboBox
*
_combo
,
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
8071564e
...
@@ -360,6 +360,7 @@ private:
...
@@ -360,6 +360,7 @@ private:
class
StringListConfigControl
:
public
VStringConfigControl
class
StringListConfigControl
:
public
VStringConfigControl
{
{
Q_OBJECT
;
public:
public:
StringListConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
,
StringListConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
,
bool
,
QGridLayout
*
,
int
&
);
bool
,
QGridLayout
*
,
int
&
);
...
@@ -373,6 +374,9 @@ private:
...
@@ -373,6 +374,9 @@ private:
void
finish
(
bool
);
void
finish
(
bool
);
QLabel
*
label
;
QLabel
*
label
;
QComboBox
*
combo
;
QComboBox
*
combo
;
private
slots
:
void
actionRequested
(
int
);
};
};
#if 0
#if 0
struct ModuleCheckBox {
struct ModuleCheckBox {
...
...
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