}
mouseArea.addRect(pos.x() - xsize / 2, pos.y() - ysize / 2, xsize, ysize);
}
mouseArea.addRect(pos.x() - xsize / 2, pos.y() - ysize / 2, xsize, ysize);
// if we subtract rect() we'll get a whole lot of flickering
// because of diffWidth > diffHeight changing all the time
int diffWidth = qAbs(r.width() - m_oldRect.width());
// if we subtract rect() we'll get a whole lot of flickering
// because of diffWidth > diffHeight changing all the time
int diffWidth = qAbs(r.width() - m_oldRect.width());
void OnMonitorRectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
{
Q_UNUSED(widget)
void OnMonitorRectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
{
Q_UNUSED(widget)
painter->drawRect(r);
QRectF handle = painter->worldTransform().inverted().mapRect(QRectF(0, 0, 6, 6));
if (isEnabled()) {
painter->drawRect(r);
QRectF handle = painter->worldTransform().inverted().mapRect(QRectF(0, 0, 6, 6));
if (isEnabled()) {