mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Start to make things sane again...
Change the 'namespace ItemPos' declared on the commit before this one to a struct that will have all the 'on canvas' and 'off canvas' positions and representations of all items, so we know where to change. Also remove the remaining stuff from planer that was going to exist on this profile. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9756be59aa
commit
86bc3bd58f
2 changed files with 42 additions and 37 deletions
|
|
@ -44,12 +44,6 @@ struct AbstractProfilePolygonItem;
|
|||
|
||||
class ProfileWidget2 : public QGraphicsView {
|
||||
Q_OBJECT
|
||||
void fixBackgroundPos();
|
||||
void scrollViewTo(const QPoint& pos);
|
||||
void setupSceneAndFlags();
|
||||
void setupItemSizes();
|
||||
void addItemsToScene();
|
||||
void setupItemOnScene();
|
||||
public:
|
||||
enum State{ EMPTY, PROFILE, EDIT, ADD, PLAN, INVALID };
|
||||
enum Items{BACKGROUND, PROFILE_Y_AXIS, GAS_Y_AXIS, TIME_AXIS, DEPTH_CONTROLLER, TIME_CONTROLLER, COLUMNS};
|
||||
|
|
@ -69,6 +63,13 @@ protected:
|
|||
signals:
|
||||
void startProfileState();
|
||||
void startEmptyState();
|
||||
private: /*methods*/
|
||||
void fixBackgroundPos();
|
||||
void scrollViewTo(const QPoint& pos);
|
||||
void setupSceneAndFlags();
|
||||
void setupItemSizes();
|
||||
void addItemsToScene();
|
||||
void setupItemOnScene();
|
||||
private:
|
||||
DivePlotDataModel *dataModel;
|
||||
State currentState;
|
||||
|
|
@ -83,8 +84,6 @@ private:
|
|||
PartialGasPressureAxis *gasYAxis;
|
||||
TemperatureAxis *temperatureAxis;
|
||||
TimeAxis *timeAxis;
|
||||
DiveRectItem *depthController;
|
||||
DiveRectItem *timeController;
|
||||
DiveProfileItem *diveProfileItem;
|
||||
DiveCartesianPlane *cartesianPlane;
|
||||
DiveTemperatureItem *temperatureItem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue