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

85 lines
2.5 KiB
Plaintext
Raw Normal View History

2016-08-06 11:01:42 +02:00
class QgsCategorizedSymbolRendererWidget : QgsRendererWidget
{
%TypeHeaderCode
#include <qgscategorizedsymbolrendererv2widget.h>
%End
public:
2016-08-06 11:01:42 +02:00
static QgsRendererWidget* create( QgsVectorLayer* layer, QgsStyle* style, QgsFeatureRenderer* renderer ) /Factory/;
2016-08-06 11:01:42 +02:00
QgsCategorizedSymbolRendererWidget( QgsVectorLayer* layer, QgsStyle* style, QgsFeatureRenderer* renderer );
~QgsCategorizedSymbolRendererWidget();
2016-08-06 11:01:42 +02:00
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
*/
2016-08-06 11:01:42 +02:00
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 sizeScaleFieldChanged( const QString& fldName );
2016-08-05 08:09:43 +02:00
void scaleMethodChanged( QgsSymbol::ScaleMethod scaleMethod );
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-06 11:01:42 +02:00
QgsVectorColorRamp* getColorRamp();
2016-08-05 08:09:43 +02:00
QList<QgsSymbol*> selectedSymbols();
2014-01-26 18:35:21 +01:00
QgsCategoryList selectedCategoryList();
void refreshSymbolView();
2014-01-26 18:35:21 +01:00
void keyPressEvent( QKeyEvent* event );
};