emit panelCancel();
}
+void HYDROGUI_InputPanel::insertWidget( QWidget* theWidget, int theIndex, int theStretch )
+{
+ QBoxLayout* aMainLayout = dynamic_cast<QBoxLayout*>( myMainFrame->layout() );
+ aMainLayout->insertWidget( theIndex, theWidget, theStretch );
+}
+
void HYDROGUI_InputPanel::addWidget( QWidget* theWidget, int theStretch )
{
QBoxLayout* aMainLayout = dynamic_cast<QBoxLayout*>( myMainFrame->layout() );
aMainLayout->addWidget( theWidget, theStretch );
}
-void HYDROGUI_InputPanel::addLayout( QLayout* theLayout )
+void HYDROGUI_InputPanel::addLayout( QLayout* theLayout, int theStretch )
{
QBoxLayout* aMainLayout = dynamic_cast<QBoxLayout*>( myMainFrame->layout() );
- aMainLayout->addLayout( theLayout );
+ aMainLayout->addLayout( theLayout, theStretch );
}
void HYDROGUI_InputPanel::addStretch()
virtual ~HYDROGUI_InputPanel();
void addWidget( QWidget* theWidget, int theStretch = 0 );
- void addLayout( QLayout* theLayout );
+ void insertWidget( QWidget* theWidget, int theIndex, int theStretch = 0 );
+ void addLayout( QLayout* theLayout, int theStretch = 0 );
void addStretch();
HYDROGUI_Module* module() const;
: HYDROGUI_ViewerDlg( theModule, theTitle ),
myName( NULL )
{
- QHBoxLayout* aNameLayout = new QHBoxLayout();
+ QFrame* name_frame = new QFrame( mainFrame() );
+ QHBoxLayout* name_layout = new QHBoxLayout( name_frame );
+ name_layout->setMargin( 0 );
QLabel* aNameLabel = new QLabel(tr("PROFILE_NAME_TLT"), this);
- aNameLayout->addWidget(aNameLabel);
+ name_layout->addWidget(aNameLabel);
myName = new QLineEdit(this);
- aNameLayout->addWidget(myName);
+ name_layout->addWidget(myName);
- addLayout(aNameLayout);
+ insertWidget( name_frame, 0, 0);
int anActionFlags =
CurveCreator_Widget::DisableNewSection | CurveCreator_Widget::DisableDetectionMode |
QStringList aCoordTitles;
aCoordTitles << tr( "U_TITLE" ) << tr( "Z_TITLE" );
myEditorWidget = new CurveCreator_Widget( this, NULL, anActionFlags, aCoordTitles );
- addWidget( myEditorWidget, 3 );
+ insertWidget( myEditorWidget, 1, 1 );
myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this );
- addWidget( myAddElementBox, 2 );
+ insertWidget( myAddElementBox, 2, 1 );
QBoxLayout* anAddElementLayout = new QVBoxLayout( myAddElementBox );
anAddElementLayout->setMargin( 0 );
HYDROGUI_ViewerDlg::HYDROGUI_ViewerDlg( HYDROGUI_Module* theModule, const QString& theTitle )
: HYDROGUI_InputPanel( theModule, theTitle )
{
- QWidget* viewMain = new QWidget( mainFrame() );
- QVBoxLayout* viewBase = new QVBoxLayout( viewMain );
- viewBase->setMargin( 0 );
-
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
myViewManager = new OCCViewer_ViewManager( theModule->getApp()->activeStudy(), 0 );
OCCViewer_Viewer* aViewer = new OCCViewer_Viewer( true );
anAISContext->Deactivate( aTrihedron );
}
*/
- viewBase->addWidget( aViewWin );
+ addWidget( aViewWin, 1 );
// Coordinates
connect( myViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
aViewFrame->getViewPort()->installEventFilter( this );
}
- myCoordLabel = new QLabel( viewMain );
- viewBase->addWidget( myCoordLabel );
+ myCoordLabel = new QLabel( mainFrame() );
+ addWidget( myCoordLabel, 0 );
}
HYDROGUI_ViewerDlg::~HYDROGUI_ViewerDlg()