OGS
StratScene.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <QGraphicsScene>
18
21
22class StratBar;
24
28class StratScene : public QGraphicsScene
29{
30public:
32 explicit StratScene(
34 std::map<std::string, DataHolderLib::Color>* stratColors = nullptr,
35 QObject* parent = nullptr);
36 ~StratScene() override;
37
39 static const int MARGIN = 50;
40
41private:
43 void addDepthLabels(std::vector<GeoLib::Point*> profile, double offset);
44
47 const QFont &font = QFont());
48
50 void addSoilNameLabels(std::vector<std::string> soilNames,
51 std::vector<GeoLib::Point*> profile,
52 double offset);
53
56 std::map<std::string, DataHolderLib::Color>* stratColors = nullptr);
57};
Definition of the Color class.
Definition of the StationBorehole class.
A borehole as a geometric object.
A QGraphicsTextItem that will ignore all geometric transformations.
A 2D bar visualisation of a borehole stratigraphy.
Definition StratBar.h:30
The scene for the visualisation of the stratigraphy of a borehole.
Definition StratScene.h:29
QNonScalableGraphicsTextItem * addNonScalableText(const QString &text, const QFont &font=QFont())
Add a non-scalable text item to the scene.
void addSoilNameLabels(std::vector< std::string > soilNames, std::vector< GeoLib::Point * > profile, double offset)
Adds text labels indicating the name of each soil layer.
StratScene(GeoLib::StationBorehole *station, std::map< std::string, DataHolderLib::Color > *stratColors=nullptr, QObject *parent=nullptr)
Constructor.
~StratScene() override
void addDepthLabels(std::vector< GeoLib::Point * > profile, double offset)
Adds text labels indicating the depth at the beginning and end of each soil layer.
static const int MARGIN
The margin between the boundary of the scene and the bounding box of all items within the scene.
Definition StratScene.h:39
StratBar * addStratBar(GeoLib::StationBorehole *station, std::map< std::string, DataHolderLib::Color > *stratColors=nullptr)
Add a stratigraphy-bar to the scene.