2021-04-12 21:34:28 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
// The profile and its toolbars.
|
|
|
|
|
|
|
|
#ifndef PROFILEWIDGET_H
|
|
|
|
#define PROFILEWIDGET_H
|
|
|
|
|
|
|
|
#include "ui_profilewidget.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
class ProfileWidget2;
|
2021-06-30 05:17:40 +00:00
|
|
|
class EmptyView;
|
|
|
|
class QStackedWidget;
|
2021-04-12 21:34:28 +00:00
|
|
|
|
|
|
|
class ProfileWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ProfileWidget();
|
|
|
|
~ProfileWidget();
|
|
|
|
std::unique_ptr<ProfileWidget2> view;
|
|
|
|
void plotCurrentDive();
|
|
|
|
void setPlanState(const struct dive *d, int dc);
|
|
|
|
void setEditState(const struct dive *d, int dc);
|
|
|
|
void setEnabledToolbar(bool enabled);
|
|
|
|
private
|
|
|
|
slots:
|
|
|
|
void unsetProfHR();
|
|
|
|
void unsetProfTissues();
|
|
|
|
private:
|
2021-06-30 05:17:40 +00:00
|
|
|
std::unique_ptr<EmptyView> emptyView;
|
2021-04-12 21:34:28 +00:00
|
|
|
std::vector<QAction *> toolbarActions;
|
|
|
|
Ui::ProfileWidget ui;
|
2021-06-30 05:17:40 +00:00
|
|
|
QStackedWidget *stack;
|
2021-04-12 21:34:28 +00:00
|
|
|
void setDive(const struct dive *d);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PROFILEWIDGET_H
|