mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
0022752: [EDF] Provide explicit feedback on what has been done by Shape Processing operation
Additional changes: - Add "Select All" check box to quickly select/deselect all operators.
This commit is contained in:
parent
a170552f7b
commit
90ff9bfc3e
@ -6768,6 +6768,10 @@ Would you like to continue?</translation>
|
|||||||
<source>TO_MERGE_SOLIDS</source>
|
<source>TO_MERGE_SOLIDS</source>
|
||||||
<translation>To merge solids</translation>
|
<translation>To merge solids</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SELECT_ALL</source>
|
||||||
|
<translation>Select All</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GEOMToolsGUI_DeleteDlg</name>
|
<name>GEOMToolsGUI_DeleteDlg</name>
|
||||||
|
@ -6696,6 +6696,22 @@ Fermez cette boîte d'alerte et choisissez les arêtes à recoller.</transl
|
|||||||
<translation>L'activation de cette option peut résulter en une perte de temps sur certains objets.
|
<translation>L'activation de cette option peut résulter en une perte de temps sur certains objets.
|
||||||
Voulez-vous continuer?</translation>
|
Voulez-vous continuer?</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>WIDTH_FACTOR_TOL</source>
|
||||||
|
<translation type="unfinished">Width factor tol.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>VOLUME_TOL</source>
|
||||||
|
<translation type="unfinished">Volume tol.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TO_MERGE_SOLIDS</source>
|
||||||
|
<translation type="unfinished">To merge solids</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SELECT_ALL</source>
|
||||||
|
<translation>Tout sélectionner</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GEOMToolsGUI_DeleteDlg</name>
|
<name>GEOMToolsGUI_DeleteDlg</name>
|
||||||
|
@ -6674,6 +6674,22 @@
|
|||||||
<source>TIME_CONSUMING</source>
|
<source>TIME_CONSUMING</source>
|
||||||
<translation>このオプションを有効にすると、特定のオブジェクトを時間の無駄が可能性があります。続行しますか。</translation>
|
<translation>このオプションを有効にすると、特定のオブジェクトを時間の無駄が可能性があります。続行しますか。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>WIDTH_FACTOR_TOL</source>
|
||||||
|
<translation type="unfinished">Width factor tol.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>VOLUME_TOL</source>
|
||||||
|
<translation type="unfinished">Volume tol.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TO_MERGE_SOLIDS</source>
|
||||||
|
<translation type="unfinished">To merge solids</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SELECT_ALL</source>
|
||||||
|
<translation>全選択</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GEOMToolsGUI_DeleteDlg</name>
|
<name>GEOMToolsGUI_DeleteDlg</name>
|
||||||
|
@ -97,6 +97,10 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
// layout the two group boxes in the middle, add a list of operations
|
// layout the two group boxes in the middle, add a list of operations
|
||||||
QGroupBox* anOperGr = new QGroupBox( tr( "GEOM_OPERATIONS" ), centralWidget() );
|
QGroupBox* anOperGr = new QGroupBox( tr( "GEOM_OPERATIONS" ), centralWidget() );
|
||||||
|
|
||||||
|
// "select all" button
|
||||||
|
mySelectAll = new QCheckBox( tr( "SELECT_ALL" ), anOperGr );
|
||||||
|
mySelectAll->setTristate( true );
|
||||||
|
|
||||||
// operations list widget
|
// operations list widget
|
||||||
myOpList = new QListWidget( anOperGr );
|
myOpList = new QListWidget( anOperGr );
|
||||||
myOpList->setSortingEnabled( false );
|
myOpList->setSortingEnabled( false );
|
||||||
@ -104,6 +108,7 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
|
|
||||||
QVBoxLayout* aOperLay = new QVBoxLayout( anOperGr );
|
QVBoxLayout* aOperLay = new QVBoxLayout( anOperGr );
|
||||||
aOperLay->setMargin( 9 );
|
aOperLay->setMargin( 9 );
|
||||||
|
aOperLay->addWidget( mySelectAll );
|
||||||
aOperLay->addWidget( myOpList );
|
aOperLay->addWidget( myOpList );
|
||||||
|
|
||||||
QGroupBox* aParamsGr = new QGroupBox( tr( "GEOM_PARAMETERS" ), centralWidget() );
|
QGroupBox* aParamsGr = new QGroupBox( tr( "GEOM_PARAMETERS" ), centralWidget() );
|
||||||
@ -347,6 +352,7 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
|
|
||||||
connect( myOpList, SIGNAL( currentRowChanged( int )), myStack, SLOT( setCurrentIndex( int )));
|
connect( myOpList, SIGNAL( currentRowChanged( int )), myStack, SLOT( setCurrentIndex( int )));
|
||||||
connect( myOpList, SIGNAL( itemChanged( QListWidgetItem* )), this, SLOT( operatorChecked( QListWidgetItem* )));
|
connect( myOpList, SIGNAL( itemChanged( QListWidgetItem* )), this, SLOT( operatorChecked( QListWidgetItem* )));
|
||||||
|
connect( mySelectAll, SIGNAL( stateChanged( int ) ), this, SLOT( onSelectAll( int )));
|
||||||
|
|
||||||
adjustSize();
|
adjustSize();
|
||||||
loadDefaults(); // init dialog fields with values from resource file
|
loadDefaults(); // init dialog fields with values from resource file
|
||||||
@ -357,6 +363,7 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
|
|
||||||
initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ));
|
initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ));
|
||||||
selectionChanged();
|
selectionChanged();
|
||||||
|
updateSelectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -952,4 +959,32 @@ void RepairGUI_ShapeProcessDlg::operatorChecked( QListWidgetItem * item )
|
|||||||
{
|
{
|
||||||
myStack->setCurrentIndex( myOpList->row( item ));
|
myStack->setCurrentIndex( myOpList->row( item ));
|
||||||
}
|
}
|
||||||
|
updateSelectAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RepairGUI_ShapeProcessDlg::updateSelectAll()
|
||||||
|
{
|
||||||
|
Qt::CheckState state = myOpList->count() > 0 ? myOpList->item(0)->checkState() : Qt::Unchecked;
|
||||||
|
for ( int i = 1; i < myOpList->count(); i++ ) {
|
||||||
|
if ( myOpList->item(i)->checkState() != state ) {
|
||||||
|
state = Qt::PartiallyChecked;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mySelectAll->blockSignals( true );
|
||||||
|
mySelectAll->setCheckState( state );
|
||||||
|
mySelectAll->blockSignals( false );
|
||||||
|
}
|
||||||
|
|
||||||
|
void RepairGUI_ShapeProcessDlg::onSelectAll( int state )
|
||||||
|
{
|
||||||
|
if ( state == Qt::PartiallyChecked ) {
|
||||||
|
mySelectAll->setCheckState( Qt::Checked );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myOpList->blockSignals( true );
|
||||||
|
for ( int i = 0; i < myOpList->count(); i++ ) {
|
||||||
|
myOpList->item(i)->setCheckState( (Qt::CheckState)state );
|
||||||
|
}
|
||||||
|
myOpList->blockSignals( false );
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ private:
|
|||||||
//QDict<QString,QWidget*> myCtrlMap; // map of controls (values) of parameters
|
//QDict<QString,QWidget*> myCtrlMap; // map of controls (values) of parameters
|
||||||
void initParamsValues(); // initialize the data structures
|
void initParamsValues(); // initialize the data structures
|
||||||
void initSelection();
|
void initSelection();
|
||||||
|
void updateSelectAll();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringList myOpLst; // list of available Shape Healing Operators
|
QStringList myOpLst; // list of available Shape Healing Operators
|
||||||
@ -88,6 +89,7 @@ private:
|
|||||||
GEOM::ListOfGO_var myObjects; // selected objects
|
GEOM::ListOfGO_var myObjects; // selected objects
|
||||||
|
|
||||||
DlgRef_1Sel* mySelectWdgt;
|
DlgRef_1Sel* mySelectWdgt;
|
||||||
|
QCheckBox* mySelectAll;
|
||||||
QListWidget* myOpList;
|
QListWidget* myOpList;
|
||||||
QStackedLayout* myStack;
|
QStackedLayout* myStack;
|
||||||
|
|
||||||
@ -141,6 +143,7 @@ private slots:
|
|||||||
void selectClicked();
|
void selectClicked();
|
||||||
void advOptionToggled( bool );
|
void advOptionToggled( bool );
|
||||||
void operatorChecked( QListWidgetItem * item );
|
void operatorChecked( QListWidgetItem * item );
|
||||||
|
void onSelectAll( int );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // REPAIRGUI_SHAPEPROCESSDLG_H
|
#endif // REPAIRGUI_SHAPEPROCESSDLG_H
|
||||||
|
Loading…
Reference in New Issue
Block a user