Skip to content

Commit 3d3d1e9

Browse files
committed
~ added missing files
1 parent 1215522 commit 3d3d1e9

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
#ifndef SCANTAILOR_OUTPUTPROCESSINGPARAMS_H
3+
#define SCANTAILOR_OUTPUTPROCESSINGPARAMS_H
4+
5+
class QString;
6+
class QDomDocument;
7+
class QDomElement;
8+
9+
namespace output {
10+
class OutputProcessingParams {
11+
public:
12+
OutputProcessingParams();
13+
14+
explicit OutputProcessingParams(QDomElement const& el);
15+
16+
QDomElement toXml(QDomDocument& doc, QString const& name) const;
17+
18+
bool operator==(OutputProcessingParams const& other) const;
19+
20+
bool operator!=(OutputProcessingParams const& other) const;
21+
22+
bool isWhiteOnBlackAutoDetected() const;
23+
24+
void setWhiteOnBlackAutoDetected(bool whiteOnBlackAutoDetected);
25+
26+
bool isAutoZonesFound() const;
27+
28+
void setAutoZonesFound(bool autoZonesFound);
29+
30+
bool isWhiteOnBlackMode() const;
31+
32+
void setWhiteOnBlackMode(bool whiteOnBlackMode);
33+
34+
private:
35+
bool whiteOnBlackMode;
36+
bool autoZonesFound;
37+
bool whiteOnBlackAutoDetected;
38+
};
39+
}
40+
41+
42+
#endif //SCANTAILOR_OUTPUTPROCESSINGPARAMS_H

0 commit comments

Comments
 (0)