From da88f5f0bb5e73bc69bf7ed3962691622b1ae4f9 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Wed, 8 Sep 2010 09:23:18 +0000 Subject: add Gui Client example --- examples/GuiClient/chatGraphicsScene.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/GuiClient/chatGraphicsScene.h (limited to 'examples/GuiClient/chatGraphicsScene.h') diff --git a/examples/GuiClient/chatGraphicsScene.h b/examples/GuiClient/chatGraphicsScene.h new file mode 100644 index 00000000..d9f46b94 --- /dev/null +++ b/examples/GuiClient/chatGraphicsScene.h @@ -0,0 +1,25 @@ +#ifndef CHATGRAPHICSSCENE_H +#define CHATGRAPHICSSCENE_H + +#include +#include + +class messageGraphicsItem; + +class chatGraphicsScene : public QGraphicsScene +{ +public: + chatGraphicsScene(QObject* parent = 0); + void addMessage(const QString& user, const QString& message); + void setWidthResize(int newWidth, int oldWidth); + void verticalReposition(); + void setBoxStartLength(int length); + +private: + int m_verticalPosForNewMessage; + int m_verticalSpacing; + int m_boxStartLength; + QList m_items; +}; + +#endif // CHATGRAPHICSSCENE_H -- cgit v1.2.3