39   mFieldStyles.insert( fieldName, styles );
    44   if ( mFieldStyles.contains( fieldName ) )
    46     return mFieldStyles[fieldName];
    64   for ( ; it != mFieldStyles.constEnd(); ++it )
    89   for ( 
int i = 0;i < nodelist.
count(); i++ )
    94     mRowStyles.
append( style );
   100   for ( 
int i = 0;i < nodelist.
count(); i++ )
   107     for ( 
int i = 0;i < stylenodelist.
count(); i++ )
   114     mFieldStyles.insert( fieldName, styles );
   123     , mBackColor( 
QColor( 0, 0, 0, 0 ) )
   124     , mTextColor( 
QColor( 0, 0, 0, 0 ) )
   130     , mBackColor( 
QColor( 0, 0, 0, 0 ) )
   131     , mTextColor( 
QColor( 0, 0, 0, 0 ) )
   137     : mValid( other.mValid )
   138     , mName( other.mName )
   139     , mRule( other.mRule )
   140     , mFont( other.mFont )
   141     , mBackColor( other.mBackColor )
   142     , mTextColor( other.mTextColor )
   143     , mIcon( other.mIcon )
   145   if ( other.mSymbol.
data() )
   146     mSymbol.
reset( other.mSymbol->clone() );
   151   mValid = other.mValid;
   154   mBackColor = other.mBackColor;
   155   mTextColor = other.mTextColor;
   158   if ( other.mSymbol.
data() )
   160     mSymbol.
reset( other.mSymbol->clone() );
   175   if ( 
name().isEmpty() )
   205   pixmap.
fill( Qt::transparent );
   213   painter.
setPen( Qt::NoPen );
   218     painter.
setPen( mTextColor );
   220     painter.
setPen( Qt::black );
   225   rect = 
QRect( 32, 0, 32, 32 );
   226   painter.
drawText( rect, Qt::AlignCenter, 
"abc\n123" );
   246     if ( style.
matches( value, context ) )
   247       matchingstyles.
append( style );
   249   return matchingstyles;
   256     if ( style.
matches( value, context ) )
   304   if ( styleElm.
hasAttribute( 
"background_color_alpha" ) )
   317   if ( !symbolElm.
isNull() )
   319     QgsSymbolV2* 
symbol = QgsSymbolLayerV2Utils::loadSymbol<QgsMarkerSymbolV2>( symbolElm );
 Class for parsing and evaluation of expressions (formerly called "search strings"). 
 
QString name() const
The name of the style. 
 
QDomNodeList elementsByTagName(const QString &tagname) const
 
void setName(const QString &value)
Set the name of the style. 
 
Single variable definition for use within a QgsExpressionContextScope. 
 
bool writeXml(QDomNode &node, QDomDocument &doc) const
Write field ui properties specific state from Dom node. 
 
Q_DECL_DEPRECATED QVariant evaluate(const QgsFeature *f)
Evaluate the feature and return the result. 
 
void setRenderHint(RenderHint hint, bool on)
 
QDomNode appendChild(const QDomNode &newChild)
 
void fill(const QColor &color)
 
QString attribute(const QString &name, const QString &defValue) const
 
void setRule(const QString &value)
Set the rule for the style. 
 
virtual QgsSymbolV2 * clone() const =0
 
bool matches(const QVariant &value, QgsExpressionContext &context) const
Check if the rule matches using the given value and feature. 
 
QList< QgsConditionalStyle > fieldStyles(const QString &fieldName)
Returns the conditional styles set for the field UI properties. 
 
static QDomElement saveSymbol(const QString &symbolName, QgsSymbolV2 *symbol, QDomDocument &doc)
 
bool validBackgroundColor() const
Check if the background color is valid for render. 
 
QPixmap icon() const
The icon set for style generated from the set symbol. 
 
QgsConditionalLayerStyles()
 
void addVariable(const QgsExpressionContextScope::StaticVariable &variable)
Adds a variable into the context scope. 
 
QgsConditionalStyle & operator=(const QgsConditionalStyle &other)
 
QDomElement toElement() const
 
void drawRect(const QRectF &rectangle)
 
QList< QgsConditionalStyle > rowStyles()
 
void setFont(const QFont &font)
 
QgsExpressionContextScope * lastScope()
Returns the last scope added to the context. 
 
void append(const T &value)
 
Conditional styling for a rule. 
 
bool hasAttribute(const QString &name) const
 
void setPen(const QColor &color)
 
void setAttribute(const QString &name, const QString &value)
 
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
 
int toInt(bool *ok, int base) const
 
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
 
bool isValid() const
isValid Check if this rule is valid. 
 
static QList< QgsConditionalStyle > matchingConditionalStyles(const QList< QgsConditionalStyle > &styles, const QVariant &value, QgsExpressionContext &context)
Find and return the matching styles for the value and feature. 
 
bool writeXml(QDomNode &node, QDomDocument &doc) const
Write vector conditional style specific state from layer Dom node. 
 
void setBrush(const QBrush &brush)
 
QColor backgroundColor() const
The background color for style. 
 
void drawText(const QPointF &position, const QString &text)
 
static bool setFromXmlChildNode(QFont &font, const QDomElement &element, const QString &childNode)
Sets the properties of a font to match the properties stored in an XML child node. 
 
static QgsConditionalStyle compressStyles(const QList< QgsConditionalStyle > &styles)
Compress a list of styles into a single style. 
 
void setBackgroundColor(const QColor &value)
Set the background color for the style. 
 
void setFont(const QFont &value)
Set the font for the the style. 
 
void setRowStyles(const QList< QgsConditionalStyle > &styles)
Set the conditional styles that apply to full rows of data in the attribute table. 
 
QColor textColor() const
The text color set for style. 
 
QPixmap renderPreview() const
Render a preview icon of the rule. 
 
void setSymbol(QgsSymbolV2 *value)
Set the icon for the style. 
 
static QgsConditionalStyle matchingConditionalStyle(const QList< QgsConditionalStyle > &styles, const QVariant &value, QgsExpressionContext &context)
Find and return the matching style for the value and feature. 
 
static QPixmap symbolPreviewPixmap(QgsSymbolV2 *symbol, QSize size, QgsRenderContext *customContext=nullptr)
 
bool readXml(const QDomNode &node)
Reads vector conditional style specific state from layer Dom node. 
 
bool readXml(const QDomNode &node)
Reads field ui properties specific state from Dom node. 
 
QDomElement firstChildElement(const QString &tagName) const
 
bool validTextColor() const
Check if the text color is valid for render. 
 
QString displayText() const
The name of the style. 
 
static QDomElement toXmlElement(const QFont &font, QDomDocument &document, const QString &elementName)
Returns a DOM element containing the properties of the font. 
 
QgsSymbolV2 * symbol() const
The symbol used to generate the icon for the style. 
 
QFont font() const
The font for the style. 
 
QDomElement createElement(const QString &tagName)
 
void setFieldStyles(const QString &fieldName, const QList< QgsConditionalStyle > &styles)
Set the conditional styles for the field UI properties. 
 
QString rule() const
The condition rule set for the style. 
 
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
 
QDomNode at(int index) const
 
void setTextColor(const QColor &value)
Set the text color for the style.