QGIS/python/gui/layertree/qgscustomlayerorderwidget.sip
Even Rouault 60a1701377 [FEATURE] Change of ergonomy of the visibility of layers inside groups
See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/86

- Checking/unchecking a group doesn't change the check state of its children.
A node is visible if and only if it is checked and all its parents too.
- There is no more a semi-checked state for a group
- Ctrl-clic on a unchecked group will check the group and all its descendants.
- Ctrl-clic on a unchecked layer will check the lager and all its parents.
- Ctrl-clic on a checked group will uncheck the group and all its descendants.
- Ctrl-clic on a checked layer will uncheck the layer and all its parents.
- Those actions are available in contextual menu items in the tree view.
- Invisible layers because they or their parent(s) is unchecked are greyed out.
2017-01-02 13:25:25 +01:00

28 lines
963 B
Plaintext

/**
* The QgsCustomLayerOrderWidget class provides a list box where the user can define
* custom order for drawing of layers. It also features a checkbox for enabling
* or disabling the custom order. Any changes made by the user are automatically
* propagated to the assigned QgsLayerTreeMapCanvasBridge. Also, any updates
* to the layer tree cause refresh of the list.
*
* @see QgsLayerTreeMapCanvasBridge
* @note added in 2.4
*/
class QgsCustomLayerOrderWidget : QWidget
{
%TypeHeaderCode
#include <qgscustomlayerorderwidget.h>
%End
public:
explicit QgsCustomLayerOrderWidget( QgsLayerTreeMapCanvasBridge* bridge, QWidget *parent /TransferThis/ = 0 );
protected slots:
void bridgeHasCustomLayerOrderChanged( bool state );
void bridgeCustomLayerOrderChanged( const QStringList& order );
//! Slot triggered when the ivsibility of a node changes
void nodeVisibilityChanged( QgsLayerTreeNode* node );
void modelUpdated();
};