Features in Graphics
Rewrite the KScanOption/KScanDevice/KScanOptSet classes
This is for a cleaner API and to finally eliminate the global
data of KScanDevice. A KScanOption now remembers the KScanDevice
that it belongs to, so that it can perform SANE operations.
Only the KScanDevice may construct a KScanOption, all other callers
must obtain (and optionally create) one via KScanDevice::getOption().
There is only a single instance of a KScanOption object for a given
Since without the global data there can now be more than one
KScanDevice, this is no longer a singleton class and one can be
constructed in the usual way (although Kooka only ever creates
one at a time).
The 'apply' operation is performed by the KScanOption instead of
KScanDevice, so the KScanOption now has 4 orthogonal operations 'set',
'apply', 'reload' and 'get'.
A KScanOptSet stores only the name-value pair of the options, not
the complete KScanOption object. There is therefore no need for
KScanOption to have a copy constructor or assignment operator, which
in turn means that it does not need the hack for maintaining common
gamma table values.
These 3 classes, plus ScanParams, now have complete API documentation.
Squashed commit of the following:
Author: Jonathan Marten
Date: Wed Mar 9 09:03:10 2011 +0000
M +1 -1 kooka/formatdialog.cpp
M +1 -1 kooka/kookaview.cpp
M +8 -12 kooka/photocopyprintdialogpage.cpp
M +12 -8 kooka/scanparamsdialog.cpp
M +255 -412 libkscan/kscandevice.cpp
M +338 -245 libkscan/kscandevice.h
M +1 -1 libkscan/kscandoc.h
M +148 -142 libkscan/kscanoption.cpp
M +318 -77 libkscan/kscanoption.h
M +76 -137 libkscan/kscanoptset.cpp
M +132 -53 libkscan/kscanoptset.h
M +113 -114 libkscan/scanparams.cpp
M +162 -42 libkscan/scanparams.h