summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-01-13 15:26:24 (GMT)
committerSwift Review <review@swift.im>2014-07-09 14:01:41 (GMT)
commitf2bcc401477dcb5ca52b5d9d5e85f4bf7bae9285 (patch)
tree01cf807b2ad59f5ea6504fd28d12e0f994e2f907 /Swift/Controllers/HighlightAction.h
parent8e03583fe21bcd5e0025da81d8f4a34ed05cd058 (diff)
downloadswift-contrib-f2bcc401477dcb5ca52b5d9d5e85f4bf7bae9285.zip
swift-contrib-f2bcc401477dcb5ca52b5d9d5e85f4bf7bae9285.tar.bz2
Reworked highlight rules dialog. Added support for highlighting individual words in messages.
Change-Id: I378fa69077c29008db4ef7c2265e5212924bc2ce
Diffstat (limited to 'Swift/Controllers/HighlightAction.h')
-rw-r--r--Swift/Controllers/HighlightAction.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Swift/Controllers/HighlightAction.h b/Swift/Controllers/HighlightAction.h
index bfbed74..de1f201 100644
--- a/Swift/Controllers/HighlightAction.h
+++ b/Swift/Controllers/HighlightAction.h
@@ -6,2 +6,8 @@
+/*
+ * Copyright (c) 2014 Kevin Smith and Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
#pragma once
@@ -10,2 +16,5 @@
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
namespace Swift {
@@ -21,2 +30,5 @@ namespace Swift {
+ /**
+ * Gets the foreground highlight color. If the string is empty, assume a default color.
+ */
const std::string& getTextColor() const { return textColor_; }
@@ -24,2 +36,5 @@ namespace Swift {
+ /**
+ * Gets the background highlight color. If the string is empty, assume a default color.
+ */
const std::string& getTextBackground() const { return textBackground_; }
@@ -30,2 +45,5 @@ namespace Swift {
+ /**
+ * Gets the sound filename. If the string is empty, assume a default sound file.
+ */
const std::string& getSoundFile() const { return soundFile_; }
@@ -36,2 +54,5 @@ namespace Swift {
private:
+ friend class boost::serialization::access;
+ template<class Archive> void serialize(Archive & ar, const unsigned int version);
+
bool highlightText_;
@@ -44,2 +65,12 @@ namespace Swift {
+ template<class Archive>
+ void HighlightAction::serialize(Archive& ar, const unsigned int /*version*/)
+ {
+ ar & highlightText_;
+ ar & textColor_;
+ ar & textBackground_;
+ ar & playSound_;
+ ar & soundFile_;
+ }
+
}