summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladvoic@gmail.com>2011-04-19 08:49:45 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-19 17:58:34 (GMT)
commit18c1e44ad0a60e887a5b1f0d9a38e4be6ad2d722 (patch)
tree7bf0764a4474f9d70dc2cca769569ba31d1c1791 /Swift/QtUI/QtChatView.cpp
parent0f96561861ad00ee7a23cd1e368025c20811e1ba (diff)
downloadswift-18c1e44ad0a60e887a5b1f0d9a38e4be6ad2d722.zip
swift-18c1e44ad0a60e887a5b1f0d9a38e4be6ad2d722.tar.bz2
Use a bar to show where the last read messages in a chat are
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/QtUI/QtChatView.cpp')
-rw-r--r--Swift/QtUI/QtChatView.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp
index 521b072..4846af6 100644
--- a/Swift/QtUI/QtChatView.cpp
+++ b/Swift/QtUI/QtChatView.cpp
@@ -106,6 +106,19 @@ void QtChatView::addToDOM(boost::shared_ptr<ChatSnippet> snippet) {
//qApp->processEvents();
}
+void QtChatView::addLastSeenLine() {
+ if (lineSeparator_.isNull()) {
+ lineSeparator_ = newInsertPoint_.clone();
+ lineSeparator_.setInnerXml(QString("<hr/>"));
+ newInsertPoint_.prependOutside(lineSeparator_);
+ }
+ else {
+ QWebElement lineSeparatorC = lineSeparator_.clone();
+ lineSeparatorC.removeFromDocument();
+ }
+ newInsertPoint_.prependOutside(lineSeparator_);
+}
+
void QtChatView::replaceLastMessage(const QString& newMessage) {
assert(viewReady_);
/* FIXME: must be queued? */