MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / mouseMoveEvent

Method mouseMoveEvent

qt/DeviceView.cpp:603–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603void DeviceView::mouseMoveEvent(QMouseEvent *event)
604{
605 if(per_led)
606 {
607 lastMousePos = event->pos();
608 selectionRect.setRight(event->x());
609 selectionRect.setBottom(event->y());
610
611 if(mouseDown)
612 {
613 mouseMoved = true;
614 ctrlDown = event->modifiers().testFlag(Qt::ControlModifier);
615
616 /*-----------------------------------------------------*\
617 | Clear the previous selection in case ctrl is released |
618 \*-----------------------------------------------------*/
619 if(!ctrlDown)
620 {
621 previousSelection.clear();
622 previousFlags.clear();
623 previousFlags.resize(controller->leds.size());
624 }
625 updateSelection();
626 }
627 update();
628 }
629}
630
631void DeviceView::mouseReleaseEvent(QMouseEvent* event)
632{

Callers

nothing calls this directly

Calls 2

updateFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected