void toListView::contentsMouseMoveEvent(QMouseEvent *e) { #if 0 if (e->state() == Qt::LeftButton && e->stateAfter() == Qt::LeftButton && LastMove.x() > 0 && LastMove != e->pos()) { QPoint p = e->pos(); int col = header()->sectionAt(p.x()); toTreeWidgetItem *item = itemAt(contentsToViewport(p)); toResultViewItem *resItem = dynamic_cast<toResultViewItem *>(item); toResultViewCheck *chkItem = dynamic_cast<toResultViewCheck *>(item); QString str; if (resItem) str = resItem->allText(col); else if (chkItem) str = chkItem->allText(col); else if (item) str = item->text(col); if (str.length()) { Q3DragObject *d = new Q3TextDrag(str, this); d->dragCopy(); } } else { LastMove = e->pos(); toTreeWidget::contentsMouseMoveEvent(e); } #endif }
void TreeView::startDrag() { Q3DragObject *drag = dragObject(); if (!drag) return; drag->dragMove(); }
void VendorLineEdit::mouseMoveEvent(QMouseEvent *) { if (_dragging) { Q3DragObject *drag = new Q3TextDrag(QString("vendid=%1").arg(_id), this); drag->dragCopy(); _dragging = FALSE; } }
void DraggableListView::startDrag() { Q3DragObject *o = dragObject(); if (o) { o->drag(); } }
Q3DragObject *GearListView::dragObject() { Q3DragObject *d = new Q3TextDrag(currentItem()->text(0), this); d->setPixmap(QPixmap(draggear)); return d; }