1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
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. *
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. *
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_
24 * @file KwDisplayStyles.h
25 * @brief Display styles interface.
26 * @author James Hogan <james@albanarts.com>
29 #include <KwCssStandardise.h>
30 #include <KwResourceLink.h>
36 // The cpp file defines this to declare static variables
37 #ifdef KW_DISPLAY_STYLES_DECLARE
42 namespace KwDisplayStyles
44 // Define schema accessor
48 KWCSS_ROOT_NAMESPACE(background
)
49 // Brush to fill the background
50 KWCSS_DEFINE_PROPERTY(QBrush
, brush
)
52 KWCSS_START_NAMESPACE(background
, image
)
54 KWCSS_DEFINE_PROPERTY(KwResourceLink
, src
)
58 KWCSS_START_NAMESPACE(background, video)
60 KWCSS_DEFINE_PROPERTY(QString, path)
61 // Whether to loop the video
62 KWCSS_DEFINE_PROPERTY(bool, loop)
68 KWCSS_ROOT_NAMESPACE(text
)
70 KWCSS_START_NAMESPACE(text
, character
)
71 KWCSS_DEFINE_PROPERTY(QFont
, font
)
72 KWCSS_DEFINE_PROPERTY(QBrush
, brush
)
73 KWCSS_START_NAMESPACE(text
.character
, outline
)
74 KWCSS_DEFINE_PROPERTY(bool, enabled
)
75 KWCSS_DEFINE_PROPERTY(QPen
, pen
)
77 KWCSS_START_NAMESPACE(text
.character
, shadow
)
78 KWCSS_DEFINE_PROPERTY(bool, enabled
)
79 KWCSS_DEFINE_PROPERTY(QBrush
, brush
)
80 KWCSS_DEFINE_PROPERTY(int, offset
)
83 // Text layout settings
84 KWCSS_START_NAMESPACE(text
, layout
)
85 //KWCSS_DEFINE_PROPERTY(int, alignment)
86 KWCSS_START_NAMESPACE(text
.layout
, margins
)
87 KWCSS_DEFINE_PROPERTY(float, left
)
88 KWCSS_DEFINE_PROPERTY(float, right
)
89 KWCSS_DEFINE_PROPERTY(float, top
)
90 KWCSS_DEFINE_PROPERTY(float, bottom
)
96 #endif // _KwDisplayStyles_h_