Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2fe13ef6
Commit
2fe13ef6
authored
Aug 27, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix play/pause icons
Implement integer config control
parent
44649aae
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
10 deletions
+63
-10
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+48
-2
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+10
-3
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+3
-3
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+2
-2
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
2fe13ef6
...
@@ -60,6 +60,14 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
...
@@ -60,6 +60,14 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
else
else
fprintf
(
stderr
,
"TODO
\n
"
);
fprintf
(
stderr
,
"TODO
\n
"
);
break
;
break
;
case
CONFIG_ITEM_INTEGER
:
if
(
p_item
->
i_list
)
fprintf
(
stderr
,
"Todo
\n
"
);
else
if
(
p_item
->
i_min
||
p_item
->
i_max
)
fprintf
(
stderr
,
"Todo
\n
"
);
else
p_control
=
new
IntegerConfigControl
(
p_this
,
p_item
,
parent
);
break
;
default:
default:
break
;
break
;
}
}
...
@@ -96,6 +104,7 @@ StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
...
@@ -96,6 +104,7 @@ StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
void
StringConfigControl
::
finish
(
QLabel
*
label
)
void
StringConfigControl
::
finish
(
QLabel
*
label
)
{
{
text
->
setText
(
qfu
(
p_item
->
psz_value
)
);
text
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
text
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
label
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
label
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
}
}
...
@@ -165,9 +174,46 @@ void ModuleConfigControl::finish( QLabel *label, bool bycat )
...
@@ -165,9 +174,46 @@ void ModuleConfigControl::finish( QLabel *label, bool bycat )
label
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
label
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
}
}
ModuleConfigControl
::~
ModuleConfigControl
()
{};
QString
ModuleConfigControl
::
getValue
()
QString
ModuleConfigControl
::
getValue
()
{
{
return
combo
->
itemData
(
combo
->
currentIndex
()
).
toString
();
return
combo
->
itemData
(
combo
->
currentIndex
()
).
toString
();
}
}
/**************************************************************************
* Integer-based controls
*************************************************************************/
/*********** Integer **************/
IntegerConfigControl
::
IntegerConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QWidget
*
_parent
)
:
VIntConfigControl
(
_p_this
,
_p_item
,
_parent
)
{
QLabel
*
label
=
new
QLabel
(
qfu
(
p_item
->
psz_text
)
);
spin
=
new
QSpinBox
;
finish
(
label
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
layout
->
addWidget
(
label
,
0
);
layout
->
addWidget
(
spin
,
1
);
widget
->
setLayout
(
layout
);
}
IntegerConfigControl
::
IntegerConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QLabel
*
label
,
QSpinBox
*
_spin
)
:
VIntConfigControl
(
_p_this
,
_p_item
)
{
spin
=
_spin
;
finish
(
label
);
}
void
IntegerConfigControl
::
finish
(
QLabel
*
label
)
{
spin
->
setValue
(
p_item
->
i_value
);
spin
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
label
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
}
int
IntegerConfigControl
::
getValue
()
{
return
spin
->
value
();
}
modules/gui/qt4/components/preferences_widgets.hpp
View file @
2fe13ef6
...
@@ -74,21 +74,26 @@ class VIntConfigControl : public ConfigControl
...
@@ -74,21 +74,26 @@ class VIntConfigControl : public ConfigControl
public:
public:
VIntConfigControl
(
vlc_object_t
*
a
,
module_config_t
*
b
,
QWidget
*
c
)
:
VIntConfigControl
(
vlc_object_t
*
a
,
module_config_t
*
b
,
QWidget
*
c
)
:
ConfigControl
(
a
,
b
,
c
)
{};
ConfigControl
(
a
,
b
,
c
)
{};
VIntConfigControl
(
vlc_object_t
*
a
,
module_config_t
*
b
)
:
ConfigControl
(
a
,
b
)
{};
virtual
~
VIntConfigControl
()
{};
virtual
~
VIntConfigControl
()
{};
virtual
int
getValue
()
=
0
;
virtual
int
getValue
()
=
0
;
};
};
#if 0
class
IntegerConfigControl
:
public
VIntConfigControl
class
IntegerConfigControl
:
public
VIntConfigControl
{
{
public:
public:
IntegerConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
);
IntegerConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
);
virtual ~IntegerConfigControl();
IntegerConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
QSpinBox
*
);
virtual
~
IntegerConfigControl
()
{};
virtual
int
getValue
();
virtual
int
getValue
();
private:
private:
QSpinBox
*
spin
;
QSpinBox
*
spin
;
void
finish
(
QLabel
*
);
};
};
#if 0
class BoolConfigControl : public VIntConfigControl
class BoolConfigControl : public VIntConfigControl
{
{
public:
public:
...
@@ -108,6 +113,8 @@ class VFloatConfigControl : public ConfigControl
...
@@ -108,6 +113,8 @@ class VFloatConfigControl : public ConfigControl
public:
public:
VFloatConfigControl
(
vlc_object_t
*
a
,
module_config_t
*
b
,
QWidget
*
c
)
:
VFloatConfigControl
(
vlc_object_t
*
a
,
module_config_t
*
b
,
QWidget
*
c
)
:
ConfigControl
(
a
,
b
,
c
)
{};
ConfigControl
(
a
,
b
,
c
)
{};
VFloatConfigControl
(
vlc_object_t
*
a
,
module_config_t
*
b
)
:
ConfigControl
(
a
,
b
)
{};
virtual
~
VFloatConfigControl
()
{};
virtual
~
VFloatConfigControl
()
{};
virtual
float
getValue
()
=
0
;
virtual
float
getValue
()
=
0
;
};
};
...
@@ -160,7 +167,7 @@ public:
...
@@ -160,7 +167,7 @@ public:
bycat
);
bycat
);
ModuleConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
ModuleConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
QComboBox
*
,
bool
);
QComboBox
*
,
bool
);
virtual
~
ModuleConfigControl
();
virtual
~
ModuleConfigControl
()
{}
;
virtual
QString
getValue
();
virtual
QString
getValue
();
private:
private:
void
finish
(
QLabel
*
,
bool
);
void
finish
(
QLabel
*
,
bool
);
...
...
modules/gui/qt4/input_manager.cpp
View file @
2fe13ef6
...
@@ -53,13 +53,13 @@ void InputManager::setInput( input_thread_t *_p_input )
...
@@ -53,13 +53,13 @@ void InputManager::setInput( input_thread_t *_p_input )
void
InputManager
::
update
()
void
InputManager
::
update
()
{
{
/// \todo Emit the signals only if it changed
/// \todo Emit the signals only if it changed
if
(
!
p_input
||
p_input
->
b_die
)
return
;
if
(
!
p_input
)
return
;
if
(
p_input
->
b_dead
)
if
(
p_input
->
b_dead
||
p_input
->
b_die
)
{
{
emit
positionUpdated
(
0.0
,
0
,
0
);
emit
positionUpdated
(
0.0
,
0
,
0
);
emit
navigationChanged
(
0
);
emit
navigationChanged
(
0
);
emit
statusChanged
(
0
);
// 0 = STOPPED, 1 = P
AUSE, 2 = PLAY
emit
statusChanged
(
0
);
// 0 = STOPPED, 1 = P
LAY, 2 = PAUSE
}
}
/* Update position */
/* Update position */
...
...
modules/gui/qt4/main_interface.cpp
View file @
2fe13ef6
...
@@ -200,7 +200,7 @@ void MainInterface::setName( QString name )
...
@@ -200,7 +200,7 @@ void MainInterface::setName( QString name )
void
MainInterface
::
setStatus
(
int
status
)
void
MainInterface
::
setStatus
(
int
status
)
{
{
if
(
status
==
2
)
// Playing
if
(
status
==
1
)
// Playing
ui
.
playButton
->
setIcon
(
QIcon
(
":/pixmaps/pause.png"
)
);
ui
.
playButton
->
setIcon
(
QIcon
(
":/pixmaps/pause.png"
)
);
else
else
ui
.
playButton
->
setIcon
(
QIcon
(
":/pixmaps/play.png"
)
);
ui
.
playButton
->
setIcon
(
QIcon
(
":/pixmaps/play.png"
)
);
...
...
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