summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-11-18 18:46:50 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-04-06 18:05:18 (GMT)
commite9f2f7675b11ce36b3f66250156b78fae524a351 (patch)
treea4e677475b81dca17527e8ee920b97f471ca75b8 /Swift/QtUI/ChatSnippet.h
parent3333ab69d62d1be7ae7dd7a4e56cc4bb608d3add (diff)
downloadswift-e9f2f7675b11ce36b3f66250156b78fae524a351.zip
swift-e9f2f7675b11ce36b3f66250156b78fae524a351.tar.bz2
RTL support in chat dialog.
Change-Id: Id5604c65c6090783c79a45ee7c975ed4118a51f3
Diffstat (limited to 'Swift/QtUI/ChatSnippet.h')
-rw-r--r--Swift/QtUI/ChatSnippet.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/Swift/QtUI/ChatSnippet.h b/Swift/QtUI/ChatSnippet.h
index 78e0b88..d43947f 100644
--- a/Swift/QtUI/ChatSnippet.h
+++ b/Swift/QtUI/ChatSnippet.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2013 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -15,6 +15,11 @@
namespace Swift {
class ChatSnippet {
public:
+ enum Direction {
+ RTL,
+ LTR
+ };
+
ChatSnippet(bool appendToPrevious);
virtual ~ChatSnippet();
@@ -42,7 +47,12 @@ namespace Swift {
static QString timeToEscapedString(const QDateTime& time);
+ static Direction getDirection(const std::string& message);
+ static Direction getDirection(const QString& message);
+
protected:
+ static QString directionToCSS(Direction direction);
+
QString wrapResizable(const QString& text);
void setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet> continuationFallback) {
continuationFallback_ = continuationFallback;