DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpModule::SpectrumViewer::SpectrumViewerWidget Class Reference
+ Inheritance diagram for DynExpModule::SpectrumViewer::SpectrumViewerWidget:

Classes

struct  SampleDataType
 

Public Member Functions

 SpectrumViewerWidget (SpectrumViewer &Owner, QModuleWidget *parent=nullptr)
 
 ~SpectrumViewerWidget ()=default
 
bool AllowResize () const noexcept override final
 Indicates the resizing behavior of the user interface window. Override to adjust. More...
 
const auto & GetUI () const noexcept
 
void InitializeUI (Util::SynchronizedPointer< SpectrumViewerData > &ModuleData)
 
void UpdateUI (Util::SynchronizedPointer< SpectrumViewerData > &ModuleData)
 
void SetData (SampleDataType &&SampleData, DynExpInstr::SpectrometerData::TimeType ExposureTime)
 
- Public Member Functions inherited from DynExp::QModuleWidget
 QModuleWidget (QModuleBase &Owner, QWidget *Parent=nullptr)
 Constructs a QModuleWidget instance. More...
 
 ~QModuleWidget ()=default
 
const auto & GetOwner () const noexcept
 Getter for the owning module. More...
 
Qt::WindowFlags GetQtWindowFlags () const noexcept
 Depending on thr return value of AllowResize(), returns either the return value of GetQtWindowFlagsResizable() or GetQtWindowFlagsNonResizable(). More...
 
std::string GetDataSaveDirectory () const
 Recalls a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to recall the directory the user has chosen last for saving a file. This directory is the same across all modules. More...
 
void SetDataSaveDirectory (std::string_view Directory) const
 Sets a path where modules might save recorded data to. Used by Util::PromptSaveFilePathModule() to store the directory the user has chosen last for saving a file. This directory is the same across all modules. More...
 

Private Types

using FinishedSavingDataGuardType = Util::OnDestruction< SpectrumViewerWidget, decltype(&SpectrumViewerWidget::FinishedSavingData)>
 

Private Slots

void OnSaveCSVClicked ()
 

Private Member Functions

void FinishedSavingData () noexcept
 

Private Attributes

QXYSeries * DataSeries
 
QChart * DataChart
 
QValueAxis * XAxis
 
QValueAxis * YAxis
 
Ui::SpectrumViewer ui
 
SampleDataType CurrentSpectrum
 
DynExpInstr::SpectrometerData::TimeType CurrentExposureTime {}
 
std::atomic_bool IsSavingData = false
 

Additional Inherited Members

- Static Public Member Functions inherited from DynExp::QModuleWidget
constexpr static Qt::WindowFlags GetQtWindowFlagsResizable ()
 Default Qt window flags for resizable module windows. More...
 
constexpr static Qt::WindowFlags GetQtWindowFlagsNonResizable ()
 Default Qt window flags for non-resizable module windows. More...
 

Detailed Description

Definition at line 25 of file SpectrumViewer.h.

Member Typedef Documentation

◆ FinishedSavingDataGuardType

Constructor & Destructor Documentation

◆ SpectrumViewerWidget()

DynExpModule::SpectrumViewer::SpectrumViewerWidget::SpectrumViewerWidget ( SpectrumViewer Owner,
QModuleWidget parent = nullptr 
)

Definition at line 9 of file SpectrumViewer.cpp.

◆ ~SpectrumViewerWidget()

DynExpModule::SpectrumViewer::SpectrumViewerWidget::~SpectrumViewerWidget ( )
default

Member Function Documentation

◆ AllowResize()

bool DynExpModule::SpectrumViewer::SpectrumViewerWidget::AllowResize ( ) const
inlinefinaloverridevirtualnoexcept

Indicates the resizing behavior of the user interface window. Override to adjust.

Returns
Return true when the window should be resizable by the user, false otherwise.

Reimplemented from DynExp::QModuleWidget.

Definition at line 48 of file SpectrumViewer.h.

◆ FinishedSavingData()

void DynExpModule::SpectrumViewer::SpectrumViewerWidget::FinishedSavingData ( )
inlineprivatenoexcept

Definition at line 57 of file SpectrumViewer.h.

◆ GetUI()

const auto& DynExpModule::SpectrumViewer::SpectrumViewerWidget::GetUI ( ) const
inlinenoexcept

Definition at line 50 of file SpectrumViewer.h.

◆ InitializeUI()

void DynExpModule::SpectrumViewer::SpectrumViewerWidget::InitializeUI ( Util::SynchronizedPointer< SpectrumViewerData > &  ModuleData)

Definition at line 26 of file SpectrumViewer.cpp.

◆ OnSaveCSVClicked

void DynExpModule::SpectrumViewer::SpectrumViewerWidget::OnSaveCSVClicked ( )
privateslot

Definition at line 146 of file SpectrumViewer.cpp.

◆ SetData()

void DynExpModule::SpectrumViewer::SpectrumViewerWidget::SetData ( SampleDataType &&  SampleData,
DynExpInstr::SpectrometerData::TimeType  ExposureTime 
)

Definition at line 114 of file SpectrumViewer.cpp.

◆ UpdateUI()

void DynExpModule::SpectrumViewer::SpectrumViewerWidget::UpdateUI ( Util::SynchronizedPointer< SpectrumViewerData > &  ModuleData)

Definition at line 58 of file SpectrumViewer.cpp.

Member Data Documentation

◆ CurrentExposureTime

DynExpInstr::SpectrometerData::TimeType DynExpModule::SpectrumViewer::SpectrumViewerWidget::CurrentExposureTime {}
private

Definition at line 68 of file SpectrumViewer.h.

◆ CurrentSpectrum

SampleDataType DynExpModule::SpectrumViewer::SpectrumViewerWidget::CurrentSpectrum
private

Definition at line 67 of file SpectrumViewer.h.

◆ DataChart

QChart* DynExpModule::SpectrumViewer::SpectrumViewerWidget::DataChart
private

Definition at line 61 of file SpectrumViewer.h.

◆ DataSeries

QXYSeries* DynExpModule::SpectrumViewer::SpectrumViewerWidget::DataSeries
private

Definition at line 60 of file SpectrumViewer.h.

◆ IsSavingData

std::atomic_bool DynExpModule::SpectrumViewer::SpectrumViewerWidget::IsSavingData = false
private

Definition at line 71 of file SpectrumViewer.h.

◆ ui

Ui::SpectrumViewer DynExpModule::SpectrumViewer::SpectrumViewerWidget::ui
private

Definition at line 65 of file SpectrumViewer.h.

◆ XAxis

QValueAxis* DynExpModule::SpectrumViewer::SpectrumViewerWidget::XAxis
private

Definition at line 62 of file SpectrumViewer.h.

◆ YAxis

QValueAxis* DynExpModule::SpectrumViewer::SpectrumViewerWidget::YAxis
private

Definition at line 63 of file SpectrumViewer.h.


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