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
8c2ccecd
Commit
8c2ccecd
authored
Mar 21, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: Equalizer: add presets icons
parent
a300dcc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+19
-1
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
8c2ccecd
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
#include <QComboBox>
#include <QComboBox>
#include <QTimer>
#include <QTimer>
#include <QFileDialog>
#include <QFileDialog>
#include <QGraphicsScene>
#include <QPainter>
#include "components/extended_panels.hpp"
#include "components/extended_panels.hpp"
#include "dialogs/preferences.hpp"
#include "dialogs/preferences.hpp"
...
@@ -1244,7 +1246,23 @@ void Equalizer::build()
...
@@ -1244,7 +1246,23 @@ void Equalizer::build()
ui
.
presetsCombo
->
addItem
(
""
,
QVariant
()
);
/* 1st entry = custom/modified */
ui
.
presetsCombo
->
addItem
(
""
,
QVariant
()
);
/* 1st entry = custom/modified */
for
(
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
for
(
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
{
{
ui
.
presetsCombo
->
addItem
(
qtr
(
preset_list_text
[
i
]
),
QGraphicsScene
scene
;
QPixmap
icon
(
40
,
40
);
icon
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
icon
);
for
(
int
j
=
0
;
j
<
eqz_preset_10b
[
i
].
i_band
;
j
++
)
{
float
f_value
=
eqz_preset_10b
[
i
].
f_amp
[
j
];
if
(
f_value
>
20.0
)
f_value
=
20.0
;
if
(
f_value
<
-
20.0
)
f_value
=
-
20.0
;
QRectF
shape
(
j
,
20.0
-
f_value
,
1
,
f_value
);
scene
.
addRect
(
shape
,
QPen
(),
palette
().
brush
(
QPalette
::
WindowText
)
);
}
scene
.
addLine
(
0.0
,
20.0
,
eqz_preset_10b
[
i
].
i_band
,
20.0
,
palette
().
color
(
QPalette
::
WindowText
)
);
scene
.
setSceneRect
(
0.0
,
0.0
,
eqz_preset_10b
[
i
].
i_band
,
40.0
);
scene
.
render
(
&
painter
,
icon
.
rect
(),
scene
.
sceneRect
(),
Qt
::
IgnoreAspectRatio
);
ui
.
presetsCombo
->
addItem
(
icon
,
qtr
(
preset_list_text
[
i
]
),
QVariant
(
preset_list
[
i
]
)
);
QVariant
(
preset_list
[
i
]
)
);
}
}
CONNECT
(
ui
.
presetsCombo
,
activated
(
int
),
this
,
setCorePreset
(
int
)
);
CONNECT
(
ui
.
presetsCombo
,
activated
(
int
),
this
,
setCorePreset
(
int
)
);
...
...
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