|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Enum
com.trolltech.qt.gui.QPalette.ColorRole
public static final class QPalette.ColorRole
See the description for details.
ColorRole
enum defines the different symbolic color roles used in current GUIs. The central roles are: There are some color roles used mostly for 3D bevel and shadow effects. All of these are normally derived from Window, and used in ways that depend on that relationship. For example, buttons depend on it to make the bevels look attractive, and Motif scroll bars depend on Mid to be slightly different from Window. Selected (marked) items have two roles: There are two color roles related to hyperlinks: Note that we do not use the Link and LinkVisited roles when rendering rich text in Qt, and that we recommend that you use CSS and the QTextDocument::setDefaultStyleSheet()
function to alter the appearance of links. For example:
QTextBrowser browser = new QTextBrowser(); QColor linkColor = QColor.red; String sheet = "a { text-decoration: underline; color: " + linkColor.name(); browser.document().setDefaultStyleSheet(sheet);
Field Summary | |
---|---|
static QPalette.ColorRole |
AlternateBase
Used as the alternate background color in views with alternating row colors (see QAbstractItemView.:setAlternatingRowColors() ). |
static QPalette.ColorRole |
Base
Used mostly as the background color for text entry widgets, but can also be used for other painting - such as the background of combobox drop down lists and toolbar handles. |
static QPalette.ColorRole |
BrightText
A text color that is very different from WindowText, and contrasts well with e.g. |
static QPalette.ColorRole |
Button
The general button background color. |
static QPalette.ColorRole |
ButtonText
A foreground color used with the Button color. |
static QPalette.ColorRole |
Dark
Darker than Button. |
static QPalette.ColorRole |
Highlight
A color to indicate a selected item or the current item. |
static QPalette.ColorRole |
HighlightedText
A text color that contrasts with Highlight. |
static QPalette.ColorRole |
Light
Lighter than Button color. |
static QPalette.ColorRole |
Link
A text color used for unvisited hyperlinks. |
static QPalette.ColorRole |
LinkVisited
A text color used for already visited hyperlinks. |
static QPalette.ColorRole |
Mid
|
static QPalette.ColorRole |
Midlight
Between Button and Light. |
static QPalette.ColorRole |
NoRole
No role; this special role is often used to indicate that a role has not been assigned. |
static QPalette.ColorRole |
Shadow
A very dark color. |
static QPalette.ColorRole |
Text
The foreground color used with Base. |
static QPalette.ColorRole |
ToolTipBase
Used as the background color for QToolTip and QWhatsThis . |
static QPalette.ColorRole |
ToolTipText
Used as the foreground color for QToolTip and QWhatsThis . |
static QPalette.ColorRole |
Window
|
static QPalette.ColorRole |
WindowText
A general background color. |
Method Summary | |
---|---|
static QPalette.ColorRole |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static QPalette.ColorRole |
valueOf(java.lang.String name)
|
static QPalette.ColorRole[] |
values()
|
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final QPalette.ColorRole WindowText
public static final QPalette.ColorRole Button
public static final QPalette.ColorRole Light
public static final QPalette.ColorRole Midlight
public static final QPalette.ColorRole Dark
public static final QPalette.ColorRole Mid
public static final QPalette.ColorRole Text
public static final QPalette.ColorRole BrightText
public static final QPalette.ColorRole ButtonText
public static final QPalette.ColorRole Base
public static final QPalette.ColorRole Window
public static final QPalette.ColorRole Shadow
Qt::black
.
public static final QPalette.ColorRole Highlight
Qt::darkBlue
.
public static final QPalette.ColorRole HighlightedText
Qt::white
.
public static final QPalette.ColorRole Link
Qt::blue
.
public static final QPalette.ColorRole LinkVisited
Qt::magenta
.
public static final QPalette.ColorRole AlternateBase
QAbstractItemView.:setAlternatingRowColors()
).
public static final QPalette.ColorRole NoRole
public static final QPalette.ColorRole ToolTipBase
QToolTip
and QWhatsThis
. Tool tips use the Inactive color group of QPalette
, because tool tips are not active windows.
public static final QPalette.ColorRole ToolTipText
QToolTip
and QWhatsThis
. Tool tips use the Inactive color group of QPalette
, because tool tips are not active windows.
Method Detail |
---|
public static QPalette.ColorRole[] values()
public static QPalette.ColorRole valueOf(java.lang.String name)
public int value()
value
in interface QtEnumerator
public static QPalette.ColorRole resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |