Cleaned up initial playlist and added playlist song verse activate
[kworship.git] / kworship / css / KwCssStyles.h
blobad13773234706232b4f0a626a91a3aa67b1873ef
1 #ifndef _KwCssStyles_h_
2 #define _KwCssStyles_h_
4 /**
5 * @file KwCssStyles.h
6 * @brief Set of cascading style properties.
7 * @author James Hogan <james@albanarts.com>
8 */
10 #include "KwCssStyle.h"
12 #include <QHash>
14 class KwCssAbstractStyle;
15 class KwCssStyleStates;
17 /// Set of cascading style properties.
18 class KwCssStyles
20 public:
23 * Constructors + destructors
26 /// Default constructor.
27 KwCssStyles();
29 /// Copy constructor.
30 KwCssStyles(const KwCssStyles& other);
32 /// Destructor.
33 virtual ~KwCssStyles();
36 * Main interface
39 /// Set a style.
40 void setRawStyle(QString name, KwCssAbstractStyle* style);
42 /// Set a style of a particular type.
43 template <typename T>
44 void setStyle(QString name, const T& value)
46 setRawStyle(name, new KwCssStyle<T>(value));
50 * Operators
53 /// Apply styles to states.
54 friend KwCssStyleStates& operator << (KwCssStyleStates& states, const KwCssStyles& styles);
56 private:
59 * Types
62 /// Dictionary of strings to styles.
63 typedef QHash<QString, KwCssAbstractStyle*> StyleDictionary;
66 * Variables
69 /// The style properties.
70 StyleDictionary m_styles;
74 #endif // _KwCssStyles_h_