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

tdeio/tdeio

  • tdeio
  • tdeio
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 TDEIO_EXPORT KScanDialog : public KDialogBase
64 {
65  TQ_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 TDEIO_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",
207  const TQStringList &args = TQStringList() );
208 
209 
214  void setName( const TQCString& instanceName ) {
215  delete m_instance;
216  m_instance = new TDEInstance( instanceName );
217  }
218 
223  TDEInstance *instance() const { return m_instance; }
224 
225 private:
226  TDEInstance *m_instance;
227 protected:
228  virtual void virtual_hook( int id, void* data );
229 private:
230  class KScanDialogFactoryPrivate* d;
231 };
232 
236 class TDEIO_EXPORT KOCRDialog : public KDialogBase
237 {
238  TQ_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 TDEIO_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",
343  const TQStringList &args = TQStringList() );
344 
345 
350  void setName( const TQCString& instanceName ) {
351  delete m_instance;
352  m_instance = new TDEInstance( instanceName );
353  }
354 
359  TDEInstance *instance() const { return m_instance; }
360 
361 private:
362  TDEInstance *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
KOCRDialogFactory
A factory for creating a KOCRDialog.
Definition: kscan.h:319
KOCRDialogFactory::createDialog
virtual KOCRDialog * createDialog(TQWidget *parent=0, const char *name=0, bool modal=false)=0
Your library should reimplement this method to return your KOCRDialog derived dialog.
KOCRDialogFactory::instance
TDEInstance * instance() const
Returns the instance.
Definition: kscan.h:359
KOCRDialogFactory::setName
void setName(const TQCString &instanceName)
Creates a new instance with the given name.
Definition: kscan.h:350
KOCRDialog
Base class for OCR Dialogs.
Definition: kscan.h:237
KOCRDialog::id
int id() const
Returns the current id for an image.
Definition: kscan.h:279
KOCRDialog::nextId
int nextId()
Returns the id for the next image.
Definition: kscan.h:289
KOCRDialog::textRecognized
void textRecognized(const TQString &text, int id)
Informs you that the image with the id id has been run through text-recognition.
KScanDialogFactory
A factory for creating a KScanDialog.
Definition: kscan.h:183
KScanDialogFactory::createDialog
virtual KScanDialog * createDialog(TQWidget *parent=0, const char *name=0, bool modal=false)=0
Your library should reimplement this method to return your KScanDialog derived dialog.
KScanDialogFactory::setName
void setName(const TQCString &instanceName)
Creates a new instance with the given name.
Definition: kscan.h:214
KScanDialogFactory::instance
TDEInstance * instance() const
Returns the instance.
Definition: kscan.h:223
KScanDialog
This is a base class for scanning dialogs.
Definition: kscan.h:64
KScanDialog::finalImage
void finalImage(const TQImage &img, int id)
Informs you that an image has scanned.
KScanDialog::id
int id() const
Returns the current id for an image.
Definition: kscan.h:122
KScanDialog::textRecognized
void textRecognized(const TQString &text, int id)
Informs you that the image with the id id has been run through text-recognition.
KScanDialog::preview
void preview(const TQImage &img, int id)
Informs you that an image has been previewed.
KScanDialog::nextId
int nextId()
Returns the id for the next image.
Definition: kscan.h:135

tdeio/tdeio

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

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.