X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=70605ccdfb97942ff5929f4c13a3bf89f90c0ff7;hp=8fd5bf4d9660d9fcc81f20e6f9f1e6acae3bbdf2;hb=92789e6323ca73383a7954d834ecfc093234f5e2;hpb=1183bd403b16d86ef59503185b9ab4d35eb8c93f diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 8fd5bf4d..70605ccd 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -23,6 +23,7 @@ #include #include +#include class AbstractUiMsg; class Buffer; @@ -45,9 +46,10 @@ class ChatScene : public QGraphicsScene { public slots: void setWidth(qreal); - // these are used by the chatitems to notify the scene + // 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); @@ -65,6 +67,9 @@ class ChatScene : public QGraphicsScene { void handlePositionChanged(qreal xpos); private: + void updateSelection(const QPointF &pos); + QString selectionToString() const; + QString _idString; qreal _width, _height; QAbstractItemModel *_model; @@ -73,7 +78,12 @@ class ChatScene : public QGraphicsScene { ColumnHandleItem *firstColHandle, *secondColHandle; qreal firstColHandlePos, secondColHandlePos; - ChatItem *_selectingItem; + ChatItem *_selectingItem, *_lastItem; + QSet _selectedItems; + int _selectionStartCol, _selectionMinCol; + int _selectionStart; + int _selectionEnd; + bool _isSelecting; }; #endif