bool CurveCreator_Profile::setSectionTypeInternal( const int theISection,
const CurveCreator::SectionType theType )
{
- return false;
+ return CurveCreator_Curve::setSectionTypeInternal( theISection, theType );
}
bool CurveCreator_Profile::setSectionType( const int theISection,
const CurveCreator::SectionType theType )
{
- return false;
+ return CurveCreator_Curve::setSectionType( theISection, theType );
}
bool CurveCreator_Profile::addPointsInternal( const CurveCreator::SectionsMap &theSectionsMap )
myEditorWidget = new CurveCreator_Widget( this, NULL );
addWidget( myEditorWidget, 3 );
+ myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this );
+ addWidget( myAddElementBox, 2 );
+
+ QBoxLayout* anAddElementLayout = new QVBoxLayout( myAddElementBox );
+ anAddElementLayout->setMargin( 0 );
+ anAddElementLayout->setSpacing( 5 );
+
+
OCCViewer_ViewManager* aViewMgr = new OCCViewer_ViewManager( theModule->getApp()->activeStudy(), 0 );
myViewer = new OCCViewer_Viewer( true );
connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) );
connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
+
+ myAddElementBox->hide();
}
HYDROGUI_ProfileDlg::~HYDROGUI_ProfileDlg()
{
return myEditorWidget->removeEnabled();
}
+
+void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget )
+{
+ myEditorWidget->setEnabled( false );
+
+ QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
+ anAddElementLayout->addWidget( theWidget );
+
+ theWidget->show();
+ myAddElementBox->show();
+}
+
+void HYDROGUI_ProfileDlg::processFinishedSubOperation( QWidget* theWidget )
+{
+ myEditorWidget->setEnabled( true );
+
+ QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
+ anAddElementLayout->removeWidget( theWidget );
+
+ theWidget->hide();
+ myAddElementBox->hide();
+}
class CurveCreator_Widget;
class CurveCreator_ICurve;
class OCCViewer_Viewer;
+class QGroupBox;
class HYDROGUI_ProfileDlg : public HYDROGUI_InputPanel
{
void deleteSelected();
bool deleteEnabled();
+protected slots:
+ void processStartedSubOperation( QWidget* );
+ void processFinishedSubOperation( QWidget* );
+
signals:
void createPreview( QString );
void selectionChanged();
private:
QLineEdit* myName;
CurveCreator_Widget* myEditorWidget;
+ QGroupBox* myAddElementBox;
OCCViewer_Viewer* myViewer;
};