Initial project
authorDavid Llewellyn-Jones <david@flypig.co.uk>
Fri, 29 Jun 2018 18:29:58 +0000 (19:29 +0100)
committerDavid Llewellyn-Jones <david@flypig.co.uk>
Fri, 29 Jun 2018 18:29:58 +0000 (19:29 +0100)
16 files changed:
harbour-pedalo.desktop [new file with mode: 0644]
harbour-pedalo.pro [new file with mode: 0644]
icons/108x108/harbour-pedalo.png [new file with mode: 0644]
icons/128x128/harbour-pedalo.png [new file with mode: 0644]
icons/172x172/harbour-pedalo.png [new file with mode: 0644]
icons/86x86/harbour-pedalo.png [new file with mode: 0644]
qml/cover/CoverPage.qml [new file with mode: 0644]
qml/harbour-pedalo.qml [new file with mode: 0644]
qml/pages/FirstPage.qml [new file with mode: 0644]
qml/pages/SecondPage.qml [new file with mode: 0644]
rpm/harbour-pedalo.changes.in [new file with mode: 0644]
rpm/harbour-pedalo.changes.run.in [new file with mode: 0644]
rpm/harbour-pedalo.yaml [new file with mode: 0644]
src/harbour-pedalo.cpp [new file with mode: 0644]
translations/harbour-pedalo-de.ts [new file with mode: 0644]
translations/harbour-pedalo.ts [new file with mode: 0644]

diff --git a/harbour-pedalo.desktop b/harbour-pedalo.desktop
new file mode 100644 (file)
index 0000000..42fab8e
--- /dev/null
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+X-Nemo-Application-Type=silica-qt5
+Icon=harbour-pedalo
+Exec=harbour-pedalo
+Name=harbour-pedalo
+# translation example:
+# your app name in German locale (de)
+#
+# Remember to comment out the following line, if you do not want to use
+# a different app name in German locale (de).
+Name[de]=harbour-pedalo
diff --git a/harbour-pedalo.pro b/harbour-pedalo.pro
new file mode 100644 (file)
index 0000000..62d08f9
--- /dev/null
@@ -0,0 +1,40 @@
+# 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 = harbour-pedalo
+
+CONFIG += sailfishapp
+
+SOURCES += src/harbour-pedalo.cpp
+
+DISTFILES += qml/harbour-pedalo.qml \
+    qml/cover/CoverPage.qml \
+    qml/pages/FirstPage.qml \
+    qml/pages/SecondPage.qml \
+    rpm/harbour-pedalo.changes.in \
+    rpm/harbour-pedalo.changes.run.in \
+    rpm/harbour-pedalo.spec \
+    rpm/harbour-pedalo.yaml \
+    translations/*.ts \
+    harbour-pedalo.desktop
+
+SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
+
+# to disable building translations every time, comment out the
+# following CONFIG line
+CONFIG += sailfishapp_i18n
+
+# German translation is enabled as an example. If you aren't
+# planning to localize your app, remember to comment out the
+# following TRANSLATIONS line. And also do not forget to
+# modify the localized app name in the the .desktop file.
+TRANSLATIONS += translations/harbour-pedalo-de.ts
diff --git a/icons/108x108/harbour-pedalo.png b/icons/108x108/harbour-pedalo.png
new file mode 100644 (file)
index 0000000..ab10628
Binary files /dev/null and b/icons/108x108/harbour-pedalo.png differ
diff --git a/icons/128x128/harbour-pedalo.png b/icons/128x128/harbour-pedalo.png
new file mode 100644 (file)
index 0000000..54375c5
Binary files /dev/null and b/icons/128x128/harbour-pedalo.png differ
diff --git a/icons/172x172/harbour-pedalo.png b/icons/172x172/harbour-pedalo.png
new file mode 100644 (file)
index 0000000..36eee58
Binary files /dev/null and b/icons/172x172/harbour-pedalo.png differ
diff --git a/icons/86x86/harbour-pedalo.png b/icons/86x86/harbour-pedalo.png
new file mode 100644 (file)
index 0000000..ad316d6
Binary files /dev/null and b/icons/86x86/harbour-pedalo.png differ
diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml
new file mode 100644 (file)
index 0000000..fc562d5
--- /dev/null
@@ -0,0 +1,22 @@
+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/qml/harbour-pedalo.qml b/qml/harbour-pedalo.qml
new file mode 100644 (file)
index 0000000..829cf95
--- /dev/null
@@ -0,0 +1,10 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import "pages"
+
+ApplicationWindow
+{
+    initialPage: Component { FirstPage { } }
+    cover: Qt.resolvedUrl("cover/CoverPage.qml")
+    allowedOrientations: defaultAllowedOrientations
+}
diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml
new file mode 100644 (file)
index 0000000..447accf
--- /dev/null
@@ -0,0 +1,43 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Page {
+    id: page
+
+    // The effective value will be restricted by ApplicationWindow.allowedOrientations
+    allowedOrientations: Orientation.All
+
+    // 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("UI Template")
+            }
+            Label {
+                x: Theme.horizontalPageMargin
+                text: qsTr("Hello Sailors")
+                color: Theme.secondaryHighlightColor
+                font.pixelSize: Theme.fontSizeExtraLarge
+            }
+        }
+    }
+}
diff --git a/qml/pages/SecondPage.qml b/qml/pages/SecondPage.qml
new file mode 100644 (file)
index 0000000..6dbadf4
--- /dev/null
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Page {
+    id: page
+
+    // The effective value will be restricted by ApplicationWindow.allowedOrientations
+    allowedOrientations: Orientation.All
+
+    SilicaListView {
+        id: listView
+        model: 20
+        anchors.fill: parent
+        header: PageHeader {
+            title: qsTr("Nested Page")
+        }
+        delegate: BackgroundItem {
+            id: delegate
+
+            Label {
+                x: Theme.horizontalPageMargin
+                text: qsTr("Item") + " " + index
+                anchors.verticalCenter: parent.verticalCenter
+                color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
+            }
+            onClicked: console.log("Clicked " + index)
+        }
+        VerticalScrollDecorator {}
+    }
+}
diff --git a/rpm/harbour-pedalo.changes.in b/rpm/harbour-pedalo.changes.in
new file mode 100644 (file)
index 0000000..97d0ba0
--- /dev/null
@@ -0,0 +1,18 @@
+# Rename this file as harbour-pedalo.changes to include changelog
+# entries in your RPM file.
+#
+# Add new changelog entries following the format below.
+# Add newest entries to the top of the list.
+# Separate entries from eachother with a blank line.
+#
+# Alternatively, if your changelog is automatically generated (e.g. with
+# the git-change-log command provided with Sailfish OS SDK), create a
+# harbour-pedalo.changes.run script to let mb2 run the required commands for you.
+
+# * date Author's Name <author's email> version-release
+# - Summary of changes
+
+* Sun Apr 13 2014 Jack Tar <jack.tar@example.com> 0.0.1-1
+- Scrubbed the deck
+- Hoisted the sails
+
diff --git a/rpm/harbour-pedalo.changes.run.in b/rpm/harbour-pedalo.changes.run.in
new file mode 100644 (file)
index 0000000..31fc34e
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Rename this file as harbour-pedalo.changes.run to let mb2 automatically
+# generate changelog from well formatted Git commit messages and tag
+# annotations.
+
+git-change-log
+
+# Here are some basic examples how to change from the default behavior. Run
+# git-change-log --help inside the Sailfish OS SDK chroot or build engine to
+# learn all the options git-change-log accepts.
+
+# Use a subset of tags
+#git-change-log --tags refs/tags/my-prefix/*
+
+# Group entries by minor revision, suppress headlines for patch-level revisions
+#git-change-log --dense '/[0-9]\+\.[0-9\+$'
+
+# Trim very old changes
+#git-change-log --since 2014-04-01
+#echo '[ Some changelog entries trimmed for brevity ]'
+
+# Use the subjects (first lines) of tag annotations when no entry would be
+# included for a revision otherwise
+#git-change-log --auto-add-annotations
diff --git a/rpm/harbour-pedalo.yaml b/rpm/harbour-pedalo.yaml
new file mode 100644 (file)
index 0000000..820ff89
--- /dev/null
@@ -0,0 +1,45 @@
+Name: harbour-pedalo
+Summary: Pedalo
+Version: 0.1-1
+Release: 1
+# The contents of the Group field should be one of the groups listed here:
+# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
+Group: Qt/Qt
+URL: http://example.org/
+License: LICENSE
+# This must be generated before uploading a package to a remote build service.
+# Usually this line does not need to be modified.
+Sources:
+- '%{name}-%{version}.tar.bz2'
+Description: |
+  Short description of my Sailfish OS Application
+Configure: none
+# The qtc5 builder inserts macros to allow QtCreator to have fine
+# control over qmake/make execution
+Builder: qtc5
+
+# This section specifies build dependencies that are resolved using pkgconfig.
+# This is the preferred way of specifying build dependencies for your package.
+PkgConfigBR:
+  - sailfishapp >= 1.0.2
+  - Qt5Core
+  - Qt5Qml
+  - Qt5Quick
+
+# Build dependencies without a pkgconfig setup can be listed here
+# PkgBR:
+#   - package-needed-to-build
+
+# Runtime dependencies which are not automatically detected
+Requires:
+  - sailfishsilica-qt5 >= 0.10.9 
+
+# All installed files
+Files:
+  - '%{_bindir}'
+  - '%{_datadir}/%{name}'
+  - '%{_datadir}/applications/%{name}.desktop'
+  - '%{_datadir}/icons/hicolor/*/apps/%{name}.png'
+
+# For more information about yaml and what's supported in Sailfish OS
+# build system, please see https://wiki.merproject.org/wiki/Spectacle
diff --git a/src/harbour-pedalo.cpp b/src/harbour-pedalo.cpp
new file mode 100644 (file)
index 0000000..4cec530
--- /dev/null
@@ -0,0 +1,20 @@
+#ifdef QT_QML_DEBUG
+#include <QtQuick>
+#endif
+
+#include <sailfishapp.h>
+
+int main(int argc, char *argv[])
+{
+    // SailfishApp::main() will display "qml/harbour-pedalo.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
+    //   - SailfishApp::pathToMainQml() to get a QUrl to the main QML file
+    //
+    // To display the view, call "show()" (will show fullscreen on device).
+
+    return SailfishApp::main(argc, argv);
+}
diff --git a/translations/harbour-pedalo-de.ts b/translations/harbour-pedalo-de.ts
new file mode 100644 (file)
index 0000000..7dbef71
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+    <name>CoverPage</name>
+    <message>
+        <source>My Cover</source>
+        <translation>Mein Cover</translation>
+    </message>
+</context>
+<context>
+    <name>FirstPage</name>
+    <message>
+        <source>Show Page 2</source>
+        <translation>Zur Seite 2</translation>
+    </message>
+    <message>
+        <source>UI Template</source>
+        <translation>UI-Vorlage</translation>
+    </message>
+    <message>
+        <source>Hello Sailors</source>
+        <translation>Hallo Matrosen</translation>
+    </message>
+</context>
+<context>
+    <name>SecondPage</name>
+    <message>
+        <source>Nested Page</source>
+        <translation>Unterseite</translation>
+    </message>
+    <message>
+        <source>Item</source>
+        <translation>Element</translation>
+    </message>
+</context>
+</TS>
diff --git a/translations/harbour-pedalo.ts b/translations/harbour-pedalo.ts
new file mode 100644 (file)
index 0000000..0374c0e
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<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>UI Template</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Hello Sailors</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>