Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QColorDialog

    java.lang.Object
      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

All Implemented Interfaces:
  QPaintDeviceInterface, QtJambiInterface

    public final class QColorDialog

extends QDialog

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.

See also:
  `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.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

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 `i` as a QRgb value.
`static int` | `customCount()` Returns the number of custom colors supported by `QColorDialog`.
`static QColorDialog` | `fromNativePointer(QNativePointer nativePointer)` This method returns the QColorDialog instance pointed to by `nativePointer`.
`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 QRgb`color` value.
`static void` | `setStandardColor(int arg__1, int arg__2)` Sets the standard color `number` to the QRgb`color` 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.gui.QWidget
`acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsRect, contextMenuEvent, contextMenuPolicy, cursor, depth, destroy, destroy, destroy, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabMouse, grabShortcut, grabShortcut, hasFocus, hasMouseTracking, height, heightForWidth, heightMM, hide, hideEvent, inputContext, inputMethodEvent, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isMaximized, isMinimized, isModal, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, languageChange, layout, layoutDirection, leaveEvent, locale, logicalDpiX, logicalDpiY, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, numColors, overrideWindowFlags, overrideWindowFlags, paintEngine, paintEvent, paintingActive, palette, parentWidget, physicalDpiX, physicalDpiY, pos, raise, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, render, render, render, render, render, render, render, render, repaint, repaint, repaint, repaint, resetInputContext, resize, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setBaseSize, setContentsMargins, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setLocale, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setParent, setParent, setShortcutAutoRepeat, setShortcutAutoRepeat, setShortcutEnabled, setShortcutEnabled, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, underMouse, unsetCursor, unsetLayoutDirection, unsetLocale, update, update, update, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, widthMM, window, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y`

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 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

### customColor

    public static int customColor(int arg__1)

  Returns custom color number `i` as a QRgb value.

See also:
  `setCustomColor()`.

### customCount

    public static int customCount()

  Returns the number of custom colors supported by `QColorDialog`. All color dialogs share the same custom colors.

### getColor

    public static QColor getColor(QColor init)

  Pops up a modal color dialog, lets the user choose a color, and returns that color. The color is initially set to `initial`. 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.

### getColor

    public static QColor getColor()

  Pops up a modal color dialog, lets the user choose a color, and returns that color. The color is initially set to `initial`. 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.

### getColor

    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 `initial`. 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.

### setCustomColor

    public static void setCustomColor(int arg__1,
                                      int arg__2)

  Sets the custom color `number` to the QRgb`color` value.

See also:
  `customColor()`.

### setStandardColor

    public static void setStandardColor(int arg__1,
                                        int arg__2)

  Sets the standard color `number` to the QRgb`color` value given.

### fromNativePointer

    public static QColorDialog fromNativePointer(QNativePointer nativePointer)

  This method returns the QColorDialog instance pointed to by `nativePointer`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD