summaryrefslogtreecommitdiff
path: root/saltoq
diff options
context:
space:
mode:
Diffstat (limited to 'saltoq')
-rw-r--r--saltoq/qml/cover/CoverPage.qml54
-rw-r--r--saltoq/qml/pages/FirstPage.qml73
-rw-r--r--saltoq/qml/pages/SecondPage.qml62
-rw-r--r--saltoq/qml/saltoq.qml41
-rw-r--r--saltoq/saltoq.desktop6
-rw-r--r--saltoq/saltoq.pngbin0 -> 2965 bytes
-rw-r--r--saltoq/saltoq.pro31
-rw-r--r--saltoq/src/saltoq.cpp51
-rw-r--r--saltoq/translations/saltoq.ts37
9 files changed, 355 insertions, 0 deletions
diff --git a/saltoq/qml/cover/CoverPage.qml b/saltoq/qml/cover/CoverPage.qml
new file mode 100644
index 0000000..341b7f9
--- /dev/null
+++ b/saltoq/qml/cover/CoverPage.qml
@@ -0,0 +1,54 @@
+/*
+ Copyright (C) 2013 Jolla Ltd.
+ Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ All rights reserved.
+
+ You may use this file under the terms of BSD license as follows:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Jolla Ltd nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+CoverBackground {
+ Label {
+ id: label
+ anchors.centerIn: parent
+ text: qsTr("My Cover")
+ }
+
+ CoverActionList {
+ id: coverAction
+
+ CoverAction {
+ iconSource: "image://theme/icon-cover-next"
+ }
+
+ CoverAction {
+ iconSource: "image://theme/icon-cover-pause"
+ }
+ }
+}
+
+
diff --git a/saltoq/qml/pages/FirstPage.qml b/saltoq/qml/pages/FirstPage.qml
new file mode 100644
index 0000000..f503e67
--- /dev/null
+++ b/saltoq/qml/pages/FirstPage.qml
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2013 Jolla Ltd.
+ Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ All rights reserved.
+
+ You may use this file under the terms of BSD license as follows:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Jolla Ltd nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+
+Page {
+ id: page
+
+ // To enable PullDownMenu, place our content in a SilicaFlickable
+ SilicaFlickable {
+ anchors.fill: parent
+
+ // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
+ PullDownMenu {
+ MenuItem {
+ text: qsTr("Show Page 2")
+ onClicked: pageStack.push(Qt.resolvedUrl("SecondPage.qml"))
+ }
+ }
+
+ // Tell SilicaFlickable the height of its content.
+ contentHeight: column.height
+
+ // Place our content in a Column. The PageHeader is always placed at the top
+ // of the page, followed by our content.
+ Column {
+ id: column
+
+ width: page.width
+ spacing: Theme.paddingLarge
+ PageHeader {
+ title: qsTr("Saltoq")
+ }
+ Label {
+ x: Theme.paddingLarge
+ text: qsTr("Hello Toq users")
+ color: Theme.secondaryHighlightColor
+ font.pixelSize: Theme.fontSizeExtraLarge
+ }
+ }
+ }
+}
+
+
diff --git a/saltoq/qml/pages/SecondPage.qml b/saltoq/qml/pages/SecondPage.qml
new file mode 100644
index 0000000..c5b288d
--- /dev/null
+++ b/saltoq/qml/pages/SecondPage.qml
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 2013 Jolla Ltd.
+ Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ All rights reserved.
+
+ You may use this file under the terms of BSD license as follows:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Jolla Ltd nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+
+Page {
+ id: page
+ SilicaListView {
+ id: listView
+ model: 20
+ anchors.fill: parent
+ header: PageHeader {
+ title: qsTr("Nested Page")
+ }
+ delegate: BackgroundItem {
+ id: delegate
+
+ Label {
+ x: Theme.paddingLarge
+ text: qsTr("Item") + " " + index
+ anchors.verticalCenter: parent.verticalCenter
+ color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
+ }
+ onClicked: console.log("Clicked " + index)
+ }
+ VerticalScrollDecorator {}
+ }
+}
+
+
+
+
+
diff --git a/saltoq/qml/saltoq.qml b/saltoq/qml/saltoq.qml
new file mode 100644
index 0000000..ddbf376
--- /dev/null
+++ b/saltoq/qml/saltoq.qml
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2013 Jolla Ltd.
+ Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ All rights reserved.
+
+ You may use this file under the terms of BSD license as follows:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Jolla Ltd nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import "pages"
+
+ApplicationWindow
+{
+ initialPage: Component { FirstPage { } }
+ cover: Qt.resolvedUrl("cover/CoverPage.qml")
+}
+
+
diff --git a/saltoq/saltoq.desktop b/saltoq/saltoq.desktop
new file mode 100644
index 0000000..88ea59b
--- /dev/null
+++ b/saltoq/saltoq.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+X-Nemo-Application-Type=silica-qt5
+Icon=saltoq
+Exec=saltoq
+Name=Saltoq
diff --git a/saltoq/saltoq.png b/saltoq/saltoq.png
new file mode 100644
index 0000000..4c883a0
--- /dev/null
+++ b/saltoq/saltoq.png
Binary files differ
diff --git a/saltoq/saltoq.pro b/saltoq/saltoq.pro
new file mode 100644
index 0000000..b490a31
--- /dev/null
+++ b/saltoq/saltoq.pro
@@ -0,0 +1,31 @@
+# NOTICE:
+#
+# Application name defined in TARGET has a corresponding QML filename.
+# If name defined in TARGET is changed, the following needs to be done
+# to match new name:
+# - corresponding QML filename must be changed
+# - desktop icon filename must be changed
+# - desktop filename must be changed
+# - icon definition filename in desktop file must be changed
+# - translation filenames have to be changed
+
+# The name of your application
+TARGET = saltoq
+
+CONFIG += sailfishapp
+
+SOURCES += src/saltoq.cpp
+
+OTHER_FILES += qml/saltoq.qml \
+ qml/cover/CoverPage.qml \
+ qml/pages/FirstPage.qml \
+ qml/pages/SecondPage.qml \
+ rpm/saltoq.changes.in \
+ rpm/saltoq.spec \
+ rpm/saltoq.yaml \
+ translations/*.ts \
+ saltoq.desktop
+
+CONFIG += sailfishapp_i18n
+
+#TRANSLATIONS += translations/saltoq-de.ts
diff --git a/saltoq/src/saltoq.cpp b/saltoq/src/saltoq.cpp
new file mode 100644
index 0000000..df9646c
--- /dev/null
+++ b/saltoq/src/saltoq.cpp
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2013 Jolla Ltd.
+ Contact: Thomas Perl <thomas.perl@jollamobile.com>
+ All rights reserved.
+
+ You may use this file under the terms of BSD license as follows:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Jolla Ltd nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifdef QT_QML_DEBUG
+#include <QtQuick>
+#endif
+
+#include <sailfishapp.h>
+
+
+int main(int argc, char *argv[])
+{
+ // SailfishApp::main() will display "qml/template.qml", if you need more
+ // control over initialization, you can use:
+ //
+ // - SailfishApp::application(int, char *[]) to get the QGuiApplication *
+ // - SailfishApp::createView() to get a new QQuickView * instance
+ // - SailfishApp::pathTo(QString) to get a QUrl to a resource file
+ //
+ // To display the view, call "show()" (will show fullscreen on device).
+
+ return SailfishApp::main(argc, argv);
+}
+
diff --git a/saltoq/translations/saltoq.ts b/saltoq/translations/saltoq.ts
new file mode 100644
index 0000000..79326b9
--- /dev/null
+++ b/saltoq/translations/saltoq.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1">
+<context>
+ <name>CoverPage</name>
+ <message>
+ <source>My Cover</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>FirstPage</name>
+ <message>
+ <source>Show Page 2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Saltoq</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Hello Toq users</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SecondPage</name>
+ <message>
+ <source>Nested Page</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Item</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>