-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassetmanager.h
45 lines (36 loc) · 1.23 KB
/
assetmanager.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
#ifndef ASSETMANAGER_H
#define ASSETMANAGER_H
#include <QFontDatabase>
#include <QDebug>
#include "syntaxhighlightingruleset.h"
#include <QFileInfoList>
class AssetManager
{
public:
AssetManager();
QFont getFont(const std::string &font) const;
QString getStyle(const std::string &style) const;
void loadAssets();
SyntaxHighlightingRuleSet * getLanguageSupportRuleSet(QString &language) const;
QStringList getLoadedSupportFileNames();
SyntaxHighlightingRuleSet * getLanguageSupportByName(QString &name);
QFileInfoList getStyleSheets();
QString loadStyleSheetByFilename(QString filename);
void saveUserCfg(QStringList cfg);
QStringList loadUserCfg();
private:
bool isLoaded;
// fonts
QFont srcCodeLightFont;
QFont mainAppFont;
// styles
QString defaultStyle;
QFileInfoList styleSheets;
void loadAllLanguageSupport();
void loadAllStyleSheets();
void loadLanguageSupportFile(QTextStream &, const QString &);
QString LIBS_FILEPATH;
QString TMP_USER_CFG_FILEPATH;
QVector<SyntaxHighlightingRuleSet*> syntaxHighlightingRules;
};
#endif // ASSETMANAGER_H