Clases |
struct | QPalData |
Tipos públicos |
enum | ColorGroup {
Disabled,
Active,
Inactive,
NColorGroups,
Normal = Active,
Disabled,
Active,
Inactive,
NColorGroups,
Normal = Active
} |
enum | ColorGroup {
Disabled,
Active,
Inactive,
NColorGroups,
Normal = Active,
Disabled,
Active,
Inactive,
NColorGroups,
Normal = Active
} |
Métodos públicos |
| QPalette () |
| QPalette (const QColor &button) |
| QPalette (const QColor &button, const QColor &background) |
| QPalette (const QColorGroup &active, const QColorGroup &disabled, const QColorGroup &inactive) |
| QPalette (const QPalette &) |
| ~QPalette () |
QPalette & | operator= (const QPalette &) |
const QColor & | color (ColorGroup, QColorGroup::ColorRole) const |
const QBrush & | brush (ColorGroup, QColorGroup::ColorRole) const |
void | setColor (ColorGroup, QColorGroup::ColorRole, const QColor &) |
void | setBrush (ColorGroup, QColorGroup::ColorRole, const QBrush &) |
void | setColor (QColorGroup::ColorRole, const QColor &) |
void | setBrush (QColorGroup::ColorRole, const QBrush &) |
QPalette | copy () const |
const QColorGroup & | active () const |
const QColorGroup & | disabled () const |
const QColorGroup & | inactive () const |
const QColorGroup & | normal () const |
void | setActive (const QColorGroup &) |
void | setDisabled (const QColorGroup &) |
void | setInactive (const QColorGroup &) |
void | setNormal (const QColorGroup &cg) |
bool | operator== (const QPalette &p) const |
bool | operator!= (const QPalette &p) const |
bool | isCopyOf (const QPalette &) |
int | serialNumber () const |
| QPalette () |
| QPalette (const QColor &button) |
| QPalette (const QColor &button, const QColor &background) |
| QPalette (const QColorGroup &active, const QColorGroup &disabled, const QColorGroup &inactive) |
| QPalette (const QPalette &) |
| ~QPalette () |
QPalette & | operator= (const QPalette &) |
const QColor & | color (ColorGroup, QColorGroup::ColorRole) const |
const QBrush & | brush (ColorGroup, QColorGroup::ColorRole) const |
void | setColor (ColorGroup, QColorGroup::ColorRole, const QColor &) |
void | setBrush (ColorGroup, QColorGroup::ColorRole, const QBrush &) |
void | setColor (QColorGroup::ColorRole, const QColor &) |
void | setBrush (QColorGroup::ColorRole, const QBrush &) |
QPalette | copy () const |
const QColorGroup & | active () const |
const QColorGroup & | disabled () const |
const QColorGroup & | inactive () const |
const QColorGroup & | normal () const |
void | setActive (const QColorGroup &) |
void | setDisabled (const QColorGroup &) |
void | setInactive (const QColorGroup &) |
void | setNormal (const QColorGroup &cg) |
bool | operator== (const QPalette &p) const |
bool | operator!= (const QPalette &p) const |
bool | isCopyOf (const QPalette &) |
int | serialNumber () const |
Métodos públicos estáticos |
static QColorGroup::ColorRole | foregroundRoleFromMode (Qt::BackgroundMode mode) |
static QColorGroup::ColorRole | backgroundRoleFromMode (Qt::BackgroundMode mode) |
static QColorGroup::ColorRole | foregroundRoleFromMode (Qt::BackgroundMode mode) |
static QColorGroup::ColorRole | backgroundRoleFromMode (Qt::BackgroundMode mode) |
Funciones relacionadas |
(Observar que estas no son funciones miembro.)
|
QDataStream & | operator<< (QDataStream &s, const QPalette &p) |
QDataStream & | operator>> (QDataStream &s, QPalette &p) |
The QPalette class contains color groups for each widget state.
A palette consists of three color groups: active, disabled, and inactive. All widgets contain a palette, and all widgets in Qt use their palette to draw themselves. This makes the user interface easily configurable and easier to keep consistent.
If you create a new widget we strongly recommend that you use the colors in the palette rather than hard-coding specific colors.
The color groups: The active() group is used for the window that has keyboard focus. The inactive() group is used for other windows. The disabled() group is used for widgets (not windows) that are disabled for some reason.
Both active and inactive windows can contain disabled widgets. (Disabled widgets are often called inaccessible or {grayed out}.)
In Motif style, active() and inactive() look the same. In Windows 2000 style and Macintosh Platinum style, the two styles look slightly different.
There are setActive(), setInactive(), and setDisabled() functions to modify the palette. (Qt also supports a normal() group; this is an obsolete alias for active(), supported for backwards compatibility.)
Colors and brushes can be set for particular roles in any of a palette's color groups with setColor() and setBrush().
You can copy a palette using the copy constructor and test to see if two palettes are identical using isCopyOf().
- Ver también:
- QApplication::setPalette(), QWidget::setPalette(), QColorGroup, QColor
La documentación para esta clase fue generada a partir de los siguientes ficheros: