projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Temporarily disable topic to make quassel compile again after sputdev merge
[quassel.git]
/
src
/
qtui
/
chatscene.h
diff --git
a/src/qtui/chatscene.h
b/src/qtui/chatscene.h
index
8701f69
..
70605cc
100644
(file)
--- a/
src/qtui/chatscene.h
+++ b/
src/qtui/chatscene.h
@@
-23,6
+23,7
@@
#include <QAbstractItemModel>
#include <QGraphicsScene>
#include <QAbstractItemModel>
#include <QGraphicsScene>
+#include <QSet>
class AbstractUiMsg;
class Buffer;
class AbstractUiMsg;
class Buffer;
@@
-45,17
+46,30
@@
class ChatScene : public QGraphicsScene {
public slots:
void setWidth(qreal);
public slots:
void setWidth(qreal);
- private slots:
- void rectChanged(const QRectF &);
- void handlePositionChanged(qreal xpos);
+ // these are used by the chatitems to notify the scene and manage selections
+ void setSelectingItem(ChatItem *item);
+ ChatItem *selectingItem() const { return _selectingItem; }
+ void startGlobalSelection(ChatItem *item, const QPointF &itemPos);
signals:
void heightChanged(qreal height);
signals:
void heightChanged(qreal height);
+ protected:
+ virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent);
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent);
+ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent);
+
protected slots:
void rowsInserted(const QModelIndex &, int, int);
protected slots:
void rowsInserted(const QModelIndex &, int, int);
+ private slots:
+ void rectChanged(const QRectF &);
+ void handlePositionChanged(qreal xpos);
+
private:
private:
+ void updateSelection(const QPointF &pos);
+ QString selectionToString() const;
+
QString _idString;
qreal _width, _height;
QAbstractItemModel *_model;
QString _idString;
qreal _width, _height;
QAbstractItemModel *_model;
@@
-63,6
+77,13
@@
class ChatScene : public QGraphicsScene {
ColumnHandleItem *firstColHandle, *secondColHandle;
qreal firstColHandlePos, secondColHandlePos;
ColumnHandleItem *firstColHandle, *secondColHandle;
qreal firstColHandlePos, secondColHandlePos;
+
+ ChatItem *_selectingItem, *_lastItem;
+ QSet<ChatLine *> _selectedItems;
+ int _selectionStartCol, _selectionMinCol;
+ int _selectionStart;
+ int _selectionEnd;
+ bool _isSelecting;
};
#endif
};
#endif