summaryrefslogtreecommitdiffstats
path: root/dummyimports
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2015-10-20 11:31:13 +0200
committerRobert Griebl <robert.griebl@pelagicore.com>2015-10-26 09:46:22 +0000
commit2491a2ba4b7c4bdc04566df84e1b6841c1393bb3 (patch)
tree8d87a4534b1d8abbaf6e358929b969168901304c /dummyimports
parent0c9e6ac0803ef00401ddfd08dc7558c20eefd0c4 (diff)
Initial commit of Pelagicore's ApplicationManager with squashed history.
(minus all 3rd party stuff - we will re-add them later, potentially changing the way some of them are handled completely) Change-Id: I55f15b12f0dbe0c4f979206eaa163d4793ff7073 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'dummyimports')
-rw-r--r--dummyimports/com/pelagicore/ApplicationInstaller/ApplicationInstaller.js34
-rw-r--r--dummyimports/com/pelagicore/ApplicationInstaller/qmldir1
-rw-r--r--dummyimports/com/pelagicore/ApplicationManager/ApplicationManager.js130
-rw-r--r--dummyimports/com/pelagicore/ApplicationManager/PelagicoreWindow.qml49
-rw-r--r--dummyimports/com/pelagicore/ApplicationManager/WindowManager.qml65
-rw-r--r--dummyimports/com/pelagicore/ApplicationManager/qmldir3
6 files changed, 282 insertions, 0 deletions
diff --git a/dummyimports/com/pelagicore/ApplicationInstaller/ApplicationInstaller.js b/dummyimports/com/pelagicore/ApplicationInstaller/ApplicationInstaller.js
new file mode 100644
index 00000000..c9718e66
--- /dev/null
+++ b/dummyimports/com/pelagicore/ApplicationInstaller/ApplicationInstaller.js
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Pelagicore AG
+** Contact: http://www.pelagicore.com/
+**
+** This file is part of the Pelagicore Application Manager.
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+** $QT_BEGIN_LICENSE:GPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Pelagicore Application Manager
+** licenses may use this file in accordance with the commercial license
+** agreement provided with the Software or, alternatively, in accordance
+** with the terms contained in a written agreement between you and
+** Pelagicore. For licensing terms and conditions, contact us at:
+** http://www.pelagicore.com.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3 requirements will be
+** met: http://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+function removePackage(id) {
+ print("Dummy implementation of removePackage was called for ", id)
+ return ""
+}
diff --git a/dummyimports/com/pelagicore/ApplicationInstaller/qmldir b/dummyimports/com/pelagicore/ApplicationInstaller/qmldir
new file mode 100644
index 00000000..8979b48f
--- /dev/null
+++ b/dummyimports/com/pelagicore/ApplicationInstaller/qmldir
@@ -0,0 +1 @@
+ApplicationInstaller 0.1 ApplicationInstaller.js
diff --git a/dummyimports/com/pelagicore/ApplicationManager/ApplicationManager.js b/dummyimports/com/pelagicore/ApplicationManager/ApplicationManager.js
new file mode 100644
index 00000000..fadee5e7
--- /dev/null
+++ b/dummyimports/com/pelagicore/ApplicationManager/ApplicationManager.js
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Pelagicore AG
+** Contact: http://www.pelagicore.com/
+**
+** This file is part of the Pelagicore Application Manager.
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+** $QT_BEGIN_LICENSE:GPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Pelagicore Application Manager
+** licenses may use this file in accordance with the commercial license
+** agreement provided with the Software or, alternatively, in accordance
+** with the terms contained in a written agreement between you and
+** Pelagicore. For licensing terms and conditions, contact us at:
+** http://www.pelagicore.com.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3 requirements will be
+** met: http://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+var count = 3
+var dummy = true
+
+var additionalConfiguration = { }
+
+function get(index) {
+// print("Type of the index " + typeof index)
+ if (typeof index === 'number')
+ return createAppEntry(index)
+ else if (typeof index === 'string') {
+ for (var i = 0; i < applibrary.length; i++) {
+// print(":::ApplicationManager::: running through the loop: " + index + " applibrary " + applibrary[i][0])
+ if (applibrary[i][0] === index) {
+ return createAppEntry(i)
+ }
+ }
+ }
+}
+
+
+function setApplicationAudioFocus(appId, appFocus)
+{
+ print("setApplicationAudioFocus(" + appId + ", " + appFocus + ")")
+}
+
+
+
+function startApplication(id) {
+ print("Starting the application. ")
+ var component
+ var item
+ for (var i = 0; i < applibrary.length; i++) {
+ var entry
+ //print("ApplicationManager: " + createAppEntry(i).applicationId + " given app id to open: " + id)
+ if (createAppEntry(i).applicationId == id) {
+ component = Qt.createComponent("../../../../ui/apps/" + createAppEntry(i).name + "/" + createAppEntry(i).qml);
+ if (component.status == Component.Ready) {
+ item = component.createObject()
+ if (!item)
+ console.log("Failed to create an Object.")
+ else {
+ print("Starting the application. Sending a signal", i, item)
+ WindowManager.surfaceItems[i] = item
+ WindowManager.surfaceItemReady(i, item)
+ }
+ }
+ else
+ console.log("Component creation failed " + createAppEntry(i).qml + " Error: " + component.errorString())
+ }
+ }
+}
+
+var applibrary=[
+
+ ["com.pelagicore.browser","icon.png", "Browser", "browser", "Browser.qml"],
+ ["com.pelagicore.movies","icon.png", "Movies", "media", "Movies.qml"],
+ ["com.pelagicore.music","icon.png", "Music", "media", "Music.qml"],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+ ["","", "", ""],
+
+ ];
+
+function createAppEntry(i) {
+
+
+ var entry = {
+ applicationId: applibrary[i][0],
+ icon: "/path/to/icon/" + applibrary[i][2] + "/" + applibrary[i][1],
+ name: applibrary[i][2],
+ isRunning: false,
+ isStarting: false,
+ isActive: false,
+ isBlocked: false,
+ isUpdating: false,
+ isRemovable: false,
+ updateProgress: 0,
+ codeFilePath: "",
+ categories: applibrary[i][3],
+ qml: applibrary[i][4],
+ surfaceItem: null
+ }
+ return entry
+}
diff --git a/dummyimports/com/pelagicore/ApplicationManager/PelagicoreWindow.qml b/dummyimports/com/pelagicore/ApplicationManager/PelagicoreWindow.qml
new file mode 100644
index 00000000..5e70c74a
--- /dev/null
+++ b/dummyimports/com/pelagicore/ApplicationManager/PelagicoreWindow.qml
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Pelagicore AG
+** Contact: http://www.pelagicore.com/
+**
+** This file is part of the Pelagicore Application Manager.
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+** $QT_BEGIN_LICENSE:GPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Pelagicore Application Manager
+** licenses may use this file in accordance with the commercial license
+** agreement provided with the Software or, alternatively, in accordance
+** with the terms contained in a written agreement between you and
+** Pelagicore. For licensing terms and conditions, contact us at:
+** http://www.pelagicore.com.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3 requirements will be
+** met: http://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import com.pelagicore.ApplicationManager 0.1
+
+Item {
+ id: root
+ width: 768
+ height: 860
+ property color color
+
+ signal windowPropertyChanged(string name, var value)
+ function close() {}
+ function showFullScreen() {}
+ function showMaximized() {}
+ function showNormal() {}
+ function setWindowProperty(status, value) {
+ WindowManager.surfaceWindowPropertyChanged(root, status, value)
+ windowPropertyChanged(status, value)
+ }
+}
diff --git a/dummyimports/com/pelagicore/ApplicationManager/WindowManager.qml b/dummyimports/com/pelagicore/ApplicationManager/WindowManager.qml
new file mode 100644
index 00000000..68853fe5
--- /dev/null
+++ b/dummyimports/com/pelagicore/ApplicationManager/WindowManager.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Pelagicore AG
+** Contact: http://www.pelagicore.com/
+**
+** This file is part of the Pelagicore Application Manager.
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+** $QT_BEGIN_LICENSE:GPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Pelagicore Application Manager
+** licenses may use this file in accordance with the commercial license
+** agreement provided with the Software or, alternatively, in accordance
+** with the terms contained in a written agreement between you and
+** Pelagicore. For licensing terms and conditions, contact us at:
+** http://www.pelagicore.com.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3 requirements will be
+** met: http://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.2
+import "ApplicationManager.js" as ApplicationManager
+
+QtObject {
+ id: root
+ property int count: ApplicationManager.count
+ property var surfaceItems: []
+ signal surfaceItemReady(int index, Item item)
+ signal surfaceItemClosing()
+ signal surfaceItemLost()
+ signal raiseApplicationWindow()
+ signal surfaceWindowPropertyChanged(Item surfaceItem, string name, var value)
+
+ function setSurfaceWindowProperty(appItem, type, status) {
+ appItem.windowPropertyChanged(type, status)
+ }
+
+ function surfaceWindowProperty(item, type) {
+ return false
+ }
+
+ function get(index) {
+ var entry = ApplicationManager.get(index)
+ entry.surfaceItem = surfaceItems[index]
+ return entry
+ }
+
+ Component.onCompleted: {
+ for (var i = 0; i < root.count; i++) {
+ surfaceItems.push(null)
+ }
+ }
+
+}
diff --git a/dummyimports/com/pelagicore/ApplicationManager/qmldir b/dummyimports/com/pelagicore/ApplicationManager/qmldir
new file mode 100644
index 00000000..4b4bbbb6
--- /dev/null
+++ b/dummyimports/com/pelagicore/ApplicationManager/qmldir
@@ -0,0 +1,3 @@
+ApplicationManager 0.1 ApplicationManager.js
+PelagicoreWindow 0.1 PelagicoreWindow.qml
+singleton WindowManager 0.1 WindowManager.qml