fix CLineEdit read-only button
PIValueTreeEdit support PIValueTree::Attribute::toolTip
This commit is contained in:
@@ -88,6 +88,7 @@ bool PIValueTreeEditParameters::showFor(PIValueTree & vt) {
|
||||
checkLabel->setChecked(vt.attribute(Attribute::isLabel, false).toBool());
|
||||
checkLabel->blockSignals(false);
|
||||
lineComment->setText(PI2QString(vt.comment()));
|
||||
lineToolTip->setText(PI2QString(vt.attribute(Attribute::toolTip).toString()));
|
||||
createAttributes(ve_attr, layoutAttributes, vt.attributes());
|
||||
|
||||
if (exec() != QDialog::Accepted) return false;
|
||||
@@ -109,8 +110,13 @@ void PIValueTreeEditParameters::createAttributes(QList<PIVariantEdit *> & list,
|
||||
QFormLayout * lay,
|
||||
const PIVariantMap & attr,
|
||||
bool inv_filter) {
|
||||
static PIStringList hidden(
|
||||
{"type", Attribute::hidden, Attribute::readOnly, Attribute::isLabel, Attribute::arrayType, Attribute::expression});
|
||||
static PIStringList hidden({"type",
|
||||
Attribute::hidden,
|
||||
Attribute::readOnly,
|
||||
Attribute::toolTip,
|
||||
Attribute::isLabel,
|
||||
Attribute::arrayType,
|
||||
Attribute::expression});
|
||||
static PIStringList filter({Attribute::arrayMinCount, Attribute::arrayMaxCount, Attribute::arrayReorder, Attribute::arrayResize});
|
||||
list.clear();
|
||||
while (lay->rowCount() > 0)
|
||||
@@ -163,6 +169,7 @@ void PIValueTreeEditParameters::applyAttributes(PIValueTree & vt) {
|
||||
vt.setAttribute(Attribute::hidden, checkHidden->isChecked());
|
||||
vt.setAttribute(Attribute::readOnly, checkReadOnly->isChecked());
|
||||
vt.setAttribute(Attribute::isLabel, checkLabel->isChecked());
|
||||
vt.setAttribute(Attribute::toolTip, Q2PIString(lineToolTip->text()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user