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
69afa855
Commit
69afa855
authored
Jun 20, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix behaviour of the button logic for teletext and use the images.
parent
9497e5ca
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
6 deletions
+77
-6
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+47
-6
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+6
-0
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+20
-0
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+1
-0
modules/gui/qt4/pixmaps/tvtelx-transparent.png
modules/gui/qt4/pixmaps/tvtelx-transparent.png
+0
-0
modules/gui/qt4/pixmaps/tvtelx.png
modules/gui/qt4/pixmaps/tvtelx.png
+0
-0
modules/gui/qt4/vlc.qrc
modules/gui/qt4/vlc.qrc
+3
-0
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
69afa855
...
...
@@ -460,6 +460,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
sectionNext
()
);
CONNECT
(
menuButton
,
clicked
(),
THEMIM
->
getIM
(),
sectionMenu
()
);
/**
* Telextext QFrame
* TODO: Merge with upper menu in a StackLayout
...
...
@@ -469,17 +470,16 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
telexLayout
->
setSpacing
(
0
);
telexLayout
->
setMargin
(
0
);
QToolButton
*
telexOn
=
new
QToolButton
;
telexOn
->
setText
(
qtr
(
"On"
)
);
QPushButton
*
telexOn
=
new
QPushButton
;
setupSmallButton
(
telexOn
);
telexLayout
->
addWidget
(
telexOn
);
QToolButton
*
telexTransparent
=
new
QToolButton
;
telexTransparent
->
setText
(
qtr
(
"Transparent"
)
);
telexTransparent
=
new
QPushButton
;
setupSmallButton
(
telexTransparent
);
telexLayout
->
addWidget
(
telexTransparent
);
b_telexTransparent
=
false
;
QSpinBox
*
telexPage
=
new
QSpinBox
;
telexPage
=
new
QSpinBox
;
telexPage
->
setRange
(
0
,
999
);
telexPage
->
setValue
(
100
);
telexPage
->
setAccelerated
(
true
);
...
...
@@ -489,12 +489,20 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
telexLayout
->
addWidget
(
telexPage
);
controlLayout
->
addWidget
(
telexFrame
,
1
,
10
,
2
,
3
,
Qt
::
AlignBottom
);
telexFrame
->
hide
();
telexFrame
->
hide
();
/* default hidden */
CONNECT
(
telexPage
,
valueChanged
(
int
),
THEMIM
->
getIM
(),
telexGotoPage
(
int
)
);
BUTTON_SET_ACT_I
(
telexOn
,
""
,
tv
.
png
,
qtr
(
"Teletext on"
),
toggleTeletext
()
);
CONNECT
(
telexOn
,
clicked
(
bool
),
THEMIM
->
getIM
(),
telexToggle
(
bool
)
);
telexTransparent
->
setEnabled
(
false
);
telexPage
->
setEnabled
(
false
);
BUTTON_SET_ACT_I
(
telexTransparent
,
""
,
tvtelx
.
png
,
qtr
(
"Teletext"
),
toggleTeletextTransparency
()
);
CONNECT
(
telexTransparent
,
clicked
(
bool
),
THEMIM
->
getIM
(),
telexSetTransparency
(
bool
)
);
CONNECT
(
THEMIM
->
getIM
(),
teletextEnabled
(
bool
),
...
...
@@ -627,6 +635,39 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
ControlsWidget
::~
ControlsWidget
()
{}
void
ControlsWidget
::
toggleTeletext
()
{
bool
b_enabled
=
THEMIM
->
teletextState
();
if
(
b_telexEnabled
)
{
telexTransparent
->
setEnabled
(
false
);
telexPage
->
setEnabled
(
false
);
b_telexEnabled
=
false
;
}
else
if
(
b_enabled
)
{
telexTransparent
->
setEnabled
(
true
);
telexPage
->
setEnabled
(
true
);
b_telexEnabled
=
true
;
}
}
void
ControlsWidget
::
toggleTeletextTransparency
()
{
if
(
b_telexTransparent
)
{
telexTransparent
->
setIcon
(
QIcon
(
":/pixmaps/tvtelx.png"
)
);
telexTransparent
->
setToolTip
(
qtr
(
"Teletext"
)
);
b_telexTransparent
=
false
;
}
else
{
telexTransparent
->
setIcon
(
QIcon
(
":/pixmaps/tvtelx-transparent.png"
)
);
telexTransparent
->
setToolTip
(
qtr
(
"Transparent"
)
);
b_telexTransparent
=
true
;
}
}
void
ControlsWidget
::
stop
()
{
THEMIM
->
stop
();
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
69afa855
...
...
@@ -195,6 +195,8 @@ protected:
InputSlider
*
slider
;
QPushButton
*
prevSectionButton
,
*
nextSectionButton
,
*
menuButton
;
QPushButton
*
playButton
,
*
fullscreenButton
,
*
extSettingsButton
;
QPushButton
*
telexTransparent
;
QSpinBox
*
telexPage
;
QToolButton
*
slowerButton
,
*
fasterButton
;
QHBoxLayout
*
controlButLayout
;
AdvControlsWidget
*
advControls
;
...
...
@@ -203,6 +205,8 @@ protected:
VolumeClickHandler
*
hVolLabel
;
bool
b_advancedVisible
;
bool
b_telexTransparent
;
bool
b_telexEnabled
;
protected
slots
:
void
play
();
void
stop
();
...
...
@@ -216,6 +220,8 @@ protected slots:
void
faster
();
void
slower
();
void
toggleAdvanced
();
void
toggleTeletext
();
void
toggleTeletextTransparency
();
signals:
void
advancedControlsToggled
(
bool
);
};
...
...
modules/gui/qt4/input_manager.cpp
View file @
69afa855
...
...
@@ -610,6 +610,26 @@ void MainInputManager::togglePlayPause()
getIM
()
->
togglePlayPause
();
}
bool
MainInputManager
::
teletextState
()
{
im
=
getIM
();
if
(
im
->
hasInput
()
)
{
vlc_value_t
val
;
vlc_object_t
*
p_vbi
;
p_vbi
=
(
vlc_object_t
*
)
vlc_object_find_name
(
getInput
(),
"zvbi"
,
FIND_ANYWHERE
);
if
(
p_vbi
)
{
vlc_object_release
(
p_vbi
);
return
true
;
}
var_Change
(
getInput
(),
"spu-es"
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
return
(
val
.
i_int
>
0
);
}
return
false
;
}
/* Static callbacks */
/* IM */
...
...
modules/gui/qt4/input_manager.hpp
View file @
69afa855
...
...
@@ -149,6 +149,7 @@ private:
intf_thread_t
*
p_intf
;
static
MainInputManager
*
instance
;
public
slots
:
bool
teletextState
();
void
togglePlayPause
();
void
stop
();
void
next
();
...
...
modules/gui/qt4/pixmaps/tvtelx-transparent.png
0 → 100644
View file @
69afa855
336 Bytes
modules/gui/qt4/pixmaps/tvtelx.png
View replaced file @
9497e5ca
View file @
69afa855
274 Bytes
|
W:
|
H:
325 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
modules/gui/qt4/vlc.qrc
View file @
69afa855
...
...
@@ -43,6 +43,9 @@
<file>
pixmaps/playlist_shuffle_off.png
</file>
<file>
pixmaps/playlist_shuffle_on.png
</file>
<file>
pixmaps/play.png
</file>
<file>
pixmaps/tvtelx-transparent.png
</file>
<file>
pixmaps/tvtelx.png
</file>
<file>
pixmaps/tv.png
</file>
<file>
pixmaps/previous_16px.png
</file>
<file>
pixmaps/previous.png
</file>
<file>
pixmaps/record_16px.png
</file>
...
...
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