//Auto-generated by kalyptus. DO NOT EDIT. package org.kde.koala; import org.kde.qt.Qt; import org.kde.qt.TQColor; import org.kde.qt.TQMetaObject; import org.kde.qt.QtSupport; import org.kde.qt.TQObject; import org.kde.qt.TQPoint; import org.kde.qt.TQKeyEvent; import org.kde.qt.TQMouseEvent; import org.kde.qt.TQEvent; import org.kde.qt.TQWidget; /**
  • Features:
  • Color selection from a wide range of palettes.
  • Color selection from a palette of H vs S and V selectors.
  • Direct input of HSV or RGB values.
  • Saving of custom colors
  • In most cases, you will want to use the static method KColorDialog.getColor(). This pops up the dialog (with an initial selection provided by you), lets the user choose a color, and returns. Example:
     	TQColor 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 {@link KColorDialogSignals} for signals emitted by KColorDialog @short A color selection dialog. */ public class KColorDialog extends KDialogBase { protected KColorDialog(Class dummy){super((Class) null);} public native TQMetaObject metaObject(); public native String className(); /** Constructs a color selection dialog. @short Constructs a color selection dialog. */ public KColorDialog(TQWidget parent, String name, boolean modal) { super((Class) null); newKColorDialog(parent,name,modal); } private native void newKColorDialog(TQWidget parent, String name, boolean modal); public KColorDialog(TQWidget parent, String name) { super((Class) null); newKColorDialog(parent,name); } private native void newKColorDialog(TQWidget parent, String name); public KColorDialog(TQWidget parent) { super((Class) null); newKColorDialog(parent); } private native void newKColorDialog(TQWidget parent); public KColorDialog() { super((Class) null); newKColorDialog(); } private native void newKColorDialog(); /** Returns the currently selected color. @short Returns the currently selected color. */ public native TQColor color(); /** Call this to make the dialog show a "Default Color" checkbox. If this checkbox is selected, the dialog will return an "invalid" color (TQColor()). This can be used to mean "the default text color", for instance, the one with the KDE text color on screen, but black when printing. @short Call this to make the dialog show a "Default Color" checkbox. */ public native void setDefaultColor(TQColor defaultCol); /** @return the value passed to setDefaultColor @short */ public native TQColor defaultColor(); /** Preselects a color. @short Preselects a color. */ public native void setColor(TQColor col); /** Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed. The selected color is returned in the argument theColor. @return TQDialog.result(). @short Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed. */ public static native int getColor(TQColor theColor, TQWidget parent); public static native int getColor(TQColor theColor); /** Creates a modal color dialog, lets the user choose a color, and returns when the dialog is closed. The selected color is returned in the argument 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 (TQColor()) is returned into theColor. @return TQDialog.result(). @short Creates a modal color dialog, lets the user choose a color, and returns when the dialog is closed. */ public static native int getColor(TQColor theColor, TQColor defaultColor, TQWidget parent); public static native int getColor(TQColor theColor, TQColor defaultColor); /** Gets the color from the pixel at point p on the screen. @short Gets the color from the pixel at point p on the screen. */ public static native TQColor grabColor(TQPoint p); protected native void mouseReleaseEvent(TQMouseEvent arg1); protected native void keyPressEvent(TQKeyEvent arg1); public native boolean eventFilter(TQObject arg1, TQEvent ev); /** Deletes the wrapped C++ instance */ protected native void finalize() throws InternalError; /** Delete the wrapped C++ instance ahead of finalize() */ public native void dispose(); /** Has the wrapped C++ instance been deleted? */ public native boolean isDisposed(); }