-
Notifications
You must be signed in to change notification settings - Fork 2
/
imagebuilder.h
39 lines (35 loc) · 1.29 KB
/
imagebuilder.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
#ifndef IMAGEBUILDER_H
#define IMAGEBUILDER_H
#include <QObject>
#include <QImage>
#include "ElementInfo.h"
class WatchFace;
class QPainterPath;
class ImageBuilder : public QObject
{
Q_OBJECT
public:
explicit ImageBuilder(WatchFace* face, const QString& symbolBase, const QString& faceDir, QObject *parent = nullptr);
QImage assembleImage();
void buildPower(ElementInfo* cfg);
void buildSteps(ElementInfo* cfg);
void createBackground();
void createDirs(const QString& basePath);
void createElement(int elem, ElementInfo* cfg = nullptr);
void createGaugeI(QImage& img, ElementInfo* cfg, int scale, const QColor& c);
void createGaugeII(QImage& img, ElementInfo* cfg, int scale, const QColor& c);
void createImage(ElementInfo* cfg);
QImage createImage(const ElementInfo* cfg, const QString& text);
void drawGauge(QImage& img, ElementInfo* cfg, QPainterPath& pp, const QColor& c);
void drawImage(QImage& img, const ElementInfo* cfg, QPainterPath& pp);
QString getFaceDir() const;
QString getSampleText(const QString& sample, QStringList& list);
QImage refresh(ElementInfo* cfg);
void setFaceDir(const QString& basePath);
QImage testDigit();
private:
WatchFace* wf;
QString base;
QString symbolBase;
};
#endif // IMAGEBUILDER_H