DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
SpectrumViewer.cpp
Go to the documentation of this file.
1// This file is part of DynExp.
2
3#include "stdafx.h"
4#include "moc_SpectrumViewer.cpp"
5#include "ui_SpectrumViewer.h"
6#include "SpectrumViewer.h"
7
9{
11 : QModuleWidget(Owner, parent),
12 ui(std::make_unique<Ui::SpectrumViewer>()),
13 DataSeries(nullptr), DataChart(nullptr), XAxis(nullptr), YAxis(nullptr)
14 {
15 ui->setupUi(this);
16
17 // For shortcuts
18 this->addAction(ui->action_Run);
19 this->addAction(ui->action_Stop);
20
21 DataChart = new QChart();
22 ui->Spectrum->setChart(DataChart); // Takes ownership of DataChart.
23 ui->Spectrum->setRenderHint(QPainter::Antialiasing);
25 DataChart->legend()->setVisible(false);
26 }
27
29 {
30 ui->SBExposureTime->setRange(ModuleData->MinExposureTime.count(), ModuleData->MaxExposureTime.count());
31 ui->SBExposureTime->setSuffix(" " + QString::fromStdString(Util::ToUnitStr<DynExpInstr::SpectrometerData::TimeType>()));
32 ui->SBLowerFrequency->setRange(ModuleData->MinFrequency, ModuleData->MaxFrequency);
33 ui->SBLowerFrequency->setSuffix(" " + QString(DynExpInstr::SpectrometerData::FrequencyUnitTypeToStr(ModuleData->FrequencyUnit)));
34 ui->SBUpperFrequency->setRange(ModuleData->MinFrequency, ModuleData->MaxFrequency);
35 ui->SBUpperFrequency->setSuffix(" " + QString(DynExpInstr::SpectrometerData::FrequencyUnitTypeToStr(ModuleData->FrequencyUnit)));
36
37 if (XAxis)
38 {
39 DataChart->removeAxis(XAxis);
40 delete XAxis;
41 }
42 if (YAxis)
43 {
44 DataChart->removeAxis(YAxis);
45 delete YAxis;
46 }
47
48 XAxis = new QValueAxis(this);
49 YAxis = new QValueAxis(this);
50 XAxis->setTitleText(QString("Frequency in ") + DynExpInstr::SpectrometerData::FrequencyUnitTypeToStr(ModuleData->FrequencyUnit));
51 XAxis->setLabelFormat("%d");
52 YAxis->setTitleText(QString("Intensity in ") + DynExpInstr::SpectrometerData::IntensityUnitTypeToStr(ModuleData->IntensityUnit));
53 YAxis->setLabelFormat("%d");
54
55 // Chart takes ownership of axes.
56 DataChart->addAxis(XAxis, Qt::AlignBottom);
57 DataChart->addAxis(YAxis, Qt::AlignLeft);
58 }
59
61 {
62 ui->action_Save_CSV->setEnabled(ModuleData->CapturingState != DynExpInstr::SpectrometerData::CapturingStateType::Capturing);
63 ui->action_Run->setEnabled(ModuleData->CapturingState != DynExpInstr::SpectrometerData::CapturingStateType::Capturing);
64 ui->action_Stop->setEnabled(ModuleData->CapturingState == DynExpInstr::SpectrometerData::CapturingStateType::Capturing);
65 ui->SBExposureTime->setEnabled(ModuleData->CapturingState != DynExpInstr::SpectrometerData::CapturingStateType::Capturing);
66 ui->SBLowerFrequency->setEnabled(ModuleData->CapturingState != DynExpInstr::SpectrometerData::CapturingStateType::Capturing);
67 ui->SBUpperFrequency->setEnabled(ModuleData->CapturingState != DynExpInstr::SpectrometerData::CapturingStateType::Capturing);
68
69 {
70 const QSignalBlocker Blocker(ui->action_SilentMode);
71 ui->action_SilentMode->setChecked(ModuleData->SilentModeEnabled);
72 } // Blocker destroyed here.
73
74 if (!ui->SBExposureTime->hasFocus())
75 {
76 const QSignalBlocker Blocker(ui->SBExposureTime);
77 ui->SBExposureTime->setValue(ModuleData->CurrentExposureTime.count());
78 }
79
80 if (!ui->SBLowerFrequency->hasFocus())
81 {
82 const QSignalBlocker Blocker(ui->SBLowerFrequency);
83 ui->SBLowerFrequency->setValue(ModuleData->CurrentLowerFrequency);
84 }
85
86 if (!ui->SBUpperFrequency->hasFocus())
87 {
88 const QSignalBlocker Blocker(ui->SBUpperFrequency);
89 ui->SBUpperFrequency->setValue(ModuleData->CurrentUpperFrequency);
90 }
91
92 switch (ModuleData->CapturingState)
93 {
95 ui->LState->setText(" Acquiring spectrum...");
96 ui->LState->setStyleSheet(DynExpUI::StatusBarBusyStyleSheet);
97 break;
99 ui->LState->setText(" The spectrometer is in a warning state.");
100 ui->LState->setStyleSheet(DynExpUI::StatusBarWarningStyleSheet);
101 break;
103 ui->LState->setText(" The spectrometer is in an error state.");
104 ui->LState->setStyleSheet(DynExpUI::StatusBarErrorStyleSheet);
105 break;
106 default:
107 ui->LState->setText(" Ready");
108 ui->LState->setStyleSheet("");
109 }
110
111 ui->PBProgress->setVisible(ModuleData->CapturingState == DynExpInstr::SpectrometerData::CapturingStateType::Capturing
112 && ModuleData->CapturingProgress > 0);
113 ui->PBProgress->setValue(ModuleData->CapturingProgress > 0 ? Util::NumToT<int>(ModuleData->CapturingProgress) : 0);
114 }
115
117 {
118 if (SampleData.Points.empty() || IsSavingData)
119 return;
120
121 CurrentSpectrum = std::move(SampleData);
122 CurrentExposureTime = ExposureTime;
123
124 // DataSeries->replace() does not work...
125 DataChart->removeAllSeries();
126
127 DataSeries = new QLineSeries(this);
129 DataSeries->setPointsVisible(false);
130
131 DataChart->axes()[0]->setRange(CurrentSpectrum.MinValues.x(), CurrentSpectrum.MaxValues.x());
133 {
134 auto Factor = std::abs(CurrentSpectrum.MinValues.y()) * .01;
135 if (Factor == 0)
136 Factor = 2;
137
138 DataChart->axes()[1]->setRange(CurrentSpectrum.MinValues.y() - Factor, CurrentSpectrum.MaxValues.y() + Factor);
139 }
140 else
141 DataChart->axes()[1]->setRange(CurrentSpectrum.MinValues.y(), CurrentSpectrum.MaxValues.y());
142
143 DataChart->addSeries(DataSeries);
144 DataSeries->attachAxis(DataChart->axes()[0]);
145 DataSeries->attachAxis(DataChart->axes()[1]);
146 }
147
149 {
150 // As soon as FinishedSavingDataGuard is destroyed, IsSavingData is set back to false.
152 IsSavingData = true;
153
154 auto Filename = Util::PromptSaveFilePathModule(this, "Save data", ".csv", " Comma-separated values file (*.csv)");
155 if (Filename.isEmpty())
156 return;
157
159 QMessageBox::warning(this, "DynExp - Error", "Error writing data to file.");
160 }
161
172
174 {
175 std::stringstream CSVData;
176 CSVData << std::setprecision(6);
177 CSVData << "ExposureTime = " << ExposureTime.count() << " " << Util::ToUnitStr<DynExpInstr::SpectrometerData::TimeType>() << "\n";
178 CSVData << "HEADER_END\n";
179
180 CSVData << "f[" << DynExpInstr::SpectrometerData::FrequencyUnitTypeToStr(FrequencyUnit)
181 << "];I[" << DynExpInstr::SpectrometerData::IntensityUnitTypeToStr(IntensityUnit) << "]\n";
182 for (const auto& Sample : Points)
183 CSVData << Sample.x() << ";" << Sample.y() << "\n";
184
185 return CSVData.str();
186 }
187
192
194 {
197 MinFrequency = 0.0;
198 MaxFrequency = 0.0;
199 MinExposureTime = DynExpInstr::SpectrometerData::TimeType();
200 MaxExposureTime = DynExpInstr::SpectrometerData::TimeType();
202 AcquisitionExposureTime = DynExpInstr::SpectrometerData::TimeType();
203 CurrentLowerFrequency = 0.0;
204 CurrentUpperFrequency = 0.0;
205 SilentModeEnabled = false;
207 CapturingProgress = 0.0;
208 AutoSaveFilename.clear();
210 SpectrumRecordingPaused = false;
211
212 UIInitialized = false;
213 }
214
216 {
217 try
218 {
219 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance.ModuleDataGetter());
220 auto InstrData = DynExp::dynamic_InstrumentData_cast<DynExpInstr::Spectrometer>(ModuleData->GetSpectrometer()->GetInstrumentData());
221
222 ModuleData->CurrentExposureTime = InstrData->GetCurrentExposureTime();
223 ModuleData->CurrentLowerFrequency = InstrData->GetCurrentLowerFrequency();
224 ModuleData->CurrentUpperFrequency = InstrData->GetCurrentUpperFrequency();
225 ModuleData->SilentModeEnabled = InstrData->GetSilentModeEnabled();
226 ModuleData->CapturingState = InstrData->GetCapturingState();
227 ModuleData->CapturingProgress = InstrData->GetCapturingProgress();
228
229 if (InstrData->HasSpectrum() && !ModuleData->SpectrumRecordingPaused)
230 {
231 ModuleData->CurrentSpectrum = ProcessSpectrum(InstrData->GetSpectrum(), ModuleData);
232
233 if (!ModuleData->CurrentSpectrum.Points.empty() && !ModuleData->AutoSaveFilename.empty())
234 {
235 if (ModuleData->GetCommunicator().valid())
236 ModuleData->GetCommunicator()->PostEvent(*this, FinishedEvent{});
237
238 ModuleData->AutoSaveFilename.clear();
239 }
240 }
241
242 NumFailedUpdateAttempts = 0;
243 } // ModuleData and instruments' data unlocked here.
244 catch (const Util::TimeoutException& e)
245 {
246 if (NumFailedUpdateAttempts++ >= 3)
247 Instance.GetOwner().SetWarning(e);
248 }
249
251 }
252
254 {
255 NumFailedUpdateAttempts = 0;
256 }
257
258 std::unique_ptr<DynExp::QModuleWidget> SpectrumViewer::MakeUIWidget()
259 {
260 auto Widget = std::make_unique<SpectrumViewerWidget>(*this);
261
262 Connect(Widget->GetUI()->action_Run, &QAction::triggered, this, &SpectrumViewer::OnRunClicked);
263 Connect(Widget->GetUI()->action_Stop, &QAction::triggered, this, &SpectrumViewer::OnStopClicked);
264 Connect(Widget->GetUI()->action_SilentMode, &QAction::toggled, this, &SpectrumViewer::OnSilentModeToggled);
265 Connect(Widget->GetUI()->SBExposureTime, QOverload<int>::of(&QSpinBox::valueChanged), this, &SpectrumViewer::OnExposureTimeChanged);
266 Connect(Widget->GetUI()->SBLowerFrequency, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &SpectrumViewer::OnLowerLimitChanged);
267 Connect(Widget->GetUI()->SBUpperFrequency, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &SpectrumViewer::OnUpperLimitChanged);
268
269 return Widget;
270 }
271
272 void SpectrumViewer::UpdateUIChild(const ModuleBase::ModuleDataGetterType& ModuleDataGetter)
273 {
274 auto Widget = GetWidget<SpectrumViewerWidget>();
275 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(ModuleDataGetter());
276
277 if (!ModuleData->IsUIInitialized())
278 {
279 Widget->InitializeUI(ModuleData);
280 ModuleData->SetUIInitialized();
281 }
282
283 Widget->UpdateUI(ModuleData);
284
285 if (!ModuleData->CurrentSpectrum.Points.empty())
286 Widget->SetData(std::move(ModuleData->CurrentSpectrum), ModuleData->AcquisitionExposureTime);
287 }
288
291 {
292 SpectrumViewerWidget::SampleDataType TransformedSpectrum;
293 TransformedSpectrum.FrequencyUnit = Spectrum.GetFrequencyUnit();
294 TransformedSpectrum.IntensityUnit = Spectrum.GetIntensityUnit();
295
296 if (!Spectrum.HasSpectrum())
297 return TransformedSpectrum;
298
299 double YMin(std::numeric_limits<double>::max()), YMax(std::numeric_limits<double>::lowest());
300 for (const auto& Sample : Spectrum.GetSpectrum())
301 {
302 TransformedSpectrum.Points.append({ Sample.first, Sample.second });
303
304 YMin = std::min(YMin, Sample.second);
305 YMax = std::max(YMax, Sample.second);
306 }
307
308 TransformedSpectrum.MinValues = { Spectrum.GetSpectrum().begin()->first, YMin};
309 TransformedSpectrum.MaxValues = { Spectrum.GetSpectrum().rbegin()->first, YMax};
310
311 if (!TransformedSpectrum.Points.empty() && !ModuleData->AutoSaveFilename.empty())
312 SaveSpectrum(TransformedSpectrum, ModuleData);
313
314 return TransformedSpectrum;
315 }
316
319 {
320 if (!Util::SaveToFile(QString::fromStdString(ModuleData->AutoSaveFilename), Spectrum.ToStr(ModuleData->CurrentExposureTime)))
321 Util::EventLog().Log("[SpectrumViewer] Saving spectrum as \"" + ModuleData->AutoSaveFilename + "\" to file failed.", Util::ErrorType::Error);
322 }
323
325 {
332
333 auto ModuleParams = DynExp::dynamic_Params_cast<SpectrumViewer>(Instance->ParamsGetter());
334 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
335
336 Instance->LockObject(ModuleParams->Spectrometer, ModuleData->GetSpectrometer());
337 if (ModuleParams->Communicator.ContainsID())
338 Instance->LockObject(ModuleParams->Communicator, ModuleData->GetCommunicator());
339
340 ModuleData->FrequencyUnit = ModuleData->GetSpectrometer()->GetFrequencyUnit();
341 ModuleData->IntensityUnit = ModuleData->GetSpectrometer()->GetIntensityUnit();
342 ModuleData->MinFrequency = ModuleData->GetSpectrometer()->GetMinFrequency();
343 ModuleData->MaxFrequency = ModuleData->GetSpectrometer()->GetMaxFrequency();
344
345 auto InstrData = DynExp::dynamic_InstrumentData_cast<DynExpInstr::Spectrometer>(ModuleData->GetSpectrometer()->GetInstrumentData());
346 ModuleData->MinExposureTime = InstrData->GetMinExposureTime();
347 ModuleData->MaxExposureTime = InstrData->GetMaxExposureTime();
348 }
349
351 {
352 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
353
354 Instance->UnlockObject(ModuleData->GetSpectrometer());
355 Instance->UnlockObject(ModuleData->GetCommunicator());
356
363 }
364
366 {
367 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
368
369 if (ModuleData->CapturingState == DynExpInstr::SpectrometerData::CapturingStateType::Capturing)
370 return;
371
372 ModuleData->SpectrumRecordingPaused = false;
373 ModuleData->AcquisitionExposureTime = ModuleData->CurrentExposureTime;
374 ModuleData->GetSpectrometer()->Record();
375 }
376
378 {
379 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
380
381 ModuleData->SpectrumRecordingPaused = false;
382 ModuleData->AutoSaveFilename.clear();
383 ModuleData->GetSpectrometer()->Abort();
384 }
385
387 {
388 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
389
390 ModuleData->GetSpectrometer()->SetSilentMode(Checked);
391 }
392
394 {
395 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
396
397 ModuleData->GetSpectrometer()->SetExposureTime(DynExpInstr::SpectrometerData::TimeType(Value));
398 }
399
401 {
402 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
403 auto InstrData = DynExp::dynamic_InstrumentData_cast<DynExpInstr::Spectrometer>(ModuleData->GetSpectrometer()->GetInstrumentData());
404
405 if (Value < InstrData->GetCurrentUpperFrequency())
406 ModuleData->GetSpectrometer()->SetFrequencyRange(Value, InstrData->GetCurrentUpperFrequency());
407 }
408
410 {
411 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
412 auto InstrData = DynExp::dynamic_InstrumentData_cast<DynExpInstr::Spectrometer>(ModuleData->GetSpectrometer()->GetInstrumentData());
413
414 if (Value > InstrData->GetCurrentLowerFrequency())
415 ModuleData->GetSpectrometer()->SetFrequencyRange(InstrData->GetCurrentLowerFrequency(), Value);
416 }
417
418 void SpectrumViewer::OnSetFilename(DynExp::ModuleInstance* Instance, const std::string& SaveFilename) const
419 {
420 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
421
422 OnStop(Instance);
423 ModuleData->AutoSaveFilename = SaveFilename + ".csv";
424 }
425
427 {
428 OnRunClicked(Instance, false);
429 }
430
432 {
433 OnStopClicked(Instance, false);
434 }
435
437 {
438 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
439 ModuleData->SpectrumRecordingPaused = true;
440 }
441
443 {
444 auto ModuleData = DynExp::dynamic_ModuleData_cast<SpectrumViewer>(Instance->ModuleDataGetter());
445 ModuleData->SpectrumRecordingPaused = false;
446 }
447}
Implementation of a module to plot the spectrum stored in a spectrometer instrument.
Type describing a spectrum as acquired by the Spectrometer instrument.
@ Warning
The spectrometer is in a warning state, but still ready to acquire a spectrum.
@ Capturing
The spectrometer is currently acquiring a spectrum.
@ Error
The spectrometer is in an error state.
@ Ready
The spectrometer is ready to acquire a spectrum.
static const char * IntensityUnitTypeToStr(const IntensityUnitType &Unit)
Returns a descriptive string of a respective intensity unit to be e.g. used in plots.
std::chrono::milliseconds TimeType
Time type describing the spectrometer's times like its exposure time.
static const char * FrequencyUnitTypeToStr(const FrequencyUnitType &Unit)
Returns a descriptive string of a respective frequency unit to be e.g. used in plots.
@ Counts
Number of counts (arbitrary unit)
This event signals that an action (like a measurement) started by a TriggerEvent has been completed.
void ResetImpl(dispatch_tag< QModuleDataBase >) override final
std::unique_ptr< Ui::SpectrumViewer > ui
SpectrumViewerWidget(SpectrumViewer &Owner, QModuleWidget *parent=nullptr)
void UpdateUI(Util::SynchronizedPointer< SpectrumViewerData > &ModuleData)
void InitializeUI(Util::SynchronizedPointer< SpectrumViewerData > &ModuleData)
DynExpInstr::SpectrometerData::TimeType CurrentExposureTime
void SetData(SampleDataType &&SampleData, DynExpInstr::SpectrometerData::TimeType ExposureTime)
void OnRunClicked(DynExp::ModuleInstance *Instance, bool) const
void OnExit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread terminates (not due to an exception,...
void OnUpperLimitChanged(DynExp::ModuleInstance *Instance, double Value) const
Util::DynExpErrorCodes::DynExpErrorCodes ModuleMainLoop(DynExp::ModuleInstance &Instance) override final
Module main loop. The function is executed periodically by the module thread. Also refer to GetMainLo...
void OnStopClicked(DynExp::ModuleInstance *Instance, bool) const
void OnInit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread starts. Override it to lock instruments this m...
void OnPauseSpectrumRecording(DynExp::ModuleInstance *Instance) const
void ResetImpl(dispatch_tag< QModuleBase >) override final
void OnLowerLimitChanged(DynExp::ModuleInstance *Instance, double Value) const
std::unique_ptr< DynExp::QModuleWidget > MakeUIWidget() override final
Used by InitUI() as a factory function for the module's user interface widget. Create the widget here...
void OnTrigger(DynExp::ModuleInstance *Instance) const
void OnSetFilename(DynExp::ModuleInstance *Instance, const std::string &SaveFilename) const
void UpdateUIChild(const ModuleBase::ModuleDataGetterType &ModuleDataGetter) override final
void SaveSpectrum(const SpectrumViewerWidget::SampleDataType &Spectrum, Util::SynchronizedPointer< SpectrumViewerData > &ModuleData)
SpectrumViewerWidget::SampleDataType ProcessSpectrum(DynExpInstr::SpectrometerData::SpectrumType &&Spectrum, Util::SynchronizedPointer< SpectrumViewerData > &ModuleData)
void OnSilentModeToggled(DynExp::ModuleInstance *Instance, bool Checked) const
void OnStop(DynExp::ModuleInstance *Instance) const
void OnResumeSpectrumRecording(DynExp::ModuleInstance *Instance) const
void OnExposureTimeChanged(DynExp::ModuleInstance *Instance, int Value) const
static void Register(const ModuleBase &Listener, CallableT EventFunc, ItemIDType CommunicatorID=ItemIDNotSet)
Registers/Subscribes module Listener to the event with the event function EventFunc....
Definition Module.h:1262
static void Deregister(const ModuleBase &Listener)
Deregisters/unsubscribes module Listener from the event, regardless of the inter-module communicator ...
Definition Module.h:1271
Refer to ParamsBase::dispatch_tag.
Definition Module.h:191
Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance.
Definition Module.h:840
const ModuleBase::ModuleDataGetterType ModuleDataGetter
Getter for module's data. Refer to ModuleBase::ModuleDataGetterType.
Definition Module.h:872
Refer to ParamsBase::dispatch_tag.
Definition Object.h:2018
const Object::ParamsGetterType ParamsGetter
Invoke to obtain the parameters (derived from ParamsBase) of Owner.
Definition Object.h:3710
void UnlockObject(LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer)
Unlocks an Object instance stored in the LinkedObjectWrapperContainer ObjectWrapperContainer....
Definition Object.h:3609
void LockObject(const ParamsBase::Param< ObjectLink< ObjectT > > &LinkParam, LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
Locks an Object instance referenced by a parameter LinkParam of type ParamsBase::Param< ObjectLink< O...
Definition Object.h:3593
const auto & GetOwner() const noexcept
Returns Owner.
Definition Object.h:3556
void Log(const std::string &Message, const ErrorType Type=ErrorType::Info, const size_t Line=0, const std::string &Function="", const std::string &File="", const int ErrorCode=0, const std::stacktrace &Trace={}) noexcept
Logs an event from information specified manually.
Definition Util.cpp:317
Holds a CallableMemberWrapper and invokes its callable when being destroyed.
Definition Util.h:494
Pointer to lock a class derived from ISynchronizedPointerLockable for synchronizing between threads....
Definition Util.h:170
Thrown when an operation timed out before it could be completed, especially used for locking shared d...
Definition Exception.h:262
constexpr auto DefaultQChartTheme
constexpr auto StatusBarWarningStyleSheet
constexpr auto StatusBarErrorStyleSheet
constexpr auto StatusBarBusyStyleSheet
DynExpErrorCodes
DynExp's error codes
Definition Exception.h:22
bool SaveToFile(const QString &Filename, std::string_view Text)
Saves a std::string_view to a file (using QFile). Creates a new file or truncates an existing file's ...
Definition QtUtil.cpp:236
EventLogger & EventLog()
This function holds a static EventLogger instance and returns a reference to it. DynExp uses only one...
Definition Util.cpp:517
QString PromptSaveFilePathModule(DynExp::QModuleWidget *Parent, const QString &Title, const QString &DefaultSuffix, const QString &NameFilter)
Works as PromptOpenFilePath() but asks the user to select a single file which does not need to exist....
Definition QtUtil.cpp:143
Accumulates include statements to provide a precompiled header.
DynExpInstr::SpectrometerData::IntensityUnitType IntensityUnit
DynExpInstr::SpectrometerData::FrequencyUnitType FrequencyUnit
std::string ToStr(DynExpInstr::SpectrometerData::TimeType ExposureTime) const