SpinSlider and ScrollSpinBox read-only support
PIVariantEdit - support for read-only for all types PIValueTreeEdit - drop Parent grouping, default now Groups, full grouping control, global read-only support, fix new label error
This commit is contained in:
@@ -49,8 +49,7 @@ public:
|
||||
enum Grouping {
|
||||
Indent,
|
||||
Groups,
|
||||
Tabs,
|
||||
Parent = 0xFF
|
||||
Tabs
|
||||
};
|
||||
|
||||
void setValue(const PIValueTree & v);
|
||||
@@ -60,6 +59,8 @@ public:
|
||||
void setGrouping(Grouping g);
|
||||
bool isFullEditMode() const { return is_full_edit; }
|
||||
void setFullEditMode(bool yes);
|
||||
bool isReadOnly() const { return m_read_only; }
|
||||
void setReadOnly(bool yes);
|
||||
|
||||
void setAllowedNamesFunction(std::function<PIStringList()> f) { allowed_names = f; }
|
||||
void setValueForNameFunction(std::function<PIVariant(PIString)> f) { value_by_name = f; }
|
||||
@@ -97,6 +98,7 @@ private:
|
||||
void applyVariantEdit(PIVariantEdit * ve, const PIValueTree & vt);
|
||||
void createTabWidget();
|
||||
void resizeArray();
|
||||
PIVariantMap attributesWithRO(const PIVariantMap & attr);
|
||||
|
||||
class GridWidgets: public QWidget {
|
||||
public:
|
||||
@@ -146,9 +148,9 @@ private:
|
||||
QTabWidget * tab_widget = nullptr;
|
||||
Ui::PIValueTreeEditArray * ui_array;
|
||||
GridWidgets * grid = nullptr;
|
||||
Grouping cur_grouping = Parent, real_grouping = Indent;
|
||||
Grouping cur_grouping = Groups;
|
||||
mutable PIValueTree source, current;
|
||||
bool is_full_edit = false;
|
||||
bool is_full_edit = false, m_read_only = false;
|
||||
std::function<PIStringList()> allowed_names;
|
||||
std::function<PIVariant(PIString)> value_by_name;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user