QGIS API Documentation  3.6.0-Noosa (5873452)
Signals | Public Member Functions | List of all members
QgsFieldConditionalFormatWidget Class Reference

A widget for customizing 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 SIP_TRANSFERTHIS=nullptr)
 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 customizing conditional formatting options.

Since
QGIS 2.12

Definition at line 32 of file qgsfieldconditionalformatwidget.h.

Constructor & Destructor Documentation

◆ QgsFieldConditionalFormatWidget()

QgsFieldConditionalFormatWidget::QgsFieldConditionalFormatWidget ( QWidget *parent  SIP_TRANSFERTHIS = nullptr)
explicit

Constructor for QgsFieldConditionalFormatWidget.

Definition at line 25 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 224 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 93 of file qgsfieldconditionalformatwidget.cpp.

◆ loadStyle()

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

Definition at line 102 of file qgsfieldconditionalformatwidget.cpp.

◆ reset()

void QgsFieldConditionalFormatWidget::reset ( )

Resets the formatting options to their default state.

Definition at line 176 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 79 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 201 of file qgsfieldconditionalformatwidget.cpp.

◆ viewRules()

void QgsFieldConditionalFormatWidget::viewRules ( )

Switches the widget to the rules page.

Definition at line 319 of file qgsfieldconditionalformatwidget.cpp.


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