MCPcopy Create free account
hub / github.com/colmap/colmap / AddOptionDirPath

Method AddOptionDirPath

src/colmap/ui/options_widget.cc:190–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190QLineEdit* 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
212void OptionsWidget::AddSpacer() {
213 QLabel* label = new QLabel("", this);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected