summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KColorDialog.java
blob: 32a95471fa1f6595c57a879c16a97a3f1cbfc310 (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
//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;

/**

 <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>
 	TQColor 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 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 <code>theColor.</code>
				@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 <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 (TQColor()) is returned into <code>theColor.</code>
				@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();
}