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
f043388c
Commit
f043388c
authored
Feb 20, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: rename utility classes
Depending whether they are VLC specific or not
parent
377ea495
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
23 deletions
+23
-23
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.cpp
+2
-2
modules/gui/qt4/components/playlist/selector.hpp
modules/gui/qt4/components/playlist/selector.hpp
+3
-3
modules/gui/qt4/ui/messages_panel.ui
modules/gui/qt4/ui/messages_panel.ui
+2
-2
modules/gui/qt4/util/customwidgets.cpp
modules/gui/qt4/util/customwidgets.cpp
+6
-6
modules/gui/qt4/util/customwidgets.hpp
modules/gui/qt4/util/customwidgets.hpp
+7
-7
modules/gui/qt4/util/searchlineedit.cpp
modules/gui/qt4/util/searchlineedit.cpp
+1
-1
modules/gui/qt4/util/searchlineedit.hpp
modules/gui/qt4/util/searchlineedit.hpp
+2
-2
No files found.
modules/gui/qt4/components/playlist/selector.cpp
View file @
f043388c
...
...
@@ -54,7 +54,7 @@ void SelectorActionButton::paintEvent( QPaintEvent *event )
int
frame
=
style
()
->
pixelMetric
(
QStyle
::
PM_DefaultFrameWidth
,
0
,
this
);
p
.
drawLine
(
rect
().
topLeft
()
+
QPoint
(
0
,
frame
),
rect
().
bottomLeft
()
-
QPoint
(
0
,
frame
)
);
Q
VLC
FramelessButton
::
paintEvent
(
event
);
QFramelessButton
::
paintEvent
(
event
);
}
PLSelItem
::
PLSelItem
(
QTreeWidgetItem
*
i
,
const
QString
&
text
)
...
...
@@ -64,7 +64,7 @@ PLSelItem::PLSelItem ( QTreeWidgetItem *i, const QString& text )
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
addSpacing
(
3
);
lbl
=
new
Q
VLC
ElidingLabel
(
text
);
lbl
=
new
QElidingLabel
(
text
);
layout
->
addWidget
(
lbl
,
1
);
int
height
=
qMax
(
22
,
fontMetrics
().
height
()
+
8
);
...
...
modules/gui/qt4/components/playlist/selector.hpp
View file @
f043388c
...
...
@@ -30,7 +30,7 @@
#endif
#include "qt4.hpp"
#include "util/customwidgets.hpp"
/* Q
VLC
FramelessButton */
#include "util/customwidgets.hpp"
/* QFramelessButton */
#include <QTreeWidget>
...
...
@@ -68,7 +68,7 @@ enum ItemAction {
};
class
SelectorActionButton
:
public
Q
VLC
FramelessButton
class
SelectorActionButton
:
public
QFramelessButton
{
protected:
virtual
void
paintEvent
(
QPaintEvent
*
);
...
...
@@ -101,7 +101,7 @@ private:
inline
void
leaveEvent
(
QEvent
*
){
hideAction
();
}
QTreeWidgetItem
*
qitem
;
Q
VLC
FramelessButton
*
lblAction
;
QFramelessButton
*
lblAction
;
QLabel
*
lbl
;
QHBoxLayout
*
layout
;
};
...
...
modules/gui/qt4/ui/messages_panel.ui
View file @
f043388c
...
...
@@ -49,7 +49,7 @@
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"DebugLevelSpinBox"
name=
"verbosityBox"
>
<widget
class=
"
QVLC
DebugLevelSpinBox"
name=
"verbosityBox"
>
<property
name=
"wrapping"
>
<bool>
true
</bool>
</property>
...
...
@@ -119,7 +119,7 @@
</widget>
<customwidgets>
<customwidget>
<class>
DebugLevelSpinBox
</class>
<class>
QVLC
DebugLevelSpinBox
</class>
<extends>
QSpinBox
</extends>
<header>
util/customwidgets.hpp
</header>
</customwidget>
...
...
modules/gui/qt4/util/customwidgets.cpp
View file @
f043388c
...
...
@@ -38,13 +38,13 @@
#include <QPixmap>
#include <vlc_keys.h>
Q
VLCFramelessButton
::
QVLC
FramelessButton
(
QWidget
*
parent
)
Q
FramelessButton
::
Q
FramelessButton
(
QWidget
*
parent
)
:
QPushButton
(
parent
)
{
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Preferred
);
}
void
Q
VLC
FramelessButton
::
paintEvent
(
QPaintEvent
*
)
void
QFramelessButton
::
paintEvent
(
QPaintEvent
*
)
{
QPainter
painter
(
this
);
QPixmap
pix
=
icon
().
pixmap
(
size
()
);
...
...
@@ -52,17 +52,17 @@ void QVLCFramelessButton::paintEvent( QPaintEvent * )
painter
.
drawPixmap
(
QRect
(
pos
.
x
(),
pos
.
y
(),
pix
.
width
(),
pix
.
height
()
),
pix
);
}
Q
VLCElidingLabel
::
QVLC
ElidingLabel
(
const
QString
&
s
,
Qt
::
TextElideMode
mode
,
QWidget
*
parent
)
Q
ElidingLabel
::
Q
ElidingLabel
(
const
QString
&
s
,
Qt
::
TextElideMode
mode
,
QWidget
*
parent
)
:
elideMode
(
mode
),
QLabel
(
s
,
parent
)
{
}
void
Q
VLC
ElidingLabel
::
setElideMode
(
Qt
::
TextElideMode
mode
)
void
QElidingLabel
::
setElideMode
(
Qt
::
TextElideMode
mode
)
{
elideMode
=
mode
;
repaint
();
}
void
Q
VLC
ElidingLabel
::
paintEvent
(
QPaintEvent
*
event
)
void
QElidingLabel
::
paintEvent
(
QPaintEvent
*
event
)
{
QPainter
p
(
this
);
int
space
=
frameWidth
()
+
margin
();
...
...
@@ -70,7 +70,7 @@ void QVLCElidingLabel::paintEvent( QPaintEvent * event )
p
.
drawText
(
r
,
fontMetrics
().
elidedText
(
text
(),
elideMode
,
r
.
width
()
),
alignment
()
);
}
QString
DebugLevelSpinBox
::
textFromValue
(
int
v
)
const
QString
QVLC
DebugLevelSpinBox
::
textFromValue
(
int
v
)
const
{
QString
const
texts
[]
=
{
/* Note that min level 0 is 'errors' in Qt Ui
...
...
modules/gui/qt4/util/customwidgets.hpp
View file @
f043388c
...
...
@@ -36,21 +36,21 @@
#include <QTimer>
class
QPixmap
;
class
Q
VLC
FramelessButton
:
public
QPushButton
class
QFramelessButton
:
public
QPushButton
{
Q_OBJECT
public:
Q
VLC
FramelessButton
(
QWidget
*
parent
=
NULL
);
QFramelessButton
(
QWidget
*
parent
=
NULL
);
virtual
QSize
sizeHint
()
const
{
return
iconSize
();
}
protected:
virtual
void
paintEvent
(
QPaintEvent
*
event
);
};
class
Q
VLC
ElidingLabel
:
public
QLabel
class
QElidingLabel
:
public
QLabel
{
public:
Q
VLC
ElidingLabel
(
const
QString
&
s
=
QString
(),
QElidingLabel
(
const
QString
&
s
=
QString
(),
Qt
::
TextElideMode
mode
=
Qt
::
ElideRight
,
QWidget
*
parent
=
NULL
);
void
setElideMode
(
Qt
::
TextElideMode
);
...
...
@@ -71,14 +71,14 @@ public:
}
};
class
DebugLevelSpinBox
:
public
QSpinBox
class
QVLC
DebugLevelSpinBox
:
public
QSpinBox
{
Q_OBJECT
public:
DebugLevelSpinBox
(
QWidget
*
parent
)
:
QSpinBox
(
parent
)
{
};
QVLC
DebugLevelSpinBox
(
QWidget
*
parent
)
:
QSpinBox
(
parent
)
{
};
protected:
virtual
QString
textFromValue
(
int
)
const
;
/* DebugLevelSpinBox is read-only */
/*
QVLC
DebugLevelSpinBox is read-only */
virtual
int
valueFromText
(
const
QString
&
)
const
{
return
-
1
;
}
};
...
...
modules/gui/qt4/util/searchlineedit.cpp
View file @
f043388c
...
...
@@ -106,7 +106,7 @@ void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
#ifndef Q_WS_MAC
SearchLineEdit
::
SearchLineEdit
(
QWidget
*
parent
)
:
QLineEdit
(
parent
)
{
clearButton
=
new
Q
VLC
FramelessButton
(
this
);
clearButton
=
new
QFramelessButton
(
this
);
clearButton
->
setIcon
(
QIcon
(
":/toolbar/clear"
)
);
clearButton
->
setIconSize
(
QSize
(
16
,
16
)
);
clearButton
->
setCursor
(
Qt
::
ArrowCursor
);
...
...
modules/gui/qt4/util/searchlineedit.hpp
View file @
f043388c
...
...
@@ -69,7 +69,7 @@ private:
#endif
#ifndef Q_WS_MAC
class
Q
VLC
FramelessButton
;
class
QFramelessButton
;
class
SearchLineEdit
:
public
QLineEdit
{
Q_OBJECT
...
...
@@ -82,7 +82,7 @@ private:
void
focusOutEvent
(
QFocusEvent
*
event
);
void
paintEvent
(
QPaintEvent
*
event
);
void
setMessageVisible
(
bool
on
);
Q
VLC
FramelessButton
*
clearButton
;
QFramelessButton
*
clearButton
;
bool
message
;
public
slots
:
...
...
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