aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/chatGraphicsView.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/GuiClient/chatGraphicsView.h')
-rw-r--r--examples/GuiClient/chatGraphicsView.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/GuiClient/chatGraphicsView.h b/examples/GuiClient/chatGraphicsView.h
new file mode 100644
index 00000000..be7fa653
--- /dev/null
+++ b/examples/GuiClient/chatGraphicsView.h
@@ -0,0 +1,20 @@
+#ifndef CHATGRAPHICSVIEW_H
+#define CHATGRAPHICSVIEW_H
+
+#include <QGraphicsView>
+class chatGraphicsScene;
+
+class chatGraphicsView : public QGraphicsView
+{
+public:
+ chatGraphicsView(QWidget* parent = 0);
+ void setChatGraphicsScene(chatGraphicsScene* scene);
+ void addMessage(const QString& user, const QString& message);
+
+private:
+ void resizeEvent(QResizeEvent *event);
+
+ chatGraphicsScene* m_scene;
+};
+
+#endif // CHATGRAPHICSVIEW_H