org.kde.koala
public class KScanDialog extends KDialogBase
KScanDialog.getScanDialog() to get an instance
of the user's preferred scanning dialog.
Typical usage looks like this (e.g. in a slotShowScanDialog() method):
if ( !m_scanDialog ) {
m_scanDialog = KScanDialog.getScanDialog( this, "scandialog" );
if ( !m_scanDialog ) // no scanning support installed?
return;
connect( m_scanDialog, SIGNAL("finalImage( QImage, int )"),
SLOT("slotScanned( QImage, int )"));
}
if ( m_scanDialog.setup() ) // only if scanner configured/available
m_scanDialog.show();
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 KScanDialogSignals for signals emitted by KScanDialog
UNKNOWN: A baseclass and accessor for Scanning Dialogs.
| Constructor Summary | |
|---|---|
| protected | KScanDialog(Class dummy) |
| KScanDialog(int dialogFace, int buttonMask, QWidget parent, String name, boolean modal)
Constructs the scan dialog. | |
| KScanDialog(int dialogFace, int buttonMask, QWidget parent, String name) | |
| KScanDialog(int dialogFace, int buttonMask, QWidget parent) | |
| KScanDialog(int dialogFace, int buttonMask) | |
| KScanDialog(int dialogFace) | |
| KScanDialog() | |
| Method Summary | |
|---|---|
| String | className() |
| void | dispose() Delete the wrapped C++ instance ahead of finalize() |
| protected void | finalize() Deletes the wrapped C++ instance |
| static KScanDialog | getScanDialog(QWidget parent, String name, boolean modal)
Creates the user's preferred scanning dialog and returns it,
or null if no scan-support
is available. |
| static KScanDialog | getScanDialog(QWidget parent, String name) |
| static KScanDialog | getScanDialog(QWidget parent) |
| static KScanDialog | getScanDialog() |
| protected int | id()
Returns the current id for an image. |
| boolean | isDisposed() Has the wrapped C++ instance been deleted? |
| QMetaObject | metaObject() |
| protected int | nextId()
Returns the id for the next image. |
| boolean | setup()
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. |
Parameters: dialogFace the KDialogBase.DialogType buttonMask a ORed mask of all buttons (see KDialogBase.ButtonCode) parent the QWidget's parent, or 0 name the name of the QObject, can be 0 modal if true the dialog is model
See Also: KDialogBase
UNKNOWN: Constructs the scan dialog.
parent widget, if you like. If you
don't you have to 'delete' the returned pointer yourself.Parameters: parent the QWidget's parent, or 0 name the name of the QObject, can be 0 modal if true the dialog is model
Returns: the KScanDialog, or 0 if the function failed
UNKNOWN: Creates the user's preferred scanning dialog and returns it, or 0L if no scan-support is available.
Returns: the current id for the image
See Also: KScanDialog KScanDialog KScanDialog KScanDialog
UNKNOWN: Returns the current id for an image.
Returns: the id for the next image
See Also: KScanDialog KScanDialog KScanDialog KScanDialog
UNKNOWN: Returns the id for the next image.
Returns: true by default.
UNKNOWN: Reimplement this if you need to set up some things, before showing the dialog, e.