Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
552963d5
Commit
552963d5
authored
Nov 20, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(qt4) Define reverse playback direction button in qt4 interface (not visible yet).
parent
61a2101b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
3 deletions
+40
-3
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+22
-2
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+2
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+14
-0
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
552963d5
...
...
@@ -57,6 +57,7 @@
#include <math.h>
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
#define I_REVERSE_TOOLTIP N_("Reverse\nRevert playback direction")
/**********************************************************************
* Video Widget. A simple frame on which video is drawn
...
...
@@ -641,6 +642,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
sizePolicy
.
setHorizontalStretch
(
0
);
sizePolicy
.
setVerticalStretch
(
0
);
/* Reverse */
reverseButton
=
new
QPushButton
;
reverseButton
->
setSizePolicy
(
sizePolicy
);
reverseButton
->
setMaximumSize
(
QSize
(
32
,
32
)
);
reverseButton
->
setMinimumSize
(
QSize
(
32
,
32
)
);
reverseButton
->
setIconSize
(
QSize
(
26
,
26
)
);
reverseButton
->
setFocusPolicy
(
Qt
::
NoFocus
);
/* Play */
playButton
=
new
QPushButton
;
playButton
->
setSizePolicy
(
sizePolicy
);
...
...
@@ -676,6 +685,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
/* Add this block to the main layout */
BUTTON_SET_ACT_I
(
reverseButton
,
""
,
reverse_b
,
qtr
(
I_REVERSE_TOOLTIP
),
reverse
()
);
BUTTON_SET_ACT_I
(
playButton
,
""
,
play_b
,
qtr
(
I_PLAY_TOOLTIP
),
play
()
);
BUTTON_SET_ACT_I
(
prevButton
,
""
,
previous_b
,
qtr
(
"Previous media in the playlist"
),
prev
()
);
...
...
@@ -758,6 +768,10 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
controlLayout
->
addWidget
(
discFrame
,
1
,
8
,
2
,
3
,
Qt
::
AlignBottom
);
controlLayout
->
addWidget
(
telexFrame
,
1
,
8
,
2
,
5
,
Qt
::
AlignBottom
);
controlLayout
->
addWidget
(
reverseButton
,
2
,
0
,
2
,
2
,
Qt
::
AlignBottom
);
controlLayout
->
setColumnMinimumWidth
(
2
,
10
);
controlLayout
->
setColumnStretch
(
2
,
0
);
controlLayout
->
addWidget
(
playButton
,
2
,
0
,
2
,
2
,
Qt
::
AlignBottom
);
controlLayout
->
setColumnMinimumWidth
(
2
,
10
);
controlLayout
->
setColumnStretch
(
2
,
0
);
...
...
@@ -840,6 +854,11 @@ void ControlsWidget::stop()
THEMIM
->
stop
();
}
void
ControlsWidget
::
reverse
()
{
THEMIM
->
reverse
();
}
void
ControlsWidget
::
play
()
{
if
(
THEPL
->
current
.
i_size
==
0
)
...
...
@@ -1045,8 +1064,9 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
fsLayout
->
addWidget
(
fasterButton
,
0
,
12
);
/* Second line */
fsLayout
->
addWidget
(
playButton
,
1
,
0
,
1
,
2
);
fsLayout
->
addLayout
(
controlButLayout
,
1
,
2
);
fsLayout
->
addWidget
(
reverseButton
,
1
,
0
,
1
,
2
);
fsLayout
->
addWidget
(
playButton
,
1
,
0
,
1
,
3
);
fsLayout
->
addLayout
(
controlButLayout
,
1
,
3
);
fsLayout
->
addWidget
(
discFrame
,
1
,
3
);
fsLayout
->
addWidget
(
telexFrame
,
1
,
4
);
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
552963d5
...
...
@@ -186,7 +186,7 @@ protected:
QGridLayout
*
controlLayout
;
InputSlider
*
slider
;
QPushButton
*
prevSectionButton
,
*
nextSectionButton
,
*
menuButton
;
QPushButton
*
playButton
,
*
fullscreenButton
,
*
extSettingsButton
;
QPushButton
*
playButton
,
*
reverseButton
,
*
fullscreenButton
,
*
extSettingsButton
;
QPushButton
*
telexTransparent
,
*
telexOn
;
QSpinBox
*
telexPage
;
QToolButton
*
slowerButton
,
*
fasterButton
;
...
...
@@ -200,6 +200,7 @@ protected:
bool
b_telexTransparent
;
bool
b_telexEnabled
;
protected
slots
:
void
reverse
();
void
play
();
void
stop
();
void
prev
();
...
...
modules/gui/qt4/input_manager.cpp
View file @
552963d5
...
...
@@ -543,6 +543,15 @@ void InputManager::telexSetTransparency()
emit
toggleTelexTransparency
();
}
void
InputManager
::
reverse
()
{
if
(
hasInput
()
)
{
int
i_rate
=
var_GetInteger
(
p_input
,
"rate"
);
var_SetInteger
(
p_input
,
"rate"
,
-
i_rate
);
}
}
void
InputManager
::
slower
()
{
if
(
hasInput
()
)
...
...
@@ -675,6 +684,11 @@ void MainInputManager::customEvent( QEvent *event )
}
/* Playlist Control functions */
void
MainInputManager
::
reverse
()
{
getIM
()
->
reverse
();
}
void
MainInputManager
::
stop
()
{
playlist_Stop
(
THEPL
);
...
...
modules/gui/qt4/input_manager.hpp
View file @
552963d5
...
...
@@ -103,6 +103,7 @@ public slots:
void
setInput
(
input_thread_t
*
);
///< Our controlled input changed
void
sliderUpdate
(
float
);
///< User dragged the slider. We get new pos
void
togglePlayPause
();
void
reverse
();
void
slower
();
void
faster
();
void
normalRate
();
...
...
@@ -167,6 +168,7 @@ private:
public
slots
:
bool
teletextState
();
void
togglePlayPause
();
void
reverse
();
void
stop
();
void
next
();
void
prev
();
...
...
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