void QvisSurfacePlotWindow::GetCurrentValues(int which_widget) { bool doAll = (which_widget == -1); double val; // Do the skew factor. if(which_widget == SurfaceAttributes::ID_skewFactor || doAll) { if(LineEditGetDouble(skewLineEdit, val)) surfaceAtts->SetSkewFactor(val); else { ResettingError("skew factor", DoubleToQString(surfaceAtts->GetSkewFactor())); surfaceAtts->SetSkewFactor(surfaceAtts->GetSkewFactor()); } } // Do the coloring minimum value. if(which_widget == SurfaceAttributes::ID_min || doAll) { if(LineEditGetDouble(minLineEdit, val)) surfaceAtts->SetMin(val); else { ResettingError("minimum", DoubleToQString(surfaceAtts->GetMin())); surfaceAtts->SetMin(surfaceAtts->GetMin()); } } // Do the coloring maximum value. if(which_widget == SurfaceAttributes::ID_max || doAll) { if(LineEditGetDouble(maxLineEdit, val)) surfaceAtts->SetMax(val); else { ResettingError("maximum", DoubleToQString(surfaceAtts->GetMax())); surfaceAtts->SetMax(surfaceAtts->GetMax()); } } }
void QvisTensorPlotWindow::GetCurrentValues(int which_widget) { bool doAll = (which_widget == -1); QString msg, temp; // Do the scale value. if(which_widget == TensorAttributes::ID_scale || doAll) { double val; if(LineEditGetDouble(scaleLineEdit, val)) tensorAtts->SetScale(val); else { ResettingError("scale value", DoubleToQString(tensorAtts->GetScale())); tensorAtts->SetScale(tensorAtts->GetScale()); } } // Do the N tensors value. if(which_widget == TensorAttributes::ID_nTensors || doAll) { int val; if(LineEditGetInt(nTensorsLineEdit, val)) tensorAtts->SetNTensors(val); else { ResettingError("number of tensors", IntToQString(tensorAtts->GetNTensors())); tensorAtts->SetNTensors(tensorAtts->GetNTensors()); } } // Do the stride value. if(which_widget == TensorAttributes::ID_stride || doAll) { int val; if(LineEditGetInt(strideLineEdit, val)) tensorAtts->SetStride(val); else { ResettingError("stride", IntToQString(tensorAtts->GetStride())); tensorAtts->SetStride(tensorAtts->GetStride()); } } }
void QvisAppearanceWidget::yAxisTickSpacingProcessText() { int MultiCurve = viewer->GetPlotIndex("MultiCurve"); AttributeSubject *atts = viewer->DelayedState()->GetPlotAttributes(MultiCurve); if(atts != 0) { double val; bool okay = LineEditGetDouble(yAxisTickSpacing, val); if (okay) { atts->SetValue("yAxisTickSpacing", val); atts->Notify(); emit multiCurveChanged(atts); } } }
void QvisLine3DInterface::GetCurrentValues(int which_widget) { bool doAll = (which_widget == -1); if (doAll || which_widget == 0) { double v[3]; if(LineEditGetDoubles(point1Edit, v, 3)) annot->SetPosition(v); else { QString msg = tr("The start point must be specified as a 3D " " coordinate. Resetting to the last good value of %1."). arg(DoublesToQString(annot->GetPosition(), 3)); Error(msg); annot->SetPosition(annot->GetPosition()); } } if (doAll || which_widget == 1) { double v[3]; if(LineEditGetDoubles(point2Edit, v, 3)) annot->SetPosition2(v); else { QString msg = tr("The end point must be specified as a 3D " " coordinate. Resetting to the last good value of %1."). arg(DoublesToQString(annot->GetPosition2(), 3)); Error(msg); annot->SetPosition2(annot->GetPosition2()); } } if (doAll || which_widget == 2) { double v; doubleVector dv = annot->GetDoubleVector1(); if(LineEditGetDouble(arrow1Radius, v)) { dv[0] = v; annot->SetDoubleVector1(dv); } else { QString msg = tr("The radius must be specified as a floating point " "value. Resetting to the last good value of %1."). arg(DoubleToQString(dv[0])); Error(msg); annot->SetDoubleVector1(dv); } } if (doAll || which_widget == 3) { double v; doubleVector dv = annot->GetDoubleVector1(); if(LineEditGetDouble(arrow2Radius, v)) { dv[1] = v; annot->SetDoubleVector1(dv); } else { QString msg = tr("The radius must be specified as a floating point " "value. Resetting to the last good value of %1."). arg(DoubleToQString(dv[1])); Error(msg); annot->SetDoubleVector1(dv); } } if (doAll || which_widget == 4) { double v; doubleVector dv = annot->GetDoubleVector1(); if(LineEditGetDouble(tubeRadius, v)) { dv[3] = v; annot->SetDoubleVector1(dv); } else { QString msg = tr("The radius must be specified as a floating point " "value. Resetting to the last good value of %1."). arg(DoubleToQString(dv[3])); Error(msg); annot->SetDoubleVector1(dv); } } }
void QvisText3DInterface::GetCurrentValues(int which_widget) { bool doAll = (which_widget == -1); if(which_widget == 0 || doAll) { stringVector sv; sv.push_back(textLineEdit->text().toStdString()); annot->SetText(sv); } if(which_widget == 1 || doAll) { double v[3]; if(LineEditGetDoubles(positionEdit, v, 3)) annot->SetPosition(v); else { QString msg = tr("The position must be specified as a 3D coordinate. " "Resetting to the last good value of %1."). arg(DoublesToQString(annot->GetPosition(), 3)); Error(msg); annot->SetPosition(annot->GetPosition()); } } if(which_widget == 2 || doAll) { // Get its new current value and store it in the atts. ForceSpinBoxUpdate(relativeHeightSpinBox); int h = relativeHeightSpinBox->value(); annot->SetRelativeHeight(h); } if(which_widget == 3 || doAll) { double v; bool okay = false; if(LineEditGetDouble(fixedHeightEdit, v)) { okay = v > 0.; if(okay) annot->SetFixedHeight(v); } if (!okay) { QString msg = tr("The fixed height is a floating point number greater than zero. " "Resetting to the last good value of %1."). arg(annot->GetFixedHeight()); Error(msg); annot->SetFixedHeight(annot->GetFixedHeight()); } } if(which_widget == 4 || doAll) { // Get its new current value and store it in the atts. ForceSpinBoxUpdate(rotateZ); int r = rotateZ->value(); double rotations[3]; rotations[0] = annot->GetRotations()[0]; rotations[1] = annot->GetRotations()[1]; rotations[2] = (double)r; annot->SetRotations(rotations); } if(which_widget == 5 || doAll) { // Get its new current value and store it in the atts. ForceSpinBoxUpdate(rotateX); int r = rotateX->value(); double rotations[3]; rotations[0] = (double)r; rotations[1] = annot->GetRotations()[1]; rotations[2] = annot->GetRotations()[2]; annot->SetRotations(rotations); } if(which_widget == 6 || doAll) { // Get its new current value and store it in the atts. ForceSpinBoxUpdate(rotateY); int r = rotateY->value(); double rotations[3]; rotations[0] = annot->GetRotations()[0]; rotations[1] = (double)r; rotations[2] = annot->GetRotations()[2]; annot->SetRotations(rotations); } }