summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-07-16 09:42:35 (GMT)
committerCatalin Badea <catalin.badea392@gmail.com>2012-07-16 09:42:35 (GMT)
commitcc6459b1b5b4f8d7853623fe9d85817f0d14ca26 (patch)
tree3d7a1edb12367e193316a826086fb2f5de19a148 /Swift/QtUI/QtChatView.h
parentb629b5c198020e0992ee6cf01669b7a5191e23ef (diff)
downloadswift-contrib-cc6459b1b5b4f8d7853623fe9d85817f0d14ca26.zip
swift-contrib-cc6459b1b5b4f8d7853623fe9d85817f0d14ca26.tar.bz2
Allow adding top messages in the chatview.
Diffstat (limited to 'Swift/QtUI/QtChatView.h')
-rw-r--r--Swift/QtUI/QtChatView.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatView.h b/Swift/QtUI/QtChatView.h
index 84771ee..d778f6f 100644
--- a/Swift/QtUI/QtChatView.h
+++ b/Swift/QtUI/QtChatView.h
@@ -29,7 +29,8 @@ namespace Swift {
Q_OBJECT
public:
QtChatView(QtChatTheme* theme, QWidget* parent);
- void addMessage(boost::shared_ptr<ChatSnippet> snippet);
+ void addMessageTop(boost::shared_ptr<ChatSnippet> snippet);
+ void addMessageBottom(boost::shared_ptr<ChatSnippet> snippet);
void addLastSeenLine();
void replaceLastMessage(const QString& newMessage);
void replaceLastMessage(const QString& newMessage, const QString& note);
@@ -51,6 +52,8 @@ namespace Swift {
void fontResized(int);
void logCleared();
void scrollRequested(int pos);
+ void scrollReachedTop();
+ void scrollReachedBottom();
public slots:
void copySelectionToClipboard();
@@ -76,6 +79,8 @@ namespace Swift {
bool viewReady_;
bool isAtBottom_;
+ bool topMessageAdded_;
+ int scrollBarMaximum_;
QtWebView* webView_;
QWebPage* webPage_;
int fontSizeSteps_;
@@ -83,6 +88,7 @@ namespace Swift {
QWebElement newInsertPoint_;
QWebElement lineSeparator_;
QWebElement lastElement_;
+ QWebElement firstElement_;
QWebElement document_;
};
}