Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
quantumboundstateplotwidget.h
Go to the documentation of this file.
1/**
2 * @file quantumboundstateplotwidget.h
3 * @brief Declares the quantumboundstateplotwidget visualization component used by QPE.
4 * @ingroup qpe_graphics
5 *
6 * Source: @c graphics/renderer/quantumboundstateplotwidget.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 Bound State Plot Widget.
22 *
23 * The class presents computed state to the user and does not alter the propagated physical state.
24 */
25class QuantumBoundStatePlotWidget final : public QWidget
26{
27public:
28 /**
29 * @brief Performs quantum bound state plot widget.
30 * @param parent Optional Qt parent object/widget.
31 */
32 explicit QuantumBoundStatePlotWidget(QWidget *parent = nullptr);
33
34 /**
35 * @brief Sets spectrum.
36 * @param spectrum The spectrum value used by the operation.
37 * @param selectedStateIndex Zero-based index used to select the requested item.
38 */
39 void setSpectrum(const qpe::BoundStateSpectrum1D &spectrum, int selectedStateIndex);
40 /**
41 * @brief Clears spectrum.
42 */
43 void clearSpectrum();
44
45 /**
46 * @brief Performs minimum size hint.
47 */
48 QSize minimumSizeHint() const override;
49
50protected:
51 /**
52 * @brief Paints event.
53 * @param event Qt event being handled.
54 */
55 void paintEvent(QPaintEvent *event) override;
56
57private:
60};
Declares the boundstates1d physics/numerical component used by QPE experiments.
Qt visualization component for Quantum Bound State Plot Widget.
void paintEvent(QPaintEvent *event) override
Paints event.
void setSpectrum(const qpe::BoundStateSpectrum1D &spectrum, int selectedStateIndex)
Sets spectrum.
QSize minimumSizeHint() const override
Performs minimum size hint.
QuantumBoundStatePlotWidget(QWidget *parent=nullptr)
Performs quantum bound state plot widget.
Data structure used by the Bound State Spectrum1D component.