Skip to content
Snippets Groups Projects
Commit 17b5834a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm using

parent 8799f12a
No related branches found
No related tags found
1 merge request!2211MaskEditorToolpanel now using DoubleSpinBox (#869...)
...@@ -32,15 +32,13 @@ void addSpinBox(MaskItem* mask, QFormLayout* layout, DoubleProperty& property) ...@@ -32,15 +32,13 @@ void addSpinBox(MaskItem* mask, QFormLayout* layout, DoubleProperty& property)
layout->addRow(property.label() + ":", spinbox); layout->addRow(property.label() + ":", spinbox);
QObject::connect(spinbox, &DoubleSpinBox::valueChanged, [mask](double) { QObject::connect(spinbox, &DoubleSpinBox::valueChanged, [mask](double) {
gProjectDocument.value()->setModified(); gProjectDocument.value()->setModified();
emit mask->maskGeometryChanged(); emit mask->maskGeometryChanged();
}); });
} }
} // namespace } // namespace
using std::function;
MaskEditorToolpanel::MaskEditorToolpanel() MaskEditorToolpanel::MaskEditorToolpanel()
: m_listView(new QListView) : m_listView(new QListView)
, m_maskContainerModel(nullptr) , m_maskContainerModel(nullptr)
...@@ -198,8 +196,8 @@ void MaskEditorToolpanel::createMaskEditorUI() ...@@ -198,8 +196,8 @@ void MaskEditorToolpanel::createMaskEditorUI()
addSpinBox(maskItem, m_editor_layout, c->posY()); addSpinBox(maskItem, m_editor_layout, c->posY());
} }
void MaskEditorToolpanel::addMaskCheckBox(const QString& title, function<bool()> getter, void MaskEditorToolpanel::addMaskCheckBox(const QString& title, std::function<bool()> getter,
function<void(bool)> setter) std::function<void(bool)> setter)
{ {
auto* checkBox = new QCheckBox(title, m_editor_layout->parentWidget()); auto* checkBox = new QCheckBox(title, m_editor_layout->parentWidget());
checkBox->setChecked(getter()); checkBox->setChecked(getter());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment