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
9b0bfc02
Commit
9b0bfc02
authored
Sep 17, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: adv options: fix RTL handling for synchronization
parent
553fa2da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+22
-13
modules/gui/qt4/components/extended_panels.hpp
modules/gui/qt4/components/extended_panels.hpp
+9
-3
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
9b0bfc02
...
...
@@ -1463,25 +1463,36 @@ void Spatializer::addCallbacks( vlc_object_t *p_aout )
#define SUBSDELAY_MODE_RELATIVE_SOURCE_DELAY 1
#define SUBSDELAY_MODE_RELATIVE_SOURCE_CONTENT 2
SyncWidget
::
SyncWidget
(
QWidget
*
_parent
)
:
Q
DoubleSpinBox
(
_parent
)
SyncWidget
::
SyncWidget
(
QWidget
*
_parent
)
:
Q
Widget
(
_parent
)
{
setAlignment
(
Qt
::
AlignRight
|
Qt
::
AlignTrailing
|
Qt
::
AlignVCenter
);
setDecimals
(
3
);
setMinimum
(
-
600.0
);
setMaximum
(
600.0
);
setSingleStep
(
0.1
);
setButtonSymbols
(
QDoubleSpinBox
::
PlusMinus
);
CONNECT
(
this
,
valueChanged
(
double
),
this
,
valueChangedHandler
(
double
)
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
;
spinBox
.
setAlignment
(
Qt
::
AlignRight
|
Qt
::
AlignTrailing
|
Qt
::
AlignVCenter
);
spinBox
.
setDecimals
(
3
);
spinBox
.
setMinimum
(
-
600.0
);
spinBox
.
setMaximum
(
600.0
);
spinBox
.
setSingleStep
(
0.1
);
spinBox
.
setSuffix
(
" s"
);
spinBox
.
setButtonSymbols
(
QDoubleSpinBox
::
PlusMinus
);
CONNECT
(
&
spinBox
,
valueChanged
(
double
),
this
,
valueChangedHandler
(
double
)
);
layout
->
addWidget
(
&
spinBox
);
layout
->
addWidget
(
&
spinLabel
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
setLayout
(
layout
);
}
void
SyncWidget
::
valueChangedHandler
(
double
d
)
{
if
(
d
<
0
)
s
etPrefix
(
qtr
(
"Hastened by
"
)
);
s
pinLabel
.
setText
(
qtr
(
"(Hastened)
"
)
);
else
if
(
d
>
0
)
s
etPrefix
(
qtr
(
"Delayed by
"
)
);
s
pinLabel
.
setText
(
qtr
(
"(Delayed)
"
)
);
else
setPrefix
(
""
);
spinLabel
.
setText
(
""
);
}
void
SyncWidget
::
setValue
(
double
d
)
{
spinBox
.
setValue
(
d
);
}
SyncControls
::
SyncControls
(
intf_thread_t
*
_p_intf
,
QWidget
*
_parent
)
:
...
...
@@ -1503,7 +1514,6 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
AVLayout
->
addWidget
(
AVLabel
,
0
,
0
,
1
,
1
);
AVSpin
=
new
SyncWidget
(
this
);
AVSpin
->
setSuffix
(
" s"
);
AVLayout
->
addWidget
(
AVSpin
,
0
,
2
,
1
,
1
);
mainLayout
->
addWidget
(
AVBox
,
1
,
0
,
1
,
5
);
...
...
@@ -1516,7 +1526,6 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
subsLayout
->
addWidget
(
subsLabel
,
0
,
0
,
1
,
1
);
subsSpin
=
new
SyncWidget
(
this
);
subsSpin
->
setSuffix
(
" s"
);
subsLayout
->
addWidget
(
subsSpin
,
0
,
2
,
1
,
1
);
QLabel
*
subSpeedLabel
=
new
QLabel
;
...
...
modules/gui/qt4/components/extended_panels.hpp
View file @
9b0bfc02
...
...
@@ -168,13 +168,19 @@ private slots:
void
setInitValues
();
};
class
SyncWidget
:
public
Q
DoubleSpinBox
class
SyncWidget
:
public
Q
Widget
{
Q_OBJECT
public:
SyncWidget
(
QWidget
*
);
void
setValue
(
double
d
);
signals:
void
valueChanged
(
double
);
private
slots
:
void
valueChangedHandler
(
double
d
);
private:
QDoubleSpinBox
spinBox
;
QLabel
spinLabel
;
};
class
SyncControls
:
public
QWidget
...
...
@@ -186,8 +192,8 @@ public:
virtual
~
SyncControls
();
private:
intf_thread_t
*
p_intf
;
QDoubleSpinBox
*
AVSpin
;
QDoubleSpinBox
*
subsSpin
;
SyncWidget
*
AVSpin
;
SyncWidget
*
subsSpin
;
QDoubleSpinBox
*
subSpeedSpin
;
QDoubleSpinBox
*
subDurationSpin
;
...
...
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