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

Method mousePressEvent

qt/DeviceView.cpp:576–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void DeviceView::mousePressEvent(QMouseEvent *event)
577{
578 if(per_led)
579 {
580 ctrlDown = event->modifiers().testFlag(Qt::ControlModifier);
581 mouseDown = true;
582 mouseMoved = false;
583
584 if(ctrlDown)
585 {
586 previousFlags = selectionFlags;
587 previousSelection = selectedLeds;
588 }
589
590 /*-----------------------------------------------------*\
591 | It's okay if the size becomes negative |
592 \*-----------------------------------------------------*/
593 selectionRect.setLeft(event->x());
594 selectionRect.setTop(event->y());
595 selectionRect.setRight(event->x());
596 selectionRect.setBottom(event->y());
597
598 updateSelection();
599 update();
600 }
601}
602
603void DeviceView::mouseMoveEvent(QMouseEvent *event)
604{

Callers

nothing calls this directly

Calls 1

updateFunction · 0.50

Tested by

no test coverage detected