예제 #1
0
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
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
QvisKeyframeWindow::GetCurrentValues(int which_widget)
{
    bool doAll = (which_widget == -1);
    QString msg, temp;

    // Do nFrames
    if(which_widget == KeyframeAttributes::ID_nFrames || doAll)
    {
        int val;
        if(LineEditGetInt(nFrames, val))
            GetViewerMethods()->AnimationSetNFrames(val);
        else
        {
            ResettingError("number of frames", IntToQString(kfAtts->GetNFrames()));
            Message(msg);
            GetViewerMethods()->AnimationSetNFrames(kfAtts->GetNFrames());
        }
    }
}