|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.gui.QDialog
com.trolltech.qt.gui.QColorDialog
public final class QColorDialog
The QColorDialog class provides a dialog widget for specifying colors.
The color dialog's function is to allow users to choose colors. For example, you might use this in a drawing program to allow the user to set the brush color.
The static functions provide modal color dialogs.
The static getColor function shows the dialog, and allows the user to specify a color. The getRgba() function does the same, but also allows the user to specify a color with an alpha channel (transparency) value.
The user can store customCount different custom colors. The custom colors are shared by all color dialogs, and remembered during the execution of the program. Use setCustomColor to set the custom colors, and use customColor to get them.
Additional widgets that allow users to pick colors are available as Qt Solutions.
The Standard Dialogs example shows how to use QColorDialog as well as other built-in Qt dialogs.
Dialogs Example
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QDialog |
---|
QDialog.DialogCode |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.gui.QDialog |
---|
accepted, finished, rejected |
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Method Summary | |
---|---|
static int |
customColor(int arg__1)
Returns custom color number arg__1 as a QRgb value. |
static int |
customCount()
Returns the number of custom colors supported by QColorDialog. |
static QColorDialog |
fromNativePointer(QNativePointer nativePointer)
This function returns the QColorDialog instance pointed to by nativePointer |
static QColor |
getColor()
Equivalent to getColor(Qt::white, 0). |
static QColor |
getColor(QColor init)
Equivalent to getColor(init, 0). |
static QColor |
getColor(QColor init,
QWidget parent)
Pops up a modal color dialog, lets the user choose a color, and returns that color. |
static void |
setCustomColor(int arg__1,
int arg__2)
Sets the custom color arg__1 to the QRgb arg__2 value. |
static void |
setStandardColor(int arg__1,
int arg__2)
Sets the standard color arg__1 to the QRgb arg__2 value given. |
Methods inherited from class com.trolltech.qt.gui.QDialog |
---|
accept, adjustPosition, closeEvent, contextMenuEvent, done, eventFilter, exec, isSizeGripEnabled, keyPressEvent, minimumSizeHint, reject, resizeEvent, result, setModal, setResult, setSizeGripEnabled, setVisible, showEvent, sizeHint |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
disconnect, disconnect, signalSender |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Method Detail |
---|
public static int customColor(int arg__1)
Returns custom color number arg__1 as a QRgb value.
public static int customCount()
Returns the number of custom colors supported by QColorDialog. All color dialogs share the same custom colors.
public static QColor getColor(QColor init)
Equivalent to getColor(init, 0).
public static QColor getColor()
Equivalent to getColor(Qt::white, 0).
public static QColor getColor(QColor init, QWidget parent)
Pops up a modal color dialog, lets the user choose a color, and returns that color. The color is initially set to init. The dialog is a child of parent. It returns an invalid (see QColor::isValid()) color if the user cancels the dialog. All colors allocated by the dialog will be deallocated before this function returns.
public static void setCustomColor(int arg__1, int arg__2)
Sets the custom color arg__1 to the QRgb arg__2 value.
public static void setStandardColor(int arg__1, int arg__2)
Sets the standard color arg__1 to the QRgb arg__2 value given.
public static QColorDialog fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |