void KColorPatch::mouseMoveEvent( TQMouseEvent *e ) { // Drag color object if( !(e->state() & Qt::LeftButton)) return; KColorDrag *d = new KColorDrag( color, this); d->dragCopy(); }
void KColorButton::mouseMoveEvent(QMouseEvent *e) { if((e->state() & LeftButton) && (e->pos() - mPos).manhattanLength() > KGlobalSettings::dndEventDelay()) { // Drag color object KColorDrag *dg = new KColorDrag(color(), this); dg->dragCopy(); setDown(false); } }
void KoColorPanel::mouseMoveEvent( QMouseEvent* e ) { if ( e->state() & Qt::LeftButton ) { QPoint p = m_pressedPos - e->pos(); if ( p.manhattanLength() > QApplication::startDragDistance() ) { QColor color( mapToColor( m_pressedPos ) ); if ( color.isValid() ) { KColorDrag *drag = new KColorDrag( color, this, name() ); drag->dragCopy(); } } } else updateFocusPosition( mapToPosition( e->pos() ) ); }
void KColorCells::mouseMoveEvent( TQMouseEvent *e ) { if( !(e->state() & Qt::LeftButton)) return; if(inMouse) { int delay = TDEGlobalSettings::dndEventDelay(); if(e->x() > mPos.x()+delay || e->x() < mPos.x()-delay || e->y() > mPos.y()+delay || e->y() < mPos.y()-delay){ // Drag color object int cell = posToCell(mPos); if ((cell != -1) && colors[cell].isValid()) { KColorDrag *d = new KColorDrag( colors[cell], this); d->dragCopy(); } } } }