mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: first rudimentary port of the ToolTipItem to qt-quick
Still behaves weirdly when panning the chart. No support for moving the ToolTipItem. Doesn't add information on bookmarks under the mouse cursor. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e3767976a3
commit
13c9218ecf
14 changed files with 260 additions and 48 deletions
|
|
@ -162,6 +162,11 @@ ProfileScene::~ProfileScene()
|
|||
{
|
||||
}
|
||||
|
||||
const plot_info &ProfileScene::getPlotInfo() const
|
||||
{
|
||||
return plotInfo;
|
||||
}
|
||||
|
||||
void ProfileScene::clear()
|
||||
{
|
||||
for (AbstractProfilePolygonItem *item: profileItems)
|
||||
|
|
@ -613,3 +618,8 @@ double ProfileScene::calcZoomPosition(double zoom, double originalPos, double de
|
|||
double newPos = newRelStart / factor;
|
||||
return std::clamp(newPos, 0.0, 1.0);
|
||||
}
|
||||
|
||||
int ProfileScene::timeAt(QPointF pos) const
|
||||
{
|
||||
return lrint(timeAxis->valueAt(pos));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue