PIValueTreeEdit almost finish fullEditMode
This commit is contained in:
@@ -19,6 +19,11 @@ bool PIVariantEditorBase::editorExists(uint type_id) {
|
||||
}
|
||||
|
||||
|
||||
PIVariantMap PIVariantEditorBase::editorDefaultAttributes(uint type_id) {
|
||||
return default_attributes().value(type_id);
|
||||
}
|
||||
|
||||
|
||||
void PIVariantEditorBase::createBoxLayout(QBoxLayout::Direction d) {
|
||||
auto * l = new QBoxLayout(d);
|
||||
l->setContentsMargins(0, 0, 0, 0);
|
||||
@@ -38,6 +43,12 @@ PIMap<uint, PIVariantEditorBase * (*)()> & PIVariantEditorBase::factories() {
|
||||
}
|
||||
|
||||
|
||||
PIMap<uint, PIVariantMap> & PIVariantEditorBase::default_attributes() {
|
||||
static PIMap<uint, PIVariantMap> ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
PIVariantEdit::PIVariantEdit(QWidget * parent): QWidget(parent) {
|
||||
label = new QLabel();
|
||||
label->setAlignment(Qt::AlignCenter);
|
||||
@@ -88,9 +99,9 @@ void PIVariantEdit::setAttributes(const PIVariantMap & a) {
|
||||
}
|
||||
|
||||
|
||||
PIVariantMap PIVariantEdit::defaultAttributes() const {
|
||||
PIVariantMap PIVariantEdit::attributes() const {
|
||||
if (!editor) return PIVariantMap();
|
||||
return editor->defaultAttributes();
|
||||
return editor->attributes();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user