diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KColorDialog.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KColorDialog.java | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KColorDialog.java b/kdejava/koala/org/kde/koala/KColorDialog.java new file mode 100644 index 00000000..3bcda11c --- /dev/null +++ b/kdejava/koala/org/kde/koala/KColorDialog.java @@ -0,0 +1,145 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QColor; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import org.kde.qt.QObject; +import org.kde.qt.QPoint; +import org.kde.qt.QKeyEvent; +import org.kde.qt.QMouseEvent; +import org.kde.qt.QEvent; +import org.kde.qt.QWidget; + +/** + + <li><b>Features:</b></li> + + <li> + Color selection from a wide range of palettes. + </li> + + <li> + Color selection from a palette of H vs S and V selectors. + </li> + + <li> + Direct input of HSV or RGB values. + </li> + + <li> + Saving of custom colors + </li> + 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: + <pre> + QColor myColor; + int result = KColorDialog.getColor( myColor ); + if ( result == KColorDialog.Accepted ) + ... + </pre> + 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 QMetaObject metaObject(); + public native String className(); + /** + Constructs a color selection dialog. + @short Constructs a color selection dialog. + */ + public KColorDialog(QWidget parent, String name, boolean modal) { + super((Class) null); + newKColorDialog(parent,name,modal); + } + private native void newKColorDialog(QWidget parent, String name, boolean modal); + public KColorDialog(QWidget parent, String name) { + super((Class) null); + newKColorDialog(parent,name); + } + private native void newKColorDialog(QWidget parent, String name); + public KColorDialog(QWidget parent) { + super((Class) null); + newKColorDialog(parent); + } + private native void newKColorDialog(QWidget parent); + public KColorDialog() { + super((Class) null); + newKColorDialog(); + } + private native void newKColorDialog(); + /** + Returns the currently selected color. + @short Returns the currently selected color. + */ + public native QColor color(); + /** + Call this to make the dialog show a "Default Color" checkbox. + If this checkbox is selected, the dialog will return an "invalid" color (QColor()). + 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(QColor defaultCol); + /** + @return the value passed to setDefaultColor + + @short + */ + public native QColor defaultColor(); + /** + Preselects a color. + @short Preselects a color. + */ + public native void setColor(QColor 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 <code>theColor.</code> + @return QDialog.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(QColor theColor, QWidget parent); + public static native int getColor(QColor 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 <code>theColor.</code> + This version takes a <code>defaultColor</code> argument, which sets the color + selected by the "default color" checkbox. When this checkbox is checked, + the invalid color (QColor()) is returned into <code>theColor.</code> + @return QDialog.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(QColor theColor, QColor defaultColor, QWidget parent); + public static native int getColor(QColor theColor, QColor 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 QColor grabColor(QPoint p); + protected native void mouseReleaseEvent(QMouseEvent arg1); + protected native void keyPressEvent(QKeyEvent arg1); + public native boolean eventFilter(QObject arg1, QEvent 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(); +} |