1QColorDialog(3qt)                                            QColorDialog(3qt)
2
3
4

NAME

6       QColorDialog - Dialog widget for specifying colors
7

SYNOPSIS

9       #include <qcolordialog.h>
10
11       Inherits QDialog.
12
13   Static Public Members
14       <li class=fn>QColor getColor ( const QColor & initial = white, QWidget
15       * parent = 0, const char * name = 0 ) <li class=fn>QRgb getRgba ( QRgb
16       initial, bool * ok = 0, QWidget * parent = 0, const char * name = 0 )
17       <li class=fn>int customCount () <li class=fn>QRgb customColor ( int i )
18       <li class=fn>void setCustomColor ( int i, QRgb c ) <li class=fn>void
19       setStandardColor ( int i, QRgb c )
20

DESCRIPTION

22       The QColorDialog class provides a dialog widget for specifying colors.
23
24       The color dialog's function is to allow users to choose colors. For
25       example, you might use this in a drawing program to allow the user to
26       set the brush color.
27
28       The static functions provide modal color dialogs.
29
30       The static getColor() function shows the dialog and allows the user to
31       specify a color. The getRgba() function does the same but also allows
32       the user to specify a color with an alpha channel (transparency) value.
33
34       The user can store customCount() different custom colors. The custom
35       colors are shared by all color dialogs, and remembered during the
36       execution of the program. Use setCustomColor() to set the custom
37       colors, and use customColor() to get them.
38
39       <center>
40                                   [Image Omitted]
41
42       </center>
43
44       See also Dialog Classes and Graphics Classes.
45

MEMBER FUNCTION DOCUMENTATION

QRgb QColorDialog::customColor ( int i ) [static]

48       Returns custom color number i as a QRgb.
49

int QColorDialog::customCount () [static]

51       Returns the number of custom colors supported by QColorDialog. All
52       color dialogs share the same custom colors.
53

QColor QColorDialog::getColor ( const QColor & initial = white, QWidget *

55       parent = 0, const char * name = 0 ) [static]
56       Pops up a modal color dialog, lets the user choose a color, and returns
57       that color. The color is initially set to initial. The dialog is a
58       child of parent and is called name. It returns an invalid (see
59       QColor::isValid()) color if the user cancels the dialog. All colors
60       allocated by the dialog will be deallocated before this function
61       returns.
62
63       Examples:
64

QRgb QColorDialog::getRgba ( QRgb initial, bool * ok = 0, QWidget * parent =

66       0, const char * name = 0 ) [static]
67       Pops up a modal color dialog to allow the user to choose a color and an
68       alpha channel (transparency) value. The color+alpha is initially set to
69       initial. The dialog is a child of parent and called name.
70
71       If ok is non-null, *ok is set to TRUE if the user clicked OK, and to
72       FALSE if the user clicked Cancel.
73
74       If the user clicks Cancel, the initial value is returned.
75

void QColorDialog::setCustomColor ( int i, QRgb c ) [static]

77       Sets custom color number i to the QRgb value c.
78

void QColorDialog::setStandardColor ( int i, QRgb c ) [static]

80       Sets standard color number i to the QRgb value c.
81
82

SEE ALSO

84       http://doc.trolltech.com/qcolordialog.html
85       http://www.trolltech.com/faq/tech.html
86
88       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
89       license file included in the distribution for a complete license
90       statement.
91

AUTHOR

93       Generated automatically from the source code.
94

BUGS

96       If you find a bug in Qt, please report it as described in
97       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
98       help you. Thank you.
99
100       The definitive Qt documentation is provided in HTML format; it is
101       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
102       web browser. This man page is provided as a convenience for those users
103       who prefer man pages, although this format is not officially supported
104       by Trolltech.
105
106       If you find errors in this manual page, please report them to qt-
107       bugs@trolltech.com.  Please include the name of the manual page
108       (qcolordialog.3qt) and the Qt version (3.3.8).
109
110
111
112Trolltech AS                    2 February 2007              QColorDialog(3qt)
Impressum