summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@nokia.com>2011-05-20 10:40:48 +0200
committerRainer Keller <rainer.keller@nokia.com>2011-06-06 14:04:49 +0200
commitbfec55a95542f4621816d09122a5628b1405c826 (patch)
tree128c8bd4b45602dd1c5a332ab6b5e1276cc558a8
parenta5518a9f975369984c0a290300e155463c8a462e (diff)
Add plugin support and use QtSimulator module
Reviewed-by: ckamm Task-number: QTSIM-161
-rw-r--r--library/components/locationui.cpp2
-rw-r--r--library/components/locationui.h2
-rw-r--r--library/library.pro (renamed from library/remotecontrolwidget.pro)1
-rw-r--r--library/plugininterface.h17
-rw-r--r--library/toolbox.cpp10
-rw-r--r--library/toolbox.h3
-rw-r--r--pluginSupport/pluginSupport.pro11
-rw-r--r--remotecontrolwidget.pro2
8 files changed, 46 insertions, 2 deletions
diff --git a/library/components/locationui.cpp b/library/components/locationui.cpp
index 7320867..e595140 100644
--- a/library/components/locationui.cpp
+++ b/library/components/locationui.cpp
@@ -217,7 +217,7 @@ LocationUi::~LocationUi()
{
}
-LocationScriptInterface *LocationUi::scriptInterface() const
+QObject *LocationUi::scriptInterface() const
{
return mScriptInterface;
}
diff --git a/library/components/locationui.h b/library/components/locationui.h
index baa8849..591c367 100644
--- a/library/components/locationui.h
+++ b/library/components/locationui.h
@@ -91,7 +91,7 @@ public:
explicit LocationUi(QWidget *parent = 0);
virtual ~LocationUi();
- LocationScriptInterface *scriptInterface() const;
+ QObject *scriptInterface() const;
LocationData locationData() const;
SatelliteData satelliteData() const;
diff --git a/library/remotecontrolwidget.pro b/library/library.pro
index cccefa0..8bd713f 100644
--- a/library/remotecontrolwidget.pro
+++ b/library/library.pro
@@ -45,6 +45,7 @@ PUBLIC_HEADERS += \
toolbox.h \
optionsitem.h \
scriptadapter.h \
+ plugininterface.h \
components/locationui.h \
components/powerbutton.h \
components/batterybutton.h \
diff --git a/library/plugininterface.h b/library/plugininterface.h
new file mode 100644
index 0000000..e2db885
--- /dev/null
+++ b/library/plugininterface.h
@@ -0,0 +1,17 @@
+#ifndef PLUGININTERFACES_H
+#define PLUGININTERFACES_H
+
+#include <QtPlugin>
+#include <QList>
+class ToolBoxPage;
+class QWidget;
+
+class PluginInterface
+{
+public:
+ virtual QList<ToolBoxPage *> pages(QWidget *parent) = 0;
+};
+
+Q_DECLARE_INTERFACE(PluginInterface, "com.trolltech.QtSimulator.pluginInterface/1.0");
+
+#endif // PLUGININTERFACES_H
diff --git a/library/toolbox.cpp b/library/toolbox.cpp
index fd1a350..d8f209d 100644
--- a/library/toolbox.cpp
+++ b/library/toolbox.cpp
@@ -414,3 +414,13 @@ void ToolBoxPage::showAndOpen(bool show)
showContent(show);
emit visibilityChanged(show);
}
+
+QObject *ToolBoxPage::scriptInterface() const
+{
+ return 0;
+}
+
+QString ToolBoxPage::scriptInterfaceName() const
+{
+ return QString();
+}
diff --git a/library/toolbox.h b/library/toolbox.h
index a5e038f..c3758be 100644
--- a/library/toolbox.h
+++ b/library/toolbox.h
@@ -72,6 +72,9 @@ public:
virtual void readSettings(QSettings &);
virtual void writeSettings(QSettings &) const;
+ virtual QObject *scriptInterface() const;
+ virtual QString scriptInterfaceName() const;
+
public slots:
void showAndOpen(bool show);
diff --git a/pluginSupport/pluginSupport.pro b/pluginSupport/pluginSupport.pro
new file mode 100644
index 0000000..4ce7deb
--- /dev/null
+++ b/pluginSupport/pluginSupport.pro
@@ -0,0 +1,11 @@
+isEmpty(QT_NOKIA_SDK_PATH): error(Please call qmake with QT_NOKIA_SDK_PATH=<path to nokia-sdk source directory>)
+
+include($$QT_NOKIA_SDK_PATH/src/simulator/simulator.pri)
+
+TEMPLATE=lib
+TARGET=simulatorplugin
+target.path = $$PREFIX/lib
+
+headers.path = $$PREFIX/include/simulatorplugin
+
+INSTALLS+=target headers
diff --git a/remotecontrolwidget.pro b/remotecontrolwidget.pro
new file mode 100644
index 0000000..05d7559
--- /dev/null
+++ b/remotecontrolwidget.pro
@@ -0,0 +1,2 @@
+TEMPLATE=subdirs
+SUBDIRS=library pluginSupport