Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2016-04-26 20:48:19 +0300
committerAlex Zolotarev <alex@maps.me>2016-05-01 10:28:03 +0300
commit861cdb910ca40f48dbaf8e096707f0b3b912bb42 (patch)
tree9599e020017dde614929b28a07aceead73363319 /qt
parent0b20c90890459444778897c1fa5cd6a68538f30a (diff)
[editor] Implemented search of a category for a newly added object.
Diffstat (limited to 'qt')
-rw-r--r--qt/create_feature_dialog.cpp61
-rw-r--r--qt/create_feature_dialog.hpp2
2 files changed, 35 insertions, 28 deletions
diff --git a/qt/create_feature_dialog.cpp b/qt/create_feature_dialog.cpp
index 258c95bedd..4495ab30b7 100644
--- a/qt/create_feature_dialog.cpp
+++ b/qt/create_feature_dialog.cpp
@@ -9,33 +9,40 @@
CreateFeatureDialog::CreateFeatureDialog(QWidget * parent, osm::NewFeatureCategories const & cats)
: QDialog(parent)
{
- QListWidget * lastUsedList = new QListWidget();
- for (auto const & cat : cats.m_lastUsed)
- {
- QListWidgetItem * lwi = new QListWidgetItem(cat.m_name.c_str(), lastUsedList);
- lwi->setData(Qt::UserRole, cat.m_type);
- }
- connect(lastUsedList, SIGNAL(clicked(QModelIndex const &)), this, SLOT(OnListItemSelected(QModelIndex const &)));
-
- QListWidget * allSortedList = new QListWidget();
- for (auto const & cat : cats.m_allSorted)
- {
- QListWidgetItem * lwi = new QListWidgetItem(cat.m_name.c_str(), allSortedList);
- lwi->setData(Qt::UserRole, cat.m_type);
- }
- connect(allSortedList, SIGNAL(clicked(QModelIndex const &)), this, SLOT(OnListItemSelected(QModelIndex const &)));
-
- QVBoxLayout * vBox = new QVBoxLayout();
- vBox->addWidget(lastUsedList);
- vBox->addWidget(allSortedList);
-
- QDialogButtonBox * dbb = new QDialogButtonBox();
- dbb->addButton(QDialogButtonBox::Close);
- connect(dbb, SIGNAL(clicked(QAbstractButton*)), this, SLOT(reject()));
- vBox->addWidget(dbb);
-
- setLayout(vBox);
- setWindowTitle("OSM Editor");
+ // todo(@m) Fix this.
+ /*
+ QListWidget * lastUsedList = new QListWidget();
+
+ for (auto const & cat : cats.m_lastUsed)
+ {
+ QListWidgetItem * lwi = new QListWidgetItem(cat.m_name.c_str(), lastUsedList);
+ lwi->setData(Qt::UserRole, cat.m_type);
+ }
+ connect(lastUsedList, SIGNAL(clicked(QModelIndex const &)), this,
+ SLOT(OnListItemSelected(QModelIndex const &)));
+
+ QListWidget * allSortedList = new QListWidget();
+ for (auto const & cat : cats.m_allSorted)
+ {
+ QListWidgetItem * lwi = new QListWidgetItem(cat.m_name.c_str(), allSortedList);
+ lwi->setData(Qt::UserRole, cat.m_type);
+ }
+ connect(allSortedList, SIGNAL(clicked(QModelIndex const &)), this,
+ SLOT(OnListItemSelected(QModelIndex const &)));
+
+ QVBoxLayout * vBox = new QVBoxLayout();
+ vBox->addWidget(lastUsedList);
+ vBox->addWidget(allSortedList);
+
+
+ QDialogButtonBox * dbb = new QDialogButtonBox();
+ dbb->addButton(QDialogButtonBox::Close);
+ connect(dbb, SIGNAL(clicked(QAbstractButton*)), this, SLOT(reject()));
+ vBox->addWidget(dbb);
+
+ setLayout(vBox);
+ setWindowTitle("OSM Editor");
+ */
}
void CreateFeatureDialog::OnListItemSelected(QModelIndex const & i)
diff --git a/qt/create_feature_dialog.hpp b/qt/create_feature_dialog.hpp
index 045b5f1502..5cd0ab4d0d 100644
--- a/qt/create_feature_dialog.hpp
+++ b/qt/create_feature_dialog.hpp
@@ -5,7 +5,7 @@
class QModelIndex;
namespace osm
{
-struct NewFeatureCategories;
+class NewFeatureCategories;
} // namespace osm
class CreateFeatureDialog : public QDialog