X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=f6a5e33a4a49f8f28046a20d96bdc1ac69ba68dd;hp=8d830b6f01acae3ba655ecf6159b0678e08bde3d;hb=65118437813c853cbcc52f0c1a061457e264ed1a;hpb=0bf59432571f1f8a6af2b3fcf29066cfff4cef57 diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 8d830b6f..f6a5e33a 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -37,6 +37,7 @@ ChatScene::ChatScene(QAbstractItemModel *model, const QString &idString, QObject _model(model) { _width = 0; + _selectingItem = 0; connect(this, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(rectChanged(const QRectF &))); connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(rowsInserted(const QModelIndex &, int, int))); @@ -139,3 +140,29 @@ void ChatScene::handlePositionChanged(qreal xpos) { // width() should be the same for both handles, so just use firstColHandle regardless update(qMin(oldx, xpos) - firstColHandle->width()/2, 0, qMax(oldx, xpos) + firstColHandle->width()/2, height()); } + +void ChatScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { + + QGraphicsScene::mouseMoveEvent(event); +} + +void ChatScene::mousePressEvent(QGraphicsSceneMouseEvent *event) { + + QGraphicsScene::mousePressEvent(event); +} + +void ChatScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { + + QGraphicsScene::mouseReleaseEvent(event); +} + +void ChatScene::setSelectingItem(ChatItem *item) { + if(_selectingItem) _selectingItem->clearSelection(); + _selectingItem = item; +} + +void ChatScene::startGlobalSelection(ChatItem *item) { + + +} +