diff options
Diffstat (limited to 'Swift/Controllers/HighlightAction.h')
-rw-r--r-- | Swift/Controllers/HighlightAction.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Swift/Controllers/HighlightAction.h b/Swift/Controllers/HighlightAction.h index a9e0cee..3930eee 100644 --- a/Swift/Controllers/HighlightAction.h +++ b/Swift/Controllers/HighlightAction.h | |||
@@ -12,26 +12,26 @@ | |||
12 | 12 | ||
13 | #pragma once | 13 | #pragma once |
14 | 14 | ||
15 | #include <string> | 15 | #include <string> |
16 | 16 | ||
17 | #include <boost/archive/text_oarchive.hpp> | ||
18 | #include <boost/archive/text_iarchive.hpp> | 17 | #include <boost/archive/text_iarchive.hpp> |
18 | #include <boost/archive/text_oarchive.hpp> | ||
19 | 19 | ||
20 | namespace Swift { | 20 | namespace Swift { |
21 | 21 | ||
22 | class HighlightRule; | 22 | class HighlightRule; |
23 | 23 | ||
24 | class HighlightAction { | 24 | class HighlightAction { |
25 | public: | 25 | public: |
26 | HighlightAction() : highlightText_(false), playSound_(false) {} | 26 | HighlightAction() : highlightWholeMessage_(false), playSound_(false) {} |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Gets the flag that indicates the entire message should be highlighted. | 29 | * Gets the flag that indicates the entire message should be highlighted. |
30 | */ | 30 | */ |
31 | bool highlightAllText() const { return highlightText_; } | 31 | bool highlightWholeMessage() const { return highlightWholeMessage_; } |
32 | void setHighlightAllText(bool highlightText); | 32 | void setHighlightWholeMessage(bool highlightText); |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Gets the foreground highlight color. | 35 | * Gets the foreground highlight color. |
36 | */ | 36 | */ |
37 | const std::string& getTextColor() const { return textColor_; } | 37 | const std::string& getTextColor() const { return textColor_; } |
@@ -50,17 +50,17 @@ namespace Swift { | |||
50 | * Gets the sound filename. If the string is empty, assume a default sound file. | 50 | * Gets the sound filename. If the string is empty, assume a default sound file. |
51 | */ | 51 | */ |
52 | const std::string& getSoundFile() const { return soundFile_; } | 52 | const std::string& getSoundFile() const { return soundFile_; } |
53 | void setSoundFile(const std::string& soundFile) { soundFile_ = soundFile; } | 53 | void setSoundFile(const std::string& soundFile) { soundFile_ = soundFile; } |
54 | 54 | ||
55 | bool isEmpty() const { return !highlightText_ && !playSound_; } | 55 | bool isEmpty() const { return !highlightWholeMessage_ && !playSound_; } |
56 | 56 | ||
57 | private: | 57 | private: |
58 | friend class boost::serialization::access; | 58 | friend class boost::serialization::access; |
59 | template<class Archive> void serialize(Archive & ar, const unsigned int version); | 59 | template<class Archive> void serialize(Archive & ar, const unsigned int version); |
60 | 60 | ||
61 | bool highlightText_; | 61 | bool highlightWholeMessage_; |
62 | std::string textColor_; | 62 | std::string textColor_; |
63 | std::string textBackground_; | 63 | std::string textBackground_; |
64 | 64 | ||
65 | bool playSound_; | 65 | bool playSound_; |
66 | std::string soundFile_; | 66 | std::string soundFile_; |
@@ -70,11 +70,11 @@ namespace Swift { | |||
70 | bool operator !=(HighlightAction const& a, HighlightAction const& b); | 70 | bool operator !=(HighlightAction const& a, HighlightAction const& b); |
71 | 71 | ||
72 | template<class Archive> | 72 | template<class Archive> |
73 | void HighlightAction::serialize(Archive& ar, const unsigned int /*version*/) | 73 | void HighlightAction::serialize(Archive& ar, const unsigned int /*version*/) |
74 | { | 74 | { |
75 | ar & highlightText_; | 75 | ar & highlightWholeMessage_; |
76 | ar & textColor_; | 76 | ar & textColor_; |
77 | ar & textBackground_; | 77 | ar & textBackground_; |
78 | ar & playSound_; | 78 | ar & playSound_; |
79 | ar & soundFile_; | 79 | ar & soundFile_; |
80 | } | 80 | } |