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 //mkr : fix for bug IPAL9441
83 //if ( aTxt.isNull() || aTxt.isEmpty() ) return false;
85 if ( aTxt.find( "Unknown" ) < 0 ) {
86 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
88 MESSAGE("NULL Supervision module!");
91 return myPort->Input( aSupMod->getEngine()->StringValue( aTxt ) );
99 bool SUPERVGUI_PortField::eventFilter( QObject* o, QEvent* e )
101 if ( o == myValue ) {
102 if ( e->type() == QEvent::FocusIn ) {
106 return QObject::eventFilter( o, e );
111 * Constructor (SUPERVGUI_CanvasNode)
113 SUPERVGUI_BrowseNodeDlg::SUPERVGUI_BrowseNodeDlg( SUPERVGUI_CanvasNode* theNode )
114 : QDialog( SUIT_Session::session()->activeApplication()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
116 myNodeCanvas = theNode;
121 void SUPERVGUI_BrowseNodeDlg::init()
124 setSizeGripEnabled( true );
125 myPortsList.setAutoDelete( true );
127 SUPERV_CNode aEngine = myNodeCanvas->getEngine();
129 setName( "SUPERVGUI_BrowseNodeDlg" );
130 setCaption( tr( "TIT_BROWSENODE" ) + aEngine->Name() );
132 QGridLayout* aBaseLayout = new QGridLayout( this );
133 aBaseLayout->setMargin( 11 ); aBaseLayout->setSpacing( 6 );
135 QGroupBox* aInBox = new QGroupBox( 2, Qt::Horizontal, "Input", this );
136 aInBox->setMargin( 11 );
137 aBaseLayout->addWidget( aInBox, 0, 0 );
139 QGroupBox* aOutBox = new QGroupBox( 2, Qt::Horizontal, "Output", this);
140 aOutBox->setMargin( 11 );
141 aBaseLayout->addWidget( aOutBox, 0, 1 );
143 myIsEditable = false;
146 SUPERV_Ports ports = aEngine->Ports();
147 int n = ports->length();
149 for ( int i = 0; i < n; i++ ) {
150 if ( ports[i]->IsInput() ) {
151 if ( !ports[i]->IsGate() ) { // not a gate
152 SUPERVGUI_PortField* aField = new SUPERVGUI_PortField( aInBox, ports[i] );
153 if ( aField->isEditable() )
155 myPortsList.append( aField );
156 if ( !myActiveField )
157 myActiveField = aField;
158 connect( aField, SIGNAL( activated() ), this, SLOT( onFieldActivated() ) );
163 if ( !ports[i]->IsGate() ) { // not a gate
164 myPortsList.append( new SUPERVGUI_PortField( aOutBox, ports[i] ) );
170 QGroupBox* aBtnBox = new QGroupBox( this );
171 aBtnBox->setColumnLayout( 0, Qt::Vertical );
172 aBtnBox->layout()->setSpacing( 0 );
173 aBtnBox->layout()->setMargin( 0 );
175 QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() );
176 aBtnLayout->setAlignment( Qt::AlignTop );
177 aBtnLayout->setSpacing( 6 );
178 aBtnLayout->setMargin( 11 );
180 if ( myIsEditable ) {
181 QLabel* aInfoLab = new QLabel( tr( "ENTER_OR_SELECT_LBL" ), this );
182 aBaseLayout->addMultiCellWidget( aInfoLab, 1, 1, 0, 1 );
184 QPushButton* aOkBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox );
185 connect( aOkBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
186 aBtnLayout->addWidget( aOkBtn );
187 aBaseLayout->addMultiCellWidget( aBtnBox, 2, 2, 0, 1 );
189 aBaseLayout->addMultiCellWidget( aBtnBox, 1, 1, 0, 1 );
191 aBtnLayout->addStretch();
192 QPushButton* aCancelBtn = new QPushButton( myIsEditable ? tr( "BUT_CANCEL" ) : tr( "BUT_CLOSE" ), aBtnBox );
193 aBtnLayout->addWidget( aCancelBtn );
194 connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
197 aBtnLayout->addStretch();
199 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
200 if ( aSupMod ) connect( (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))->selectionMgr(),
201 SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
202 else MESSAGE("NULL Supervision module!");
204 myNodeCanvas->getMain()->lockedGraph(true);
210 SUPERVGUI_BrowseNodeDlg::~SUPERVGUI_BrowseNodeDlg() {
214 * Set current values of editable ports
216 void SUPERVGUI_BrowseNodeDlg::setValues() {
217 SUPERVGUI_PortField* aField;
218 for ( aField = myPortsList.first(); aField; aField = myPortsList.next() ) {
224 * Set inputed values of editable ports and then closes and destroys dialog
226 void SUPERVGUI_BrowseNodeDlg::accept() {
227 myNodeCanvas->getMain()->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
228 if ( myIsEditable ) {
229 SUPERVGUI_PortField* aField;
230 for ( aField = myPortsList.first(); aField; aField = myPortsList.next() ) {
231 aField->setNewValue();
233 myNodeCanvas->sync();
234 myNodeCanvas->getMain()->getCanvas()->update();
236 myNodeCanvas->getMain()->lockedGraph(false);
243 * Closes and destroys dialog
245 void SUPERVGUI_BrowseNodeDlg::reject() {
246 myNodeCanvas->getMain()->lockedGraph(false);
252 * Update current values on show event
254 void SUPERVGUI_BrowseNodeDlg::showEvent( QShowEvent* theEvent ) {
256 QDialog::showEvent( theEvent );
260 * Slot, called when field is focused
262 void SUPERVGUI_BrowseNodeDlg::onFieldActivated()
264 SUPERVGUI_PortField* aField = (SUPERVGUI_PortField*)sender();
265 myActiveField = (aField->isEditable())? aField : 0;
271 * Slot, called when selection is changed
273 void SUPERVGUI_BrowseNodeDlg::onSelectionChanged()
275 if ( myActiveField ) {
280 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
282 MESSAGE("NULL Supervision module!");
286 (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))
287 ->selectionMgr()->selectedObjects( aList );
289 if( aList.Extent() == 1 ) {
290 Handle( SALOME_InteractiveObject ) anIO = aList.First();
291 if ( anIO->hasEntry() ) {
292 _PTR(SObject) aObj ( dynamic_cast<SalomeApp_Study*>( aSupMod->getActiveStudy() )->
293 studyDS()->FindObjectID( anIO->getEntry() ) );
295 _PTR(GenericAttribute) anAttr;
298 if (aObj->FindAttribute( anAttr, "AttributeIOR" ) ) {
299 _PTR(AttributeIOR) anIOR ( anAttr );
300 ior = anIOR->Value().c_str();
303 SALOMEDS_Study* aSStudy = dynamic_cast<SALOMEDS_Study*>( aObj->GetStudy().get() );
304 SALOMEDS_SObject* aSSObj = dynamic_cast<SALOMEDS_SObject*>( aObj.get() );
305 if ( aSStudy && aSSObj )
306 ior = aSStudy->ConvertObjectToIOR( aSSObj->GetObject() ).c_str();
308 myActiveField->setData( ior );
316 * Constructor (SUPERVGUI_CanvasPort)
318 SUPERVGUI_GetValueDlg::SUPERVGUI_GetValueDlg( SUPERVGUI_CanvasPort* thePort )
319 : QDialog( SUIT_Session::session()->activeApplication()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
321 myPortCanvas = thePort;
326 void SUPERVGUI_GetValueDlg::init()
329 setSizeGripEnabled( true );
331 setName( "SUPERVGUI_GetValueDlg" );
332 setCaption( tr( "TIT_SETVALUE_PORT" ) );
334 QGridLayout* aBaseLayout = new QGridLayout( this );
335 aBaseLayout->setMargin( 11 ); aBaseLayout->setSpacing( 6 );
337 QGroupBox* aBox = new QGroupBox( this );
338 aBox->setColumnLayout( 0, Qt::Vertical );
339 aBox->layout()->setSpacing( 0 ); aBox->layout()->setMargin( 0 );
340 QGridLayout* aBoxLayout = new QGridLayout( aBox->layout() );
341 aBoxLayout->setAlignment( Qt::AlignTop );
342 aBoxLayout->setSpacing( 6 ); aBoxLayout->setMargin( 11 );
343 aBaseLayout->addWidget( aBox, 0, 0 );
344 aBox->setMinimumWidth( 200 );
346 QLabel* aInfoLab = new QLabel( tr( "ENTER_OR_SELECT_LBL" ), aBox );
347 QFont fnt = aInfoLab->font(); fnt.setBold( true ); aInfoLab->setFont( fnt );
348 aBoxLayout->addMultiCellWidget( aInfoLab, 0, 0, 0, 1 );
349 SUPERV_Port aEngine = myPortCanvas->getEngine();
351 myField = new SUPERVGUI_PortField( aBox, aEngine );
352 bool myIsEditable = myField->isEditable();
353 aBoxLayout->addWidget( myField->myLabel, 1, 0 );
354 aBoxLayout->addWidget( myField->myValue, 1, 1 );
356 QGroupBox* aBtnBox = new QGroupBox( this );
357 aBtnBox->setColumnLayout( 0, Qt::Vertical );
358 aBtnBox->layout()->setSpacing( 0 ); aBtnBox->layout()->setMargin( 0 );
359 QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() );
360 aBtnLayout->setAlignment( Qt::AlignTop );
361 aBtnLayout->setSpacing( 6 ); aBtnLayout->setMargin( 11 );
363 aBaseLayout->addWidget( aBtnBox, 1, 0 );
365 if ( myIsEditable ) {
366 myOKBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox );
367 connect( myOKBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
368 aBtnLayout->addWidget( myOKBtn );
371 aBtnLayout->addStretch();
372 myCancelBtn = new QPushButton( myIsEditable ? tr( "BUT_CANCEL" ) : tr( "BUT_CLOSE" ), aBtnBox );
373 aBtnLayout->addWidget( myCancelBtn );
374 connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
377 aBtnLayout->addStretch();
379 myField->updateGUI();
381 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
382 if ( aSupMod ) connect( (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))->selectionMgr(),
383 SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
384 else MESSAGE("NULL Supervision module!");
386 myPortCanvas->getMain()->lockedGraph(true);
392 SUPERVGUI_GetValueDlg::~SUPERVGUI_GetValueDlg() {
396 * Set entered value into port and then closes and destroys dialog
398 void SUPERVGUI_GetValueDlg::accept() {
399 myPortCanvas->getMain()->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
400 if ( myField->setNewValue() ) {
402 myPortCanvas->sync();
404 // asv : 19.11.04 : fix for 6170, last comment of it about BrowsePort - update node status
405 // asv : 13.12.04 : commented out sync() of Node. See 2.21.
406 //if ( myPortCanvas->parent() && myPortCanvas->parent()->inherits( "SUPERVGUI_CanvasNode" ) ) {
407 // SUPERVGUI_CanvasNode* aNode = (SUPERVGUI_CanvasNode*)myPortCanvas->parent();
411 myPortCanvas->getMain()->getCanvas()->update();
414 if ( QMessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(),
415 tr( "ERROR" ), tr( "MSG_CANT_SETVAL" ),
416 QMessageBox::Retry, QMessageBox::Abort) == QMessageBox::Retry )
420 myPortCanvas->getMain()->lockedGraph(false);
427 * Closes and destroys dialog
429 void SUPERVGUI_GetValueDlg::reject() {
430 myPortCanvas->getMain()->lockedGraph(false);
436 * Slot, called when selection is changed
438 void SUPERVGUI_GetValueDlg::onSelectionChanged()
443 SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
445 MESSAGE("NULL Supervision module!");
449 (( SalomeApp_Application* )(aSupMod->getActiveStudy()->application()))
450 ->selectionMgr()->selectedObjects( aList );
452 if( aList.Extent() == 1 ) {
453 Handle( SALOME_InteractiveObject ) anIO = aList.First();
454 if ( anIO->hasEntry() ) {
455 _PTR(SObject) aObj ( dynamic_cast<SalomeApp_Study*>( aSupMod->getActiveStudy() )->
456 studyDS()->FindObjectID( anIO->getEntry() ) );
458 _PTR(GenericAttribute) anAttr;
461 if (aObj->FindAttribute( anAttr, "AttributeIOR" ) ) {
462 _PTR(AttributeIOR) anIOR ( anAttr );
463 ior = anIOR->Value().c_str();
466 SALOMEDS_Study* aSStudy = dynamic_cast<SALOMEDS_Study*>( aObj->GetStudy().get() );
467 SALOMEDS_SObject* aSSObj = dynamic_cast<SALOMEDS_SObject*>( aObj.get() );
468 if ( aSStudy && aSSObj )
469 ior = aSStudy->ConvertObjectToIOR( aSSObj->GetObject() ).c_str();
471 myField->setData( ior );
478 // ----------------------------
480 // ----------------------------
482 SUPERVGUI_StreamInDlg::SUPERVGUI_StreamInDlg(SUPERVGUI_CanvasStreamPortIn* thePort)
483 :QDialog( SUIT_Session::session()->activeApplication()->desktop(), "", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
485 myPortCanvas = thePort;
489 void SUPERVGUI_StreamInDlg::init()
491 setSizeGripEnabled( true );
492 setCaption( tr( "MSG_STREAM_DLG_TIT" ) );
494 QVBoxLayout* TopLayout = new QVBoxLayout( this, 11, 6 );
496 QFrame* aCtrlPane = new QFrame(this);
497 QGridLayout* aCtrlLayout = new QGridLayout( aCtrlPane, 4, 10 );
500 QLabel* aSchemaLbl = new QLabel(tr("MSG_STREAM_SCHEMA"),aCtrlPane);
501 aCtrlLayout->addWidget(aSchemaLbl, 0, 0);
503 mySchemaCombo = new QComboBox(aCtrlPane, "SchemaBox" );
504 mySchemaCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
505 mySchemaCombo->insertItem("SCHENULL");
506 mySchemaCombo->insertItem("TI");
507 mySchemaCombo->insertItem("TF");
508 mySchemaCombo->insertItem("DELTA");
509 aCtrlLayout->addWidget(mySchemaCombo, 0, 1);
512 QLabel* aInterLbl = new QLabel(tr("MSG_STREAM_INTER"),aCtrlPane);
513 aCtrlLayout->addWidget(aInterLbl, 1, 0);
515 myInterCombo = new QComboBox(aCtrlPane, "InterBox" );
516 myInterCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
517 myInterCombo->insertItem("INTERNULL");
518 myInterCombo->insertItem("L0");
519 myInterCombo->insertItem("L1");
520 aCtrlLayout->addWidget(myInterCombo, 1, 1);
523 QLabel* aExtraLbl = new QLabel(tr("MSG_STREAM_EXTRA"),aCtrlPane);
524 aCtrlLayout->addWidget(aExtraLbl, 2, 0);
526 myExterCombo = new QComboBox(aCtrlPane, "ExtraBox" );
527 myExterCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
528 myExterCombo->insertItem("EXTRANULL");
529 myExterCombo->insertItem("E0");
530 myExterCombo->insertItem("E1");
531 aCtrlLayout->addWidget(myExterCombo, 2, 1);
533 TopLayout->addWidget( aCtrlPane );
536 QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
537 GroupButtons->setColumnLayout(0, Qt::Vertical );
538 GroupButtons->layout()->setSpacing( 0 );
539 GroupButtons->layout()->setMargin( 0 );
540 QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
541 GroupButtonsLayout->setAlignment( Qt::AlignTop );
542 GroupButtonsLayout->setSpacing( 5 );
543 GroupButtonsLayout->setMargin( 8 );
545 QPushButton* okB = new QPushButton( tr( "BUT_OK" ), GroupButtons );
546 QPushButton* cancelB = new QPushButton( tr( "BUT_CANCEL" ), GroupButtons );
548 GroupButtonsLayout->addWidget( okB, 0, 0 );
549 GroupButtonsLayout->addItem ( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
550 GroupButtonsLayout->addWidget( cancelB, 0, 2 );
552 TopLayout->addWidget( GroupButtons );
554 connect( okB, SIGNAL( clicked() ), this, SLOT( accept() ) );
555 connect( cancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
559 void SUPERVGUI_StreamInDlg::setData() {
560 SUPERV::KindOfSchema aSchema;
561 SUPERV::KindOfInterpolation aInterpolat;
562 SUPERV::KindOfExtrapolation aExtrapolat;
564 myPortCanvas->getStreamEngine()->Params(aSchema, aInterpolat, aExtrapolat);
566 mySchemaCombo->setCurrentItem((int)aSchema);
567 myInterCombo->setCurrentItem((int)aInterpolat);
568 myExterCombo->setCurrentItem((int)aExtrapolat);
571 void SUPERVGUI_StreamInDlg::accept() {
572 myPortCanvas->getMain()->Editing(); // PAL6170: GUI->Engine: setting "Editing" flag
573 myPortCanvas->getStreamEngine()->SetParams((SUPERV::KindOfSchema) mySchemaCombo->currentItem(),
574 (SUPERV::KindOfInterpolation) myInterCombo->currentItem(),
575 (SUPERV::KindOfExtrapolation) myExterCombo->currentItem());
580 //-------------------------------------------------------------------------
581 SUPERVGUI_StreamOutDlg::SUPERVGUI_StreamOutDlg(SUPERVGUI_CanvasStreamPortOut* thePort)
582 :QDialog( SUIT_Session::session()->activeApplication()->desktop(), "", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
584 myPortCanvas = thePort;
588 void SUPERVGUI_StreamOutDlg::init()
590 setSizeGripEnabled( true );
591 setCaption( tr( "MSG_STREAM_DLG_TIT" ) );
593 QVBoxLayout* TopLayout = new QVBoxLayout( this, 11, 6 );
595 QFrame* aCtrlPane = new QFrame(this);
596 QGridLayout* aCtrlLayout = new QGridLayout( aCtrlPane, 4, 10 );
598 QLabel* aLbl = new QLabel(tr("MSG_STREAM_LEVEL"),aCtrlPane);
599 aCtrlLayout->addWidget(aLbl, 0, 0);
601 myValEdit = new QLineEdit( aCtrlPane, "ValEdit" );
602 myValEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
603 myValEdit->setValidator( new QIntValidator(this) );
604 SUPERV_StreamPort aEngine = myPortCanvas->getStreamEngine();
605 myValEdit->setText(QString("%1").arg(aEngine->NumberOfValues()));
606 aCtrlLayout->addWidget(myValEdit, 0, 1);
607 TopLayout->addWidget( aCtrlPane );
610 QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
611 GroupButtons->setColumnLayout(0, Qt::Vertical );
612 GroupButtons->layout()->setSpacing( 0 );
613 GroupButtons->layout()->setMargin( 0 );
614 QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
615 GroupButtonsLayout->setAlignment( Qt::AlignTop );
616 GroupButtonsLayout->setSpacing( 5 );
617 GroupButtonsLayout->setMargin( 8 );
619 QPushButton* okB = new QPushButton( tr( "BUT_OK" ), GroupButtons );
620 QPushButton* cancelB = new QPushButton( tr( "BUT_CANCEL" ), GroupButtons );
622 GroupButtonsLayout->addWidget( okB, 0, 0 );
623 GroupButtonsLayout->addItem ( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
624 GroupButtonsLayout->addWidget( cancelB, 0, 2 );
626 TopLayout->addWidget( GroupButtons );
628 connect( okB, SIGNAL( clicked() ), this, SLOT( accept() ) );
629 connect( cancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
632 void SUPERVGUI_StreamOutDlg::accept() {
634 QString aStr = myValEdit->text();
636 aRes = aStr.toLong();
637 myPortCanvas->getStreamEngine()->SetNumberOfValues(aRes);