42 #ifndef QCOLORDIALOG_H 43 #define QCOLORDIALOG_H 45 #include <QtGui/qdialog.h> 53 #ifndef QT_NO_COLORDIALOG 63 ColorDialogOptions options;
67 ShowAlphaChannel = 0x00000001,
68 NoButtons = 0x00000002,
69 DontUseNativeDialog = 0x00000004
78 void setCurrentColor(
const QColor &color);
79 QColor currentColor()
const;
81 QColor selectedColor()
const;
85 void setOptions(ColorDialogOptions options);
86 ColorDialogOptions options()
const;
88 #ifdef Q_NO_USING_KEYWORD 99 ColorDialogOptions options = 0);
103 static QRgb getRgba(
QRgb rgba = 0xffffffff,
bool *ok = 0,
QWidget *parent = 0);
106 static int customCount();
108 static void setCustomColor(
int index,
QRgb color);
109 static void setStandardColor(
int index,
QRgb color);
113 {
Q_UNUSED(name);
return getColor(init, parent); }
115 {
Q_UNUSED(name);
return getRgba(rgba, ok, parent); }
119 void currentColorChanged(
const QColor &color);
120 void colorSelected(
const QColor &color);
124 void done(
int result);
134 #if defined(Q_WS_MAC) 143 #endif // QT_NO_COLORDIALOG 149 #endif // QCOLORDIALOG_H The QColor class provides colors based on RGB, HSV or CMYK values.
ColorDialogOption
This enum specifies various options that affect the look and feel of a color dialog.
#define QT_END_NAMESPACE
This macro expands to.
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
The QDialog class is the base class of dialog windows.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QColorDialog class provides a dialog widget for specifying colors.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
virtual void done(int)
Closes the dialog and sets its result code to r.
void open()
Shows the dialog as a window modal dialog, returning immediately.
#define Q_DECLARE_PRIVATE(Class)
The QEvent class is the base class of all event classes.
void setVisible(bool visible)
Reimplemented Function
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...