示例#1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
    if (changedField == &m_showWindow)
    {
        if (m_showWindow)
        {
            loadDataAndUpdate();
        }
        else
        {
            updateViewerWidget();
        }

        uiCapability()->updateUiIconFromToggleField();
    }
    else if (changedField == &m_minVisibleDepth || changedField == &m_maxVisibleDepth)
    {
        applyDepthZoomFromVisibleDepth();

        m_isAutoScaleDepthEnabled = false;
    }
    else if (changedField == &m_isAutoScaleDepthEnabled)
    {
        updateDepthZoom();
    }
    else if (changedField == &m_userName)
    {
        updateViewerWidgetWindowTitle();
    }
    if (changedField == &m_depthType ||
        changedField == &m_depthUnit)
    {
        updateTracks();
    }
}
示例#2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
    if (changedField == &m_showCurve)
    {
        this->updateCurveVisibility(true);
        if (m_showCurve()) loadDataAndUpdate(true);
    }
    else if (changedField == &m_curveName)
    {
        m_customCurveName = m_curveName;
        updateCurveNameAndUpdatePlotLegendAndTitle();
    }
    else if (&m_curveColor == changedField
             || &m_curveThickness == changedField
             || &m_pointSymbol == changedField
             || &m_lineStyle == changedField
             || &m_symbolSkipPixelDistance == changedField
             || &m_curveInterpolation == changedField
             || &m_symbolSize == changedField
             || &m_symbolEdgeColor == changedField)
    {
        updateCurveAppearance();

        if (&m_pointSymbol == changedField)
        {
            m_symbolSize.uiCapability()->setUiReadOnly(m_pointSymbol() == RiuQwtSymbol::SYMBOL_NONE);
            m_symbolSkipPixelDistance.uiCapability()->setUiReadOnly(m_pointSymbol() == RiuQwtSymbol::SYMBOL_NONE);
        }
        else if (&m_lineStyle == changedField)
        {
            m_curveThickness.uiCapability()->setUiReadOnly(m_lineStyle() == RiuQwtPlotCurve::STYLE_NONE);
            m_curveInterpolation.uiCapability()->setUiReadOnly(m_lineStyle() == RiuQwtPlotCurve::STYLE_NONE);
        }
    }
    else if (changedField == &m_isUsingAutoName)
    {
        if (!m_isUsingAutoName)
        {
            m_customCurveName = createCurveAutoName();
        }

        updateCurveNameAndUpdatePlotLegendAndTitle();
    }
    else if (changedField == &m_showLegend)
    {
        updateLegendEntryVisibilityAndPlotLegend();
    }
    else if (changedField == &m_showErrorBars)
    {
        m_qwtPlotCurve->showErrorBars(m_showErrorBars);
        updateCurveAppearance();
    }
    RiuPlotMainWindowTools::refreshToolbars();
    if (m_parentQwtPlot) m_parentQwtPlot->replot();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEnsembleCurveSetCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
                                                     const QVariant&            oldValue,
                                                     const QVariant&            newValue)
{
    if (changedField == &m_showCurves)
    {
        loadDataAndUpdate(true);

        RimSummaryPlot* summaryPlot = nullptr;
        this->firstAncestorOrThisOfTypeAsserted(summaryPlot);
        summaryPlot->updateConnectedEditors();
    }
}
示例#4
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
    if (changedField == &m_showCurve)
    {
        this->updateCurveVisibility(true);
        if (m_showCurve()) loadDataAndUpdate(true);
    }
    else if (changedField == &m_curveName)
    {
        m_customCurveName = m_curveName;
        updateCurveNameAndUpdatePlotLegend();
    }
    else if (&m_curveColor == changedField
             || &m_curveThickness == changedField
             || &m_pointSymbol == changedField
             || &m_lineStyle == changedField
             || &m_symbolSkipPixelDistance == changedField
             || &m_curveInterpolation == changedField)
    {
        updateCurveAppearance();
    }
    else if (changedField == &m_isUsingAutoName)
    {
        if (!m_isUsingAutoName)
        {
            m_customCurveName = createCurveAutoName();
        }

        updateCurveNameAndUpdatePlotLegend();
    }
    else if (changedField == &m_showLegend)
    {
        updateLegendEntryVisibilityAndPlotLegend();
    }

    if (m_parentQwtPlot) m_parentQwtPlot->replot();
}