| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | 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 KScanDialog : public KDialogBase
    00064 {
    00065     Q_OBJECT
    00066
    00067 public:
    00074     static KScanDialog * getScanDialog( QWidget *parent=0L,
    00075                                         const char *name=0, bool modal=false );
    00079     ~KScanDialog();
    00080
    00089     virtual bool setup();
    00090
    00091 protected:
    00098     KScanDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
    00099                  QWidget *parent=0L, const char *name=0, bool modal=false );
    00100
    00111     int id() const { return m_currentId; }
    00112
    00123     int nextId() { return ++m_currentId; }
    00124
    00125 signals:
    00129     void preview( const QImage&, int id );
    00130
    00138     void finalImage( const QImage&, int id );
    00139
    00145     void textRecognized( const QString&, int id );
    00146
    00147 private:
    00148     int m_currentId;
    00149
    00150 protected:
    00151     virtual void virtual_hook( int id, void* data );
    00152 private:
    00153     class KScanDialogPrivate;
    00154     KScanDialogPrivate *d;
    00155 };
    00156
    00157
    00163 class KScanDialogFactory : public KLibFactory
    00164 {
    00165 public:
    00166     virtual ~KScanDialogFactory();
    00167
    00172     virtual KScanDialog * createDialog( QWidget *parent=0, const char *name=0,
    00173                                         bool modal=false ) = 0;
    00174
    00175 protected:
    00176     KScanDialogFactory( QObject *parent=0, const char *name=0 );
    00177
    00178     virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
    00179                                    const char* classname = "QObject",
    00180                                    const QStringList &args = QStringList() );
    00181
    00182
    00183     void setName( const QCString& instanceName ) {
    00184         delete m_instance;
    00185         m_instance = new KInstance( instanceName );
    00186     }
    00187
    00188     KInstance *instance() const { return m_instance; }
    00189
    00190 private:
    00191     KInstance *m_instance;
    00192 protected:
    00193     virtual void virtual_hook( int id, void* data );
    00194 private:
    00195     class KScanDialogFactoryPrivate* d;
    00196 };
    00197
    00198 // baseclass for ocr-dialogs
    00199 class KOCRDialog : public KDialogBase
    00200 {
    00201     Q_OBJECT
    00202
    00203 public:
    00204     static KOCRDialog * getOCRDialog( QWidget *parent=0L,
    00205                                         const char *name=0, bool modal=false );
    00206     ~KOCRDialog();
    00207
    00208 protected:
    00209     KOCRDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
    00210                  QWidget *parent=0L, const char *name=0, bool modal=false );
    00211
    00212     int id() const { return m_currentId; }
    00213     int nextId() { return ++m_currentId; }
    00214
    00215 signals:
    00216     void textRecognized( const QString&, int id );
    00217
    00218 private:
    00219     int m_currentId;
    00220
    00221 protected:
    00222     virtual void virtual_hook( int id, void* data );
    00223 private:
    00224     class KOCRDialogPrivate;
    00225     KOCRDialogPrivate *d;
    00226 };
    00227
    00228
    00229 class KOCRDialogFactory : public KLibFactory
    00230 {
    00231 public:
    00232     virtual ~KOCRDialogFactory();
    00233
    00238     virtual KOCRDialog * createDialog( QWidget *parent=0, const char *name=0,
    00239                                         bool modal=false ) = 0;
    00240
    00241 protected:
    00242     KOCRDialogFactory( QObject *parent=0, const char *name=0 );
    00243
    00244     virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
    00245                                    const char* classname = "QObject",
    00246                                    const QStringList &args = QStringList() );
    00247
    00248
    00249     void setName( const QCString& instanceName ) {
    00250         delete m_instance;
    00251         m_instance = new KInstance( instanceName );
    00252     }
    00253
    00254     KInstance *instance() const { return m_instance; }
    00255
    00256 private:
    00257     KInstance *m_instance;
    00258 protected:
    00259     virtual void virtual_hook( int id, void* data );
    00260 private:
    00261     class KOCRDialogFactory* d;
    00262 };
    00263
    00264
    00265 #endif // KSCAN_H

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:14:17 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001