#ifndef QPALETTE_H_
#define QPALETTE_H_
#include "KWQColor.h"
#include "KWQBrush.h"
#define KWQ_USE_PALETTES 0
class QColorGroupPrivate;
class QPalettePrivate;
class QColorGroup {
public:
enum ColorRole {
#if KWQ_USE_PALETTES
Foreground,
Shadow,
Light,
Midlight,
Mid,
Dark,
#endif
Base,
#if KWQ_USE_PALETTES
ButtonText,
Button,
Background,
Text,
Highlight,
HighlightedText,
#endif
NColorRoles
};
QColorGroup();
const QBrush &brush(ColorRole) const;
const QColor &color(ColorRole) const;
void setColor(ColorRole, const QColor &);
#if KWQ_USE_PALETTES
const QColor &foreground() const;
const QColor &shadow() const;
const QColor &light() const;
const QColor &midlight() const;
const QColor &dark() const;
#endif
const QColor &base() const;
#if KWQ_USE_PALETTES
const QColor &buttonText() const;
const QColor &button() const;
const QColor &text() const;
const QColor &background() const;
const QColor &highlight() const;
const QColor &highlightedText() const;
#endif
bool operator==(const QColorGroup &) const;
private:
QBrush brushes[NColorRoles];
};
class QPalette {
public:
enum ColorGroup {
Active,
#if KWQ_USE_PALETTES
Inactive,
Disabled,
#endif
NColorGroups
};
const QColor &color(ColorGroup, QColorGroup::ColorRole) const;
void setColor(ColorGroup, QColorGroup::ColorRole, const QColor &);
const QColorGroup &active() const { return m_active; }
#if KWQ_USE_PALETTES
const QColorGroup &inactive() const { return m_inactive; }
const QColorGroup &disabled() const { return m_disabled; }
const QColorGroup &normal() const { return m_active; }
#endif
bool operator==(const QPalette &) const;
private:
QColorGroup m_active;
#if KWQ_USE_PALETTES
QColorGroup m_inactive;
QColorGroup m_disabled;
#endif
};
#endif