aboutsummaryrefslogtreecommitdiff
path: root/examples/GuiClient/chatGraphicsScene.h
blob: d9f46b94b869774a6bc4a1b94cecb0a1963f2233 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef CHATGRAPHICSSCENE_H
#define CHATGRAPHICSSCENE_H

#include <QGraphicsScene>
#include <QList>

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 <messageGraphicsItem*> m_items;
};

#endif // CHATGRAPHICSSCENE_H