Added read-only 'expression' property to QunatitySpinBox and renamed 'boundTo' to 'binding'.

This commit is contained in:
Markus Lampert
2017-10-06 19:02:44 -07:00
committed by wmayer
parent 7a352fea52
commit b28e48c10b
2 changed files with 17 additions and 3 deletions

View File

@@ -328,8 +328,18 @@ void QuantitySpinBox::setBoundToByName(const QString &qstr)
}
}
void Gui::QuantitySpinBox::onChange() {
QString Gui::QuantitySpinBox::expressionText() const
{
Q_D(const QuantitySpinBox);
if (isBound()) {
return QString::fromStdString(getExpressionString());
}
return QString();
}
void Gui::QuantitySpinBox::onChange()
{
Q_ASSERT(isBound());
if (getExpression()) {