StyleParser

The StyleParser class parses a data stream into a StylSheet.

Publicly inherits QObject.

Public Methods

StyleParser( StyleSheet* styleSheet );
~StyleParser( );

Public Slots

voiddata( const char* bytes, int length );
voiddone( );
voidendOfData( );
voidtoken( Token token, QString text );

Private Methods

voidstateDeclAttr( Token token, QString text );
voidstateDeclValue( Token token, QString text );
voidstateSelector( Token token, QString text );
voidstateSelectorAttrs( Token token, QString text );

Signals

voiddone( StyleSheet* styleSheet );
voidfwdData( const char* bytes, int length );
voidfwdEndOfData( );

Private Data Members

QString_attrName;
QString_attrValue;
DisplayProto(¨_displayProto;
Style*_style;
StyleSheet*_styleSheet;

Public Methods Documentation

StyleParser ( StyleSheet* styleSheet );

Create a new StyleParser for the given style sheet. Create a StyleLexer to tokenize the input stream.

Public Slots Documentation

void data ( const char* bytes, int length );

Forward the data signals to the StyleLexer.

void done ( );

Process any remaining tokens, and die.

void endOfData ( );

Forward the endOfData signal to the StyleLexer.

void token ( Token token, QString text );

Process a token from the StylLexer.

Private Methods Documentation

void stateSelector ( Token token, QString text );

Accumulate a list of elements that will have a group of styles applied to them.

Signals Documentation

void done ( StyleSheet* styleSheet );

This signal is emitted after the parser has finished.

void fwdData ( const char* bytes, int length );

This signal is used to forward the data signals to the StyleLexer.

void fwdEndOfData ( );

This signal is used to forward the endOfData signal to the StyleLexer.


Return to Index.
Automatically generated on Aug 11 23:32