Eneboo - Documentación para desarrolladores
Métodos públicos estáticos | Amigas
Referencia de la Clase 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. Más...

#include <qcolordialog.h>

Diagrama de herencias de QColorDialog
QDialog QDialog QWidget QWidget QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject

Lista de todos los miembros.

Métodos públicos estáticos

static QColor getColor (const QColor &init=white, QWidget *parent=0, const char *name=0)
static QRgb getRgba (QRgb, bool *ok=0, QWidget *parent=0, const char *name=0)
static int customCount ()
static QRgb customColor (int)
static void setCustomColor (int, QRgb)
static void setStandardColor (int, QRgb)
static QColor getColor (const QColor &init=white, QWidget *parent=0, const char *name=0)
static QRgb getRgba (QRgb, bool *ok=0, QWidget *parent=0, const char *name=0)
static int customCount ()
static QRgb customColor (int)
static void setCustomColor (int, QRgb)
static void setStandardColor (int, QRgb)

Amigas

class QColorDialogPrivate
class QColorShower

Descripción detallada

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. If you require a modeless dialog, use the QColorDialog constructor.

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.

qcolordlg-w.png


Documentación de las funciones miembro

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

Returns custom color number i as a QRgb.

static QRgb QColorDialog::customColor ( int  ) [static]
static int QColorDialog::customCount ( ) [static]
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.

static QColor QColorDialog::getColor ( const QColor init = white,
QWidget parent = 0,
const char *  name = 0 
) [static]
static QRgb QColorDialog::getRgba ( QRgb  ,
bool ok = 0,
QWidget parent = 0,
const char *  name = 0 
) [static]
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.

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

Sets custom color number i to the QRgb value c.

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

Sets standard color number i to the QRgb value c.


Documentación de las funciones relacionadas y clases amigas

QColorShower [friend]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'