2017-06-08 15:30:38 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/gui/symbology/qgscategorizedsymbolrendererwidget.h *
|
2017-06-08 15:30:38 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
2018-03-06 14:27:49 +10:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
class QgsCategorizedSymbolRendererWidget : QgsRendererWidget
|
2012-09-24 02:28:15 +02:00
|
|
|
{
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-08 15:30:38 +02:00
|
|
|
#include "qgscategorizedsymbolrendererwidget.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsCategorizedSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer );
|
2016-08-06 11:01:42 +02:00
|
|
|
~QgsCategorizedSymbolRendererWidget();
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QgsFeatureRenderer *renderer();
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
int matchToSymbols( QgsStyle *style );
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Replaces category symbols with the symbols from a style that have a matching
|
|
|
|
name.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param style: style containing symbols to match with
|
|
|
|
|
|
|
|
:return: number of symbols matched
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`matchToSymbolsFromLibrary`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`matchToSymbolsFromXml`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
.. versionadded:: 2.9
|
|
|
|
%End
|
2015-05-23 00:34:34 +10:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
public slots:
|
|
|
|
void changeCategorizedSymbol();
|
2017-05-01 18:13:15 +02:00
|
|
|
void categoryColumnChanged( const QString &field );
|
2017-05-03 07:45:22 +02:00
|
|
|
void categoriesDoubleClicked( const QModelIndex &idx );
|
2012-11-11 19:51:38 +01:00
|
|
|
void addCategory();
|
2012-09-24 02:28:15 +02:00
|
|
|
void addCategories();
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2014-09-20 18:30:12 +12:00
|
|
|
void applyColorRamp();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Applies the color ramp passed on by the color ramp button
|
2017-06-08 15:30:38 +02:00
|
|
|
%End
|
|
|
|
|
2012-11-11 19:51:38 +01:00
|
|
|
void deleteCategories();
|
2012-09-24 02:28:15 +02:00
|
|
|
void deleteAllCategories();
|
|
|
|
|
|
|
|
void showSymbolLevels();
|
|
|
|
|
2013-02-02 17:06:22 +01:00
|
|
|
void rowsMoved();
|
|
|
|
|
2015-05-23 00:34:34 +10:00
|
|
|
void matchToSymbolsFromLibrary();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Replaces category symbols with the symbols from the users' symbol library that have a
|
|
|
|
matching name.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`matchToSymbolsFromXml`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`matchToSymbols`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
.. versionadded:: 2.9
|
|
|
|
%End
|
2015-05-23 00:34:34 +10:00
|
|
|
|
|
|
|
void matchToSymbolsFromXml();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Prompts for selection of an xml file, then replaces category symbols with the symbols
|
|
|
|
from the XML file with a matching name.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`matchToSymbolsFromLibrary`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`matchToSymbols`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
.. versionadded:: 2.9
|
|
|
|
%End
|
2015-05-23 00:34:34 +10:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
void updateUiFromRenderer();
|
|
|
|
|
|
|
|
void updateCategorizedSymbolIcon();
|
|
|
|
|
|
|
|
void populateCategories();
|
|
|
|
|
|
|
|
int currentCategoryRow();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2018-02-05 00:39:29 +01:00
|
|
|
Returns row index for the currently selected category (-1 if on no selection)
|
2017-06-08 15:30:38 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2013-02-02 17:06:22 +01:00
|
|
|
QList<int> selectedCategories();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2018-02-05 00:39:29 +01:00
|
|
|
Returns a list of indexes for the categories under selection
|
2017-06-08 15:30:38 +02:00
|
|
|
%End
|
2013-02-02 17:06:22 +01:00
|
|
|
|
|
|
|
void changeSelectedSymbols();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
2018-02-05 00:39:29 +01:00
|
|
|
Changes the selected symbols alone for the change button, if there is a selection
|
2017-06-08 15:30:38 +02:00
|
|
|
%End
|
2013-02-02 17:06:22 +01:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void changeCategorySymbol();
|
2018-02-06 00:24:56 +01:00
|
|
|
void applyChangeToSymbol();
|
|
|
|
%Docstring
|
|
|
|
Applies current symbol to selected categories, or to all categories if none is selected
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
virtual QList<QgsSymbol *> selectedSymbols();
|
|
|
|
|
2014-01-26 18:35:21 +01:00
|
|
|
QgsCategoryList selectedCategoryList();
|
2017-06-08 15:30:38 +02:00
|
|
|
virtual void refreshSymbolView();
|
|
|
|
|
|
|
|
virtual void keyPressEvent( QKeyEvent *event );
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-06-08 15:30:38 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/gui/symbology/qgscategorizedsymbolrendererwidget.h *
|
2017-06-08 15:30:38 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|