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
14
#include "
core/quantum/boundstates1d.h
"
15
16
#include <QWidget>
17
18
class
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
*/
25
class
QuantumBoundStatePlotWidget
final :
public
QWidget
26
{
27
public
:
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
50
protected
:
51
/**
52
* @brief Paints event.
53
* @param event Qt event being handled.
54
*/
55
void
paintEvent
(QPaintEvent *event)
override
;
56
57
private
:
58
qpe::BoundStateSpectrum1D
spectrum_
;
59
int
selectedStateIndex_
= -1;
60
};
boundstates1d.h
Declares the boundstates1d physics/numerical component used by QPE experiments.
QuantumBoundStatePlotWidget
Qt visualization component for Quantum Bound State Plot Widget.
Definition
quantumboundstateplotwidget.h:26
QuantumBoundStatePlotWidget::selectedStateIndex_
int selectedStateIndex_
Definition
quantumboundstateplotwidget.h:59
QuantumBoundStatePlotWidget::spectrum_
qpe::BoundStateSpectrum1D spectrum_
Definition
quantumboundstateplotwidget.h:58
QuantumBoundStatePlotWidget::paintEvent
void paintEvent(QPaintEvent *event) override
Paints event.
Definition
quantumboundstateplotwidget.cpp:48
QuantumBoundStatePlotWidget::setSpectrum
void setSpectrum(const qpe::BoundStateSpectrum1D &spectrum, int selectedStateIndex)
Sets spectrum.
Definition
quantumboundstateplotwidget.cpp:28
QuantumBoundStatePlotWidget::minimumSizeHint
QSize minimumSizeHint() const override
Performs minimum size hint.
Definition
quantumboundstateplotwidget.cpp:43
QuantumBoundStatePlotWidget::QuantumBoundStatePlotWidget
QuantumBoundStatePlotWidget(QWidget *parent=nullptr)
Performs quantum bound state plot widget.
Definition
quantumboundstateplotwidget.cpp:21
QuantumBoundStatePlotWidget::clearSpectrum
void clearSpectrum()
Clears spectrum.
Definition
quantumboundstateplotwidget.cpp:36
qpe::BoundStateSpectrum1D
Data structure used by the Bound State Spectrum1D component.
Definition
boundstates1d.h:43
graphics
renderer
quantumboundstateplotwidget.h
Generated by
1.12.0