mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 01:10:36 +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>
|
||||
<translation>To merge solids</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SELECT_ALL</source>
|
||||
<translation>Select All</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<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.
|
||||
Voulez-vous continuer?</translation>
|
||||
</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>
|
||||
<name>GEOMToolsGUI_DeleteDlg</name>
|
||||
|
@ -6674,6 +6674,22 @@
|
||||
<source>TIME_CONSUMING</source>
|
||||
<translation>このオプションを有効にすると、特定のオブジェクトを時間の無駄が可能性があります。続行しますか。</translation>
|
||||
</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>
|
||||
<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
|
||||
QGroupBox* anOperGr = new QGroupBox( tr( "GEOM_OPERATIONS" ), centralWidget() );
|
||||
|
||||
// "select all" button
|
||||
mySelectAll = new QCheckBox( tr( "SELECT_ALL" ), anOperGr );
|
||||
mySelectAll->setTristate( true );
|
||||
|
||||
// operations list widget
|
||||
myOpList = new QListWidget( anOperGr );
|
||||
myOpList->setSortingEnabled( false );
|
||||
@ -104,6 +108,7 @@ void RepairGUI_ShapeProcessDlg::init()
|
||||
|
||||
QVBoxLayout* aOperLay = new QVBoxLayout( anOperGr );
|
||||
aOperLay->setMargin( 9 );
|
||||
aOperLay->addWidget( mySelectAll );
|
||||
aOperLay->addWidget( myOpList );
|
||||
|
||||
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( itemChanged( QListWidgetItem* )), this, SLOT( operatorChecked( QListWidgetItem* )));
|
||||
connect( mySelectAll, SIGNAL( stateChanged( int ) ), this, SLOT( onSelectAll( int )));
|
||||
|
||||
adjustSize();
|
||||
loadDefaults(); // init dialog fields with values from resource file
|
||||
@ -357,6 +363,7 @@ void RepairGUI_ShapeProcessDlg::init()
|
||||
|
||||
initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ));
|
||||
selectionChanged();
|
||||
updateSelectAll();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -952,4 +959,32 @@ void RepairGUI_ShapeProcessDlg::operatorChecked( QListWidgetItem * 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
|
||||
void initParamsValues(); // initialize the data structures
|
||||
void initSelection();
|
||||
void updateSelectAll();
|
||||
|
||||
private:
|
||||
QStringList myOpLst; // list of available Shape Healing Operators
|
||||
@ -88,6 +89,7 @@ private:
|
||||
GEOM::ListOfGO_var myObjects; // selected objects
|
||||
|
||||
DlgRef_1Sel* mySelectWdgt;
|
||||
QCheckBox* mySelectAll;
|
||||
QListWidget* myOpList;
|
||||
QStackedLayout* myStack;
|
||||
|
||||
@ -141,6 +143,7 @@ private slots:
|
||||
void selectClicked();
|
||||
void advOptionToggled( bool );
|
||||
void operatorChecked( QListWidgetItem * item );
|
||||
void onSelectAll( int );
|
||||
};
|
||||
|
||||
#endif // REPAIRGUI_SHAPEPROCESSDLG_H
|
||||
|
Loading…
Reference in New Issue
Block a user