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

lambda capture syntax

parent 30ee3395
No related branches found
No related tags found
1 merge request!2003In GUI, remove option to switch beteen nm and angstrom, degrees and radians.
......@@ -143,8 +143,7 @@ int FormLayouter::addValue(DoubleProperty& d, function<void(double)> onValueChan
void FormLayouter::insertValue(int row, DoubleProperty& d)
{
auto* ec = m_ec; // to allow copy-capture in the following lambda
insertValue(row, d, [ec, &d](double newValue) { ec->setDouble(newValue, d); });
insertValue(row, d, [ec=m_ec, &d](double newValue) { ec->setDouble(newValue, d); });
}
void FormLayouter::insertValue(int row, DoubleProperty& d, function<void(double)> onValueChange)
......
......@@ -23,12 +23,12 @@
class SampleEditorController;
class VectorProperty;
//! Utility class to populate a QFormLayout.
//! Utility class to populate a QFormLayout with the SampleDesigner.
//!
//! Helps to add edit controls which operate on Properties (DoubleProperty, VectorProperty,
//! SelectionProperty). Also takes care of bold printed labels, the connection of labels and edit
//! controls (buddies), which is necessary to realize the "label shows unit of value" feature.
//! Connections to a given SampleEditorController are established as well.
//! Establishes connections to the SampleEditorController.
class FormLayouter {
public:
//! Create a layouter which operates on the given parent widget.
......
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