diff --git a/app/icons/Youtube.svg b/app/icons/Youtube.svg new file mode 100644 index 000000000..ccd699107 --- /dev/null +++ b/app/icons/Youtube.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/icons/icons.qrc b/app/icons/icons.qrc index 6f76dc07d..c8450836e 100644 --- a/app/icons/icons.qrc +++ b/app/icons/icons.qrc @@ -1,34 +1,59 @@ - Arrow Link Right.svg - Back.svg - Bubble.svg AcceptInvitationImage.svg AcceptInvitationLogoImage.svg - Calendar.svg - Hide.svg - Search.svg - Show.svg - X Mark.svg - Error.svg + Archaeology.svg Arrow Down.svg + Arrow Link Right.svg Arrow Up.svg - QR Code.svg + Back.svg + Briefcase.svg + Bubble.svg + Calendar.svg Checkmark.svg - CloseButton.svg - UploadImage.svg - ReachedDataLimitImage.svg Close.svg - Waiting.svg + CloseButton.svg Delete.svg Done.svg + Download.svg Edit.svg + Electricity.svg + Engineering.svg + Environmental.svg + Error.svg + Facebook.svg + Hide.svg + Info.svg + Linkedin.svg + Mastodon.svg More.svg + MorePhotos.svg + Mouth.svg + Natural Resources.svg + Other.svg + Others.svg ProjectButtonMore.svg + QGIS.svg + QR Code.svg + ReachedDataLimitImage.svg + Reddit.svg + Search.svg + Show.svg + Social media.svg + State and Local.svg Stop.svg - Download.svg - Info.svg + Subscriptions.svg Sync.svg - MorePhotos.svg + Teacher.svg + Telecommunication.svg + Terms.svg + Tractor.svg + Transportation.svg + UploadImage.svg + Waiting.svg + Water resources.svg + X Mark.svg + X Twitter.svg + Youtube.svg diff --git a/app/mmstyle.h b/app/mmstyle.h index 146cb9f95..8d0a74239 100644 --- a/app/mmstyle.h +++ b/app/mmstyle.h @@ -75,38 +75,63 @@ class MMStyle: public QObject Q_PROPERTY( QColor shadowColor READ shadowColor CONSTANT ) // Icons + Q_PROPERTY( QUrl archaeologyIcon READ archaeologyIcon CONSTANT ) + Q_PROPERTY( QUrl arrowDownIcon READ arrowDownIcon CONSTANT ) Q_PROPERTY( QUrl arrowLinkRightIcon READ arrowLinkRightIcon CONSTANT ) - Q_PROPERTY( QUrl searchIcon READ searchIcon CONSTANT ) + Q_PROPERTY( QUrl arrowUpIcon READ arrowUpIcon CONSTANT ) Q_PROPERTY( QUrl backIcon READ backIcon CONSTANT ) + Q_PROPERTY( QUrl briefcaseIcon READ briefcaseIcon CONSTANT ) Q_PROPERTY( QUrl bubbleIcon READ bubbleIcon CONSTANT ) Q_PROPERTY( QUrl calendarIcon READ calendarIcon CONSTANT ) - Q_PROPERTY( QUrl showIcon READ showIcon CONSTANT ) - Q_PROPERTY( QUrl hideIcon READ hideIcon CONSTANT ) - Q_PROPERTY( QUrl xMarkIcon READ xMarkIcon CONSTANT ) - Q_PROPERTY( QUrl errorIcon READ errorIcon CONSTANT ) - Q_PROPERTY( QUrl arrowUpIcon READ arrowUpIcon CONSTANT ) - Q_PROPERTY( QUrl arrowDownIcon READ arrowDownIcon CONSTANT ) - Q_PROPERTY( QUrl qrCodeIcon READ qrCodeIcon CONSTANT ) Q_PROPERTY( QUrl checkmarkIcon READ checkmarkIcon CONSTANT ) Q_PROPERTY( QUrl closeButtonIcon READ closeButtonIcon CONSTANT ) Q_PROPERTY( QUrl closeIcon READ closeIcon CONSTANT ) - Q_PROPERTY( QUrl waitingIcon READ waitingIcon CONSTANT ) Q_PROPERTY( QUrl deleteIcon READ deleteIcon CONSTANT ) Q_PROPERTY( QUrl doneIcon READ doneIcon CONSTANT ) + Q_PROPERTY( QUrl downloadIcon READ downloadIcon CONSTANT ) Q_PROPERTY( QUrl editIcon READ editIcon CONSTANT ) + Q_PROPERTY( QUrl electricityIcon READ electricityIcon CONSTANT ) + Q_PROPERTY( QUrl engineeringIcon READ engineeringIcon CONSTANT ) + Q_PROPERTY( QUrl environmentalIcon READ environmentalIcon CONSTANT ) + Q_PROPERTY( QUrl errorIcon READ errorIcon CONSTANT ) + Q_PROPERTY( QUrl facebookIcon READ facebookIcon CONSTANT ) + Q_PROPERTY( QUrl hideIcon READ hideIcon CONSTANT ) + Q_PROPERTY( QUrl infoIcon READ infoIcon CONSTANT ) + Q_PROPERTY( QUrl linkedinIcon READ linkedinIcon CONSTANT ) + Q_PROPERTY( QUrl mastodonIcon READ mastodonIcon CONSTANT ) Q_PROPERTY( QUrl moreIcon READ moreIcon CONSTANT ) + Q_PROPERTY( QUrl morePhotosIcon READ morePhotosIcon CONSTANT ) + Q_PROPERTY( QUrl mouthIcon READ mouthIcon CONSTANT ) + Q_PROPERTY( QUrl naturalResourcesIcon READ naturalResourcesIcon CONSTANT ) + Q_PROPERTY( QUrl otherIcon READ otherIcon CONSTANT ) + Q_PROPERTY( QUrl othersIcon READ othersIcon CONSTANT ) Q_PROPERTY( QUrl projectButtonMoreIcon READ projectButtonMoreIcon CONSTANT ) + Q_PROPERTY( QUrl qgisIcon READ qgisIcon CONSTANT ) + Q_PROPERTY( QUrl qrCodeIcon READ qrCodeIcon CONSTANT ) + Q_PROPERTY( QUrl redditIcon READ redditIcon CONSTANT ) + Q_PROPERTY( QUrl searchIcon READ searchIcon CONSTANT ) + Q_PROPERTY( QUrl showIcon READ showIcon CONSTANT ) + Q_PROPERTY( QUrl socialMediaIcon READ socialMediaIcon CONSTANT ) + Q_PROPERTY( QUrl stateAndLocalIcon READ stateAndLocalIcon CONSTANT ) Q_PROPERTY( QUrl stopIcon READ stopIcon CONSTANT ) + Q_PROPERTY( QUrl subscriptionsIcon READ subscriptionsIcon CONSTANT ) Q_PROPERTY( QUrl syncIcon READ syncIcon CONSTANT ) - Q_PROPERTY( QUrl infoIcon READ infoIcon CONSTANT ) - Q_PROPERTY( QUrl downloadIcon READ downloadIcon CONSTANT ) - Q_PROPERTY( QUrl morePhotosIcon READ morePhotosIcon CONSTANT ) + Q_PROPERTY( QUrl teacherIcon READ teacherIcon CONSTANT ) + Q_PROPERTY( QUrl telecommunicationIcon READ telecommunicationIcon CONSTANT ) + Q_PROPERTY( QUrl termsIcon READ termsIcon CONSTANT ) + Q_PROPERTY( QUrl tractorIcon READ tractorIcon CONSTANT ) + Q_PROPERTY( QUrl transportationIcon READ transportationIcon CONSTANT ) + Q_PROPERTY( QUrl waitingIcon READ waitingIcon CONSTANT ) + Q_PROPERTY( QUrl waterResourcesIcon READ waterResourcesIcon CONSTANT ) + Q_PROPERTY( QUrl xMarkIcon READ xMarkIcon CONSTANT ) + Q_PROPERTY( QUrl xTwitterIcon READ xTwitterIcon CONSTANT ) + Q_PROPERTY( QUrl youtubeIcon READ youtubeIcon CONSTANT ) // Images - Q_PROPERTY( QUrl uploadImage READ uploadImage CONSTANT ) - Q_PROPERTY( QUrl reachedDataLimitImage READ reachedDataLimitImage CONSTANT ) Q_PROPERTY( QUrl acceptInvitationImage READ acceptInvitationImage CONSTANT ) Q_PROPERTY( QUrl acceptInvitationLogoImage READ acceptInvitationLogoImage CONSTANT ) + Q_PROPERTY( QUrl reachedDataLimitImage READ reachedDataLimitImage CONSTANT ) + Q_PROPERTY( QUrl uploadImage READ uploadImage CONSTANT ) // Map items Q_PROPERTY( double mapItemHeight READ mapItemHeight CONSTANT ) @@ -194,6 +219,31 @@ class MMStyle: public QObject QUrl infoIcon() {return QUrl( "qrc:/Info.svg" );} QUrl downloadIcon() {return QUrl( "qrc:/Download.svg" );} QUrl morePhotosIcon() {return QUrl( "qrc:/MorePhotos.svg" );} + QUrl archaeologyIcon() {return QUrl( "qrc:/Archaeology.svg" );} + QUrl briefcaseIcon() {return QUrl( "qrc:/Briefcase.svg" );} + QUrl electricityIcon() {return QUrl( "qrc:/Electricity.svg" );} + QUrl engineeringIcon() {return QUrl( "qrc:/Engineering.svg" );} + QUrl environmentalIcon() {return QUrl( "qrc:/Environmental.svg" );} + QUrl facebookIcon() {return QUrl( "qrc:/Facebook.svg" );} + QUrl linkedinIcon() {return QUrl( "qrc:/Linkedin.svg" );} + QUrl mastodonIcon() {return QUrl( "qrc:/Mastodon.svg" );} + QUrl mouthIcon() {return QUrl( "qrc:/Mouth.svg" );} + QUrl naturalResourcesIcon() {return QUrl( "qrc:/Natural Resources.svg" );} + QUrl otherIcon() {return QUrl( "qrc:/Other.svg" );} + QUrl othersIcon() {return QUrl( "qrc:/Others.svg" );} + QUrl qgisIcon() {return QUrl( "qrc:/QGIS.svg" );} + QUrl redditIcon() {return QUrl( "qrc:/Reddit.svg" );} + QUrl socialMediaIcon() {return QUrl( "qrc:/Social media.svg" );} + QUrl stateAndLocalIcon() {return QUrl( "qrc:/State and Local.svg" );} + QUrl subscriptionsIcon() {return QUrl( "qrc:/Subscriptions.svg" );} + QUrl teacherIcon() {return QUrl( "qrc:/Teacher.svg" );} + QUrl telecommunicationIcon() {return QUrl( "qrc:/Telecommunication.svg" );} + QUrl termsIcon() {return QUrl( "qrc:/Terms.svg" );} + QUrl tractorIcon() {return QUrl( "qrc:/Tractor.svg" );} + QUrl transportationIcon() {return QUrl( "qrc:/Transportation.svg" );} + QUrl waterResourcesIcon() {return QUrl( "qrc:/Water resources.svg" );} + QUrl xTwitterIcon() {return QUrl( "qrc:/X Twitter.svg" );} + QUrl youtubeIcon() {return QUrl( "qrc:/Toutube.svg" );} QUrl acceptInvitationLogoImage() {return QUrl( "qrc:/AcceptInvitationLogoImage.svg" ); } QUrl acceptInvitationImage() {return QUrl( "qrc:/AcceptInvitationImage.svg" ); } diff --git a/gallery/qml.qrc b/gallery/qml.qrc index 72eb96cb1..932f5ddf0 100644 --- a/gallery/qml.qrc +++ b/gallery/qml.qrc @@ -1,8 +1,10 @@ qml/Main.qml - qml/pages/StylePage.qml - qml/pages/MiscPage.qml + qml/pages/IconsPage.qml + qml/IconBox.qml + qml/pages/StylePage.qml + qml/pages/MiscPage.qml qml/pages/InitialGalleryPage.qml qml/pages/InputsPage.qml qml/pages/ButtonsPage.qml diff --git a/gallery/qml/IconBox.qml b/gallery/qml/IconBox.qml new file mode 100644 index 000000000..e98a5bffa --- /dev/null +++ b/gallery/qml/IconBox.qml @@ -0,0 +1,40 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.Basic + +import "../../app/qml/components" + +Column { + spacing: 5 + id: root + + property var source + property var text + + Label { + text: root.text + } + + Rectangle { + width: 50 + height: 50 + // color: root.color + border.color: "gray" + + MMIcon { + width: parent.width + height: parent.height + source: root.source + } + } + +} diff --git a/gallery/qml/Main.qml b/gallery/qml/Main.qml index 773f114aa..ecabb9d3b 100644 --- a/gallery/qml/Main.qml +++ b/gallery/qml/Main.qml @@ -109,6 +109,10 @@ ApplicationWindow { title: "Style" source: "StylePage.qml" } + ListElement { + title: "Icons" + source: "IconsPage.qml" + } ListElement { title: "Buttons" source: "ButtonsPage.qml" diff --git a/gallery/qml/pages/IconsPage.qml b/gallery/qml/pages/IconsPage.qml new file mode 100644 index 000000000..33aa43aea --- /dev/null +++ b/gallery/qml/pages/IconsPage.qml @@ -0,0 +1,260 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +import QtQuick +import QtQuick.Controls +import QtQuick.Controls.Basic + +import "../../app/qml/components" +import "../" + +Column { + padding: 20 + spacing: 5 + + property int rectSize: 10 + + GroupBox { + title: "Fonts" + background: Rectangle { + color: "white" + border.color: "gray" + } + label: Label { + color: "black" + text: parent.title + padding: 5 + } + + Row { + spacing: 20 + anchors.fill: parent + Label { + text: "t1" + font: __style.t1 + } + Label { + text: "t2" + font: __style.t2 + } + Label { + text: "t3" + font: __style.t3 + } + Label { + text: "t4" + font: __style.t4 + } + Label { + text: "t5" + font: __style.t5 + } + Label { + text: "p1" + font: __style.p1 + } + Label { + text: "p2" + font: __style.p2 + } + Label { + text: "p3" + font: __style.p3 + } + Label { + text: "p4" + font: __style.p4 + } + Label { + text: "p5" + font: __style.p5 + } + Label { + text: "p6" + font: __style.p6 + } + Label { + text: "p7" + font: __style.p7 + } + } + } + + GroupBox { + title: "Colors - primary palette" + background: Rectangle { + color: "white" + border.color: "gray" + } + label: Label { + color: "black" + text: parent.title + padding: 5 + } + + Row { + spacing: 20 + anchors.fill: parent + ColorBox { + text: "grassColor" + color: __style.grassColor + } + ColorBox { + text: "forestColor" + color: __style.forestColor + } + ColorBox { + text: "nightColor" + color: __style.nightColor + } + ColorBox { + text: "whiteColor" + color: __style.whiteColor + } + ColorBox { + text: "transparentColor" + color: __style.transparentColor + } + } + } + + GroupBox { + title: "Colors - additional colors" + background: Rectangle { + color: "white" + border.color: "gray" + } + label: Label { + color: "black" + text: parent.title + padding: 5 + } + + Row { + spacing: 20 + anchors.fill: parent + ColorBox { + text: "sandColor" + color: __style.sandColor + } + ColorBox { + text: "sunsetColor" + color: __style.sunsetColor + } + ColorBox { + text: "sunColor" + color: __style.sunColor + } + ColorBox { + text: "earthColor" + color: __style.earthColor + } + ColorBox { + text: "roseColor" + color: __style.roseColor + } + ColorBox { + text: "skyColor" + color: __style.skyColor + } + ColorBox { + text: "grapeColor" + color: __style.grapeColor + } + ColorBox { + text: "deepOceanColor" + color: __style.deepOceanColor + } + ColorBox { + text: "purpleColor" + color: __style.purpleColor + } + ColorBox { + text: "fieldColor" + color: __style.fieldColor + } + } + } + + GroupBox { + title: "Colors - additional colors" + background: Rectangle { + color: "white" + border.color: "gray" + } + label: Label { + color: "black" + text: parent.title + padding: 5 + } + + Row { + spacing: 20 + anchors.fill: parent + ColorBox { + text: "positiveColor" + color: __style.positiveColor + } + ColorBox { + text: "warningColor" + color: __style.warningColor + } + ColorBox { + text: "negativeColor" + color: __style.negativeColor + } + ColorBox { + text: "informativeColor" + color: __style.informativeColor + } + } + } + + GroupBox { + title: "Colors - others" + background: Rectangle { + color: "white" + border.color: "gray" + } + label: Label { + color: "black" + text: parent.title + padding: 5 + } + + Row { + spacing: 20 + anchors.fill: parent + ColorBox { + text: "nightAlphaColor" + color: __style.nightAlphaColor + } + ColorBox { + text: "errorBgInputColor" + color: __style.errorBgInputColor + } + ColorBox { + text: "shadowColor" + color: __style.shadowColor + } + ColorBox { + text: "lightGreenColor" + color: __style.lightGreenColor + } + ColorBox { + text: "mediumGreenColor" + color: __style.mediumGreenColor + } + ColorBox { + text: "grayColor" + color: __style.grayColor + } + } + } +}