-
Notifications
You must be signed in to change notification settings - Fork 0
/
RenderArea.h
37 lines (31 loc) · 1.14 KB
/
RenderArea.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
#ifndef RENDERAREA_H
#define RENDERAREA_H
#include <QWidget>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QGraphicsItemGroup>
#include <QTimer>
struct Params;
class RenderArea: public QGraphicsView
{
Q_OBJECT
public:
RenderArea(QWidget* parent = nullptr);
public slots:
void drawConstruction(const Params& params);
void changeScene();
private:
QGraphicsScene* _scene;
QVector<QGraphicsRectItem*> _items;
QGraphicsView* _view;
QVector<QVector<double>> vecForDraw;
void drawDistrLoads(const int& i, const Params& params,const double& coordX, const double& coordY);
void drawFixedNodes(const Params& params, const double& coordY, const double& endX);
void drawDistr(QPixmap& pixmap, const double& coordX, const double& coordY,
const int& i);
void drawCentredLoads(const int& i, const Params& params,const double& coordX, const double& coordY);
void drawCentred(QPixmap& pixmap, const Params& params, const double& coordX, const double& coordY,
const int& i);
void scaling();
};
#endif // RENDERAREA_H