QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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.
 
void resetChanges ()
 Resets the changed state for the field.
 
void setIsChanged (bool changed)
 Sets whether the associated field has changed.
 
void setIsMixed (bool mixed)
 Sets whether the associated field contains mixed values.
 

Signals

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

Public Member Functions

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

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.

Definition at line 31 of file qgsmultiedittoolbutton.h.

Member Enumeration Documentation

◆ State

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 38 of file qgsmultiedittoolbutton.h.

Constructor & Destructor Documentation

◆ QgsMultiEditToolButton()

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

Constructor for QgsMultiEditToolButton.

Parameters
parentparent object

Definition at line 22 of file qgsmultiedittoolbutton.cpp.

Member Function Documentation

◆ changesCommitted

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 93 of file qgsmultiedittoolbutton.h.

◆ resetChanges

void QgsMultiEditToolButton::resetChanges ( )
inlineslot

Resets the changed state for the field.

See also
setIsMixed()
setIsChanged()
changesCommitted()

Definition at line 87 of file qgsmultiedittoolbutton.h.

◆ resetFieldValueTriggered

void QgsMultiEditToolButton::resetFieldValueTriggered ( )
signal

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

◆ setField()

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 61 of file qgsmultiedittoolbutton.h.

◆ setFieldValueTriggered

void QgsMultiEditToolButton::setFieldValueTriggered ( )
signal

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

◆ setIsChanged

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 79 of file qgsmultiedittoolbutton.h.

◆ setIsMixed

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 71 of file qgsmultiedittoolbutton.h.

◆ state()

State QgsMultiEditToolButton::state ( ) const
inline

Returns the current displayed state of the button.

Definition at line 54 of file qgsmultiedittoolbutton.h.


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