18#include <QGraphicsView>
37 explicit StratView(QWidget* parent =
nullptr) { Q_UNUSED(parent); }
42 std::map<std::string, DataHolderLib::Color>* stratColors =
nullptr);
45 int getHeight() {
return static_cast<int>((
_scene->itemsBoundingRect()).height()); }
48 int getWidth() {
return static_cast<int>((
_scene->itemsBoundingRect()).width()); }
Definition of the StratScene class.
A borehole as a geometric object.
The scene for the visualisation of the stratigraphy of a borehole.
static const int MARGIN
The margin between the boundary of the scene and the bounding box of all items within the scene.
A view in which to display the stratigraphy of a borehole.
void saveAsImage(QString fileName)
void update()
Updates the view automatically when a Borehole is added or when the window containing the view change...
StratView(QWidget *parent=nullptr)
int getHeight()
Returns the height of the bounding rectangle of all objects within the scene.
void initialize()
Initialises the view.
void setStation(GeoLib::StationBorehole *station, std::map< std::string, DataHolderLib::Color > *stratColors=nullptr)
Sets the Borehole whose data should be visualised.
QSize minimumSizeHint() const override
The minimum size of the window.
void resizeEvent(QResizeEvent *event) override
Resizes the scene.
int getWidth()
Returns the width of the bounding rectangle of all objects within the scene.
QSize sizeHint() const override
The default size of the window.