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
11 #include "SALOMEDSClient.hxx"
12 #include "SALOMEDS_SObject.hxx"
13 #include "SALOMEDS_Study.hxx"
15 #include "SalomeApp_Application.h"
16 #include "LightApp_SelectionMgr.h"
17 #include "SalomeApp_Study.h"
18 #include "SUIT_Session.h"
20 #include "SALOME_ListIO.hxx"
22 #include "SUPERVGUI_BrowseNodeDlg.h"
23 #include "SUPERVGUI_CanvasNode.h"
24 #include "SUPERVGUI_CanvasPort.h"
25 #include "SUPERVGUI.h"
29 #include <qlineedit.h>
30 #include <qpushbutton.h>
32 #include <qgroupbox.h>
33 #include <qvalidator.h>
35 #include <boost/shared_ptr.hpp>
36 using namespace boost;
41 SUPERVGUI_PortField::SUPERVGUI_PortField( QWidget* theParent, SUPERV_Port thePort ) {
43 myIsEditable = myPort->IsInput() && ( !myPort->IsLinked() );
45 QString aLabelTxt(myPort->Name());
47 SUPERV_CNode aNode = myPort->Node();
48 SALOME_ModuleCatalog::Service* aService = aNode->Service();
49 SALOME_ModuleCatalog::ListOfServicesParameter aList;
50 aList = (myPort->IsInput())? aService->ServiceinParameter : aService->ServiceoutParameter;
51 for (int i = 0; i < aList.length(); i++) {
52 SALOME_ModuleCatalog::ServicesParameter* aParam = &(aList[i]);
53 if (aLabelTxt == aParam->Parametername) {
54 aLabelTxt += QString(" (") + QString(aParam->Parametertype) + QString(")");
59 aLabelTxt += QString(":");
60 myLabel = new QLabel(aLabelTxt, theParent );
62 myValue = new QLineEdit( theParent );
63 myLabel->setBuddy( myValue );
65 myValue->setReadOnly( !myIsEditable );
66 QPalette aPalette = myValue->palette();
67 aPalette.setInactive(aPalette.disabled());
68 aPalette.setActive(aPalette.disabled());
69 myValue->setPalette(aPalette);
71 myValue->installEventFilter( this );
75 * Sets value from text edit control to engine of port
77 bool SUPERVGUI_PortField::setNewValue() {
78 if ( !myIsEditable ) return false;
80 QString aTxt = myValue->text();
81 //mkr : fix for bug IPAL9441
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() ) {
218 if ( aField->getData().isEmpty() || aField->getData().isNull() ) // mkr : PAL11406
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);