-: HYDROGUI_InputPanel( theModule, theTitle ), myName(NULL)
-{
- QHBoxLayout* aNameLayout = new QHBoxLayout();
- QLabel* aNameLabel = new QLabel(tr("PROFILE_NAME_TLT"), this);
- aNameLayout->addWidget(aNameLabel);
- myName = new QLineEdit(this);
- aNameLayout->addWidget(myName);
-
- addLayout(aNameLayout);
-
- int anActionFlags =
- CurveCreator_Widget::DisableNewSection | CurveCreator_Widget::DisableDetectionMode |
- CurveCreator_Widget::DisableClosedSection;
- QStringList aCoordTitles;
- aCoordTitles << tr( "U_TITLE" ) << tr( "Z_TITLE" );
- myEditorWidget = new CurveCreator_Widget( this, NULL, anActionFlags, aCoordTitles );
- addWidget( myEditorWidget, 3 );
-
- myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this );
- addWidget( myAddElementBox, 2 );
-
- QBoxLayout* anAddElementLayout = new QVBoxLayout( myAddElementBox );
- anAddElementLayout->setMargin( 0 );
- anAddElementLayout->setSpacing( 5 );
-
- myViewManager = new OCCViewer_ViewManager( theModule->getApp()->activeStudy(), 0 );
- OCCViewer_Viewer* aViewer = new OCCViewer_Viewer( false );
-
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- aViewer->setBackground( OCCViewer_ViewFrame::TOP_LEFT,
- aResMgr->backgroundValue( "OCCViewer", "xz_background", aViewer->background(OCCViewer_ViewFrame::TOP_LEFT) ) );
- aViewer->setBackground( OCCViewer_ViewFrame::TOP_RIGHT,
- aResMgr->backgroundValue( "OCCViewer", "yz_background", aViewer->background(OCCViewer_ViewFrame::TOP_RIGHT) ) );
- aViewer->setBackground( OCCViewer_ViewFrame::BOTTOM_LEFT,
- aResMgr->backgroundValue( "OCCViewer", "xy_background", aViewer->background(OCCViewer_ViewFrame::BOTTOM_LEFT) ) );
- aViewer->setBackground( OCCViewer_ViewFrame::BOTTOM_RIGHT,
- aResMgr->backgroundValue( "OCCViewer", "background", aViewer->background(OCCViewer_ViewFrame::MAIN_VIEW) ) );
-
- aViewer->setTrihedronSize( aResMgr->doubleValue( "3DViewer", "trihedron_size", aViewer->trihedronSize() ),
- aResMgr->booleanValue( "3DViewer", "relative_size", aViewer->trihedronRelative() ));
- aViewer->setInteractionStyle( aResMgr->integerValue( "3DViewer", "navigation_mode", aViewer->interactionStyle() ) );
- aViewer->setZoomingStyle( aResMgr->integerValue( "3DViewer", "zooming_mode", aViewer->zoomingStyle() ) );
- aViewer->enablePreselection( aResMgr->booleanValue( "OCCViewer", "enable_preselection", aViewer->isPreselectionEnabled() ) );
- aViewer->enableSelection( aResMgr->booleanValue( "OCCViewer", "enable_selection", aViewer->isSelectionEnabled() ) );
-
- myViewManager->setViewModel( aViewer );// custom view model, which extends SALOME_View interface
- SUIT_ViewWindow* aViewWin = myViewManager->createViewWindow();
- aViewer->setStaticTrihedronDisplayed( false );
- Handle(AIS_Trihedron) aTrihedron = HYDROGUI_AISTrihedron::createTrihedron(
- aResMgr->doubleValue( "3DViewer", "trihedron_size",
- aViewer->trihedronSize() ));
- Handle(AIS_InteractiveContext) anAISContext = aViewer->getAISContext();
- if ( !anAISContext.IsNull() ) {
- anAISContext->Display( aTrihedron );
- anAISContext->Deactivate( aTrihedron );
- }
-
- addWidget( aViewWin, 4 );
- myEditorWidget->setOCCViewer( aViewer );
-
- connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
- connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*, bool) ), this, SLOT( processStartedSubOperation(QWidget*, bool) ) );
- connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
-
- myAddElementBox->hide();
-
- // Coordinates
- connect( myViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
- this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
- if ( aViewWin ) {
- OCCViewer_ViewFrame* aViewFrame = dynamic_cast<OCCViewer_ViewFrame*>( aViewWin );
- if ( aViewFrame && aViewFrame->getViewPort() ) {
- aViewFrame->getViewPort()->installEventFilter( this );
- }
- }
+ : HYDROGUI_ViewerDlg( theModule, theTitle )
+{
+ QWidget* main = new QGroupBox( mainFrame() );
+ QGridLayout* base = new QGridLayout( main );
+
+ addWidget( main );
+
+ base->addWidget( new QLabel( tr( "STREAM_OBJECT" ), main ), 0, 0, 1, 1 );
+ base->addWidget( myRiver = new HYDROGUI_ObjComboBox( theModule, QString::null, KIND_STREAM, main ), 0, 1, 1, 1 );
+
+ base->addWidget( new QLabel( tr( "INTERPOLATOR" ), main ), 1, 0, 1, 1 );
+ base->addWidget( myIntrp = new QComboBox( main ), 1, 1, 1, 1 );
+
+ base->addWidget( new QLabel( tr( "DESCRIPTION" ), main ), 2, 0, 1, 1 );
+ base->addWidget( myDescr = new QTextEdit( main ), 2, 1, 1, 1 );
+ myDescr->setReadOnly( true );
+
+ base->addWidget( new QLabel( tr( "PROFILE_1" ), main ), 3, 0, 1, 1 );
+ base->addWidget( myProfileStart = new HYDROGUI_ObjComboBox( theModule, QString::null, KIND_PROFILE, main ), 3, 1, 1, 1 );
+ myProfileStart->setObjectFilter( this );