From 71727ac381766a64ff9022fc12966ceacc9589a3 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 2 May 2014 07:42:00 +0200 Subject: [PATCH] update sip --- python/gui/qgsfieldcombobox.sip | 3 +++ python/gui/qgsfieldexpressionwidget.sip | 6 ++++++ python/gui/qgsfieldmodel.sip | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/python/gui/qgsfieldcombobox.sip b/python/gui/qgsfieldcombobox.sip index bf60728a12c..a633017423e 100644 --- a/python/gui/qgsfieldcombobox.sip +++ b/python/gui/qgsfieldcombobox.sip @@ -31,6 +31,9 @@ class QgsFieldComboBox : QComboBox public slots: //! set the layer of which the fields are listed + void setLayer( QgsVectorLayer* layer ); + + //! convenience slot to connect QgsMapLayerComboBox layer signal void setLayer( QgsMapLayer* layer ); //! setField sets the currently selected field diff --git a/python/gui/qgsfieldexpressionwidget.sip b/python/gui/qgsfieldexpressionwidget.sip index eb2d0a0b8cc..1039e22e207 100644 --- a/python/gui/qgsfieldexpressionwidget.sip +++ b/python/gui/qgsfieldexpressionwidget.sip @@ -29,9 +29,15 @@ class QgsFieldExpressionWidget : QWidget signals: //! the signal is emitted when the currently selected field changes void fieldChanged( QString fieldName ); + + //! fieldChanged signal with indication of the validity of the expression + void fieldChanged( QString fieldName, bool isValid ); public slots: //! set the layer used to display the fields and expression + void setLayer( QgsVectorLayer* layer ); + + //! convenience slot to connect QgsMapLayerComboBox layer signal void setLayer( QgsMapLayer* layer ); //! sets the current field or expression in the widget diff --git a/python/gui/qgsfieldmodel.sip b/python/gui/qgsfieldmodel.sip index a37f3272ad3..9eee025435d 100644 --- a/python/gui/qgsfieldmodel.sip +++ b/python/gui/qgsfieldmodel.sip @@ -47,7 +47,7 @@ class QgsFieldModel : QAbstractItemModel public slots: //! set the layer of whch fields are displayed - void setLayer( QgsMapLayer *layer ); + void setLayer( QgsVectorLayer *layer ); protected slots: virtual void updateModel(); @@ -56,7 +56,7 @@ class QgsFieldModel : QAbstractItemModel public: QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; QModelIndex parent( const QModelIndex &child ) const; - int rowCount( const QModelIndex &parent ) const; + int rowCount( const QModelIndex &parent = QModelIndex() ) const; int columnCount( const QModelIndex &parent ) const; QVariant data( const QModelIndex &index, int role ) const;