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
0891bbe7
Commit
0891bbe7
authored
Mar 15, 2012
by
Ludovic Fauvet
Committed by
Jean-Baptiste Kempf
Mar 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: don't try to show an uninitialized time tooltip
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
4a9aaa84
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
modules/gui/qt4/util/timetooltip.cpp
modules/gui/qt4/util/timetooltip.cpp
+8
-2
modules/gui/qt4/util/timetooltip.hpp
modules/gui/qt4/util/timetooltip.hpp
+2
-0
No files found.
modules/gui/qt4/util/timetooltip.cpp
View file @
0891bbe7
/*****************************************************************************
* Copyright © 2011 VideoLAN
* Copyright © 2011
-2012
VideoLAN
* $Id$
*
* Authors: Ludovic Fauvet <etix@l0cal.com>
...
...
@@ -31,7 +31,7 @@
#define TIP_HEIGHT 5
TimeTooltip
::
TimeTooltip
(
QWidget
*
parent
)
:
QWidget
(
parent
)
QWidget
(
parent
)
,
mInitialized
(
false
)
{
setWindowFlags
(
Qt
::
Window
|
Qt
::
WindowStaysOnTopHint
|
...
...
@@ -123,6 +123,7 @@ void TimeTooltip::buildPath()
void
TimeTooltip
::
setTip
(
const
QPoint
&
target
,
const
QString
&
time
,
const
QString
&
text
)
{
mInitialized
=
true
;
mDisplayedText
=
time
;
if
(
!
text
.
isEmpty
()
)
mDisplayedText
.
append
(
" - "
).
append
(
text
);
...
...
@@ -138,6 +139,11 @@ void TimeTooltip::setTip( const QPoint& target, const QString& time, const QStri
update
();
}
void
TimeTooltip
::
show
()
{
QWidget
::
setVisible
(
mInitialized
);
}
void
TimeTooltip
::
paintEvent
(
QPaintEvent
*
)
{
QPainter
p
(
this
);
...
...
modules/gui/qt4/util/timetooltip.hpp
View file @
0891bbe7
...
...
@@ -37,6 +37,7 @@ class TimeTooltip : public QWidget
public:
explicit
TimeTooltip
(
QWidget
*
parent
=
0
);
void
setTip
(
const
QPoint
&
pos
,
const
QString
&
time
,
const
QString
&
text
);
virtual
void
show
();
protected:
virtual
void
paintEvent
(
QPaintEvent
*
);
...
...
@@ -53,6 +54,7 @@ private:
QPainterPath
mPainterPath
;
QBitmap
mMask
;
int
mTipX
;
bool
mInitialized
;
};
#endif // TIMETOOLTIP_H
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