From: apo Date: Wed, 27 Apr 2005 06:34:12 +0000 (+0000) Subject: PostPro 2005, T1.5: 2D fields displayed in 3D X-Git-Tag: V2_2_0_VISU_improvement_2005-05-27~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1e4500753fcf1699903a51ca554e24d9196c5a36;p=modules%2Fvisu.git PostPro 2005, T1.5: 2D fields displayed in 3D --- diff --git a/resources/VISU_en.xml b/resources/VISU_en.xml index 5be5fdf0..b10a3084 100644 --- a/resources/VISU_en.xml +++ b/resources/VISU_en.xml @@ -31,7 +31,7 @@ - + @@ -88,7 +88,7 @@ - + diff --git a/resources/VISU_fr.xml b/resources/VISU_fr.xml index 0aa69895..b10a3084 100644 --- a/resources/VISU_fr.xml +++ b/resources/VISU_fr.xml @@ -31,22 +31,12 @@ - + - - - - - - - - - - - + @@ -98,15 +88,8 @@ - + - - - - - - - diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 22eb785f..8cdbb8d3 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -470,6 +470,7 @@ bool VisuGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) /* 4014 : Iso-Surfaces */ /* 4015 : Cut Planes */ /* 4016 : Stream Lines */ + /* 4017 : Plot 3D */ /* ========================================================================== */ case 4011 : @@ -493,6 +494,9 @@ bool VisuGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) case 4016 : visuGUI->CreateStreamLines(); break; + case 4017 : + visuGUI->CreatePlot3D(); + break; case 4111 : visuGUI->SelectionInfo(); @@ -3197,6 +3201,8 @@ bool VisuGUI::CustomPopup (QAD_Desktop* parent, QPopupMenu* thePopup, const QStr "Cut Planes...", visuGUI, SLOT(CreateCutPlanes())); thePopup->insertItem(rmgr->loadPixmap( "VISU", tr("ICON_CUT_LINES") ), "Cut Lines...", visuGUI, SLOT(CreateCutLines())); + thePopup->insertItem(rmgr->loadPixmap( "VISU", tr("ICON_PLOT3D") ), + "Plot3D...", visuGUI, SLOT(CreatePlot3D())); if(aNunComponent > 1){ thePopup->insertItem(rmgr->loadPixmap( "VISU", tr("ICON_DEFORMED_SHAPE") ), "Deformed Shape...", visuGUI, SLOT(CreateDeformedShape())); diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx index c872148b..28b3be3f 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx @@ -45,97 +45,23 @@ using namespace std; VisuGUI_Plot3DPane::VisuGUI_Plot3DPane(QWidget* parent) : QVBox(parent) { - QFrame* TopGroup = new QFrame( this, "TopGroup" ); - TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken); - TopGroup->setLineWidth(1); - - QGridLayout* TopGroupLayout = new QGridLayout(TopGroup); - TopGroupLayout->setAlignment( Qt::AlignTop ); - TopGroupLayout->setSpacing( 6 ); - TopGroupLayout->setMargin( 11 ); - - QLabel* LabelNbr = new QLabel( tr( "Number of surfaces:" ), TopGroup, "LabelNbr" ); - TopGroupLayout->addWidget( LabelNbr, 0, 0 ); - NbrIso = new QSpinBox( 1, 100, 1, TopGroup, "NbrIso" ); - NbrIso->setValue( 1 ); - TopGroupLayout->addWidget( NbrIso, 0, 1 ); - - QLabel* LabelMin = new QLabel( tr( "Minimum value:" ), TopGroup, "LabelMin" ); - TopGroupLayout->addWidget( LabelMin, 1, 0 ); - //MinIso = new QAD_SpinBoxDbl( TopGroup, -DBL_MAX, DBL_MAX, 0.1 ); - MinIso = new QLineEdit( TopGroup ); - MinIso->setValidator( new QDoubleValidator(TopGroup) ); - MinIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - MinIso->setMinimumSize( 70, 0 ); - LabelMin->setBuddy(MinIso); - TopGroupLayout->addWidget( MinIso, 1, 1 ); - - QLabel* LabelMax = new QLabel( tr( "Maximum value:" ), TopGroup, "LabelMax" ); - TopGroupLayout->addWidget( LabelMax, 2, 0 ); - //MaxIso = new QAD_SpinBoxDbl( TopGroup, -DBL_MAX, DBL_MAX, 0.1); - MaxIso = new QLineEdit( TopGroup ); - MaxIso->setValidator( new QDoubleValidator(TopGroup) ); - MaxIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - MaxIso->setMinimumSize( 70, 0 ); - LabelMax->setBuddy(MaxIso); - TopGroupLayout->addWidget( MaxIso, 2, 1 ); - - -// CBUpdate = new QCheckBox ( tr( "Update scalar bar with these values" ), TopGroup); -// CBUpdate->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed) ); -// TopGroupLayout->addMultiCellWidget( CBUpdate, 4, 4, 0, 1); -// CBUpdate->setChecked(false); - QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", TopGroup); - TopGroupLayout->addMultiCellWidget( aUpdateBtn, 3, 3, 0, 1); - connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) ); - -// CBLog = new QCheckBox ( tr( "Logarithmic scaling" ), TopGroup); -// CBLog->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed) ); -// TopGroupLayout->addMultiCellWidget( CBLog, 3, 3, 0, 1); - } - - -void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs) { +void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs) +{ } -int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs) { +int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs) +{ return 1; } -void VisuGUI_Plot3DPane::onCBUpdate() +bool VisuGUI_Plot3DPane::check() { - // if (CBUpdate->isChecked()) { - myScalarPane->setRange(MinIso->text().toDouble(), MaxIso->text().toDouble(), true); - // } -// CBLog->setDisabled(false); -// else CBLog->setDisabled(true); -} - - -bool VisuGUI_Plot3DPane::check() { - if (MinIso->text().toDouble() >= MaxIso->text().toDouble()) { - MESSAGE(tr("MSG_MINMAX_VALUES")); - QAD_MessageBox::warn1( this,tr("VISU_WARNING"), - tr("MSG_MINMAX_VALUES"), - tr("VISU_BUT_OK")); - return false; - } // else if (/* CBUpdate->isChecked() && CBLog->isChecked() && */ -// (MinIso->text().toDouble() <=0 || MaxIso->text().toDouble() <=0) ) { -// QAD_MessageBox::warn1( this, -// tr("VISU_WARNING"), -// tr("WRN_LOGARITHMIC_RANGE_ISOSURF"), -// tr("VISU_BUT_OK")); -// return false; -// } return true; } - - - /*! Constructor */ diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.h b/src/VISUGUI/VisuGUI_Plot3DDlg.h index 19eff939..1aef0f9f 100644 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.h +++ b/src/VISUGUI/VisuGUI_Plot3DDlg.h @@ -58,14 +58,9 @@ public: bool check(); -protected slots: - void onCBUpdate(); - private: - QLineEdit* MinIso; - QLineEdit* MaxIso; - QSpinBox* NbrIso; - VisuGUI_ScalarBarPane* myScalarPane; + VisuGUI_ScalarBarPane* myScalarPane; + };