profile: render profile on desktop via QtQuick

This breaks all dynamic features, including animations,
zooming tooltips, planner-handles, etc. They will have to be
converted one-by-one to QtQuick, which will be a major pain,
as the ProfileView is destroyed by Qt6 on reparenting.
This means that the view cannot store any persistent state.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2023-05-20 14:27:20 +02:00
parent 7eecc85464
commit 75886dd4d6
25 changed files with 322 additions and 76 deletions

View file

@ -10,8 +10,9 @@
#include <vector>
struct dive;
class ProfileWidget2;
class ProfileView;
class EmptyView;
class QQuickWidget;
class QStackedWidget;
class ProfileWidget : public QWidget {
@ -19,7 +20,6 @@ class ProfileWidget : public QWidget {
public:
ProfileWidget();
~ProfileWidget();
std::unique_ptr<ProfileWidget2> view;
void plotDive(struct dive *d, int dc); // Attempt to keep DC number id dc < 0
void plotCurrentDive();
void setPlanState(const struct dive *d, int dc);
@ -40,6 +40,8 @@ slots:
void stopMoved(int count);
void stopEdited();
private:
ProfileView *getView();
std::unique_ptr<QQuickWidget> viewWidget;
std::unique_ptr<EmptyView> emptyView;
std::vector<QAction *> toolbarActions;
Ui::ProfileWidget ui;