# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kscan.h

    00001 /* This file is part of the KDE libraries
    00002     Copyright (C) 2001 Carsten Pfeiffer <pfeiffer@kde.org>
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Library General Public
    00006     License as published by the Free Software Foundation; either
    00007     version 2 of the License, or (at your option) any later version.
    00008
    00009     This library is distributed in the hope that it will be useful,
    00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012     Library General Public License for more details.
    00013
    00014     You should have received a copy of the GNU Library General Public License
    00015     along with this library; see the file COPYING.LIB.  If not, write to
    00016     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017     Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef KSCAN_H
    00021 #define KSCAN_H
    00022
    00023 #include <kdialogbase.h>
    00024 #include <kinstance.h>
    00025 #include <klibloader.h>
    00026
    00027 class QImage;
    00028
    00063 class KIO_EXPORT KScanDialog : public KDialogBase
    00064 {
    00065     Q_OBJECT
    00066
    00067 public:
    00078     static KScanDialog * getScanDialog( QWidget *parent=0L,
    00079                     const char *name=0, bool modal=false );
    00083     ~KScanDialog();
    00084
    00093     virtual bool setup();
    00094
    00095 protected:
    00108     KScanDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
    00109          QWidget *parent=0L, const char *name=0, bool modal=false );
    00110
    00122     int id() const { return m_currentId; }
    00123
    00135     int nextId() { return ++m_currentId; }
    00136
    00137 signals:
    00143     void preview( const QImage &img, int id );
    00144
    00154     void finalImage( const QImage &img, int id );
    00155
    00164     void textRecognized( const QString &text, int id );
    00165
    00166 private:
    00167     int m_currentId;
    00168
    00169 protected:
    00170     virtual void virtual_hook( int id, void* data );
    00171 private:
    00172     class KScanDialogPrivate;
    00173     KScanDialogPrivate *d;
    00174 };
    00175
    00176
    00182 class KIO_EXPORT KScanDialogFactory : public KLibFactory
    00183 {
    00184 public:
    00185     virtual ~KScanDialogFactory();
    00186
    00194     virtual KScanDialog * createDialog( QWidget *parent=0, const char *name=0,
    00195                     bool modal=false ) = 0;
    00196
    00197 protected:
    00203     KScanDialogFactory( QObject *parent=0, const char *name=0 );
    00204
    00205     virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
    00206                                    const char* classname = "QObject",
    00207                                    const QStringList &args = QStringList() );
    00208
    00209
    00214     void setName( const QCString& instanceName ) {
    00215     delete m_instance;
    00216     m_instance = new KInstance( instanceName );
    00217     }
    00218
    00223     KInstance *instance() const { return m_instance; }
    00224
    00225 private:
    00226     KInstance *m_instance;
    00227 protected:
    00228     virtual void virtual_hook( int id, void* data );
    00229 private:
    00230     class KScanDialogFactoryPrivate* d;
    00231 };
    00232
    00236 class KIO_EXPORT KOCRDialog : public KDialogBase
    00237 {
    00238     Q_OBJECT
    00239
    00240 public:
    00251     static KOCRDialog * getOCRDialog( QWidget *parent=0L,
    00252                     const char *name=0, bool modal=false );
    00253     ~KOCRDialog();
    00254
    00255 protected:
    00267     KOCRDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
    00268          QWidget *parent=0L, const char *name=0, bool modal=false );
    00269
    00279     int id() const { return m_currentId; }
    00280
    00289     int nextId() { return ++m_currentId; }
    00290
    00291 signals:
    00300     void textRecognized( const QString &text, int id );
    00301
    00302 private:
    00303     int m_currentId;
    00304
    00305 protected:
    00306     virtual void virtual_hook( int id, void* data );
    00307 private:
    00308     class KOCRDialogPrivate;
    00309     KOCRDialogPrivate *d;
    00310 };
    00311
    00312
    00318 class KIO_EXPORT KOCRDialogFactory : public KLibFactory
    00319 {
    00320 public:
    00321     virtual ~KOCRDialogFactory();
    00322
    00330     virtual KOCRDialog * createDialog( QWidget *parent=0, const char *name=0,
    00331                     bool modal=false ) = 0;
    00332
    00333 protected:
    00339     KOCRDialogFactory( QObject *parent=0, const char *name=0 );
    00340
    00341     virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
    00342                                    const char* classname = "QObject",
    00343                                    const QStringList &args = QStringList() );
    00344
    00345
    00350     void setName( const QCString& instanceName ) {
    00351     delete m_instance;
    00352     m_instance = new KInstance( instanceName );
    00353     }
    00354
    00359     KInstance *instance() const { return m_instance; }
    00360
    00361 private:
    00362     KInstance *m_instance;
    00363 protected:
    00364     virtual void virtual_hook( int id, void* data );
    00365 private:
    00366     class KOCRDialogFactory* d;
    00367 };
    00368
    00369
    00370 #endif // KSCAN_H

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:24:03 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003