profile: move creation of mobile profile-widget into function

The current way of handling the "print scale factor" is
complex: The text fields are added and later resized via
signals. Things could be simplified by just redoing the
chart when changing the scale factor.

Moreover, in the future we will want to adapt the size of the
axes depending on the size of the texts.

As a first step, factor out the creation of the profile-widget.
This can then be used to recreate the profile when changing
the scale factor.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-05-31 21:44:37 +02:00 committed by Dirk Hohndel
parent 23ab6b7a8c
commit e844b8dcad
2 changed files with 11 additions and 5 deletions

View file

@ -38,6 +38,7 @@ private:
qreal m_xOffset, m_yOffset;
QScopedPointer<ProfileWidget2> m_profileWidget;
void updateProfile();
void createProfileView();
private slots:
void divesChanged(const QVector<dive *> &dives, DiveField);