|
@@ -300,7 +300,6 @@ CollapsibleRow::CollapsibleRow(QWidget *parent) : GenericRow(parent)
|
|
actionRow->setFocusProxy(expandButton);
|
|
actionRow->setFocusProxy(expandButton);
|
|
|
|
|
|
connect(expandButton, &QAbstractButton::clicked, this, &CollapsibleRow::toggleVisibility);
|
|
connect(expandButton, &QAbstractButton::clicked, this, &CollapsibleRow::toggleVisibility);
|
|
-
|
|
|
|
connect(actionRow, &Row::clicked, expandButton, &QAbstractButton::click);
|
|
connect(actionRow, &Row::clicked, expandButton, &QAbstractButton::click);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -316,6 +315,7 @@ void CollapsibleRow::setCheckable(bool check)
|
|
|
|
|
|
actionRow->setSuffix(toggleSwitch, false);
|
|
actionRow->setSuffix(toggleSwitch, false);
|
|
connect(toggleSwitch, &ToggleSwitch::toggled, propertyList, &PropertiesList::setEnabled);
|
|
connect(toggleSwitch, &ToggleSwitch::toggled, propertyList, &PropertiesList::setEnabled);
|
|
|
|
+ connect(toggleSwitch, &ToggleSwitch::toggled, this, &CollapsibleRow::toggled);
|
|
}
|
|
}
|
|
|
|
|
|
if (!checkable && toggleSwitch) {
|
|
if (!checkable && toggleSwitch) {
|
|
@@ -326,6 +326,15 @@ void CollapsibleRow::setCheckable(bool check)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void CollapsibleRow::setChecked(bool checked)
|
|
|
|
+{
|
|
|
|
+ if (!isCheckable()) {
|
|
|
|
+ throw std::logic_error("Called setChecked on a non-checkable row.");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ toggleSwitch->setChecked(checked);
|
|
|
|
+}
|
|
|
|
+
|
|
void CollapsibleRow::setTitle(const QString &name)
|
|
void CollapsibleRow::setTitle(const QString &name)
|
|
{
|
|
{
|
|
actionRow->setTitle(name);
|
|
actionRow->setTitle(name);
|