mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: replace QtCharts' axes
Replace by custom implementation, with the ultimate goal to remove the QtCharts module. This doesn't yet display axis titles or a grid. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
598058e21e
commit
4ab9f1c6b0
15 changed files with 377 additions and 225 deletions
|
|
@ -167,8 +167,7 @@ PieSeries::~PieSeries()
|
|||
|
||||
void PieSeries::updatePositions()
|
||||
{
|
||||
QtCharts::QChart *c = chart();
|
||||
QRectF plotRect = c->plotArea();
|
||||
QRectF plotRect = chart->plotArea();
|
||||
center = plotRect.center();
|
||||
radius = std::min(plotRect.width(), plotRect.height()) * pieSize / 2.0;
|
||||
QRectF rect(center.x() - radius, center.y() - radius, 2.0 * radius, 2.0 * radius);
|
||||
|
|
@ -247,7 +246,7 @@ bool PieSeries::hover(QPointF pos)
|
|||
if (highlighted >= 0 && highlighted < (int)items.size()) {
|
||||
items[highlighted].highlight(highlighted, true, (int)items.size());
|
||||
if (!information)
|
||||
information.reset(new InformationBox(chart()));
|
||||
information.reset(new InformationBox(chart));
|
||||
information->setText(makeInfo(highlighted), pos);
|
||||
} else {
|
||||
information.reset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue