Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editable project variables. #5589

Merged
merged 6 commits into from
Aug 27, 2024
Merged

Editable project variables. #5589

merged 6 commits into from
Aug 27, 2024

Conversation

mohsenD98
Copy link
Collaborator

@mohsenD98 mohsenD98 commented Aug 25, 2024

Description

This PR represents the second step in revamping the variables page within the settings. As you know in This PR, we introduced project variables to the existing list, which previously only displayed application-wide (global) variables.

In this step, we've made it possible to edit project variables (but unremovable). The changes will remain effective throughout the session, but once the project is closed and reopened, the values will revert to their original settings.

Stay tuned:

for step three, where we will focus on enhancing the visual design! :)

Demo:

You can see editable but unremovable project variables here:

image

@mohsenD98 mohsenD98 requested a review from nirvn August 25, 2024 11:28
@mohsenD98 mohsenD98 self-assigned this Aug 25, 2024
@mohsenD98 mohsenD98 marked this pull request as draft August 25, 2024 11:29
@mohsenD98 mohsenD98 changed the title Editable project variables. WIP: Editable project variables. Aug 25, 2024
@qfield-fairy
Copy link
Collaborator

qfield-fairy commented Aug 25, 2024

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/core/expressionvariablemodel.cpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/core/expressionvariablemodel.cpp Show resolved Hide resolved
resets after close and reopening project.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/core/expressionvariablemodel.cpp Show resolved Hide resolved
Copy link
Member

@nirvn nirvn left a comment

Choose a reason for hiding this comment

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

Nearly there. We can work on the saving/restoring of customized project variables in a different PR.

BTW, could we rename ApplicationScope to GlobalScope to match QGIS' terminology? That'll make it easier to read the code.

src/qml/VariableEditor.qml Outdated Show resolved Hide resolved
src/core/expressionvariablemodel.cpp Show resolved Hide resolved
@mohsenD98 mohsenD98 marked this pull request as ready for review August 26, 2024 17:54
@mohsenD98 mohsenD98 changed the title WIP: Editable project variables. Editable project variables. Aug 26, 2024
@nirvn nirvn merged commit 605b4f3 into master Aug 27, 2024
22 of 23 checks passed
@nirvn nirvn deleted the project-variables-stage2-ui branch August 27, 2024 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants