Skip to content

Commit

Permalink
relation reference editor (#3060)
Browse files Browse the repository at this point in the history
relation reference editor
  • Loading branch information
PeterPetrik authored Feb 19, 2024
1 parent 31cac95 commit 6359509
Show file tree
Hide file tree
Showing 18 changed files with 189 additions and 155 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
jobs:
android_build:
if: ( github.repository == 'MerginMaps/mobile' ) && (!contains(github.event.head_commit.message, 'Translate '))
runs-on: macos-12
runs-on: macos-13
env:
QT_VERSION: '6.6.0' # use scripts/update_qt_version.bash to change
NDK_VERSION: r25
Expand All @@ -33,11 +33,11 @@ jobs:
INPUT_SDK_VERSION_ARM64: arm64-android-20240215-206
CCACHE_DIR: /Users/runner/work/ccache
GITHUB_TOKEN: ${{ secrets.INPUTAPP_BOT_GITHUB_TOKEN }}
CACHE_VERSION: 2
CACHE_VERSION: 3
QT_ANDROID_KEYSTORE_ALIAS: input
QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }}
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }}
XC_VERSION: ${{ '14.2' }}
XC_VERSION: ${{ '15.2' }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
uses: pat-s/always-upload-cache@v3.0.11
with:
path: ${{ github.workspace }}/Qt
key: ${{ runner.os }}-QtCache-v2-${{ env.QT_VERSION }}-android
key: ${{ runner.os }}-QtCache-v3-${{ env.QT_VERSION }}-android

- name: Install Qt
if: steps.cache-qt.outputs.cache-hit != 'true'
Expand Down
5 changes: 5 additions & 0 deletions app/icons/Link.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 @@ -36,6 +36,7 @@
<file>HomeFilled.svg</file>
<file>Info.svg</file>
<file>Layers.svg</file>
<file>Link.svg</file>
<file>Linkedin.svg</file>
<file>LocalChanges.svg</file>
<file>MapThemes.svg</file>
Expand Down
7 changes: 4 additions & 3 deletions app/inpututils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,9 +1117,10 @@ const QUrl InputUtils::getFormEditorType( const QString &widgetNameIn, const QVa
return QUrl( path.arg( QLatin1String( "MMFormRelationEditor" ) ) );
}
}

// TODO == Missing editors:
// - QStringLiteral( "relationreference" )
else if ( widgetName == QStringLiteral( "relationreference" ) )
{
return QUrl( path.arg( QLatin1String( "MMFormRelationReferenceEditor" ) ) );
}

return QUrl( path.arg( QLatin1String( "MMFormTextEditor" ) ) );
}
Expand Down
2 changes: 2 additions & 0 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class MMStyle: public QObject
Q_PROPERTY( QColor shadowColor READ shadowColor CONSTANT )

// Icons
Q_PROPERTY( QUrl linkIcon READ linkIcon CONSTANT )
Q_PROPERTY( QUrl closeAccountIcon READ closeAccountIcon CONSTANT )
Q_PROPERTY( QUrl signOutIcon READ signOutIcon CONSTANT )
Q_PROPERTY( QUrl workspacesIcon READ workspacesIcon CONSTANT )
Expand Down Expand Up @@ -262,6 +263,7 @@ class MMStyle: public QObject
QColor errorBgInputColor() {return QColor::fromString( "#FEFAF9" );}
QColor shadowColor() {return QColor::fromString( "#66777777" );}

QUrl linkIcon() {return QUrl( "qrc:/Link.svg" );}
QUrl closeAccountIcon() {return QUrl( "qrc:/CloseAccount.svg" );}
QUrl signOutIcon() {return QUrl( "qrc:/SignOut.svg" );}
QUrl workspacesIcon() {return QUrl( "qrc:/Workspaces.svg" );}
Expand Down
2 changes: 1 addition & 1 deletion app/qml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ set(MM_QML
dialogs/NoPermissionsDialog.qml
dialogs/SplittingFailedDialog.qml
dialogs/SyncFailedDialog.qml
editor/inputrelationreference.qml
inputs/MMBaseInput.qml
inputs/MMPasswordInput.qml
inputs/MMTextInput.qml
Expand All @@ -118,6 +117,7 @@ set(MM_QML
form/editors/MMFormPhotoEditor.qml
form/editors/MMFormPhotoViewer.qml
form/editors/MMFormRelationEditor.qml
form/editors/MMFormRelationReferenceEditor.qml
form/editors/MMFormScannerEditor.qml
form/editors/MMFormSliderEditor.qml
form/editors/MMFormSwitchEditor.qml
Expand Down
6 changes: 4 additions & 2 deletions app/qml/components/MMFeaturesListDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ Drawer {
property alias title: header.title
property alias model: listView.model
property bool withSearch: false
property alias buttonText: primaryButton.text
property alias buttonVisible: primaryButton.visible

padding: 20 * __dp

signal featureClicked( var selectedFeatures )
signal createLinkedFeature()
signal buttonClicked()

width: ApplicationWindow.window.width
height: ApplicationWindow.window.height
Expand Down Expand Up @@ -147,7 +149,7 @@ Drawer {
text: qsTr("Add feature")

onClicked: {
root.createLinkedFeature()
root.buttonClicked()
}
}
}
Expand Down
122 changes: 0 additions & 122 deletions app/qml/editor/inputrelationreference.qml

This file was deleted.

2 changes: 1 addition & 1 deletion app/qml/form/editors/MMFormGalleryEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Item {
anchors.centerIn: parent
source: __style.addImageIcon
color: root.errorMsg.length > 0 ? __style.grapeColor : root.warningMsg.length > 0 ? __style.earthColor : __style.forestColor
size: __style.icon40
size: __style.icon32
}

MouseArea {
Expand Down
15 changes: 4 additions & 11 deletions app/qml/form/editors/MMFormPhotoViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,19 @@ MMBaseInput {
onClicked: root.contentClicked()
}

MMCircleIcon {
MMRoundButton {
anchors {
right: parent.right
bottom: parent.bottom
rightMargin: 10 * __dp
bottomMargin: 10 * __dp
}

size: __style.icon40
type: MMCircleIcon.Type.Delete
color: __style.negativeColor
bgndColor: __style.negativeColor
iconSource: __style.deleteIcon
iconColor: __style.grapeColor
visible: true//enabled && ( photo.status === Image.Ready || photo.status === Image.Error )

MouseArea {
anchors.centerIn: parent
width: parent.width + 20 * __dp
height: width
onClicked: root.trashClicked()
}
onClicked: root.trashClicked()
}
}
}
3 changes: 2 additions & 1 deletion app/qml/form/editors/MMFormRelationEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ MMBaseInput {
onFeatureClicked: function(selectedFeatures) {
root.openLinkedFeature( selectedFeatures )
}
onCreateLinkedFeature: root.createLinkedFeature( root._fieldFeatureLayerPair, root._fieldAssociatedRelation )

onButtonClicked: root.createLinkedFeature( root._fieldFeatureLayerPair, root._fieldAssociatedRelation )
}
}

Expand Down
Loading

1 comment on commit 6359509

@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.02.525811 just submitted!

Please sign in to comment.