-using namespace std;
-// File : SUPERVGUI_ControlNode.cxx
-// Created : 14 / 01 / 2003
-// Author : Vitaly SMETANNIKOV
-// Project : SALOME
-// Module : SUPERVGUI
-// Copyright : Open CASCADE
-
+// SUPERV SUPERVGUI : GUI for Supervisor component
+//
+// Copyright (C) 2003 CEA/DEN, EDF R&D
+//
+//
+//
+// File : SUPERVGUI_ControlNode.cxx
+// Author : Vitaly SMETANNIKOV
+// Module : SUPERV
+using namespace std;
#include "SUPERVGUI_ControlNode.h"
#include <qapplication.h>
#include "SUPERVGUI_Main.h"
myPortsBox->reparent(this, pos());
aGridLayout->addMultiCellWidget(myPortsBox, 1, 1, 0, 1);
+ // myGatesBox->setPaletteBackgroundColor(backgroundColor().dark(105));
myStatus->reparent(this, pos());
myTime->reparent(this, pos());
void SUPERVGUI_StartControlNode::remove() {
myEndNode->deleteLinks();
deleteLinks();
- myEndNode->getEngine()->destroy();
myNode->destroy();
myMain->getGraph()->deleteNode(myEndNode);
myMain->getGraph()->deleteNode(this);
myEndNode = theEndNode;
}
+SUPERVGUI_EndControlNode* SUPERVGUI_StartControlNode::getEndNode() {
+ return myEndNode;
+}
+
void SUPERVGUI_StartControlNode::setShape() {
int aH = height();
void SUPERVGUI_StartControlNode::deletePort(SUPERVGUI_Port* thePort) {
if (getNodeType() == SUPERV::LoopNode) {
+
SUPERV_Port aPortEngine = thePort->getPort();
QString aName(aPortEngine->Name());
QString aNameIn = aName + "Input";
myPIcount--;
myPOcount--;
+
myEndNode->getPIcount()--;
myEndNode->getPOcount()--;
-
+
aPortEngine->destroy();
+
updatePorts();
updateShape();
myEndNode->updatePorts();
}
+QPoint SUPERVGUI_StartControlNode::getOutConnectPnt() {
+ return QPoint(pos().x() + width() - LABEL_HEIGHT/2,
+ pos().y() + (height()/2));
+}
+
+
//-----------------------------------------------------------
//******************* End Node ******************************
//-----------------------------------------------------------
myTitle->setPaletteBackgroundColor(TITLECOLOR);
aGridLayout->addMultiCellWidget(myTitle, 0, 0, 0, 2);
- myPortsBox = new QFrame(this);
- myPortLayout = new QGridLayout(myPortsBox, 0, 2, 0, 1);
+ myPortsBox->reparent(this, pos());
- myPIcount = 0;
- myPOcount = 0;
- SUPERV_Ports ports = myNode->Ports();
- int n = ports->length();
-
- for (int i=0; i<n; i++) {
- if (ports[i]->IsInput()) {
- myPortLayout->addWidget(new SUPERVGUI_PortIn(myPortsBox, myMain, ports[i]),
- myPIcount, 0);
- myPIcount++;
- } else {
- myPortLayout->addWidget(new SUPERVGUI_PortOut(myPortsBox, myMain, ports[i]),
- myPOcount, 1, Qt::AlignRight);
- myPOcount++;
- }
- }
aGridLayout->addMultiCellWidget(myPortsBox, 1, 1, 1, 2);
-
+
myStatus->reparent(this, pos());
myTime->reparent(this, pos());
aGridLayout->addMultiCellWidget(myStatus, 2, 2, 0, 1);
}
+QPoint SUPERVGUI_EndControlNode::getInConnectPnt() {
+ return QPoint(pos().x() + LABEL_HEIGHT/2,
+ pos().y() + (height()/2));
+}
+
+
//-----------------------------------------------------------
//******************* GoTo Node *****************************
//-----------------------------------------------------------