mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: for printing/mobile access ProfileScene directly
Instead of using the interactive ProfileWidget2, just use the ProfileScene to render the profile for printing, export and mobile. One layer (QWidget) less. This removes all the kludges for handling DPR on mobile. Thus, the rendering will now be off and have to be fixed by redoing the scaling code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
84ebd1d67a
commit
51dc5113c2
10 changed files with 70 additions and 136 deletions
|
|
@ -2,9 +2,11 @@
|
|||
#ifndef QMLPROFILE_H
|
||||
#define QMLPROFILE_H
|
||||
|
||||
#include "profilewidget2.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
#include <QQuickPaintedItem>
|
||||
#include <memory>
|
||||
|
||||
class ProfileScene;
|
||||
|
||||
class QMLProfile : public QQuickPaintedItem
|
||||
{
|
||||
|
|
@ -16,6 +18,7 @@ class QMLProfile : public QQuickPaintedItem
|
|||
|
||||
public:
|
||||
explicit QMLProfile(QQuickItem *parent = 0);
|
||||
~QMLProfile();
|
||||
|
||||
void paint(QPainter *painter);
|
||||
|
||||
|
|
@ -36,7 +39,7 @@ private:
|
|||
qreal m_devicePixelRatio;
|
||||
int m_margin;
|
||||
qreal m_xOffset, m_yOffset;
|
||||
QScopedPointer<ProfileWidget2> m_profileWidget;
|
||||
std::unique_ptr<ProfileScene> m_profileWidget;
|
||||
void updateProfile();
|
||||
void createProfileView();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue