Skip to content

Commit

Permalink
sipify
Browse files Browse the repository at this point in the history
  • Loading branch information
benwirf committed Feb 23, 2025
1 parent cc1e3d4 commit dc70921
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ Applies the color ramp passed on by the color ramp button

void deleteCategories();
void deleteAllCategories();

void deleteUnusedCategories();
%Docstring
Deletes unused categories from the widget which are not used by the layer renderer.
%End

void showSymbolLevels();

Expand Down Expand Up @@ -126,7 +130,7 @@ Changes the selected symbols alone for the change button, if there is a selectio
Applies current symbol to selected categories, or to all categories if none is selected
%End

QList<QVariant> layerUniqueValues( const QString attrName );
QList<QVariant> layerUniqueValues( const QString &attrName );
%Docstring
Returns the list of unique values in the current widget's layer for attribute name ``attrName``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ Applies the color ramp passed on by the color ramp button

void deleteCategories();
void deleteAllCategories();

void deleteUnusedCategories();
%Docstring
Deletes unused categories from the widget which are not used by the layer renderer.
%End

void showSymbolLevels();

Expand Down Expand Up @@ -126,7 +130,7 @@ Changes the selected symbols alone for the change button, if there is a selectio
Applies current symbol to selected categories, or to all categories if none is selected
%End

QList<QVariant> layerUniqueValues( const QString attrName );
QList<QVariant> layerUniqueValues( const QString &attrName );
%Docstring
Returns the list of unique values in the current widget's layer for attribute name ``attrName``.

Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ void QgsCategorizedSymbolRendererWidget::deleteUnusedCategories()
emit widgetChanged();
}

QList<QVariant> QgsCategorizedSymbolRendererWidget::layerUniqueValues( const QString attrName )
QList<QVariant> QgsCategorizedSymbolRendererWidget::layerUniqueValues( const QString &attrName )
{
const int idx = mLayer->fields().lookupField( attrName );
QList<QVariant> uniqueValues;
Expand Down
6 changes: 5 additions & 1 deletion src/gui/symbology/qgscategorizedsymbolrendererwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ class GUI_EXPORT QgsCategorizedSymbolRendererWidget : public QgsRendererWidget,

void deleteCategories();
void deleteAllCategories();

/**
* Deletes unused categories from the widget which are not used by the layer renderer.
*/
void deleteUnusedCategories();

void showSymbolLevels();
Expand Down Expand Up @@ -241,7 +245,7 @@ class GUI_EXPORT QgsCategorizedSymbolRendererWidget : public QgsRendererWidget,
*
* Called by addCategories() and deleteUnusedCategories()
*/
QList<QVariant> layerUniqueValues( const QString attrName );
QList<QVariant> layerUniqueValues( const QString &attrName );

QList<QgsSymbol *> selectedSymbols() override;
QgsCategoryList selectedCategoryList();
Expand Down

0 comments on commit dc70921

Please sign in to comment.