19#include <QGraphicsItem>
40 std::map<std::string, DataHolderLib::Color>* stratColors =
nullptr,
41 QGraphicsItem* parent =
nullptr);
48 void paint(QPainter* painter,
49 const QStyleOptionGraphicsItem* option,
50 QWidget* widget)
override;
57 double logHeight(
double h)
const {
return log(h + 1) * 100; }
Definition of the Color class.
Definition of the StationBorehole class.
A borehole as a geometric object.
A 2D bar visualisation of a borehole stratigraphy.
double logHeight(double h) const
Calculates the height for a soil layer by "log(d+1)*100".
double totalLogHeight() const
Calculates the total height of the bar by calculating and adding the log-height for all layers in the...
~StratBar() override=default
static const int BARWIDTH
The default width of the bar.
QRectF boundingRect() const override
Returns the bounding rectangle of the bar.
std::map< std::string, DataHolderLib::Color > _stratColors
GeoLib::StationBorehole * _station
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Paints the bar.
StratBar(GeoLib::StationBorehole *station, std::map< std::string, DataHolderLib::Color > *stratColors=nullptr, QGraphicsItem *parent=nullptr)
Constructor.