Skip to content
Snippets Groups Projects
Commit a12fcf01 authored by Olivier Langella's avatar Olivier Langella
Browse files

edit labeling methods

parent 7385013c
No related branches found
No related tags found
No related merge requests found
......@@ -34,8 +34,8 @@ EditLabelMethods::EditLabelMethods(ProjectWindow *parent):
{
ui->setupUi(this);
_project_window = parent;
_p_modification_str_li = new QStandardItemModel();
ui->method_list_view->setModel(_p_modification_str_li);
_p_label_method_str_li = new QStandardItemModel();
ui->method_list_view->setModel(_p_label_method_str_li);
#if QT_VERSION >= 0x050000
......@@ -58,7 +58,7 @@ EditLabelMethods::~EditLabelMethods() {
void EditLabelMethods::setProjectSp(ProjectSp project_sp) {
_project_sp = project_sp;
_p_modification_str_li->removeRows(0,_p_modification_str_li->rowCount());
_p_label_method_str_li->removeRows(0,_p_label_method_str_li->rowCount());
QDomDocument *dom = new QDomDocument("labeling_methods");
QFile xml_doc(":/labeling/resources/catalog_label.xml");
......@@ -80,7 +80,7 @@ void EditLabelMethods::setProjectSp(ProjectSp project_sp) {
QStandardItem *item;
item = new QStandardItem(QString("%1").arg(child.toElement().attribute("id")));
item->setEditable(false);
_p_modification_str_li->appendRow(item);
_p_label_method_str_li->appendRow(item);
item->setData(QVariant(QString("%1").arg(child.toElement().attribute("id"))),Qt::UserRole);
}
child = child.nextSibling();
......
......@@ -53,6 +53,6 @@ private:
Ui::EditLabelMethodView *ui;
ProjectWindow * _project_window;
ProjectSp _project_sp;
QStandardItemModel * _p_modification_str_li=nullptr;
QStandardItemModel * _p_label_method_str_li=nullptr;
};
#endif // EDITLABELMETHODS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment