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