diff options
Diffstat (limited to 'tdejava/koala/org/trinitydesktop/koala/KDualColorButton.java')
-rw-r--r-- | tdejava/koala/org/trinitydesktop/koala/KDualColorButton.java | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/tdejava/koala/org/trinitydesktop/koala/KDualColorButton.java b/tdejava/koala/org/trinitydesktop/koala/KDualColorButton.java new file mode 100644 index 00000000..b38a5919 --- /dev/null +++ b/tdejava/koala/org/trinitydesktop/koala/KDualColorButton.java @@ -0,0 +1,161 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.trinitydesktop.koala; + +import org.trinitydesktop.qt.Qt; +import org.trinitydesktop.qt.TQColor; +import org.trinitydesktop.qt.TQRect; +import org.trinitydesktop.qt.TQMetaObject; +import org.trinitydesktop.qt.QtSupport; +import org.trinitydesktop.qt.TQPaintEvent; +import org.trinitydesktop.qt.TQDragEnterEvent; +import org.trinitydesktop.qt.TQSize; +import org.trinitydesktop.qt.TQMouseEvent; +import org.trinitydesktop.qt.TQDropEvent; +import org.trinitydesktop.qt.TQWidget; +import org.trinitydesktop.qt.TQWidget; + +/** + + KDualColorButton allows the user to select two cascaded colors (usually a + foreground and background color). Other features include drag and drop + from other KDE color widgets, a reset to black and white control, and a + swap colors control. + When the user clicks on the foreground or background rectangle the + rectangle is first sunken and the currentChanged() signal is emitted. + Further clicks will present a color dialog and emit either the fgChanged() + or bgChanged() if a new color is selected. + Note: With drag and drop when dropping a color the current selected color + will be set, while when dragging a color it will use whatever color + rectangle the mouse was pressed inside. + \image html kdualcolorbutton.png "KDE Dual Color Button" + See {@link KDualColorButtonSignals} for signals emitted by KDualColorButton + @author Daniel M. Duley <mosfet@kde.org> + + @short A widget for selecting two related colors. + +*/ +public class KDualColorButton extends TQWidget { + protected KDualColorButton(Class dummy){super((Class) null);} + public static final int Foreground = 0; + public static final int Background = 1; + + public native TQMetaObject metaObject(); + public native String className(); + /** + Constructs a new KDualColorButton using the default black and white + colors. + @short Constructs a new KDualColorButton using the default black and white colors. + */ + public KDualColorButton(TQWidget parent, String name, TQWidget dialogParent) { + super((Class) null); + newKDualColorButton(parent,name,dialogParent); + } + private native void newKDualColorButton(TQWidget parent, String name, TQWidget dialogParent); + public KDualColorButton(TQWidget parent, String name) { + super((Class) null); + newKDualColorButton(parent,name); + } + private native void newKDualColorButton(TQWidget parent, String name); + public KDualColorButton(TQWidget parent) { + super((Class) null); + newKDualColorButton(parent); + } + private native void newKDualColorButton(TQWidget parent); + public KDualColorButton() { + super((Class) null); + newKDualColorButton(); + } + private native void newKDualColorButton(); + /** + Constructs a new KDualColorButton with the supplied foreground and + background colors. + @short Constructs a new KDualColorButton with the supplied foreground and background colors. + */ + public KDualColorButton(TQColor fgColor, TQColor bgColor, TQWidget parent, String name, TQWidget dialogParent) { + super((Class) null); + newKDualColorButton(fgColor,bgColor,parent,name,dialogParent); + } + private native void newKDualColorButton(TQColor fgColor, TQColor bgColor, TQWidget parent, String name, TQWidget dialogParent); + public KDualColorButton(TQColor fgColor, TQColor bgColor, TQWidget parent, String name) { + super((Class) null); + newKDualColorButton(fgColor,bgColor,parent,name); + } + private native void newKDualColorButton(TQColor fgColor, TQColor bgColor, TQWidget parent, String name); + public KDualColorButton(TQColor fgColor, TQColor bgColor, TQWidget parent) { + super((Class) null); + newKDualColorButton(fgColor,bgColor,parent); + } + private native void newKDualColorButton(TQColor fgColor, TQColor bgColor, TQWidget parent); + public KDualColorButton(TQColor fgColor, TQColor bgColor) { + super((Class) null); + newKDualColorButton(fgColor,bgColor); + } + private native void newKDualColorButton(TQColor fgColor, TQColor bgColor); + /** + Returns the current foreground color. + @short Returns the current foreground color. + */ + public native TQColor foreground(); + /** + Returns the current background color. + @short Returns the current background color. + */ + public native TQColor background(); + /** + Returns the current color item selected by the user. + @short Returns the current color item selected by the user. + */ + public native int current(); + /** + Returns the color of the selected item. + @short Returns the color of the selected item. + */ + public native TQColor currentColor(); + /** + Returns the minimum size needed to display the widget and all its + controls. + @short Returns the minimum size needed to display the widget and all its controls. + */ + public native TQSize sizeHint(); + /** + Sets the foreground color. + @short Sets the foreground color. + */ + public native void setForeground(TQColor c); + /** + Sets the background color. + @short Sets the background color. + */ + public native void setBackground(TQColor c); + /** + Sets the current selected color item. + @short Sets the current selected color item. + */ + public native void setCurrent(int s); + /** + Sets the color of the selected item. + @short Sets the color of the selected item. + */ + public native void setCurrentColor(TQColor c); + /** + Sets the supplied rectangles to the proper size and position for the + current widget size. You can reimplement this to change the layout + of the widget. Restrictions are that the swap control will always + be at the top right, the reset control will always be at the bottom + left, and you must leave at least a 14x14 space in those corners. + @short Sets the supplied rectangles to the proper size and position for the current widget size. + */ + protected native void metrics(TQRect fgRect, TQRect bgRect); + protected native void paintEvent(TQPaintEvent ev); + protected native void mousePressEvent(TQMouseEvent ev); + protected native void mouseMoveEvent(TQMouseEvent ev); + protected native void mouseReleaseEvent(TQMouseEvent ev); + protected native void dragEnterEvent(TQDragEnterEvent ev); + protected native void dropEvent(TQDropEvent 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(); +} |