Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QCss::ValueExtractor Struct Reference

#include <qcssparser_p.h>

+ Collaboration diagram for QCss::ValueExtractor:

Public Member Functions

 ValueExtractor (const QList< Declaration > &declarations, const QPalette &=QPalette())
 
bool extractFont (QFont *font, int *fontSizeAdjustment)
 
bool extractBackground (QBrush *, QString *, Repeat *, Qt::Alignment *, QCss::Origin *, QCss::Attachment *, QCss::Origin *)
 
bool extractGeometry (int *w, int *h, int *minw, int *minh, int *maxw, int *maxh)
 
bool extractPosition (int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *, QCss::PositionMode *, Qt::Alignment *)
 
bool extractBox (int *margins, int *paddings, int *spacing=nullptr)
 
bool extractBorder (int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii)
 
bool extractOutline (int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii, int *offsets)
 
bool extractPalette (QBrush *foreground, QBrush *selectedForeground, QBrush *selectedBackground, QBrush *alternateBackground, QBrush *placeHolderTextForeground, QBrush *accent)
 
int extractStyleFeatures ()
 
bool extractImage (QIcon *icon, Qt::Alignment *a, QSize *size)
 
bool extractIcon (QIcon *icon, QSize *size)
 
void lengthValues (const Declaration &decl, int *m)
 

Detailed Description

Definition at line 817 of file qcssparser_p.h.

Constructor & Destructor Documentation

◆ ValueExtractor()

ValueExtractor::ValueExtractor ( const QList< Declaration > & declarations,
const QPalette & pal = QPalette() )

Definition at line 379 of file qcssparser.cpp.

Member Function Documentation

◆ extractBackground()

◆ extractBorder()

◆ extractBox()

bool ValueExtractor::extractBox ( int * margins,
int * paddings,
int * spacing = nullptr )

Definition at line 504 of file qcssparser.cpp.

References QCss::BottomEdge, QCss::Declaration::d, extractFont(), i, QCss::LeftEdge, lengthValues(), QCss::Margin, QCss::MarginBottom, QCss::MarginLeft, QCss::MarginRight, QCss::MarginTop, QCss::Padding, QCss::PaddingBottom, QCss::PaddingLeft, QCss::PaddingRight, QCss::PaddingTop, QCss::QtSpacing, QCss::RightEdge, spacing, and QCss::TopEdge.

+ Here is the call graph for this function:

◆ extractFont()

bool ValueExtractor::extractFont ( QFont * font,
int * fontSizeAdjustment )

Definition at line 1318 of file qcssparser.cpp.

References QCss::Declaration::d, QCss::Font, font, QCss::FontFamily, QCss::FontKerning, QCss::FontSize, QCss::FontStyle, QCss::FontVariant, QCss::FontWeight, i, QCss::LetterSpacing, parseShorthandFontProperty(), setFontFamilyFromValues(), setFontKerningFromValue(), setFontSizeFromValue(), setFontStyleFromValue(), setFontVariantFromValue(), setFontWeightFromValue(), setLetterSpacingFromValue(), setTextDecorationFromValues(), setTextTransformFromValue(), setWordSpacingFromValue(), QCss::TextDecoration, QCss::TextTransform, and QCss::WordSpacing.

Referenced by extractBorder(), extractBox(), extractGeometry(), extractOutline(), and extractPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractGeometry()

bool ValueExtractor::extractGeometry ( int * w,
int * h,
int * minw,
int * minh,
int * maxw,
int * maxh )

Definition at line 459 of file qcssparser.cpp.

References QCss::Declaration::d, extractFont(), QCss::Height, i, QCss::MaximumHeight, QCss::MaximumWidth, QCss::MinimumHeight, QCss::MinimumWidth, and QCss::Width.

+ Here is the call graph for this function:

◆ extractIcon()

bool ValueExtractor::extractIcon ( QIcon * icon,
QSize * size )

Definition at line 1413 of file qcssparser.cpp.

References icon, QCss::Value::Uri, and url.

◆ extractImage()

bool ValueExtractor::extractImage ( QIcon * icon,
Qt::Alignment * a,
QSize * size )

Definition at line 1387 of file qcssparser.cpp.

References QCss::Declaration::alignmentValue(), QCss::Declaration::d, i, icon, QCss::Declaration::iconValue(), QCss::QtImage, QCss::QtImageAlignment, and QCss::Value::Uri.

+ Here is the call graph for this function:

◆ extractOutline()

bool ValueExtractor::extractOutline ( int * borders,
QBrush * colors,
BorderStyle * Styles,
QSize * radii,
int * offsets )

◆ extractPalette()

bool ValueExtractor::extractPalette ( QBrush * foreground,
QBrush * selectedForeground,
QBrush * selectedBackground,
QBrush * alternateBackground,
QBrush * placeHolderTextForeground,
QBrush * accent )

Definition at line 1355 of file qcssparser.cpp.

References QCss::Declaration::brushValue(), QCss::Color, QCss::Declaration::d, i, QCss::QtAccent, QCss::QtAlternateBackground, QCss::QtPlaceHolderTextColor, QCss::QtSelectionBackground, and QCss::QtSelectionForeground.

+ Here is the call graph for this function:

◆ extractPosition()

bool ValueExtractor::extractPosition ( int * l,
int * t,
int * r,
int * b,
QCss::Origin * origin,
Qt::Alignment * position,
QCss::PositionMode * mode,
Qt::Alignment * textAlignment )

Definition at line 480 of file qcssparser.cpp.

References QCss::Declaration::alignmentValue(), QCss::Bottom, QCss::Declaration::d, extractFont(), i, QCss::Left, QCss::Declaration::originValue(), QCss::Position, position(), QCss::Declaration::positionValue(), QCss::QtOrigin, QCss::QtPosition, QCss::Right, QCss::TextAlignment, and QCss::Top.

+ Here is the call graph for this function:

◆ extractStyleFeatures()

int ValueExtractor::extractStyleFeatures ( )

Definition at line 532 of file qcssparser.cpp.

References QCss::Declaration::d, i, QCss::QtStyleFeatures, QCss::StyleFeature_None, and QCss::Declaration::styleFeaturesValue().

+ Here is the call graph for this function:

◆ lengthValues()

void ValueExtractor::lengthValues ( const Declaration & decl,
int * m )

Definition at line 423 of file qcssparser.cpp.

References QCss::Declaration::d, i, lengthValueFromData(), QCss::LengthData::None, Q_ASSERT, qMin(), and zero.

Referenced by extractBorder(), extractBox(), and extractOutline().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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