diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/example.pro | 2 | ||||
-rw-r--r-- | example/main.cpp | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/example/example.pro b/example/example.pro index 9b8f895..b1fd669 100644 --- a/example/example.pro +++ b/example/example.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT += core gui +QT += core gui script TARGET = example TEMPLATE = app diff --git a/example/main.cpp b/example/main.cpp index e8716bc..e66f03a 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -1,5 +1,7 @@ #include <QtGui/QApplication> #include "remotecontrolwidget.h" +#include "scriptadapter.h" +#include "components/scriptui.h" #include "components/locationui.h" #include "components/batterybutton.h" #include "components/powerbutton.h" @@ -9,8 +11,8 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); RemoteControlWidget w; - LocationUi l; - w.addToolBoxPage(&l); + LocationUi locationUi; + w.addToolBoxPage(&locationUi); BatteryButton batteryButton; w.addMenuButton(&batteryButton); @@ -18,6 +20,11 @@ int main(int argc, char *argv[]) PowerButton powerButton; w.addMenuButton(&powerButton); + ScriptAdapter adapter; + adapter.addScriptInterface("location", locationUi.scriptInterface()); + ScriptUi scriptUi(&adapter); + w.addToolBoxPage(&scriptUi); + w.show(); return a.exec(); } |