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
b3564a7d
Commit
b3564a7d
authored
Sep 25, 2010
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: messages dialog: new verbosity spinbox
parent
0ab13a3a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
1 deletion
+49
-1
modules/gui/qt4/ui/messages_panel.ui
modules/gui/qt4/ui/messages_panel.ui
+14
-1
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+24
-0
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+11
-0
No files found.
modules/gui/qt4/ui/messages_panel.ui
View file @
b3564a7d
...
...
@@ -49,13 +49,19 @@
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"
Q
SpinBox"
name=
"verbosityBox"
>
<widget
class=
"
DebugLevel
SpinBox"
name=
"verbosityBox"
>
<property
name=
"wrapping"
>
<bool>
true
</bool>
</property>
<property
name=
"minimum"
>
<number>
0
</number>
</property>
<property
name=
"maximum"
>
<number>
2
</number>
</property>
<property
name=
"value"
>
<number>
0
</number>
</property>
</widget>
</item>
<item
row=
"1"
column=
"2"
>
...
...
@@ -111,6 +117,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>
DebugLevelSpinBox
</class>
<extends>
QSpinBox
</extends>
<header>
util/customwidgets.hpp
</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
modules/gui/qt4/util/customwidgets.cpp
View file @
b3564a7d
...
...
@@ -227,6 +227,30 @@ void QVLCElidingLabel::paintEvent( QPaintEvent * event )
p
.
drawText
(
r
,
fontMetrics
().
elidedText
(
text
(),
elideMode
,
r
.
width
()
),
alignment
()
);
}
QString
DebugLevelSpinBox
::
textFromValue
(
int
v
)
const
{
QString
const
texts
[]
=
{
/* Note that min level 0 is 'errors' in Qt Ui
FIXME: fix debug levels accordingly to documentation */
/* qtr("infos"),*/
qtr
(
"errors"
),
qtr
(
"warnings"
),
qtr
(
"debug"
)
};
if
(
v
<
0
)
v
=
0
;
if
(
v
>=
2
)
v
=
2
;
return
QString
(
"%1 (%2)"
).
arg
(
v
).
arg
(
texts
[
v
]
);
}
int
DebugLevelSpinBox
::
mapTextToValue
(
bool
*
ok
)
{
int
parsedvalue
=
cleanText
().
toInt
();
/* fix range */
*
ok
=
(
parsedvalue
<
0
||
parsedvalue
>
2
)
?
FALSE
:
TRUE
;
return
parsedvalue
;
}
/***************************************************************************
* Hotkeys converters
***************************************************************************/
...
...
modules/gui/qt4/util/customwidgets.hpp
View file @
b3564a7d
...
...
@@ -31,6 +31,7 @@
#include <QPushButton>
#include <QLabel>
#include <QStackedWidget>
#include <QSpinBox>
/**
This class provides a QLineEdit which contains a greyed-out hinting
...
...
@@ -112,6 +113,16 @@ public:
}
};
class
DebugLevelSpinBox
:
public
QSpinBox
{
Q_OBJECT
public:
DebugLevelSpinBox
(
QWidget
*
parent
)
:
QSpinBox
(
parent
)
{
};
protected:
QString
textFromValue
(
int
)
const
;
int
mapTextToValue
(
bool
*
);
};
/* VLC Key/Wheel hotkeys interactions */
class
QKeyEvent
;
...
...
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