mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: reimplement DivePercentageItem
The tissue percentages were realized as 16 independent polygons. That didn't work at all with the new absolute scaling. Reimplement the item and blast it onto a pixmap. Not only is this artifact-free, it also should (hopefully) be quite a bit more efficient than painting numerous lines. In contrast to the old code, this does access the plot_info structure directly instead of using the model. Not so much for performance reason, but rather to make things more robust: We have a strongly typed language. Why would we shoehorn data through the weakly typed QVariant and mess with wierd index-arithmetics. Makes no sense to me. Qt-model have to be used for interfacing with Qt. They are terrible for intra-application data transfer. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
24cf6709e3
commit
505e4e47eb
10 changed files with 177 additions and 89 deletions
|
@ -41,6 +41,7 @@ public:
|
|||
void setFontLabelScale(qreal scale);
|
||||
double minimum() const;
|
||||
double maximum() const;
|
||||
std::pair<double, double> screenMinMax() const;
|
||||
qreal valueAt(const QPointF &p) const;
|
||||
qreal posAtValue(qreal value) const;
|
||||
void setColor(const QColor &color);
|
||||
|
@ -48,7 +49,7 @@ public:
|
|||
void animateChangeLine(const QRectF &rect, int animSpeed);
|
||||
void setTextVisible(bool arg1);
|
||||
void setLinesVisible(bool arg1);
|
||||
void setLine(const QLineF& line);
|
||||
void setLine(const QLineF &line);
|
||||
virtual void updateTicks(int animSpeed);
|
||||
double width() const; // only for vertical axes
|
||||
double height() const; // only for horizontal axes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue