-
Notifications
You must be signed in to change notification settings - Fork 1
/
renderthread.h
48 lines (39 loc) · 985 Bytes
/
renderthread.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
#ifndef RENDERTHREAD_H
#define RENDERTHREAD_H
#include <QObject>
#include <QSize>
#include <QColor>
#include <QImage>
#include <QPixmap>
#include <QDebug>
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
#include "color.h"
#include "gerbv.h"
class RenderThread : public QThread {
Q_OBJECT
public:
RenderThread( QObject *parent = nullptr );
~RenderThread();
void render( int width, int height, bool overlay, std::string file1, std::string file2, QColor lnColor, QColor flColor, QColor bgColor );
Q_SIGNALS:
void renderedImage( const QImage &image, const QSize &size );
protected:
void run() override;
private:
gerbv_project_t *mainProject;
gerbv_render_info_t screenRenderInfo;
QMutex mutex;
QWaitCondition condition;
QSize size;
bool abort = false;
bool restart = false;
bool _overlay;
std::string _file1;
std::string _file2;
QColor _lnColor;
QColor _flColor;
QColor _bgColor;
};
#endif // RENDERTHREAD_H