22 #include "commonstrings.h"
23 #include "resourcecollection.h"
24 #include "styles/stylecontextproxy.h"
25 #include "tableborder.h"
36 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
37 m_##attr_NAME = attr_DEFAULT; \
38 inh_##attr_NAME = true;
39 #include "tablestyle.attrdefs.cxx"
61 static void desaxeRules(
const Xml_string& prefixPattern,
desaxe::Digester& ruleset, Xml_string elemtag = saxxDefaultElem);
63 virtual void saxx(
SaxHandler& handler,
const Xml_string& elemtag)
const;
71 QString displayName()
const;
106 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
107 const attr_TYPE &attr_GETTER() const { validate(); return m_##attr_NAME; }
108 #include "tablestyle.attrdefs.cxx"
116 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
117 void set##attr_NAME(attr_TYPE v) { m_##attr_NAME = v; inh_##attr_NAME = false; }
118 #include "tablestyle.attrdefs.cxx"
125 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
126 void reset##attr_NAME() { m_##attr_NAME = attr_DEFAULT; inh_##attr_NAME = true; }
127 #include "tablestyle.attrdefs.cxx"
135 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
136 bool isInh##attr_NAME() const { return inh_##attr_NAME; }
137 #include "tablestyle.attrdefs.cxx"
146 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
147 bool isDef##attr_NAME() const { \
148 if (!inh_##attr_NAME) return true; \
149 const TableStyle *parent = dynamic_cast<const TableStyle*>(parentStyle()); \
150 return parent && parent->isDef##attr_NAME(); \
152 #include "tablestyle.attrdefs.cxx"
159 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
160 attr_TYPE m_##attr_NAME; \
161 bool inh_##attr_NAME;
162 #include "tablestyle.attrdefs.cxx"
168 static_cast<Style&
>(*this) =
static_cast<const Style&
>(other);
169 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
170 m_##attr_NAME = other.m_##attr_NAME; \
171 inh_##attr_NAME = other.inh_##attr_NAME;
172 #include "tablestyle.attrdefs.cxx"
174 m_contextversion = -1;
180 #define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
181 m_##attr_NAME = other.m_##attr_NAME; \
182 inh_##attr_NAME = other.inh_##attr_NAME;
183 #include "tablestyle.attrdefs.cxx"
185 m_contextversion = -1;
188 #endif // TABLESTYLE_H
virtual bool equiv(const Style &other) const =0
Definition: stylecontext.h:35
Definition: tablestyle.h:30
Definition: saxhandler.h:21
Definition: stylecontextproxy.h:33
TableStyle & operator=(const TableStyle &other)
Definition: tablestyle.h:166
virtual void update(const StyleContext *b=NULL)
Definition: style.cpp:54
virtual void saxx(SaxHandler &handler) const
Definition: tablestyle.h:64
static const Xml_string saxxDefaultElem
Definition: saxio.h:40
Definition: digester.h:100
virtual void saxx(SaxHandler &, const Xml_string &) const =0
Definition: resourcecollection.h:41
TableStyle()
Definition: tablestyle.h:35