1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : SUPERVGUI_BrowseNodeDlg.cxx
8 // Author : Vitaly SMETANNIKOV
13 #include "SALOMEDSClient.hxx"
14 #include "SALOMEDS_SObject.hxx"
15 #include "SALOMEDS_Study.hxx"
16 #include <boost/shared_ptr.hpp>
17 using namespace boost;
19 #include "SalomeApp_Application.h"
20 #include "SalomeApp_SelectionMgr.h"
21 #include "SalomeApp_Study.h"
22 #include "SUIT_Session.h"
24 #include "SALOME_ListIO.hxx"
26 #include "SUPERVGUI_BrowseNodeDlg.h"
27 #include "SUPERVGUI_CanvasNode.h"
28 #include "SUPERVGUI_CanvasPort.h"
29 #include "SUPERVGUI.h"
33 #include <qlineedit.h>
34 #include <qpushbutton.h>
36 #include <qgroupbox.h>
37 #include <qvalidator.h>
42 SUPERVGUI_PortField::SUPERVGUI_PortField( QWidget* theParent, SUPERV_Port thePort ) {
44 myIsEditable = myPort->IsInput() && ( !myPort->IsLinked() );
46 QString aLabelTxt(myPort->Name());
48 SUPERV_CNode aNode = myPort->Node();
49 SALOME_ModuleCatalog::Service* aService = aNode->Service();
50 SALOME_ModuleCatalog::ListOfServicesParameter aList;
51 aList = (myPort->IsInput())? aService->ServiceinParameter : aService->ServiceoutParameter;
52 for (int i = 0; i < aList.length(); i++) {
53 SALOME_ModuleCatalog::ServicesParameter* aParam = &(aList[i]);
54 if (aLabelTxt == aParam->Parametername) {
55 aLabelTxt += QString(" (") + QString(aParam->Parametertype) + QString(")");
60 aLabelTxt += QString(":");
61 myLabel = new QLabel(aLabelTxt, theParent );
63 myValue = new QLineEdit( theParent );
64 myLabel->setBuddy( myValue );
66 myValue->setReadOnly( !myIsEditable );
67 QPalette aPalette = myValue->palette();
68 aPalette.setInactive(aPalette.disabled());
69 aPalette.setActive(aPalette.disabled());
70 myValue->setPalette(aPalette);
72 myValue->installEventFilter( this );
76 * Sets value from text edit control to engine of port
78 bool SUPERVGUI_PortField::setNewValue() {
79 if ( !myIsEditable ) return false;
81 QString aTxt = myValue->text();
82 if ( aTxt.isNull() || aTxt.isEmpty() ) return false;
84 if ( aTxt.find( "Unknown" ) < 0 ) {
85 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
87 MESSAGE("NULL Supervision module!");
90 return myPort->Input( aSupMod->getEngine()->StringValue( aTxt ) );
98 bool SUPERVGUI_PortField::eventFilter( QObject* o, QEvent* e )
100 if ( o == myValue ) {
101 if ( e->type() == QEvent::FocusIn ) {
105 return QObject::eventFilter( o, e );
110 * Constructor (SUPERVGUI_CanvasNode)
112 SUPERVGUI_BrowseNodeDlg::SUPERVGUI_BrowseNodeDlg( SUPERVGUI_CanvasNode* theNode )
113 : QDialog( SUIT_Session::session()->activeApplication()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
115 myNodeCanvas = theNode;
120 void SUPERVGUI_BrowseNodeDlg::init()
123 setSizeGripEnabled( true );
124 myPortsList.setAutoDelete( true );
126 SUPERV_CNode aEngine = myNodeCanvas->getEngine();
128 setName( "SUPERVGUI_BrowseNodeDlg" );
129 setCaption( tr( "TIT_BROWSENODE" ) + aEngine->Name() );
131 QGridLayout* aBaseLayout = new QGridLayout( this );
132 aBaseLayout->setMargin( 11 ); aBaseLayout->setSpacing( 6 );
134 QGroupBox* aInBox = new QGroupBox( 2, Qt::Horizontal, "Input", this );
135 aInBox->setMargin( 11 );
136 aBaseLayout->addWidget( aInBox, 0, 0 );
138 QGroupBox* aOutBox = new QGroupBox( 2, Qt::Horizontal, "Output", this);
139 aOutBox->setMargin( 11 );
140 aBaseLayout->addWidget( aOutBox, 0, 1 );
142 myIsEditable = false;
145 SUPERV_Ports ports = aEngine->Ports();
146 int n = ports->length();
148 for ( int i = 0; i < n; i++ ) {
149 if ( ports[i]->IsInput() ) {
150 if ( !ports[i]->IsGate() ) { // not a gate
151 SUPERVGUI_PortField* aField = new SUPERVGUI_PortField( aInBox, ports[i] );
152 if ( aField->isEditable() )
154 myPortsList.append( aField );
155 if ( !myActiveField )
156 myActiveField = aField;
157 connect( aField, SIGNAL( activated() ), this, SLOT( onFieldActivated() ) );
162 if ( !ports[i]->IsGate() ) { // not a gate
163 myPortsList.append( new SUPERVGUI_PortField( aOutBox, ports[i] ) );
169 QGroupBox* aBtnBox = new QGroupBox( this );
170 aBtnBox->setColumnLayout( 0, Qt::Vertical );
171 aBtnBox->layout()->setSpacing( 0 );
172 aBtnBox->layout()->setMargin( 0 );
174 QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() );
175 aBtnLayout->setAlignment( Qt::AlignTop );
176 aBtnLayout->setSpacing( 6 );
177 aBtnLayout->setMargin( 11 );
179 if ( myIsEditable ) {
180 QLabel* aInfoLab = new QLabel( tr( "ENTER_OR_SELECT_LBL" ), this );
181 aBaseLayout->addMultiCellWidget( aInfoLab, 1, 1, 0, 1 );
183 QPushButton* aOkBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox );
184 connect( aOkBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
185 aBtnLayout->addWidget( aOkBtn );
186 aBaseLayout->addMultiCellWidget( aBtnBox, 2, 2, 0, 1 );
188 aBaseLayout->addMultiCellWidget( aBtnBox, 1, 1, 0, 1 );
190 aBtnLayout->addStretch();
191 QPushButton* aCancelBtn = new QPushButton( myIsEditable ? tr( "BUT_CANCEL" ) : tr( "BUT_CLOSE" ), aBtnBox );
192 aBtnLayout->addWidget( aCancelBtn );
193 connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
196 aBtnLayout->addStretch();
198 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
199 if ( aSupMod ) connect( (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))->selectionMgr(),
200 SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
201 else MESSAGE("NULL Supervision module!");
203 myNodeCanvas->getMain()->lockedGraph(true);
209 SUPERVGUI_BrowseNodeDlg::~SUPERVGUI_BrowseNodeDlg() {
213 * Set current values of editable ports
215 void SUPERVGUI_BrowseNodeDlg::setValues() {
216 SUPERVGUI_PortField* aField;
217 for ( aField = myPortsList.first(); aField; aField = myPortsList.next() ) {
223 * Set inputed values of editable ports and then closes and destroys dialog
225 void SUPERVGUI_BrowseNodeDlg::accept() {
226 myNodeCanvas->getMain()->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
227 if ( myIsEditable ) {
228 SUPERVGUI_PortField* aField;
229 for ( aField = myPortsList.first(); aField; aField = myPortsList.next() ) {
230 aField->setNewValue();
232 myNodeCanvas->sync();
233 myNodeCanvas->getMain()->getCanvas()->update();
235 myNodeCanvas->getMain()->lockedGraph(false);
242 * Closes and destroys dialog
244 void SUPERVGUI_BrowseNodeDlg::reject() {
245 myNodeCanvas->getMain()->lockedGraph(false);
251 * Update current values on show event
253 void SUPERVGUI_BrowseNodeDlg::showEvent( QShowEvent* theEvent ) {
255 QDialog::showEvent( theEvent );
259 * Slot, called when field is focused
261 void SUPERVGUI_BrowseNodeDlg::onFieldActivated()
263 SUPERVGUI_PortField* aField = (SUPERVGUI_PortField*)sender();
264 myActiveField = (aField->isEditable())? aField : 0;
270 * Slot, called when selection is changed
272 void SUPERVGUI_BrowseNodeDlg::onSelectionChanged()
274 if ( myActiveField ) {
279 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
281 MESSAGE("NULL Supervision module!");
285 (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))
286 ->selectionMgr()->selectedObjects( aList );
288 if( aList.Extent() == 1 ) {
289 Handle( SALOME_InteractiveObject ) anIO = aList.First();
290 if ( anIO->hasEntry() ) {
291 _PTR(SObject) aObj ( dynamic_cast<SalomeApp_Study*>( aSupMod->getActiveStudy() )->
292 studyDS()->FindObjectID( anIO->getEntry() ) );
294 _PTR(GenericAttribute) anAttr;
297 if (aObj->FindAttribute( anAttr, "AttributeIOR" ) ) {
298 _PTR(AttributeIOR) anIOR ( anAttr );
299 ior = anIOR->Value().c_str();
302 SALOMEDS_Study* aSStudy = dynamic_cast<SALOMEDS_Study*>( aObj->GetStudy().get() );
303 SALOMEDS_SObject* aSSObj = dynamic_cast<SALOMEDS_SObject*>( aObj.get() );
304 if ( aSStudy && aSSObj )
305 ior = aSStudy->ConvertObjectToIOR( aSSObj->GetObject() ).c_str();
307 myActiveField->setData( ior );
315 * Constructor (SUPERVGUI_CanvasPort)
317 SUPERVGUI_GetValueDlg::SUPERVGUI_GetValueDlg( SUPERVGUI_CanvasPort* thePort )
318 : QDialog( SUIT_Session::session()->activeApplication()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
320 myPortCanvas = thePort;
325 void SUPERVGUI_GetValueDlg::init()
328 setSizeGripEnabled( true );
330 setName( "SUPERVGUI_GetValueDlg" );
331 setCaption( tr( "TIT_SETVALUE_PORT" ) );
333 QGridLayout* aBaseLayout = new QGridLayout( this );
334 aBaseLayout->setMargin( 11 ); aBaseLayout->setSpacing( 6 );
336 QGroupBox* aBox = new QGroupBox( this );
337 aBox->setColumnLayout( 0, Qt::Vertical );
338 aBox->layout()->setSpacing( 0 ); aBox->layout()->setMargin( 0 );
339 QGridLayout* aBoxLayout = new QGridLayout( aBox->layout() );
340 aBoxLayout->setAlignment( Qt::AlignTop );
341 aBoxLayout->setSpacing( 6 ); aBoxLayout->setMargin( 11 );
342 aBaseLayout->addWidget( aBox, 0, 0 );
343 aBox->setMinimumWidth( 200 );
345 QLabel* aInfoLab = new QLabel( tr( "ENTER_OR_SELECT_LBL" ), aBox );
346 QFont fnt = aInfoLab->font(); fnt.setBold( true ); aInfoLab->setFont( fnt );
347 aBoxLayout->addMultiCellWidget( aInfoLab, 0, 0, 0, 1 );
348 SUPERV_Port aEngine = myPortCanvas->getEngine();
350 myField = new SUPERVGUI_PortField( aBox, aEngine );
351 bool myIsEditable = myField->isEditable();
352 aBoxLayout->addWidget( myField->myLabel, 1, 0 );
353 aBoxLayout->addWidget( myField->myValue, 1, 1 );
355 QGroupBox* aBtnBox = new QGroupBox( this );
356 aBtnBox->setColumnLayout( 0, Qt::Vertical );
357 aBtnBox->layout()->setSpacing( 0 ); aBtnBox->layout()->setMargin( 0 );
358 QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() );
359 aBtnLayout->setAlignment( Qt::AlignTop );
360 aBtnLayout->setSpacing( 6 ); aBtnLayout->setMargin( 11 );
362 aBaseLayout->addWidget( aBtnBox, 1, 0 );
364 if ( myIsEditable ) {
365 myOKBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox );
366 connect( myOKBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
367 aBtnLayout->addWidget( myOKBtn );
370 aBtnLayout->addStretch();
371 myCancelBtn = new QPushButton( myIsEditable ? tr( "BUT_CANCEL" ) : tr( "BUT_CLOSE" ), aBtnBox );
372 aBtnLayout->addWidget( myCancelBtn );
373 connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
376 aBtnLayout->addStretch();
378 myField->updateGUI();
380 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
381 if ( aSupMod ) connect( (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))->selectionMgr(),
382 SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
383 else MESSAGE("NULL Supervision module!");
385 myPortCanvas->getMain()->lockedGraph(true);
391 SUPERVGUI_GetValueDlg::~SUPERVGUI_GetValueDlg() {
395 * Set entered value into port and then closes and destroys dialog
397 void SUPERVGUI_GetValueDlg::accept() {
398 myPortCanvas->getMain()->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
399 if ( myField->setNewValue() ) {
401 myPortCanvas->sync();
403 // asv : 19.11.04 : fix for 6170, last comment of it about BrowsePort - update node status
404 // asv : 13.12.04 : commented out sync() of Node. See 2.21.
405 //if ( myPortCanvas->parent() && myPortCanvas->parent()->inherits( "SUPERVGUI_CanvasNode" ) ) {
406 // SUPERVGUI_CanvasNode* aNode = (SUPERVGUI_CanvasNode*)myPortCanvas->parent();
410 myPortCanvas->getMain()->getCanvas()->update();
413 if ( QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(),
414 tr( "ERROR" ), tr( "MSG_CANT_SETVAL" ),
415 QMessageBox::Retry, QMessageBox::Abort) == QMessageBox::Retry )
419 myPortCanvas->getMain()->lockedGraph(false);
426 * Closes and destroys dialog
428 void SUPERVGUI_GetValueDlg::reject() {
429 myPortCanvas->getMain()->lockedGraph(false);
435 * Slot, called when selection is changed
437 void SUPERVGUI_GetValueDlg::onSelectionChanged()
442 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
444 MESSAGE("NULL Supervision module!");
448 (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))
449 ->selectionMgr()->selectedObjects( aList );
451 if( aList.Extent() == 1 ) {
452 Handle( SALOME_InteractiveObject ) anIO = aList.First();
453 if ( anIO->hasEntry() ) {
454 _PTR(SObject) aObj ( dynamic_cast<SalomeApp_Study*>( aSupMod->getActiveStudy() )->
455 studyDS()->FindObjectID( anIO->getEntry() ) );
457 _PTR(GenericAttribute) anAttr;
460 if (aObj->FindAttribute( anAttr, "AttributeIOR" ) ) {
461 _PTR(AttributeIOR) anIOR ( anAttr );
462 ior = anIOR->Value().c_str();
465 SALOMEDS_Study* aSStudy = dynamic_cast<SALOMEDS_Study*>( aObj->GetStudy().get() );
466 SALOMEDS_SObject* aSSObj = dynamic_cast<SALOMEDS_SObject*>( aObj.get() );
467 if ( aSStudy && aSSObj )
468 ior = aSStudy->ConvertObjectToIOR( aSSObj->GetObject() ).c_str();
470 myField->setData( ior );
477 // ----------------------------
479 // ----------------------------
481 SUPERVGUI_StreamInDlg::SUPERVGUI_StreamInDlg(SUPERVGUI_CanvasStreamPortIn* thePort)
482 :QDialog( SUIT_Session::session()->activeApplication()->desktop(), "", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
484 myPortCanvas = thePort;
488 void SUPERVGUI_StreamInDlg::init()
490 setSizeGripEnabled( true );
491 setCaption( tr( "MSG_STREAM_DLG_TIT" ) );
493 QVBoxLayout* TopLayout = new QVBoxLayout( this, 11, 6 );
495 QFrame* aCtrlPane = new QFrame(this);
496 QGridLayout* aCtrlLayout = new QGridLayout( aCtrlPane, 4, 10 );
499 QLabel* aSchemaLbl = new QLabel(tr("MSG_STREAM_SCHEMA"),aCtrlPane);
500 aCtrlLayout->addWidget(aSchemaLbl, 0, 0);
502 mySchemaCombo = new QComboBox(aCtrlPane, "SchemaBox" );
503 mySchemaCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
504 mySchemaCombo->insertItem("SCHENULL");
505 mySchemaCombo->insertItem("TI");
506 mySchemaCombo->insertItem("TF");
507 mySchemaCombo->insertItem("DELTA");
508 aCtrlLayout->addWidget(mySchemaCombo, 0, 1);
511 QLabel* aInterLbl = new QLabel(tr("MSG_STREAM_INTER"),aCtrlPane);
512 aCtrlLayout->addWidget(aInterLbl, 1, 0);
514 myInterCombo = new QComboBox(aCtrlPane, "InterBox" );
515 myInterCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
516 myInterCombo->insertItem("INTERNULL");
517 myInterCombo->insertItem("L0");
518 myInterCombo->insertItem("L1");
519 aCtrlLayout->addWidget(myInterCombo, 1, 1);
522 QLabel* aExtraLbl = new QLabel(tr("MSG_STREAM_EXTRA"),aCtrlPane);
523 aCtrlLayout->addWidget(aExtraLbl, 2, 0);
525 myExterCombo = new QComboBox(aCtrlPane, "ExtraBox" );
526 myExterCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
527 myExterCombo->insertItem("EXTRANULL");
528 myExterCombo->insertItem("E0");
529 myExterCombo->insertItem("E1");
530 aCtrlLayout->addWidget(myExterCombo, 2, 1);
532 TopLayout->addWidget( aCtrlPane );
535 QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
536 GroupButtons->setColumnLayout(0, Qt::Vertical );
537 GroupButtons->layout()->setSpacing( 0 );
538 GroupButtons->layout()->setMargin( 0 );
539 QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
540 GroupButtonsLayout->setAlignment( Qt::AlignTop );
541 GroupButtonsLayout->setSpacing( 5 );
542 GroupButtonsLayout->setMargin( 8 );
544 QPushButton* okB = new QPushButton( tr( "BUT_OK" ), GroupButtons );
545 QPushButton* cancelB = new QPushButton( tr( "BUT_CANCEL" ), GroupButtons );
547 GroupButtonsLayout->addWidget( okB, 0, 0 );
548 GroupButtonsLayout->addItem ( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
549 GroupButtonsLayout->addWidget( cancelB, 0, 2 );
551 TopLayout->addWidget( GroupButtons );
553 connect( okB, SIGNAL( clicked() ), this, SLOT( accept() ) );
554 connect( cancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
558 void SUPERVGUI_StreamInDlg::setData() {
559 SUPERV::KindOfSchema aSchema;
560 SUPERV::KindOfInterpolation aInterpolat;
561 SUPERV::KindOfExtrapolation aExtrapolat;
563 myPortCanvas->getStreamEngine()->Params(aSchema, aInterpolat, aExtrapolat);
565 mySchemaCombo->setCurrentItem((int)aSchema);
566 myInterCombo->setCurrentItem((int)aInterpolat);
567 myExterCombo->setCurrentItem((int)aExtrapolat);
570 void SUPERVGUI_StreamInDlg::accept() {
571 myPortCanvas->getMain()->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
572 myPortCanvas->getStreamEngine()->SetParams((SUPERV::KindOfSchema) mySchemaCombo->currentItem(),
573 (SUPERV::KindOfInterpolation) myInterCombo->currentItem(),
574 (SUPERV::KindOfExtrapolation) myExterCombo->currentItem());
579 //-------------------------------------------------------------------------
580 SUPERVGUI_StreamOutDlg::SUPERVGUI_StreamOutDlg(SUPERVGUI_CanvasStreamPortOut* thePort)
581 :QDialog( SUIT_Session::session()->activeApplication()->desktop(), "", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
583 myPortCanvas = thePort;
587 void SUPERVGUI_StreamOutDlg::init()
589 setSizeGripEnabled( true );
590 setCaption( tr( "MSG_STREAM_DLG_TIT" ) );
592 QVBoxLayout* TopLayout = new QVBoxLayout( this, 11, 6 );
594 QFrame* aCtrlPane = new QFrame(this);
595 QGridLayout* aCtrlLayout = new QGridLayout( aCtrlPane, 4, 10 );
597 QLabel* aLbl = new QLabel(tr("MSG_STREAM_LEVEL"),aCtrlPane);
598 aCtrlLayout->addWidget(aLbl, 0, 0);
600 myValEdit = new QLineEdit( aCtrlPane, "ValEdit" );
601 myValEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
602 myValEdit->setValidator( new QIntValidator(this) );
603 SUPERV_StreamPort aEngine = myPortCanvas->getStreamEngine();
604 myValEdit->setText(QString("%1").arg(aEngine->NumberOfValues()));
605 aCtrlLayout->addWidget(myValEdit, 0, 1);
606 TopLayout->addWidget( aCtrlPane );
609 QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
610 GroupButtons->setColumnLayout(0, Qt::Vertical );
611 GroupButtons->layout()->setSpacing( 0 );
612 GroupButtons->layout()->setMargin( 0 );
613 QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
614 GroupButtonsLayout->setAlignment( Qt::AlignTop );
615 GroupButtonsLayout->setSpacing( 5 );
616 GroupButtonsLayout->setMargin( 8 );
618 QPushButton* okB = new QPushButton( tr( "BUT_OK" ), GroupButtons );
619 QPushButton* cancelB = new QPushButton( tr( "BUT_CANCEL" ), GroupButtons );
621 GroupButtonsLayout->addWidget( okB, 0, 0 );
622 GroupButtonsLayout->addItem ( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
623 GroupButtonsLayout->addWidget( cancelB, 0, 2 );
625 TopLayout->addWidget( GroupButtons );
627 connect( okB, SIGNAL( clicked() ), this, SLOT( accept() ) );
628 connect( cancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
631 void SUPERVGUI_StreamOutDlg::accept() {
633 QString aStr = myValEdit->text();
635 aRes = aStr.toLong();
636 myPortCanvas->getStreamEngine()->SetNumberOfValues(aRes);