30 : QWidget(parent), m_button(
new QToolButton(
this))
32 QLayout *layout =
new QHBoxLayout(
this);
33 layout->setContentsMargins(QMargins());
34 layout->addWidget(editor);
36 m_button->setToolButtonStyle(Qt::ToolButtonIconOnly);
37 m_button->setIcon(createIconSet(
"resetproperty.png"_L1));
38 m_button->setIconSize(QSize(8,8));
39 m_button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding));
40 connect(m_button, &QAbstractButton::clicked,
this, &ResetWidget::reset);
41 layout->addWidget(m_button);
42 setFocusProxy(editor);
43 setAutoFillBackground(
true);
44 setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
70 const QString &propertyName)
72 const QDesignerFormWindowInterface *form = core->formWindowManager()->activeFormWindow();
75 const QDesignerFormWindowCursorInterface *cursor = form->cursor();
76 const int selectionSize = cursor->selectedWidgetCount();
77 if (selectionSize < 2)
79 for (
int i = 0; i < selectionSize; ++i) {
80 const QDesignerPropertySheetExtension *sheet =
81 qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(),
82 cursor->selectedWidget(i));
83 const int index = sheet->indexOf(propertyName);
84 if (index >= 0 && sheet->isChanged(index))
102 m_property(property),
103 m_textLabel(
new QLabel(
this)),
104 m_iconLabel(
new QLabel(
this))
106 m_textLabel->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed));
107 m_iconLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
108 QLayout *layout =
new QHBoxLayout(
this);
109 layout->setContentsMargins({});
110 layout->addWidget(m_iconLabel);
111 layout->addWidget(m_textLabel);