| 147 | // Derived class constructors |
| 148 | |
| 149 | MesonOptionArrayView::MesonOptionArrayView(MesonOptionPtr option, QWidget* parent) |
| 150 | : MesonOptionBaseView(option, parent) |
| 151 | , m_option(dynamic_pointer_cast<MesonOptionArray>(option)) |
| 152 | { |
| 153 | Q_ASSERT(m_option); |
| 154 | |
| 155 | m_input = new QPushButton(this); |
| 156 | connect(m_input, &QPushButton::clicked, this, [this]() { |
| 157 | MesonListEditor editor(m_option->rawValue(), this); |
| 158 | if (editor.exec() == QDialog::Accepted) { |
| 159 | m_option->setValue(editor.content()); |
| 160 | m_input->setText(m_option->value()); |
| 161 | setChanged(m_option->isUpdated()); |
| 162 | } |
| 163 | }); |
| 164 | setInputWidget(m_input); |
| 165 | } |
| 166 | |
| 167 | MesonOptionBoolView::MesonOptionBoolView(MesonOptionPtr option, QWidget* parent) |
| 168 | : MesonOptionBaseView(option, parent) |