mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: add width() function to DiveCartesian axis
To properly layout the profile we need to know the expected space required by the vertical axes. In the general case, format the the text "999". For the partial-pressure-axis, use "0.99". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f713858ba4
commit
7dd9b65df0
4 changed files with 36 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
|||
#define DIVETEXTITEM_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QFont>
|
||||
#include <QGraphicsItemGroup>
|
||||
|
||||
class QBrush;
|
||||
|
@ -20,6 +21,7 @@ public:
|
|||
void setBrush(const QBrush &brush);
|
||||
const QString &text();
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
static QFont getFont(double dpr, double scale);
|
||||
|
||||
private:
|
||||
void updateText();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue