1 #ifndef _KwCssStyles_h_
2 #define _KwCssStyles_h_
6 * @brief Set of cascading style properties.
7 * @author James Hogan <james@albanarts.com>
10 #include "KwCssStyle.h"
14 class KwCssAbstractStyle
;
15 class KwCssStyleStates
;
17 /// Set of cascading style properties.
23 * Constructors + destructors
26 /// Default constructor.
30 KwCssStyles(const KwCssStyles
& other
);
33 virtual ~KwCssStyles();
40 void setRawStyle(QString name
, KwCssAbstractStyle
* style
);
42 /// Set a style of a particular type.
44 void setStyle(QString name
, const T
& value
)
46 setRawStyle(name
, new KwCssStyle
<T
>(value
));
53 /// Apply styles to states.
54 friend KwCssStyleStates
& operator << (KwCssStyleStates
& states
, const KwCssStyles
& styles
);
62 /// Dictionary of strings to styles.
63 typedef QHash
<QString
, KwCssAbstractStyle
*> StyleDictionary
;
69 /// The style properties.
70 StyleDictionary m_styles
;
74 #endif // _KwCssStyles_h_