Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
widgetselection.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant reason:default
4
6#include "formwindow.h"
8
9// sdk
10#include <QtDesigner/abstractformeditor.h>
11#include <QtDesigner/qextensionmanager.h>
12
13// shared
14#include <qdesigner_command_p.h>
15#include <qdesigner_propertycommand_p.h>
16#include <layout_p.h>
17#include <layoutinfo_p.h>
18#include <formwindowbase_p.h>
19#include <grid_p.h>
20
21#include <QtWidgets/qmenu.h>
22#include <QtWidgets/qwidget.h>
23#include <QtGui/qevent.h>
24#include <QtWidgets/qstylepainter.h>
25#include <QtWidgets/qgridlayout.h>
26#include <QtWidgets/qformlayout.h>
27#include <QtWidgets/qstyleoption.h>
28#include <QtWidgets/qapplication.h>
29
30#include <QtCore/qvariant.h>
31#include <QtCore/qdebug.h>
32
33#include <algorithm>
34
35QT_BEGIN_NAMESPACE
36
37using namespace Qt::StringLiterals;
38
39namespace qdesigner_internal {
41
42// Return the layout the widget is in
43template <class Layout>
44static inline Layout *managedLayoutOf(const QDesignerFormEditorInterface *core,
45 QWidget *w,
46 const Layout * /* vs6dummy */ = nullptr)
47{
48 if (QWidget *p = w->parentWidget())
49 if (QLayout *l = LayoutInfo::managedLayout(core, p))
50 return qobject_cast<Layout*>(l);
51 return nullptr;
52}
53
54// ----------- WidgetHandle
55WidgetHandle::WidgetHandle(FormWindow *parent, WidgetHandle::Type t, WidgetSelection *s) :
57 m_widget(nullptr),
58 m_type(t),
59 m_formWindow( parent),
60 m_sel(s),
61 m_active(true)
62{
63 setMouseTracking(false);
64 setAutoFillBackground(true);
65
66 setBackgroundRole(m_active ? QPalette::Text : QPalette::Dark);
67 setFixedSize(6, 6);
68
70}
71
73{
74#if QT_CONFIG(cursor)
75 if (!m_active) {
76 setCursor(Qt::ArrowCursor);
77 return;
78 }
79
80 switch (m_type) {
81 case LeftTop:
82 setCursor(Qt::SizeFDiagCursor);
83 break;
84 case Top:
85 setCursor(Qt::SizeVerCursor);
86 break;
87 case RightTop:
88 setCursor(Qt::SizeBDiagCursor);
89 break;
90 case Right:
91 setCursor(Qt::SizeHorCursor);
92 break;
93 case RightBottom:
94 setCursor(Qt::SizeFDiagCursor);
95 break;
96 case Bottom:
97 setCursor(Qt::SizeVerCursor);
98 break;
99 case LeftBottom:
100 setCursor(Qt::SizeBDiagCursor);
101 break;
102 case Left:
103 setCursor(Qt::SizeHorCursor);
104 break;
105 default:
106 Q_ASSERT(0);
107 }
108#endif
109}
110
111QDesignerFormEditorInterface *WidgetHandle::core() const
112{
113 if (m_formWindow)
114 return m_formWindow->core();
115
116 return nullptr;
117}
118
120{
121 m_active = a;
122 setBackgroundRole(m_active ? QPalette::Text : QPalette::Dark);
124}
125
127{
128 m_widget = w;
129}
130
131void WidgetHandle::paintEvent(QPaintEvent *)
132{
133 QDesignerFormWindowManagerInterface *m = m_formWindow->core()->formWindowManager();
134
135 QStylePainter p(this);
136 if (m_formWindow->currentWidget() == m_widget) {
137 p.setPen(m->activeFormWindow() == m_formWindow ? Qt::blue : Qt::red);
138 p.drawRect(0, 0, width() - 1, height() - 1);
139 }
140}
141
142void WidgetHandle::mousePressEvent(QMouseEvent *e)
143{
144 e->accept();
145
146 if (!m_formWindow->hasFeature(FormWindow::EditFeature))
147 return;
148
149 if (!(m_widget && e->button() == Qt::LeftButton))
150 return;
151
152 if (!(m_active))
153 return;
154
155 QWidget *container = m_widget->parentWidget();
156
157 m_origPressPos = container->mapFromGlobal(e->globalPosition().toPoint());
158 m_geom = m_origGeom = m_widget->geometry();
159
160 switch (WidgetSelection::widgetState(m_formWindow->core(), m_widget)) {
163 m_formWindow->setHandleOperation(FormWindow::ResizeHandleOperation);
164 break;
167 m_formWindow->setHandleOperation(FormWindow::ChangeLayoutSpanHandleOperation);
168 break;
169 }
170}
171
172void WidgetHandle::mouseMoveEvent(QMouseEvent *e)
173{
174 if (!(m_widget && m_active && e->buttons() & Qt::LeftButton))
175 return;
176
177 e->accept();
178
179 QWidget *container = m_widget->parentWidget();
180
181 const QPoint rp = container->mapFromGlobal(e->globalPosition().toPoint());
182 const QPoint d = rp - m_origPressPos;
183
184 const QRect pr = container->rect();
185
186 qdesigner_internal::Grid grid;
187 if (const qdesigner_internal::FormWindowBase *fwb = qobject_cast<const qdesigner_internal::FormWindowBase*>(m_formWindow))
188 grid = fwb->designerGrid();
189
190 switch (m_type) {
191
192 case LeftTop: {
193 if (rp.x() > pr.width() - 2 * width() || rp.y() > pr.height() - 2 * height())
194 return;
195
196 int w = m_origGeom.width() - d.x();
197 m_geom.setWidth(w);
198 w = grid.widgetHandleAdjustX(w);
199
200 int h = m_origGeom.height() - d.y();
201 m_geom.setHeight(h);
202 h = grid.widgetHandleAdjustY(h);
203
204 const int dx = m_widget->width() - w;
205 const int dy = m_widget->height() - h;
206
207 trySetGeometry(m_widget, m_widget->x() + dx, m_widget->y() + dy, w, h);
208 } break;
209
210 case Top: {
211 if (rp.y() > pr.height() - 2 * height())
212 return;
213
214 int h = m_origGeom.height() - d.y();
215 m_geom.setHeight(h);
216 h = grid.widgetHandleAdjustY(h);
217
218 const int dy = m_widget->height() - h;
219 trySetGeometry(m_widget, m_widget->x(), m_widget->y() + dy, m_widget->width(), h);
220 } break;
221
222 case RightTop: {
223 if (rp.x() < 2 * width() || rp.y() > pr.height() - 2 * height())
224 return;
225
226 int h = m_origGeom.height() - d.y();
227 m_geom.setHeight(h);
228 h = grid.widgetHandleAdjustY(h);
229
230 const int dy = m_widget->height() - h;
231
232 int w = m_origGeom.width() + d.x();
233 m_geom.setWidth(w);
234 w = grid.widgetHandleAdjustX(w);
235
236 trySetGeometry(m_widget, m_widget->x(), m_widget->y() + dy, w, h);
237 } break;
238
239 case Right: {
240 if (rp.x() < 2 * width())
241 return;
242
243 int w = m_origGeom.width() + d.x();
244 m_geom.setWidth(w);
245 w = grid.widgetHandleAdjustX(w);
246
247 tryResize(m_widget, w, m_widget->height());
248 } break;
249
250 case RightBottom: {
251 if (rp.x() < 2 * width() || rp.y() < 2 * height())
252 return;
253
254 int w = m_origGeom.width() + d.x();
255 m_geom.setWidth(w);
256 w = grid.widgetHandleAdjustX(w);
257
258 int h = m_origGeom.height() + d.y();
259 m_geom.setHeight(h);
260 h = grid.widgetHandleAdjustY(h);
261
262 tryResize(m_widget, w, h);
263 } break;
264
265 case Bottom: {
266 if (rp.y() < 2 * height())
267 return;
268
269 int h = m_origGeom.height() + d.y();
270 m_geom.setHeight(h);
271 h = grid.widgetHandleAdjustY(h);
272
273 tryResize(m_widget, m_widget->width(), h);
274 } break;
275
276 case LeftBottom: {
277 if (rp.x() > pr.width() - 2 * width() || rp.y() < 2 * height())
278 return;
279
280 int w = m_origGeom.width() - d.x();
281 m_geom.setWidth(w);
282 w = grid.widgetHandleAdjustX(w);
283
284 int h = m_origGeom.height() + d.y();
285 m_geom.setHeight(h);
286 h = grid.widgetHandleAdjustY(h);
287
288 int dx = m_widget->width() - w;
289
290 trySetGeometry(m_widget, m_widget->x() + dx, m_widget->y(), w, h);
291 } break;
292
293 case Left: {
294 if (rp.x() > pr.width() - 2 * width())
295 return;
296
297 int w = m_origGeom.width() - d.x();
298 m_geom.setWidth(w);
299 w = grid.widgetHandleAdjustX(w);
300
301 const int dx = m_widget->width() - w;
302
303 trySetGeometry(m_widget, m_widget->x() + dx, m_widget->y(), w, m_widget->height());
304 } break;
305
306 default: break;
307
308 } // end switch
309
311
312 if (LayoutInfo::layoutType(m_formWindow->core(), m_widget) != LayoutInfo::NoLayout)
313 m_formWindow->updateChildSelections(m_widget);
314}
315
316void WidgetHandle::mouseReleaseEvent(QMouseEvent *e)
317{
318 m_formWindow->setHandleOperation(FormWindow::NoHandleOperation);
319
320 if (e->button() != Qt::LeftButton || !m_active)
321 return;
322
323 e->accept();
324
325 if (!m_formWindow->hasFeature(FormWindow::EditFeature))
326 return;
327
328 switch (WidgetSelection::widgetState(m_formWindow->core(), m_widget)) {
330 if (m_geom != m_widget->geometry()) {
331 SetPropertyCommand *cmd = new SetPropertyCommand(m_formWindow);
332 cmd->init(m_widget, u"geometry"_s, m_widget->geometry());
333 cmd->setOldValue(m_origGeom);
334 m_formWindow->commandHistory()->push(cmd);
335 m_formWindow->emitSelectionChanged();
336 }
337 break;
339 break;
341 changeGridLayoutItemSpan();
342 break;
344 changeFormLayoutItemSpan();
345 break;
346 }
347}
348
349// Match the left/right widget handle mouse movements to form layout span-changing operations
350static inline int formLayoutLeftHandleOperation(int dx, unsigned possibleOperations)
351{
352 if (dx < 0) {
353 if (possibleOperations & ChangeFormLayoutItemRoleCommand::FieldToSpanning)
354 return ChangeFormLayoutItemRoleCommand::FieldToSpanning;
355 return 0;
356 }
357 if (possibleOperations & ChangeFormLayoutItemRoleCommand::SpanningToField)
358 return ChangeFormLayoutItemRoleCommand::SpanningToField;
359 return 0;
360}
361
362static inline int formLayoutRightHandleOperation(int dx, unsigned possibleOperations)
363{
364 if (dx < 0) {
365 if (possibleOperations & ChangeFormLayoutItemRoleCommand::SpanningToLabel)
366 return ChangeFormLayoutItemRoleCommand::SpanningToLabel;
367 return 0;
368 }
369 if (possibleOperations & ChangeFormLayoutItemRoleCommand::LabelToSpanning)
370 return ChangeFormLayoutItemRoleCommand::LabelToSpanning;
371 return 0;
372}
373
374// Change form layout item horizontal span
375void WidgetHandle::changeFormLayoutItemSpan()
376{
377 QUndoCommand *cmd = nullptr;
378 // Figure out command according to the movement
379 const int dx = m_widget->geometry().center().x() - m_origGeom.center().x();
380 if (qAbs(dx) >= QApplication::startDragDistance()) {
381 int operation = 0;
382 if (const unsigned possibleOperations = ChangeFormLayoutItemRoleCommand::possibleOperations(m_formWindow->core(), m_widget)) {
383 switch (m_type) {
384 case WidgetHandle::Left:
385 operation = formLayoutLeftHandleOperation(dx, possibleOperations);
386 break;
387 case WidgetHandle::Right:
388 operation = formLayoutRightHandleOperation(dx, possibleOperations);
389 break;
390 default:
391 break;
392 }
393 if (operation) {
394 ChangeFormLayoutItemRoleCommand *fcmd = new ChangeFormLayoutItemRoleCommand(m_formWindow);
395 fcmd->init(m_widget, static_cast<ChangeFormLayoutItemRoleCommand::Operation>(operation));
396 cmd = fcmd;
397 }
398 }
399 }
400 if (cmd) {
401 m_formWindow->commandHistory()->push(cmd);
402 } else {
403 // Cancelled/Invalid. Restore the size of the widget.
404 if (QFormLayout *form = managedLayoutOf<QFormLayout>(m_formWindow->core(), m_widget)) {
405 form->invalidate();
406 form->activate();
407 m_formWindow->clearSelection(false);
408 m_formWindow->selectWidget(m_widget);
409 }
410 }
411}
412
413void WidgetHandle::changeGridLayoutItemSpan()
414{
415 QDesignerLayoutDecorationExtension *deco = qt_extension<QDesignerLayoutDecorationExtension*>(core()->extensionManager(), m_widget->parentWidget());
416 if (!deco)
417 return;
418 QGridLayout *grid = managedLayoutOf<QGridLayout>(m_formWindow->core(), m_widget);
419 if (!grid)
420 return;
421
422 const int index = deco->indexOf(m_widget);
423 const QRect info = deco->itemInfo(index);
424 const int top = deco->findItemAt(info.top() - 1, info.left());
425 const int left = deco->findItemAt(info.top(), info.left() - 1);
426 const int bottom = deco->findItemAt(info.bottom() + 1, info.left());
427 const int right = deco->findItemAt(info.top(), info.right() + 1);
428
429 const QPoint pt = m_origGeom.center() - m_widget->geometry().center();
430
431 ChangeLayoutItemGeometry *cmd = nullptr;
432
433 switch (m_type) {
434 default:
435 break;
436
437 case WidgetHandle::Top: {
438 if (pt.y() < 0 && info.height() > 1) {
439 cmd = new ChangeLayoutItemGeometry(m_formWindow);
440 cmd->init(m_widget, info.y() + 1, info.x(), info.height() - 1, info.width());
441 } else if (pt.y() > 0 && top != -1 && grid->itemAt(top)->spacerItem()) {
442 cmd = new ChangeLayoutItemGeometry(m_formWindow);
443 cmd->init(m_widget, info.y() - 1, info.x(), info.height() + 1, info.width());
444 }
445 }
446 break;
447
448 case WidgetHandle::Left: {
449 if (pt.x() < 0 && info.width() > 1) {
450 cmd = new ChangeLayoutItemGeometry(m_formWindow);
451 cmd->init(m_widget, info.y(), info.x() + 1, info.height(), info.width() - 1);
452 } else if (pt.x() > 0 && left != -1 && grid->itemAt(left)->spacerItem()) {
453 cmd = new ChangeLayoutItemGeometry(m_formWindow);
454 cmd->init(m_widget, info.y(), info.x() - 1, info.height(), info.width() + 1);
455 }
456 }
457 break;
458
459 case WidgetHandle::Right: {
460 if (pt.x() > 0 && info.width() > 1) {
461 cmd = new ChangeLayoutItemGeometry(m_formWindow);
462 cmd->init(m_widget, info.y(), info.x(), info.height(), info.width() - 1);
463 } else if (pt.x() < 0 && right != -1 && grid->itemAt(right)->spacerItem()) {
464 cmd = new ChangeLayoutItemGeometry(m_formWindow);
465 cmd->init(m_widget, info.y(), info.x(), info.height(), info.width() + 1);
466 }
467 }
468 break;
469
470 case WidgetHandle::Bottom: {
471 if (pt.y() > 0 && info.height() > 1) {
472 cmd = new ChangeLayoutItemGeometry(m_formWindow);
473 cmd->init(m_widget, info.y(), info.x(), info.height() - 1, info.width());
474 } else if (pt.y() < 0 && bottom != -1 && grid->itemAt(bottom)->spacerItem()) {
475 cmd = new ChangeLayoutItemGeometry(m_formWindow);
476 cmd->init(m_widget, info.y(), info.x(), info.height() + 1, info.width());
477 }
478 }
479 break;
480 }
481
482 if (cmd != nullptr) {
483 m_formWindow->commandHistory()->push(cmd);
484 } else {
485 grid->invalidate();
486 grid->activate();
487 m_formWindow->clearSelection(false);
488 m_formWindow->selectWidget(m_widget);
489 }
490}
491
492void WidgetHandle::trySetGeometry(QWidget *w, int x, int y, int width, int height)
493{
494 if (!m_formWindow->hasFeature(FormWindow::EditFeature))
495 return;
496
497 int minw = w->minimumSize().width();
498 minw = qMax(minw, 2 * m_formWindow->grid().x());
499
500 int minh = w->minimumSize().height();
501 minh = qMax(minh, 2 * m_formWindow->grid().y());
502
503 if (qMax(minw, width) > w->maximumWidth() ||
504 qMax(minh, height) > w->maximumHeight())
505 return;
506
507 if (width < minw && x != w->x())
508 x -= minw - width;
509
510 if (height < minh && y != w->y())
511 y -= minh - height;
512
513 w->setGeometry(x, y, qMax(minw, width), qMax(minh, height));
514}
515
516void WidgetHandle::tryResize(QWidget *w, int width, int height)
517{
518 int minw = w->minimumSize().width();
519 minw = qMax(minw, 16);
520
521 int minh = w->minimumSize().height();
522 minh = qMax(minh, 16);
523
524 w->resize(qMax(minw, width), qMax(minh, height));
525}
526
527// ------------------ WidgetSelection
528
529WidgetSelection::WidgetState WidgetSelection::widgetState(const QDesignerFormEditorInterface *core, QWidget *w)
530{
531 bool isManaged;
532 const LayoutInfo::Type lt = LayoutInfo::laidoutWidgetType(core, w, &isManaged);
533 if (lt == LayoutInfo::NoLayout)
534 return UnlaidOut;
535 if (!isManaged)
536 return LaidOut;
537 switch (lt) {
538 case LayoutInfo::Grid:
539 return ManagedGridLayout;
540 case LayoutInfo::Form:
541 return ManagedFormLayout;
542 default:
543 break;
544 }
545 return LaidOut;
546}
547
548WidgetSelection::WidgetSelection(FormWindow *parent) :
549 m_widget(nullptr),
550 m_formWindow(parent)
551{
552 for (int i = WidgetHandle::LeftTop; i < WidgetHandle::TypeCount; ++i)
553 m_handles[i] = new WidgetHandle(m_formWindow, static_cast<WidgetHandle::Type>(i), this);
554 hide();
555}
556
558{
559 if (m_widget != nullptr)
560 m_widget->removeEventFilter(this);
561
562 if (w == nullptr) {
563 hide();
564 m_widget = nullptr;
565 return;
566 }
567
568 m_widget = w;
569
570 m_widget->installEventFilter(this);
571
573
575 show();
576}
577
579{
580 const WidgetState ws = widgetState(m_formWindow->core(), m_widget);
581 bool active[WidgetHandle::TypeCount];
582 std::fill(active, active + WidgetHandle::TypeCount, false);
583 // Determine active handles
584 switch (ws) {
585 case UnlaidOut:
586 std::fill(active, active + WidgetHandle::TypeCount, true);
587 break;
588 case ManagedGridLayout: // Grid: Allow changing span
589 active[WidgetHandle::Left] = active[WidgetHandle::Top] = active[WidgetHandle::Right] = active[WidgetHandle::Bottom] = true;
590 break;
591 case ManagedFormLayout: // Form: Allow changing column span
592 if (const unsigned operation = ChangeFormLayoutItemRoleCommand::possibleOperations(m_formWindow->core(), m_widget)) {
593 active[WidgetHandle::Left] = operation & (ChangeFormLayoutItemRoleCommand::SpanningToField|ChangeFormLayoutItemRoleCommand::FieldToSpanning);
594 active[WidgetHandle::Right] = operation & (ChangeFormLayoutItemRoleCommand::SpanningToLabel|ChangeFormLayoutItemRoleCommand::LabelToSpanning);
595 }
596 break;
597 default:
598 break;
599 }
600
601 for (int i = WidgetHandle::LeftTop; i < WidgetHandle::TypeCount; ++i)
602 if (WidgetHandle *h = m_handles[i]) {
603 h->setWidget(m_widget);
604 h->setActive(active[i]);
605 }
606}
607
609{
610 return m_widget != nullptr;
611}
612
614{
615 if (!m_widget || !m_widget->parentWidget())
616 return;
617
618 QPoint p = m_widget->parentWidget()->mapToGlobal(m_widget->pos());
619 p = m_formWindow->formContainer()->mapFromGlobal(p);
620 const QRect r(p, m_widget->size());
621
622 const int w = 6;
623 const int h = 6;
624
625 for (int i = WidgetHandle::LeftTop; i < WidgetHandle::TypeCount; ++i) {
626 WidgetHandle *hndl = m_handles[ i ];
627 if (!hndl)
628 continue;
629 switch (i) {
630 case WidgetHandle::LeftTop:
631 hndl->move(r.x() - w / 2, r.y() - h / 2);
632 break;
633 case WidgetHandle::Top:
634 hndl->move(r.x() + r.width() / 2 - w / 2, r.y() - h / 2);
635 break;
636 case WidgetHandle::RightTop:
637 hndl->move(r.x() + r.width() - w / 2, r.y() - h / 2);
638 break;
639 case WidgetHandle::Right:
640 hndl->move(r.x() + r.width() - w / 2, r.y() + r.height() / 2 - h / 2);
641 break;
642 case WidgetHandle::RightBottom:
643 hndl->move(r.x() + r.width() - w / 2, r.y() + r.height() - h / 2);
644 break;
645 case WidgetHandle::Bottom:
646 hndl->move(r.x() + r.width() / 2 - w / 2, r.y() + r.height() - h / 2);
647 break;
648 case WidgetHandle::LeftBottom:
649 hndl->move(r.x() - w / 2, r.y() + r.height() - h / 2);
650 break;
651 case WidgetHandle::Left:
652 hndl->move(r.x() - w / 2, r.y() + r.height() / 2 - h / 2);
653 break;
654 default:
655 break;
656 }
657 }
658}
659
661{
662 for (WidgetHandle *h : m_handles) {
663 if (h)
664 h->hide();
665 }
666}
667
669{
670 for (WidgetHandle *h : m_handles) {
671 if (h) {
672 h->show();
673 h->raise();
674 }
675 }
676}
677
679{
680 for (WidgetHandle *h : m_handles) {
681 if (h)
682 h->update();
683 }
684}
685
687{
688 return m_widget;
689}
690
691QDesignerFormEditorInterface *WidgetSelection::core() const
692{
693 if (m_formWindow)
694 return m_formWindow->core();
695
696 return nullptr;
697}
698
699bool WidgetSelection::eventFilter(QObject *object, QEvent *event)
700{
701 if (object != widget())
702 return false;
703
704 switch (event->type()) {
705 default: break;
706
707 case QEvent::Move:
708 case QEvent::Resize:
710 break;
711 case QEvent::ZOrderChange:
712 show();
713 break;
714 } // end switch
715
716 return false;
717}
718
719}
720
721QT_END_NAMESPACE
friend class QWidget
Definition qpainter.h:432
QDesignerFormEditorInterface * core() const override
Returns a pointer to \QD's current QDesignerFormEditorInterface object.
void clearSelection(bool changePropertyDisplay=true) override
Clears the current selection in the form window.
QWidget * formContainer() const override
Returns the form the widget containing the main container widget.
void selectWidget(QWidget *w, bool select=true) override
If select is true, the given widget is selected; otherwise the widget is deselected.
void emitSelectionChanged() override
Emits the selectionChanged() signal.
void updateChildSelections(QWidget *w)
QDesignerFormEditorInterface * core() const
WidgetHandle(FormWindow *parent, Type t, WidgetSelection *s)
void mouseReleaseEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
void mousePressEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
void mouseMoveEvent(QMouseEvent *e) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse move events ...
void paintEvent(QPaintEvent *e) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
QDesignerFormEditorInterface * core() const
Auxiliary methods to store/retrieve settings.
static int formLayoutRightHandleOperation(int dx, unsigned possibleOperations)
static int formLayoutLeftHandleOperation(int dx, unsigned possibleOperations)
static Layout * managedLayoutOf(const QDesignerFormEditorInterface *core, QWidget *w, const Layout *=nullptr)