diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-11-05 22:51:39 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-11-05 22:51:39 (GMT) |
commit | 4266b0616bb5d67244173dbe4d9d417dbf4d302f (patch) | |
tree | 4d8320dfafe09657fb0e475bd6b36a50c4d79105 /src/declarative/util | |
parent | ec543f79c7d036961eb6cdcd956b3e8ca28b8e54 (diff) | |
parent | 96f3abd4df881789bd2677100a2417c96fd2edb4 (diff) | |
download | Qt-4266b0616bb5d67244173dbe4d9d417dbf4d302f.zip Qt-4266b0616bb5d67244173dbe4d9d417dbf4d302f.tar.gz Qt-4266b0616bb5d67244173dbe4d9d417dbf4d302f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qmlsystempalette.cpp | 26 | ||||
-rw-r--r-- | src/declarative/util/qmlsystempalette_p.h | 13 |
2 files changed, 11 insertions, 28 deletions
diff --git a/src/declarative/util/qmlsystempalette.cpp b/src/declarative/util/qmlsystempalette.cpp index bb3ec70..4ddc82d 100644 --- a/src/declarative/util/qmlsystempalette.cpp +++ b/src/declarative/util/qmlsystempalette.cpp @@ -256,39 +256,23 @@ QColor QmlSystemPalette::highlightedText() const } /*! - \qmlproperty color SystemPalette::lighter -*/ -QColor QmlSystemPalette::lighter(const QColor& color) const -{ - return color.lighter(); -} - -/*! - \qmlproperty color SystemPalette::darker -*/ -QColor QmlSystemPalette::darker(const QColor& color) const -{ - return color.darker(); -} - -/*! - \qmlproperty QPalette::ColorGroup SystemPalette::colorGroup + \qmlproperty QmlSystemPalette::ColorGroup SystemPalette::colorGroup The color group of the palette. It can be Active, Inactive or Disabled. Active is the default. \sa QPalette::ColorGroup */ -QPalette::ColorGroup QmlSystemPalette::colorGroup() const +QmlSystemPalette::ColorGroup QmlSystemPalette::colorGroup() const { Q_D(const QmlSystemPalette); - return d->group; + return (QmlSystemPalette::ColorGroup)d->group; } -void QmlSystemPalette::setColorGroup(QPalette::ColorGroup colorGroup) +void QmlSystemPalette::setColorGroup(QmlSystemPalette::ColorGroup colorGroup) { Q_D(QmlSystemPalette); - d->group = colorGroup; + d->group = (QPalette::ColorGroup)colorGroup; emit paletteChanged(); } diff --git a/src/declarative/util/qmlsystempalette_p.h b/src/declarative/util/qmlsystempalette_p.h index e87534e..6abbfe0 100644 --- a/src/declarative/util/qmlsystempalette_p.h +++ b/src/declarative/util/qmlsystempalette_p.h @@ -56,9 +56,10 @@ class QmlSystemPalettePrivate; class Q_DECLARATIVE_EXPORT QmlSystemPalette : public QObject { Q_OBJECT + Q_ENUMS(ColorGroup) Q_DECLARE_PRIVATE(QmlSystemPalette) - Q_PROPERTY(QPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged) + Q_PROPERTY(QmlSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged) Q_PROPERTY(QColor window READ window NOTIFY paletteChanged) Q_PROPERTY(QColor windowText READ windowText NOTIFY paletteChanged) Q_PROPERTY(QColor base READ base NOTIFY paletteChanged) @@ -78,6 +79,8 @@ public: QmlSystemPalette(QObject *parent=0); ~QmlSystemPalette(); + enum ColorGroup { Active = QPalette::Active, Inactive = QPalette::Inactive, Disabled = QPalette::Disabled }; + QColor window() const; QColor windowText() const; @@ -97,12 +100,8 @@ public: QColor highlight() const; QColor highlightedText() const; - QPalette::ColorGroup colorGroup() const; - void setColorGroup(QPalette::ColorGroup); - - // FIXME: Move to utility class? - Q_INVOKABLE QColor lighter(const QColor&) const; - Q_INVOKABLE QColor darker(const QColor&) const; + QmlSystemPalette::ColorGroup colorGroup() const; + void setColorGroup(QmlSystemPalette::ColorGroup); Q_SIGNALS: void paletteChanged(); |