StyleSheet

The StyleSheet class stores and saves the style information for a single DTD. More...

Public Methods

StyleSheet( );
StyleSheet( const StyleSheet& src );
voidaddStyle( Style* style );
voiddeleteStyle( Style* style );
Style*getStyle( const Style* parent, const STag& tag );
voidsave( );
QStringsoi( );
voidsoi( const QString& soi );

Private Methods

Style*inherit( const Style* base, const Style* style );

Private Data Members

QString_soi;
QList<Style>_styles;

Detailed Documentation

The StyleSheet class stores and saves the style information for a single DTD.

Two types of styles are maintained: basic and compound. A basic style is a style associated with a single element (i.e. "BODY", "P", "H3"). These styles are added to the style sheet only by the style parser. Compound styles are created and cached as a document instance is being rendered. Compound styles look like "/HTML/HEAD/TITLE" or "/HTML/BODY/P/A/EM".

Public Methods Documentation

void addStyle ( Style* style );

Add a new basic or compound style to the style sheet.

Style* getStyle ( const Style* parent, const STag& tag );

Return the basic or compound style for the given tag path. If a compound style has been requested, all of the necessary intermediate compound styles will be created and cached automatically.

void save ( );

Save this style sheet, using its storage object identifier.

QString soi ( );

Return the storage object identifier for this style sheet.

void soi ( const QString& soi );

Set the storage object identifier for this style sheet.

Private Methods Documentation

Style* inherit ( const Style* base, const Style* style );

Create and return a new style by combining the two given styles. If a value in "style" is Inherit, then the value of the new style will be taken from "base".


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