X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_CanvasControlNode.cxx;h=9a81a1802e0faeca62ebf5554089cc69505db545;hb=cbb0219fe6d6bf11f98f2306c2855fef1eaa2d44;hp=a47a1402a980eb135ff7604c31bb2012c50fba76;hpb=a6a19e2c72034efd3f7fc081f7ba8c3919e4668f;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.cxx b/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.cxx index a47a140..9a81a18 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CanvasControlNode.cxx @@ -13,11 +13,12 @@ using namespace std; #include "SUPERVGUI_Main.h" #include "SUPERVGUI.h" #include "SUPERVGUI_Canvas.h" -#include "SUPERVGUI_ControlNode.h" // access to SelectInlineDlg #include "QAD_FileDlg.h" #include "QAD_Application.h" +#include + //===================================================================== // Compute node //===================================================================== @@ -367,3 +368,53 @@ SUPERVGUI_CanvasCellEndNode::SUPERVGUI_CanvasCellEndNode( QObject* theParent, //set end cell for start cell as pair myPairCell->setPairCell(dynamic_cast(this)); } + +//----------------------------------------------------------- +//*************** Select Inline node dialog****************** +// Taken from SUPERVGUI_ControlNode.cxx without change +//----------------------------------------------------------- + +SUPERVGUI_SelectInlineDlg::SUPERVGUI_SelectInlineDlg(SUPERVGUI_Main* theMain) + :QDialog(theMain, 0, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + setSizeGripEnabled( true ); + setCaption(tr("TIT_FUNC_PYTHON")); + QGridLayout* aMainLayout = new QGridLayout(this, 2, 2, 7, 4); + + QLabel* aLabel = new QLabel("Connect to", this ); + aMainLayout->addWidget(aLabel, 0, 0); + + myCombo = new QComboBox(this); + myCombo->clear(); //for the additional check from GUI side for bug PAL7007 + SUPERV_Nodes aNodesList = theMain->getDataflow()->Nodes(); + int i; + for (i = 0; i < aNodesList->INodes.length(); i++) { + myCombo->insertItem(QString(aNodesList->INodes[i]->Name())); + } + for (i = 0; i < aNodesList->LNodes.length(); i++) { + myCombo->insertItem(QString(aNodesList->LNodes[i]->Name())); + } + for (i = 0; i < aNodesList->SNodes.length(); i++) { + myCombo->insertItem(QString(aNodesList->SNodes[i]->Name())); + } + aMainLayout->addWidget(myCombo, 0, 1); + + QGroupBox* aBtnBox = new QGroupBox( this ); + aBtnBox->setColumnLayout( 0, Qt::Vertical ); + aBtnBox->layout()->setSpacing( 0 ); aBtnBox->layout()->setMargin( 0 ); + QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() ); + aBtnLayout->setAlignment( Qt::AlignTop ); + aBtnLayout->setSpacing( 6 ); aBtnLayout->setMargin( 11 ); + + QPushButton* aOKBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox ); + connect( aOKBtn, SIGNAL( clicked() ), this, SLOT( accept() ) ); + aBtnLayout->addWidget( aOKBtn ); + + aBtnLayout->addStretch(); + + QPushButton* aCancelBtn = new QPushButton( tr("BUT_CANCEL"), aBtnBox ); + connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) ); + aBtnLayout->addWidget( aCancelBtn ); + + aMainLayout->addMultiCellWidget(aBtnBox, 1, 1, 0, 1); +}