-
Notifications
You must be signed in to change notification settings - Fork 0
/
polarisationwindow.h
49 lines (41 loc) · 1.26 KB
/
polarisationwindow.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
48
49
#ifndef POLARISATIONWINDOW_H
#define POLARISATIONWINDOW_H
#include <QGraphicsView>
#include <QtGui>
#include <eigen3/Eigen/Core>
#include <QImage>
#include <QLineF>
#include <QPointF>
typedef Eigen::Matrix<std::complex<double>, 2, 1> Vector2cd;
typedef std::vector<Eigen::Matrix<std::complex<double>, 2, 2, 0, 2, 2>>
ListMatrix4cd;
typedef Eigen::Matrix<std::complex<double>, 2, 1> Vector2cd;
typedef std::vector<Eigen::Matrix<std::complex<double>, 2, 1>> ListVector2cd;
const float degreeMulitplier = static_cast<float>(180.0 / M_PI);
/*!
* \brief The PolarisationWindow class
* This is the polarisatoin diagram file which defines all the methods it will
* implement.
*/
class PolarisationWindow : public QObject {
Q_OBJECT
public:
explicit PolarisationWindow(QGraphicsView *view);
virtual ~PolarisationWindow() = default;
public slots:
void simResultsUpdated(ListMatrix4cd &polarisations);
void setEnabledState(int state);
private:
int enabled = 1;
ListMatrix4cd polarisations;
QImage *outputImage;
QGraphicsScene *scene;
int width = 350;
int height = 350;
QGraphicsView *m_view;
void render(QImage &visualisation);
void renderNow();
void drawAxis(QPainter *painter);
void drawPolarosations(QPainter *painter);
};
#endif // POLARISATIONWINDOW_H