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
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
Hide 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$
* $Id$
*
*
* Authors: Ludovic Fauvet <etix@l0cal.com>
* Authors: Ludovic Fauvet <etix@l0cal.com>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define TIP_HEIGHT 5
#define TIP_HEIGHT 5
TimeTooltip
::
TimeTooltip
(
QWidget
*
parent
)
:
TimeTooltip
::
TimeTooltip
(
QWidget
*
parent
)
:
QWidget
(
parent
)
QWidget
(
parent
)
,
mInitialized
(
false
)
{
{
setWindowFlags
(
Qt
::
Window
|
setWindowFlags
(
Qt
::
Window
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
WindowStaysOnTopHint
|
...
@@ -123,6 +123,7 @@ void TimeTooltip::buildPath()
...
@@ -123,6 +123,7 @@ void TimeTooltip::buildPath()
void
TimeTooltip
::
setTip
(
const
QPoint
&
target
,
const
QString
&
time
,
const
QString
&
text
)
void
TimeTooltip
::
setTip
(
const
QPoint
&
target
,
const
QString
&
time
,
const
QString
&
text
)
{
{
mInitialized
=
true
;
mDisplayedText
=
time
;
mDisplayedText
=
time
;
if
(
!
text
.
isEmpty
()
)
if
(
!
text
.
isEmpty
()
)
mDisplayedText
.
append
(
" - "
).
append
(
text
);
mDisplayedText
.
append
(
" - "
).
append
(
text
);
...
@@ -138,6 +139,11 @@ void TimeTooltip::setTip( const QPoint& target, const QString& time, const QStri
...
@@ -138,6 +139,11 @@ void TimeTooltip::setTip( const QPoint& target, const QString& time, const QStri
update
();
update
();
}
}
void
TimeTooltip
::
show
()
{
QWidget
::
setVisible
(
mInitialized
);
}
void
TimeTooltip
::
paintEvent
(
QPaintEvent
*
)
void
TimeTooltip
::
paintEvent
(
QPaintEvent
*
)
{
{
QPainter
p
(
this
);
QPainter
p
(
this
);
...
...
modules/gui/qt4/util/timetooltip.hpp
View file @
0891bbe7
...
@@ -37,6 +37,7 @@ class TimeTooltip : public QWidget
...
@@ -37,6 +37,7 @@ class TimeTooltip : public QWidget
public:
public:
explicit
TimeTooltip
(
QWidget
*
parent
=
0
);
explicit
TimeTooltip
(
QWidget
*
parent
=
0
);
void
setTip
(
const
QPoint
&
pos
,
const
QString
&
time
,
const
QString
&
text
);
void
setTip
(
const
QPoint
&
pos
,
const
QString
&
time
,
const
QString
&
text
);
virtual
void
show
();
protected:
protected:
virtual
void
paintEvent
(
QPaintEvent
*
);
virtual
void
paintEvent
(
QPaintEvent
*
);
...
@@ -53,6 +54,7 @@ private:
...
@@ -53,6 +54,7 @@ private:
QPainterPath
mPainterPath
;
QPainterPath
mPainterPath
;
QBitmap
mMask
;
QBitmap
mMask
;
int
mTipX
;
int
mTipX
;
bool
mInitialized
;
};
};
#endif // TIMETOOLTIP_H
#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