diff options
Diffstat (limited to 'UI/Qt/QtChatView.h')
-rw-r--r-- | UI/Qt/QtChatView.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/UI/Qt/QtChatView.h b/UI/Qt/QtChatView.h new file mode 100644 index 0000000..2a50129 --- /dev/null +++ b/UI/Qt/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 |