#include "VisuGUI_Tools.h"
#include "VisuGUI_DeformedShapeDlg.h"
#include "VisuGUI_CutPlanesDlg.h"
+#include "VisuGUI_Plot3DDlg.h"
#include "VisuGUI_VectorsDlg.h"
#include "VisuGUI_IsoSurfacesDlg.h"
#include "VisuGUI_StreamLinesDlg.h"
#include "VISU_IsoSurfaces_i.hh"
#include "VISU_DeformedShape_i.hh"
#include "VISU_CutPlanes_i.hh"
+#include "VISU_Plot3D_i.hh"
#include "VISU_CutLines_i.hh"
#include "VISU_Vectors_i.hh"
#include "VISU_StreamLines_i.hh"
#define MAXVAL 1e10
-
ArrangeDlg::ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator)
: QDialog(theParent, "ArrangeDlg", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
myAnimator(theAnimator), myViewWindow(theAnimator->getViewer())
aMainLayout->addWidget(aBtnBox);
}
+//************************************************************************
+enum PrsComboItem {
+ TSCALARMAP_ITEM = 0, // VISU::TSCALARMAP
+ TISOSURFACE_ITEM = 1, // VISU::TISOSURFACE
+ TCUTPLANES_ITEM = 2, // VISU::TCUTPLANES
+ TPLOT3D_ITEM = 3, // VISU::TPLOT3D
+ TDEFORMEDSHAPE_ITEM = 4, // VISU::TDEFORMEDSHAPE
+ TVECTORS_ITEM = 5, // VISU::TVECTORS
+ TSTREAMLINES_ITEM = 6 // VISU::TSTREAMLINES
+};
+
//************************************************************************
void SetupDlg::onFieldChange (int theIndex)
{
FieldData& aData = myAnimator->getFieldData(theIndex);
myTypeCombo->clear();
- myTypeCombo->insertItem("Scalar Map");
- myTypeCombo->insertItem("Iso Surfaces");
- myTypeCombo->insertItem("Cut Planes");
+ // ATTENTION: append items in the same order like it is done in the PrsComboItem enumeration
+ myTypeCombo->insertItem("Scalar Map"); // item 0
+ myTypeCombo->insertItem("Iso Surfaces"); // item 1
+ myTypeCombo->insertItem("Cut Planes"); // item 2
+ myTypeCombo->insertItem("Plot 3D"); // item 3
_PTR(SObject) aSObject = aData.myField;
long aNumComp = VISU::getValue(aSObject, "myNumComponent").toLong();
if (aNumComp > 1) {
- myTypeCombo->insertItem("Deformed Shape");
- myTypeCombo->insertItem("Vectors");
- myTypeCombo->insertItem("Stream Lines");
+ myTypeCombo->insertItem("Deformed Shape"); // item 4
+ myTypeCombo->insertItem("Vectors"); // item 5
+ myTypeCombo->insertItem("Stream Lines"); // item 6
}
switch (aData.myPrsType) {
case VISU::TSCALARMAP: //Scalar Map
- myTypeCombo->setCurrentItem(0);
+ myTypeCombo->setCurrentItem(TSCALARMAP_ITEM);
break;
case VISU::TISOSURFACE: //Iso Surfaces
- myTypeCombo->setCurrentItem(1);
+ myTypeCombo->setCurrentItem(TISOSURFACE_ITEM);
break;
case VISU::TCUTPLANES: //Cut Planes
- myTypeCombo->setCurrentItem(2);
+ myTypeCombo->setCurrentItem(TCUTPLANES_ITEM);
+ break;
+ case VISU::TPLOT3D: //Plot 3D
+ myTypeCombo->setCurrentItem(TPLOT3D_ITEM);
break;
case VISU::TDEFORMEDSHAPE: //Deformed Shape
- myTypeCombo->setCurrentItem(3);
+ myTypeCombo->setCurrentItem(TDEFORMEDSHAPE_ITEM);
break;
case VISU::TVECTORS: //Vectors
- myTypeCombo->setCurrentItem(4);
+ myTypeCombo->setCurrentItem(TVECTORS_ITEM);
break;
case VISU::TSTREAMLINES: //Stream Lines
- myTypeCombo->setCurrentItem(5);
+ myTypeCombo->setCurrentItem(TSTREAMLINES_ITEM);
aData.myPrsType = VISU::TSTREAMLINES;
break;
}
{
FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem());
switch (theIndex) {
- case 0: //Scalar Map
+ case TSCALARMAP_ITEM: //Scalar Map
aData.myPrsType = VISU::TSCALARMAP;
break;
- case 1: //Iso Surfaces
+ case TISOSURFACE_ITEM: //Iso Surfaces
aData.myPrsType = VISU::TISOSURFACE;
break;
- case 2: //Cut Planes
+ case TCUTPLANES_ITEM: //Cut Planes
aData.myPrsType = VISU::TCUTPLANES;
break;
- case 3: //Deformed Shape
+ case TPLOT3D_ITEM: //Plot 3D
+ aData.myPrsType = VISU::TPLOT3D;
+ break;
+ case TDEFORMEDSHAPE_ITEM: //Deformed Shape
aData.myPrsType = VISU::TDEFORMEDSHAPE;
break;
- case 4: //Vectors
+ case TVECTORS_ITEM: //Vectors
aData.myPrsType = VISU::TVECTORS;
break;
- case 5: //Stream Lines
+ case TSTREAMLINES_ITEM: //Stream Lines
aData.myPrsType = VISU::TSTREAMLINES;
break;
}
delete aDlg;}
switch (myTypeCombo->currentItem()) {
- case 0: //Scalar Map
+ case TSCALARMAP_ITEM: //Scalar Map
c.suspend();
EDITPRS(VISU::ScalarMap_i, VisuGUI_ScalarBarDlg);
break;
- case 1: //Iso Surfaces
+ case TISOSURFACE_ITEM: //Iso Surfaces
c.suspend();
EDITPRS(VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg);
break;
- case 2: //Cut Planes
+ case TCUTPLANES_ITEM: //Cut Planes
// EDITPRS(VISU::CutPlanes_i, VisuGUI_CutPlanesDlg);
{
c.suspend();
delete aDlg;
}
break;
- case 3: //Deformed Shape
+ case TPLOT3D_ITEM: //Plot 3D
+ c.suspend();
+ EDITPRS(VISU::Plot3D_i, VisuGUI_Plot3DDlg);
+ break;
+ case TDEFORMEDSHAPE_ITEM: //Deformed Shape
c.suspend();
EDITPRS(VISU::DeformedShape_i, VisuGUI_DeformedShapeDlg);
break;
- case 4: //Vectors
+ case TVECTORS_ITEM: //Vectors
c.suspend();
EDITPRS(VISU::Vectors_i, VisuGUI_VectorsDlg);
break;
- case 5: //Stream Lines
+ case TSTREAMLINES_ITEM: //Stream Lines
c.suspend();
EDITPRS(VISU::StreamLines_i, VisuGUI_StreamLinesDlg);
break;
}
#undef EDITPRS
-
}
#include "VISU_IsoSurfaces_i.hh"
#include "VISU_DeformedShape_i.hh"
#include "VISU_CutPlanes_i.hh"
+#include "VISU_Plot3D_i.hh"
#include "VISU_CutLines_i.hh"
#include "VISU_Vectors_i.hh"
#include "VISU_StreamLines_i.hh"
}
break;
+ case VISU::TPLOT3D: // Cut Planes
+ {
+ VISU::Plot3D_i* aPresent = new VISU::Plot3D_i (pResult, false);
+ aPresent->Create(aMeshName.latin1(), anEntity,
+ aFieldName.latin1(), aTimeStampId);
+ aData.myPrs[i] = aPresent;
+ }
+ break;
+
case VISU::TDEFORMEDSHAPE: // Deformed Shape
{
VISU::DeformedShape_i* aPresent = new VISU::DeformedShape_i(pResult, false);
aData.myPrs[i] = aPresent;
}
break;
+ default:
+ MESSAGE("Not implemented for this presentation type: " << aData.myPrsType);
+ return;
}
if (aData.myPrs[i]->GetMin() < aMin) aMin = aData.myPrs[i]->GetMin();
if (aData.myPrs[i]->GetMax() > aMax) aMax = aData.myPrs[i]->GetMax();
case VISU::TCUTPLANES:
aPrsCmt = VISU::CutPlanes_i::myComment;
break;
+ case VISU::TPLOT3D:
+ aPrsCmt = VISU::Plot3D_i::myComment;
+ break;
case VISU::TDEFORMEDSHAPE:
aPrsCmt = VISU::DeformedShape_i::myComment;
break;
aData.myPrsType = VISU::TISOSURFACE;
else if (strName == VISU::CutPlanes_i::myComment.c_str())
aData.myPrsType = VISU::TCUTPLANES;
+ else if (strName == VISU::Plot3D_i::myComment.c_str())
+ aData.myPrsType = VISU::TPLOT3D;
else if (strName == VISU::DeformedShape_i::myComment.c_str())
aData.myPrsType = VISU::TDEFORMEDSHAPE;
else if (strName == VISU::Vectors_i::myComment.c_str())