OGS
StratWindow Class Reference

Detailed Description

Creates a window to visualise the stratigraphy of a borehole.

Definition at line 17 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 8 of file StratWindow.cpp.

12 : QWidget(parent)
13{
14 setupUi(this);
15 stationView->setRenderHints(QPainter::Antialiasing);
16 stationView->setStation(station, stratColors);
18}
void resizeWindow()
Automatically resize window based on the measurements of the borehole.

References resizeWindow().

◆ ~StratWindow()

StratWindow::~StratWindow ( )
inlineoverride

Definition at line 32 of file StratWindow.h.

32{ this->destroy(); }

Member Function Documentation

◆ on_closeButton_clicked

void StratWindow::on_closeButton_clicked ( )
privateslot

Definition at line 20 of file StratWindow.cpp.

21{
22 this->close();
23}

◆ resizeWindow()

void StratWindow::resizeWindow ( )
private

Automatically resize window based on the measurements of the borehole.

Definition at line 25 of file StratWindow.cpp.

26{
27 int width = (stationView->getWidth() > 800) ? 800 : stationView->getWidth();
28 int height =
29 (stationView->getHeight() > 600) ? 600 : stationView->getHeight();
30 resize(width, height);
31}

Referenced by StratWindow().


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