Skip to content

Commit

Permalink
Added docstring describing the page argument of showLayerProperties
Browse files Browse the repository at this point in the history
One can get a list of page names by executing the following command:
grep \"mOptsPage ./build/src/ui/ui_qgs*layerpropertiesbase.h
  • Loading branch information
suricactus committed Apr 7, 2021
1 parent 3057966 commit 294b01a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
35 changes: 34 additions & 1 deletion python/gui/auto_generated/qgisinterface.sip.in
Expand Up @@ -1140,7 +1140,40 @@ Removes the specified ``dock`` widget from main window (without deleting it).

virtual void showLayerProperties( QgsMapLayer *l, const QString &page = QString() ) = 0;
%Docstring
Open layer properties dialog
Opens layer properties dialog for the layer ``l``.
Optionally, a ``page`` to open can be specified (since QGIS 3.20).
The list below contains valid page names:

Vector Layer:
mOptsPage_Information, mOptsPage_Source, mOptsPage_Style, mOptsPage_Labels,
mOptsPage_Masks, mOptsPage_Diagrams, mOptsPage_SourceFields, mOptsPage_AttributesForm,
mOptsPage_Joins, mOptsPage_AuxiliaryStorage, mOptsPage_Actions, mOptsPage_Display,
mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Variables, mOptsPage_Metadata,
mOptsPage_DataDependencies, mOptsPage_Legend, mOptsPage_Server

Raster Layer:
mOptsPage_Information, mOptsPage_Source, mOptsPage_Style, mOptsPage_Transparency,
mOptsPage_Histogram, mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Pyramids,
mOptsPage_Metadata, mOptsPage_Legend, mOptsPage_Server

Mesh Layer:
mOptsPage_Information, mOptsPage_Source, mOptsPage_Style, mOptsPage_StyleContent,
mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Metadata

Point Cloud Layer:
mOptsPage_Information, mOptsPage_Source, mOptsPage_Metadata, mOptsPage_Statistics

Vector Tile Layer:
mOptsPage_Information, mOptsPage_Style, mOptsPage_Labeling, mOptsPage_Metadata

.. note::

Page names are subject to change without notice between QGIS versions,
and that the tab names themselves aren't considered part of the stable API.

.. note::

More strings may be available depending on the context, e.g. via plugins.
%End

virtual QDialog *showAttributeTable( QgsVectorLayer *l, const QString &filterExpression = QString() ) = 0;
Expand Down
33 changes: 32 additions & 1 deletion src/gui/qgisinterface.h
Expand Up @@ -971,7 +971,38 @@ class GUI_EXPORT QgisInterface : public QObject
*/
virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;

//! Open layer properties dialog
/**
* Opens layer properties dialog for the layer \a l.
* Optionally, a \a page to open can be specified (since QGIS 3.20).
* The list below contains valid page names:
*
* Vector Layer:
* mOptsPage_Information, mOptsPage_Source, mOptsPage_Style, mOptsPage_Labels,
* mOptsPage_Masks, mOptsPage_Diagrams, mOptsPage_SourceFields, mOptsPage_AttributesForm,
* mOptsPage_Joins, mOptsPage_AuxiliaryStorage, mOptsPage_Actions, mOptsPage_Display,
* mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Variables, mOptsPage_Metadata,
* mOptsPage_DataDependencies, mOptsPage_Legend, mOptsPage_Server
*
* Raster Layer:
* mOptsPage_Information, mOptsPage_Source, mOptsPage_Style, mOptsPage_Transparency,
* mOptsPage_Histogram, mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Pyramids,
* mOptsPage_Metadata, mOptsPage_Legend, mOptsPage_Server
*
* Mesh Layer:
* mOptsPage_Information, mOptsPage_Source, mOptsPage_Style, mOptsPage_StyleContent,
* mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Metadata
*
* Point Cloud Layer:
* mOptsPage_Information, mOptsPage_Source, mOptsPage_Metadata, mOptsPage_Statistics
*
* Vector Tile Layer:
* mOptsPage_Information, mOptsPage_Style, mOptsPage_Labeling, mOptsPage_Metadata
*
* \note Page names are subject to change without notice between QGIS versions,
* and that the tab names themselves aren't considered part of the stable API.
*
* \note More strings may be available depending on the context, e.g. via plugins.
*/
virtual void showLayerProperties( QgsMapLayer *l, const QString &page = QString() ) = 0;

//! Open attribute table dialog
Expand Down

0 comments on commit 294b01a

Please sign in to comment.