#include "SUPERVGUI_Information.h"
#include "SUPERVGUI_Library.h"
-#include "SALOMEGUI_NameDlg.h"
-#include "QAD_MessageBox.h"
-#include "QAD_Message.h"
+#include "SalomeApp_NameDlg.h"
+#include "SUIT_MessageBox.h"
+#include "LogWindow.h"
+#include "SUIT_Session.h"
SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
// TODO: update name of all the links to this node
}
else {
- QMessageBox::warning( QAD_Application::getDesktop(), tr( "ERROR" ), tr( "MSG_CANT_RENAMENODE" ) );
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr( "ERROR" ), tr( "MSG_CANT_RENAMENODE" ) );
}
return result;
}
void SUPERVGUI_CanvasNode::rename() {
- QString aName = SALOMEGUI_NameDlg::getName(QAD_Application::getDesktop(), myNode->Name());
+ QString aName = SalomeApp_NameDlg::getName( SUIT_Session::session()->activeApplication()->desktop(), myNode->Name() );
if (!aName.isEmpty()) {
setNodeName(aName);
}
int n = queryList("SUPERVGUI_CanvasNode")->count();
if (myNode->IsSuspended()) {
if (!((n==1)? myMain->getDataflow()->Resume() : myNode->Resume())) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_RESUMENODE"));
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_RESUMENODE") );
}
else {
sync();
}
} else {
if (!((n==1)? myMain->getDataflow()->Suspend() : myNode->Suspend())) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_SUSPENDNODE"));
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_SUSPENDNODE") );
} else {
syncOnEvent(SUPERV::SuspendReadyState);
- myMain->getMessage()->setMessage(tr("MSG_NODE_SUSPENDED1")+myNode->Name()+tr("MSG_NODE_SUSPENDED2"));
+ myMain->getMessage()->putMessage(tr("MSG_NODE_SUSPENDED1")+myNode->Name()+tr("MSG_NODE_SUSPENDED2"));
}
}
}
Trace("SUPERVGUI_CanvasNode::kill");
int n = queryList("SUPERVGUI_CanvasNode")->count();
if (!((n==1)? myMain->getDataflow()->Kill() : myNode->Kill())) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_KILLNODE"));
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_KILLNODE") );
} else {
syncOnEvent(SUPERV_Kill);
- myMain->getMessage()->setMessage(tr("MSG_NODE_KILLED1")+myNode->Name()+tr("MSG_NODE_KILLED2"));
+ myMain->getMessage()->putMessage(tr("MSG_NODE_KILLED1")+myNode->Name()+tr("MSG_NODE_KILLED2"));
}
}
/* asv : 15.12.04 : commented out stopRestart() in Main and CanvasNode because it's not called from anywhere,
int n = queryList("SUPERVGUI_CanvasNode")->count();
if ((myNode->State() == SUPERV_Stop) || (myNode->State() == SUPERV_Kill)) {
if (!((n==1)? myMain->getDataflow()->Run() : myNode->ReStart())) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_RESTARTNODE"));
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_RESTARTNODE") );
}
} else {
if (!((n==1)? myMain->getDataflow()->Stop() : myNode->Stop())) {
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_STOPNODE"));
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_CANT_STOPNODE") );
}
}
}
void SUPERVGUI_CanvasNode::configure()
{
Trace("SUPERVGUI_CanvasNode::configure");
- QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_NOT_IMPLEMENTED")); // kloss : a faire : lancer l'ihm DATA
+ QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(), tr("ERROR"), tr("MSG_NOT_IMPLEMENTED") ); // kloss : a faire : lancer l'ihm DATA
}
void SUPERVGUI_CanvasNode::showPython()
}
SUPERVGUI_PortParamsDlg* aDlg = new SUPERVGUI_PortParamsDlg(getPortsNamesIN(aNode,true));
if (aDlg->exec()) {
+ myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
SUPERV_Port aPort = aNode->InPort(aDlg->getName().latin1(),
aDlg->getType().latin1());
delete aDlg;
SUPERVGUI_PortParamsDlg* aDlg = new SUPERVGUI_PortParamsDlg(getPortsNamesIN(aNode,false));
if (aDlg->exec()) {
+ myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
SUPERV_Port aPort = aNode->OutPort(aDlg->getName().latin1(),
aDlg->getType().latin1());
delete aDlg;
}
void SUPERVGUI_CanvasNode::addInputPort() {
- myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
-
SUPERV_Port aPort = createInPort();
if (aPort == NULL || CORBA::is_nil( aPort ) ) return;
void SUPERVGUI_CanvasNode::addOutputPort() {
- myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
-
SUPERV_Port aPort = createOutPort();
if (aPort == NULL || CORBA::is_nil( aPort ) ) return;
void SUPERVGUI_CanvasNode::editFunction() {
- myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
-
if (getNodeType() == SUPERV::LoopNode) {
SUPERVGUI_EditPythonDlg* aDlg = new SUPERVGUI_EditPythonDlg(true);
SUPERV_LNode aLNode = getLoopNode();
aDlg->setMoreFunction(aLNode->PyMore());
aDlg->setNextFunction(aLNode->PyNext());
if (aDlg->exec()) {
+ myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
aLNode->SetPyInit(aDlg->getInitFuncName().latin1(), (aDlg->getInitFunction()).in());
aLNode->SetPyMore(aDlg->getMoreFuncName().latin1(), (aDlg->getMoreFunction()).in());
aLNode->SetPyNext(aDlg->getNextFuncName().latin1(), (aDlg->getNextFunction()).in());
SUPERV_INode aINode = getInlineNode();
aDlg->setFunction(aINode->PyFunction());
if (aDlg->exec()) {
+ myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
aINode->SetPyFunction(aDlg->getFuncName().latin1(), (aDlg->getFunction()).in());
}
delete aDlg;
* for detailed description of the functionality
*/
void SUPERVGUI_CanvasNode::managePorts() {
- myMain->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
-
SUPERVGUI_ManagePortsDlg* aDlg = new SUPERVGUI_ManagePortsDlg( this );
aDlg->exec();
delete aDlg;
if ( !CORBA::is_nil( anINode ) )
SUPERVGUI_Library::getLibrary()->Export( anINode );
else
- QAD_MessageBox::error1( QAD_Application::getDesktop(), tr( "ERROR" ), tr( "MSG_BAD_INODE" ), tr( "OK" ) );
+ SUIT_MessageBox::error1( SUIT_Session::session()->activeApplication()->desktop(), tr( "ERROR" ), tr( "MSG_BAD_INODE" ), tr( "OK" ) );
}