MCPcopy Create free account
hub / github.com/Atarity/Lightpack / showConfigFor

Method showConfigFor

Software/src/GrabConfigWidget.cpp:60–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void GrabConfigWidget::showConfigFor(QRect widgetGeometry, int buttonCenter)
61{
62 QRect screen = QApplication::desktop()->screenGeometry(widgetGeometry.center());
63
64 move(widgetGeometry.right(), widgetGeometry.y() - height() / 2 + buttonCenter);
65
66 QRect r = geometry();
67
68 qDebug() << r;
69
70 if (r.top() < screen.top())
71 r.moveTop(screen.top());
72 if (r.bottom() > screen.bottom())
73 r.moveBottom(screen.bottom());
74
75 if (r.right() > screen.right())
76 {
77 setArrow(RightSide);
78
79 r = geometry();
80 r.moveRight(widgetGeometry.left());
81 r.moveTop(widgetGeometry.top() + widgetGeometry.height() / 2 - height() / 2);
82 } else {
83 setArrow(LeftSide);
84 }
85
86 move(r.topLeft());
87 show();
88}
89
90void GrabConfigWidget::setCoefs(double red, double green, double blue)
91{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected