summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/ChatSnippet.h')
-rw-r--r--Swift/QtUI/ChatSnippet.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/ChatSnippet.h b/Swift/QtUI/ChatSnippet.h
index 9786518..f323295 100644
--- a/Swift/QtUI/ChatSnippet.h
+++ b/Swift/QtUI/ChatSnippet.h
@@ -6,6 +6,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include <QString>
#include <QDateTime>
#include "QtChatTheme.h"
@@ -13,12 +15,14 @@
namespace Swift {
class ChatSnippet {
public:
- ChatSnippet(bool appendToPrevious = false);
+ ChatSnippet(bool appendToPrevious);
virtual ~ChatSnippet();
virtual const QString& getContent() const = 0;
virtual QString getContinuationElementID() const { return ""; }
+ boost::shared_ptr<ChatSnippet> getContinuationFallbackSnippet() {return continuationFallback_;}
+
bool getAppendToPrevious() const {
return appendToPrevious_;
}
@@ -26,9 +30,13 @@ namespace Swift {
static QString escape(const QString&);
protected:
+ void setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet> continuationFallback) {
+ continuationFallback_ = continuationFallback;
+ }
static QString timeToEscapedString(const QDateTime& time);
private:
bool appendToPrevious_;
+ boost::shared_ptr<ChatSnippet> continuationFallback_;
};
}