myNewSectionEditor->setEditMode(false);
QString aSectName = QString( CurveCreator_UtilsICurve::getUniqSectionName( myCurve ).c_str() );
myNewSectionEditor->setSectionParameters(aSectName, true, CurveCreator::Polyline );
- emit subOperationStarted( myNewSectionEditor );
+ emit subOperationStarted( myNewSectionEditor, false );
}
void CurveCreator_Widget::onAddNewSection()
myNewSectionEditor->setEditMode(true);
myNewSectionEditor->setSectionParameters( aSectName, isClosed, aType );
- emit subOperationStarted( myNewSectionEditor );
+ emit subOperationStarted( myNewSectionEditor, true );
}
void CurveCreator_Widget::onModifySection()
signals:
void selectionChanged();
- void subOperationStarted( QWidget* );
+ void subOperationStarted( QWidget*, bool );
void subOperationFinished( QWidget* );
public slots:
anAddElementLayout->setSpacing( 5 );
connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
- connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) );
+ connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*, bool) ), this, SLOT( processStartedSubOperation(QWidget*, bool) ) );
connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
myAddElementBox->hide();
myEditorWidget->setOCCViewer( theViewer );
}
-void HYDROGUI_PolylineDlg::processStartedSubOperation( QWidget* theWidget )
+void HYDROGUI_PolylineDlg::processStartedSubOperation( QWidget* theWidget, bool theIsEdit )
{
myEditorWidget->setEnabled( false );
+ myAddElementBox->setTitle( theIsEdit ? tr( "EDIT_ELEMENT" ) : tr( "ADD_ELEMENT" ) );
QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
anAddElementLayout->addWidget( theWidget );
bool deleteEnabled();
protected slots:
- void processStartedSubOperation( QWidget* );
+ void processStartedSubOperation( QWidget*, bool );
void processFinishedSubOperation( QWidget* );
signals:
myEditorWidget->setOCCViewer( aViewer );
connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
- connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) );
+ connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*, bool) ), this, SLOT( processStartedSubOperation(QWidget*, bool) ) );
connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
myAddElementBox->hide();
return myEditorWidget->removeEnabled();
}
-void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget )
+void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget, bool theIsEdit )
{
myEditorWidget->setEnabled( false );
+ myAddElementBox->setTitle( theIsEdit ? tr( "EDIT_ELEMENT" ) : tr( "ADD_ELEMENT" ) );
QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
anAddElementLayout->addWidget( theWidget );
virtual bool eventFilter( QObject*, QEvent* );
protected slots:
- void processStartedSubOperation( QWidget* );
+ void processStartedSubOperation( QWidget*, bool );
void processFinishedSubOperation( QWidget* );
void onMouseMove( SUIT_ViewWindow*, QMouseEvent* );
<source>ADD_ELEMENT</source>
<translation>Add element</translation>
</message>
+ <message>
+ <source>EDIT_ELEMENT</source>
+ <translation>Edit element</translation>
+ </message>
<message>
<source>POLYLINE_NAME_TLT</source>
<translation>Name</translation>
<source>ADD_ELEMENT</source>
<translation>Add element</translation>
</message>
+ <message>
+ <source>EDIT_ELEMENT</source>
+ <translation>Edit element</translation>
+ </message>
<message>
<source>PROFILE_NAME_TLT</source>
<translation>Name</translation>