KIO
kscan.h
Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KSCAN_H 00021 #define KSCAN_H 00022 00023 #include <kio/kio_export.h> 00024 #include <kpagedialog.h> 00025 #include <kcomponentdata.h> // KDE5: remove include 00026 #include <kpluginfactory.h> // KDE5: remove include 00027 00028 class QByteArray; 00029 class QImage; 00030 00062 class KIO_EXPORT KScanDialog : public KPageDialog 00063 { 00064 Q_OBJECT 00065 00066 public: 00075 static KScanDialog * getScanDialog( QWidget *parent = 0 ); 00079 ~KScanDialog(); 00080 00089 virtual bool setup(); 00090 00091 protected: 00102 explicit KScanDialog( int dialogFace = Tabbed, 00103 int buttonMask = Close|Help, 00104 QWidget *parent = 0 ); 00105 00117 int id() const; 00118 00130 int nextId(); 00131 00132 Q_SIGNALS: 00138 void preview( const QImage &img, int id ); 00139 00149 void finalImage( const QImage &img, int id ); 00150 00159 void textRecognized( const QString &text, int id ); 00160 00161 private: 00162 class KScanDialogPrivate; 00163 KScanDialogPrivate *const d; 00164 }; 00165 00166 00170 class KIO_EXPORT KOCRDialog : public KPageDialog 00171 { 00172 Q_OBJECT 00173 00174 public: 00183 static KOCRDialog * getOCRDialog( QWidget *parent = 0 ); 00184 ~KOCRDialog(); 00185 00186 protected: 00197 explicit KOCRDialog( int dialogFace=Tabbed, int buttonMask = Close|Help, 00198 QWidget *parent=0L, bool modal=false ); 00199 00209 int id() const; 00210 00219 int nextId(); 00220 00221 Q_SIGNALS: 00230 void textRecognized( const QString &text, int id ); 00231 00232 private: 00233 class KOCRDialogPrivate; 00234 KOCRDialogPrivate * const d; 00235 }; 00236 00237 00238 #endif // KSCAN_H
KDE 4.6 API Reference