Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
ChartActor.h
Go to the documentation of this file.
1/* This file is part of MODEL, the Mechanics Of Defect Evolution Library.
2 *
3 * Copyright (C) 2011 by Giacomo Po <gpo@ucla.edu>.
4 *
5 * model is distributed without any warranty under the
6 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
7 */
8
9#ifndef model_ChartActor_H_
10#define model_ChartActor_H_
11
12#include <random>
13#include <algorithm>
14
15#include <QGroupBox>
16#include <QGridLayout>
17#include <QCheckBox>
18#include <QLabel>
19#include <QWidget>
20#include <QComboBox>
21#include <QPushButton>
22#include <QLineEdit>
23
24#include <vtkGenericOpenGLRenderWindow.h>
25#include <vtkRenderer.h>
26#include <vtkSmartPointer.h>
27#include <vtkActor.h>
28#include <vtkCamera.h>
29#include <vtkChartXY.h>
30#include <vtkContextActor.h>
31#include <vtkContextScene.h>
32#include <vtkCubeSource.h>
33#include <vtkFloatArray.h>
34#include <vtkNamedColors.h>
35#include <vtkNew.h>
36#include <vtkPlotPoints.h>
37#include <vtkPolyDataMapper.h>
38#include <vtkProperty.h>
39#include <vtkRenderWindow.h>
40#include <vtkRenderWindowInteractor.h>
41#include <vtkRenderer.h>
42#include <vtkTable.h>
43
44
45#include <TextFileParser.h>
47
48namespace model
49{
50
51 struct ChartActor : public QWidget
52 {
53
54 Q_OBJECT
55
56 private slots:
57
58 void modify();
59 void reload();
60 void updatePlots();
61
62
63 public:
64
66 QGridLayout* mainLayout;
67 QCheckBox* showChart;
68 QPushButton* chartUpdate;
69 QComboBox* xComboBox;
70 QComboBox* yComboBox;
71 QCheckBox* xAxisLog;
72 QCheckBox* yAxisLog;
73 QGroupBox* customScaleBoxX;
74 QLineEdit* minScaleX;
75 QLineEdit* maxScaleX;
76 QGroupBox* customScaleBoxY;
77 QLineEdit* minScaleY;
78 QLineEdit* maxScaleY;
79
80
81 vtkSmartPointer<vtkGenericOpenGLRenderWindow> renderWindow;
82 vtkRenderer* const renderer;
83
84 vtkSmartPointer<vtkChartXY> chart;
85 vtkSmartPointer<vtkContextScene> chartScene;
86 vtkSmartPointer<vtkContextActor> chartActor;
87// vtkPlot* points;
88 vtkSmartPointer<vtkTable> table;
89 vtkSmartPointer<vtkTable> currentTable;
90 vtkSmartPointer<vtkNamedColors> colors;
91
92 vtkPlot* points;
93 vtkPlot* currentPoints;
94
95 ChartActor(const DefectiveCrystalTraitsIO& traitsIO_in,vtkSmartPointer<vtkGenericOpenGLRenderWindow>,vtkRenderer* const renderer_in);
96
97 void updateConfiguration(const size_t& frameID);
98
99
100 };
101
102} // namespace model
103#endif
104
105
106
107
108
109
110
vtkSmartPointer< vtkTable > currentTable
Definition ChartActor.h:89
QCheckBox * xAxisLog
Definition ChartActor.h:71
QComboBox * xComboBox
Definition ChartActor.h:69
vtkSmartPointer< vtkNamedColors > colors
Definition ChartActor.h:90
QCheckBox * showChart
Definition ChartActor.h:67
vtkSmartPointer< vtkGenericOpenGLRenderWindow > renderWindow
Definition ChartActor.h:81
QCheckBox * yAxisLog
Definition ChartActor.h:72
QGridLayout * mainLayout
Definition ChartActor.h:66
QLineEdit * maxScaleX
Definition ChartActor.h:75
vtkPlot * currentPoints
Definition ChartActor.h:93
vtkRenderer *const renderer
Definition ChartActor.h:82
const DefectiveCrystalTraitsIO & traitsIO
Definition ChartActor.h:65
vtkSmartPointer< vtkContextActor > chartActor
Definition ChartActor.h:86
vtkSmartPointer< vtkTable > table
Definition ChartActor.h:88
QGroupBox * customScaleBoxX
Definition ChartActor.h:73
QLineEdit * maxScaleY
Definition ChartActor.h:78
QLineEdit * minScaleX
Definition ChartActor.h:74
vtkPlot * points
Definition ChartActor.h:92
QGroupBox * customScaleBoxY
Definition ChartActor.h:76
QPushButton * chartUpdate
Definition ChartActor.h:68
void updateConfiguration(const size_t &frameID)
vtkSmartPointer< vtkContextScene > chartScene
Definition ChartActor.h:85
QComboBox * yComboBox
Definition ChartActor.h:70
QLineEdit * minScaleY
Definition ChartActor.h:77
vtkSmartPointer< vtkChartXY > chart
Definition ChartActor.h:84
ChartActor(const DefectiveCrystalTraitsIO &traitsIO_in, vtkSmartPointer< vtkGenericOpenGLRenderWindow >, vtkRenderer *const renderer_in)