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:
Tomaz Canabrava 2014-02-07 15:32:39 -02:00 committed by Dirk Hohndel
parent 9756be59aa
commit 86bc3bd58f
2 changed files with 42 additions and 37 deletions

View file

@ -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;