author | unc0rr |
Thu, 18 Dec 2014 00:03:53 +0300 | |
branch | qmlfrontend |
changeset 10616 | 20a2d5e6930a |
parent 10612 | eb3c1a289a23 |
child 10819 | 57e21f7621b0 |
permissions | -rw-r--r-- |
10402 | 1 |
#include <QLibrary> |
2 |
#include <QtQml> |
|
10404
1baaab44a0b2
- Fix arguments parsing in engine assuming paramcount > 0
unc0rr
parents:
10402
diff
changeset
|
3 |
#include <QDebug> |
10420 | 4 |
#include <QPainter> |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
5 |
#include <QUuid> |
10402 | 6 |
|
7 |
#include "hwengine.h" |
|
10420 | 8 |
#include "previewimageprovider.h" |
10436 | 9 |
#include "themeiconprovider.h" |
10402 | 10 |
|
11 |
extern "C" { |
|
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
12 |
RunEngine_t *flibRunEngine; |
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
13 |
registerGUIMessagesCallback_t *flibRegisterGUIMessagesCallback; |
10430 | 14 |
setSeed_t *flibSetSeed; |
15 |
getSeed_t *flibGetSeed; |
|
10456 | 16 |
setTheme_t *flibSetTheme; |
10612 | 17 |
setScript_t *flibSetScript; |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
18 |
getPreview_t *flibGetPreview; |
10432 | 19 |
runQuickGame_t *flibRunQuickGame; |
10448 | 20 |
runLocalGame_t *flibRunLocalGame; |
10416 | 21 |
flibInit_t *flibInit; |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
22 |
flibFree_t *flibFree; |
10450 | 23 |
resetGameConfig_t * flibResetGameConfig; |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
24 |
getThemesList_t *flibGetThemesList; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
25 |
freeThemesList_t *flibFreeThemesList; |
10436 | 26 |
getThemeIcon_t *flibGetThemeIcon; |
10517 | 27 |
getScriptsList_t *flibGetScriptsList; |
10616 | 28 |
getSchemesList_t *flibGetSchemesList; |
10442 | 29 |
getTeamsList_t *flibGetTeamsList; |
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
30 |
tryAddTeam_t * flibTryAddTeam; |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
31 |
tryRemoveTeam_t * flibTryRemoveTeam; |
10452
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
32 |
changeTeamColor_t * flibChangeTeamColor; |
10402 | 33 |
} |
10420 | 34 |
|
10430 | 35 |
Q_DECLARE_METATYPE(MessageType); |
36 |
||
10420 | 37 |
HWEngine::HWEngine(QQmlEngine *engine, QObject *parent) : |
38 |
QObject(parent), |
|
39 |
m_engine(engine) |
|
10402 | 40 |
{ |
10430 | 41 |
qRegisterMetaType<MessageType>("MessageType"); |
42 |
||
10404
1baaab44a0b2
- Fix arguments parsing in engine assuming paramcount > 0
unc0rr
parents:
10402
diff
changeset
|
43 |
QLibrary hwlib("./libhwengine.so"); |
10402 | 44 |
|
45 |
if(!hwlib.load()) |
|
10404
1baaab44a0b2
- Fix arguments parsing in engine assuming paramcount > 0
unc0rr
parents:
10402
diff
changeset
|
46 |
qWarning() << "Engine library not found" << hwlib.errorString(); |
10402 | 47 |
|
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
48 |
flibRunEngine = (RunEngine_t*) hwlib.resolve("RunEngine"); |
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
49 |
flibRegisterGUIMessagesCallback = (registerGUIMessagesCallback_t*) hwlib.resolve("registerGUIMessagesCallback"); |
10430 | 50 |
flibGetSeed = (getSeed_t*) hwlib.resolve("getSeed"); |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
51 |
flibGetPreview = (getPreview_t*) hwlib.resolve("getPreview"); |
10432 | 52 |
flibRunQuickGame = (runQuickGame_t*) hwlib.resolve("runQuickGame"); |
10448 | 53 |
flibRunLocalGame = (runLocalGame_t*) hwlib.resolve("runLocalGame"); |
10416 | 54 |
flibInit = (flibInit_t*) hwlib.resolve("flibInit"); |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
55 |
flibFree = (flibFree_t*) hwlib.resolve("flibFree"); |
10416 | 56 |
|
10612 | 57 |
flibSetSeed = (setSeed_t*) hwlib.resolve("setSeed"); |
58 |
flibSetTheme = (setTheme_t*) hwlib.resolve("setTheme"); |
|
59 |
flibSetScript = (setScript_t*) hwlib.resolve("setScript"); |
|
60 |
||
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
61 |
flibGetThemesList = (getThemesList_t*) hwlib.resolve("getThemesList"); |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
62 |
flibFreeThemesList = (freeThemesList_t*) hwlib.resolve("freeThemesList"); |
10436 | 63 |
flibGetThemeIcon = (getThemeIcon_t*) hwlib.resolve("getThemeIcon"); |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
64 |
|
10517 | 65 |
flibGetScriptsList = (getScriptsList_t*) hwlib.resolve("getScriptsList"); |
10616 | 66 |
flibGetSchemesList = (getSchemesList_t*) hwlib.resolve("getSchemesList"); |
10517 | 67 |
|
10450 | 68 |
flibResetGameConfig = (resetGameConfig_t*) hwlib.resolve("resetGameConfig"); |
10442 | 69 |
flibGetTeamsList = (getTeamsList_t*) hwlib.resolve("getTeamsList"); |
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
70 |
flibTryAddTeam = (tryAddTeam_t*) hwlib.resolve("tryAddTeam"); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
71 |
flibTryRemoveTeam = (tryRemoveTeam_t*) hwlib.resolve("tryRemoveTeam"); |
10452
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
72 |
flibChangeTeamColor = (changeTeamColor_t*) hwlib.resolve("changeTeamColor"); |
10442 | 73 |
|
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
74 |
flibInit("/usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-GC/share/hedgewars/Data", "/usr/home/unC0Rr/.hedgewars"); |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
75 |
flibRegisterGUIMessagesCallback(this, &guiMessagesCallback); |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
76 |
|
10436 | 77 |
ThemeIconProvider * themeIcon = (ThemeIconProvider *)m_engine->imageProvider(QLatin1String("theme")); |
78 |
themeIcon->setFileContentsFunction(flibGetThemeIcon); |
|
79 |
||
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
80 |
fillModels(); |
10402 | 81 |
} |
82 |
||
83 |
HWEngine::~HWEngine() |
|
84 |
{ |
|
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
85 |
flibFree(); |
10402 | 86 |
} |
87 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
88 |
void HWEngine::getPreview() |
10402 | 89 |
{ |
10430 | 90 |
flibSetSeed(QUuid::createUuid().toString().toLatin1()); |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
91 |
flibGetPreview(); |
10402 | 92 |
} |
93 |
||
10432 | 94 |
void HWEngine::runQuickGame() |
95 |
{ |
|
96 |
flibSetSeed(QUuid::createUuid().toString().toLatin1()); |
|
97 |
flibRunQuickGame(); |
|
98 |
} |
|
99 |
||
10448 | 100 |
void HWEngine::runLocalGame() |
101 |
{ |
|
102 |
flibRunLocalGame(); |
|
103 |
} |
|
104 |
||
105 |
||
10402 | 106 |
static QObject *hwengine_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine) |
107 |
{ |
|
108 |
Q_UNUSED(scriptEngine) |
|
109 |
||
10420 | 110 |
HWEngine *hwengine = new HWEngine(engine); |
10402 | 111 |
return hwengine; |
112 |
} |
|
113 |
||
114 |
void HWEngine::exposeToQML() |
|
115 |
{ |
|
116 |
qDebug("HWEngine::exposeToQML"); |
|
117 |
qmlRegisterSingletonType<HWEngine>("Hedgewars.Engine", 1, 0, "HWEngine", hwengine_singletontype_provider); |
|
118 |
} |
|
10416 | 119 |
|
120 |
||
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
121 |
void HWEngine::guiMessagesCallback(void *context, MessageType mt, const char * msg, uint32_t len) |
10420 | 122 |
{ |
123 |
HWEngine * obj = (HWEngine *)context; |
|
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
124 |
QByteArray b = QByteArray(msg, len); |
10420 | 125 |
|
126 |
qDebug() << "FLIPC in" << b.size() << b; |
|
127 |
||
10430 | 128 |
QMetaObject::invokeMethod(obj, "engineMessageHandler", Qt::QueuedConnection, Q_ARG(MessageType, mt), Q_ARG(QByteArray, b)); |
10416 | 129 |
} |
130 |
||
10430 | 131 |
void HWEngine::engineMessageHandler(MessageType mt, const QByteArray &msg) |
10416 | 132 |
{ |
10430 | 133 |
switch(mt) |
10426 | 134 |
{ |
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
135 |
case MSG_PREVIEW: { |
10426 | 136 |
PreviewImageProvider * preview = (PreviewImageProvider *)m_engine->imageProvider(QLatin1String("preview")); |
137 |
preview->setPixmap(msg); |
|
138 |
emit previewImageChanged(); |
|
10430 | 139 |
break; |
10426 | 140 |
} |
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
141 |
case MSG_ADDPLAYINGTEAM: { |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
142 |
QStringList l = QString::fromUtf8(msg).split('\n'); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
143 |
emit playingTeamAdded(l[1], l[0].toInt(), true); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
144 |
break; |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
145 |
} |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
146 |
case MSG_REMOVEPLAYINGTEAM: { |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
147 |
emit playingTeamRemoved(msg); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
148 |
break; |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
149 |
} |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
150 |
case MSG_ADDTEAM: { |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
151 |
emit localTeamAdded(msg, 0); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
152 |
break; |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
153 |
} |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
154 |
case MSG_REMOVETEAM: { |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
155 |
emit localTeamRemoved(msg); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
156 |
break; |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
157 |
} |
10452
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
158 |
case MSG_TEAMCOLOR: { |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
159 |
QStringList l = QString::fromUtf8(msg).split('\n'); |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
160 |
emit teamColorChanged(l[0], QColor::fromRgba(l[1].toInt()).name()); |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
161 |
break; |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
162 |
} |
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
163 |
} |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
164 |
} |
10416 | 165 |
|
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
166 |
QString HWEngine::currentSeed() |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
167 |
{ |
10430 | 168 |
return QString::fromLatin1(flibGetSeed()); |
10416 | 169 |
} |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
170 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
171 |
void HWEngine::fillModels() |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
172 |
{ |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
173 |
QStringList resultModel; |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
174 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
175 |
char ** themes = flibGetThemesList(); |
10616 | 176 |
for (char **i = themes; *i != NULL; i++) |
177 |
resultModel << QString::fromUtf8(*i); |
|
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
178 |
flibFreeThemesList(themes); |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
179 |
|
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
180 |
m_engine->rootContext()->setContextProperty("themesModel", QVariant::fromValue(resultModel)); |
10612 | 181 |
|
10616 | 182 |
// scripts model |
10612 | 183 |
resultModel.clear(); |
10616 | 184 |
for (char **i = flibGetScriptsList(); *i != NULL; i++) |
185 |
resultModel << QString::fromUtf8(*i); |
|
10612 | 186 |
|
187 |
m_engine->rootContext()->setContextProperty("scriptsModel", QVariant::fromValue(resultModel)); |
|
10616 | 188 |
|
189 |
// schemes model |
|
190 |
resultModel.clear(); |
|
191 |
for (char **i = flibGetSchemesList(); *i != NULL; i++) |
|
192 |
resultModel << QString::fromUtf8(*i); |
|
193 |
||
194 |
m_engine->rootContext()->setContextProperty("schemesModel", QVariant::fromValue(resultModel)); |
|
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
195 |
} |
10442 | 196 |
|
197 |
void HWEngine::getTeamsList() |
|
198 |
{ |
|
199 |
char ** teams = flibGetTeamsList(); |
|
200 |
for (char **i = teams; *i != NULL; i++) { |
|
201 |
QString team = QString::fromUtf8(*i); |
|
202 |
||
203 |
emit localTeamAdded(team, 0); |
|
204 |
} |
|
205 |
} |
|
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
206 |
|
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
207 |
void HWEngine::tryAddTeam(const QString &teamName) |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
208 |
{ |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
209 |
flibTryAddTeam(teamName.toUtf8().constData()); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
210 |
} |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
211 |
|
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
212 |
void HWEngine::tryRemoveTeam(const QString &teamName) |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
213 |
{ |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
214 |
flibTryRemoveTeam(teamName.toUtf8().constData()); |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10442
diff
changeset
|
215 |
} |
10450 | 216 |
|
217 |
void HWEngine::resetGameConfig() |
|
218 |
{ |
|
219 |
flibResetGameConfig(); |
|
220 |
} |
|
10452
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
221 |
|
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
222 |
void HWEngine::changeTeamColor(const QString &teamName, int dir) |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
223 |
{ |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
224 |
flibChangeTeamColor(teamName.toUtf8().constData(), dir); |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
225 |
} |
10456 | 226 |
|
227 |
void HWEngine::setTheme(const QString &theme) |
|
228 |
{ |
|
229 |
flibSetTheme(theme.toUtf8().constData()); |
|
230 |
} |
|
10612 | 231 |
|
232 |
void HWEngine::setScript(const QString &script) |
|
233 |
{ |
|
234 |
flibSetScript(script.toUtf8().constData()); |
|
235 |
} |