mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-11 14:44:15 +02:00
Revert "Add cable management: drawing, cores, numbering, cross-references and cable list"
This commit is contained in:
@@ -18,10 +18,6 @@
|
||||
#include "propertieseditorfactory.h"
|
||||
|
||||
#include "../PropertiesEditor/propertieseditorwidget.h"
|
||||
#include "../cable/cablepart.h"
|
||||
#include "../cable/cablepropertieseditorwidget.h"
|
||||
#include "../cablelist/cablelistmodel.h"
|
||||
#include "../cablelist/cablelistmodelpropertieswidget.h"
|
||||
#include "../qetgraphicsitem/ViewItem/projectdbmodel.h"
|
||||
#include "../qetgraphicsitem/ViewItem/qetgraphicstableitem.h"
|
||||
#include "../qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h"
|
||||
@@ -59,7 +55,7 @@ PropertiesEditorWidget *PropertiesEditorFactory::propertiesEditor(
|
||||
PropertiesEditorWidget *editor,
|
||||
QWidget *parent)
|
||||
{
|
||||
if (auto m = dynamic_cast<ProjectDBModel *>(model))
|
||||
if (auto m = static_cast<ProjectDBModel *>(model))
|
||||
{
|
||||
if (editor &&
|
||||
editor->metaObject()->className()
|
||||
@@ -70,17 +66,6 @@ PropertiesEditorWidget *PropertiesEditorFactory::propertiesEditor(
|
||||
}
|
||||
return new ProjectDBModelPropertiesWidget(m, parent);
|
||||
}
|
||||
if (auto m = dynamic_cast<CableListModel *>(model))
|
||||
{
|
||||
if (editor &&
|
||||
editor->metaObject()->className()
|
||||
== CableListModelPropertiesWidget::staticMetaObject.className())
|
||||
{
|
||||
static_cast<CableListModelPropertiesWidget *>(editor)->setModel(m);
|
||||
return editor;
|
||||
}
|
||||
return new CableListModelPropertiesWidget(m, parent);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -262,27 +247,6 @@ PropertiesEditorWidget *PropertiesEditorFactory::propertiesEditor(
|
||||
}
|
||||
return new GraphicsTablePropertiesEditor(table, parent);
|
||||
}
|
||||
case CablePart::Type: //1012
|
||||
{
|
||||
if (count_ > 1) {
|
||||
return nullptr;
|
||||
}
|
||||
auto part = static_cast<CablePart *>(item);
|
||||
//The fields belong to the cable, never to one of its
|
||||
//lines: whichever line is picked, it is the cable which
|
||||
//is edited.
|
||||
Cable *cable = part->cable();
|
||||
if (!cable) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (class_name == CablePropertiesEditorWidget::staticMetaObject.className())
|
||||
{
|
||||
static_cast<CablePropertiesEditorWidget *>(editor)->setCable(cable, part);
|
||||
return editor;
|
||||
}
|
||||
return new CablePropertiesEditorWidget(cable, part, parent);
|
||||
}
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user