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

Set group/layer visibility and expansion state in QgsLegendInterface #12732

Closed
qgib opened this issue Apr 22, 2010 · 3 comments
Closed

Set group/layer visibility and expansion state in QgsLegendInterface #12732

qgib opened this issue Apr 22, 2010 · 3 comments
Labels
Feature Request GUI/UX Related to QGIS application GUI or User Experience
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Apr 22, 2010

Author Name: Andres Manz - (Andres Manz -)
Original Redmine Issue: 2672

Redmine category:gui
Assignee: nobody -


Would be nice to set group and/or layer visibility (check state) and expansion state in [[QgsLegendInterface]]. I just need it for my plugin, but I thought maybe somebody else could use it someday.


@qgib
Copy link
Contributor Author

qgib commented Apr 24, 2010

Author Name: Martin Dobias (@wonder-sk)


Hi,

thanks for the patch. I have some suggestions for improvement of the patch in order to commit it:

  • setItemVisible works with both groups and layers, but only on top level. It would be better to split the functionality into two functions, e.g. setGroupVisible and setLayerVisible - where groups would be identified by the index, layers by the pointer to [[QgsMapLayer]] to keep the API consistent
  • the "setter" functions should get also appropriate "getter" function to query the state, e.g. for setGroupExpanded there should be a function isGroupExpanded.

Looking forward to see the improved patch,

Martin

@qgib
Copy link
Contributor Author

qgib commented Apr 24, 2010

Author Name: Andres Manz - (Andres Manz -)


Hi Martin,

Thanks for your suggestions. I hope the new patch is OK.
Added a groupExists function, too.

Andres

@qgib
Copy link
Contributor Author

qgib commented Apr 25, 2010

Author Name: Martin Dobias (@wonder-sk)


Applied in (with fixed layerCheckState function).

Thanks for contributing.


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib qgib added Feature Request GUI/UX Related to QGIS application GUI or User Experience labels May 24, 2019
@qgib qgib added this to the Version 1.5.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

No branches or pull requests

1 participant