QGIS API Documentation  2.99.0-Master (19b062c)
Signals | Public Member Functions | List of all members
QgsFieldConditionalFormatWidget Class Reference

A widget for customising conditional formatting options. More...

#include <qgsfieldconditionalformatwidget.h>

Inheritance diagram for QgsFieldConditionalFormatWidget:
Inheritance graph
[legend]

Signals

void rulesUpdated (const QString &fieldName)
 Emitted when the conditional styling rules are updated. More...
 

Public Member Functions

 QgsFieldConditionalFormatWidget (QWidget *parent=0)
 Constructor for QgsFieldConditionalFormatWidget. More...
 
QList< QgsConditionalStyledefaultPresets () const
 The default presets for the widget. More...
 
void editStyle (int index, const QgsConditionalStyle &style)
 Switches the widget to the edit style mode for the specified style. More...
 
void loadStyle (const QgsConditionalStyle &style)
 
void reset ()
 Resets the formatting options to their default state. More...
 
void setLayer (QgsVectorLayer *layer)
 Sets the vector layer associated with the widget. More...
 
void setPresets (const QList< QgsConditionalStyle > &styles)
 Set the presets that can be used for quick pick. More...
 
void viewRules ()
 Switches the widget to the rules page. More...
 

Detailed Description

A widget for customising conditional formatting options.

Since
QGIS 2.12

Definition at line 36 of file qgsfieldconditionalformatwidget.h.

Constructor & Destructor Documentation

◆ QgsFieldConditionalFormatWidget()

QgsFieldConditionalFormatWidget::QgsFieldConditionalFormatWidget ( QWidget *  parent = 0)
explicit

Constructor for QgsFieldConditionalFormatWidget.

Parameters
parentparent widget

Definition at line 24 of file qgsfieldconditionalformatwidget.cpp.

Member Function Documentation

◆ defaultPresets()

QList< QgsConditionalStyle > QgsFieldConditionalFormatWidget::defaultPresets ( ) const

The default presets for the widget.

Normally set when the widget is created however called setPresets will override the default styles.

Returns
List of default presets.

Definition at line 223 of file qgsfieldconditionalformatwidget.cpp.

◆ editStyle()

void QgsFieldConditionalFormatWidget::editStyle ( int  index,
const QgsConditionalStyle style 
)

Switches the widget to the edit style mode for the specified style.

Parameters
indexindex of conditional style to edit
styleinitial conditional styling options

Definition at line 92 of file qgsfieldconditionalformatwidget.cpp.

◆ loadStyle()

void QgsFieldConditionalFormatWidget::loadStyle ( const QgsConditionalStyle style)
Parameters
styleinitial conditional styling options

Definition at line 101 of file qgsfieldconditionalformatwidget.cpp.

◆ reset()

void QgsFieldConditionalFormatWidget::reset ( )

Resets the formatting options to their default state.

Definition at line 175 of file qgsfieldconditionalformatwidget.cpp.

◆ rulesUpdated

void QgsFieldConditionalFormatWidget::rulesUpdated ( const QString &  fieldName)
signal

Emitted when the conditional styling rules are updated.

Parameters
fieldNamename of field whose rules have been modified.

◆ setLayer()

void QgsFieldConditionalFormatWidget::setLayer ( QgsVectorLayer layer)

Sets the vector layer associated with the widget.

Parameters
layervector layer

Definition at line 78 of file qgsfieldconditionalformatwidget.cpp.

◆ setPresets()

void QgsFieldConditionalFormatWidget::setPresets ( const QList< QgsConditionalStyle > &  styles)

Set the presets that can be used for quick pick.

Parameters
stylesA list of styles used as presets

Definition at line 200 of file qgsfieldconditionalformatwidget.cpp.

◆ viewRules()

void QgsFieldConditionalFormatWidget::viewRules ( )

Switches the widget to the rules page.

Definition at line 318 of file qgsfieldconditionalformatwidget.cpp.


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