NAMEQColorDialog - Dialog widget for specifying colors
SYNOPSIS#include <qcolordialog.h> Inherits QDialog. Static Public Members <li class=fn>QColor getColor ( const QColor & initial = white, QWidget * parent = 0, const char * name = 0 ) <li class=fn>QRgb getRgba ( QRgb initial, bool * ok = 0, QWidget * parent = 0, const char * name = 0 ) <li class=fn>int customCount () <li class=fn>QRgb customColor ( int i ) <li class=fn>void setCustomColor ( int i, QRgb c ) <li class=fn>void setStandardColor ( int i, QRgb c )
DESCRIPTIONThe 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. <center> [Image Omitted] </center> See also Dialog Classes and Graphics Classes.
MEMBER FUNCTION DOCUMENTATION
QRGB QCOLORDIALOG::CUSTOMCOLOR ( INT I ) [STATIC]Returns custom color number i as a QRgb.
INT QCOLORDIALOG::CUSTOMCOUNT () [STATIC]Returns the number of custom colors supported by QColorDialog. All color dialogs share the same custom colors.
QCOLOR QCOLORDIALOG::GETCOLOR ( CONST QCOLOR & INITIAL = WHITE, QWIDGET *parent = 0, const char * name = 0 ) [static] 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 and is called name. 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. Examples:
QRGB QCOLORDIALOG::GETRGBA ( QRGB INITIAL, BOOL * OK = 0, QWIDGET * PARENT =0, const char * name = 0 ) [static] Pops up a modal color dialog to allow the user to choose a color and an alpha channel (transparency) value. The color+alpha is initially set to initial. The dialog is a child of parent and called name. If ok is non-null, *ok is set to TRUE if the user clicked OK, and to FALSE if the user clicked Cancel. If the user clicks Cancel, the initial value is returned.
VOID QCOLORDIALOG::SETCUSTOMCOLOR ( INT I, QRGB C ) [STATIC]Sets custom color number i to the QRgb value c.
VOID QCOLORDIALOG::SETSTANDARDCOLOR ( INT I, QRGB C ) [STATIC]Sets standard color number i to the QRgb value c.
SEE ALSO//doc.trolltech.com/qcolordialog.html //www.trolltech.com/faq/tech.html
COPYRIGHTCopyright 1992-2007 Trolltech ASA, //www.trolltech.com. See the license file included in the distribution for a complete license statement.
AUTHORGenerated automatically from the source code.
BUGSIf you find a bug in Qt, please report it as described in //doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt- email@example.com. Please include the name of the manual page (qcolordialog.3qt) and the Qt version (3.3.8). QCOLORDIALOG(3)