1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE
5 // File : SUPERVGUI_CanvasNode.cxx
6 // Author : Natalia KOPNOVA
9 #include "SUPERVGUI_CanvasNode.h"
10 #include "SUPERVGUI_CanvasNodePrs.h"
11 #include "SUPERVGUI_CanvasPort.h"
12 #include "SUPERVGUI_Clipboard.h"
13 #include "SUPERVGUI_Main.h"
14 #include "SUPERVGUI.h"
15 #include "SUPERVGUI_BrowseNodeDlg.h"
16 #include "SUPERVGUI_ManagePortsDlg.h"
17 #include "SUPERVGUI_Information.h"
18 #include "SUPERVGUI_Library.h"
20 #include "SUIT_MessageBox.h"
21 #include "LogWindow.h"
22 #include "SUIT_Session.h"
24 #include <qinputdialog.h>
27 SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode( SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
40 Trace("SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode");
42 setName(myNode->Name());
44 QString aComment(myNode->Comment());
45 QString aNewComment = aComment;
46 if (getNodeType() == SUPERV::FactoryNode) {
47 aNewComment = QString(myNode->Service()->ServiceName) +
48 QString(tr("COMMENT_FROM")) +
49 QString(getFactoryNode()->GetComponentName());
51 else if (myNode->IsMacro()) {
52 aNewComment = tr("COMMENT_MNODE");
55 aNewComment = tr("COMMENT_CNODE");
57 if (aComment.isEmpty()) {
58 myNode->SetComment(aNewComment.latin1());
61 myLabelText = aNewComment;
63 // mkr : if the SUPERVGUI_CavasCellNode created (for CANVASTABLE view),
64 // we don't create the ports
68 SUPERV_Ports aPortList = myNode->Ports();
69 for (int i = 0; i < aPortList->length(); i++)
70 createPort(aPortList[i].in());
72 SUPERV_StreamPorts aStreamPortList = myNode->StreamPorts();
73 for (int i = 0; i < aStreamPortList->length(); i++) {
74 createStreamPort(aStreamPortList[i].in());
81 connect(this, SIGNAL(objectCreatedDeleted()), myMain, SLOT(onObjectCreatedDeleted()));
82 emit objectCreatedDeleted();
85 SUPERVGUI_CanvasNode::~SUPERVGUI_CanvasNode()
95 void SUPERVGUI_CanvasNode::setDestroyed()
101 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasNode::getPrs()
109 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasNode::createPrs() const
112 //SUPERVGUI_PrsNode* glNode = new SUPERVGUI_PrsNode( (SUPERVGUI_CanvasNode*)this );
113 //glNode->setFirstPoint( new GLViewer_Pnt( 10, 10 ) );
116 //getGLContext()->insertObject( glNode, true /*false*/ );
119 return new SUPERVGUI_CanvasNodePrs( myMgr, myMain->getCanvas(), (SUPERVGUI_CanvasNode*)this);
122 void SUPERVGUI_CanvasNode::createPort(SUPERV::Port_ptr thePort)
124 SUPERVGUI_CanvasPort* aPort = 0;
125 if (thePort->IsInput())
126 aPort = new SUPERVGUI_CanvasPortIn((SUPERVGUI_CanvasNode*)this, myMain, thePort);
128 aPort = new SUPERVGUI_CanvasPortOut((SUPERVGUI_CanvasNode*)this, myMain, thePort);
131 connect(aPort, SIGNAL(destroyed(QObject*)), this, SLOT(onDestroyed(QObject*)));
132 if (!isIgnore) getPrs()->updatePorts();
134 emit objectCreatedDeleted(); // mkr : PAL8237
138 void SUPERVGUI_CanvasNode::createStreamPort(SUPERV::StreamPort_ptr thePort)
140 SUPERVGUI_CanvasPort* aPort = 0;
141 if (thePort->IsInput())
142 aPort = new SUPERVGUI_CanvasStreamPortIn((SUPERVGUI_CanvasNode*)this, myMain, thePort);
144 aPort = new SUPERVGUI_CanvasStreamPortOut((SUPERVGUI_CanvasNode*)this, myMain, thePort);
147 connect(aPort, SIGNAL(destroyed(QObject*)), this, SLOT(onDestroyed(QObject*)));
148 if (!isIgnore) getPrs()->updatePorts();
152 void SUPERVGUI_CanvasNode::onDestroyed(QObject* theObject)
155 removeChild(theObject); // signal is sent before removing the object
156 getPrs()->updatePorts();
160 QPopupMenu* SUPERVGUI_CanvasNode::getPopupMenu(QWidget* theParent)
162 QPopupMenu* popup = new QPopupMenu(theParent);
164 if (myMain->getDataflow()->IsExecuting()) { // Execution time
165 popup->insertItem((myNode->IsSuspended()?tr("MSG_RESUME"):tr("MSG_SUSPEND")), this, SLOT(suspendResume()));
166 popup->insertItem(tr("MSG_KILL"), this, SLOT(kill()));
168 else { // Edition time
169 const int type = getNodeType();
171 // for all nodes except EndLoop and EndSwitch : Rename, Delete, Copy
172 if ( myMain->isEditable() && type != SUPERV::EndLoopNode && type != SUPERV::EndSwitchNode &&
173 // asv 26.01.05 : don't allow nodes "edition" commands in Table view
174 myMain->getViewType() != CANVASTABLE ) {
175 popup->insertItem(tr("MSG_RENAME"), this, SLOT(rename()));
176 popup->insertItem(tr("MSG_DELETE"), this, SLOT(remove()));
179 // tmp: Copy temporary does not work for Macro nodes...
180 if ( type != SUPERV::MacroNode )
181 popup->insertItem(tr("ITM_COPY_NODE"), this, SLOT(copy())); // Copy Node functionality
182 popup->insertSeparator();
184 // for all nodes : Browse
185 popup->insertItem(tr("MSG_BROWSE"), this, SLOT(browse()));
187 // for all nodes except EndLoop and EndSwitch : Change info
188 if (type != SUPERV::EndLoopNode && type != SUPERV::EndSwitchNode)
189 popup->insertItem(tr("MSG_CHANGE_INFO"), this, SLOT(changeInformation()));
191 // for all InLine nodes
192 if ( type != SUPERV::FactoryNode && type != SUPERV::ComputingNode && type != SUPERV::MacroNode ) {
193 if ( myMain->isEditable() ) {
194 popup->insertSeparator();
195 popup->insertItem( tr( "MNU_EDIT_FUNC" ), this, SLOT(editFunction()));
198 // for all InLine, regardless isEditable() : Export to Library
199 popup->insertItem( tr( "MNU_EXPORT" ), this, SLOT( exportToLib()));
201 // for all InLine except EndLoop : Add Ports menu, Paste, Manage Ports
202 if ( myMain->isEditable() && type != SUPERV::EndLoopNode ) {
203 // mkr : IPAL9815 : commented the following code
204 /*QPopupMenu* addPortMenu = new QPopupMenu(theParent);
205 addPortMenu->insertItem( tr( "MNU_INPUT" ), this, SLOT(addInputPort()));
206 if (getNodeType() != SUPERV::LoopNode)
207 addPortMenu->insertItem( tr( "MNU_OUTPUT" ), this, SLOT(addOutputPort()));
209 popup->insertItem( tr( "MNU_ADD_PORT" ), addPortMenu);*/
210 popup->insertItem( tr( "MNU_MANAGE_PORTS" ), this, SLOT(managePorts()));
212 // Paste Port functionality
213 int aPasteItem = popup->insertItem(tr("ITM_PASTE_PORT"), this, SLOT(pastePort()));
214 SUPERVGUI_Clipboard* aCB = SUPERVGUI_Clipboard::getClipboard();
215 if ( !aCB->isCopyPort() || (type == SUPERV::LoopNode && !aCB->getCopyPort()->IsInput()) )
216 popup->setItemEnabled( aPasteItem, false );
223 void SUPERVGUI_CanvasNode::show()
228 void SUPERVGUI_CanvasNode::showAll()
233 void SUPERVGUI_CanvasNode::hideAll()
238 void SUPERVGUI_CanvasNode::switchLabel()
240 getPrs()->setLabelVisible(!getPrs()->isLabelVisible());
243 void SUPERVGUI_CanvasNode::switchPorts()
245 getPrs()->setPortVisible(!getPrs()->isPortVisible());
248 void SUPERVGUI_CanvasNode::move(int x, int y)
250 // myNode->Coords(x, y); // <<<- done inside Prs to reflect item movement by mouse press
251 if (x > GRAPH_MAX) x = (int) getPrs()->x();
252 if (y > GRAPH_MAX) y = (int) getPrs()->y();
253 getPrs()->move(x, y);
256 void SUPERVGUI_CanvasNode::merge()
258 // synchronize port list
261 SUPERVGUI_CanvasPort* aPort;
262 QObjectList* aPortList = queryList("SUPERVGUI_CanvasPort");
263 SUPERV_Ports aPorts = myNode->Ports();
264 for (int i = 0; i < aPorts->length(); i++) {
265 aPort = (SUPERVGUI_CanvasPort*)
266 child(myMain->getCanvas()->getPortName(aPorts[i].in()), "SUPERVGUI_CanvasPort");
268 aPortList->removeRef(aPort);
272 createPort(aPorts[i].in());
277 SUPERV_StreamPorts aStreamPorts = myNode->StreamPorts();
278 for (int i = 0; i < aStreamPorts->length(); i++) {
279 aPort = (SUPERVGUI_CanvasPort*)
280 child(myMain->getCanvas()->getPortName(aStreamPorts[i].in()), "SUPERVGUI_CanvasPort");
282 aPortList->removeRef(aPort);
286 createPort(aStreamPorts[i].in());
291 QObjectListIt it(*aPortList);
292 while ((aPort=(SUPERVGUI_CanvasPort*)it.current()) != 0) {
294 aPortList->removeRef(aPort);
300 if (update) getPrs()->updatePorts();
302 sync(); // update node state also
305 void SUPERVGUI_CanvasNode::sync() {
306 const bool isExecuting = myMain->getDataflow()->IsExecuting();
307 if ( myNode->IsMacro() && isExecuting ) {
308 // get SubGraph from MacroNode
309 SUPERV_Graph aMacro = SUPERV::Graph::_narrow(myNode);
310 if (!SUPERV_isNull(aMacro)) {
312 if (aMacro->IsStreamMacro())
313 aGraph = aMacro->StreamObjRef();
315 aGraph = aMacro->FlowObjRef();
316 if (!SUPERV_isNull(aGraph)) {
317 if (aGraph->State() != SUPERV::UndefinedState && aGraph->State() != SUPERV::NoState)
318 getPrs()->setState(aGraph->State());
320 getPrs()->setState(myNode->State());
325 SUPERV::GraphState aState = myNode->State();
327 // asv : 18.11.04 : fix for 6170 : after execution is finished, nodes' status must be reset.
328 // asv : 13.12.04 : commented out setting EditingState. See 2.21.
329 //if ( !isExecuting && myMain->IsGUIEventLoopFinished() && (aState == SUPERV::DoneState ||
330 // aState == SUPERV::KillState || aState == SUPERV::StopState ) )
331 // aState = SUPERV::EditingState;
332 getPrs()->setState(aState);
335 // update child ports
336 const QObjectList* list = children();
338 QObjectListIt it(*list);
339 while (QObject* obj = it.current()) {
341 if (obj->inherits("SUPERVGUI_CanvasPort")) {
342 ((SUPERVGUI_CanvasPort*)obj)->sync();
348 void SUPERVGUI_CanvasNode::syncOnEvent(SUPERV::GraphState theStateFromEvent)
350 getPrs()->setState(theStateFromEvent);
353 bool SUPERVGUI_CanvasNode::setNodeName(QString aName) {
354 bool result = myNode->SetName(aName.latin1());
356 setName(myNode->Name());
357 getPrs()->updateInfo();
358 // TODO: update name of all the links to this node
361 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr( "ERROR" ), tr( "MSG_CANT_RENAMENODE" ) );
366 void SUPERVGUI_CanvasNode::rename() {
368 QString aName = QInputDialog::getText( tr( "Rename" ), tr( "Enter new name:" ), QLineEdit::Normal,
369 myNode->Name(), &ok, SUIT_Session::session()->activeApplication()->desktop() );
371 //mkr : modifications for fixing bug IPAL9972
372 if( ok && !aName.isEmpty() && aName.compare( myNode->Name() ) != 0) {
377 void SUPERVGUI_CanvasNode::remove() {
378 Trace("SUPERVGUI_CanvasNode::remove");
379 myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
381 //set myCopyPort from Main object to empty if engine of this port is deleted
382 //check if any port of this deleted node has been copied
383 SUPERVGUI_Clipboard* aCB = SUPERVGUI_Clipboard::getClipboard();
384 if ( aCB->isCopyPort() )
385 if ( QString(myNode->Name()) == QString(aCB->getCopyPort()->Node()->Name()) )
386 aCB->setCopyPort( 0 );
388 //set myCopyNode from Main object to empty if engine of this node is deleted
389 //check if myCopyNode and this node engine is equal
390 if ( aCB->isCopyNode() )
391 if ( QString(myNode->Name()) == QString(aCB->getCopyNode()->Name()) )
392 aCB->setCopyNode( 0 );
394 // mkr: since the deletion of the node allow only in CANVAS view,
395 // it is necessary to remove the CanvasArray's children, which
396 // have the same CNode engine as deleting node
397 myMain->removeArrayChild(myNode);
399 SUPERVGUI_Canvas* aCanvas = myMain->getCanvas();
403 emit objectCreatedDeleted(); // mkr : PAL8237
409 void SUPERVGUI_CanvasNode::copy() {
410 Trace("SUPERVGUI_CanvasNode::copy()");
411 SUPERVGUI_Clipboard* aCB = SUPERVGUI_Clipboard::getClipboard();
412 const int aKind = getNodeType();
413 if ( aKind == SUPERV::EndLoopNode || aKind == SUPERV::EndSwitchNode )
414 aCB->setCopyNode( SUPERV::CNode::_duplicate(SUPERV::GNode::_narrow(getEngine())->Coupled()) );
416 aCB->setCopyNode( SUPERV::CNode::_duplicate( getEngine() ) );
419 void SUPERVGUI_CanvasNode::suspendResume() {
420 Trace("SUPERVGUI_CanvasNode::suspendResume");
421 int n = queryList("SUPERVGUI_CanvasNode")->count();
422 if (myNode->IsSuspended()) {
423 if (!((n==1)? myMain->getDataflow()->Resume() : myNode->Resume())) {
424 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_RESUMENODE") );
428 myMain->getMyThread()->startThread(tr("MSG_NODE_RESUMED1")+myNode->Name()+tr("MSG_NODE_RESUMED2"));
431 if (!((n==1)? myMain->getDataflow()->Suspend() : myNode->Suspend())) {
432 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_SUSPENDNODE") );
434 syncOnEvent(SUPERV::SuspendReadyState);
435 myMain->getMessage()->putMessage(tr("MSG_NODE_SUSPENDED1")+myNode->Name()+tr("MSG_NODE_SUSPENDED2"));
440 void SUPERVGUI_CanvasNode::kill() {
441 Trace("SUPERVGUI_CanvasNode::kill");
442 int n = queryList("SUPERVGUI_CanvasNode")->count();
443 if (!((n==1)? myMain->getDataflow()->Kill() : myNode->Kill())) {
444 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_KILLNODE") );
446 syncOnEvent(SUPERV_Kill);
447 myMain->getMessage()->putMessage(tr("MSG_NODE_KILLED1")+myNode->Name()+tr("MSG_NODE_KILLED2"));
450 /* asv : 15.12.04 : commented out stopRestart() in Main and CanvasNode because it's not called from anywhere,
451 the comment from kloss (in Main.cxx) may be explaining it, but it's in French and I do not understand it..
452 void SUPERVGUI_CanvasNode::stopRestart() {
453 Trace("SUPERVGUI_CanvasNode::stopRestart");
455 int n = queryList("SUPERVGUI_CanvasNode")->count();
456 if ((myNode->State() == SUPERV_Stop) || (myNode->State() == SUPERV_Kill)) {
457 if (!((n==1)? myMain->getDataflow()->Run() : myNode->ReStart())) {
458 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_RESTARTNODE") );
461 if (!((n==1)? myMain->getDataflow()->Stop() : myNode->Stop())) {
462 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_STOPNODE") );
467 void SUPERVGUI_CanvasNode::changeInformation() {
468 SUPERVGUI_Information* aDlg = new SUPERVGUI_Information(myNode, !myMain->isEditable());
471 QString aName = myNode->Name();
472 if (!aName.isEmpty() && myMain->isEditable()) {
473 //mkr : modifications for fixing bug IPAL9972
474 //setNodeName(aName);
476 setName(myNode->Name());
477 getPrs()->updateInfo();
478 // TODO: update name of all the links to this node
485 /* asv : 13.12.04 : The functions below are not called from anywhere, so commenting them out...
486 void SUPERVGUI_CanvasNode::configure()
488 Trace("SUPERVGUI_CanvasNode::configure");
489 QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_NOT_IMPLEMENTED") ); // kloss : a faire : lancer l'ihm DATA
492 void SUPERVGUI_CanvasNode::showPython()
494 Trace("SUPERVGUI_CanvasNode::showPython");
495 SUPERVGUI_Python cp(myMain->getStudy()->get_PyInterp(), !myMain->isEditable());
500 bool SUPERVGUI_CanvasNode::isWarning()
502 Trace("SUPERVGUI_CanvasNode::isWarning");
506 bool SUPERVGUI_CanvasNode::isStep()
508 Trace("SUPERVGUI_CanvasNode::isStep");
512 bool SUPERVGUI_CanvasNode::isTrace()
514 Trace("SUPERVGUI_CanvasNode::isTrace");
518 bool SUPERVGUI_CanvasNode::isVerbose()
520 Trace("SUPERVGUI_CanvasNode::isVerbose");
524 void SUPERVGUI_CanvasNode::setWarning(bool b)
526 Trace("SUPERVGUI_CanvasNode::setWarning");
530 void SUPERVGUI_CanvasNode::setStep(bool b)
532 Trace("SUPERVGUI_CanvasNode::setStep");
536 void SUPERVGUI_CanvasNode::setTrace(bool b)
538 Trace("SUPERVGUI_CanvasNode::setTrace");
542 void SUPERVGUI_CanvasNode::setVerbose(bool b)
544 Trace("SUPERVGUI_CanvasNode::setVerbose");
549 void SUPERVGUI_CanvasNode::browse()
551 // asv 28.01.05 : set "Editing" flag only on "OK" pressed in BrowseDlg
552 //myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
554 myBrowseDlg = new SUPERVGUI_BrowseNodeDlg(this);
555 myBrowseDlg->installEventFilter(this);
557 if (!myBrowseDlg->isVisible())
560 myBrowseDlg->raise();
561 myBrowseDlg->setActiveWindow();
562 myBrowseDlg->setFocus();
566 bool SUPERVGUI_CanvasNode::eventFilter( QObject* o, QEvent* e )
568 if (o == myBrowseDlg && e->type() == QEvent::Close)
570 return QObject::eventFilter(o, e);
573 QStringList SUPERVGUI_CanvasNode::getPortsNamesIN(SUPERV_INode theNode, bool theInputPorts)
576 if (!SUPERV_isNull(theNode)) {
577 SUPERV_Ports aPorts = theNode->Ports();
578 for (int i=0; i<aPorts->length(); i++) {
580 if (aPorts[i]->IsInput()) aPNList.append(QString(aPorts[i]->Name()));
583 if (!aPorts[i]->IsInput()) aPNList.append(QString(aPorts[i]->Name()));
589 SUPERV_Port SUPERVGUI_CanvasNode::createInPort()
591 SUPERV_INode aNode = getInlineNode();
592 if (SUPERV_isNull(aNode)) {
593 MESSAGE("SUPERVGUI_CanvasNode::createInPort: Node is wrong type");
596 SUPERVGUI_PortParamsDlg* aDlg = new SUPERVGUI_PortParamsDlg(getPortsNamesIN(aNode,true));
598 myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
599 SUPERV_Port aPort = aNode->InPort(aDlg->getName().latin1(),
600 aDlg->getType().latin1());
608 SUPERV_Port SUPERVGUI_CanvasNode::createOutPort()
610 SUPERV_INode aNode = getInlineNode();
611 if (SUPERV_isNull(aNode)) {
612 MESSAGE("SUPERVGUI_CanvasNode::createOutPort: Node is wrong type");
616 SUPERVGUI_PortParamsDlg* aDlg = new SUPERVGUI_PortParamsDlg(getPortsNamesIN(aNode,false));
618 myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
619 SUPERV_Port aPort = aNode->OutPort(aDlg->getName().latin1(),
620 aDlg->getType().latin1());
628 // mkr : IPAL9815 : commented the following code
629 /*void SUPERVGUI_CanvasNode::addInputPort() {
630 SUPERV_Port aPort = createInPort();
631 if (aPort == NULL || CORBA::is_nil( aPort ) ) return;
633 createPort(aPort.in());
637 void SUPERVGUI_CanvasNode::addOutputPort() {
638 SUPERV_Port aPort = createOutPort();
639 if (aPort == NULL || CORBA::is_nil( aPort ) ) return;
641 createPort(aPort.in());
645 void SUPERVGUI_CanvasNode::editFunction() {
646 if (getNodeType() == SUPERV::LoopNode) {
647 SUPERVGUI_EditPythonDlg* aDlg = new SUPERVGUI_EditPythonDlg(true);
648 SUPERV_LNode aLNode = getLoopNode();
649 aDlg->setInitFunction(aLNode->PyInit());
650 aDlg->setMoreFunction(aLNode->PyMore());
651 aDlg->setNextFunction(aLNode->PyNext());
653 myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
654 aLNode->SetPyInit(aDlg->getInitFuncName().latin1(), (aDlg->getInitFunction()).in());
655 aLNode->SetPyMore(aDlg->getMoreFuncName().latin1(), (aDlg->getMoreFunction()).in());
656 aLNode->SetPyNext(aDlg->getNextFuncName().latin1(), (aDlg->getNextFunction()).in());
661 SUPERVGUI_EditPythonDlg* aDlg = new SUPERVGUI_EditPythonDlg();
662 SUPERV_INode aINode = getInlineNode();
663 aDlg->setFunction(aINode->PyFunction());
665 myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
666 aINode->SetPyFunction(aDlg->getFuncName().latin1(), (aDlg->getFunction()).in());
673 * Called on "Paste port" command of popup menu
675 void SUPERVGUI_CanvasNode::pastePort() {
676 SUPERVGUI_Clipboard::getClipboard()->pastePort( this );
680 * Called on "Edit ports" popup menu command. See SUPERVGUI_ManagePortsDlg.h
681 * for detailed description of the functionality
683 void SUPERVGUI_CanvasNode::managePorts() {
684 SUPERVGUI_ManagePortsDlg* aDlg = new SUPERVGUI_ManagePortsDlg( this );
690 * Called on "Export to Library" popup menu command. See SUPERVGUI_Library.h
691 * for details on InLine nodes library functionality
693 void SUPERVGUI_CanvasNode::exportToLib() {
694 SUPERV::INode_var anINode = SUPERV::INode::_narrow( getEngine() );
695 if ( !CORBA::is_nil( anINode ) )
696 SUPERVGUI_Library::getLibrary()->Export( anINode );
698 SUIT_MessageBox::error1( SUIT_Session::session()->activeApplication()->desktop(), tr( "ERROR" ), tr( "MSG_BAD_INODE" ), tr( "OK" ) );
701 QString SUPERVGUI_CanvasNode::getToolTipText() const {
702 if ( myNode->IsFactory() )
703 return QString("Name : ") + SUPERV::FNode::_narrow(myNode)->Name() +
704 QString("\nContainer : ") + SUPERV::FNode::_narrow(myNode)->GetContainer() +
705 QString("\nComponentName : ") + SUPERV::FNode::_narrow(myNode)->GetComponentName() +
706 QString("\nInterfaceName : ") + SUPERV::FNode::_narrow(myNode)->GetInterfaceName();
707 return QString("Name : ") + myNode->Name() + '\n' + getLabelText();