QGIS/python/gui/symbology/qgsrulebasedrendererwidget.sip

266 lines
6.9 KiB
Plaintext
Raw Normal View History

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/qgsrulebasedrendererwidget.h *
2017-06-08 15:30:38 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-08-06 11:01:42 +02:00
class QgsRuleBasedRendererModel : QAbstractItemModel
{
2017-06-08 15:30:38 +02:00
%Docstring
Tree model for the rules:
(invalid) == root node
+--- top level rule
+--- top level rule
%End
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
#include "qgsrulebasedrendererwidget.h"
%End
public:
2017-11-20 19:59:15 +10:00
QgsRuleBasedRendererModel( QgsRuleBasedRenderer *renderer, QObject *parent );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsRuleBasedRendererModel, for the specified ``renderer``.
2017-11-20 19:59:15 +10:00
%End
virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
virtual QVariant headerData( int section, Qt::Orientation orientation,
int role = Qt::DisplayRole ) const;
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
virtual int columnCount( const QModelIndex & = QModelIndex() ) const;
virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
virtual QModelIndex parent( const QModelIndex &index ) const;
virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );
2017-06-08 15:30:38 +02:00
virtual Qt::DropActions supportedDropActions() const;
virtual QStringList mimeTypes() const;
virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;
virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
virtual bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
QgsRuleBasedRenderer::Rule *ruleForIndex( const QModelIndex &index ) const;
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
:rtype: QgsRuleBasedRenderer.Rule
2017-06-08 15:30:38 +02:00
%End
void insertRule( const QModelIndex &parent, int before, QgsRuleBasedRenderer::Rule *newrule );
void updateRule( const QModelIndex &parent, int row );
void updateRule( const QModelIndex &index );
void removeRule( const QModelIndex &index );
2017-06-08 15:30:38 +02:00
void willAddRules( const QModelIndex &parent, int count ); // call beginInsertRows
void finishedAddingRules(); // call endInsertRows
2014-01-26 18:35:21 +01:00
void clearFeatureCounts();
2017-06-08 15:30:38 +02:00
protected:
};
2017-06-08 15:30:38 +02:00
2016-08-06 11:01:42 +02:00
class QgsRuleBasedRendererWidget : QgsRendererWidget
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgsrulebasedrendererwidget.h"
%End
public:
static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) /Factory/;
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
:rtype: QgsRendererWidget
2017-06-08 15:30:38 +02:00
%End
QgsRuleBasedRendererWidget( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer );
2016-08-06 11:01:42 +02:00
~QgsRuleBasedRendererWidget();
virtual QgsFeatureRenderer *renderer();
public slots:
void addRule();
void editRule();
void editRule( const QModelIndex &index );
void removeRule();
2014-01-26 18:35:21 +01:00
void countFeatures();
void clearFeatureCounts();
void refineRuleScales();
void refineRuleCategories();
void refineRuleRanges();
void setRenderingOrder();
void currentRuleChanged( const QModelIndex &current = QModelIndex(), const QModelIndex &previous = QModelIndex() );
void selectedRulesChanged();
void saveSectionWidth( int section, int oldSize, int newSize );
void restoreSectionWidths();
protected:
void refineRule( int type );
2016-09-14 09:33:58 +10:00
void refineRuleCategoriesGui();
2017-06-08 15:30:38 +02:00
%Docstring
Opens the dialog for refining a rule using categories
%End
2016-09-14 09:33:58 +10:00
void refineRuleRangesGui();
2017-06-08 15:30:38 +02:00
%Docstring
Opens the dialog for refining a rule using ranges
%End
void refineRuleScalesGui( const QModelIndexList &index );
QgsRuleBasedRenderer::Rule *currentRule();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
:rtype: QgsRuleBasedRenderer.Rule
2017-06-08 15:30:38 +02:00
%End
virtual QList<QgsSymbol *> selectedSymbols();
QgsRuleBasedRenderer::RuleList selectedRules();
%Docstring
2017-12-15 10:36:55 -04:00
:rtype: QgsRuleBasedRenderer.RuleList
2017-06-08 15:30:38 +02:00
%End
virtual void refreshSymbolView();
virtual void keyPressEvent( QKeyEvent *event );
protected slots:
virtual void copy();
virtual void paste();
};
2017-06-08 15:30:38 +02:00
class QgsRendererRulePropsWidget : QgsPanelWidget
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgsrulebasedrendererwidget.h"
%End
public:
2017-06-08 15:30:38 +02:00
QgsRendererRulePropsWidget( QgsRuleBasedRenderer::Rule *rule,
QgsVectorLayer *layer,
QgsStyle *style,
QWidget *parent /TransferThis/ = 0,
const QgsSymbolWidgetContext &context = QgsSymbolWidgetContext() );
%Docstring
2017-12-15 10:36:55 -04:00
Widget to edit the details of a rule based renderer rule.
:param rule: The rule to edit.
:param layer: The layer used to pull layer related information.
:param style: The active QGIS style.
:param parent: The parent widget.
:param context: the symbol widget context
2017-06-08 15:30:38 +02:00
%End
QgsRuleBasedRenderer::Rule *rule();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Return the current set rule.
:return: The current rule.
:rtype: QgsRuleBasedRenderer.Rule
2017-06-08 15:30:38 +02:00
%End
public slots:
2017-06-08 15:30:38 +02:00
void testFilter();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Test the filter that is set in the widget
2017-06-08 15:30:38 +02:00
%End
void buildExpression();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Open the expression builder widget to check if the
2017-06-08 15:30:38 +02:00
%End
2016-06-21 17:00:03 +10:00
void apply();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Apply any changes from the widget to the set rule.
2017-06-08 15:30:38 +02:00
%End
virtual void setDockMode( bool dockMode );
%Docstring
2017-12-15 10:36:55 -04:00
Set the widget in dock mode.
:param dockMode: True for dock mode.
2017-06-08 15:30:38 +02:00
%End
protected:
2017-06-08 15:30:38 +02:00
};
class QgsRendererRulePropsDialog : QDialog
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgsrulebasedrendererwidget.h"
%End
public:
QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Rule *rule, QgsVectorLayer *layer, QgsStyle *style, QWidget *parent /TransferThis/ = 0, const QgsSymbolWidgetContext &context = QgsSymbolWidgetContext() );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsRendererRulePropsDialog
:param rule: associated rule based renderer rule
:param layer: source vector layer
:param style: style collection
:param parent: parent widget
:param context: symbol widget context
2017-06-08 15:30:38 +02:00
%End
~QgsRendererRulePropsDialog();
QgsRuleBasedRenderer::Rule *rule();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
:rtype: QgsRuleBasedRenderer.Rule
2017-06-08 15:30:38 +02:00
%End
public slots:
void testFilter();
void buildExpression();
2017-06-08 15:30:38 +02:00
virtual void accept();
};
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/qgsrulebasedrendererwidget.h *
2017-06-08 15:30:38 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/