Scribus
Open source desktop publishing at your fingertips
style.h
1 
2 
3 #ifndef STYLES_STYLE
4 #define STYLES_STYLE
5 
6 #include "../style.h"
7 #include "desaxe/digester.h"
8 #include "desaxe/simple_actions.h"
9 #include "desaxe/saxiohelper.h"
10 
11 
12 using namespace desaxe;
13 
14 template<class SUBSTYLE>
15 inline
16 void Style::desaxeRules(const Xml_string& prefixPattern, desaxe::Digester& ruleset, Xml_string elemtag)
17 {
18  static QString emptyString;
19  Xml_string stylePrefix(Digester::concat(prefixPattern,elemtag));
20  ruleset.addRule(stylePrefix, SetAttributeWithConversion<SUBSTYLE, const QString&>( & SUBSTYLE::setName, "name", &parse<const QString&>, emptyString));
21  ruleset.addRule(stylePrefix, SetAttributeWithConversion<SUBSTYLE, const QString&>( & SUBSTYLE::setParent, "parent", &parse<const QString&>, emptyString));
22  ruleset.addRule(stylePrefix, SetAttributeWithConversion<SUBSTYLE, const QString&>( & SUBSTYLE::setShortcut, "shortcut", &parse<const QString&>, emptyString));
23 }
24 
25 #endif
Definition: digester.h:100
Definition: simple_actions.h:480
Definition: actions.h:18