diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-11-18 18:46:50 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-04-06 18:05:18 (GMT) |
commit | e9f2f7675b11ce36b3f66250156b78fae524a351 (patch) | |
tree | a4e677475b81dca17527e8ee920b97f471ca75b8 /Swift/QtUI/QtChatWindow.h | |
parent | 3333ab69d62d1be7ae7dd7a4e56cc4bb608d3add (diff) | |
download | swift-e9f2f7675b11ce36b3f66250156b78fae524a351.zip swift-e9f2f7675b11ce36b3f66250156b78fae524a351.tar.bz2 |
RTL support in chat dialog.
Change-Id: Id5604c65c6090783c79a45ee7c975ed4118a51f3
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 3ccea31..a9600d4 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Kevin Smith + * Copyright (c) 2010-2013 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -10,6 +10,7 @@ #include <Swift/QtUI/QtMUCConfigurationWindow.h> #include <Swift/QtUI/QtAffiliationEditor.h> #include <Swift/QtUI/QtSwiftUtil.h> +#include <Swift/QtUI/ChatSnippet.h> #include <QtTabbable.h> @@ -90,9 +91,11 @@ namespace Swift { ~QtChatWindow(); std::string addMessage(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time, const HighlightAction& highlight); std::string addAction(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time, const HighlightAction& highlight); - void addSystemMessage(const std::string& message); - void addPresenceMessage(const std::string& message); + + void addSystemMessage(const std::string& message, Direction direction); + void addPresenceMessage(const std::string& message, Direction direction); void addErrorMessage(const std::string& errorMessage); + void replaceMessage(const std::string& message, const std::string& id, const boost::posix_time::ptime& time, const HighlightAction& highlight); void replaceWithAction(const std::string& message, const std::string& id, const boost::posix_time::ptime& time, const HighlightAction& highlight); // File transfer related stuff @@ -193,10 +196,26 @@ namespace Swift { void beginCorrection(); void cancelCorrection(); void handleSettingChanged(const std::string& setting); - std::string addMessage(const QString& message, const std::string& senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const QString& style, const boost::posix_time::ptime& time, const HighlightAction& highlight); - void replaceMessage(const QString& message, const std::string& id, const boost::posix_time::ptime& time, const QString& style, const HighlightAction& highlight); + std::string addMessage( + const QString& message, + const std::string& senderName, + bool senderIsSelf, + boost::shared_ptr<SecurityLabel> label, + const std::string& avatarPath, + const QString& style, + const boost::posix_time::ptime& time, + const HighlightAction& highlight, + ChatSnippet::Direction direction); + void replaceMessage( + const QString& message, + const std::string& id, + const boost::posix_time::ptime& time, + const QString& style, + const HighlightAction& highlight); void handleOccupantSelectionChanged(RosterItem* item); bool appendToPreviousCheck(PreviousMessageKind messageKind, const std::string& senderName, bool senderIsSelf) const; + static ChatSnippet::Direction getActualDirection(const std::string& message, Direction direction); + QString linkimoticonify(const std::string& message) const; QString linkimoticonify(const QString& message) const; QString getHighlightSpanStart(const HighlightAction& highlight); |