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
bfffe8bf
Commit
bfffe8bf
authored
Oct 08, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Very beginning of hotkey widget + Fix 4.2 compilation issue
parent
d5d5ebfa
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
4 deletions
+108
-4
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+1
-1
modules/gui/qt4/components/preferences.cpp
modules/gui/qt4/components/preferences.cpp
+17
-2
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+69
-1
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+21
-0
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
bfffe8bf
...
@@ -49,7 +49,7 @@ static const QString band_frequencies[] =
...
@@ -49,7 +49,7 @@ static const QString band_frequencies[] =
Equalizer
::
Equalizer
(
intf_thread_t
*
_p_intf
,
QWidget
*
_parent
)
:
Equalizer
::
Equalizer
(
intf_thread_t
*
_p_intf
,
QWidget
*
_parent
)
:
QWidget
(
_parent
)
,
p_intf
(
_p_intf
)
QWidget
(
_parent
)
,
p_intf
(
_p_intf
)
{
{
QFont
smallFont
=
QApplication
::
font
(
0
);
QFont
smallFont
=
QApplication
::
font
(
static_cast
<
QWidget
*>
(
0
)
);
smallFont
.
setPointSize
(
smallFont
.
pointSize
()
-
3
);
smallFont
.
setPointSize
(
smallFont
.
pointSize
()
-
3
);
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
...
...
modules/gui/qt4/components/preferences.cpp
View file @
bfffe8bf
...
@@ -413,7 +413,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -413,7 +413,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
QLabel
*
label
=
new
QLabel
(
head
);
QLabel
*
label
=
new
QLabel
(
head
);
global_layout
->
addWidget
(
label
);
global_layout
->
addWidget
(
label
);
QFont
myFont
=
QApplication
::
font
(
0
);
QFont
myFont
=
QApplication
::
font
(
static_cast
<
QWidget
*>
(
0
)
);
myFont
.
setPointSize
(
myFont
.
pointSize
()
+
3
);
myFont
.
setBold
(
true
);
myFont
.
setPointSize
(
myFont
.
pointSize
()
+
3
);
myFont
.
setBold
(
true
);
label
->
setFont
(
myFont
);
label
->
setFont
(
myFont
);
...
@@ -431,6 +431,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -431,6 +431,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
QGridLayout
*
layout
=
new
QGridLayout
();
QGridLayout
*
layout
=
new
QGridLayout
();
int
i_line
=
0
,
i_boxline
=
0
;
int
i_line
=
0
,
i_boxline
=
0
;
bool
has_hotkey
=
false
;
if
(
p_item
)
do
if
(
p_item
)
do
{
{
...
@@ -454,6 +455,13 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -454,6 +455,13 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
box
=
new
QGroupBox
(
qfu
(
p_item
->
psz_text
)
);
box
=
new
QGroupBox
(
qfu
(
p_item
->
psz_text
)
);
boxlayout
=
new
QGridLayout
();
boxlayout
=
new
QGridLayout
();
}
}
/* Only one hotkey control */
if
(
has_hotkey
&&
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
strstr
(
p_item
->
psz_name
,
"key-"
)
)
continue
;
if
(
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
strstr
(
p_item
->
psz_name
,
"key-"
)
)
has_hotkey
=
true
;
ConfigControl
*
control
;
ConfigControl
*
control
;
if
(
!
box
)
if
(
!
box
)
...
@@ -465,6 +473,13 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -465,6 +473,13 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
if
(
!
control
)
if
(
!
control
)
continue
;
continue
;
if
(
has_hotkey
)
{
/* A hotkey widget takes 2 lines */
if
(
box
)
i_boxline
++
;
else
i_line
++
;
}
if
(
box
)
i_boxline
++
;
if
(
box
)
i_boxline
++
;
else
i_line
++
;
else
i_line
++
;
controls
.
append
(
control
);
controls
.
append
(
control
);
...
...
modules/gui/qt4/components/preferences_widgets.cpp
View file @
bfffe8bf
...
@@ -100,6 +100,9 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
...
@@ -100,6 +100,9 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
case
CONFIG_ITEM_DIRECTORY
:
case
CONFIG_ITEM_DIRECTORY
:
fprintf
(
stderr
,
"Todo (CONFIG_ITEM_DIRECTORY)
\n
"
);
fprintf
(
stderr
,
"Todo (CONFIG_ITEM_DIRECTORY)
\n
"
);
break
;
break
;
case
CONFIG_ITEM_KEY
:
p_control
=
new
KeySelectorControl
(
p_this
,
p_item
,
parent
,
l
,
line
);
break
;
case
CONFIG_ITEM_BOOL
:
case
CONFIG_ITEM_BOOL
:
p_control
=
new
BoolConfigControl
(
p_this
,
p_item
,
parent
,
l
,
line
);
p_control
=
new
BoolConfigControl
(
p_this
,
p_item
,
parent
,
l
,
line
);
break
;
break
;
...
@@ -140,6 +143,11 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
...
@@ -140,6 +143,11 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
qobject_cast
<
VStringConfigControl
*>
(
this
);
qobject_cast
<
VStringConfigControl
*>
(
this
);
config_PutPsz
(
p_intf
,
vscc
->
getName
(),
qta
(
vscc
->
getValue
()
)
);
config_PutPsz
(
p_intf
,
vscc
->
getName
(),
qta
(
vscc
->
getValue
()
)
);
}
}
case
4
:
{
KeySelectorControl
*
ksc
=
qobject_cast
<
KeySelectorControl
*>
(
this
);
ksc
->
doApply
();
}
}
}
}
}
...
@@ -704,3 +712,63 @@ void FloatRangeConfigControl::finish()
...
@@ -704,3 +712,63 @@ void FloatRangeConfigControl::finish()
spin
->
setMaximum
(
(
double
)
p_item
->
f_max
);
spin
->
setMaximum
(
(
double
)
p_item
->
f_max
);
spin
->
setMinimum
(
(
double
)
p_item
->
f_min
);
spin
->
setMinimum
(
(
double
)
p_item
->
f_min
);
}
}
/**********************************************************************
* Key selector widget
**********************************************************************/
KeySelectorControl
::
KeySelectorControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QWidget
*
_parent
,
QGridLayout
*
l
,
int
&
line
)
:
ConfigControl
(
_p_this
,
_p_item
,
_parent
)
{
label
=
new
QLabel
(
qtr
(
"Select an action to change the associated hotkey"
)
);
table
=
new
QTreeWidget
(
0
);
finish
();
if
(
!
l
)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
();
layout
->
addWidget
(
label
,
0
);
layout
->
addWidget
(
table
,
1
);
widget
->
setLayout
(
layout
);
}
else
{
l
->
addWidget
(
label
,
line
,
0
,
1
,
2
);
l
->
addWidget
(
table
,
line
+
1
,
0
,
1
,
2
);
}
}
void
KeySelectorControl
::
finish
()
{
if
(
label
)
label
->
setToolTip
(
qfu
(
p_item
->
psz_longtext
)
);
/* Fill the table */
table
->
setColumnCount
(
2
);
table
->
setAlternatingRowColors
(
true
);
module_t
*
p_main
=
config_FindModule
(
p_this
,
"main"
);
assert
(
p_main
);
module_config_t
*
p_item
=
p_main
->
p_config
;
if
(
p_item
)
do
{
if
(
p_item
->
i_type
&
CONFIG_ITEM
&&
p_item
->
psz_name
&&
strstr
(
p_item
->
psz_name
,
"key-"
)
)
{
QTreeWidgetItem
*
treeItem
=
new
QTreeWidgetItem
();
treeItem
->
setText
(
0
,
qfu
(
p_item
->
psz_text
)
);
treeItem
->
setText
(
1
,
p_item
->
psz_value
);
treeItem
->
setData
(
0
,
Qt
::
UserRole
,
QVariant
(
p_item
->
psz_name
)
);
table
->
addTopLevelItem
(
treeItem
);
}
}
while
(
p_item
->
i_type
!=
CONFIG_HINT_END
&&
p_item
++
);
}
void
KeySelectorControl
::
doApply
()
{
}
modules/gui/qt4/components/preferences_widgets.hpp
View file @
bfffe8bf
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#define _INFOPANELS_H_
#define _INFOPANELS_H_
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <QWidget>
#include <QWidget>
#include <QTreeWidget>
#include <QLineEdit>
#include <QLineEdit>
#include <QSpinBox>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QDoubleSpinBox>
...
@@ -306,4 +307,24 @@ private slot:
...
@@ -306,4 +307,24 @@ private slot:
};
};
#endif
#endif
/**********************************************************************
* Key selector widget
**********************************************************************/
class
KeySelectorControl
:
public
ConfigControl
{
Q_OBJECT
;
public:
KeySelectorControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
,
QGridLayout
*
,
int
&
);
virtual
int
getType
()
{
return
4
;
}
virtual
~
KeySelectorControl
()
{};
virtual
void
hide
()
{
table
->
hide
();
label
->
hide
();
}
virtual
void
show
()
{
table
->
show
();
label
->
show
();
}
void
doApply
();
private:
void
finish
();
QLabel
*
label
;
QTreeWidget
*
table
;
};
#endif
#endif
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