mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Add method to reset vector layer for data defined button
This commit is contained in:
parent
b349eb8a98
commit
eb5cc0c731
@ -94,6 +94,13 @@ class QgsDataDefinedButton : QToolButton
|
||||
*/
|
||||
QgsDataDefined currentDataDefined() const;
|
||||
|
||||
/** Sets the vector layer associated with the button. This controls which fields are
|
||||
* displayed within the widget's pop up menu.
|
||||
* @param layer vector layer
|
||||
* @note added in QGIS 3.0
|
||||
*/
|
||||
void setVectorLayer( QgsVectorLayer* layer );
|
||||
|
||||
/**
|
||||
* Whether the current data definition or expression is to be used
|
||||
*/
|
||||
|
@ -195,7 +195,6 @@ void QgsDataDefinedButton::init( const QgsVectorLayer* vl,
|
||||
mActionDataTypes->setText( tr( "Field type: " ) + mDataTypesString );
|
||||
}
|
||||
|
||||
updateFieldLists();
|
||||
updateGui();
|
||||
}
|
||||
|
||||
@ -218,6 +217,11 @@ QgsDataDefined QgsDataDefinedButton::currentDataDefined() const
|
||||
return dd;
|
||||
}
|
||||
|
||||
void QgsDataDefinedButton::setVectorLayer( QgsVectorLayer* layer )
|
||||
{
|
||||
mVectorLayer = layer;
|
||||
}
|
||||
|
||||
void QgsDataDefinedButton::mouseReleaseEvent( QMouseEvent *event )
|
||||
{
|
||||
// Ctrl-click to toggle activated state
|
||||
|
@ -127,6 +127,13 @@ class GUI_EXPORT QgsDataDefinedButton: public QToolButton
|
||||
*/
|
||||
QgsDataDefined currentDataDefined() const;
|
||||
|
||||
/** Sets the vector layer associated with the button. This controls which fields are
|
||||
* displayed within the widget's pop up menu.
|
||||
* @param layer vector layer
|
||||
* @note added in QGIS 3.0
|
||||
*/
|
||||
void setVectorLayer( QgsVectorLayer* layer );
|
||||
|
||||
/**
|
||||
* Whether the current data definition or expression is to be used
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user