PIValueTreeEdit interaction control abilities

This commit is contained in:
2023-04-10 13:17:44 +03:00
parent 396b1bc309
commit 893049550b
2 changed files with 30 additions and 1 deletions

View File

@@ -61,6 +61,9 @@ public:
bool isFullEditMode() const { return is_full_edit; }
void setFullEditMode(bool yes);
void setAllowedNamesFunction(std::function<PIStringList()> f) { allowed_names = f; }
void setValueForNameFunction(std::function<PIVariant(PIString)> f) { value_by_name = f; }
void rollback();
void clear();
void retranslate();
@@ -80,6 +83,7 @@ private:
void actionTriggered(QToolButton * button, const PIString & vn, QAction * a);
void newRequest(NewType type);
PIValueTreeEdit * addTreeEdit(const PIValueTree & vt);
PIValueTreeEdit * rootTreeEdit();
void addValueEdit(const PIValueTree & vt);
void applyArrayAttributes();
QLabel * newLabel(const PIValueTree & vt);
@@ -137,6 +141,8 @@ private:
Grouping cur_grouping = Parent, real_grouping = Indent;
mutable PIValueTree source, current;
bool is_full_edit = false;
std::function<PIStringList()> allowed_names;
std::function<PIVariant(PIString)> value_by_name;
};