• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

kscan.cpp

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 
00021 #include "kscan.h"
00022 
00023 #include <QtCore/QFile>
00024 
00025 #include <klocale.h>
00026 #include <kservicetypetrader.h>
00027 
00028 class KScanDialog::KScanDialogPrivate
00029 {
00030 public:
00031     KScanDialogPrivate()
00032         : m_currentId( 1 )
00033     {}
00034     int m_currentId;
00035 };
00036 
00037 // static factory method
00038 KScanDialog * KScanDialog::getScanDialog( QWidget *parent )
00039 {
00040     return KServiceTypeTrader::createInstanceFromQuery<KScanDialog>( "KScan/KScanDialog", QString(), parent );
00041 }
00042 
00043 
00044 KScanDialog::KScanDialog( int dialogFace, int buttonMask,
00045               QWidget *parent )
00046     : KPageDialog( parent ),
00047       d( new KScanDialogPrivate )
00048 {
00049   setFaceType( (KPageDialog::FaceType)dialogFace );
00050   setCaption( i18n("Acquire Image") );
00051   setButtons( (KDialog::ButtonCodes)buttonMask );
00052   setDefaultButton( Close );
00053 }
00054 
00055 KScanDialog::~KScanDialog()
00056 {
00057     delete d;
00058 }
00059 
00060 int KScanDialog::id() const
00061 {
00062     return d->m_currentId;
00063 }
00064 
00065 int KScanDialog::nextId()
00066 {
00067     return ++d->m_currentId;
00068 }
00069 
00070 bool KScanDialog::setup()
00071 {
00072     return true;
00073 }
00074 
00076 
00077 class KOCRDialog::KOCRDialogPrivate
00078 {
00079 public:
00080     KOCRDialogPrivate()
00081         : m_currentId( 1 )
00082     {}
00083     int m_currentId;
00084 };
00085 
00086 // static factory method
00087 KOCRDialog * KOCRDialog::getOCRDialog( QWidget *parent )
00088 {
00089     return KServiceTypeTrader::createInstanceFromQuery<KOCRDialog>( "KScan/KOCRDialog", QString(), parent );
00090 }
00091 
00092 
00093 KOCRDialog::KOCRDialog( int dialogFace, int buttonMask,
00094               QWidget *parent, bool modal )
00095     : KPageDialog( parent ),
00096       d( new KOCRDialogPrivate )
00097 {
00098   setFaceType( (KPageDialog::FaceType)dialogFace );
00099   setCaption( i18n("OCR Image") );
00100   setButtons( (KDialog::ButtonCodes)buttonMask );
00101   setDefaultButton( Close );
00102   setModal( modal );
00103   showButtonSeparator( true );
00104 }
00105 
00106 KOCRDialog::~KOCRDialog()
00107 {
00108     delete d;
00109 }
00110 
00111 int KOCRDialog::id() const
00112 {
00113     return d->m_currentId;
00114 }
00115 
00116 int KOCRDialog::nextId()
00117 {
00118     return ++d->m_currentId;
00119 }
00120 
00121 
00122 
00123 #include "kscan.moc"

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal