mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-06 03:04:13 +02:00
proto: conductor properties in selection-properties dock (#500)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "../qetgraphicsitem/ViewItem/qetgraphicstableitem.h"
|
||||
#include "../qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h"
|
||||
#include "../qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h"
|
||||
#include "../qetgraphicsitem/conductor.h"
|
||||
#include "../qetgraphicsitem/diagramimageitem.h"
|
||||
#include "../qetgraphicsitem/dynamicelementtextitem.h"
|
||||
#include "../qetgraphicsitem/element.h"
|
||||
@@ -30,6 +31,7 @@
|
||||
#include "../qetgraphicsitem/qetshapeitem.h"
|
||||
#include "../ui/dynamicelementtextitemeditor.h"
|
||||
#include "../ui/elementpropertieswidget.h"
|
||||
#include "../ui/conductorpropertieseditorwidget.h"
|
||||
#include "../ui/imagepropertieswidget.h"
|
||||
#include "../ui/inditextpropertieswidget.h"
|
||||
#include "../ui/shapegraphicsitempropertieswidget.h"
|
||||
@@ -100,6 +102,21 @@ PropertiesEditorWidget *PropertiesEditorFactory::propertiesEditor(
|
||||
|
||||
switch (type_)
|
||||
{
|
||||
case Conductor::Type: //1001
|
||||
{
|
||||
//Prototype (#500): single-conductor editing in the dock.
|
||||
if (count_ > 1) {
|
||||
return nullptr;
|
||||
}
|
||||
auto conductor = static_cast<Conductor*>(item);
|
||||
|
||||
if (class_name == ConductorPropertiesEditorWidget::staticMetaObject.className())
|
||||
{
|
||||
static_cast<ConductorPropertiesEditorWidget*>(editor)->setConductor(conductor);
|
||||
return editor;
|
||||
}
|
||||
return new ConductorPropertiesEditorWidget(conductor, parent);
|
||||
}
|
||||
case Element::Type: //1000
|
||||
{
|
||||
if (count_ > 1) {
|
||||
|
||||
Reference in New Issue
Block a user