1+
2+ #include " BlackWhiteOptions.h"
3+ #include " OutputProcessingParams.h"
4+ #include < QDomDocument>
5+
6+ namespace output {
7+
8+ OutputProcessingParams::OutputProcessingParams ()
9+ : whiteOnBlackMode(false ),
10+ autoZonesFound (false ),
11+ whiteOnBlackAutoDetected(false ) {
12+ }
13+
14+ OutputProcessingParams::OutputProcessingParams (QDomElement const & el)
15+ : whiteOnBlackMode(el.attribute(" whiteOnBlackMode" ) == "1"),
16+ autoZonesFound(el.attribute(" autoZonesFound" ) == "1"),
17+ whiteOnBlackAutoDetected(el.attribute(" whiteOnBlackAutoDetected" ) == "1") {
18+ }
19+
20+ QDomElement OutputProcessingParams::toXml (QDomDocument& doc, QString const & name) const {
21+ QDomElement el (doc.createElement (name));
22+ el.setAttribute (" whiteOnBlackMode" , whiteOnBlackMode ? " 1" : " 0" );
23+ el.setAttribute (" autoZonesFound" , autoZonesFound ? " 1" : " 0" );
24+ el.setAttribute (" whiteOnBlackAutoDetected" , whiteOnBlackAutoDetected ? " 1" : " 0" );
25+
26+ return el;
27+ }
28+
29+ bool OutputProcessingParams::operator ==(OutputProcessingParams const & other) const {
30+ return (whiteOnBlackMode == other.whiteOnBlackMode )
31+ && (autoZonesFound == other.autoZonesFound )
32+ && (whiteOnBlackAutoDetected == other.whiteOnBlackAutoDetected );
33+ }
34+
35+ bool OutputProcessingParams::operator !=(OutputProcessingParams const & other) const {
36+ return !(*this == other);
37+ }
38+
39+ bool output::OutputProcessingParams::isAutoZonesFound () const {
40+ return autoZonesFound;
41+ }
42+
43+ void output::OutputProcessingParams::setAutoZonesFound (bool autoZonesFound) {
44+ OutputProcessingParams::autoZonesFound = autoZonesFound;
45+ }
46+
47+ bool output::OutputProcessingParams::isWhiteOnBlackAutoDetected () const {
48+ return whiteOnBlackAutoDetected;
49+ }
50+
51+ void output::OutputProcessingParams::setWhiteOnBlackAutoDetected (bool whiteOnBlackAutoDetected) {
52+ OutputProcessingParams::whiteOnBlackAutoDetected = whiteOnBlackAutoDetected;
53+ }
54+
55+ bool output::OutputProcessingParams::isWhiteOnBlackMode () const {
56+ return whiteOnBlackMode;
57+ }
58+
59+ void output::OutputProcessingParams::setWhiteOnBlackMode (bool whiteOnBlackMode) {
60+ OutputProcessingParams::whiteOnBlackMode = whiteOnBlackMode;
61+ }
62+
63+ }
0 commit comments