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

Add an option to create menu in the QGIS browser #107

Closed
jmkerloch opened this issue Nov 7, 2024 · 7 comments
Closed

Add an option to create menu in the QGIS browser #107

jmkerloch opened this issue Nov 7, 2024 · 7 comments
Milestone

Comments

@jmkerloch
Copy link
Collaborator

jmkerloch commented Nov 7, 2024

Feature description

In addition to the possibility of adding a menu in the QGIS menu bar and in the "Add a layer menu", we propose to add a new location in the project's settings.

image

It is proposed to build the tree structure in the Browser (corresponding to the "menus" in the plugin) under a single LMFP entry:

image

But I suggest having one entry for each project and subfolders with groups and layer.

This should look like this:

image

A PR is on the way.

Additional context

This feature is similar to what the IDG plugin does: https://github.com/geo2france/idg-qgis-plugin/.

This feature request is formulated from Agences de l'Eau and ported by Oslandia.

@jmkerloch
Copy link
Collaborator Author

For better readability of PR I suggest we do this in several steps:

  • always add project in QGIS browser (no option for project)
  • refactor code for multiple layer add to be able to support Add all option in browser
  • add option in project to define if it should be enable in browser

@jmkerloch
Copy link
Collaborator Author

We also need to discuss how we will implement merge option for QGIS browser.

@jmkerloch
Copy link
Collaborator Author

For Add all option we can't use an item in explorer because it won't be last since item are always sorted alphabetically.

I suggest we use a menu with an action.

@xcaeag
Copy link
Collaborator

xcaeag commented Nov 7, 2024

Yes, I was wondering what you were going to propose.
A context menu for layer groups?
It's a shame to lose the order defined in the project.

And you won't need to add the ‘separator’ elements starting with ‘-’ either.

@Guts Guts changed the title Add project in QGIS browser Add an option to create menu in the QGIS browser Nov 29, 2024
@Guts Guts added this to the 2.3.0 milestone Dec 17, 2024
@Guts
Copy link
Collaborator

Guts commented Dec 17, 2024

As part of this development, we also aim to allow project's icon that will be used in the QGIS browser tree, similar to what the IDG plugin does.

image

There are two options:

  • Using a project variable lmfp_icon:

    image

  • The approach used by the IDG plugin, with a link named icon of type HTTPS in the project metadata/links:

    image

The first one seems "better" to me since it does not interfere with project's metadata, while the second allows using a project designed for the IDG plugin.

I propose supporting both methods.

@Guts
Copy link
Collaborator

Guts commented Dec 17, 2024

We should also support project's metadata/hyperlinks as IDG plugin does to ensure a similar behavior:

image

@Guts
Copy link
Collaborator

Guts commented Dec 20, 2024

Implemented in #129

@Guts Guts closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants