QGIS/python/gui/symbology-ng/qgscategorizedsymbolrendererwidget.sip

80 lines
2.4 KiB
Plaintext
Raw Normal View History

2016-08-06 11:01:42 +02:00
class QgsCategorizedSymbolRendererWidget : QgsRendererWidget
{
%TypeHeaderCode
#include <qgscategorizedsymbolrendererwidget.h>
%End
public:
static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/;
QgsCategorizedSymbolRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer );
2016-08-06 11:01:42 +02:00
~QgsCategorizedSymbolRendererWidget();
virtual QgsFeatureRenderer *renderer();
/** Replaces category symbols with the symbols from a style that have a matching
* name.
* @param style style containing symbols to match with
* @return number of symbols matched
* @see matchToSymbolsFromLibrary
* @see matchToSymbolsFromXml
* @note added in QGIS 2.9
*/
int matchToSymbols( QgsStyle *style );
public slots:
void changeCategorizedSymbol();
void categoryColumnChanged( const QString &field );
void categoriesDoubleClicked( const QModelIndex &idx );
void addCategory();
void addCategories();
void applyColorRamp();
void deleteCategories();
void deleteAllCategories();
void showSymbolLevels();
2013-02-02 17:06:22 +01:00
void rowsMoved();
/** Replaces category symbols with the symbols from the users' symbol library that have a
* matching name.
* @see matchToSymbolsFromXml
* @see matchToSymbols
* @note added in QGIS 2.9
*/
void matchToSymbolsFromLibrary();
/** Prompts for selection of an xml file, then replaces category symbols with the symbols
* from the XML file with a matching name.
* @see matchToSymbolsFromLibrary
* @see matchToSymbols
* @note added in QGIS 2.9
*/
void matchToSymbolsFromXml();
protected:
void updateUiFromRenderer();
void updateCategorizedSymbolIcon();
2013-02-02 17:06:22 +01:00
// Called by virtual refreshSymbolView()
void populateCategories();
//! return row index for the currently selected category (-1 if on no selection)
int currentCategoryRow();
2013-02-02 17:06:22 +01:00
//! return a list of indexes for the categories unders selection
QList<int> selectedCategories();
//! change the selected symbols alone for the change button, if there is a selection
void changeSelectedSymbols();
void changeCategorySymbol();
2016-08-05 08:09:43 +02:00
QList<QgsSymbol*> selectedSymbols();
2014-01-26 18:35:21 +01:00
QgsCategoryList selectedCategoryList();
void refreshSymbolView();
void keyPressEvent( QKeyEvent *event );
};