Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
QssParser Class Reference

#include </tmp/quassel/src/uisupport/qssparser.h>

Protected Types

typedef QList< qreal > ColorTuple

Protected Member Functions

void parseChatLineBlock (const QString &decl, const QString &contents)
void parsePaletteBlock (const QString &decl, const QString &contents)
void parseListItemBlock (const QString &decl, const QString &contents)
quint64 parseFormatType (const QString &decl)
quint32 parseItemFormatType (const QString &decl)
QTextCharFormat parseFormat (const QString &qss)
QBrush parseBrush (const QString &str, bool *ok=0)
QColor parseColor (const QString &str)
ColorTuple parseColorTuple (const QString &str)
QGradientStops parseGradientStops (const QString &str)
void parseFont (const QString &str, QTextCharFormat *format)
void parseFontStyle (const QString &str, QTextCharFormat *format)
void parseFontWeight (const QString &str, QTextCharFormat *format)
void parseFontSize (const QString &str, QTextCharFormat *format)
void parseFontFamily (const QString &str, QTextCharFormat *format)

Protected Attributes

QHash< QString,
QPalette::ColorRole > 
_paletteColorRoles
QHash< QString,
UiStyle::ColorRole
_uiStyleColorRoles

Private Member Functions

Q_DECLARE_TR_FUNCTIONS(QssParser)
public void 
processStyleSheet (QString &sheet)
QPalette palette () const
QVector< QBrush > uiStylePalette () const
const QHash< quint64,
QTextCharFormat > & 
formats () const
const QHash< quint32,
QTextCharFormat > & 
listItemFormats () const

Private Attributes

QPalette _palette
QVector< QBrush > _uiStylePalette
QHash< quint64, QTextCharFormat > _formats
QHash< quint32, QTextCharFormat > _listItemFormats

Detailed Description

Definition at line 26 of file qssparser.h.

Member Typedef Documentation

typedef QList<qreal> ColorTuple
protected

Definition at line 41 of file qssparser.h.

Member Function Documentation

void processStyleSheet ( QString &  sheet)
private

Definition at line 58 of file qssparser.cpp.

References parseChatLineBlock(), parseListItemBlock(), and parsePaletteBlock().

Referenced by UiStyle::loadStyleSheet().

QPalette palette ( ) const
inlineprivate

Definition at line 35 of file qssparser.h.

References _palette.

Referenced by UiStyle::loadStyleSheet().

QVector<QBrush> uiStylePalette ( ) const
inlineprivate

Definition at line 36 of file qssparser.h.

References _uiStylePalette.

Referenced by UiStyle::loadStyleSheet().

const QHash<quint64, QTextCharFormat>& formats ( ) const
inlineprivate

Definition at line 37 of file qssparser.h.

References _formats.

Referenced by UiStyle::loadStyleSheet().

const QHash<quint32, QTextCharFormat>& listItemFormats ( ) const
inlineprivate

Definition at line 38 of file qssparser.h.

References _listItemFormats.

Referenced by UiStyle::loadStyleSheet().

void parseChatLineBlock ( const QString &  decl,
const QString &  contents 
)
protected

Definition at line 98 of file qssparser.cpp.

References _formats, UiStyle::Invalid, parseFormat(), and parseFormatType().

Referenced by processStyleSheet().

void parsePaletteBlock ( const QString &  decl,
const QString &  contents 
)
protected

Definition at line 121 of file qssparser.cpp.

References _palette, _paletteColorRoles, _uiStyleColorRoles, _uiStylePalette, and parseBrush().

Referenced by processStyleSheet().

void parseListItemBlock ( const QString &  decl,
const QString &  contents 
)
protected

Definition at line 108 of file qssparser.cpp.

References _listItemFormats, UiStyle::Invalid, parseFormat(), and parseItemFormatType().

Referenced by processStyleSheet().

QTextCharFormat parseFormat ( const QString &  qss)
protected
QBrush parseBrush ( const QString &  str,
bool *  ok = 0 
)
protected
QColor parseColor ( const QString &  str)
protected

Definition at line 552 of file qssparser.cpp.

References parseColorTuple().

Referenced by parseBrush(), and parseGradientStops().

QssParser::ColorTuple parseColorTuple ( const QString &  str)
protected

Definition at line 590 of file qssparser.cpp.

Referenced by parseColor().

QGradientStops parseGradientStops ( const QString &  str)
protected

Definition at line 618 of file qssparser.cpp.

References parseColor().

Referenced by parseBrush().

void parseFont ( const QString &  str,
QTextCharFormat *  format 
)
protected

Definition at line 642 of file qssparser.cpp.

Referenced by parseFormat().

void parseFontStyle ( const QString &  str,
QTextCharFormat *  format 
)
protected

Definition at line 676 of file qssparser.cpp.

Referenced by parseFormat().

void parseFontWeight ( const QString &  str,
QTextCharFormat *  format 
)
protected

Definition at line 692 of file qssparser.cpp.

Referenced by parseFormat().

void parseFontSize ( const QString &  str,
QTextCharFormat *  format 
)
protected

Definition at line 710 of file qssparser.cpp.

Referenced by parseFormat().

void parseFontFamily ( const QString &  str,
QTextCharFormat *  format 
)
protected

Definition at line 724 of file qssparser.cpp.

Referenced by parseFormat().

Member Data Documentation

QHash<QString, QPalette::ColorRole> _paletteColorRoles
protected

Definition at line 65 of file qssparser.h.

Referenced by parseBrush(), and parsePaletteBlock().

QHash<QString, UiStyle::ColorRole> _uiStyleColorRoles
protected

Definition at line 66 of file qssparser.h.

Referenced by parseBrush(), and parsePaletteBlock().

QPalette _palette
private

Definition at line 69 of file qssparser.h.

Referenced by palette(), parseBrush(), and parsePaletteBlock().

QVector<QBrush> _uiStylePalette
private

Definition at line 70 of file qssparser.h.

Referenced by parseBrush(), parsePaletteBlock(), and uiStylePalette().

QHash<quint64, QTextCharFormat> _formats
private

Definition at line 71 of file qssparser.h.

Referenced by formats(), and parseChatLineBlock().

QHash<quint32, QTextCharFormat> _listItemFormats
private

Definition at line 72 of file qssparser.h.

Referenced by listItemFormats(), and parseListItemBlock().


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