Commit 6281fa68 authored by allens's avatar allens

added time axis and relative sampling fix

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16369 18c085ea-50e0-402c-830e-de6fd14e8384
parent ef21cfa4
......@@ -33,6 +33,11 @@
Lines
Surfaces
</Enum>
<Enum name="ViewTime">
Step
Time
Cycle
</Enum>
<Enum name="ChannelGeometry">
Point
Line
......@@ -144,8 +149,8 @@
<Field name="arrayPlotOffset" label="1D plot array offset" type="double">
1.000000
</Field>
<Field name="timePlotScale" label="1D plot time scaling" type="double">
1.000000
<Field name="viewTime" label="View time" type="enum" subtype="ViewTime">
Step
</Field>
<Field name="channelGeometry" label="Channel geometry" type="enum" subtype="ChannelGeometry">
Line
......
......@@ -300,6 +300,44 @@ LineSamplerAttributes::ViewGeometry_FromString(const std::string &s, LineSampler
return false;
}
//
// Enum conversion methods for LineSamplerAttributes::ViewTime
//
static const char *ViewTime_strings[] = {
"Step", "Time", "Cycle"
};
std::string
LineSamplerAttributes::ViewTime_ToString(LineSamplerAttributes::ViewTime t)
{
int index = int(t);
if(index < 0 || index >= 3) index = 0;
return ViewTime_strings[index];
}
std::string
LineSamplerAttributes::ViewTime_ToString(int t)
{
int index = (t < 0 || t >= 3) ? 0 : t;
return ViewTime_strings[index];
}
bool
LineSamplerAttributes::ViewTime_FromString(const std::string &s, LineSamplerAttributes::ViewTime &val)
{
val = LineSamplerAttributes::Step;
for(int i = 0; i < 3; ++i)
{
if(s == ViewTime_strings[i])
{
val = (ViewTime)i;
return true;
}
}
return false;
}
//
// Enum conversion methods for LineSamplerAttributes::ChannelGeometry
//
......@@ -606,7 +644,7 @@ void LineSamplerAttributes::Init()
heightPlotScale = 1;
channelPlotOffset = 0;
arrayPlotOffset = 1;
timePlotScale = 1;
viewTime = Step;
channelGeometry = Line;
radius = 0.1;
divergence = 1;
......@@ -683,7 +721,7 @@ void LineSamplerAttributes::Copy(const LineSamplerAttributes &obj)
heightPlotScale = obj.heightPlotScale;
channelPlotOffset = obj.channelPlotOffset;
arrayPlotOffset = obj.arrayPlotOffset;
timePlotScale = obj.timePlotScale;
viewTime = obj.viewTime;
channelGeometry = obj.channelGeometry;
radius = obj.radius;
divergence = obj.divergence;
......@@ -894,7 +932,7 @@ LineSamplerAttributes::operator == (const LineSamplerAttributes &obj) const
(heightPlotScale == obj.heightPlotScale) &&
(channelPlotOffset == obj.channelPlotOffset) &&
(arrayPlotOffset == obj.arrayPlotOffset) &&
(timePlotScale == obj.timePlotScale) &&
(viewTime == obj.viewTime) &&
(channelGeometry == obj.channelGeometry) &&
(radius == obj.radius) &&
(divergence == obj.divergence) &&
......@@ -1086,7 +1124,7 @@ LineSamplerAttributes::SelectAll()
Select(ID_heightPlotScale, (void *)&heightPlotScale);
Select(ID_channelPlotOffset, (void *)&channelPlotOffset);
Select(ID_arrayPlotOffset, (void *)&arrayPlotOffset);
Select(ID_timePlotScale, (void *)&timePlotScale);
Select(ID_viewTime, (void *)&viewTime);
Select(ID_channelGeometry, (void *)&channelGeometry);
Select(ID_radius, (void *)&radius);
Select(ID_divergence, (void *)&divergence);
......@@ -1292,10 +1330,10 @@ LineSamplerAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool
node->AddNode(new DataNode("arrayPlotOffset", arrayPlotOffset));
}
if(completeSave || !FieldsEqual(ID_timePlotScale, &defaultObject))
if(completeSave || !FieldsEqual(ID_viewTime, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("timePlotScale", timePlotScale));
node->AddNode(new DataNode("viewTime", ViewTime_ToString(viewTime)));
}
if(completeSave || !FieldsEqual(ID_channelGeometry, &defaultObject))
......@@ -1634,8 +1672,22 @@ LineSamplerAttributes::SetFromNode(DataNode *parentNode)
SetChannelPlotOffset(node->AsDouble());
if((node = searchNode->GetNode("arrayPlotOffset")) != 0)
SetArrayPlotOffset(node->AsDouble());
if((node = searchNode->GetNode("timePlotScale")) != 0)
SetTimePlotScale(node->AsDouble());
if((node = searchNode->GetNode("viewTime")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetViewTime(ViewTime(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
ViewTime value;
if(ViewTime_FromString(node->AsString(), value))
SetViewTime(value);
}
}
if((node = searchNode->GetNode("channelGeometry")) != 0)
{
// Allow enums to be int or string in the config file
......@@ -1950,10 +2002,10 @@ LineSamplerAttributes::SetArrayPlotOffset(double arrayPlotOffset_)
}
void
LineSamplerAttributes::SetTimePlotScale(double timePlotScale_)
LineSamplerAttributes::SetViewTime(LineSamplerAttributes::ViewTime viewTime_)
{
timePlotScale = timePlotScale_;
Select(ID_timePlotScale, (void *)&timePlotScale);
viewTime = viewTime_;
Select(ID_viewTime, (void *)&viewTime);
}
void
......@@ -2277,10 +2329,10 @@ LineSamplerAttributes::GetArrayPlotOffset() const
return arrayPlotOffset;
}
double
LineSamplerAttributes::GetTimePlotScale() const
LineSamplerAttributes::ViewTime
LineSamplerAttributes::GetViewTime() const
{
return timePlotScale;
return ViewTime(viewTime);
}
LineSamplerAttributes::ChannelGeometry
......@@ -2504,7 +2556,7 @@ LineSamplerAttributes::GetFieldName(int index) const
case ID_heightPlotScale: return "heightPlotScale";
case ID_channelPlotOffset: return "channelPlotOffset";
case ID_arrayPlotOffset: return "arrayPlotOffset";
case ID_timePlotScale: return "timePlotScale";
case ID_viewTime: return "viewTime";
case ID_channelGeometry: return "channelGeometry";
case ID_radius: return "radius";
case ID_divergence: return "divergence";
......@@ -2577,7 +2629,7 @@ LineSamplerAttributes::GetFieldType(int index) const
case ID_heightPlotScale: return FieldType_double;
case ID_channelPlotOffset: return FieldType_double;
case ID_arrayPlotOffset: return FieldType_double;
case ID_timePlotScale: return FieldType_double;
case ID_viewTime: return FieldType_enum;
case ID_channelGeometry: return FieldType_enum;
case ID_radius: return FieldType_double;
case ID_divergence: return FieldType_double;
......@@ -2650,7 +2702,7 @@ LineSamplerAttributes::GetFieldTypeName(int index) const
case ID_heightPlotScale: return "double";
case ID_channelPlotOffset: return "double";
case ID_arrayPlotOffset: return "double";
case ID_timePlotScale: return "double";
case ID_viewTime: return "enum";
case ID_channelGeometry: return "enum";
case ID_radius: return "double";
case ID_divergence: return "double";
......@@ -2830,9 +2882,9 @@ LineSamplerAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (arrayPlotOffset == obj.arrayPlotOffset);
}
break;
case ID_timePlotScale:
case ID_viewTime:
{ // new scope
retval = (timePlotScale == obj.timePlotScale);
retval = (viewTime == obj.viewTime);
}
break;
case ID_channelGeometry:
......
......@@ -97,6 +97,12 @@ public:
Lines,
Surfaces
};
enum ViewTime
{
Step,
Time,
Cycle
};
enum ChannelGeometry
{
Point,
......@@ -192,7 +198,7 @@ public:
void SetHeightPlotScale(double heightPlotScale_);
void SetChannelPlotOffset(double channelPlotOffset_);
void SetArrayPlotOffset(double arrayPlotOffset_);
void SetTimePlotScale(double timePlotScale_);
void SetViewTime(ViewTime viewTime_);
void SetChannelGeometry(ChannelGeometry channelGeometry_);
void SetRadius(double radius_);
void SetDivergence(double divergence_);
......@@ -244,7 +250,7 @@ public:
double GetHeightPlotScale() const;
double GetChannelPlotOffset() const;
double GetArrayPlotOffset() const;
double GetTimePlotScale() const;
ViewTime GetViewTime() const;
ChannelGeometry GetChannelGeometry() const;
double GetRadius() const;
double GetDivergence() const;
......@@ -310,6 +316,11 @@ public:
static bool ViewGeometry_FromString(const std::string &, ViewGeometry &);
protected:
static std::string ViewGeometry_ToString(int);
public:
static std::string ViewTime_ToString(ViewTime);
static bool ViewTime_FromString(const std::string &, ViewTime &);
protected:
static std::string ViewTime_ToString(int);
public:
static std::string ChannelGeometry_ToString(ChannelGeometry);
static bool ChannelGeometry_FromString(const std::string &, ChannelGeometry &);
......@@ -381,7 +392,7 @@ public:
ID_heightPlotScale,
ID_channelPlotOffset,
ID_arrayPlotOffset,
ID_timePlotScale,
ID_viewTime,
ID_channelGeometry,
ID_radius,
ID_divergence,
......@@ -434,7 +445,7 @@ private:
double heightPlotScale;
double channelPlotOffset;
double arrayPlotOffset;
double timePlotScale;
int viewTime;
int channelGeometry;
double radius;
double divergence;
......@@ -463,6 +474,6 @@ private:
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define LINESAMPLERATTRIBUTES_TMFS "iiiidiiiddidDiddddddiiddddiddiddddiiidddiiiid*d*idd"
#define LINESAMPLERATTRIBUTES_TMFS "iiiidiiiddidDiddddddiidddiiddiddddiiidddiiiid*d*idd"
#endif
......@@ -256,8 +256,25 @@ PyLineSamplerAttributes_ToString(const LineSamplerAttributes *atts, const char *
str += tmpStr;
SNPRINTF(tmpStr, 1000, "%sarrayPlotOffset = %g\n", prefix, atts->GetArrayPlotOffset());
str += tmpStr;
SNPRINTF(tmpStr, 1000, "%stimePlotScale = %g\n", prefix, atts->GetTimePlotScale());
str += tmpStr;
const char *viewTime_names = "Step, Time, Cycle";
switch (atts->GetViewTime())
{
case LineSamplerAttributes::Step:
SNPRINTF(tmpStr, 1000, "%sviewTime = %sStep # %s\n", prefix, prefix, viewTime_names);
str += tmpStr;
break;
case LineSamplerAttributes::Time:
SNPRINTF(tmpStr, 1000, "%sviewTime = %sTime # %s\n", prefix, prefix, viewTime_names);
str += tmpStr;
break;
case LineSamplerAttributes::Cycle:
SNPRINTF(tmpStr, 1000, "%sviewTime = %sCycle # %s\n", prefix, prefix, viewTime_names);
str += tmpStr;
break;
default:
break;
}
const char *channelGeometry_names = "Point, Line, Cylinder, Cone";
switch (atts->GetChannelGeometry())
{
......@@ -1137,26 +1154,35 @@ LineSamplerAttributes_GetArrayPlotOffset(PyObject *self, PyObject *args)
}
/*static*/ PyObject *
LineSamplerAttributes_SetTimePlotScale(PyObject *self, PyObject *args)
LineSamplerAttributes_SetViewTime(PyObject *self, PyObject *args)
{
LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
double dval;
if(!PyArg_ParseTuple(args, "d", &dval))
int ival;
if(!PyArg_ParseTuple(args, "i", &ival))
return NULL;
// Set the timePlotScale in the object.
obj->data->SetTimePlotScale(dval);
// Set the viewTime in the object.
if(ival >= 0 && ival < 3)
obj->data->SetViewTime(LineSamplerAttributes::ViewTime(ival));
else
{
fprintf(stderr, "An invalid viewTime value was given. "
"Valid values are in the range of [0,2]. "
"You can also use the following names: "
"Step, Time, Cycle.");
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
/*static*/ PyObject *
LineSamplerAttributes_GetTimePlotScale(PyObject *self, PyObject *args)
LineSamplerAttributes_GetViewTime(PyObject *self, PyObject *args)
{
LineSamplerAttributesObject *obj = (LineSamplerAttributesObject *)self;
PyObject *retval = PyFloat_FromDouble(obj->data->GetTimePlotScale());
PyObject *retval = PyInt_FromLong(long(obj->data->GetViewTime()));
return retval;
}
......@@ -1898,8 +1924,8 @@ PyMethodDef PyLineSamplerAttributes_methods[LINESAMPLERATTRIBUTES_NMETH] = {
{"GetChannelPlotOffset", LineSamplerAttributes_GetChannelPlotOffset, METH_VARARGS},
{"SetArrayPlotOffset", LineSamplerAttributes_SetArrayPlotOffset, METH_VARARGS},
{"GetArrayPlotOffset", LineSamplerAttributes_GetArrayPlotOffset, METH_VARARGS},
{"SetTimePlotScale", LineSamplerAttributes_SetTimePlotScale, METH_VARARGS},
{"GetTimePlotScale", LineSamplerAttributes_GetTimePlotScale, METH_VARARGS},
{"SetViewTime", LineSamplerAttributes_SetViewTime, METH_VARARGS},
{"GetViewTime", LineSamplerAttributes_GetViewTime, METH_VARARGS},
{"SetChannelGeometry", LineSamplerAttributes_SetChannelGeometry, METH_VARARGS},
{"GetChannelGeometry", LineSamplerAttributes_GetChannelGeometry, METH_VARARGS},
{"SetRadius", LineSamplerAttributes_SetRadius, METH_VARARGS},
......@@ -2070,8 +2096,15 @@ PyLineSamplerAttributes_getattr(PyObject *self, char *name)
return LineSamplerAttributes_GetChannelPlotOffset(self, NULL);
if(strcmp(name, "arrayPlotOffset") == 0)
return LineSamplerAttributes_GetArrayPlotOffset(self, NULL);
if(strcmp(name, "timePlotScale") == 0)
return LineSamplerAttributes_GetTimePlotScale(self, NULL);
if(strcmp(name, "viewTime") == 0)
return LineSamplerAttributes_GetViewTime(self, NULL);
if(strcmp(name, "Step") == 0)
return PyInt_FromLong(long(LineSamplerAttributes::Step));
if(strcmp(name, "Time") == 0)
return PyInt_FromLong(long(LineSamplerAttributes::Time));
if(strcmp(name, "Cycle") == 0)
return PyInt_FromLong(long(LineSamplerAttributes::Cycle));
if(strcmp(name, "channelGeometry") == 0)
return LineSamplerAttributes_GetChannelGeometry(self, NULL);
if(strcmp(name, "Point") == 0)
......@@ -2218,8 +2251,8 @@ PyLineSamplerAttributes_setattr(PyObject *self, char *name, PyObject *args)
obj = LineSamplerAttributes_SetChannelPlotOffset(self, tuple);
else if(strcmp(name, "arrayPlotOffset") == 0)
obj = LineSamplerAttributes_SetArrayPlotOffset(self, tuple);
else if(strcmp(name, "timePlotScale") == 0)
obj = LineSamplerAttributes_SetTimePlotScale(self, tuple);
else if(strcmp(name, "viewTime") == 0)
obj = LineSamplerAttributes_SetViewTime(self, tuple);
else if(strcmp(name, "channelGeometry") == 0)
obj = LineSamplerAttributes_SetChannelGeometry(self, tuple);
else if(strcmp(name, "radius") == 0)
......
......@@ -802,36 +802,9 @@ QvisLineSamplerWindow::CreateWindowContents()
mainLayout = new QGridLayout(viewTab);
viewGeometryLabel = new QLabel(tr("View geometry"), central);
mainLayout->addWidget(viewGeometryLabel,0,0);
viewGeometry = new QWidget(central);
viewGeometryButtonGroup= new QButtonGroup(viewGeometry);
QHBoxLayout *viewGeometryLayout = new QHBoxLayout(viewGeometry);
viewGeometryLayout->setMargin(0);
viewGeometryLayout->setSpacing(10);
QRadioButton *viewGeometryOne = new QRadioButton(tr("Points"), viewGeometry);
viewGeometryButtonGroup->addButton(viewGeometryOne,0);
viewGeometryLayout->addWidget(viewGeometryOne);
QRadioButton *viewGeometryTwo = new QRadioButton(tr("Lines"), viewGeometry);
viewGeometryButtonGroup->addButton(viewGeometryTwo,1);
viewGeometryLayout->addWidget(viewGeometryTwo);
QRadioButton *viewGeometryThree = new QRadioButton(tr("Surfaces"), viewGeometry);
viewGeometryButtonGroup->addButton(viewGeometryThree,2);
viewGeometryLayout->addWidget(viewGeometryThree);
connect(viewGeometryButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(viewGeometryChanged(int)));
mainLayout->addWidget(viewGeometry,0,1);
// View dimension
viewDimensionLabel = new QLabel(tr("View dimension"), central);
mainLayout->addWidget(viewDimensionLabel,1,0);
mainLayout->addWidget(viewDimensionLabel,0,0);
viewDimension = new QWidget(central);
viewDimensionButtonGroup= new QButtonGroup(viewDimension);
......@@ -855,13 +828,13 @@ QvisLineSamplerWindow::CreateWindowContents()
connect(viewDimensionButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(viewDimensionChanged(int)));
mainLayout->addWidget(viewDimension,1,1);
mainLayout->addWidget(viewDimension,0,1);
// Create the oneDPlot group box.
oneDPlotGroup = new QGroupBox(viewTab);
oneDPlotGroup->setTitle(tr("1D Plot viewing parameters"));
mainLayout->addWidget(oneDPlotGroup, 2, 0, 2, 7);
mainLayout->addWidget(oneDPlotGroup, 1, 0, 4, 4);
QGridLayout *oneDPlotLayout = new QGridLayout(oneDPlotGroup);
oneDPlotLayout->setMargin(5);
......@@ -892,13 +865,72 @@ QvisLineSamplerWindow::CreateWindowContents()
this, SLOT(arrayPlotOffsetProcessText()));
oneDPlotLayout->addWidget(arrayPlotOffset,2,1);
timePlotScaleLabel = new QLabel(tr("1D Plot Time scaling"), central);
oneDPlotLayout->addWidget(timePlotScaleLabel,3,0);
timePlotScale = new QLineEdit(central);
timePlotScale->setMaximumWidth(width);
connect(timePlotScale, SIGNAL(returnPressed()),
this, SLOT(timePlotScaleProcessText()));
oneDPlotLayout->addWidget(timePlotScale,3,1);
// Time axis
viewTimeLabel = new QLabel(tr("View time"), central);
oneDPlotLayout->addWidget(viewTimeLabel,3,0);
viewTime = new QWidget(central);
viewTimeButtonGroup= new QButtonGroup(viewTime);
QHBoxLayout *viewTimeLayout = new QHBoxLayout(viewTime);
viewTimeLayout->setMargin(0);
viewTimeLayout->setSpacing(10);
QRadioButton *viewTimeOne = new QRadioButton(tr("Step"), viewTime);
viewTimeButtonGroup->addButton(viewTimeOne,0);
viewTimeLayout->addWidget(viewTimeOne);
QRadioButton *viewTimeTwo = new QRadioButton(tr("Time"), viewTime);
viewTimeButtonGroup->addButton(viewTimeTwo,1);
viewTimeLayout->addWidget(viewTimeTwo);
QRadioButton *viewTimeThree = new QRadioButton(tr("Cycle"), viewTime);
viewTimeButtonGroup->addButton(viewTimeThree,2);
viewTimeLayout->addWidget(viewTimeThree);
connect(viewTimeButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(viewTimeChanged(int)));
oneDPlotLayout->addWidget(viewTime,3,1);
// Create the misc group box.
QGroupBox *miscGroup = new QGroupBox(viewTab);
miscGroup->setTitle(tr("Misc viewing parameters"));
mainLayout->addWidget(miscGroup, 5, 0, 2, 4);
QGridLayout *miscLayout = new QGridLayout(miscGroup);
miscLayout->setMargin(5);
miscLayout->setSpacing(10);
viewGeometryLabel = new QLabel(tr("View geometry"), central);
miscLayout->addWidget(viewGeometryLabel,0,0);
viewGeometry = new QWidget(central);
viewGeometryButtonGroup= new QButtonGroup(viewGeometry);
QHBoxLayout *viewGeometryLayout = new QHBoxLayout(viewGeometry);
viewGeometryLayout->setMargin(0);
viewGeometryLayout->setSpacing(10);
QRadioButton *viewGeometryOne = new QRadioButton(tr("Points"), viewGeometry);
viewGeometryButtonGroup->addButton(viewGeometryOne,0);
viewGeometryLayout->addWidget(viewGeometryOne);
QRadioButton *viewGeometryTwo = new QRadioButton(tr("Lines"), viewGeometry);
viewGeometryButtonGroup->addButton(viewGeometryTwo,1);
viewGeometryLayout->addWidget(viewGeometryTwo);
QRadioButton *viewGeometryThree = new QRadioButton(tr("Surfaces"), viewGeometry);
viewGeometryButtonGroup->addButton(viewGeometryThree,2);
viewGeometryLayout->addWidget(viewGeometryThree);
connect(viewGeometryButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(viewGeometryChanged(int)));
miscLayout->addWidget(viewGeometry,0,1);
}
......@@ -1039,6 +1071,12 @@ QvisLineSamplerWindow::UpdateWindow(bool doAll)
viewGeometryButtonGroup->button((int)atts->GetViewGeometry())->setChecked(true);
viewGeometryButtonGroup->blockSignals(false);
break;
case LineSamplerAttributes::ID_viewTime:
viewTimeButtonGroup->blockSignals(true);
if(viewTimeButtonGroup->button((int)atts->GetViewTime()) != 0)
viewTimeButtonGroup->button((int)atts->GetViewTime())->setChecked(true);
viewTimeButtonGroup->blockSignals(false);
break;
case LineSamplerAttributes::ID_viewDimension:
viewDimensionButtonGroup->blockSignals(true);
if(viewDimensionButtonGroup->button((int)atts->GetViewDimension()) != 0)
......@@ -1056,9 +1094,6 @@ QvisLineSamplerWindow::UpdateWindow(bool doAll)
case LineSamplerAttributes::ID_arrayPlotOffset:
arrayPlotOffset->setText(DoubleToQString(atts->GetArrayPlotOffset()));
break;
case LineSamplerAttributes::ID_timePlotScale:
timePlotScale->setText(DoubleToQString(atts->GetTimePlotScale()));
break;
case LineSamplerAttributes::ID_channelGeometry:
channelGeometryButtonGroup->blockSignals(true);
if(channelGeometryButtonGroup->button((int)atts->GetChannelGeometry()) != 0)
......@@ -1136,6 +1171,12 @@ QvisLineSamplerWindow::UpdateWindow(bool doAll)
if(timeSamplingButtonGroup->button((int)atts->GetTimeSampling()) != 0)
timeSamplingButtonGroup->button((int)atts->GetTimeSampling())->setChecked(true);
timeSamplingButtonGroup->blockSignals(false);
viewTimeLabel->setEnabled( (int)atts->GetTimeSampling()==1 &&
(int)atts->GetToroidalIntegration()==0);
viewTime->setEnabled( (int)atts->GetTimeSampling()==1 &&
(int)atts->GetToroidalIntegration()==0);
timeStepLabel->setEnabled((int)atts->GetTimeSampling()==1);
timeStepStartLabel->setEnabled((int)atts->GetTimeSampling()==1);
......@@ -1446,19 +1487,6 @@ QvisLineSamplerWindow::GetCurrentValues(int which_widget)
}
}
// Do timePlotScale
if(which_widget == LineSamplerAttributes::ID_timePlotScale || doAll)
{
double val;
if(LineEditGetDouble(timePlotScale, val))
atts->SetTimePlotScale(val);
else
{
ResettingError(tr("1D plot time scaling"),
DoubleToQString(atts->GetTimePlotScale()));
atts->SetTimePlotScale(atts->GetTimePlotScale());
}
}
// Do radius
if(which_widget == LineSamplerAttributes::ID_radius || doAll)
......@@ -1905,6 +1933,17 @@ QvisLineSamplerWindow::viewGeometryChanged(int val)
}
void
QvisLineSamplerWindow::viewTimeChanged(int val)
{
if(val != atts->GetViewTime())
{
atts->SetViewTime(LineSamplerAttributes::ViewTime(val));
Apply();
}
}
void
QvisLineSamplerWindow::viewDimensionChanged(int val)
{
......@@ -1940,14 +1979,6 @@ QvisLineSamplerWindow::arrayPlotOffsetProcessText()
}
void
QvisLineSamplerWindow::timePlotScaleProcessText()
{
GetCurrentValues(LineSamplerAttributes::ID_timePlotScale);
Apply();
}
void
QvisLineSamplerWindow::channelGeometryChanged(int val)
{
......
......@@ -109,11 +109,11 @@ class QvisLineSamplerWindow : public QvisOperatorWindow
void poloialZTiltProcessText();
void toroidalAngleProcessText();
void viewGeometryChanged(int val);
void viewTimeChanged(int val);
void viewDimensionChanged(int val);
void heightPlotScaleProcessText();
void channelPlotOffsetProcessText();
void arrayPlotOffsetProcessText();
void timePlotScaleProcessText();
void channelGeometryChanged(int val);
void radiusProcessText();
// void divergenceProcessText();
......@@ -201,10 +201,11 @@ class QvisLineSamplerWindow : public QvisOperatorWindow
QButtonGroup *viewDimensionButtonGroup;
QWidget *viewGeometry;
QButtonGroup *viewGeometryButtonGroup;
QWidget *viewTime;
QButtonGroup *viewTimeButtonGroup;
QLineEdit *heightPlotScale;
QLineEdit *channelPlotOffset;
QLineEdit *arrayPlotOffset;
QLineEdit *timePlotScale;
QWidget *channelGeometry;
QButtonGroup *channelGeometryButtonGroup;
QLineEdit *radius;
......@@ -261,11 +262,11 @@ class QvisLineSamplerWindow : public QvisOperatorWindow
QLabel *poloialZTiltLabel;
QLabel *toroidalAngleLabel;
QLabel *viewGeometryLabel;
QLabel *viewTimeLabel;
QLabel *viewDimensionLabel;
QLabel *heightPlotScaleLabel;
QLabel *channelPlotOffsetLabel;
QLabel *arrayPlotOffsetLabel;
QLabel *timePlotScaleLabel;
QLabel *channelGeometryLabel;
QLabel *radiusLabel;
// QLabel *divergenceLabel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment