-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpersister.h
35 lines (29 loc) · 1.18 KB
/
persister.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
#ifndef PERSISTER_H
#define PERSISTER_H
#include <QObject>
#include <QMap>
#include <ElementInfo.h>
class ImageBuilder;
class WatchFace;
class Persister : public QObject
{
Q_OBJECT
public:
Persister(WatchFace* face, ImageBuilder* ib, const QString& symbolBase, QObject* parent = nullptr);
void storeImages(const QString& faceDir, const QString& oldFaceDir);
protected:
QString getSampleText(int n, int l, const QStringList& list);
void storeImage(const QString& baseDir, const ElementInfo* cfg);
void storeTextSequence(const QString& baseDir, const ElementInfo* cfg);
void storeNumSequence(const QString& baseDir, const ElementInfo* cfg);
void storeFreeText(const QString& baseDir, const ElementInfo* cfg);
void storeSymbol(const QString& baseDir, const QString& symbolBase, const QString& oldFaceDir, ElementInfo* cfg);
void storeWeatherSymbols(const QString& baseDir, const QString& symbolBase, const QString& oldFaceDir, ElementInfo* cfg);
void storeGauge(const QString& baseDir, ElementInfo* cfg);
private:
WatchFace* wf;
ImageBuilder* ib;
QString symbolBase;
QMap<QChar, QString> nameOf;
};
#endif // PERSISTER_H