summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-07-16 09:42:35 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-11 15:59:12 (GMT)
commit5e736fe9601d1af367d564b94666372661f70d2a (patch)
tree2fe42488aeb18460eeb1989afc03a8ae5f77af54 /Swift/QtUI/QtChatView.h
parent782054cbc9d82646e90a8de4086008e8f7bc640c (diff)
downloadswift-contrib-5e736fe9601d1af367d564b94666372661f70d2a.zip
swift-contrib-5e736fe9601d1af367d564b94666372661f70d2a.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_;
};
}