Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ba5d2dc0
Commit
ba5d2dc0
authored
Jul 09, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: QDial: show value on control (fix #8906)
parent
cae4f1c6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
3 deletions
+37
-3
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+3
-2
modules/gui/qt4/ui/video_effects.ui
modules/gui/qt4/ui/video_effects.ui
+8
-1
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+16
-0
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+10
-0
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
ba5d2dc0
...
...
@@ -47,6 +47,7 @@
#include "qt4.hpp"
#include "input_manager.hpp"
#include "util/qt_dirs.hpp"
#include "util/customwidgets.hpp"
#include "../../audio_filter/equalizer_presets.h"
#include <vlc_intf_strings.h>
...
...
@@ -529,7 +530,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
QCheckBox
*
checkbox
=
qobject_cast
<
QCheckBox
*>
(
widget
);
QSpinBox
*
spinbox
=
qobject_cast
<
QSpinBox
*>
(
widget
);
QDoubleSpinBox
*
doublespinbox
=
qobject_cast
<
QDoubleSpinBox
*>
(
widget
);
QDial
*
dial
=
qobject_cast
<
QDial
*>
(
widget
);
VLCQDial
*
dial
=
qobject_cast
<
VLCQDial
*>
(
widget
);
QLineEdit
*
lineedit
=
qobject_cast
<
QLineEdit
*>
(
widget
);
QComboBox
*
combobox
=
qobject_cast
<
QComboBox
*>
(
widget
);
...
...
@@ -605,7 +606,7 @@ void ExtVideo::updateFilterOptions()
QCheckBox
*
checkbox
=
qobject_cast
<
QCheckBox
*>
(
sender
()
);
QSpinBox
*
spinbox
=
qobject_cast
<
QSpinBox
*>
(
sender
()
);
QDoubleSpinBox
*
doublespinbox
=
qobject_cast
<
QDoubleSpinBox
*>
(
sender
()
);
QDial
*
dial
=
qobject_cast
<
QDial
*>
(
sender
()
);
VLCQDial
*
dial
=
qobject_cast
<
VLCQDial
*>
(
sender
()
);
QLineEdit
*
lineedit
=
qobject_cast
<
QLineEdit
*>
(
sender
()
);
QComboBox
*
combobox
=
qobject_cast
<
QComboBox
*>
(
sender
()
);
...
...
modules/gui/qt4/ui/video_effects.ui
View file @
ba5d2dc0
...
...
@@ -843,7 +843,7 @@
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QDial"
name=
"rotateAngleDial"
>
<widget
class=
"
VLC
QDial"
name=
"rotateAngleDial"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
...
...
@@ -1795,6 +1795,13 @@
</layout>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>
VLCQDial
</class>
<extends>
QDial
</extends>
<header>
util/customwidgets.hpp
</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>
adjustEnable
</tabstop>
<tabstop>
hueSlider
</tabstop>
...
...
modules/gui/qt4/util/customwidgets.cpp
View file @
ba5d2dc0
...
...
@@ -87,6 +87,22 @@ QString QVLCDebugLevelSpinBox::textFromValue( int v ) const
return
QString
(
"%1 (%2)"
).
arg
(
v
).
arg
(
texts
[
v
]
);
}
VLCQDial
::
VLCQDial
(
QWidget
*
parent
)
:
QDial
(
parent
)
{
}
void
VLCQDial
::
paintEvent
(
QPaintEvent
*
event
)
{
QDial
::
paintEvent
(
event
);
QPainter
painter
(
this
);
QRect
rect
=
geometry
();
painter
.
setPen
(
QPen
(
palette
().
color
(
QPalette
::
WindowText
)
)
);
painter
.
drawText
(
QRectF
(
0
,
rect
.
height
()
*
0.66
,
rect
.
width
(),
rect
.
height
()
),
Qt
::
AlignHCenter
,
QString
::
number
(
value
()
),
0
);
painter
.
end
();
}
/***************************************************************************
* Hotkeys converters
***************************************************************************/
...
...
modules/gui/qt4/util/customwidgets.hpp
View file @
ba5d2dc0
...
...
@@ -37,6 +37,7 @@
#include <QTimer>
#include <QToolButton>
#include <QAbstractAnimation>
#include <QDial>
class
QPixmap
;
class
QWidget
;
...
...
@@ -51,6 +52,15 @@ protected:
virtual
void
paintEvent
(
QPaintEvent
*
event
);
};
class
VLCQDial
:
public
QDial
{
Q_OBJECT
public:
VLCQDial
(
QWidget
*
parent
=
NULL
);
protected:
virtual
void
paintEvent
(
QPaintEvent
*
event
);
};
class
QToolButtonExt
:
public
QToolButton
{
Q_OBJECT
...
...
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