source: trunk/src/declarative/util/qdeclarativesystempalette_p.h

Last change on this file was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 4.3 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation (qt-info@nokia.com)
6**
7** This file is part of the QtDeclarative module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at qt-info@nokia.com.
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef QDECLARATIVESYSTEMPALETTE_H
43#define QDECLARATIVESYSTEMPALETTE_H
44
45#include <qdeclarative.h>
46
47#include <QtCore/qobject.h>
48#include <QPalette>
49
50QT_BEGIN_HEADER
51
52QT_BEGIN_NAMESPACE
53
54QT_MODULE(Declarative)
55
56class QDeclarativeSystemPalettePrivate;
57class Q_AUTOTEST_EXPORT QDeclarativeSystemPalette : public QObject
58{
59 Q_OBJECT
60 Q_ENUMS(ColorGroup)
61 Q_DECLARE_PRIVATE(QDeclarativeSystemPalette)
62
63 Q_PROPERTY(QDeclarativeSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged)
64 Q_PROPERTY(QColor window READ window NOTIFY paletteChanged)
65 Q_PROPERTY(QColor windowText READ windowText NOTIFY paletteChanged)
66 Q_PROPERTY(QColor base READ base NOTIFY paletteChanged)
67 Q_PROPERTY(QColor text READ text NOTIFY paletteChanged)
68 Q_PROPERTY(QColor alternateBase READ alternateBase NOTIFY paletteChanged)
69 Q_PROPERTY(QColor button READ button NOTIFY paletteChanged)
70 Q_PROPERTY(QColor buttonText READ buttonText NOTIFY paletteChanged)
71 Q_PROPERTY(QColor light READ light NOTIFY paletteChanged)
72 Q_PROPERTY(QColor midlight READ midlight NOTIFY paletteChanged)
73 Q_PROPERTY(QColor dark READ dark NOTIFY paletteChanged)
74 Q_PROPERTY(QColor mid READ mid NOTIFY paletteChanged)
75 Q_PROPERTY(QColor shadow READ shadow NOTIFY paletteChanged)
76 Q_PROPERTY(QColor highlight READ highlight NOTIFY paletteChanged)
77 Q_PROPERTY(QColor highlightedText READ highlightedText NOTIFY paletteChanged)
78
79public:
80 QDeclarativeSystemPalette(QObject *parent=0);
81 ~QDeclarativeSystemPalette();
82
83 enum ColorGroup { Active = QPalette::Active, Inactive = QPalette::Inactive, Disabled = QPalette::Disabled };
84
85 QColor window() const;
86 QColor windowText() const;
87
88 QColor base() const;
89 QColor text() const;
90 QColor alternateBase() const;
91
92 QColor button() const;
93 QColor buttonText() const;
94
95 QColor light() const;
96 QColor midlight() const;
97 QColor dark() const;
98 QColor mid() const;
99 QColor shadow() const;
100
101 QColor highlight() const;
102 QColor highlightedText() const;
103
104 QDeclarativeSystemPalette::ColorGroup colorGroup() const;
105 void setColorGroup(QDeclarativeSystemPalette::ColorGroup);
106
107Q_SIGNALS:
108 void paletteChanged();
109
110private:
111 bool eventFilter(QObject *watched, QEvent *event);
112 bool event(QEvent *event);
113
114};
115
116QT_END_NAMESPACE
117
118QML_DECLARE_TYPE(QDeclarativeSystemPalette)
119
120QT_END_HEADER
121
122#endif // QDECLARATIVESYSTEMPALETTE_H
Note: See TracBrowser for help on using the repository browser.