|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.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.
QColor
, QFileDialog
, QPrintDialog
, QFontDialog
, and Standard 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.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.gui.QDialog |
---|
accepted, finished, rejected |
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Method Summary | |
---|---|
static int |
customColor(int arg__1)
Returns custom color number i as a QRgb value. |
static int |
customCount()
Returns the number of custom colors supported by QColorDialog . |
static QColor |
getColor()
Pops up a modal color dialog, lets the user choose a color, and returns that color. |
static QColor |
getColor(QColor init)
Pops up a modal color dialog, lets the user choose a color, and returns that color. |
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 number to the QRgbcolor value. |
static void |
setStandardColor(int arg__1,
int arg__2)
Sets the standard color number to the QRgbcolor value given. |
Methods inherited from class com.trolltech.qt.gui.QDialog |
---|
accept, done, exec, isSizeGripEnabled, reject, result, setModal, setResult, setSizeGripEnabled |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, 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)
setCustomColor()
.
public static int customCount()
QColorDialog
. All color dialogs share the same custom colors.
public static QColor getColor(QColor init)
QColor::isValid()
) color if the user cancels the dialog. All colors allocated by the dialog will be deallocated before this function returns.
public static QColor getColor()
QColor::isValid()
) color if the user cancels the dialog. All colors allocated by the dialog will be deallocated before this function returns.
public static QColor getColor(QColor init, QWidget parent)
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)
customColor()
.
public static void setStandardColor(int arg__1, int arg__2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |