commit 047ef288f4de390d8a8393de49c24d3c2a4d35bb Author: Denis Fedoseev Date: Thu Jun 22 12:28:07 2023 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8ca622 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.mb2 +RPMS +translations/*.qm +*.list +*.md.backup +*.o +*.pro.user* +Makefile +de.whataco.TED diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..42c8e4f --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,12 @@ +# Authors + +* Kirill Chuvilin, + * Product owner, 2021-2022 + * Maintainer, 2021-2022 + * Reviewer, 2021-2022 +* Andrey Moskalev, + * Developer, 2021-2022 +* Andrey Zhilin, + * Icon designer, 2021-2022 +* Pavel Kazeko, + * Reviewer, 2021-2022 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..00a93d7 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,83 @@ +# Code of Conduct + +## What is this code of conduct for? + +Code of conduct is a current set of rules of the Open Mobile Platform +which informs you how we expect +the members of the Open Mobile Platform community +will interact while contributing and communicating. +We are committed to providing a friendly, safe and welcoming +environment for all, regardless of gender, gender identity and expression, +sexual orientation, ability, physical appearance, body size, race, age, +socioeconomic status, religion (or lack thereof), +or other marginalized aspect of community members. +We expect all members of the Open Mobile Platform community +to abide by this Code of Conduct whenever interacting +in Open Mobile Platform venues +(merge requests, pull requests, issues, 1-1 or group chat, meetups, conferences, etc.) + +## Examples of appropriate behavior + +* Using welcoming and inclusive language. +* Being respectful of differing viewpoints and experiences. +* Gracefully accepting constructive criticism. +* Focusing on what is best for the community. +* Showing empathy towards other community members. + +## Examples of inappropriate behavior + +Because we come from a variety of backgrounds, +we do not want to assume that everyone has the same assumptions +about what is and is not appropriate. +Here are some examples of inappropriate behavior +that are incompatible with our community's ethos: + +* spamming, trolling, intentionally disrupting conversations, + or irrelevant solicitation or advertisement; +* making demeaning or discriminatory comments; +* making negative assumptions about someone's background, + abilities, or intentions; +* harassing or stalking individuals (online or in person). + +In general: treat others how you would like to be treated, +were you in their place. +Do ask questions. +Do keep conflicts productively focused on technical issues. +Do remember that we are all people, not robots, +and all equally deserving of sensitivity and respect. + +## What will organizers do about inappropriate behavior? + +If we notice you doing or saying something inappropriate, +an organizer will ask you to stop. +We will not demonize you. +But please do stop the inappropriate behavior +so we can get back to writing and discussing code in a safe environment. +If you have philosophical disagreements about what is actually inappropriate, +please take them to a separate public or private conversation +with an Open Mobile Platform maintainer +so we don't turn pull requests into an ethics debate. +If you keep doing unacceptable things, +we will likely ban you, report you to the administration, +or take other appropriate action. + +## What if I see or am subject to what feels like inappropriate behavior? + +Let us know. +Please notify a community organizer as soon as possible. +Full contact information is listed in the Contact Info section of this document. +All communications will be kept strictly confidential, +unless otherwise required by law. +No issue will be considered too inconsequential or unimportant for us +to have a conversation about. + +## Contact Info + +If you need to report an incident, +please contact . + +This work is licensed under a Creative Commons Attribution 3.0 Unported License +For attribution requirements: +«Open Mobile Platform Code of Conduct» +Copyright (c) 2021-2022 Open Mobile Platform LLC, +used under a [Creative Commons Attribution Unported license](http://creativecommons.org/licenses/by/3.0/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5fc75b6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,169 @@ +# Contributor License Agreements + +Thank you for your interest in contributing +to software projects managed by Open Mobile Platform («We» or «Us»). +This contributor agreement («Agreement») +documents the rights granted by contributors to Us. +To make this document effective, +please sign it and send it to Us by email or electronic submission. +This is a legally binding document, +so please read it carefully before agreeing to it. +The Agreement may cover more than one software project managed by Us. + +## 1. Definitions + +**«We» or «Us»** means Open Mobile Platform Limited Liability Company +(Open Mobile Platform LLC), +420500, Republic of Tatarstan, Verkhneuslonsky District, +Innopolis, Universitetskaya Street, h. 7, office 59, +OGRN (Primary State Registration Number) 1161690087020. + +**«You»** means the individual who Submits a Contribution to Us. + +**«Contribution»** means any work of authorship +that is Submitted by You to Us +in which You own or assert ownership of the Copyright. + +**«Copyright»** means all rights protecting works of authorship +owned or controlled by You, +including copyright, moral and neighboring rights, as appropriate, +for the full term of their existence including any extensions by You. + +**«Material»** means the work of authorship +which is made available by Us to third parties. +When this Agreement covers more than one software project, +the Material means the work of authorship +to which the Contribution was Submitted. +After You Submit the Contribution, +it may be included in the Material. + +**«Submit»** means any form of electronic, verbal, or written communication +sent to Us or our representatives, +including but not limited to electronic mailing lists, +source code control systems, and issue tracking systems +that are managed by, or on behalf of, Us +for the purpose of discussing and improving the Material, +but excluding communication that is conspicuously marked +or otherwise designated in writing by You as «Not a Contribution». + +**«Submission Date»** means the date +on which You Submit a Contribution to Us. + +**«Effective Date»** means the date You execute this Agreement +or the date You first Submit a Contribution to Us, +whichever is earlier. + +**«Media»** means any portion of a Contribution which is not software. + +## 2. Grant of Rights + +### 2.1. Copyright License + +(a) You retain ownership of the Copyright in Your Contribution +and have the same rights to use or license the Contribution +which You would have had without entering into the Agreement. + +(b) To the maximum extent permitted by the relevant law, +You grant to Us a perpetual, worldwide, non-exclusive, +transferable, royalty-free, irrevocable license +under the Copyright covering the Contribution, +with the right to sublicense +such rights through multiple tiers of sublicensees, +to reproduce, modify, display, perform and distribute +the Contribution as part of the Material; +provided that this license is conditioned upon compliance with Section 2.3. + +### 2.2. Patent License + +For patent claims including, without limitation, +method, process, and apparatus claims +which You own, control or have the right to grant, now or in the future, +You grant to Us a perpetual, worldwide, non-exclusive, +transferable, royalty-free, irrevocable patent license, +with the right to sublicense these rights to multiple tiers of sublicensees, +to make, have made, use, sell, offer for sale, import +and otherwise transfer the Contribution +and the Contribution in combination with the Material +(and portions of such combination). +This license is granted only to the extent +that the exercise of the licensed rights infringes such patent claims; +and provided that this license is conditioned upon compliance with Section 2.3. + +### 2.3. Outbound License + +Based on the grant of rights in Sections 2.1 and 2.2, +if We include Your Contribution in a Material, +We may license the Contribution under any license, +including copyleft, permissive, commercial, or proprietary licenses. +As a condition on the exercise of this right, +We agree to also license the Contribution +under the terms of the license or licenses +which We are using for the Material on the Submission Date. + +### 2.4. Our Rights + +You acknowledge that We are not obligated +to use Your Contribution as part of the Material +and may decide to include any Contribution We consider appropriate. + +## 3. Agreement + +You confirm that: + +(a) You have the legal authority to enter into this Agreement. + +(b) You own the Copyright and patent claims +covering the Contribution which are required +to grant the rights under Section 2. + +(c) The grant of rights under Section 2 +does not violate any grant of rights +which You have made to third parties, including Your employer. +If You are an employee, +You have had Your employer approve this Agreement +or sign the Entity version of this document. +If You are less than eighteen years old, +please have Your parents or guardian sign the Agreement. + +## 4. Disclaimer + +EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, +THE CONTRIBUTION IS PROVIDED «AS IS». +MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES +INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE +AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US. +TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, +SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW. + +## 5. Miscellaneous + +5.1. This Agreement will be governed by and construed +in accordance with the laws of Russian Federation. + +5.2. This Agreement sets out the entire agreement between You +and Us for Your Contributions to Us +and overrides all other agreements or understandings. + +5.3. If You or We assign the rights or obligations +received through this Agreement to a third party, +as a condition of the assignment, +that third party must agree in writing +to abide by all the rights and obligations in the Agreement. + +5.4. The failure of either party to require performance +by the other party of any provision of this Agreement in one situation +shall not affect the right of a party +to require such performance at any time in the future. +A waiver of performance under a provision in one situation +shall not be considered a waiver of the performance +of the provision in the future or a waiver of the provision in its entirety. + +5.5. If any provision of this Agreement is found void and unenforceable, +such provision will be replaced to the extent possible with a provision +that comes closest to the meaning of the original provision +and which is enforceable. +The terms and conditions set forth in this Agreement +shall apply notwithstanding any failure of essential purpose +of this Agreement or any limited remedy +to the maximum extent possible under law. diff --git a/LICENSE.BSD-3-CLAUSE.md b/LICENSE.BSD-3-CLAUSE.md new file mode 100644 index 0000000..015b265 --- /dev/null +++ b/LICENSE.BSD-3-CLAUSE.md @@ -0,0 +1,26 @@ +# The 3-Clause BSD License + +_Copyright 2021-2022 Open Mobile Platform LLC_ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. 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. +3. Neither the name of the copyright holder 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 OPEN MOBILE PLATFORM LLC 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..42664c4 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Tiny Browser + +The project provides an example of using WebView. + +The main purpose is to show minimal application with WebView. + +The source code of the project is provided under [the license](LICENSE.BSD-3-CLAUSE.md), +that allows it to be used in third-party applications. + +The [contributor agreement](CONTRIBUTING.md) documents the rights granted by contributors +to the Open Mobile Platform. + +[Code of conduct](CODE_OF_CONDUCT.md) is a current set of rules of the Open Mobile +Platform which informs you how we expect the members of the community will interact +while contributing and communicating. + +For information about contributors see [AUTHORS](AUTHORS.md). + +## Project Structure + +The project has a common structure +of an application based on C++ and QML for Aurora OS. + +* **[de.whataco.TED.pro](de.whataco.TED.pro)** file + describes the project structure for the qmake build system. +* **[icons](icons)** directory contains application icons for different screen resolutions. +* **[qml](qml)** directory contains the QML source code and the UI resources. + * **[cover](qml/cover)** directory contains the application cover implementations. + * **[icons](qml/icons)** directory contains the custom UI icons. + * **[pages](qml/pages)** directory contains the application pages. + * **[de.whataco.TED.qml](qml/de.whataco.TED.qml)** file + provides the application window implementation. +* **[rpm](rpm)** directory contains the rpm-package build settings. + **[de.whataco.TED.spec](rpm/de.whataco.TED.spec)** file is used by rpmbuild tool. +* **[src](src)** directory contains the C++ source code. + * **[de.whataco.TED.cpp](src/de.whataco.TED.cpp)** file is the application entry point. +* **[translations](translations)** directory contains the UI translation files. +* **[de.whataco.TED.desktop](de.whataco.TED.desktop)** file + defines the display and parameters for launching the application. + +## Branches +- example_4.02.173: application with SailfishApp::application instance, it is used for OS versions +down to and including the 4.02.173 diff --git a/de.whataco.TED.desktop b/de.whataco.TED.desktop new file mode 100644 index 0000000..20b2625 --- /dev/null +++ b/de.whataco.TED.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +X-Nemo-Application-Type=silica-qt5 +Icon=de.whataco.TED +Exec=/usr/bin/de.whataco.TED +Name=TED.com + +[X-Application] +Permissions=WebView;Audio;Internet +OrganizationName=de.whataco +ApplicationName=TED diff --git a/de.whataco.TED.pro b/de.whataco.TED.pro new file mode 100644 index 0000000..a68041e --- /dev/null +++ b/de.whataco.TED.pro @@ -0,0 +1,65 @@ +############################################################################# +## +## Copyright (C) 2021-2022 Open Mobile Platform LLC. +## Contact: https://community.omprussia.ru/open-source +## +## This file is part of the Tiny Browser project. +## +## 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 copyright holder 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 HOLDER 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. +## +############################################################################# + +TARGET = de.whataco.TED + +CONFIG += \ + c++14 \ + link_pkgconfig \ + auroraapp \ + auroraapp_i18n + +TRANSLATIONS += \ + translations/de.whataco.TED.ts \ + translations/de.whataco.TED-ru.ts + +SOURCES += \ + src/de.whataco.TED.cpp + +DISTFILES += \ + qml/images/de.whataco.TED.svg \ + qml/cover/DefaultCoverPage.qml \ + qml/pages/MainPage.qml \ + qml/de.whataco.TED.qml \ + rpm/de.whataco.TED.spec \ + rpm/de.whataco.TED.yaml \ + translations/*.ts \ + de.whataco.TED.desktop \ + LICENSE.BSD-3-CLAUSE.md \ + CODE_OF_CONDUCT.md \ + CONTRIBUTING.md \ + AUTHORS.md \ + README.md + +AURORAAPP_ICONS = 86x86 108x108 128x128 172x172 diff --git a/examples-manifest.xml b/examples-manifest.xml new file mode 100644 index 0000000..4ea14b8 --- /dev/null +++ b/examples-manifest.xml @@ -0,0 +1,13 @@ + + + + + + + Qt,example + Mer + Mer.Wizard.Feature.Emulator + /qml/de.whataco.TED.qml + + + diff --git a/icons/108x108/de.whataco.TED.png b/icons/108x108/de.whataco.TED.png new file mode 100644 index 0000000..e330f9d Binary files /dev/null and b/icons/108x108/de.whataco.TED.png differ diff --git a/icons/128x128/de.whataco.TED.png b/icons/128x128/de.whataco.TED.png new file mode 100644 index 0000000..60e49dc Binary files /dev/null and b/icons/128x128/de.whataco.TED.png differ diff --git a/icons/172x172/de.whataco.TED.png b/icons/172x172/de.whataco.TED.png new file mode 100644 index 0000000..414610f Binary files /dev/null and b/icons/172x172/de.whataco.TED.png differ diff --git a/icons/86x86/de.whataco.TED.png b/icons/86x86/de.whataco.TED.png new file mode 100644 index 0000000..ae33038 Binary files /dev/null and b/icons/86x86/de.whataco.TED.png differ diff --git a/qml/cover/DefaultCoverPage.qml b/qml/cover/DefaultCoverPage.qml new file mode 100644 index 0000000..2addeb0 --- /dev/null +++ b/qml/cover/DefaultCoverPage.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2021-2022 Open Mobile Platform LLC. +** Contact: https://community.omprussia.ru/open-source +** +** This file is part of the Tiny Browser project. +** +** $QT_BEGIN_LICENSE:BSD$ +** +** 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 copyright holder 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 HOLDER 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. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.6 +import Sailfish.Silica 1.0 + +CoverBackground { + objectName: "coverBackground" + + CoverPlaceholder { + objectName: "coverPlaceholder" + text: appWindow.appName + forceFit: true + icon.source: Qt.resolvedUrl("../images/de.whataco.TED.svg") + } +} diff --git a/qml/de.whataco.TED.qml b/qml/de.whataco.TED.qml new file mode 100644 index 0000000..30b1da9 --- /dev/null +++ b/qml/de.whataco.TED.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2021-2022 Open Mobile Platform LLC. +** Contact: https://community.omprussia.ru/open-source +** +** This file is part of the Tiny Browser project. +** +** $QT_BEGIN_LICENSE:BSD$ +** +** 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 copyright holder 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 HOLDER 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. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.6 +import Sailfish.Silica 1.0 +import "pages" + +ApplicationWindow { + id: appWindow + + readonly property string appName: qsTr("TED.com") + + objectName: "appWindow" + allowedOrientations: defaultAllowedOrientations + cover: Qt.resolvedUrl("cover/DefaultCoverPage.qml") + initialPage: Component { MainPage { } } +} diff --git a/qml/images/de.whataco.TED.svg b/qml/images/de.whataco.TED.svg new file mode 100644 index 0000000..d279a27 --- /dev/null +++ b/qml/images/de.whataco.TED.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml new file mode 100644 index 0000000..ea59810 --- /dev/null +++ b/qml/pages/MainPage.qml @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2021-2022 Open Mobile Platform LLC. +** Contact: https://community.omprussia.ru/open-source +** +** This file is part of the Tiny Browser project. +** +** $QT_BEGIN_LICENSE:BSD$ +** +** 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 copyright holder 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 HOLDER 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. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.6 +import Sailfish.Silica 1.0 +import Sailfish.WebView 1.0 +import Sailfish.WebEngine 1.0 + +Page { + objectName: "mainPage" + + WebView { + id: webView + + httpUserAgent: "Mozilla/5.0 (Android 10; Mobile; rv:78.0) Gecko/78.0 Firefox/78.0 AuroraOS 4" + property string _initUrl: "https://www.ted.com" + + objectName: "webView" + anchors { + top: parent.top + left: parent.left + right: parent.right + bottom: parent.bottom + } + url: _initUrl + + Component.onCompleted: { +// PermissionManager.instance(); + } + + } +} diff --git a/rpm/de.whataco.TED.spec b/rpm/de.whataco.TED.spec new file mode 100644 index 0000000..e735747 --- /dev/null +++ b/rpm/de.whataco.TED.spec @@ -0,0 +1,40 @@ +Name: de.whataco.TED +Summary: TED +Version: 0.1 +Release: 1 +Group: Qt/Qt +License: BSD-3-Clause +URL: https://community.omprussia.ru/open-source +Source0: %{name}-%{version}.tar.bz2 +Requires: sailfishsilica-qt5 >= 0.10.9 +Requires: sailfish-components-webview-qt5 +Requires: sailfish-components-webview-qt5-pickers +Requires: sailfish-components-webview-qt5-popups +BuildRequires: pkgconfig(auroraapp) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Qml) +BuildRequires: pkgconfig(Qt5Quick) +BuildRequires: pkgconfig(Qt5Network) +BuildRequires: desktop-file-utils +BuildRequires: sailfish-components-webview-qt5 + +%description +The project provides an example of using WebView. + +%prep +%autosetup + +%build +%qmake5 +%make_build + +%install +%make_install + +%files +%defattr(-,root,root,-) +%{_bindir}/%{name} +%defattr(644,root,root,-) +%{_datadir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/*/apps/%{name}.png diff --git a/src/de.whataco.TED.cpp b/src/de.whataco.TED.cpp new file mode 100644 index 0000000..b3b78fd --- /dev/null +++ b/src/de.whataco.TED.cpp @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2021-2022 Open Mobile Platform LLC. +** Contact: https://community.omprussia.ru/open-source +** +** This file is part of the Tiny Browser project. +** +** $QT_BEGIN_LICENSE:BSD$ +** +** 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 copyright holder 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 HOLDER 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. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +int main(int argc, char *argv[]) { + auto application = Aurora::Application::application(argc, argv); + application->setOrganizationName("de.whataco"); + application->setApplicationName("TED"); + + auto view = Aurora::Application::createView(); + view->setSource(Aurora::Application::pathToMainQml()); + view->show(); + + return application->exec(); +} diff --git a/translations/de.whataco.TED-ru.ts b/translations/de.whataco.TED-ru.ts new file mode 100644 index 0000000..245de36 --- /dev/null +++ b/translations/de.whataco.TED-ru.ts @@ -0,0 +1,12 @@ + + + + + de.whataco.TED + + + TED.com + + + + diff --git a/translations/de.whataco.TED.ts b/translations/de.whataco.TED.ts new file mode 100644 index 0000000..0268334 --- /dev/null +++ b/translations/de.whataco.TED.ts @@ -0,0 +1,11 @@ + + + + + de.whataco.TED + + TED.com + + + +