This class stores the style description for an SGML element. More...
Style | ( const QString& name ); | |
Style | ( const Style& src ); | |
int | displayType | ( ); |
bool | enumValue | ( const char* token, int& value ); |
const StyleAttr* | find | ( const char* token ); |
bool | flagValue | ( const char* token ); |
bool | listValue | ( const char* token, QString& value ); |
int | matchFactor | ( const STag* tag ); |
bool | numberValue | ( const char* token, int& value ); |
QString | selectorString | ( ); |
void | setDisplay | ( DisplayProto display ); |
bool | stringValue | ( const char* token, QString& value ); |
~Style | ( ); |
void | ( ); |
QList<StyleAttr> | _attrs; |
DisplayProto | _display; |
QString | _name; |
QList<Attr> | _sgmlAttrs; |
This class stores the style description for an SGML element.
An SGML element can contain other SGML elements and/or content. In order to present the content to a user it must be rendered. This class specifies a mapping from an SGML element's content and attributes to an on-screen representation.Each instance of the Style class is associated with a single "element". However, an "element" may be a simple element name (i.e. "H1" ) or an element path (i.e. "/HTML/BODY/H1" ). The list of styles for a document type is stored in a StyleSheet.
Construct a default style for the named element.
Returns an integer value that tells how good a match this style is to the given start tag. If the tag name does not match the name of this style, or one of the attribute requirements is not met by this tag then 0 is returned. Otherwise, one plus the number of attributes for this style are returned. The best match should be the first match with the highest matchFactor().