KDELibs4Support

kscan.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001 Carsten Pfeiffer <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KSCAN_H
21 #define KSCAN_H
22 
23 #include <kdelibs4support_export.h>
24 #include <kpagedialog.h>
25 #include <QDialogButtonBox>
26 
27 class QByteArray;
28 class QImage;
29 
62 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KScanDialog : public KPageDialog
63 {
64  Q_OBJECT
65 
66 public:
75  static KScanDialog *getScanDialog(QWidget *parent = nullptr);
79  ~KScanDialog();
80 
89  virtual bool setup();
90 
91 protected:
102  KDELIBS4SUPPORT_DEPRECATED explicit KScanDialog(int dialogFace = Tabbed,
104  QWidget *parent = nullptr);
105 
117  int id() const;
118 
130  int nextId();
131 
132 Q_SIGNALS:
138  void preview(const QImage &img, int id);
139 
149  void finalImage(const QImage &img, int id);
150 
159  void textRecognized(const QString &text, int id);
160 
161 private:
162  class KScanDialogPrivate;
163  KScanDialogPrivate *const d;
164 };
165 
169 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KOCRDialog : public KPageDialog
170 {
171  Q_OBJECT
172 
173 public:
182  static KOCRDialog *getOCRDialog(QWidget *parent = nullptr);
183  ~KOCRDialog();
184 
185 protected:
196  KDELIBS4SUPPORT_DEPRECATED explicit KOCRDialog(int dialogFace = Tabbed, int buttonMask = QDialogButtonBox::Close | QDialogButtonBox::Help,
197  QWidget *parent = nullptr, bool modal = false);
198 
208  int id() const;
209 
218  int nextId();
219 
220 Q_SIGNALS:
229  void textRecognized(const QString &text, int id);
230 
231 private:
232  class KOCRDialogPrivate;
233  KOCRDialogPrivate *const d;
234 };
235 
236 #endif // KSCAN_H
Base class for OCR Dialogs.
Definition: kscan.h:169
This is a base class for scanning dialogs.
Definition: kscan.h:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:58:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.