mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Adapt the ToolTip to work on the new profile
With this patch the tooltip is ready to work on the new profile, we just need to actually use it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
19585d9a13
commit
40cb57b202
5 changed files with 54 additions and 2 deletions
|
@ -56,6 +56,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform);
|
||||
setMouseTracking(true);
|
||||
|
||||
toolTipItem->setTimeAxis(timeAxis);
|
||||
scene()->addItem(toolTipItem);
|
||||
|
||||
// Creating the needed items.
|
||||
|
@ -387,6 +388,8 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
|||
int maxdepth = get_maxdepth(&pInfo);
|
||||
|
||||
dataModel->setDive(current_dive, pInfo);
|
||||
toolTipItem->setPlotInfo(pInfo);
|
||||
|
||||
// It seems that I'll have a lot of boilerplate setting the model / axis for
|
||||
// each item, I'll mostly like to fix this in the future, but I'll keep at this for now.
|
||||
profileYAxis->setMaximum(maxdepth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue