<class name="QColorDialog" doc="/** <p>The <a href="QColorDialog.html"><tt>QColorDialog</tt></a> class provides a dialog widget for specifying colors.</p> <p>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.</p> <p>The static functions provide modal color dialogs.</p> <p>The static <a href="QColorDialog.html#getColor(com.trolltech.qt.gui.QColor, com.trolltech.qt.gui.QWidget)"><tt>getColor</tt></a> 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.</p> <p>The user can store <a href="QColorDialog.html#customCount()"><tt>customCount</tt></a> different custom colors. The custom colors are shared by all color dialogs, and remembered during the execution of the program. Use <a href="QColorDialog.html#setCustomColor(int, int)"><tt>setCustomColor</tt></a> to set the custom colors, and use <a href="QColorDialog.html#customColor(int)"><tt>customColor</tt></a> to get them.</p> <p>Additional widgets that allow users to pick colors are available as Qt Solutions</tt>.</p> <p>The Standard Dialogs</tt> example shows how to use <a href="QColorDialog.html"><tt>QColorDialog</tt></a> as well as other built-in Qt dialogs.</p> <p align="center"><img src="%2E%2E/images/plastique-colordialog.png" alt="A color dialog in the Plastique widget style." /></p> @see <a href="QColor.html"><tt>QColor</tt></a> @see <a href="QFileDialog.html"><tt>QFileDialog</tt></a> @see <a href="QPrintDialog.html"><tt>QPrintDialog</tt></a> @see <a href="QFontDialog.html"><tt>QFontDialog</tt></a> @see Standard Dialogs Example</tt> */"> <signal name="protected final void accepted()" doc="/** <p>This signal is emitted when the dialog has been accepted either by the user or by calling <a href="QDialog.html#accept()"><tt>accept</tt></a> or <a href="QDialog.html#done(int)"><tt>done</tt></a> with the QDialog::Accepted argument.</p> <p>Note that this signal is <i>not</i> emitted when hiding the dialog with <a href="QWidget.html#hide()"><tt>hide</tt></a> or <a href="QDialog.html#setVisible(boolean)"><tt>setVisible</tt></a>(false). This includes deleting the dialog while it is visible.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QColorDialog.html#finished(int)"><tt>finished</tt></a>, <a href="QColorDialog.html#rejected()"><tt>rejected</tt></a></dd> </dl> */"/> <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/** <p>This signal is emitted when the widget's <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a> is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position <tt>pos</tt> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="QAbstractScrollArea.html"><tt>QAbstractScrollArea</tt></a> and its subclasses that map the context menu event to coordinates of the viewport()</tt> .</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QPoint pos)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)"><tt>mapToGlobal</tt></a>, <a href="QMenu.html"><tt>QMenu</tt></a>, <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a></dd> </dl> */"/> <signal name="protected final void finished(int result)" doc="/** <p>This signal is emitted when the dialog's <tt>result</tt> code has been set, either by the user or by calling <a href="QDialog.html#done(int)"><tt>done</tt></a>, <a href="QDialog.html#accept()"><tt>accept</tt></a>, or <a href="QDialog.html#reject()"><tt>reject</tt></a>.</p> <p>Note that this signal is <i>not</i> emitted when hiding the dialog with <a href="QWidget.html#hide()"><tt>hide</tt></a> or <a href="QDialog.html#setVisible(boolean)"><tt>setVisible</tt></a>(false). This includes deleting the dialog while it is visible.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int result)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QColorDialog.html#accepted()"><tt>accepted</tt></a>, <a href="QColorDialog.html#rejected()"><tt>rejected</tt></a></dd> </dl> */"/> <signal name="protected final void rejected()" doc="/** <p>This signal is emitted when the dialog has been rejected either by the user or by calling <a href="QDialog.html#reject()"><tt>reject</tt></a> or <a href="QDialog.html#done(int)"><tt>done</tt></a> with the QDialog::Rejected argument.</p> <p>Note that this signal is <i>not</i> emitted when hiding the dialog with <a href="QWidget.html#hide()"><tt>hide</tt></a> or <a href="QDialog.html#setVisible(boolean)"><tt>setVisible</tt></a>(false). This includes deleting the dialog while it is visible.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QColorDialog.html#finished(int)"><tt>finished</tt></a>, <a href="QColorDialog.html#accepted()"><tt>accepted</tt></a></dd> </dl> */"/> <method name="public native static int customColor(int arg__1)" doc="/** <p>Returns custom color number <tt>arg__1</tt> as a QRgb value.</p> @see <a href="QColorDialog.html#setCustomColor(int, int)"><tt>setCustomColor</tt></a> */"/> <method name="public native static int customCount()" doc="/** <p>Returns the number of custom colors supported by <a href="QColorDialog.html"><tt>QColorDialog</tt></a>. All color dialogs share the same custom colors.</p> */"/> <method name="public static com.trolltech.qt.gui.QColor getColor(com.trolltech.qt.gui.QColor init, com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Pops up a modal color dialog, lets the user choose a color, and returns that color. The color is initially set to <tt>init</tt>. The dialog is a child of <tt>parent</tt>. 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.</p> */"/> <method name="public static com.trolltech.qt.gui.QColor getColor(com.trolltech.qt.gui.QColor init)" doc="/** <p>Equivalent to <a href="QColorDialog.html#getColor(com.trolltech.qt.gui.QColor, com.trolltech.qt.gui.QWidget)"><tt>getColor</tt></a>(<tt>init</tt>, 0). */"/> <method name="public static com.trolltech.qt.gui.QColor getColor()" doc="/** <p>Equivalent to <a href="QColorDialog.html#getColor(com.trolltech.qt.gui.QColor, com.trolltech.qt.gui.QWidget)"><tt>getColor</tt></a>(Qt::white, 0). */"/> <method name="public native static void setCustomColor(int arg__1, int arg__2)" doc="/** <p>Sets the custom color <tt>arg__1</tt> to the QRgb <tt>arg__2</tt> value.</p> @see <a href="QColorDialog.html#customColor(int)"><tt>customColor</tt></a> */"/> <method name="public native static void setStandardColor(int arg__1, int arg__2)" doc="/** <p>Sets the standard color <tt>arg__1</tt> to the QRgb <tt>arg__2</tt> value given.</p> */"/> </class>