Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 682a6745 authored by Leander Schulten's avatar Leander Schulten
Browse files

Add Gap between entries in the ProgramBlockEditor and make connections transparent

parent e4cc7dc0
......@@ -278,6 +278,7 @@ void ProgramBlockEditor::recreateView(){
int y = 0;
int x = 0;
const int LAYER_OFFSET = 15;
const int GAP_BETWEEN_BLOCKS = 10;
int layerOffsetX = 0;
for(const auto & p : programBlock->getPrograms()){
QQuickItem* component = qobject_cast<QQuickItem*>(programBlockEntry.create());
......@@ -287,7 +288,7 @@ void ProgramBlockEditor::recreateView(){
component->setWidth(p.get()->getOutputLength() * scale);
component->setProperty("propertyBase",QVariant::fromValue(static_cast<PropertyBase*>(p.get())));
component->setObjectName("removeable");
x += component->width();
x += component->width() + GAP_BETWEEN_BLOCKS;
components[p.get()] = component;
}
x=0;
......@@ -306,7 +307,7 @@ void ProgramBlockEditor::recreateView(){
component->setProperty("propertyBase",QVariant::fromValue(dynamic_cast<PropertyBase*>(p.second.source.get())));
component->setObjectName("removeable");
components[dynamic_cast<Named*>(p.second.source.get())] = component;
x+= component->width();
x+= component->width() + GAP_BETWEEN_BLOCKS;
lastLayer = p.first;
}
y+=spaceBetweenLayers;
......@@ -320,7 +321,7 @@ void ProgramBlockEditor::recreateView(){
component->setWidth(p.source.get()->getInputLength() * scale);
component->setProperty("propertyBase",QVariant::fromValue(dynamic_cast<PropertyBase*>(p.source.get())));
component->setObjectName("removeable");
x += component->width();
x += component->width() + GAP_BETWEEN_BLOCKS;
components[dynamic_cast<Named*>(p.source.get())] = component;
}
......@@ -340,7 +341,7 @@ void ProgramBlockEditor::recreateView(){
const auto elem2 = components[dynamic_cast<Named*>(p.second.source.get())];
component->setProperty("sourceStartIndex",index*scale + elem2->x());
component->setProperty("sourceBaseline",elem2->y());
component->setProperty("color",QColor(23,255,23));
component->setProperty("color",QColor(23,255,23,50));
component->setObjectName("removeable");
QObject::connect(elem1,&QQuickItem::xChanged,[=](){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment