summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divetooltipitem.cpp
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-09 19:04:59 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-09 14:42:07 -0800
commit8bb5cd60122e3f85d08f21bb7b9e1b7ef11aacb0 (patch)
treed66748ca30a4e29a8c75c88445ad7afa21b2150f /qt-ui/profile/divetooltipitem.cpp
parent9b84f8216000595a12d0c4b3b3a301c62aa1b7b8 (diff)
downloadsubsurface-8bb5cd60122e3f85d08f21bb7b9e1b7ef11aacb0.tar.gz
ToolTipItem class improvements
* Initialize every ToolTipItem variable member in initialize list. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divetooltipitem.cpp')
-rw-r--r--qt-ui/profile/divetooltipitem.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp
index 26d19ecc3..fb8729679 100644
--- a/qt-ui/profile/divetooltipitem.cpp
+++ b/qt-ui/profile/divetooltipitem.cpp
@@ -135,12 +135,16 @@ void ToolTipItem::expand()
status = EXPANDED;
}
-ToolTipItem::ToolTipItem(QGraphicsItem* parent): QGraphicsPathItem(parent), background(0)
+ToolTipItem::ToolTipItem(QGraphicsItem* parent) : QGraphicsPathItem(parent),
+ background(0),
+ separator(new QGraphicsLineItem(this)),
+ title(new QGraphicsSimpleTextItem(tr("Information"), this)),
+ status(COLLAPSED),
+ timeAxis(0)
{
- title = new QGraphicsSimpleTextItem(tr("Information"), this);
- separator = new QGraphicsLineItem(this);
+ memset(&pInfo, 0, sizeof(pInfo));
+
setFlags(ItemIgnoresTransformations | ItemIsMovable | ItemClipsChildrenToShape);
- status = COLLAPSED;
updateTitlePosition();
setZValue(99);
}