From a46f24d18dca062f3e5f2d984765bd5e725a1174 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 18 Aug 2009 07:28:56 +0000 Subject: [PATCH] Issue 20189: EDF 972 VISU : Shrink coef --- doc/salome/gui/VISU/images/line_width.png | Bin 0 -> 6837 bytes doc/salome/gui/VISU/images/shrink_factor.png | Bin 0 -> 7707 bytes .../VISU/input/viewing_3d_presentations.doc | 13 +- resources/SalomeApp.xml | 1 + src/VISUGUI/Makefile.am | 3 + src/VISUGUI/VISU_msg_en.ts | 19 ++ src/VISUGUI/VisuGUI.cxx | 33 ++- src/VISUGUI/VisuGUI.h | 1 + src/VISUGUI/VisuGUI_ActionsDef.h | 1 + src/VISUGUI/VisuGUI_ShrinkFactorDlg.cxx | 255 ++++++++++++++++++ src/VISUGUI/VisuGUI_ShrinkFactorDlg.h | 76 ++++++ src/VISU_I/VISU_Prs3d_i.cc | 5 +- 12 files changed, 399 insertions(+), 8 deletions(-) create mode 100644 doc/salome/gui/VISU/images/line_width.png create mode 100644 doc/salome/gui/VISU/images/shrink_factor.png create mode 100644 src/VISUGUI/VisuGUI_ShrinkFactorDlg.cxx create mode 100644 src/VISUGUI/VisuGUI_ShrinkFactorDlg.h diff --git a/doc/salome/gui/VISU/images/line_width.png b/doc/salome/gui/VISU/images/line_width.png new file mode 100644 index 0000000000000000000000000000000000000000..15e40a7d0a9f5c191d6dc767a4b1a8491ed32f7e GIT binary patch literal 6837 zcmbtZWmJ@3w;!4z92z7AhLT1)25FEMB!xjjx&&d69EqV3q(PC!p+OkB8|f}76{JI& zfjjU0-}QdFAMU&Em*0BUKIc5=?EUQh+j~DJN>4|Pl!%@P0059`s4G7Q0I-BG&*Oyn z7z`PZ>jePl12mKs3}M;(D}FFW`#^%DLzyQswTOxozTGP7!BpG9q+j!W^VKPm;16rd z)n1~x9ZGQ7Lfu?oFKC^UOp!+vh-=2}s5n_9MQ=R`0BR6|JJt3m`fFTFYxrJi)_|cW zU!CjJ?#I_>oX#glnQL#*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m-;AjjBcp517nC_V3P< zrRVBk5hwC?Kldj)J3HeoD8I$?2o6$*A4{_3(2w^ZBhHkE)TAvgJUJnnBHiTy;qhL+N|73I7*21hTP{iuknFMOPT z^H8JZ_TsAlv5?z4d4f_IkDU8ExjVFl_T$AMGx8`Og~vgqrR%AA-op*D=7@NUi?} zatj)4`|2??P*YzdKKnQ_Qt>g5KxdJ5)={`NG`(J~2zPdF6){^sn=Y-YOf_VCGKsl< zATQ**|4A)*jg6_0xmEBu1zW|0Fr4yC>fNBGJN+Q8sxlA9yIJrI%Fr}pdA0yy> zd9p!IM_yQHchRj&m35RRF~s9h;? zeUi_Co(u=UM~?BBa=e8K0Q-ZgeC6KTVtaw1Otw#mcmMzw@ULPqX_0{~kNcC;ed=X! Z{rB;dZBwgL%ykq%Lq$iqLec8|e*x2q{vQAU literal 0 HcmV?d00001 diff --git a/doc/salome/gui/VISU/images/shrink_factor.png b/doc/salome/gui/VISU/images/shrink_factor.png new file mode 100644 index 0000000000000000000000000000000000000000..cbc4f9530ff8d7236320e96f94f731cc580d210a GIT binary patch literal 7707 zcmb7pbyOTpurC2ZfFw91c<>OMg#aPA2MfUi1X~t&_n^Uc7ZzP)(GXmNTX2T}!C71b zi~Ayv@4N4u_s%`<-E;3BGhNg5>*}eQs$W;1j{K;m@Eo5C9|Hs9xssynr-yd+;mX6s zdALUrALnCW(5@=UN@;neqcXhxv^E-g+bq+#0P!m4i5NQ zpU+MC`p(;OEjCWo*chPfkv651pKXmCifi0|Fmfw?1mZErreHI0FvLFY69;VF#dRz3 z1C;vs+4|A9ej{wIBi>6}{v)m<2k#Hi2mop17sDM}H*C!Iym2iM>{m3t7^9*0wf;Ky z(9;@Y%=Q@5i?WR7%p=I6R=yI9!ynvgq9I-+Cio`+4;ug(sNxc!n_G$}w)`<{IdR_j z5zS0AB+O`dl=+lc5+=O^k>q{1U}W#r1cj!F=~w5b+Qowcd2gi?!bl!#hL(-!G$VVJ zl$EK4(#Xll>mS97*ma=LYbPeN0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%*v-0G`^Ddd%4&9;ZI<(X zgt{!AuR|8RWMP6Zd$hjA$((54a&6=-WwphqJ(!`ZC`F0Z66zD`y!|a6h`vqaBZ*&` zU%tedqvP}l8T4sce6#_kS*zqN<(nQ*9*U#2H^HD}^q zeJ0hlFoVl5LL@r`25+bS+o~#tdZF#>9s-gQ{19+(H-=4~(ah6KK<3Uv$k87yWnusS za_GMfntL3EGuwt!Ng(zh+PkQclCcovph!ZhjPb68kbd?Po4~y zHE2clbx#ClJ2rrXIEpVvk~b*509WcEA78$ZXZjDw*RiPIOD{ECzL$>~dmTGa07KOg zTbMx@U$=}Ghm6{Mbp9>13NY^d?8W4&BwrzTq_Z4&&y0BcS%(f|Me literal 0 HcmV?d00001 diff --git a/doc/salome/gui/VISU/input/viewing_3d_presentations.doc b/doc/salome/gui/VISU/input/viewing_3d_presentations.doc index 36c13e88..a82e5eb5 100644 --- a/doc/salome/gui/VISU/input/viewing_3d_presentations.doc +++ b/doc/salome/gui/VISU/input/viewing_3d_presentations.doc @@ -105,7 +105,6 @@ arcs.
  • \b Properties
  • -\image html viewing13.png
    • \b Opacity - allows to set the value of opacity of the presentation between 0 (transparent) and 100 (opaque). @@ -117,8 +116,20 @@ opaque mode as long as the opacity level is equal 100% and in transparent mode when opacity level is lower that 100% (note that they become invisible when the level is equal 0%).
    • + +\image html viewing13.png +
    • Line Width - allows to set the width of lines representing edges of the presentation between 1 (thin) and 100 (thick).
    • + +\image html line_width.png + +
    • Shrink Factor - allows to set the shrink factor of the presentation +to be used in \b Shrink mode. Possible values are ranged between 20 and +100, default value is 80.
    • + +\image html shrink_factor.png +
    • Edge Color - allows to set the color of lines representing edges of the presentation displayed in Surfaceframe mode.
    diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index 3aee730b..f35f3f11 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -39,6 +39,7 @@ + diff --git a/src/VISUGUI/Makefile.am b/src/VISUGUI/Makefile.am index 5a39eccf..86a1d09d 100644 --- a/src/VISUGUI/Makefile.am +++ b/src/VISUGUI/Makefile.am @@ -65,6 +65,7 @@ salomeinclude_HEADERS= \ VisuGUI_SetupPlot2dDlg.h \ VisuGUI_BuildProgressDlg.h \ VisuGUI_TransparencyDlg.h \ + VisuGUI_ShrinkFactorDlg.h \ VisuGUI_Timer.h \ VisuGUI_Slider.h \ VisuGUI_InputPane.h \ @@ -112,6 +113,7 @@ dist_libVISU_la_SOURCES= \ VisuGUI_BuildProgressDlg.cxx \ VisuGUI_Table3dDlg.cxx \ VisuGUI_TransparencyDlg.cxx \ + VisuGUI_ShrinkFactorDlg.cxx \ VisuGUI_Timer.cxx \ VisuGUI_Slider.cxx \ VisuGUI_Sweep.cxx \ @@ -159,6 +161,7 @@ MOC_FILES= \ VisuGUI_BuildProgressDlg_moc.cxx \ VisuGUI_Table3dDlg_moc.cxx \ VisuGUI_TransparencyDlg_moc.cxx \ + VisuGUI_ShrinkFactorDlg_moc.cxx \ VisuGUI_Slider_moc.cxx \ VisuGUI_Sweep_moc.cxx \ VisuGUI_InputPane_moc.cxx \ diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts index 1d07e3b4..986a8221 100644 --- a/src/VISUGUI/VISU_msg_en.ts +++ b/src/VISUGUI/VISU_msg_en.ts @@ -409,6 +409,10 @@ number of time stamps or number of components is not the same! MAX_ARC_ANGLE Maximum angle + + VISU_SHRINK_FACTOR + Shrink Factor + VISU_USE_SHADING Use Shading @@ -1173,6 +1177,10 @@ Please, refer to the documentation. MEN_LINE_WIDTH Line Width + + MEN_SHRINK_FACTOR + Shrink Factor + MEN_MERGE_SCALAR_BARS Merge Scalar Range @@ -4125,4 +4133,15 @@ Please, refer to the QT documentation. Color + + VisuGUI_ShrinkFactorDlg + + SHRINKFACTOR_TITLE + Change Shrink Factor + + + SHRINKFACTOR_VALUE + Shrink Factor: + + diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 8c724922..8ea7c889 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -116,6 +116,7 @@ #include "VisuGUI_Displayer.h" #include "VisuGUI_BuildProgressDlg.h" #include "VisuGUI_TransparencyDlg.h" +#include "VisuGUI_ShrinkFactorDlg.h" #include "VisuGUI_CacheDlg.h" #include "VisuGUI_Table3dDlg.h" #include "VisuGUI_ClippingPanel.h" @@ -1391,6 +1392,15 @@ VisuGUI delete CursorDlg; } +//---------------------------------------------------------------------------- +void +VisuGUI +::OnChangeShrinkFactor() +{ + VisuGUI_ShrinkFactorDlg* aDialog = new VisuGUI_ShrinkFactorDlg( this ); + aDialog->show(); +} + //---------------------------------------------------------------------------- void VisuGUI @@ -2622,6 +2632,10 @@ VisuGUI tr("MEN_LINE_WIDTH"), "", 0, aParent, false, this, SLOT(OnChangeLines())); + createAction( VISU_SHRINK_FACTOR, tr("MEN_SHRINK_FACTOR"), QIcon(), + tr("MEN_SHRINK_FACTOR"), "", 0, aParent, false, + this, SLOT(OnChangeShrinkFactor())); + createAction( VISU_EDIT_SCALARMAP, tr("MEN_EDIT_PRS"), QIcon(), tr("MEN_EDIT_PRS"), "", 0, aParent, false, @@ -2958,11 +2972,12 @@ VisuGUI // "Properties" submenu parentId = mgr->insert( tr( "MEN_PROPERTIES" ), -1, -1 ); - mgr->insert( action( VISU_CELL_COLOR ), parentId, -1, -1 ); // cell color - mgr->insert( action( VISU_EDGE_COLOR ), parentId, -1, -1 ); // edge color - mgr->insert( action( VISU_COLOR ) , parentId, -1, -1 ); // color - mgr->insert( action( VISU_OPACITY ) , parentId, -1, -1 ); // opacity - mgr->insert( action( VISU_LINE_WIDTH ), parentId, -1, -1 ); // line width + mgr->insert( action( VISU_CELL_COLOR ), parentId, -1, -1 ); // cell color + mgr->insert( action( VISU_EDGE_COLOR ), parentId, -1, -1 ); // edge color + mgr->insert( action( VISU_COLOR ) , parentId, -1, -1 ); // color + mgr->insert( action( VISU_OPACITY ) , parentId, -1, -1 ); // opacity + mgr->insert( action( VISU_LINE_WIDTH ), parentId, -1, -1 ); // line width + mgr->insert( action( VISU_SHRINK_FACTOR ), parentId, -1, -1 ); // shrink factor mgr->insert( separator(), -1, -1, -1 ); @@ -3139,6 +3154,7 @@ VisuGUI "or (type='VISU::TDEFORMEDSHAPE' and hasActor=1))" ); mgr->setRule( action( VISU_OPACITY ), aRule + " and hasActor=1" ); mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1" ); + mgr->setRule( action( VISU_SHRINK_FACTOR ), aRule + aShrinkType + " and isShrunk=1" ); // rename command QString aCurveAll = "'VISU::TTABLE' 'VISU::TCURVE' 'VISU::TCONTAINER' 'VISU::POINTMAP3D'"; @@ -3977,11 +3993,16 @@ void VisuGUI::createPreferences() setPreferenceProperty( maxAngle, "min", 1 ); setPreferenceProperty( maxAngle, "max", 90 ); + int shrFac = addPreference( tr( "VISU_SHRINK_FACTOR" ), representGr, LightApp_Preferences::IntSpin, "VISU", "shrink_factor" ); + setPreferenceProperty( shrFac, "min", 20 ); + setPreferenceProperty( shrFac, "max", 100 ); + sp = addPreference( "", representGr, LightApp_Preferences::Space ); + setPreferenceProperty( sp, "hstretch", 0 ); + setPreferenceProperty( sp, "vstretch", 0 ); addPreference( tr( "VISU_EDGE_COLOR" ), representGr, LightApp_Preferences::Color, "VISU", "edge_color" ); addPreference( "", representGr, LightApp_Preferences::Space ); - addPreference( tr( "VISU_USE_SHADING" ), representGr, LightApp_Preferences::Bool, "VISU", "represent_shading" ); sp = addPreference( "", representGr, LightApp_Preferences::Space ); setPreferenceProperty( sp, "hstretch", 0 ); diff --git a/src/VISUGUI/VisuGUI.h b/src/VISUGUI/VisuGUI.h index dff83e2f..e5fa4866 100644 --- a/src/VISUGUI/VisuGUI.h +++ b/src/VISUGUI/VisuGUI.h @@ -153,6 +153,7 @@ protected slots: void OnChangeWireframeColor(); void OnChangeOpacity(); void OnChangeLines(); + void OnChangeShrinkFactor(); void OnShowTable(); void OnShowTablePlot(); diff --git a/src/VISUGUI/VisuGUI_ActionsDef.h b/src/VISUGUI/VisuGUI_ActionsDef.h index e0bc6e7b..be51141e 100644 --- a/src/VISUGUI/VisuGUI_ActionsDef.h +++ b/src/VISUGUI/VisuGUI_ActionsDef.h @@ -92,6 +92,7 @@ #define VISU_EDGE_COLOR 4059 #define VISU_OPACITY 4060 #define VISU_LINE_WIDTH 4061 +#define VISU_SHRINK_FACTOR 40629 #define VISU_EDIT_SCALARMAP 40620 #define VISU_EDIT_DEFORMEDSHAPE 40621 diff --git a/src/VISUGUI/VisuGUI_ShrinkFactorDlg.cxx b/src/VISUGUI/VisuGUI_ShrinkFactorDlg.cxx new file mode 100644 index 00000000..32f2b0fc --- /dev/null +++ b/src/VISUGUI/VisuGUI_ShrinkFactorDlg.cxx @@ -0,0 +1,255 @@ +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : VisuGUI_ShrinkFactorDlg.cxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + +#include "VisuGUI_ShrinkFactorDlg.h" + +#include "VisuGUI.h" +#include "VisuGUI_ViewTools.h" +#include "VisuGUI_Tools.h" +#include "VISU_Actor.h" + +#include "SUIT_Desktop.h" +#include "SUIT_OverrideCursor.h" +#include "SUIT_Session.h" +#include "SUIT_MessageBox.h" +#include "SUIT_ResourceMgr.h" + +#include "SALOME_ListIO.hxx" +#include "SALOME_ListIteratorOfListIO.hxx" +#include "SALOME_InteractiveObject.hxx" + +#include "LightApp_Study.h" +#include "LightApp_SelectionMgr.h" +#include "LightApp_Application.h" + +#include "SVTK_ViewWindow.h" + +// QT Includes +#include +#include +#include +#include +#include +#include + +const int DEFAULT_SHRINK = 80; + +//================================================================================= +// class : VisuGUI_ShrinkFactorDlg() +// purpose : +// +//================================================================================= +VisuGUI_ShrinkFactorDlg::VisuGUI_ShrinkFactorDlg( VisuGUI* theModule, bool modal ) + : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ), + myModule(theModule), + mySelectionMgr( VISU::GetSelectionMgr( theModule ) ), + myViewWindow( VISU::GetActiveViewWindow(theModule) ) +{ + setModal( modal ); + setAttribute( Qt::WA_DeleteOnClose ); + + setWindowTitle( tr( "SHRINKFACTOR_TITLE" ) ); + setSizeGripEnabled( true ); + QVBoxLayout* topLayout = new QVBoxLayout( this ); + topLayout->setSpacing( 6 ); + topLayout->setMargin( 11 ); + + /*************************************************************************/ + GroupC1 = new QGroupBox( this ); + QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1 ); + GroupC1Layout->setSpacing( 6 ); + GroupC1Layout->setMargin( 11 ); + + ValueLab = new QLabel( tr( "SHRINKFACTOR_VALUE" ), GroupC1 ); + ValueSpin = new QSpinBox( GroupC1 ); + ValueSpin->setRange( 20, 100 ); + ValueSpin->setSingleStep( 10 ); + ValueSpin->setMinimumWidth( 70 ); + + GroupC1Layout->addWidget( ValueLab ); + GroupC1Layout->addWidget( ValueSpin ); + + /*************************************************************************/ + QGroupBox* GroupButtons = new QGroupBox( this ); + QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons ); + GroupButtonsLayout->setSpacing( 6 ); + GroupButtonsLayout->setMargin( 11 ); + + buttonOk = new QPushButton( tr( "BUT_CLOSE" ), GroupButtons ); + buttonOk->setAutoDefault( true ); + buttonOk->setDefault( true ); + + buttonHelp = new QPushButton( tr( "BUT_HELP" ), GroupButtons); + buttonHelp->setAutoDefault( true ); + + GroupButtonsLayout->addWidget( buttonOk ); + GroupButtonsLayout->addSpacing( 10 ); + GroupButtonsLayout->addStretch(); + GroupButtonsLayout->addWidget( buttonHelp ); + + topLayout->addWidget( GroupC1 ); + topLayout->addWidget( GroupButtons ); + + // Initial state + onSelectionChanged(); + + // signals and slots connections : after ValueHasChanged() + connect(buttonOk, SIGNAL( clicked() ), this, SLOT( close() ) ); + connect(buttonHelp, SIGNAL( clicked() ), this, SLOT( help() ) ); + connect(ValueSpin, SIGNAL( valueChanged( int ) ), this, SLOT( setShrinkFactor() ) ); + connect(mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) ); +} + +//================================================================================= +// function : ~VisuGUI_ShrinkFactorDlg() +// purpose : +//================================================================================= +VisuGUI_ShrinkFactorDlg::~VisuGUI_ShrinkFactorDlg() +{ +} + +//======================================================================= +// function : help() +// purpose : +//======================================================================= +void VisuGUI_ShrinkFactorDlg::help() +{ + QString aHelpFileName = "viewing_3d_presentations_page.html#width_shrink_factor_anchor"; + LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) { + VisuGUI* aVisuGUI = dynamic_cast( app->activeModule() ); + app->onHelpContextModule( aVisuGUI ? app->moduleName( aVisuGUI->moduleName() ) : QString(""), aHelpFileName ); + } + else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif + SUIT_MessageBox::warning( this, + tr( "WRN_WARNING" ), + tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( aHelpFileName ), + tr( "BUT_OK" ) ); + } +} + +//================================================================================= +// function : setShrinkFactor() +// purpose : Called when value of spin box is changed +// : or the first time as initilisation +//================================================================================= +void VisuGUI_ShrinkFactorDlg::setShrinkFactor() +{ + if ( myViewWindow ) { + SUIT_OverrideCursor wc; + float shrink = ValueSpin->value() / 100.; + + SALOME_ListIO aList; + mySelectionMgr->selectedObjects( aList ); + + SALOME_ListIteratorOfListIO anIter( aList ); + for ( ; anIter.More(); anIter.Next() ) { + Handle(SALOME_InteractiveObject) anIO = anIter.Value(); + VISU_Actor* anActor = VISU::FindActor( VISU::GetAppStudy( myModule ), myViewWindow, anIO->getEntry() ); + if ( anActor && anActor->IsShrunkable() ) + anActor->SetShrinkFactor( shrink ); + } + myViewWindow->Repaint(); + } +} + +//================================================================================= +// function : onSelectionChanged() +// purpose : Called when selection is changed +//================================================================================= +void VisuGUI_ShrinkFactorDlg::onSelectionChanged() +{ + bool shrinkable = false; + if ( myViewWindow ) { + int shrink = DEFAULT_SHRINK; + + SALOME_ListIO aList; + mySelectionMgr->selectedObjects( aList ); + + if ( aList.Extent() == 1 ) { + Handle(SALOME_InteractiveObject) FirstIOS = aList.First(); + if ( !FirstIOS.IsNull() ) { + VISU_Actor* anActor = VISU::FindActor( VISU::GetAppStudy( myModule ), myViewWindow, FirstIOS->getEntry() ); + if ( anActor ) { + shrinkable = anActor->IsShrunkable(); + if ( shrinkable ) + shrink = int( anActor->GetShrinkFactor() * 100. + 0.5 ); + } + } + } + else if ( aList.Extent() > 1 ) { + SALOME_ListIteratorOfListIO It( aList ); + int setShr = -1; + for ( ; It.More(); It.Next() ) { + Handle(SALOME_InteractiveObject) IO = It.Value(); + if (!IO.IsNull()) { + VISU_Actor* anActor = VISU::FindActor( VISU::GetAppStudy( myModule ), myViewWindow, IO->getEntry() ); + if ( anActor ) { + bool lshrinkable = anActor->IsShrunkable(); + shrinkable = shrinkable || lshrinkable; + if ( lshrinkable ) { + int shr = int( anActor->GetShrinkFactor() * 100. + 0.5 ); + if ( setShr < 0 ) + setShr = shr; + else if ( setShr != shr ) { + setShr = DEFAULT_SHRINK; + break; + } + } + } + } + } + if ( setShr >= 0 ) + shrink = setShr; + } + ValueSpin->blockSignals( true ); + ValueSpin->setValue( shrink ); + ValueSpin->blockSignals( false ); + } + GroupC1->setEnabled( shrinkable ); +} + +//================================================================================= +// function : keyPressEvent() +// purpose : +//================================================================================= +void VisuGUI_ShrinkFactorDlg::keyPressEvent( QKeyEvent* e ) +{ + QDialog::keyPressEvent( e ); + if ( e->isAccepted() ) + return; + + if ( e->key() == Qt::Key_F1 ) { + e->accept(); + help(); + } +} diff --git a/src/VISUGUI/VisuGUI_ShrinkFactorDlg.h b/src/VISUGUI/VisuGUI_ShrinkFactorDlg.h new file mode 100644 index 00000000..b4bf4b55 --- /dev/null +++ b/src/VISUGUI/VisuGUI_ShrinkFactorDlg.h @@ -0,0 +1,76 @@ +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : VisuGUI_ShrinkFactorDlg.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + +#ifndef VISUGUI_SHRINKFACTORDLG_H +#define VISUGUI_SHRINKFACTORDLG_H + +// QT Includes +#include + +class QLabel; +class QPushButton; +class QSpinBox; +class QGroupBox; +class LightApp_SelectionMgr; +class SalomeApp_Module; +class SVTK_Selector; +class SVTK_ViewWindow; +class VisuGUI; + +//================================================================================= +// class : VisuGUI_ShrinkFactorDlg +// purpose : +//================================================================================= +class VisuGUI_ShrinkFactorDlg : public QDialog +{ + Q_OBJECT + +public: + VisuGUI_ShrinkFactorDlg( VisuGUI* = 0, + bool modal = false ); + + ~VisuGUI_ShrinkFactorDlg(); + +private: + void keyPressEvent( QKeyEvent* ); + +private : + LightApp_SelectionMgr* mySelectionMgr; + SVTK_ViewWindow* myViewWindow; + const SalomeApp_Module* myModule; + + QGroupBox* GroupC1; + QPushButton* buttonOk; + QPushButton* buttonHelp; + QLabel* ValueLab; + QSpinBox* ValueSpin; + +public slots: + void help(); + void setShrinkFactor(); + void onSelectionChanged(); +}; + +#endif // VISUGUI_SHRINKFACTORDLG_H diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 7b010add..fdc4ef08 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -32,6 +32,7 @@ #include "VISU_Actor.h" #include "SALOME_Event.h" +#include "SUIT_ResourceMgr.h" #include #include @@ -485,6 +486,8 @@ VISU::Prs3d_i ::CreateActor(VISU_Actor* theActor) { try{ + SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); + Handle(SALOME_InteractiveObject) anIO = GetIO(); if(!anIO.IsNull() && anIO->hasEntry()){ theActor->setIO(anIO); @@ -494,7 +497,7 @@ VISU::Prs3d_i CheckDataSet(); theActor->SetPrs3d(this); - theActor->SetShrinkFactor(); + theActor->SetShrinkFactor(aResourceMgr->integerValue("VISU", "shrink_factor", 80)/100.); theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]); theActor->SetPipeLine(GetActorPipeLine()); if(theActor->GetPipeLine() != GetPipeLine()){ -- 2.39.2