mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove profile widget code from mainwindow
Create a new class that encapsulates the profile-widget UI. This is called ProfileWidget, which might be confusing since the actual display is called ProfileWidget2. However, the plan is to rename the latter to ProfileView. After all, it is also used to print and to show the profile on mobile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
6b615ccb4b
commit
13d4f595cb
7 changed files with 443 additions and 365 deletions
34
desktop-widgets/profilewidget.h
Normal file
34
desktop-widgets/profilewidget.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
// 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;
|
||||
|
||||
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:
|
||||
std::vector<QAction *> toolbarActions;
|
||||
Ui::ProfileWidget ui;
|
||||
void setDive(const struct dive *d);
|
||||
};
|
||||
|
||||
#endif // PROFILEWIDGET_H
|
Loading…
Add table
Add a link
Reference in a new issue