PIValueTreeEdit label switch support, label style

This commit is contained in:
2022-12-16 23:06:53 +03:00
parent 55e5e819f8
commit 5327e4f7b0
6 changed files with 145 additions and 13 deletions

View File

@@ -76,6 +76,7 @@ private:
PIValueTreeEdit * addTreeEdit(const PIValueTree & vt);
void addValueEdit(const PIValueTree & vt);
void applyArrayAttributes();
QLabel * newLabel(const PIValueTree & vt);
class GridWidgets: public QWidget {
public:
@@ -86,6 +87,8 @@ private:
void removeRow(int index);
void add(const PIValueTree & vt, QString label, QWidget * w, const QString & comment, bool is_group = false);
void add(const PIValueTree & vt, QWidget * w, bool is_group = false);
void replace(int row, QWidget * w);
void replace(int row, QString label, QWidget * w, const QString & comment);
int beginRow(const PIValueTree & vt, bool is_group);
void rename(QString prev_name, QString new_name);
void reorder(const PIMap<int, int> & map) { simplify(map); }
@@ -96,6 +99,7 @@ private:
QToolButton * button_add;
private:
int removeRowEdits(int row);
void simplify(const PIMap<int, int> & map = PIMap<int, int>());
int row_count = 0;
@@ -114,7 +118,7 @@ private:
PIVector<PIVariantEdit *> array_edits;
PIMap<PIString, PIVariantEdit *> value_edits;
PIMap<PIString, PIValueTreeEdit *> tree_edits;
PIMap<PIString, QLabel *> comm_labels;
PIMap<PIString, QLabel *> comm_labels, label_labels;
Ui::PIValueTreeEditArray * ui_array;
GridWidgets * grid = nullptr;
mutable PIValueTree source;