}
void SUPERVGUI::displayDataflow() {
- Trace("SUPERVGUI::displayDataflow");
- OB_Browser* aBrowser = (( SalomeApp_Application* )application())->objectBrowser();
- SUPERV_Graph aDataFlow;
- QString aIORName;
-
- OB_ListItem* item = (OB_ListItem*)(aBrowser->listView()->currentItem());
- _PTR(SObject) aObj
- ( (( SalomeApp_Study* )(application()->activeStudy()))->studyDS()->FindObjectID(item->text(2).latin1()) );
- _PTR(GenericAttribute) anAttr;
- if (aObj->FindAttribute(anAttr, "AttributeIOR")) {
- _PTR(AttributeIOR) anIOR ( anAttr );
- aIORName = QString(anIOR->Value().c_str());
- if (isContains(study, aIORName)) {
- if (QMessageBox::warning(application()->desktop(), tr("WARNING"),
- tr("MSG_GRAPH_DISPLAYED").arg(""),
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
- return;
- }
- //aDataFlow = engine->getStreamGraph(anIOR->Value().c_str());
- aDataFlow = engine->getGraph(anIOR->Value().c_str());
- if (SUPERV_isNull(aDataFlow)) {
- QMessageBox::warning(0, tr("ERROR"), tr("MSG_ACCESS_BAD_IOR"));
+ Trace("SUPERVGUI::displayDataflow");
+
+ OB_Browser* aBrowser = getApp()->objectBrowser();
+ OB_ListItem* item = (OB_ListItem*)(aBrowser->listView()->currentItem());
+
+ SalomeApp_Study* anAppStudy = (SalomeApp_Study*)(getApp()->activeStudy());
+ _PTR(SObject) aObj (anAppStudy->studyDS()->FindObjectID(item->text(2).latin1()));
+
+ SUPERV_Graph aDataFlow;
+ QString aIORName;
+
+ _PTR(GenericAttribute) anAttr;
+ if (aObj->FindAttribute(anAttr, "AttributeIOR")) {
+ _PTR(AttributeIOR) anIOR ( anAttr );
+ aIORName = QString(anIOR->Value().c_str());
+ if (isContains(study, aIORName)) {
+ if (QMessageBox::warning(application()->desktop(), tr("WARNING"),
+ tr("MSG_GRAPH_DISPLAYED").arg(""),
+ QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
return;
- }
- /* ASV: 20.10.04: fix for 6896
- if (aDataFlow->IsStreamGraph()) {
- SUPERV_StreamGraph aDataFlowStream = aDataFlow->ToStreamGraph();
- if (SUPERV_isNull(aDataFlowStream)) {
- QMessageBox::warning(0, tr("ERROR"), tr("MSG_ACCESS_BAD_IOR"));
- return;
- }
- aDataFlow = aDataFlowStream;
- }
- */
}
- SUPERVGraph_ViewFrame* aViewFrame;
- if ( !myInitialViewFrame ) {
- // first case : create a ViewFrame object
- aViewFrame = dynamic_cast<SUPERVGraph_ViewFrame*>( createGraph() );
- }
- else {
- // second case : get empty initial view frame as new ViewFrame object
- aViewFrame = myInitialViewFrame;
- // mkr : IPAL12991 -->
- SUPERVGraph_View* view = myInitialViewFrame->getViewWidget();
- if (view)
- unregisterGraph(dynamic_cast<SUPERVGUI_Main*>(view));
- // mkr : IPAL12991 <--
- // mkr : PAL8237 : remove first "gag" Main from children
- // srn: commented as it cases on application exit "X Windows error"
- //aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
+ //SUPERV_Graph aDataFlow = engine->getStreamGraph(anIOR->Value().c_str());
+ aDataFlow = engine->getGraph(anIOR->Value().c_str());
+ if (SUPERV_isNull(aDataFlow)) {
+ QMessageBox::warning(0, tr("ERROR"), tr("MSG_ACCESS_BAD_IOR"));
+ return;
}
- if( aViewFrame ) {
- main = new SUPERVGUI_Main( aViewFrame, application()->desktop(), aDataFlow );
- registerGraph( aIORName, main );
- aViewFrame->show();
+ /* ASV: 20.10.04: fix for 6896
+ if (aDataFlow->IsStreamGraph()) {
+ SUPERV_StreamGraph aDataFlowStream = aDataFlow->ToStreamGraph();
+ if (SUPERV_isNull(aDataFlowStream)) {
+ QMessageBox::warning(0, tr("ERROR"), tr("MSG_ACCESS_BAD_IOR"));
+ return;
+ }
+ aDataFlow = aDataFlowStream;
}
+ */
+ }
- if ( myInitialViewFrame ) {
- myInitialViewFrame = 0;
- myIVFBackgroundColor = QColor();
- }
+ SUPERVGraph_ViewFrame* aViewFrame;
+ if ( !myInitialViewFrame ) {
+ // first case : create a ViewFrame object
+ aViewFrame = dynamic_cast<SUPERVGraph_ViewFrame*>( createGraph() );
+ }
+ else {
+ // second case : get empty initial view frame as new ViewFrame object
+ aViewFrame = myInitialViewFrame;
+ // mkr : IPAL12991 -->
+ SUPERVGraph_View* view = myInitialViewFrame->getViewWidget();
+ if (view)
+ unregisterGraph(dynamic_cast<SUPERVGUI_Main*>(view));
+ // mkr : IPAL12991 <--
+ // mkr : PAL8237 : remove first "gag" Main from children
+ // srn: commented as it cases on application exit "X Windows error"
+ //aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
+ delete view;
+ }
+
+ if ( aViewFrame ) {
+ main = new SUPERVGUI_Main( aViewFrame, application()->desktop(), aDataFlow );
+ registerGraph( aIORName, main );
+ aViewFrame->show();
+ }
+
+ if ( myInitialViewFrame ) {
+ myInitialViewFrame = 0;
+ myIVFBackgroundColor = QColor();
+ }
}
ihmList->removeRef(ihmNode); \
ihmNode->merge(); \
ihmNode = getNode(aCNodeEnd); \
- ihmList->removeRef(ihmNode); \
- ihmNode->merge(); \
+ if (ihmNode) { \
+ ihmList->removeRef(ihmNode); \
+ ihmNode->merge(); \
+ } \
} \
}
*/
void SUPERVGUI_Canvas::merge() {
if (SUPERV_isNull(myMain->getDataflow())) return;
-
+
SUPERVGUI_CanvasNode* ihmNode;
QObjectList* ihmList = queryList("SUPERVGUI_CanvasNode");
SUPERV_Nodes nodes = myMain->getDataflow()->Nodes();
UPDATECONTROLNODES(LNodes);
UPDATECONTROLNODES(SNodes);
+ /*
+ n = nodes->LNodes.length();
+ for (int i=0; i<n; i++) {
+ SUPERV_CNode aCNode = SUPERV::CNode::_narrow(nodes->LNodes[i]);
+ SUPERV_CNode aCNodeEnd = SUPERV::CNode::_narrow(nodes->LNodes[i]->Coupled());
+ ihmNode = getNode(aCNode);
+ SUPERVGUI_CanvasNode* ihmNodeEnd = getNode(aCNodeEnd);
+ if (ihmNode == NULL) {
+ myMain->addControlNode(aCNode, aCNodeEnd, false);
+ } else {
+ if (ihmNodeEnd) {
+ ihmNode->move(aCNode->X(), aCNode->Y());
+ ihmList->removeRef(ihmNode);
+ ihmNode->merge();
+ ihmNode = getNode(aCNodeEnd);
+ ihmList->removeRef(ihmNode);
+ ihmNode->merge();
+ }
+ }
+ }
+ n = nodes->SNodes.length();
+ for (int i=0; i<n; i++) {
+ SUPERV_CNode aCNode = SUPERV::CNode::_narrow(nodes->SNodes[i]);
+ SUPERV_CNode aCNodeEnd = SUPERV::CNode::_narrow(nodes->SNodes[i]->Coupled());
+ ihmNode = getNode(aCNode);
+ if (ihmNode == NULL) {
+ myMain->addControlNode(aCNode, aCNodeEnd, false);
+ } else {
+ ihmNode->move(aCNode->X(), aCNode->Y());
+ ihmList->removeRef(ihmNode);
+ ihmNode->merge();
+ ihmNode = getNode(aCNodeEnd);
+ ihmList->removeRef(ihmNode);
+ ihmNode->merge();
+ }
+ }
+ //*/
QObjectListIt it(*ihmList);
while ((ihmNode=(SUPERVGUI_CanvasNode*)it.current()) != 0) {
else x += (CELL_WIDTH + CELL_SPACE); \
cell = getCellNode(aCNode); \
if (cell == NULL) { \
- SUPERVGUI_CanvasCellNode* aNode = new SUPERVGUI_CanvasCellNode(myMgr, this, myMain, aCNode); \
+ SUPERVGUI_CanvasCellNode* aNode = SUPERVGUI_CanvasCellNode::Create(myMgr, this, myMain, aCNode); \
aNode->move(x, y); \
aNode->show(); \
aNode->sync(); \
SUPERV_CNode aCNodeEnd = SUPERV::CNode::_narrow(nodes->NodesName[co]->Coupled()); \
cell = getCellNode(aCNode); \
if (cell == NULL) { \
- SUPERVGUI_CanvasCellNode* aNode = new SUPERVGUI_CanvasCellNode( myMgr, this, myMain, aCNode); \
+ SUPERVGUI_CanvasCellNode* aNode = SUPERVGUI_CanvasCellNode::Create(myMgr, this, myMain, aCNode); \
aNode->move(x, y); \
aNode->show(); \
aNode->sync(); \
y += (CELL_HEIGHT + CELL_SPACE); \
- SUPERVGUI_CanvasCellNode* aNodeEnd = new SUPERVGUI_CanvasCellEndNode( myMgr, this, myMain, aCNodeEnd, aNode); \
+ SUPERVGUI_CanvasCellNode* aNodeEnd = SUPERVGUI_CanvasCellEndNode::Create(myMgr, this, myMain, aCNodeEnd, aNode); \
aNodeEnd->move(x, y); \
aNodeEnd->show(); \
aNodeEnd->sync(); \
SUPERVGUI_CanvasCellNode* SUPERVGUI_CanvasArray::addNode(SUPERV_CNode node) {
Trace("SUPERVGUI_CanvasArray::addNode");
- SUPERVGUI_CanvasCellNode* n = new SUPERVGUI_CanvasCellNode( myMgr, this, myMain, node);
+ SUPERVGUI_CanvasCellNode* n = SUPERVGUI_CanvasCellNode::Create(myMgr, this, myMain, node);
n->move(nodeX, nodeY);
n->show();
update();
//=====================================================================
// Compute node
//=====================================================================
-SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode( SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
- SUPERVGUI_CanvasNode( mgr, theParent, theMain, theNode)
+SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+ SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode)
{
Trace("SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode");
}
+SUPERVGUI_CanvasComputeNode* SUPERVGUI_CanvasComputeNode::Create
+ (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
+{
+ SUPERVGUI_CanvasComputeNode* aRet = new SUPERVGUI_CanvasComputeNode (mgr, theParent, theMain, theNode);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
QPopupMenu* SUPERVGUI_CanvasComputeNode::getPopupMenu(QWidget* theParent)
{
QPopupMenu* popup = SUPERVGUI_CanvasNode::getPopupMenu(theParent);
//=====================================================================
// Start control node
//=====================================================================
-SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
SUPERVGUI_CanvasNode( mgr, theParent, theMain, theNode),
myCoupled(0)
{
Trace("SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode");
}
+SUPERVGUI_CanvasStartNode* SUPERVGUI_CanvasStartNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
+{
+ SUPERVGUI_CanvasStartNode* aRet = new SUPERVGUI_CanvasStartNode (mgr, theParent, theMain, theNode);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasStartNode::createPrs() const
{
- return new SUPERVGUI_CanvasStartNodePrs( resMgr(), getMain()->getCanvas(),
+ return new SUPERVGUI_CanvasStartNodePrs (resMgr(), getMain()->getCanvas(),
(SUPERVGUI_CanvasStartNode*)this);
}
//=====================================================================
// End control node
//=====================================================================
-SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain,
- SUPERV_CNode theNode, SUPERVGUI_CanvasStartNode* theStart):
+SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
+ SUPERVGUI_CanvasStartNode* theStart):
SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode),
myCoupled(theStart)
{
myCoupled->setCoupled(this);
}
+SUPERVGUI_CanvasEndNode* SUPERVGUI_CanvasEndNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
+ SUPERVGUI_CanvasStartNode* theStart)
+{
+ SUPERVGUI_CanvasEndNode* aRet = new SUPERVGUI_CanvasEndNode (mgr, theParent, theMain, theNode, theStart);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasEndNode::createPrs() const
{
return new SUPERVGUI_CanvasEndNodePrs( resMgr(), getMain()->getCanvas(),
//=====================================================================
// Goto control node
//=====================================================================
-SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode)
{
Trace("SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode");
}
+SUPERVGUI_CanvasGotoNode* SUPERVGUI_CanvasGotoNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
+{
+ SUPERVGUI_CanvasGotoNode* aRet = new SUPERVGUI_CanvasGotoNode (mgr, theParent, theMain, theNode);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasGotoNode::createPrs() const
{
return new SUPERVGUI_CanvasGotoNodePrs( resMgr(), getMain()->getCanvas(),
//=====================================================================
// Macro node
//=====================================================================
-SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
SUPERVGUI_CanvasComputeNode(mgr, theParent, theMain, theNode)
{
Trace("SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode");
}
+SUPERVGUI_CanvasMacroNode* SUPERVGUI_CanvasMacroNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
+{
+ SUPERVGUI_CanvasMacroNode* aRet = new SUPERVGUI_CanvasMacroNode (mgr, theParent, theMain, theNode);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasMacroNode::createPrs() const
{
return new SUPERVGUI_CanvasMacroNodePrs( resMgr(), getMain()->getCanvas(),
//=====================================================================
// Cell node: node for table view
//=====================================================================
-SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode(SUIT_ResourceMgr* mgr, QObject* theParent,
- SUPERVGUI_Main* theMain,
- SUPERV_CNode theNode):
+SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode, true)
{
Trace("SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode");
myIsControl = true;
}
+SUPERVGUI_CanvasCellNode* SUPERVGUI_CanvasCellNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode)
+{
+ SUPERVGUI_CanvasCellNode* aRet = new SUPERVGUI_CanvasCellNode (mgr, theParent, theMain, theNode);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
SUPERVGUI_CanvasCellNode::~SUPERVGUI_CanvasCellNode()
{
}
return aPrs;
}
-SUPERVGUI_CanvasCellEndNode::SUPERVGUI_CanvasCellEndNode( SUIT_ResourceMgr* mgr, QObject* theParent,
- SUPERVGUI_Main* theMain,
- SUPERV_CNode theNode,
+SUPERVGUI_CanvasCellEndNode::SUPERVGUI_CanvasCellEndNode (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
SUPERVGUI_CanvasCellNode* theStart):
SUPERVGUI_CanvasCellNode(mgr, theParent, theMain, theNode)
{
//set end cell for start cell as pair
myPairCell->setPairCell(dynamic_cast<SUPERVGUI_CanvasCellNode*>(this));
}
+
+SUPERVGUI_CanvasCellEndNode* SUPERVGUI_CanvasCellEndNode::Create (SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain,
+ SUPERV_CNode theNode,
+ SUPERVGUI_CanvasCellNode* theStart)
+{
+ SUPERVGUI_CanvasCellEndNode* aRet =
+ new SUPERVGUI_CanvasCellEndNode (mgr, theParent, theMain, theNode, theStart);
+ emit aRet->objectCreatedDeleted();
+ return aRet;
+}
+
/*
bool SUPERVGUI_CanvasCellEndNode::setNodeName(QString theName)
{
return SUPERVGUI_CanvasNode::setNodeName(theName);
}
*/
+
//-----------------------------------------------------------
//*************** Select Inline node dialog******************
// Taken from SUPERVGUI_ControlNode.cxx without change
Q_OBJECT
public:
- SUPERVGUI_CanvasComputeNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+ static SUPERVGUI_CanvasComputeNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
virtual ~SUPERVGUI_CanvasComputeNode() {}
virtual QPopupMenu* getPopupMenu(QWidget* theParent);
+
+ protected:
+ SUPERVGUI_CanvasComputeNode (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
};
class SUPERVGUI_CanvasMacroNode : public SUPERVGUI_CanvasComputeNode {
Q_OBJECT
public:
- SUPERVGUI_CanvasMacroNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+ static SUPERVGUI_CanvasMacroNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
virtual ~SUPERVGUI_CanvasMacroNode() {}
virtual QPopupMenu* getPopupMenu(QWidget* theParent);
void exportDataflow();
protected:
+ SUPERVGUI_CanvasMacroNode (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+
virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
};
class SUPERVGUI_CanvasEndNode;
-class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode {
+class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode
+{
Q_OBJECT
public:
- SUPERVGUI_CanvasStartNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+ static SUPERVGUI_CanvasStartNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
virtual ~SUPERVGUI_CanvasStartNode() {}
virtual bool setNodeName(QString aName);
SUPERVGUI_CanvasEndNode* getCoupled() const { return myCoupled; }
-
+
virtual QPopupMenu* getPopupMenu(QWidget* theParent);
public slots:
virtual void pastePort();
protected:
+ SUPERVGUI_CanvasStartNode (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+
virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
protected slots:
void setCoupled(SUPERVGUI_CanvasEndNode* theEnd) { myCoupled = theEnd; }
SUPERVGUI_CanvasEndNode* myCoupled;
-
};
Q_OBJECT
public:
- SUPERVGUI_CanvasEndNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
- SUPERVGUI_CanvasStartNode* theStart);
+ static SUPERVGUI_CanvasEndNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
+ SUPERVGUI_CanvasStartNode* theStart);
virtual ~SUPERVGUI_CanvasEndNode() {}
SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; }
virtual void addInputPort();*/
protected:
+ SUPERVGUI_CanvasEndNode (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
+ SUPERVGUI_CanvasStartNode* theStart);
+
virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
private:
SUPERVGUI_CanvasStartNode* myCoupled;
-
};
Q_OBJECT
public:
- SUPERVGUI_CanvasGotoNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+ static SUPERVGUI_CanvasGotoNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
virtual ~SUPERVGUI_CanvasGotoNode() {}
virtual QPopupMenu* getPopupMenu(QWidget* theParent);
void linkToNode();
protected:
+ SUPERVGUI_CanvasGotoNode (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+
virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
};
Q_OBJECT
public:
- SUPERVGUI_CanvasCellNode( SUIT_ResourceMgr*, QObject* theParent,
- SUPERVGUI_Main* theMain,
- SUPERV_CNode theNode);
+ static SUPERVGUI_CanvasCellNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain,
+ SUPERV_CNode theNode);
virtual ~SUPERVGUI_CanvasCellNode();
// asv : 26.01.05 : everything moved to CanvasNode::getPopupMenu()
void setPairCell(SUPERVGUI_CanvasCellNode* thePairCell);
SUPERVGUI_CanvasCellNode* getPairCell();
- virtual void sync();
+ virtual void sync();
- // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
- //virtual bool setNodeName(QString aName);
+ // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
+ //virtual bool setNodeName(QString aName);
protected:
+ SUPERVGUI_CanvasCellNode (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain,
+ SUPERV_CNode theNode);
+
virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
protected:
private:
bool myIsControl;
bool myIsStart;
-
};
-class SUPERVGUI_CanvasCellEndNode: public SUPERVGUI_CanvasCellNode {
+class SUPERVGUI_CanvasCellEndNode : public SUPERVGUI_CanvasCellNode {
public:
- SUPERVGUI_CanvasCellEndNode( SUIT_ResourceMgr*, QObject* theParent,
+ static SUPERVGUI_CanvasCellEndNode* Create (SUIT_ResourceMgr*, QObject* theParent,
+ SUPERVGUI_Main* theMain,
+ SUPERV_CNode theNode,
+ SUPERVGUI_CanvasCellNode* theStart);
+ virtual ~SUPERVGUI_CanvasCellEndNode() {}
+
+ // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
+ //virtual bool setNodeName(QString theName);
+
+ protected:
+ SUPERVGUI_CanvasCellEndNode (SUIT_ResourceMgr*, QObject* theParent,
SUPERVGUI_Main* theMain,
SUPERV_CNode theNode,
SUPERVGUI_CanvasCellNode* theStart);
- virtual ~SUPERVGUI_CanvasCellEndNode() {}
-
- // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
- //virtual bool setNodeName(QString theName);
};
-/**
+/**
* Taken from SUPERVGUI_ControlNode.h without change
*/
-class SUPERVGUI_SelectInlineDlg: public QDialog {
+class SUPERVGUI_SelectInlineDlg : public QDialog {
Q_OBJECT
public:
#include <qinputdialog.h>
-SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode( SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
+SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode( SUIT_ResourceMgr* mgr, QObject* theParent,
+ SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
QObject(theParent),
myMain(theMain),
myNode(theNode),
// mkr : PAL8237
connect(this, SIGNAL(objectCreatedDeleted()), myMain, SLOT(onObjectCreatedDeleted()));
- emit objectCreatedDeleted();
}
SUPERVGUI_CanvasNode::~SUPERVGUI_CanvasNode()
//glNode->update();
//getGLContext()->insertObject( glNode, true /*false*/ );
//
-
return new SUPERVGUI_CanvasNodePrs( myMgr, myMain->getCanvas(), (SUPERVGUI_CanvasNode*)this);
}
Q_OBJECT
public:
- SUPERVGUI_CanvasNode( SUIT_ResourceMgr*, QObject*, SUPERVGUI_Main*, SUPERV_CNode theNode, bool theIsCell=false);
virtual ~SUPERVGUI_CanvasNode();
// done to ignore port update when node is removed
void exportToLib();
protected:
+ SUPERVGUI_CanvasNode (SUIT_ResourceMgr*, QObject*, SUPERVGUI_Main*,
+ SUPERV_CNode theNode, bool theIsCell=false);
+
// redefined by most of CanvasNode successors
virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
SUIT_ResourceMgr* resMgr() const { return myMgr; }
#include "SalomeApp_Study.h"
-SUPERVGUI_CanvasPort::SUPERVGUI_CanvasPort(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV::Port_ptr thePort):
+SUPERVGUI_CanvasPort::SUPERVGUI_CanvasPort (QObject* theParent, SUPERVGUI_Main* theMain,
+ SUPERV::Port_ptr thePort):
QObject(theParent),
myMain(theMain),
myPrs(0),
//***********************************************************
// Input Port
//***********************************************************
-SUPERVGUI_CanvasPortIn::SUPERVGUI_CanvasPortIn(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV::Port_ptr thePort):
+SUPERVGUI_CanvasPortIn::SUPERVGUI_CanvasPortIn (QObject* theParent, SUPERVGUI_Main* theMain,
+ SUPERV::Port_ptr thePort):
SUPERVGUI_CanvasPort(theParent, theMain, thePort)
{
Trace("SUPERVGUI_CanvasPortIn::SUPERVGUI_CanvasPortIn");
QPopupMenu* SUPERVGUI_CanvasPortIn::getPopupMenu(QWidget* theParent)
{
QPopupMenu* popup = SUPERVGUI_CanvasPort::getPopupMenu(theParent);
- bool editable = getEngine()->IsInput() && !getEngine()->IsLinked() && !getMain()->getDataflow()->IsExecuting();
+ bool editable = (getEngine()->IsInput() &&
+ !getEngine()->IsLinked() &&
+ !getMain()->getDataflow()->IsExecuting());
if (!getEngine()->IsGate() && editable)
popup->insertItem(tr("MSG_SETVALUE"), this, SLOT(setInput()));
//***********************************************************
// Output Port
//***********************************************************
-SUPERVGUI_CanvasPortOut::SUPERVGUI_CanvasPortOut(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV::Port_ptr thePort):
+SUPERVGUI_CanvasPortOut::SUPERVGUI_CanvasPortOut (QObject* theParent, SUPERVGUI_Main* theMain,
+ SUPERV::Port_ptr thePort):
SUPERVGUI_CanvasPort(theParent, theMain, thePort)
{
Trace("SUPERVGUI_CanvasPortOut::SUPERVGUI_CanvasPortOut");
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( study->application() );
objectBrowser = app->objectBrowser();
-
+
myArray = new SUPERVGUI_CanvasArray( this, resMgr() );
myArrayView = new SUPERVGUI_ArrayView( myArray, this );
myCanvas = new SUPERVGUI_Canvas( this, resMgr() );
myCanvasView = new SUPERVGUI_CanvasView(myCanvas, this);
-
+
message = app->logWindow();
notification = new NOTIFICATION_Consumer();
case CANVAS:
case CONTROLFLOW:
{
- SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasComputeNode( resMgr(), myCanvas, this, theNode);
+ SUPERVGUI_CanvasNode* aNode = SUPERVGUI_CanvasComputeNode::Create(resMgr(), myCanvas, this, theNode);
aNode->move(theNode->X(), theNode->Y());
if (myCurrentView == CONTROLFLOW) aNode->hideAll();
aNode->show();
case CANVAS:
case CONTROLFLOW:
{
- SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasGotoNode( resMgr(), myCanvas, this, theNode);
+ SUPERVGUI_CanvasNode* aNode = SUPERVGUI_CanvasGotoNode::Create(resMgr(), myCanvas, this, theNode);
aNode->move(theNode->X(), theNode->Y());
if (myCurrentView == CONTROLFLOW) aNode->hideAll();
aNode->show();
/**
* Add Control node
*/
-void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode, bool Update) {
+void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode, bool Update)
+{
switch (myCurrentView) {
case CANVASTABLE:
myArray->destroy();
case CANVAS:
case CONTROLFLOW:
{
- SUPERVGUI_CanvasStartNode* aStartNode = new SUPERVGUI_CanvasStartNode( resMgr(), myCanvas, this, theStartNode);
+ SUPERVGUI_CanvasStartNode* aStartNode =
+ SUPERVGUI_CanvasStartNode::Create(resMgr(), myCanvas, this, theStartNode);
aStartNode->move(theStartNode->X(), theStartNode->Y());
if (myCurrentView == CONTROLFLOW) aStartNode->hideAll();
- SUPERVGUI_CanvasEndNode* aEndNode = new SUPERVGUI_CanvasEndNode( resMgr(), myCanvas, this, theEndNode, aStartNode);
+ SUPERVGUI_CanvasEndNode* aEndNode =
+ SUPERVGUI_CanvasEndNode::Create(resMgr(), myCanvas, this, theEndNode, aStartNode);
aEndNode->move(theEndNode->X(), theEndNode->Y());
if (myCurrentView == CONTROLFLOW) aEndNode->hideAll();
case CANVAS:
case CONTROLFLOW:
{
- SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasMacroNode( resMgr(), myCanvas, this, theNode);
+ SUPERVGUI_CanvasNode* aNode = SUPERVGUI_CanvasMacroNode::Create(resMgr(), myCanvas, this, theNode);
aNode->move(theNode->X(), theNode->Y());
if (myCurrentView == CONTROLFLOW) aNode->hideAll();
aNode->show();