-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoop_graph.h
47 lines (38 loc) · 1.07 KB
/
Loop_graph.h
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
#ifndef LOOP_GRAPTH_H
#define LOOP_GRAPTH_H
#include <QChart>
#include <QLineSeries>
#include <QSplineSeries>
#include <QWidget>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <complex>
#include <eigen3/Eigen/Dense>
#include <map>
#include <QValueAxis>
typedef std::pair<double, double> LoopGraphItem;
typedef std::map<double, LoopGraphItem> LoopGraphMap;
using namespace QtCharts;
/*!
* \brief The Loop_graph class
* This is the class which defines the functions which will be used in the hysteresis loop graph
*/
class Loop_graph : public QChartView {
Q_OBJECT
public:
explicit Loop_graph(QWidget *parent = nullptr);
~Loop_graph();
private:
QLineSeries *m_series_increase = new QLineSeries();
QLineSeries *m_series_decrease = new QLineSeries();
LoopGraphMap *m_graphMap = new LoopGraphMap();
QChart *m_chart = new QChart();
double *m_coersivity = new double(50);
void addMapToSeries();
void showChart();
signals:
public slots:
void updateCoersivity(double coersivity);
void updateSeries(Eigen::Vector2cd Er);
};
#endif // LOOP_GRAPTH_H