diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-20 07:37:59 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-20 07:37:59 (GMT) |
commit | fd7dca696e09f3f57c54406fe1393fccdc298a36 (patch) | |
tree | 6d7e79254555ee1c2950572fac9644ac358bdd07 /src | |
parent | 50fd8253b534d657d7ab6e2dd88c14d3943f869c (diff) | |
download | Qt-fd7dca696e09f3f57c54406fe1393fccdc298a36.zip Qt-fd7dca696e09f3f57c54406fe1393fccdc298a36.tar.gz Qt-fd7dca696e09f3f57c54406fe1393fccdc298a36.tar.bz2 |
Renaming Palette -> SystemPalette
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qmlsystempalette.cpp (renamed from src/declarative/util/qmlpalette.cpp) | 132 | ||||
-rw-r--r-- | src/declarative/util/qmlsystempalette.h (renamed from src/declarative/util/qmlpalette.h) | 18 | ||||
-rw-r--r-- | src/declarative/util/util.pri | 4 |
3 files changed, 77 insertions, 77 deletions
diff --git a/src/declarative/util/qmlpalette.cpp b/src/declarative/util/qmlsystempalette.cpp index d86f98f..88278c3 100644 --- a/src/declarative/util/qmlpalette.cpp +++ b/src/declarative/util/qmlsystempalette.cpp @@ -40,29 +40,29 @@ ****************************************************************************/ #include "private/qobject_p.h" -#include "qmlpalette.h" +#include "qmlsystempalette.h" #include <QApplication> QT_BEGIN_NAMESPACE -class QmlPalettePrivate : public QObjectPrivate +class QmlSystemPalettePrivate : public QObjectPrivate { public: QPalette palette; QPalette::ColorGroup group; }; -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Palette,QmlPalette) +QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SystemPalette,QmlSystemPalette) /*! - \qmlclass Palette QmlPalette + \qmlclass SystemPalette QmlSystemPalette \ingroup group_utility - \brief The Palette item gives access to the Qt palettes. + \brief The SystemPalette item gives access to the Qt palettes. \sa QPalette Example: - \code - Palette { id: MyPalette; colorGroup: Qt.Active } + \qml + SystemPalette { id: MyPalette; colorGroup: Qt.Active } Rectangle { width: 640; height: 480 @@ -72,227 +72,227 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Palette,QmlPalette) text: "Hello!"; color: MyPalette.windowText } } - \endcode + \endqml */ -QmlPalette::QmlPalette(QObject *parent) - : QObject(*(new QmlPalettePrivate), parent) +QmlSystemPalette::QmlSystemPalette(QObject *parent) + : QObject(*(new QmlSystemPalettePrivate), parent) { - Q_D(QmlPalette); + Q_D(QmlSystemPalette); d->palette = qApp->palette(); d->group = QPalette::Active; qApp->installEventFilter(this); } -QmlPalette::~QmlPalette() +QmlSystemPalette::~QmlSystemPalette() { } /*! - \qmlproperty color Palette::window + \qmlproperty color SystemPalette::window The window (general background) color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::window() const +QColor QmlSystemPalette::window() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Window); } /*! - \qmlproperty color Palette::windowText + \qmlproperty color SystemPalette::windowText The window text (general foreground) color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::windowText() const +QColor QmlSystemPalette::windowText() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::WindowText); } /*! - \qmlproperty color Palette::base + \qmlproperty color SystemPalette::base The base color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::base() const +QColor QmlSystemPalette::base() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Base); } /*! - \qmlproperty color Palette::text + \qmlproperty color SystemPalette::text The text color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::text() const +QColor QmlSystemPalette::text() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Text); } /*! - \qmlproperty color Palette::alternateBase + \qmlproperty color SystemPalette::alternateBase The alternate base color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::alternateBase() const +QColor QmlSystemPalette::alternateBase() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::AlternateBase); } /*! - \qmlproperty color Palette::button + \qmlproperty color SystemPalette::button The button color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::button() const +QColor QmlSystemPalette::button() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Button); } /*! - \qmlproperty color Palette::buttonText + \qmlproperty color SystemPalette::buttonText The button text foreground color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::buttonText() const +QColor QmlSystemPalette::buttonText() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::ButtonText); } /*! - \qmlproperty color Palette::light + \qmlproperty color SystemPalette::light The light color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::light() const +QColor QmlSystemPalette::light() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Light); } /*! - \qmlproperty color Palette::midlight + \qmlproperty color SystemPalette::midlight The midlight color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::midlight() const +QColor QmlSystemPalette::midlight() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Midlight); } /*! - \qmlproperty color Palette::dark + \qmlproperty color SystemPalette::dark The dark color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::dark() const +QColor QmlSystemPalette::dark() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Dark); } /*! - \qmlproperty color Palette::mid + \qmlproperty color SystemPalette::mid The mid color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::mid() const +QColor QmlSystemPalette::mid() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Mid); } /*! - \qmlproperty color Palette::shadow + \qmlproperty color SystemPalette::shadow The shadow color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::shadow() const +QColor QmlSystemPalette::shadow() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Shadow); } /*! - \qmlproperty color Palette::highlight + \qmlproperty color SystemPalette::highlight The highlight color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::highlight() const +QColor QmlSystemPalette::highlight() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::Highlight); } /*! - \qmlproperty color Palette::highlightedText + \qmlproperty color SystemPalette::highlightedText The highlighted text color of the current color group. \sa QPalette::ColorRole */ -QColor QmlPalette::highlightedText() const +QColor QmlSystemPalette::highlightedText() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->palette.color(d->group, QPalette::HighlightedText); } /*! - \qmlproperty color Palette::lighter + \qmlproperty color SystemPalette::lighter */ -QColor QmlPalette::lighter(const QColor& color) const +QColor QmlSystemPalette::lighter(const QColor& color) const { return color.lighter(); } /*! - \qmlproperty color Palette::darker + \qmlproperty color SystemPalette::darker */ -QColor QmlPalette::darker(const QColor& color) const +QColor QmlSystemPalette::darker(const QColor& color) const { return color.darker(); } /*! - \qmlproperty QPalette::ColorGroup Palette::colorGroup + \qmlproperty QPalette::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 QmlPalette::colorGroup() const +QPalette::ColorGroup QmlSystemPalette::colorGroup() const { - Q_D(const QmlPalette); + Q_D(const QmlSystemPalette); return d->group; } -void QmlPalette::setColorGroup(QPalette::ColorGroup colorGroup) +void QmlSystemPalette::setColorGroup(QPalette::ColorGroup colorGroup) { - Q_D(QmlPalette); + Q_D(QmlSystemPalette); d->group = colorGroup; emit paletteChanged(); } -bool QmlPalette::eventFilter(QObject *watched, QEvent *event) +bool QmlSystemPalette::eventFilter(QObject *watched, QEvent *event) { if (watched == qApp) { if (event->type() == QEvent::ApplicationPaletteChange) { @@ -303,9 +303,9 @@ bool QmlPalette::eventFilter(QObject *watched, QEvent *event) return QObject::eventFilter(watched, event); } -bool QmlPalette::event(QEvent *event) +bool QmlSystemPalette::event(QEvent *event) { - Q_D(QmlPalette); + Q_D(QmlSystemPalette); if (event->type() == QEvent::ApplicationPaletteChange) { d->palette = qApp->palette(); emit paletteChanged(); diff --git a/src/declarative/util/qmlpalette.h b/src/declarative/util/qmlsystempalette.h index e381814..6558c7e 100644 --- a/src/declarative/util/qmlpalette.h +++ b/src/declarative/util/qmlsystempalette.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLPALETTE_H -#define QMLPALETTE_H +#ifndef QMLSYSTEMPALETTE_H +#define QMLSYSTEMPALETTE_H #include <QtCore/qobject.h> #include <QtDeclarative/qml.h> @@ -52,11 +52,11 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QmlPalettePrivate; -class Q_DECLARATIVE_EXPORT QmlPalette : public QObject +class QmlSystemPalettePrivate; +class Q_DECLARATIVE_EXPORT QmlSystemPalette : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QmlPalette) + Q_DECLARE_PRIVATE(QmlSystemPalette) Q_PROPERTY(QPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged) Q_PROPERTY(QColor window READ window NOTIFY paletteChanged) @@ -75,8 +75,8 @@ class Q_DECLARATIVE_EXPORT QmlPalette : public QObject Q_PROPERTY(QColor highlightedText READ highlightedText NOTIFY paletteChanged) public: - QmlPalette(QObject *parent=0); - ~QmlPalette(); + QmlSystemPalette(QObject *parent=0); + ~QmlSystemPalette(); QColor window() const; QColor windowText() const; @@ -115,8 +115,8 @@ private: QT_END_NAMESPACE -QML_DECLARE_TYPE(QmlPalette) +QML_DECLARE_TYPE(QmlSystemPalette) QT_END_HEADER -#endif // QMLPALETTE_H +#endif // QMLSYSTEMPALETTE_H diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri index 9374f00..1a0d402 100644 --- a/src/declarative/util/util.pri +++ b/src/declarative/util/util.pri @@ -6,7 +6,7 @@ SOURCES += \ util/qmlpackage.cpp \ util/qmlscript.cpp \ util/qmlanimation.cpp \ - util/qmlpalette.cpp \ + util/qmlsystempalette.cpp \ util/qmlfollow.cpp \ util/qmlstate.cpp\ util/qmltransitionmanager.cpp \ @@ -31,7 +31,7 @@ HEADERS += \ util/qmlscript.h \ util/qmlanimation.h \ util/qmlanimation_p.h \ - util/qmlpalette.h \ + util/qmlsystempalette.h \ util/qmlfollow.h \ util/qmlstate.h\ util/qmlstateoperations.h \ |