Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
quantumdoublewellplotwidget.h
Go to the documentation of this file.
1/**
2 * @file quantumdoublewellplotwidget.h
3 * @brief Declares the quantumdoublewellplotwidget visualization component used by QPE.
4 * @ingroup qpe_graphics
5 *
6 * Source: @c graphics/renderer/quantumdoublewellplotwidget.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
18class QPaintEvent;
19
20/**
21 * @brief Qt visualization component for Quantum Double Well Plot Widget.
22 *
23 * The class presents computed state to the user and does not alter the propagated physical state.
24 */
25class QuantumDoubleWellPlotWidget final : public QWidget
26{
27public:
28 /**
29 * @brief Performs quantum double well plot widget.
30 * @param parent Optional Qt parent object/widget.
31 */
32 explicit QuantumDoubleWellPlotWidget(QWidget *parent = nullptr);
33
34 /**
35 * @brief Sets samples.
36 * @param samples The samples value used by the operation.
37 */
38 void setSamples(const std::vector<qpe::ObservablesTimeSeries2DSample> &samples);
39 /**
40 * @brief Sets theory.
41 * @param period The period value used by the operation.
42 */
43 void setTheory(double period);
44 /**
45 * @brief Performs clear.
46 */
47 void clear();
48
49 /**
50 * @brief Performs minimum size hint.
51 */
52 QSize minimumSizeHint() const override;
53
54protected:
55 /**
56 * @brief Paints event.
57 * @param event Qt event being handled.
58 */
59 void paintEvent(QPaintEvent *event) override;
60
61private:
62 std::vector<qpe::ObservablesTimeSeries2DSample> samples_;
63 double period_ = 0.0;
64};
Qt visualization component for Quantum Double Well Plot Widget.
std::vector< qpe::ObservablesTimeSeries2DSample > samples_
void setSamples(const std::vector< qpe::ObservablesTimeSeries2DSample > &samples)
Sets samples.
void setTheory(double period)
Sets theory.
void paintEvent(QPaintEvent *event) override
Paints event.
QuantumDoubleWellPlotWidget(QWidget *parent=nullptr)
Performs quantum double well plot widget.
QSize minimumSizeHint() const override
Performs minimum size hint.
Declares the observablestimeseries2d physics/numerical component used by QPE experiments.