MCPcopy Create free account
hub / github.com/comaps/comaps / CreateFeatureDialog

Method CreateFeatureDialog

qt/create_feature_dialog.cpp:14–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include <QtWidgets/QVBoxLayout>
13
14CreateFeatureDialog::CreateFeatureDialog(QWidget * parent, osm::NewFeatureCategories & cats) : QDialog(parent)
15{
16 cats.AddLanguage("en");
17 cats.AddLanguage(languages::GetCurrentNorm());
18
19 QListWidget * allSortedList = new QListWidget();
20
21 for (auto const & name : cats.GetAllCreatableTypeNames())
22 new QListWidgetItem(QString::fromStdString(name), allSortedList);
23
24 connect(allSortedList, &QAbstractItemView::clicked, this, &CreateFeatureDialog::OnListItemSelected);
25
26 QDialogButtonBox * dbb = new QDialogButtonBox();
27 dbb->addButton(QDialogButtonBox::Close);
28 connect(dbb, &QDialogButtonBox::clicked, this, &QDialog::reject);
29
30 QVBoxLayout * vBox = new QVBoxLayout();
31 vBox->addWidget(allSortedList);
32 vBox->addWidget(dbb);
33 setLayout(vBox);
34
35 setWindowTitle("OSM Editor");
36}
37
38void CreateFeatureDialog::OnListItemSelected(QModelIndex const & i)
39{

Callers

nothing calls this directly

Calls 2

GetCurrentNormFunction · 0.85
AddLanguageMethod · 0.80

Tested by

no test coverage detected