File indexing completed on 2024-03-24 15:48:04

0001 /* This file is part of the KDE Project
0002    Copyright (C) 2002 Klaas Freitag <freitag@suse.de>
0003 
0004    This library is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License as published by the Free Software Foundation; either
0007    version 2 of the License, or (at your option) any later version.
0008 
0009    This library is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    Library General Public License for more details.
0013 
0014    You should have received a copy of the GNU Library General Public License
0015    along with this library; see the file COPYING.LIB.  If not, write to
0016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017    Boston, MA 02110-1301, USA.
0018 */
0019 
0020 /**
0021 \Xmainpage The KScan Library.
0022 
0023    The KScan Library provides an interface for the SANE-lib (see http://www.sane-project.org for more information) for KDE2 applications.
0024 
0025 \section intro Introduction
0026 
0027 The KScan Library furnishes each KDE2 application with an object which can connect to a scanner set up by SANE, as well as read out and manage the scanner's parameters. The difficulty with this is that SANE scanners do not have a uniform set of  options. The scanners support various scan options. An interface for establishing contact to the scanners has to be set up  dynamically after the decision is made as to which available device in the system should be used (dynamic GUI).
0028 
0029 \section usage How to use libkookascan
0030 
0031 The library provides a dialog for you to include scan functionality to your application. This includes on the main page of the dialog
0032    - The scanner setting parts with dynamically generated controls of scan parameters and the buttons to start scanning
0033    - A preview window to select the scan area
0034    - An option tab to edit basically scan options.
0035 The scan dialog works completely as KPart and allows the user to scan a preview, select the interesting part on the preview scan, and than start the final scan. Your application will be notified by a signal finalImage that informs you that a new image is available from the scanner.
0036 
0037 \section objectOverview Abstract KScan Objects
0038 
0039 The KScan Library defines the following classes which are responsible for managing the scanner's parameters:
0040 
0041 - KGammaTable\n
0042 This is a base class which implements a gamma table and carries out the calculations etc. internally.
0043 
0044 - KScanOption\n
0045 The object KScanOption implements exactly one scanning option, such as the scanning resolution. A scanner supports several options which are, in part, independent of one another. This means that if option A is modified, option B could be modified along with it. The KScanLib supports the handling of these dependencies.
0046 
0047 - KScanDevice\n
0048 The object KScanDevice maps the scanners available in the system. This object assists the detection of reachable devices and the options they support.
0049 \n
0050 Once a device is decided upon and this has been opened, the KScanDevice will represent the scanning device. By way of this class,  the hardware will actually utilize the options (KScanOption). Furthermore, scanned image data is supplied by KScanDevice.
0051 
0052 - KScanOptSet\n
0053 The object KScanOptSet represents a container for the KScanOption options, apart from a specific device. Up until now, this was made possible by saving several options during the course of the program, e.g. previously configured scanning parameters if a  preview scan were to be carried out so that this can be restored following the preview scan.\n
0054 Furthermore, option sets can be saved to disk.
0055 
0056 \section helpers Helper Classes
0057 
0058 There are some helper widgets which simplify the dynamic setup of the scanning interface. These objects provide simple combinations of base widgets to make their usage easier.
0059 
0060 Itemized, these are:
0061 
0062 - KScanEntry\n(defined in kscanslider.h)\n
0063 Provides an entry field preceded by text.
0064 
0065 - KScanSlider \n(defined in kscanslider.h)\n
0066 Slider preceded by text. Range values are transferred with the data type double.
0067 
0068 - KScanCombo \n(defined in kscanslider.h)\n
0069 Combobox widget which precedes description text and can represent icons.
0070 
0071 - DispGamma \n(defined in dispgamma.h)\n
0072 Widget for displaying gamma tables.
0073 
0074 \section guiElements Interface Objects
0075 
0076 The KScan Library offers some ready-made objects which can be used as a sort of pre-fabricated dialog in order to integrate the scanning functionality into an application. This results in the availability of scanning functionality in all applications over the same interface.
0077 
0078 Currently, there are the following interface elements:
0079 
0080 - DeviceSelector\n
0081 is a class which represents a dialog for scanner selection.
0082 
0083 - GammaDialog\n
0084 is a dialog where a gamma table can be edited. To represent the gamma tables, the gamma dialog uses KGammaTable internally. This class is returned in such as way that it can set the relevant scanner options directly, once the dialog has been completed.
0085 
0086 - MassScanDialog\n
0087 is a mass scanning dialog which informs the user about how the scanning is progressing when the automatic document feeder is used. \e very \e beta \e !
0088 
0089 - ScanSourceDialog\n
0090 Small dialog which enables scanning source selection, e.g. Flatbed, automatic document feeder...
0091 
0092 - ScanParams\n
0093 The ScanParams class is the actual core of the
0094  KScan Library in terms of interface layout. The ScanParams class provides a ready-to-use interface for the selected scanner.\n
0095 \n
0096  The scanner device is analyzed in this class and dynamically generates an interface, according to the device's properties, containing the most important operational elements. These are currently
0097 
0098  <ul>
0099     <li> Setting options for scanning resolution
0100     <li> Scanning source selection
0101     <li> Scanning mode
0102     <li> Brightness and contrast settings
0103     <li> Gamma table
0104     <li> Preview scanning
0105  </ul>
0106 
0107 \author Klaas Freitag <freitag@suse.de>
0108 
0109 */
0110