New css schema object for constructing property values from strings
[kworship.git] / kworship / display / KwDisplayStyles.h
blob3d063fe7c2733ae55670765c6aa7d8ec04521601
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
5 * KWorship is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * KWorship is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with KWorship. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _KwDisplayStyles_h_
21 #define _KwDisplayStyles_h_
23 /**
24 * @file KwDisplayStyles.h
25 * @brief Display styles interface.
26 * @author James Hogan <james@albanarts.com>
29 #include "KwCssStandardise.h"
31 #include <QString>
32 #include <QBrush>
33 #include <QFont>
34 #include <QPen>
36 // The cpp file defines this to declare static variables
37 #ifdef KW_DISPLAY_STYLES_DECLARE
38 #undef KWCSS_EXTERN
39 #define KWCSS_EXTERN
40 #endif
42 namespace KwDisplayStyles
44 // Define schema accessor
45 KWCSS_SCHEMA
47 // Display background
48 KWCSS_ROOT_NAMESPACE(background)
49 // Brush to fill the background
50 KWCSS_DEFINE_PROPERTY(QBrush, brush)
51 // Image backgrounds
52 KWCSS_START_NAMESPACE(background, image)
53 // Pixmap to display
54 KWCSS_DEFINE_PROPERTY(QPixmap, pixmap)
55 KWCSS_END_NAMESPACE()
57 // Video backgrounds
58 KWCSS_START_NAMESPACE(background, video)
59 // Path of video file
60 KWCSS_DEFINE_PROPERTY(QString, path)
61 // Whether to loop the video
62 KWCSS_DEFINE_PROPERTY(bool, loop)
63 KWCSS_END_NAMESPACE()
65 KWCSS_END_NAMESPACE()
68 // Text
69 KWCSS_ROOT_NAMESPACE(text)
70 // Font display settings
71 KWCSS_START_NAMESPACE(text, font)
72 KWCSS_DEFINE_PROPERTY(QFont, font)
73 KWCSS_DEFINE_PROPERTY(QBrush, brush)
74 KWCSS_START_NAMESPACE(text.font, outline)
75 KWCSS_DEFINE_PROPERTY(bool, enabled)
76 KWCSS_DEFINE_PROPERTY(QPen, pen)
77 KWCSS_END_NAMESPACE()
78 KWCSS_START_NAMESPACE(text.font, shadow)
79 KWCSS_DEFINE_PROPERTY(bool, enabled)
80 KWCSS_END_NAMESPACE()
81 KWCSS_END_NAMESPACE()
82 // Text layout settings
83 KWCSS_END_NAMESPACE()
87 #endif // _KwDisplayStyles_h_