From 691aa41ebc4b4215b9f28a22442caaebc8bdb0e4 Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Date: Thu, 9 Dec 2010 16:43:03 +0100
Subject: [PATCH] QmlDesigner: adding Meego plugin

---
 .../meegoplugin/images/item-icon.png          | Bin 0 -> 396 bytes
 .../meegoplugin/images/item-icon16.png        | Bin 0 -> 312 bytes
 .../qmldesigner/meegoplugin/meego.metainfo    |  26 ++++++++
 .../qmldesigner/meegoplugin/meegoplugin.cpp   |  54 ++++++++++++++++
 .../qmldesigner/meegoplugin/meegoplugin.h     |  58 ++++++++++++++++++
 .../qmldesigner/meegoplugin/meegoplugin.pri   |  17 +++++
 .../qmldesigner/meegoplugin/meegoplugin.pro   |   4 ++
 .../qmldesigner/meegoplugin/meegoplugin.qrc   |   7 +++
 .../qmldesigner/meegoplugin/plugindestdir.pri |   5 ++
 9 files changed, 171 insertions(+)
 create mode 100644 src/plugins/qmldesigner/meegoplugin/images/item-icon.png
 create mode 100644 src/plugins/qmldesigner/meegoplugin/images/item-icon16.png
 create mode 100644 src/plugins/qmldesigner/meegoplugin/meego.metainfo
 create mode 100644 src/plugins/qmldesigner/meegoplugin/meegoplugin.cpp
 create mode 100644 src/plugins/qmldesigner/meegoplugin/meegoplugin.h
 create mode 100644 src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
 create mode 100644 src/plugins/qmldesigner/meegoplugin/meegoplugin.pro
 create mode 100644 src/plugins/qmldesigner/meegoplugin/meegoplugin.qrc
 create mode 100644 src/plugins/qmldesigner/meegoplugin/plugindestdir.pri

diff --git a/src/plugins/qmldesigner/meegoplugin/images/item-icon.png b/src/plugins/qmldesigner/meegoplugin/images/item-icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..fc53d38ae7f7385b7a109bcc5e27b4fc4bb31361
GIT binary patch
literal 396
zcmV;70dxL|P)<h;3K|Lk000e1NJLTq000;O000;W1^@s6;CDUv0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUzE=fc|RCwC7mdOo+Fc3v2D96-*SX!VC
zTHumP(gh9Vnl9*t8>^@T3?>XR$Sg59c19Y(80&rGZ)`4o-`@b>0_s7B>{!yN?Wzdv
zha{L`7}C8Cvw-J$uez@9XUR>|K-;!3%)s8`cMt^6g#f~R-yiR*ssh`#=iYoxDTOpm
z!Ev1Vd0Cd=y6#*@QS=xtqkyrN7Qwr&gCt3WaIE<-&cX>H<H*-AQN0lm!Sg(qhVM?1
zPWYh*xJqQ<r#-;cl4Y4R{ImzMhDv#Gw9b`0D2f6s%la99=z(dPN^qeE2%q*A9q^3+
zZUs8w3ju`V=vCogJ-{zk2mG4{6yHEMoEIQ`<3BuTb-~vj;E6`rdHQB25yWx4=p<Vs
qix(KDhn=BM&>RN)&G=h<1Q-BtyHuGvg)=As0000<MNUMnLSTZIi>n|2

literal 0
HcmV?d00001

diff --git a/src/plugins/qmldesigner/meegoplugin/images/item-icon16.png b/src/plugins/qmldesigner/meegoplugin/images/item-icon16.png
new file mode 100644
index 0000000000000000000000000000000000000000..7d2d7a505020408d752a153ecf948bf6c2d0847f
GIT binary patch
literal 312
zcmV-80muG{P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUy+DSw~RCwB?lTi+XAPk19^BzWskG^rF
zJuEu~msplv!UHMdIgFxG6A9>a;F>g{z*ov&0M0o~({#Jwv37`Xz!>{<U3Z5Q!_C7m
zfKqC4ZEq>%b4gGXh0+dLmKmUJTN5KtRTU6I%z9atpc6#NI`Iw0Q~SOLAp}rL&3e-`
zW*l!zUEy&Y4`Dk_&fx9lZR}KF-x<a7ft>^^>{Irk2B>yj*FRx9b`oH#LSQEWo^1Cy
zSc5c8z2Th(*fxALzVJ>1Y}*wWZTSm%p1*Vl9uQ{cGr>PL3oro6lI-CH1KxlD0000<
KMNUMnLSTXtk$L+7

literal 0
HcmV?d00001

diff --git a/src/plugins/qmldesigner/meegoplugin/meego.metainfo b/src/plugins/qmldesigner/meegoplugin/meego.metainfo
new file mode 100644
index 00000000000..81cc7829438
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/meego.metainfo
@@ -0,0 +1,26 @@
+<metainfo>
+  <node name="Label" icon=":/mxplugin/images/item-icon16.png">
+    <itemlibraryentry name="Label (MeeGo)"  category="Components MeeGo" libraryIcon=":/meegoplugin/images/item-icon.png">
+    </itemlibraryentry>
+  </node>
+  <node name="Button" icon=":/meegoplugin/images/item-icon16.png">
+    <itemlibraryentry name="Button (MeeGo)"  category="Components MeeGo" libraryIcon=":/meegoplugin/images/item-icon.png">
+    </itemlibraryentry>
+  </node>
+  <node name="Slider" icon=":/meegoplugin/images/item-icon16.png">
+    <itemlibraryentry name="Slider (MeeGo)"  category="Components MeeGo" libraryIcon=":/meegoplugin/images/item-icon.png">
+    </itemlibraryentry>
+  </node>
+  <node name="CheckBox" icon=":/meegoplugin/images/item-icon16.png">
+    <itemlibraryentry name="CheckBox (MeeGo)" category="Components MeeGo" libraryIcon=":/meegoplugin/images/item-icon.png">
+    </itemlibraryentry>
+  </node>
+  <node name="Spinner" icon=":/meegoplugin/images/item-icon16.png">
+    <itemlibraryentry name="Spinner (MeeGo)"  category="Components MeeGo" libraryIcon=":/meegoplugin/images/item-icon.png">
+    </itemlibraryentry>
+  </node>
+  <node name="LineEdit" icon=":/meegoplugin/images/item-icon16.png">
+    <itemlibraryentry name="LineEdit (MeeGo)"  category="Components MeeGo" libraryIcon=":/meegoplugin/images/item-icon.png">
+    </itemlibraryentry>
+  </node>
+</metainfo>
diff --git a/src/plugins/qmldesigner/meegoplugin/meegoplugin.cpp b/src/plugins/qmldesigner/meegoplugin/meegoplugin.cpp
new file mode 100644
index 00000000000..6eaaa0c564b
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/meegoplugin.cpp
@@ -0,0 +1,54 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#include "meegoplugin.h"
+#include <widgetplugin_helper.h>
+#include <QtCore/QtPlugin>
+
+namespace QmlDesigner {
+
+
+MeegoPlugin::MeegoPlugin()
+{
+}
+
+QString MeegoPlugin::pluginName()
+{
+    return ("MeegoPlugin");
+}
+
+QString MeegoPlugin::metaInfo()
+{
+    return QString(":/meegoplugin/meego.metainfo");
+}
+
+}
+
+Q_EXPORT_PLUGIN(QmlDesigner::MeegoPlugin)
+
diff --git a/src/plugins/qmldesigner/meegoplugin/meegoplugin.h b/src/plugins/qmldesigner/meegoplugin/meegoplugin.h
new file mode 100644
index 00000000000..3e05d600756
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/meegoplugin.h
@@ -0,0 +1,58 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef MEEGOPLUGIN_H
+#define MEEGOPLUGIN_H
+
+#include <iwidgetplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+
+QT_BEGIN_NAMESPACE
+QT_END_NAMESPACE
+
+namespace QmlDesigner {
+
+class MeegoPlugin : public QObject, QmlDesigner::IWidgetPlugin
+{
+    Q_OBJECT
+    Q_DISABLE_COPY(MeegoPlugin)
+    Q_INTERFACES(QmlDesigner::IWidgetPlugin)
+public:
+    MeegoPlugin();
+    ~MeegoPlugin() {}
+
+    QString metaInfo();
+    QString pluginName();
+
+};
+
+} // namespace QmlDesigner
+
+
+#endif // MEEGOPLUGIN_H
diff --git a/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri b/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
new file mode 100644
index 00000000000..04abc898749
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
@@ -0,0 +1,17 @@
+TARGET = meegoplugin
+TEMPLATE = lib
+CONFIG += plugin
+
+QT += script \
+      declarative
+
+include (../designercore/iwidgetplugin.pri)
+
+DEFINES += SYMBIAN_LIBRARY
+SOURCES += $$PWD/meegoplugin.cpp
+
+HEADERS += $$PWD/meegoplugin.h  $$PWD/../designercore/include/iwidgetplugin.h
+
+RESOURCES += $$PWD/meegoplugin.qrc
+
+OTHER_FILES += $$PWD/meego.metainfo
diff --git a/src/plugins/qmldesigner/meegoplugin/meegoplugin.pro b/src/plugins/qmldesigner/meegoplugin/meegoplugin.pro
new file mode 100644
index 00000000000..7781017a17d
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/meegoplugin.pro
@@ -0,0 +1,4 @@
+include(../../../../qtcreator.pri)
+include(../../../private_headers.pri)
+include(meegoplugin.pri)
+include(plugindestdir.pri)
diff --git a/src/plugins/qmldesigner/meegoplugin/meegoplugin.qrc b/src/plugins/qmldesigner/meegoplugin/meegoplugin.qrc
new file mode 100644
index 00000000000..f52939e0389
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/meegoplugin.qrc
@@ -0,0 +1,7 @@
+<RCC>
+    <qresource prefix="/meegoplugin">
+        <file>meego.metainfo</file>
+        <file>images/item-icon16.png</file>
+	<file>images/item-icon.png</file>
+    </qresource>
+</RCC>
diff --git a/src/plugins/qmldesigner/meegoplugin/plugindestdir.pri b/src/plugins/qmldesigner/meegoplugin/plugindestdir.pri
new file mode 100644
index 00000000000..24f0c19b72b
--- /dev/null
+++ b/src/plugins/qmldesigner/meegoplugin/plugindestdir.pri
@@ -0,0 +1,5 @@
+macx {
+  DESTDIR = $$IDE_LIBRARY_PATH/QmlDesigner
+} else {
+  DESTDIR = $$IDE_BUILD_TREE/lib/qmldesigner
+}
-- 
GitLab