org.kde.koala
public class KColorDialog extends KDialogBase
QColor myColor; int result = KColorDialog.getColor( myColor ); if ( result == KColorDialog.Accepted ) ...The color dialog is really a collection of several widgets which can you can also use separately: the quadratic plane in the top left of the dialog is a KXYSelector. Right next to it is a KHSSelector for choosing hue/saturation. On the right side of the dialog you see a KPaletteTable showing up to 40 colors with a combo box which offers several predefined palettes or a palette configured by the user. The small field showing the currently selected color is a KColorPatch. See KColorDialogSignals for signals emitted by KColorDialog
UNKNOWN: A color selection dialog.
Constructor Summary | |
---|---|
protected | KColorDialog(Class dummy) |
KColorDialog(QWidget parent, String name, boolean modal)
Constructs a color selection dialog. | |
KColorDialog(QWidget parent, String name) | |
KColorDialog(QWidget parent) | |
KColorDialog() |
Method Summary | |
---|---|
String | className() |
QColor | color()
Returns the currently selected color. |
QColor | defaultColor() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
boolean | eventFilter(QObject arg1, QEvent ev) |
protected void | finalize() Deletes the wrapped C++ instance |
static int | getColor(QColor theColor, QWidget parent)
Creates a modal color dialog, let the user choose a
color, and returns when the dialog is closed.
|
static int | getColor(QColor theColor) |
static int | getColor(QColor theColor, QColor defaultColor, QWidget parent)
Creates a modal color dialog, lets the user choose a
color, and returns when the dialog is closed.
|
static int | getColor(QColor theColor, QColor defaultColor) |
static QColor | grabColor(QPoint p)
Gets the color from the pixel at point p on the screen. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
protected void | keyPressEvent(QKeyEvent arg1) |
QMetaObject | metaObject() |
protected void | mouseReleaseEvent(QMouseEvent arg1) |
void | setColor(QColor col)
Preselects a color. |
void | setDefaultColor(QColor defaultCol)
Call this to make the dialog show a "Default Color" checkbox.
|
UNKNOWN: Constructs a color selection dialog.
UNKNOWN: Returns the currently selected color.
Returns: the value passed to setDefaultColor
UNKNOWN:
theColor.
Returns: QDialog.result().
UNKNOWN: Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed.
theColor.
This version takes a defaultColor
argument, which sets the color
selected by the "default color" checkbox. When this checkbox is checked,
the invalid color (QColor()) is returned into theColor.
Returns: QDialog.result().
UNKNOWN: Creates a modal color dialog, lets the user choose a color, and returns when the dialog is closed.
UNKNOWN: Gets the color from the pixel at point p on the screen.
UNKNOWN: Preselects a color.
UNKNOWN: Call this to make the dialog show a "Default Color" checkbox.