-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathspellwork.h
More file actions
62 lines (46 loc) · 1.62 KB
/
spellwork.h
File metadata and controls
62 lines (46 loc) · 1.62 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef SPELLWORK_H
#define SPELLWORK_H
#include <QMetaEnum>
#include <QJSEngine>
#include <QJSValue>
#include <QJSValueList>
#include <QJsonObject>
#include <QPair>
#include "MainForm.h"
#include "qsw.h"
#include "events.h"
#include "blp/BLP.h"
#include "plugins/spellinfo/interface.h"
typedef QPair<QJsonObject, SpellInfoInterface*> SpellInfoPluginPair;
typedef QHash<QString, SpellInfoPluginPair> SpellInfoPlugins;
class MainForm;
class LoadingScreen;
class SpellWork : public QObject
{
Q_OBJECT
public:
SpellWork(MainForm *form);
~SpellWork() {}
void loadPlugins();
bool setActivePlugin(QString name,LoadingScreen* ls=nullptr);
void setActivePlugin2(QPair<QString, SpellInfoPluginPair> p);
QPair<QString, SpellInfoPluginPair> GetActivePlugin();
SpellInfoPlugins getPlugins() const { return m_spellInfoPlugins; }
SpellInfoInterface* getActivePlugin() const { return m_activeSpellInfoPlugin; }
QString getActivePluginName() const { return m_activeSpellInfoPluginName; }
void showInfo(quint32 id, QSW::Pages pageId = QSW::PAGE_MAIN);
void compare();
EventList search(quint8 type);
QMetaEnum getMetaEnum() { return m_metaEnum; }
void setMetaEnum(const char* enumName);
MainForm* getForm() { return m_form; }
private:
MainForm *m_form;
QMetaEnum m_metaEnum;
QByteArray m_templateHtml;
QByteArray m_styleCss;
SpellInfoPlugins m_spellInfoPlugins;
SpellInfoInterface* m_activeSpellInfoPlugin;
QString m_activeSpellInfoPluginName;
};
#endif // SPELLWORK_H