Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move QgsLayerItem icon related static methods to new QgsIconUtils class
These utilities are used in a LOT of places in QGIS, but the qgslayeritem.h include is a very heavy dependency. It makes sense to have these utilities in a nice lightweight generic class.
- Loading branch information
1 parent
b5aace6
commit 0684462
Showing
38 changed files
with
362 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsiconutils.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsIconUtils | ||
{ | ||
%Docstring(signature="appended") | ||
Contains utility functions for working with icons. | ||
|
||
.. versionadded:: 3.20 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsiconutils.h" | ||
%End | ||
public: | ||
|
||
static QIcon iconForWkbType( QgsWkbTypes::Type type ); | ||
%Docstring | ||
Returns the icon for a vector layer whose geometry ``type`` is provided. | ||
%End | ||
|
||
static QIcon iconPoint(); | ||
%Docstring | ||
Returns an icon representing point geometries. | ||
%End | ||
|
||
static QIcon iconLine(); | ||
%Docstring | ||
Returns an icon representing line geometries. | ||
%End | ||
|
||
static QIcon iconPolygon(); | ||
%Docstring | ||
Returns an icon representing polygon geometries. | ||
%End | ||
|
||
static QIcon iconTable(); | ||
%Docstring | ||
Returns an icon representing non-spatial layers (tables). | ||
%End | ||
|
||
static QIcon iconRaster(); | ||
%Docstring | ||
Returns an icon representing raster layers. | ||
%End | ||
|
||
static QIcon iconDefaultLayer(); | ||
%Docstring | ||
Returns a default icon for layers, which aren't the standard raster/vector/... types. | ||
%End | ||
|
||
static QIcon iconMesh(); | ||
%Docstring | ||
Returns an icon representing mesh layers. | ||
%End | ||
|
||
static QIcon iconVectorTile(); | ||
%Docstring | ||
Returns an icon representing vector tile layers. | ||
%End | ||
|
||
static QIcon iconPointCloud(); | ||
%Docstring | ||
Returns an icon representing point cloud layers. | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsiconutils.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.