summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KDualColorButton.java
blob: 03474bf45faf551580b656946355451a39bdd655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
//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.TQRect;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQPaintEvent;
import org.kde.qt.TQDragEnterEvent;
import org.kde.qt.TQSize;
import org.kde.qt.TQMouseEvent;
import org.kde.qt.TQDropEvent;
import org.kde.qt.TQWidget;
import org.kde.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();
}