| 188 | } |
| 189 | |
| 190 | QLineEdit* OptionsWidget::AddOptionDirPath(std::filesystem::path* option, |
| 191 | const std::string& label_text) { |
| 192 | QLineEdit* line_edit = new QLineEdit(this); |
| 193 | line_edit->setText(QString::fromStdString(option->string())); |
| 194 | |
| 195 | AddOptionRow(label_text, line_edit, option); |
| 196 | |
| 197 | auto SelectPathFunc = [this, line_edit]() { |
| 198 | line_edit->setText( |
| 199 | QFileDialog::getExistingDirectory(this, tr("Select folder"))); |
| 200 | }; |
| 201 | |
| 202 | QPushButton* select_button = new QPushButton(tr("Select folder"), this); |
| 203 | select_button->setFont(font()); |
| 204 | connect(select_button, &QPushButton::released, this, SelectPathFunc); |
| 205 | grid_layout_->addWidget(select_button, grid_layout_->rowCount(), 1); |
| 206 | |
| 207 | options_path_.emplace_back(line_edit, option); |
| 208 | |
| 209 | return line_edit; |
| 210 | } |
| 211 | |
| 212 | void OptionsWidget::AddSpacer() { |
| 213 | QLabel* label = new QLabel("", this); |
nothing calls this directly
no outgoing calls
no test coverage detected