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

added possibility to add custom actions for the group-nodes in the layer tree #59585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

notguiltyspark
Copy link
Contributor

@notguiltyspark notguiltyspark commented Nov 25, 2024

Description

Currently, you can create a custom action in the context menu of layer-tree only for different types of layers. This PR provides public API to add an action for groups of layers.

Two functions are added to public API of QGisInterface:

  • Add action to context menu for all group-nodes in the layer tree.

virtual void addCustomActionForGroups( QAction *action, const QString &menu ) = 0;

  • Remove action from the context menu for all group-nodes in the layer tree previously added with addCustomActionForGroups().

virtual bool removeCustomActionForGroups( QAction *action ) = 0;

add_action_to_group
remove_action_from_group

Fixes #53692

@github-actions github-actions bot added this to the 3.42.0 milestone Nov 25, 2024
Copy link

github-actions bot commented Nov 25, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit bfba646)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit bfba646)

src/gui/qgisinterface.h Outdated Show resolved Hide resolved
python/PyQt6/gui/auto_generated/qgisinterface.sip.in Outdated Show resolved Hide resolved
python/gui/auto_generated/qgisinterface.sip.in Outdated Show resolved Hide resolved
src/app/qgisappinterface.cpp Outdated Show resolved Hide resolved
src/app/qgisappinterface.h Outdated Show resolved Hide resolved
@jbp35
Copy link
Contributor

jbp35 commented Nov 26, 2024

It would be great to be able to add a custom action in the default menu (right click in blank area of layer tree).

@notguiltyspark notguiltyspark force-pushed the add_custom_group_action branch from cce776c to 9ae57b3 Compare December 9, 2024 18:59
@notguiltyspark
Copy link
Contributor Author

It would be great to be able to add a custom action in the default menu (right click in blank area of layer tree).

I agree, though i think it would be better to create a separate issue.

Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Dec 24, 2024
@notguiltyspark notguiltyspark force-pushed the add_custom_group_action branch from 9ae57b3 to 7d49dd4 Compare December 25, 2024 22:49
@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Dec 25, 2024
@notguiltyspark notguiltyspark force-pushed the add_custom_group_action branch from 7d49dd4 to 1b99119 Compare January 1, 2025 21:18
Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 16, 2025
@Rusty-JonesBMT
Copy link

Would love to see this implemented.

If there was a way to upvote or something, that would be great. I'm hoping that by commenting, it attracts attention.

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 16, 2025
@notguiltyspark notguiltyspark force-pushed the add_custom_group_action branch from 1b99119 to bfba646 Compare January 19, 2025 21:26
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.

Add method "addCustomActionForGroup" for QgisInterface
4 participants