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
0734535d
Commit
0734535d
authored
Nov 30, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: misc simplifications and corrections
parent
9123d53b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
19 deletions
+9
-19
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+2
-15
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+7
-4
No files found.
modules/gui/qt4/util/customwidgets.cpp
View file @
0734535d
...
...
@@ -38,7 +38,7 @@
#include <vlc_keys.h>
QVLCFramelessButton
::
QVLCFramelessButton
(
QWidget
*
parent
)
:
QPushButton
(
parent
)
:
QPushButton
(
parent
)
{
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Preferred
);
}
...
...
@@ -51,13 +51,8 @@ void QVLCFramelessButton::paintEvent( QPaintEvent * )
painter
.
drawPixmap
(
QRect
(
pos
.
x
(),
pos
.
y
(),
pix
.
width
(),
pix
.
height
()
),
pix
);
}
QSize
QVLCFramelessButton
::
sizeHint
()
const
{
return
iconSize
();
}
QVLCElidingLabel
::
QVLCElidingLabel
(
const
QString
&
s
,
Qt
::
TextElideMode
mode
,
QWidget
*
parent
)
:
elideMode
(
mode
),
QLabel
(
s
,
parent
)
:
elideMode
(
mode
),
QLabel
(
s
,
parent
)
{
}
void
QVLCElidingLabel
::
setElideMode
(
Qt
::
TextElideMode
mode
)
...
...
@@ -90,14 +85,6 @@ QString DebugLevelSpinBox::textFromValue( int v ) const
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 @
0734535d
...
...
@@ -38,7 +38,7 @@ class QVLCFramelessButton : public QPushButton
Q_OBJECT
public:
QVLCFramelessButton
(
QWidget
*
parent
=
NULL
);
QSize
sizeHint
()
const
;
virtual
QSize
sizeHint
()
const
{
return
iconSize
();
}
protected:
virtual
void
paintEvent
(
QPaintEvent
*
event
);
};
...
...
@@ -51,11 +51,13 @@ public:
Qt
::
TextElideMode
mode
=
Qt
::
ElideRight
,
QWidget
*
parent
=
NULL
);
void
setElideMode
(
Qt
::
TextElideMode
);
protected:
virtual
void
paintEvent
(
QPaintEvent
*
event
);
private:
void
paintEvent
(
QPaintEvent
*
event
);
Qt
::
TextElideMode
elideMode
;
};
class
QVLCStackedWidget
:
public
QStackedWidget
{
public:
...
...
@@ -72,8 +74,9 @@ class DebugLevelSpinBox : public QSpinBox
public:
DebugLevelSpinBox
(
QWidget
*
parent
)
:
QSpinBox
(
parent
)
{
};
protected:
QString
textFromValue
(
int
)
const
;
int
mapTextToValue
(
bool
*
);
virtual
QString
textFromValue
(
int
)
const
;
/* DebugLevelSpinBox is read-only */
virtual
int
valueFromText
(
const
QString
&
)
const
{
return
-
1
;
}
};
/* VLC Key/Wheel hotkeys interactions */
...
...
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