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

Adding the option for specify the project title on packaged project #615

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

SeqLaz
Copy link
Member

@SeqLaz SeqLaz commented Sep 25, 2024

This adds the option to specify a new project name and title in the exported project when packaging.

Before After
Before Image After Image

self.project_lbl.setText(get_project_title(self.project))
self.original_project_title = project.title()
self.packaged_project_title.setText(self.original_project_title)
self.packaged_project_name.setText(self.project.baseName())
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if the project we are trying to package is not saved yet? Imagine you open a new blank project, set all the layers, config etc and then press "package project" without ever saving it to the disk?

Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

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

Instead of complicating the code in the caller (in this case QFieldSync), we should add this functionality within the OfflineConverter itself. Why? Because the converter already does the copy of the file.

For example here we have hardcoded the name of the output file: https://github.com/opengisch/libqfieldsync/blob/master/libqfieldsync/offline_converter.py#L276

What we can do is to pass the output name to be a parameter when we construct the OfflineConverter class. We can even replace the export_dir param with export_filename param, and then derive the export_dir to be the path to export_filename.

@suricactus
Copy link
Collaborator

Please note that most of the suggestion here need code-wide changes, the suggestions are only pointing to the highlights.

@SeqLaz
Copy link
Member Author

SeqLaz commented Oct 10, 2024

Please note that most of the suggestion here need code-wide changes, the suggestions are only pointing to the highlights.

@suricactus The changes and suggestions were addressed in this PR

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.

2 participants