Skip to content

Commit

Permalink
Add student/university as an option in the industries list
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinBuira committed Jul 19, 2024
1 parent 9f3ac1b commit a51298c
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 19 deletions.
5 changes: 5 additions & 0 deletions app/icons/Student.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/icons/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@
<file>Youtube.svg</file>
<file>ZoomToProject.svg</file>
<file>StakeOut.svg</file>
<file>Student.svg</file>
</qresource>
</RCC>
2 changes: 2 additions & 0 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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" );}

Expand Down
18 changes: 0 additions & 18 deletions app/qml/account/MMAccountController.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions app/qml/account/MMHowYouFoundUsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
});
}
}
24 changes: 23 additions & 1 deletion app/qml/account/MMWhichIndustryPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ MMPage {
{ 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( "Water utilities" ), key: "water", icon: __style.waterResourcesIcon, colorx: __style.lightGreenColor, color: "#EFF5F3" },
{ name: qsTr( "Student/University" ), key: "student", icon: __style.studentIcon, colorx: __style.grapeColor, color: "#5A2740" }
];

var otherItem = { name: qsTr( "Other" ), key: "other", icon: __style.otherIcon, colorx: __style.sunsetColor, color: "#FFB673" };
Expand Down Expand Up @@ -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 );
});
}
}



1 comment on commit a51298c

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 24.7.642111 just submitted!

Please sign in to comment.