• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • kio
  • kio
kscan.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001 Carsten Pfeiffer <pfeiffer@kde.org>
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 <kdialogbase.h>
24 #include <kinstance.h>
25 #include <klibloader.h>
26 
27 class TQImage;
28 
63 class KIO_EXPORT KScanDialog : public KDialogBase
64 {
65  Q_OBJECT
66 
67 public:
78  static KScanDialog * getScanDialog( TQWidget *parent=0L,
79  const char *name=0, bool modal=false );
83  ~KScanDialog();
84 
93  virtual bool setup();
94 
95 protected:
108  KScanDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
109  TQWidget *parent=0L, const char *name=0, bool modal=false );
110 
122  int id() const { return m_currentId; }
123 
135  int nextId() { return ++m_currentId; }
136 
137 signals:
143  void preview( const TQImage &img, int id );
144 
154  void finalImage( const TQImage &img, int id );
155 
164  void textRecognized( const TQString &text, int id );
165 
166 private:
167  int m_currentId;
168 
169 protected:
170  virtual void virtual_hook( int id, void* data );
171 private:
172  class KScanDialogPrivate;
173  KScanDialogPrivate *d;
174 };
175 
176 
182 class KIO_EXPORT KScanDialogFactory : public KLibFactory
183 {
184 public:
185  virtual ~KScanDialogFactory();
186 
194  virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0,
195  bool modal=false ) = 0;
196 
197 protected:
203  KScanDialogFactory( TQObject *parent=0, const char *name=0 );
204 
205  virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
206  const char* classname = TQOBJECT_OBJECT_NAME_STRING,
207  const TQStringList &args = TQStringList() );
208 
209 
214  void setName( const TQCString& instanceName ) {
215  delete m_instance;
216  m_instance = new KInstance( instanceName );
217  }
218 
223  KInstance *instance() const { return m_instance; }
224 
225 private:
226  KInstance *m_instance;
227 protected:
228  virtual void virtual_hook( int id, void* data );
229 private:
230  class KScanDialogFactoryPrivate* d;
231 };
232 
236 class KIO_EXPORT KOCRDialog : public KDialogBase
237 {
238  Q_OBJECT
239 
240 public:
251  static KOCRDialog * getOCRDialog( TQWidget *parent=0L,
252  const char *name=0, bool modal=false );
253  ~KOCRDialog();
254 
255 protected:
267  KOCRDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
268  TQWidget *parent=0L, const char *name=0, bool modal=false );
269 
279  int id() const { return m_currentId; }
280 
289  int nextId() { return ++m_currentId; }
290 
291 signals:
300  void textRecognized( const TQString &text, int id );
301 
302 private:
303  int m_currentId;
304 
305 protected:
306  virtual void virtual_hook( int id, void* data );
307 private:
308  class KOCRDialogPrivate;
309  KOCRDialogPrivate *d;
310 };
311 
312 
318 class KIO_EXPORT KOCRDialogFactory : public KLibFactory
319 {
320 public:
321  virtual ~KOCRDialogFactory();
322 
330  virtual KOCRDialog * createDialog( TQWidget *parent=0, const char *name=0,
331  bool modal=false ) = 0;
332 
333 protected:
339  KOCRDialogFactory( TQObject *parent=0, const char *name=0 );
340 
341  virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
342  const char* className = TQOBJECT_OBJECT_NAME_STRING,
343  const TQStringList &args = TQStringList() );
344 
345 
350  void setName( const TQCString& instanceName ) {
351  delete m_instance;
352  m_instance = new KInstance( instanceName );
353  }
354 
359  KInstance *instance() const { return m_instance; }
360 
361 private:
362  KInstance *m_instance;
363 protected:
364  virtual void virtual_hook( int id, void* data );
365 private:
366  class KOCRDialogFactory* d;
367 };
368 
369 
370 #endif // KSCAN_H
KScanDialog::id
int id() const
Returns the current id for an image.
Definition: kscan.h:122
KOCRDialog::id
int id() const
Returns the current id for an image.
Definition: kscan.h:279
KScanDialogFactory::setName
void setName(const TQCString &instanceName)
Creates a new instance with the given name.
Definition: kscan.h:214
KOCRDialogFactory
A factory for creating a KOCRDialog.
Definition: kscan.h:318
KOCRDialog
Base class for OCR Dialogs.
Definition: kscan.h:236
KScanDialog
This is a base class for scanning dialogs.
Definition: kscan.h:63
KOCRDialogFactory::setName
void setName(const TQCString &instanceName)
Creates a new instance with the given name.
Definition: kscan.h:350
KOCRDialogFactory::instance
KInstance * instance() const
Returns the instance.
Definition: kscan.h:359
KScanDialogFactory
A factory for creating a KScanDialog.
Definition: kscan.h:182
KScanDialog::nextId
int nextId()
Returns the id for the next image.
Definition: kscan.h:135
KScanDialogFactory::instance
KInstance * instance() const
Returns the instance.
Definition: kscan.h:223
KOCRDialog::nextId
int nextId()
Returns the id for the next image.
Definition: kscan.h:289

kio/kio

Skip menu "kio/kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |