Scribus
Open source desktop publishing at your fingertips
|
#include <style.h>
Public Member Functions | |
Style (StyleContext *b, QString n) | |
Style & | operator= (const Style &o) |
Style (const Style &o) | |
void | saxxAttributes (Xml_attr &attr) const |
void | setDefaultStyle (bool ids) |
bool | isDefaultStyle () const |
QString | name () const |
void | setName (const QString &n) |
bool | hasName () const |
virtual QString | displayName () const =0 |
QString | parent () const |
void | setParent (const QString &p) |
bool | hasParent () const |
const Style * | parentStyle () const |
virtual void | setContext (const StyleContext *context) |
const StyleContext * | context () const |
virtual void | update (const StyleContext *b=NULL) |
void | validate () const |
QString | shortcut () const |
void | setShortcut (const QString &shortcut) |
virtual bool | equiv (const Style &other) const =0 |
virtual bool | operator== (const Style &other) const |
virtual bool | operator!= (const Style &other) const |
virtual void | erase ()=0 |
void | applyStyle (const Style &other) |
void | eraseStyle (const Style &other) |
Public Member Functions inherited from SaxIO | |
virtual void | saxx (SaxHandler &, const Xml_string &) const =0 |
virtual void | saxx (SaxHandler &) const =0 |
Static Public Member Functions | |
template<class SUBSTYLE > | |
static void | desaxeRules (const Xml_string &prefixPattern, desaxe::Digester &ruleset, Xml_string elemtag) |
Static Public Member Functions inherited from SaxIO | |
static void | desaxeRules (const Xml_string &, desaxe::Digester &, const Xml_string=saxxDefaultElem) |
Static Public Attributes | |
static const QString | INHERIT_PARENT = "\n" |
Static Public Attributes inherited from SaxIO | |
static const Xml_string | saxxDefaultElem |
Protected Attributes | |
bool | m_isDefaultStyle |
QString | m_name |
const StyleContext * | m_context |
int | m_contextversion |
QString | m_parent |
QString | m_shortcut |
This is the base class for all style-like objects: CharStyles, ParagraphStyles, LineStyles, FrameStyles, CellStyles, FlowStyles,... It provides a name and an inheritance mechanism which uses a Stylecontext. Before any attribute is queried, you have to call validate(), which checks the stored m_contextversion against the StyleContext's version and updates all attributes if they are different.
|
inline |
if other has a parent, replace this parent with the other ones
|
pure virtual |
returns true if both Styles are of the same type, inherit the same attributes, have the same parent, and agree on all attributes which are not inherited. The StyleContext, the name and any inherited attrinutes may be different.
Implemented in CharStyle, ParagraphStyle, CellStyle, TableStyle, and LineStyle.
|
pure virtual |
resets all attributes to their defaults and makes them inherited. name and parent are not affected.
Implemented in CharStyle, ParagraphStyle, CellStyle, TableStyle, and LineStyle.
|
inline |
if other has the same parent, remove this parent
|
inlinevirtual |
returns true if both Styles are equivalent and have the same name. Since the context is not tested, this does not ensure they will return the same values for all attributes.
|
virtual |
sets a new StyleContext if b is not NULL and then uses the StyleContext to set all inherited attributes to their valid value.
Reimplemented in CharStyle, CellStyle, TableStyle, ParagraphStyle, and LineStyle.
|
inline |
Checks if this Style needs an update