117 |
117 |
118 ObjectEditor::ObjectEditor(QWidget* parent) : |
118 ObjectEditor::ObjectEditor(QWidget* parent) : |
119 QWidget{parent} |
119 QWidget{parent} |
120 { |
120 { |
121 this->ui.setupUi(this); |
121 this->ui.setupUi(this); |
122 this->editorwidgets.resize(NUM_PROPERTIES); |
|
123 QFormLayout* layout = new QFormLayout{this}; |
|
124 for (std::size_t i = 0; i < NUM_PROPERTIES; ++i) { |
|
125 const auto key = static_cast<PropertyKey>(i); |
|
126 QLabel* const label = new QLabel{propertyName(key), this}; |
|
127 QWidget* const field = new QWidget{this}; |
|
128 this->editorwidgets[i] = field; |
|
129 layout->addRow(label, field); |
|
130 } |
|
131 this->ui.properties->setLayout(layout); |
|
132 } |
122 } |