QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Types | Public Slots | Signals | Public Member Functions | List of all members
QgsMultiEditToolButton Class Reference

A tool button widget which is displayed next to editor widgets in attribute forms, and allows for controlling how the widget behaves and interacts with the form while in multi edit mode. More...

#include <qgsmultiedittoolbutton.h>

Inheritance diagram for QgsMultiEditToolButton:
Inheritance graph
[legend]

Public Types

enum  State { Default, MixedValues, Changed }
 Button states. More...
 

Public Slots

void changesCommitted ()
 Called when field values have been changed and field now contains all the same values. More...
 
void resetChanges ()
 Resets the changed state for the field. More...
 
void setIsChanged (bool changed)
 Sets whether the associated field has changed. More...
 
void setIsMixed (bool mixed)
 Sets whether the associated field contains mixed values. More...
 

Signals

void resetFieldValueTriggered ()
 Emitted when the "reset to original values" option is selected. More...
 
void setFieldValueTriggered ()
 Emitted when the "set field value for all features" option is selected. More...
 

Public Member Functions

 QgsMultiEditToolButton (QWidget *parent=nullptr)
 Constructor for QgsMultiEditToolButton. More...
 
void setField (const QgsField &field)
 Sets the field associated with this button. More...
 
State state () const
 Returns the current displayed state of the button. More...
 

Detailed Description

A tool button widget which is displayed next to editor widgets in attribute forms, and allows for controlling how the widget behaves and interacts with the form while in multi edit mode.

Since
QGIS 2.16

Definition at line 32 of file qgsmultiedittoolbutton.h.

Member Enumeration Documentation

Button states.

Enumerator
Default 

Default state, all features have same value for widget.

MixedValues 

Mixed state, some features have different values for the widget.

Changed 

Value for widget has changed but changes have not yet been committed.

Definition at line 39 of file qgsmultiedittoolbutton.h.

Constructor & Destructor Documentation

QgsMultiEditToolButton::QgsMultiEditToolButton ( QWidget *  parent = nullptr)
explicit

Constructor for QgsMultiEditToolButton.

Parameters
parentparent object

Definition at line 21 of file qgsmultiedittoolbutton.cpp.

Member Function Documentation

void QgsMultiEditToolButton::changesCommitted ( )
inlineslot

Called when field values have been changed and field now contains all the same values.

See also
resetChanges()

Definition at line 94 of file qgsmultiedittoolbutton.h.

void QgsMultiEditToolButton::resetChanges ( )
inlineslot

Resets the changed state for the field.

See also
setIsMixed()
setIsChanged()
changesCommitted()

Definition at line 88 of file qgsmultiedittoolbutton.h.

void QgsMultiEditToolButton::resetFieldValueTriggered ( )
signal

Emitted when the "reset to original values" option is selected.

void QgsMultiEditToolButton::setField ( const QgsField field)
inline

Sets the field associated with this button.

This is used to customize the widget menu and tooltips to match the field properties.

Parameters
fieldassociated field

Definition at line 62 of file qgsmultiedittoolbutton.h.

void QgsMultiEditToolButton::setFieldValueTriggered ( )
signal

Emitted when the "set field value for all features" option is selected.

void QgsMultiEditToolButton::setIsChanged ( bool  changed)
inlineslot

Sets whether the associated field has changed.

Parameters
changedwhether field has changed
See also
setIsMixed()
resetChanges()

Definition at line 80 of file qgsmultiedittoolbutton.h.

void QgsMultiEditToolButton::setIsMixed ( bool  mixed)
inlineslot

Sets whether the associated field contains mixed values.

Parameters
mixedwhether field values are mixed
See also
setIsChanged()
resetChanges()

Definition at line 72 of file qgsmultiedittoolbutton.h.

State QgsMultiEditToolButton::state ( ) const
inline

Returns the current displayed state of the button.

Definition at line 55 of file qgsmultiedittoolbutton.h.


The documentation for this class was generated from the following files: