<parameter name="auto_create_base_objects" value="false" />
<parameter name="base_vectors_length" value="1" />
<parameter name="marker_scale" value="1" />
+ <parameter name="geom_preview" value="false" />
<!-- Input field precisions -->
<parameter name="def_precision" value="3" />
<parameter name="length_precision" value="6" />
CssAcceptable = "QDoubleSpinBox, QPushButton {background-color: rgb(85, 170, 127)}";
CssRefused = "QDoubleSpinBox, QPushButton {background-color: rgb(255, 0, 0)}";
+ showOnlyPreviewControl();
+
// Signal/slot connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
initName(tr("GEOM_PIPE_TSHAPE"));
updateTshapeScreenshotLabel();
- DisplayPreview();
+ processPreview();
}
//=================================================================================
MainTubeGroupParams->SpinBox_DZ->setToolTip("");
MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
}
}
}
IncidentTubeGroupParams->SpinBox_DZ->setToolTip("");
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
}
}
}
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
JunctionPointsSel->LineEdit4->setText("");
JunctionPointsSel->LineEdit5->setText("");
- DisplayPreview();
+ processPreview();
}
}
{
if (JunctionPointsSel->GroupBox1->isChecked() && myOkPoint1 && myOkPoint2 && myOkPoint3)
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
}
//=================================================================================
if (myOkPoint1 && myOkPoint2 && myOkPoint3) {
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
}
// GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First());
// currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
}
//=================================================================================
updateTshapeScreenshotLabel();
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
} else if (send == FilletGroupParams->GroupBox1) {
if (send->isChecked()) {
disconnect(ChamferGroupParams->GroupBox1, SIGNAL(toggled(bool)), this, 0);
updateTshapeScreenshotLabel();
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
- DisplayPreview();
+ processPreview();
}
}
}
}
+
+//=================================================================================
+// function : processPreview()
+// purpose : Display preview if CheckBoxPreview is checked
+//=================================================================================
+void AdvancedGUI_PipeTShapeDlg::processPreview() {
+ if(mainFrame()->CheckBoxPreview->isChecked())
+ DisplayPreview();
+ else
+ erasePreview(true);
+}
void DisplayPreview(const bool activate = false, const bool update = true,
const bool toRemoveFromEngine = true, const double lineWidth = -1,
const int displayMode = -1, const int color = -1);
+ virtual void processPreview();
void SetPosition(bool);
void ChamferOrFillet(bool);
void SetDoubleSpinBoxStep(double);
}
}
- displayPreview();
+ displayPreview(true);
}
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void BasicGUI_ArcDlg::ReverseSense()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
}
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
void BasicGUI_CircleDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+ showOnlyPreviewControl();
+
/* signals and slots connections */
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog( ) ) );
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
initName( tr( "GEOM_CURVE" ) );
resize(100,100);
- ConstructorsClicked( 0 );
+ ConstructorsClicked( 0 );
}
//=================================================================================
//=================================================================================
void BasicGUI_CurveDlg::CheckButtonToggled()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
GroupPoints->LineEdit1->setText( QString::number( myPoints.count() ) + "_" + tr( "GEOM_POINT" ) + tr( "_S_" ) );
else
GroupPoints->LineEdit1->setText( "" );
- displayPreview();
+ processPreview();
}
resize( minimumSizeHint() );
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
- displayPreview();
+ displayPreview(true);
return true;
}
}
}
- displayPreview();
+ displayPreview(true);
}
myEditCurrentArgument->setFocus();
//SelectionIntoArgument();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
void BasicGUI_EllipseDlg::ValueChangedInSpinBox( double newValue )
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2.nullify();
else if (myEditCurrentArgument == GroupFaces->LineEdit1) myFace1.nullify();
else if (myEditCurrentArgument == GroupFaces->LineEdit2) myFace2.nullify();
- displayPreview();
+ displayPreview(true);
return;
}
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
qApp->processEvents();
updateGeometry();
myData[ DY2 ]->setValue( aYDir.Y() );
myData[ DZ2 ]->setValue( aYDir.Z() );
}
- displayPreview();
+ displayPreview(true);
return;
}
aSelectedObject = getSelected( TopAbs_VERTEX );
myData[ X ]->setValue( aPnt.X() );
myData[ Y ]->setValue( aPnt.Y() );
myData[ Z ]->setValue( aPnt.Z() );
- displayPreview();
+ displayPreview(true);
return;
}
}
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void BasicGUI_MarkerDlg::onValueChanged( double )
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myEditCurrentArgument->setFocus();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview();
+ displayPreview(true);
}
myOriginType = 2;
else if ( send == GroupLCS->RadioButton3 )
myOriginType = 3;
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
else if ( myEditCurrentArgument == Group2Vec->LineEdit1 ) myVec1.nullify();
else if ( myEditCurrentArgument == Group2Vec->LineEdit2 ) myVec2.nullify();
else if ( myEditCurrentArgument == GroupLCS->LineEdit1 ) myLCS.nullify();
- displayPreview();
+ displayPreview(true);
return;
}
myLCS = aSelectedObject;
}
- displayPreview();
+ displayPreview(true);
}
// SelectionIntoArgument();
myEditCurrentArgument->setFocus();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
void BasicGUI_PlaneDlg::ValueChangedInSpinBox( double newValue )
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
myBusy = false;
}
-
- displayPreview();
+
+ displayPreview(true);
}
//=================================================================================
void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void BasicGUI_PointDlg::CheckBoxClicked( int State )
{
- displayPreview();
+ displayPreview(true);
}
GroupXYZ->SpinBox_DY->setValue( thePnt.Y() );
GroupXYZ->SpinBox_DZ->setValue( thePnt.Z() );
- displayPreview();
+ displayPreview(true);
}
}
void BasicGUI_PointDlg::ClickParamCoord( int id )
{
updateParamCoord( true );
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
resize( minimumSizeHint() );
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
void BasicGUI_VectorDlg::ValueChangedInSpinBox( double newValue )
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
GroupDimensions->SpinBox_DY->setValue( dy );
GroupDimensions->SpinBox_DZ->setValue( dz );
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
myEditCurrentArgument->setText( "" );
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE); //Select Faces on All Shapes
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myEditCurrentArgument->setText( "" );
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
activateSelection();
// ??
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
initSpinBox(anIter.value(), 1, 999, SpecificStep);
}
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
}
myEditCurrentArgument->setText(aName);
myFaces[aCurrFocus] = anIndex;
- displayPreview();
+ processPreview();
}
switch (aCurrFocus) {
activateSelection();
// ??
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void BlocksGUI_TrsfDlg::ValueChangedInSpinBox(int)
{
- displayPreview();
+ processPreview();
}
//=================================================================================
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview();
+ processPreview();
}
//=================================================================================
myShapes.clear();
mainFrame()->GroupBoxPublish->show();
+ mainFrame()->CheckBoxPreview->hide();
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
if (myEditCurrentArgument == GroupPoints->LineEdit1) myPoint1.nullify();
else if (myEditCurrentArgument == GroupPoints->LineEdit2) myPoint2.nullify();
else if (myEditCurrentArgument == GroupWire->LineEdit1) myWire.nullify();
- displayPreview();
+ displayPreview(true);
return;
}
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myEditCurrentArgument->setEnabled(true);
myEditCurrentArgument->setFocus();
send->setDown(true);
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="CheckBoxPreview" >
+ <property name="text" >
+ <string/>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
<tabstops>
<tabstop>CheckBoxRestoreSS</tabstop>
<tabstop>CheckBoxAddPrefix</tabstop>
+ <tabstop>CheckBoxPreview</tabstop>
<tabstop>buttonOk</tabstop>
<tabstop>buttonApply</tabstop>
<tabstop>buttonCancel</tabstop>
// Function : displayPreview
// Purpose : Method for displaying preview based on execute() results
//================================================================
-void GEOMBase_Helper::displayPreview( const bool activate,
+void GEOMBase_Helper::displayPreview( const bool display,
+ const bool activate,
const bool update,
const bool toRemoveFromEngine,
const double lineWidth,
const int displayMode,
const int color )
{
+ if(!display) {
+ erasePreview( update );
+ return;
+ }
+
isPreview = true;
QString msg;
if ( !isValid( msg ) )
void redisplay ( const ObjectList&, const bool = true, const bool = true );
void redisplay ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true );
- virtual void displayPreview ( const bool activate = false,
+ virtual void displayPreview ( const bool display,
+ const bool activate = false,
const bool update = true,
const bool toRemoveFromEngine = true,
const double lineWidth = -1,
myMainFrame->GroupBoxPublish->setTitle( tr( "GEOM_PUBLISH_RESULT_GRP" ) );
myMainFrame->CheckBoxRestoreSS->setText( tr( "GEOM_RESTORE_SUB_SHAPES" ) );
myMainFrame->CheckBoxAddPrefix->setText( tr( "GEOM_RSS_ADD_FREFIX" ) );
+ myMainFrame->CheckBoxPreview->setText( tr("GEOM_PREVIEW") );
buttonCancel()->setText( tr( "GEOM_BUT_CLOSE" ) );
buttonOk()->setText( tr( "GEOM_BUT_APPLY_AND_CLOSE" ) );
// connect help button on a private slot that displays help information
connect( buttonHelp(), SIGNAL( clicked() ), this, SLOT( ClickOnHelp() ) );
+ connect( myMainFrame->CheckBoxPreview, SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
+
/* displays Dialog */
myMainFrame->RadioButton1->setChecked( true );
myMainFrame->RadioButton4->hide();
myMainFrame->CheckBoxRestoreSS->setChecked( false );
myMainFrame->CheckBoxAddPrefix->setChecked( true );
+
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ bool aPrv = (resMgr == 0) ? false : resMgr->booleanValue( "Geometry", "geom_preview", false );
+
+ myMainFrame->CheckBoxPreview->setChecked( aPrv );
myMainFrame->GroupBoxPublish->hide();
}
ClickOnHelp();
}
}
+
+//=================================================================================
+// function : showOnlyPreviewControl()
+// purpose : display only CheckBoxPreview check box,
+// hide CheckBoxRestoreSS and CheckBoxAddPrefix
+//=================================================================================
+void GEOMBase_Skeleton::showOnlyPreviewControl(){
+ mainFrame()->GroupBoxPublish->show();
+ mainFrame()->CheckBoxRestoreSS->hide();
+ mainFrame()->CheckBoxAddPrefix->hide();
+}
+
+//=================================================================================
+// function : processPreview()
+// purpose : Display preview if CheckBoxPreview is checked
+//=================================================================================
+void GEOMBase_Skeleton::processPreview() {
+ displayPreview(mainFrame()->CheckBoxPreview->isChecked());
+}
*/
void unsetConstructorId();
+ void showOnlyPreviewControl();
+
void setHelpFileName( const QString& );
DlgRef_Skeleton* mainFrame();
protected slots:
virtual void ClickOnCancel();
+ virtual void processPreview();
void LineEditReturnPressed();
void DeactivateActiveDialog();
void ActivateThisDialog();
<source>PREF_GROUP_ORIGIN_AND_BASE_VECTORS</source>
<translation>Origin and base vectors</translation>
</message>
+ <message>
+ <source>PREF_GROUP_OPERATIONS</source>
+ <translation>Operations</translation>
+ </message>
<message>
<source>PREF_GROUP_GENERAL</source>
<translation>General</translation>
<source>GEOM_RSS_ADD_FREFIX</source>
<translation>Add prefix to names of restored subshapes</translation>
</message>
+ <message>
+ <source>GEOM_PREVIEW</source>
+ <translation>Preview</translation>
+ </message>
<message>
<source>GEOM_ALL_IMPORT_FILES</source>
<translation>All supported formats ( %1 )</translation>
if ( !res )
return false;
-
setMenuShown( true );
setToolShown( true );
addPreference( tr( "PREF_AUTO_CREATE" ), originGroup,
LightApp_Preferences::Bool, "Geometry", "auto_create_base_objects" );
+
+ int operationsGroup = addPreference( tr( "PREF_GROUP_OPERATIONS" ), tabId );
+ setPreferenceProperty( operationsGroup, "columns", 2 );
+
+ addPreference( tr( "GEOM_PREVIEW" ), operationsGroup,
+ LightApp_Preferences::Bool, "Geometry", "geom_preview" );
+
}
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )
GroupPoints->ComboBox1->addItem(tr("GEOM_FILLING_USEORI"));
GroupPoints->ComboBox1->addItem(tr("GEOM_FILLING_AUTO"));
+ showOnlyPreviewControl();
+
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
globalSelection( GEOM_COMPOUND );
- displayPreview();
+ processPreview();
}
//=================================================================================
void GenerationGUI_FillingDlg::ValueChangedInSpinBox( double newValue )
{
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void GenerationGUI_FillingDlg::MethodChanged()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void GenerationGUI_FillingDlg::ApproxChanged()
{
- displayPreview();
+ processPreview();
}
GroupPoints->CheckButton1->setEnabled(false);
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
resize(100,100);
SelectionIntoArgument();
- displayPreview();
+ processPreview();
}
//=================================================================================
myEditCurrentArgument->setText("");
myPath.nullify();
}
- displayPreview();
+ processPreview();
}
//=================================================================================
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
myPoint2.nullify();
myVec.nullify();
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ processPreview();
}
//=================================================================================
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void GenerationGUI_PrismDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
GroupDXDYDZ->SpinBox_SC->setEnabled(!GroupDXDYDZ->CheckBox1->isChecked() &&
GroupDXDYDZ->CheckBox2->isChecked()); // scale factor
- displayPreview();
+ processPreview();
}
//=================================================================================
GroupDXDYDZ->TextLabel5->setEnabled(GroupDXDYDZ->CheckBox2->isChecked());
GroupDXDYDZ->SpinBox_SC->setEnabled(GroupDXDYDZ->CheckBox2->isChecked());
- displayPreview();
+ processPreview();
}
//=================================================================================
myBaseObjects.clear();
myAxis.nullify();
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
GroupPoints->PushButton1->click();
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void GenerationGUI_RevolDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
void GenerationGUI_RevolDlg::onBothway()
{
GroupPoints->CheckButton2->setEnabled(!GroupPoints->CheckButton1->isChecked());
- displayPreview();
+ processPreview();
}
//=================================================================================
myObj = aSelectedObject;
processObject();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
globalSelection();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myGrp->LineEdit3->setText( DlgRef::PrintDoubleValue( y, aPrecision ) );
myGrp->LineEdit4->setText( DlgRef::PrintDoubleValue( z, aPrecision ) );
- displayPreview();
+ displayPreview(true);
}
}
myObj = aSelectedObject;
myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) );
processObject();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
activateSelection();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
GroupArgs->PushButton1->click();
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, "density_precision" );
initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, "parametric_precision" );
+ showOnlyPreviewControl();
+
GroupPoints->SpinBox_DX->setValue( 100.0 );
GroupPoints->SpinBox_DY->setValue( 1.0 );
GroupPoints->SpinBox_DZ->setValue( 0.01 );
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
+
+
+ connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double)));
initName( tr( "GEOM_ARCHIMEDE" ) );
myShape = GEOM::GEOM_Object::_nil();
return;
}
-
myEditCurrentArgument->setText(GEOMBase::GetName(myShape));
+ processPreview();
}
//=================================================================================
globalSelection( GEOM_ALLSHAPES );
connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ processPreview();
}
return true;
}
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void OperationGUI_ArchimedeDlg::ValueChangedInSpinBox(double newValue)
+{
+ processPreview();
+}
void LineEditReturnPressed();
void SelectionIntoArgument();
void SetDoubleSpinBoxStep( double );
+ void ValueChangedInSpinBox( double );
};
#endif // OPERATIONGUI_ARCHIMEDEDLG_H
myFace[ Face1 ] = -1;
myFace[ Face2 ] = -1;
+ showOnlyPreviewControl();
+
// signals and slots connections
// main buttons
myEditCurrentArgument->setText("");
}
- displayPreview();
+ processPreview();
}
qApp->processEvents();
if ( !anObj->_is_nil() ) {
myShape = anObj;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
- displayPreview();
+ processPreview();
}
}
QString aFaceName = QString(GEOMBase::GetName(anObj)) + ":%1";
myEditCurrentArgument->setText(aFaceName.arg(anIndex));
myFace[ aCurrFocus ] = anIndex;
- displayPreview();
+ processPreview();
}
}
}
else if (aConstructorId == 3)
myEdges = anIndexes;
- displayPreview();
+ processPreview();
}
}
}
activateSelection();
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void OperationGUI_ChamferDlg::ValueChangedInSpinBox (double)
{
- displayPreview();
+ processPreview();
}
//=================================================================================
myRadioButton[ RadioButton41 ]->blockSignals(false);
myRadioButton[ RadioButton42 ]->blockSignals(false);
- displayPreview();
+ processPreview();
}
myVertexes.Clear();
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk() ));
myShape = anObj;
myEditCurrentArgument->setText(aName
);
- displayPreview();
+ processPreview();
}
}
} else if (myEditCurrentArgument == GroupVertexes->LineEdit2) {
}
}
if ( isPreview )
- displayPreview();
+ processPreview();
}
if (myEditCurrentArgument == GroupVertexes->LineEdit1) {
activateSelection();
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void OperationGUI_Fillet1d2dDlg::ValueChangedInSpinBox (double)
{
- displayPreview();
+ processPreview();
}
//=================================================================================
myFaces.Clear();
myEdges.Clear();
+ showOnlyPreviewControl();
+
// signals and slots connections
// main buttons
else
myEditCurrentArgument->setText("");
- displayPreview();
+ processPreview();
}
qApp->processEvents();
if ( !anObj->_is_nil() ) {
myShape = anObj;
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
- displayPreview();
+ processPreview();
}
}
else
myFaces = anIndexes;
- displayPreview();
+ processPreview();
}
}
}
activateSelection();
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void OperationGUI_FilletDlg::ValueChangedInSpinBox (double)
{
- displayPreview();
+ processPreview();
}
//=================================================================================
Group3->RadioButton1->blockSignals(false);
Group3->RadioButton2->blockSignals(false);
- displayPreview();
+ processPreview();
}
GroupPoints->LineEdit2->clear();
myObject1 = myObject2 = GEOM::GEOM_Object::_nil();
+ showOnlyPreviewControl();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
}
}
}
+ processPreview();
}
//=================================================================================
globalSelection(GEOM_ALLSHAPES);
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
+ processPreview();
}
//=================================================================================
{
// VRS ???? What is it for ??? commented for a while...
//bool IsEnabled = GroupPoints->ComboBox1->currentIndex() < 3;
+ processPreview();
}
GroupPoints->ComboBox1->setCurrentIndex(0);
+ showOnlyPreviewControl();
+
/* signals and slots connections */
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
return;
myEditCurrentArgument->setText(aString);
+ processPreview();
}
//=================================================================================
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
ConstructorsClicked(getConstructorId());
+ processPreview();
}
//=================================================================================
{
//initName(getNewObjectName());
initName(getPrefixByType());
+ processPreview();
}
//=================================================================================
connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+
+ connect( GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
+ connect( GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(processPreview()) );
initName( tr( "GEOM_PARTITION" ) );
}
}
}
-
+
myEditCurrentArgument->setText( aString );
+ processPreview();
}
myEditCurrentArgument->setFocus();
SelectionIntoArgument();
send->setDown(true);
+ processPreview();
}
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
+ processPreview();
}
//GroupPoints->TextLabel5->setEnabled(IsEnabled);
//GroupPoints->PushButton3->setEnabled(IsEnabled);
//GroupPoints->PushButton4->setEnabled(IsEnabled);
+ processPreview();
}
//=================================================================================
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
globalSelection(); // close local contexts, if any
- displayPreview();
+ displayPreview(true);
break;
}
}
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
this, SLOT(SelectionIntoArgument()));
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
globalSelection(); // close local contexts, if any
- displayPreview();
+ displayPreview(true);
break;
}
}
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myOrientationType = 2;
else if (GroupOrientation->RadioButton3->isChecked())
myOrientationType = 3;
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_DiskDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_FaceDlg::ValueChangedInSpinBox( double newValue )
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
myOrientationType = 2;
else if ( GroupOrientation->RadioButton3->isChecked() )
myOrientationType = 3;
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
updateGeometry();
resize( minimumSizeHint() );
SelectionIntoArgument();
- //displayPreview();
+ //displayPreview(true);
}
//=================================================================================
void PrimitiveGUI_FaceDlg::SelectionIntoArgument()
{
if (getConstructorId() == 0) {
- displayPreview();
+ displayPreview(true);
return;
}
myFace = aSelectedObject;
}
- displayPreview();
+ displayPreview(true);
}
resize( minimumSizeHint() );
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
myPoint = aSelectedObject;
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
resize(minimumSizeHint());
SelectionIntoArgument();
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
}
}
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//=================================================================================
void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ displayPreview(true);
}
//=================================================================================
//globalSelection( GEOM_COMPOUND );
mainFrame()->GroupBoxPublish->show();
+ //Hide preview checkbox
+ mainFrame()->CheckBoxPreview->hide();
/* signals and slots connections */
connect( buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
updateGeometry();
resize( minimumSizeHint() );
- displayPreview();
+ processPreview();
updateButtonState();
activateSelection();
SelectionIntoArgument();
//globalSelection(GEOM_COMPOUND);
mainFrame()->GroupBoxPublish->show();
+ //Hide preview checkbox
+ mainFrame()->CheckBoxPreview->hide();
/* signals and slots connections */
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
activateSelection();
mainFrame()->GroupBoxPublish->show();
+ //Hide preview checkbox
+ mainFrame()->CheckBoxPreview->hide();
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
myFacesInd->length(0);
mainFrame()->GroupBoxPublish->show();
+ //Hide preview checkbox
+ mainFrame()->CheckBoxPreview->hide();
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
myEditCurrentArgument->setText("");
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
else if (send == GroupDimensions->SpinBox_DX2)
myStep = newValue;
- displayPreview();
+ processPreview();
}
//=================================================================================
else if (send == GroupDimensions->SpinBox_DY2)
myNbTimes2 = newValue;
- displayPreview();
+ processPreview();
}
//=================================================================================
if (aConstructorId == 1)
GroupDimensions->SpinBox_DX1->setValue(myAng);
- displayPreview();
+ processPreview();
}
//=================================================================================
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
myEditCurrentArgument->setText("");
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
break;
}
- displayPreview();
+ processPreview();
}
//=================================================================================
break;
}
- displayPreview();
+ processPreview();
}
//=================================================================================
else if (aConstructorId == 1)
GroupDimensions->SpinBox_DX1->setValue(myStepU);
- displayPreview();
+ processPreview();
}
//=================================================================================
GroupDimensions->SpinBox_DX2->setValue(myStepV);
- displayPreview();
+ processPreview();
}
//=================================================================================
myEditCurrentArgument->setText("");
}
- displayPreview();
+ processPreview();
}
//=================================================================================
void TransformationGUI_OffsetDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
//=================================================================================
void TransformationGUI_PositionDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void TransformationGUI_RotationDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void TransformationGUI_ScaleDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
SelectionIntoArgument();
}
else {
- displayPreview();
+ processPreview();
}
}
}
}
- displayPreview();
+ processPreview();
}
//=================================================================================
send->setDown(true);
// seems we need it only to avoid preview disappearing, caused by selection mode change
- displayPreview();
+ processPreview();
}
//=================================================================================
//=================================================================================
void TransformationGUI_TranslationDlg::ValueChangedInSpinBox()
{
- displayPreview();
+ processPreview();
}
//=================================================================================
void TransformationGUI_TranslationDlg::ActivateDistanceChanged()
{
GroupPoints->SpinBox3->setEnabled( GroupPoints->CheckBox1->isChecked() );
- displayPreview();
+ processPreview();
}
//=================================================================================