diff options
Diffstat (limited to 'Swift/QtUI/QtChatView.h')
-rw-r--r-- | Swift/QtUI/QtChatView.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatView.h b/Swift/QtUI/QtChatView.h new file mode 100644 index 0000000..2a50129 --- /dev/null +++ b/Swift/QtUI/QtChatView.h @@ -0,0 +1,32 @@ +#ifndef SWIFT_QtChatView_H +#define SWIFT_QtChatView_H + +#include <QString> +#include <QWidget> + +#include "ChatSnippet.h" + +class QWebView; +class QWebPage; + +namespace Swift { + class QtChatView : public QWidget { + Q_OBJECT + public: + QtChatView(QWidget* parent); + + void addMessage(const ChatSnippet& snippet); + bool isScrolledToBottom() const; + + public slots: + void copySelectionToClipboard(); + void scrollToBottom(); + + private: + QWebView* webView_; + QWebPage* webPage_; + QString previousContinuationElementID_; + }; +} + +#endif |