-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquantum3body_simulation_window.hh
108 lines (88 loc) · 2.26 KB
/
quantum3body_simulation_window.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* vim: set sw=4 sts=4 ft=cpp et foldmethod=syntax : */
/*
* Copyright (c) 2011 Tiziano Müller <[email protected]>
* Christian Reinhardt
*
*
*
*/
#ifndef QUANTUM3BODY_SIMULATION_WINDOW_HH
#define QUANTUM3BODY_SIMULATION_WINDOW_HH
#include <QtGui/QMainWindow>
// start forward declarations to reduce header dependencies
class QTimer;
class TwoDimSPO;
struct DefaultTimeEvolution;
struct Quantum3BodyTimeEvolution;
class QLabel;
class QImage;
namespace Ui
{
class Quantum3BodyWindow;
}
// end forward declarations
/**
* The main class for all the GUI stuff.
* This is an implementation of a QMainWindow which sets itself up using the
* generated code from the Qt Designer.
*/
class Quantum3BodySimulationWindow :
public QMainWindow
{
Q_OBJECT
public:
/**
* Construct a new MainWindow object.
*/
Quantum3BodySimulationWindow(QWidget* p = NULL);
~Quantum3BodySimulationWindow();
public slots:
/**
* Run one step in the simulation using the dt specified in the interface
*/
void evolve();
/**
* Update/Redraw the plots using the current data found in the simulation.
*/
void plot();
/**
* Start/stop the continuous simulation.
*/
void runSimulation(bool);
/**
* Reset the simulation using the values given in the interface
*/
void resetSimulation();
/**
* Open a dialog to browse for a folder to save the rendered pictures.
*/
void browsePictureFolder();
/**
* Select the time evolution algorithm to be used.
*/
void setTimeEvolution(int);
/**
* Display the rendered plot 1:1.
*/
void viewNormalSize();
/**
* Resize to the rendered plot to match the window.
*/
void viewFitToWindow();
/**
* Update the view actions after selecting/deselecting FitToWindow
*/
void updateViewActions();
private:
TwoDimSPO* _simulation;
DefaultTimeEvolution* _defaultTimeEvolution;
Quantum3BodyTimeEvolution* _quantum3bodyTimeEvolution;
QTimer* _timer;
Ui::Quantum3BodyWindow* _ui;
// QuantumPixelPlot* _spatialPlot;
size_t _currentIteration;
unsigned int _lastResetTimestamp;
QLabel* _imageLabel;
QImage* _image;
};
#endif // QUANTUM3BODY_SIMULATION_WINDOW_HH