diff --git a/app/icons/Student.svg b/app/icons/Student.svg new file mode 100644 index 000000000..1474d1cfc --- /dev/null +++ b/app/icons/Student.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/app/icons/icons.qrc b/app/icons/icons.qrc index a4f672322..c3f553a97 100644 --- a/app/icons/icons.qrc +++ b/app/icons/icons.qrc @@ -96,5 +96,6 @@ Youtube.svg ZoomToProject.svg StakeOut.svg + Student.svg diff --git a/app/mmstyle.h b/app/mmstyle.h index 0b548ad7f..9288cd98c 100644 --- a/app/mmstyle.h +++ b/app/mmstyle.h @@ -161,6 +161,7 @@ class MMStyle: public QObject Q_PROPERTY( QUrl undoIcon READ undoIcon CONSTANT ) Q_PROPERTY( QUrl waitingIcon READ waitingIcon CONSTANT ) Q_PROPERTY( QUrl waterResourcesIcon READ waterResourcesIcon CONSTANT ) + Q_PROPERTY( QUrl studentIcon READ studentIcon CONSTANT ) Q_PROPERTY( QUrl xTwitterIcon READ xTwitterIcon CONSTANT ) Q_PROPERTY( QUrl youtubeIcon READ youtubeIcon CONSTANT ) Q_PROPERTY( QUrl splitGeometryIcon READ splitGeometryIcon CONSTANT ) @@ -450,6 +451,7 @@ class MMStyle: public QObject QUrl undoIcon() {return QUrl( "qrc:/Undo.svg" );} QUrl waitingIcon() {return QUrl( "qrc:/Waiting.svg" );} QUrl waterResourcesIcon() {return QUrl( "qrc:/WaterResources.svg" );} + QUrl studentIcon() {return QUrl( "qrc:/Student.svg" );} QUrl xTwitterIcon() {return QUrl( "qrc:/XTwitter.svg" );} QUrl youtubeIcon() {return QUrl( "qrc:/Youtube.svg" );} diff --git a/app/qml/account/MMAccountController.qml b/app/qml/account/MMAccountController.qml index bc611853d..96e1ceb3c 100644 --- a/app/qml/account/MMAccountController.qml +++ b/app/qml/account/MMAccountController.qml @@ -46,24 +46,6 @@ Item { stackView.pop(null); } - function shuffleAndAppend( listModel, items ) - { - items = items - .map(function( item ) { - return { value: item, sort: Math.random() }; - }) - .sort(function( a, b ) { - return a.sort - b.sort; - }) - .map(function( obj ) { - return obj.value; - }); - - items.forEach( function( item ) { - listModel.append( item ); - }); - } - Connections { target: __merginApi enabled: controller.inProgress diff --git a/app/qml/account/MMHowYouFoundUsPage.qml b/app/qml/account/MMHowYouFoundUsPage.qml index cc280a8ed..66a84031e 100644 --- a/app/qml/account/MMHowYouFoundUsPage.qml +++ b/app/qml/account/MMHowYouFoundUsPage.qml @@ -228,4 +228,22 @@ MMPage { } } } + + function shuffleAndAppend( listModel, items ) + { + items = items + .map(function( item ) { + return { value: item, sort: Math.random() }; + }) + .sort(function( a, b ) { + return a.sort - b.sort; + }) + .map(function( obj ) { + return obj.value; + }); + + items.forEach( function( item ) { + listModel.append( item ); + }); + } } diff --git a/app/qml/account/MMWhichIndustryPage.qml b/app/qml/account/MMWhichIndustryPage.qml index e8fb981e3..d0f7efc27 100644 --- a/app/qml/account/MMWhichIndustryPage.qml +++ b/app/qml/account/MMWhichIndustryPage.qml @@ -29,19 +29,20 @@ MMPage { Component.onCompleted: { var items = [ - { name: qsTr( "Agriculture" ), key: "agriculture", icon: __style.tractorIcon, colorx: __style.sunColor, color: "#F4CB46" }, - { name: qsTr( "Archaeology" ), key: "archaeology", icon: __style.archaeologyIcon, colorx: __style.sandColor, color: "#FFF4E2" }, - { name: qsTr( "Construction and engineering" ), key: "engineering", icon: __style.engineeringIcon, colorx: __style.roseColor, color: "#FFBABC" }, - { name: qsTr( "Electric utilities" ), key: "electricity", icon: __style.electricityIcon, colorx: __style.nightColor, color: "#12181F" }, - { name: qsTr( "Environmental protection" ), key: "environmental", icon: __style.environmentalIcon, colorx: __style.fieldColor, color: "#9BD1A9" }, - { name: qsTr( "Local governments" ), key: "gov", icon: __style.stateAndLocalIcon, colorx: __style.purpleColor, color: "#CCBDF5" }, - { name: qsTr( "Natural resources" ), key: "natural", icon: __style.naturalResourcesIcon, colorx: __style.earthColor, color: "#4D2A24" }, - { name: qsTr( "Telecom" ), key: "telecom", icon: __style.telecommunicationIcon, colorx: __style.deepOceanColor, color: "#1C324A" }, - { name: qsTr( "Transportation" ), key: "transportation", icon: __style.transportationIcon, colorx: __style.skyColor, color: "#A6CBF4" }, - { name: qsTr( "Water utilities" ), key: "water", icon: __style.waterResourcesIcon, colorx: __style.lightGreenColor, color: "#EFF5F3" } + { name: qsTr( "Agriculture" ), key: "agriculture", icon: __style.tractorIcon, color: __style.sunColor }, + { name: qsTr( "Archaeology" ), key: "archaeology", icon: __style.archaeologyIcon, color: __style.sandColor }, + { name: qsTr( "Construction and engineering" ), key: "engineering", icon: __style.engineeringIcon, color: __style.roseColor }, + { name: qsTr( "Electric utilities" ), key: "electricity", icon: __style.electricityIcon, color: __style.nightColor }, + { name: qsTr( "Environmental protection" ), key: "environmental", icon: __style.environmentalIcon, color: __style.fieldColor }, + { name: qsTr( "Local governments" ), key: "gov", icon: __style.stateAndLocalIcon, color: __style.purpleColor }, + { name: qsTr( "Natural resources" ), key: "natural", icon: __style.naturalResourcesIcon, color: __style.earthColor }, + { name: qsTr( "Telecom" ), key: "telecom", icon: __style.telecommunicationIcon, color: __style.deepOceanColor }, + { name: qsTr( "Transportation" ), key: "transportation", icon: __style.transportationIcon, color: __style.skyColor }, + { name: qsTr( "Water utilities" ), key: "water", icon: __style.waterResourcesIcon, color: __style.lightGreenColor }, + { name: qsTr( "Student/University" ), key: "university", icon: __style.studentIcon, color: __style.grapeColor } ]; - var otherItem = { name: qsTr( "Other" ), key: "other", icon: __style.otherIcon, colorx: __style.sunsetColor, color: "#FFB673" }; + var otherItem = { name: qsTr( "Other" ), key: "other", icon: __style.otherIcon, color: __style.sunsetColor }; shuffleAndAppend( sourceListModel, items ); @@ -217,4 +218,25 @@ MMPage { } } } + + function shuffleAndAppend( listModel, items ) + { + items = items + .map(function( item ) { + return { value: item, sort: Math.random() }; + }) + .sort(function( a, b ) { + return a.sort - b.sort; + }) + .map(function( obj ) { + return obj.value; + }); + + items.forEach( function( item ) { + listModel.append( item ); + }); + } } + + +