projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Column handles (but not yet the columns themselves) are now movable
[quassel.git]
/
src
/
qtui
/
chatscene.h
diff --git
a/src/qtui/chatscene.h
b/src/qtui/chatscene.h
index
a0bcefc
..
9d8a565
100644
(file)
--- a/
src/qtui/chatscene.h
+++ b/
src/qtui/chatscene.h
@@
-21,42
+21,46
@@
#ifndef _CHATSCENE_H_
#define _CHATSCENE_H_
#ifndef _CHATSCENE_H_
#define _CHATSCENE_H_
+#include <QAbstractItemModel>
#include <QGraphicsScene>
#include <QGraphicsScene>
-#include "messagemodel.h"
-
class AbstractUiMsg;
class Buffer;
class ChatItem;
class ChatLine;
class AbstractUiMsg;
class Buffer;
class ChatItem;
class ChatLine;
+class ColumnHandleItem;
+
class QGraphicsSceneMouseEvent;
class ChatScene : public QGraphicsScene {
Q_OBJECT
public:
class QGraphicsSceneMouseEvent;
class ChatScene : public QGraphicsScene {
Q_OBJECT
public:
- ChatScene(
Message
Model *model, QObject *parent);
+ ChatScene(
QAbstractItem
Model *model, QObject *parent);
virtual ~ChatScene();
Buffer *buffer() const;
virtual ~ChatScene();
Buffer *buffer() const;
- inline
Message
Model *model() const { return _model; }
+ inline
QAbstractItem
Model *model() const { return _model; }
public slots:
public slots:
- void setWidth(int);
+ void setWidth(qreal);
+
+ private slots:
+ void rectChanged(const QRectF &);
signals:
signals:
- void heightChanged(
int
height);
+ void heightChanged(
qreal
height);
protected slots:
void rowsInserted(const QModelIndex &, int, int);
protected slots:
void rowsInserted(const QModelIndex &, int, int);
- void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent );
private:
private:
- int _width, _height;
- int _timestampWidth, _senderWidth;
- MessageModel *_model;
+ qreal _width, _height;
+ QAbstractItemModel *_model;
QList<ChatLine *> _lines;
QList<ChatLine *> _lines;
+ ColumnHandleItem *firstColHandle, *secondColHandle;
+ qreal firstColHandlePos, secondColHandlePos;
};
#endif
};
#endif