You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
162 lines
6.1 KiB
162 lines
6.1 KiB
//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.QRect;
|
|
import org.kde.qt.QMetaObject;
|
|
import org.kde.qt.QtSupport;
|
|
import org.kde.qt.QPaintEvent;
|
|
import org.kde.qt.QDragEnterEvent;
|
|
import org.kde.qt.QSize;
|
|
import org.kde.qt.QMouseEvent;
|
|
import org.kde.qt.QDropEvent;
|
|
import org.kde.qt.QWidget;
|
|
import org.kde.qt.QWidget;
|
|
|
|
/**
|
|
|
|
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 QWidget {
|
|
protected KDualColorButton(Class dummy){super((Class) null);}
|
|
public static final int Foreground = 0;
|
|
public static final int Background = 1;
|
|
|
|
public native QMetaObject 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(QWidget parent, String name, QWidget dialogParent) {
|
|
super((Class) null);
|
|
newKDualColorButton(parent,name,dialogParent);
|
|
}
|
|
private native void newKDualColorButton(QWidget parent, String name, QWidget dialogParent);
|
|
public KDualColorButton(QWidget parent, String name) {
|
|
super((Class) null);
|
|
newKDualColorButton(parent,name);
|
|
}
|
|
private native void newKDualColorButton(QWidget parent, String name);
|
|
public KDualColorButton(QWidget parent) {
|
|
super((Class) null);
|
|
newKDualColorButton(parent);
|
|
}
|
|
private native void newKDualColorButton(QWidget 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(QColor fgColor, QColor bgColor, QWidget parent, String name, QWidget dialogParent) {
|
|
super((Class) null);
|
|
newKDualColorButton(fgColor,bgColor,parent,name,dialogParent);
|
|
}
|
|
private native void newKDualColorButton(QColor fgColor, QColor bgColor, QWidget parent, String name, QWidget dialogParent);
|
|
public KDualColorButton(QColor fgColor, QColor bgColor, QWidget parent, String name) {
|
|
super((Class) null);
|
|
newKDualColorButton(fgColor,bgColor,parent,name);
|
|
}
|
|
private native void newKDualColorButton(QColor fgColor, QColor bgColor, QWidget parent, String name);
|
|
public KDualColorButton(QColor fgColor, QColor bgColor, QWidget parent) {
|
|
super((Class) null);
|
|
newKDualColorButton(fgColor,bgColor,parent);
|
|
}
|
|
private native void newKDualColorButton(QColor fgColor, QColor bgColor, QWidget parent);
|
|
public KDualColorButton(QColor fgColor, QColor bgColor) {
|
|
super((Class) null);
|
|
newKDualColorButton(fgColor,bgColor);
|
|
}
|
|
private native void newKDualColorButton(QColor fgColor, QColor bgColor);
|
|
/**
|
|
Returns the current foreground color.
|
|
@short Returns the current foreground color.
|
|
*/
|
|
public native QColor foreground();
|
|
/**
|
|
Returns the current background color.
|
|
@short Returns the current background color.
|
|
*/
|
|
public native QColor 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 QColor 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 QSize sizeHint();
|
|
/**
|
|
Sets the foreground color.
|
|
@short Sets the foreground color.
|
|
*/
|
|
public native void setForeground(QColor c);
|
|
/**
|
|
Sets the background color.
|
|
@short Sets the background color.
|
|
*/
|
|
public native void setBackground(QColor 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(QColor 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(QRect fgRect, QRect bgRect);
|
|
protected native void paintEvent(QPaintEvent ev);
|
|
protected native void mousePressEvent(QMouseEvent ev);
|
|
protected native void mouseMoveEvent(QMouseEvent ev);
|
|
protected native void mouseReleaseEvent(QMouseEvent ev);
|
|
protected native void dragEnterEvent(QDragEnterEvent ev);
|
|
protected native void dropEvent(QDropEvent 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();
|
|
}
|