summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/org/trinitydesktop/koala/KScanDialog.java
blob: 88683cccf8eea3bca175e1726635b022b45b71ed (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
//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;

import org.trinitydesktop.qt.Qt;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQImage;
import org.trinitydesktop.qt.TQWidget;

/**

 This is a base class for scanning dialogs. You can derive from this class
 and implement your own dialog. An implementation is available in
 tdegraphics/libkscan.
 Application developers that wish to add scanning support to their program
 can use the static method <code>KScanDialog</code>.getScanDialog() to get an instance
 of the user's preferred scanning dialog.
 Typical usage looks like this (e.g. in a slotShowScanDialog() method):
 <pre>
 if ( !m_scanDialog ) {
     m_scanDialog = KScanDialog.getScanDialog( this, "scandialog" );
     if ( !m_scanDialog ) // no scanning support installed?
         return;
     connect( m_scanDialog, TQ_SIGNAL("finalImage( TQImage, int )"),
              TQ_SLOT("slotScanned( TQImage, int )"));
 }
 if ( m_scanDialog.setup() ) // only if scanner configured/available
     m_scanDialog.show();
 </pre>
 This will create and show a non-modal scanning dialog. Connect to more
 signals if you like.
 If you implement an own scan-dialog, you also have to implement a
 KScanDialogFactory.
 See {@link KScanDialogSignals} for signals emitted by KScanDialog
		@author Carsten Pfeiffer <pfeiffer@kde.org>

		@short A baseclass and accessor for Scanning Dialogs.

*/
public class KScanDialog extends KDialogBase  {
	protected KScanDialog(Class dummy){super((Class) null);}
	public native TQMetaObject metaObject();
	public native String className();
	/**
		 Reimplement this if you need to set up some things, before showing the
		 dialog, e.g. to ask the user for the scanner device to use. If you
		 return false (e.g. there is no device available or the user aborted
		 device selection), the dialog will not be shown.
				@return true by default.

		@short    Reimplement this if you need to set up some things, before showing the  dialog, e.
	*/
	public native boolean setup();
	/**
		 Creates the user's preferred scanning dialog and returns it,
		 or null if no scan-support
		 is available. Pass a suitable <code>parent</code> widget, if you like. If you
		 don't you have to 'delete' the returned pointer yourself.
			@param parent the TQWidget's parent, or 0
			@param name the name of the TQObject, can be 0
			@param modal if true the dialog is model
				@return the KScanDialog, or 0 if the function failed

		@short    Creates the user's preferred scanning dialog and returns it,  or 0L if no scan-support  is available.
	*/
	public static native KScanDialog getScanDialog(TQWidget parent, String name, boolean modal);
	public static native KScanDialog getScanDialog(TQWidget parent, String name);
	public static native KScanDialog getScanDialog(TQWidget parent);
	public static native KScanDialog getScanDialog();
	/**
		 Constructs the scan dialog. If you implement an own dialog, you can
		 customize it with the usual KDialogBase flags.
			@param dialogFace the KDialogBase.DialogType
			@param buttonMask a ORed mask of all buttons (see
		 KDialogBase.ButtonCode)
			@param parent the TQWidget's parent, or 0
			@param name the name of the TQObject, can be 0
			@param modal if true the dialog is model
				@short    Constructs the scan dialog.
		@see KDialogBase
	*/
	public KScanDialog(int dialogFace, int buttonMask, TQWidget parent, String name, boolean modal) {
		super((Class) null);
		newKScanDialog(dialogFace,buttonMask,parent,name,modal);
	}
	private native void newKScanDialog(int dialogFace, int buttonMask, TQWidget parent, String name, boolean modal);
	public KScanDialog(int dialogFace, int buttonMask, TQWidget parent, String name) {
		super((Class) null);
		newKScanDialog(dialogFace,buttonMask,parent,name);
	}
	private native void newKScanDialog(int dialogFace, int buttonMask, TQWidget parent, String name);
	public KScanDialog(int dialogFace, int buttonMask, TQWidget parent) {
		super((Class) null);
		newKScanDialog(dialogFace,buttonMask,parent);
	}
	private native void newKScanDialog(int dialogFace, int buttonMask, TQWidget parent);
	public KScanDialog(int dialogFace, int buttonMask) {
		super((Class) null);
		newKScanDialog(dialogFace,buttonMask);
	}
	private native void newKScanDialog(int dialogFace, int buttonMask);
	public KScanDialog(int dialogFace) {
		super((Class) null);
		newKScanDialog(dialogFace);
	}
	private native void newKScanDialog(int dialogFace);
	public KScanDialog() {
		super((Class) null);
		newKScanDialog();
	}
	private native void newKScanDialog();
	/**
		 Returns the current id for an image. You can use that in your subclass
		 for the signals. The id is used in the signals to let people know
		 which preview and which text-recognition belongs to which scan.
				@return the current id for the image

		@short    Returns the current id for an image.
		@see #nextId
		@see #finalImage
		@see #preview
		@see #textRecognized
	*/
	protected native int id();
	/**
		 Returns the id for the next image. You can use that in your subclass
		 for the signals.
			     		@return the id for the next image

		@short    Returns the id for the next image.
		@see #id
		@see #finalImage
		@see #preview
		@see #textRecognized
	*/
	protected native int nextId();
	/** 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();
}