Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
quantumtimeseriesplotwidget.h
Go to the documentation of this file.
1/**
2 * @file quantumtimeseriesplotwidget.h
3 * @brief Declares the quantumtimeseriesplotwidget visualization component used by QPE.
4 * @ingroup qpe_graphics
5 *
6 * Source: @c graphics/renderer/quantumtimeseriesplotwidget.h. This file is part of Quantum Phenomena Explorer (QPE),
7 * maintained by Officina Turini. See LICENSE_IT.txt / LICENSE.txt for the
8 * QPE freeware source-available terms and THIRD_PARTY_NOTICES.txt for
9 * third-party components.
10 */
11
12#pragma once
13
15
16#include <QWidget>
17#include <QString>
18
19class QPaintEvent;
20
21/**
22 * @brief Qt visualization component for Quantum Time Series Plot Widget.
23 *
24 * The class presents computed state to the user and does not alter the propagated physical state.
25 */
26class QuantumTimeSeriesPlotWidget final : public QWidget
27{
28public:
29 /**
30 * @brief Enumerates the supported Quantity values.
31 *
32 * The enumeration is part of the typed interface used to keep experiment configuration and analysis routing explicit.
33 */
51
52 /**
53 * @brief Constructs a Quantum Time Series Plot Widget instance.
54 * @param parent Optional Qt parent object/widget.
55 */
56 explicit QuantumTimeSeriesPlotWidget(QWidget *parent = nullptr);
57
58 /**
59 * @brief Sets samples.
60 * @param samples The samples value used by the operation.
61 */
62 void setSamples(const std::vector<qpe::ObservablesTimeSeries2DSample> &samples);
63 /**
64 * @brief Clears samples.
65 */
66 void clearSamples();
67 /**
68 * @brief Sets quantity.
69 * @param quantity The quantity value used by the operation.
70 */
72 /**
73 * @brief Carries out quantity.
74 */
75 Quantity quantity() const noexcept { return quantity_; }
76
77 /**
78 * @brief Carries out minimum size hint.
79 */
80 QSize minimumSizeHint() const override;
81
82protected:
83 /**
84 * @brief Paints event.
85 * @param event Qt event being handled.
86 */
87 void paintEvent(QPaintEvent *event) override;
88
89private:
90 /**
91 * @brief Samples value.
92 * @param sample The sample value used by the operation.
93 * @param value Value to assign or evaluate.
94 */
96 double &value) const noexcept;
97 /**
98 * @brief Carries out quantity title.
99 */
100 QString quantityTitle() const;
101 /**
102 * @brief Carries out fixed probability range.
103 */
104 bool fixedProbabilityRange() const noexcept;
105
106 std::vector<qpe::ObservablesTimeSeries2DSample> samples_;
108};
Qt visualization component for Quantum Time Series Plot Widget.
bool fixedProbabilityRange() const noexcept
Carries out fixed probability range.
QSize minimumSizeHint() const override
Carries out minimum size hint.
QString quantityTitle() const
Carries out quantity title.
Quantity
Enumerates the supported Quantity values.
QuantumTimeSeriesPlotWidget(QWidget *parent=nullptr)
Constructs a Quantum Time Series Plot Widget instance.
void setSamples(const std::vector< qpe::ObservablesTimeSeries2DSample > &samples)
Sets samples.
std::vector< qpe::ObservablesTimeSeries2DSample > samples_
void setQuantity(Quantity quantity)
Sets quantity.
void paintEvent(QPaintEvent *event) override
Paints event.
Quantity quantity() const noexcept
Carries out quantity.
bool sampleValue(const qpe::ObservablesTimeSeries2DSample &sample, double &value) const noexcept
Samples value.
Declares the observablestimeseries2d physics/numerical component used by QPE experiments.
Data record containing Observables Time Series2D Sample.