Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 6282078ae76a671f49c6af38c67b1a07 > files > 1847

kdelibs-devel-2.2.2-49.2mdk.i586.rpm

<HTML>
<HEAD>
<TITLE>class KScanDialog</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class KScanDialog</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">A baseclass and accessor for Scanning Dialogs. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="kscan_h.html">kscan.h</A>&gt;</code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="../kdeui/KDialogBase.html">KDialogBase</A> <small>(kdeui)</small> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-KScanDialog.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref2">~KScanDialog</A></b> () 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref3">setup</A></b> () 
</LI>
</ul><h4>Signals</h4><ul><LI>void &nbsp;<b><A HREF="#ref7">preview</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>&, int id ) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref8">finalImage</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>&, int id ) 
</LI>
<LI>void &nbsp;<b><A HREF="#ref9">textRecognized</A></b> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>&, int id ) 
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static  <A HREF="KScanDialog.html">KScanDialog</A> * &nbsp;<b><A HREF="#ref1">getScanDialog</A></b> ( <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0L,
					const char *name=0, bool modal=false ) 
</LI>
</ul><h4>Protected Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref4">KScanDialog</A></b> ( int dialogFace=Tabbed, int buttonMask = Close|Help,
		 <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0L, const char *name=0, bool modal=false ) 
</LI>
<LI>int &nbsp;<b><A HREF="#ref5">id</A></b> ()  const
</LI>
<LI>int &nbsp;<b><A HREF="#ref6">nextId</A></b> () 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 This is a base class for scanning dialogs. You can derive from this class
 and implement your own dialog. An implementation is available in
 kdegraphics/libkscan.
</p>
<p> Application developers that wish to add scanning support to their program
 can use the static method <code>KScanDialog::getScanDialog</code>() to get an instance
 of the user's preferred scanning dialog.
</p>
<p> Typical usage looks like this (e.g. in a slotShowScanDialog() method):
</p>
<p></p><table border="0" width="100%">
<tr>
<td bgcolor="#BEEAE0">
<pre>

 if ( !m_scanDialog ) {
     m_scanDialog = KScanDialog::getScanDialog( this, "scandialog" );
     if ( !m_scanDialog ) // no scanning support installed?
         return;

     connect( m_scanDialog, SIGNAL( <A HREF="KScanDialog.html#finalImage">finalImage</A>( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>&, int )),
              SLOT( slotScanned( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>&, int ) ));
 }

 if ( m_scanDialog-><A HREF="KScanDialog.html#setup">setup</A>() ) // only if scanner configured/available
     m_scanDialog->show();

</pre>
</td></tr>

</table> <p>
</p>
<p> This will create and show a non-modal scanning dialog. Connect to more
 signals if you like.
</p>
<p> If you implement an own scan-dialog, you also have to implement a
 KScanDialogFactory.
</p>
<p></p>
<A NAME="getScanDialog"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="KScanDialog.html">KScanDialog</A> * &nbsp;<strong>getScanDialog</strong> ( <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0L,
					const char *name=0, bool modal=false )
<br></td><td align="right"><h3><strong>getScanDialog</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
</p>
<p><b>Returns</b>: the user's preferred scanning dialog, or 0L 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.
     </p>
<A NAME="~KScanDialog"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>~KScanDialog</strong> ()
<br></td><td align="right"><h3><strong>~KScanDialog</strong></h3></td></tr></table><p></p><A NAME="setup"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>setup</strong> ()
<br></td><td align="right"><h3><strong>setup</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 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.
</p>
<p> Returns true by default.
     </p>
<A NAME="KScanDialog"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>KScanDialog</strong> ( int dialogFace=Tabbed, int buttonMask = Close|Help,
		 <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0L, const char *name=0, bool modal=false )
<br></td><td align="right"><h3><strong>KScanDialog</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
 Constructs the scan dialog. If you implement an own dialog, you can
 customize it with the usual <A HREF="../kdeui/KDialogBase.html">KDialogBase</A> flags.
</p>
<p></p>
<p><b>See also</b>: <A HREF="../kdeui/KDialogBase.html">KDialogBase</A></p>
<A NAME="id"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>id</strong> ()
<br></td><td align="right"><h3><strong>id</strong></h3></td></tr></table><p> <small>[protected const]</small></p><p>
</p>
<p></p>
<p><b>Returns</b>: 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.
</p>
<p><b>See also</b>: <A HREF="KScanDialog.html#nextId">nextId</A>, <A HREF="KScanDialog.html#finalImage">finalImage</A>, <A HREF="KScanDialog.html#preview">preview</A>, <A HREF="KScanDialog.html#textRecognized">textRecognized</A></p>
<A NAME="nextId"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int &nbsp;<strong>nextId</strong> ()
<br></td><td align="right"><h3><strong>nextId</strong></h3></td></tr></table><p> <small>[protected]</small></p><p>
</p>
<p></p>
<p>     </p>
<p><b>Returns</b>: the id for the next image. You can use that in your subclass
 for the signals.
</p>
<p><b>See also</b>: <A HREF="KScanDialog.html#id">id</A>, <A HREF="KScanDialog.html#finalImage">finalImage</A>, <A HREF="KScanDialog.html#preview">preview</A>, <A HREF="KScanDialog.html#textRecognized">textRecognized</A></p>
<A NAME="preview"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>preview</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>&, int id )
<br></td><td align="right"><h3><strong>preview</strong></h3></td></tr></table><p> <small>[signal]</small></p><p>
 Informs you that an image has been previewed.
     </p>
<A NAME="finalImage"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>finalImage</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qimage.html">QImage</A>&, int id )
<br></td><td align="right"><h3><strong>finalImage</strong></h3></td></tr></table><p> <small>[signal]</small></p><p>
 Informs you that an image has scanned. <code>id</code> is the same as in the
 <code>preview</code>() signal, if this image had been previewed before.
</p>
<p> Note, that those id's may not be properly implemented in the current
 libkscan.
     </p>
<A NAME="textRecognized"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>textRecognized</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A>&, int id )
<br></td><td align="right"><h3><strong>textRecognized</strong></h3></td></tr></table><p> <small>[signal]</small></p><p>
 Informs you that the image with the id <code>id</code> has been run through
 text-recognition. The text is in the QString parameter. In the future,
 a compound document, using rich text will be used instead.
     </p>
<HR><UL><LI><i>Author</i>: Carsten Pfeiffer <pfeiffer@kde.org>
 </LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:09:14 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>