OGS
StratWindow Class Reference

Detailed Description

Creates a window to visualise the stratigraphy of a borehole.

Definition at line 28 of file StratWindow.h.

#include <StratWindow.h>

Inheritance diagram for StratWindow:
[legend]
Collaboration diagram for StratWindow:
[legend]

Public Member Functions

 StratWindow (GeoLib::StationBorehole *station, std::map< std::string, DataHolderLib::Color > *stratColors=nullptr, QWidget *parent=nullptr)
 
 ~StratWindow () override
 

Private Slots

void on_closeButton_clicked ()
 

Private Member Functions

void resizeWindow ()
 Automatically resize window based on the measurements of the borehole.
 

Constructor & Destructor Documentation

◆ StratWindow()

StratWindow::StratWindow ( GeoLib::StationBorehole * station,
std::map< std::string, DataHolderLib::Color > * stratColors = nullptr,
QWidget * parent = nullptr )
explicit

Constructor

Parameters
stationThe borehole object to be visualised.
stratColorsA color map.
parentThe parent QWidget.

Definition at line 19 of file StratWindow.cpp.

23 : QWidget(parent)
24{
25 setupUi(this);
26 stationView->setRenderHints(QPainter::Antialiasing);
27 stationView->setStation(station, stratColors);
29}
void resizeWindow()
Automatically resize window based on the measurements of the borehole.

References resizeWindow().

◆ ~StratWindow()

StratWindow::~StratWindow ( )
inlineoverride

Definition at line 43 of file StratWindow.h.

43{ this->destroy(); }

Member Function Documentation

◆ on_closeButton_clicked

void StratWindow::on_closeButton_clicked ( )
privateslot

Definition at line 31 of file StratWindow.cpp.

32{
33 this->close();
34}

◆ resizeWindow()

void StratWindow::resizeWindow ( )
private

Automatically resize window based on the measurements of the borehole.

Definition at line 36 of file StratWindow.cpp.

37{
38 int width = (stationView->getWidth() > 800) ? 800 : stationView->getWidth();
39 int height =
40 (stationView->getHeight() > 600) ? 600 : stationView->getHeight();
41 resize(width, height);
42}

Referenced by StratWindow().


The documentation for this class was generated from the following files: