mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix update of fonts in summary and grid cross plot axes
This commit is contained in:
@@ -132,7 +132,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RimGeoMechContourMapViewCollection.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimViewNameConfig.h
|
${CMAKE_CURRENT_LIST_DIR}/RimViewNameConfig.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimScaleLegendConfig.h
|
${CMAKE_CURRENT_LIST_DIR}/RimScaleLegendConfig.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimReloadCaseTools.h
|
${CMAKE_CURRENT_LIST_DIR}/RimReloadCaseTools.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimRiuQwtPlotOwnerInterface.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisPropertiesInterface.h
|
${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisPropertiesInterface.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisProperties.h
|
${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisProperties.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisAnnotation.h
|
${CMAKE_CURRENT_LIST_DIR}/RimPlotAxisAnnotation.h
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ void RimGridCrossPlot::performAutoNameUpdate()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::updateAxisDisplay()
|
void RimGridCrossPlot::updateAxes()
|
||||||
{
|
{
|
||||||
if ( !m_plotWidget ) return;
|
if ( !m_plotWidget ) return;
|
||||||
|
|
||||||
@@ -534,7 +534,7 @@ void RimGridCrossPlot::updatePlot()
|
|||||||
RiuQwtPlotTools::setCommonPlotBehaviour( m_plotWidget );
|
RiuQwtPlotTools::setCommonPlotBehaviour( m_plotWidget );
|
||||||
RiuQwtPlotTools::setDefaultAxes( m_plotWidget );
|
RiuQwtPlotTools::setDefaultAxes( m_plotWidget );
|
||||||
|
|
||||||
updateAxisDisplay();
|
updateAxes();
|
||||||
|
|
||||||
for ( auto dataSet : m_crossPlotDataSets )
|
for ( auto dataSet : m_crossPlotDataSets )
|
||||||
{
|
{
|
||||||
@@ -602,7 +602,7 @@ void RimGridCrossPlot::swapAxes()
|
|||||||
|
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
|
|
||||||
updateAxisDisplay();
|
updateAxes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
#include "RimNameConfig.h"
|
#include "RimNameConfig.h"
|
||||||
#include "RimPlotInterface.h"
|
#include "RimPlotInterface.h"
|
||||||
#include "RimPlotWindow.h"
|
#include "RimPlotWindow.h"
|
||||||
#include "RimRiuQwtPlotOwnerInterface.h"
|
|
||||||
|
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
@@ -123,7 +122,7 @@ protected:
|
|||||||
const QVariant& newValue ) override;
|
const QVariant& newValue ) override;
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly ) override;
|
bool* useOptionsOnly ) override;
|
||||||
void updateAxisDisplay();
|
void updateAxes() override;
|
||||||
void updatePlot();
|
void updatePlot();
|
||||||
|
|
||||||
virtual QString xAxisParameterString() const;
|
virtual QString xAxisParameterString() const;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "RigEquil.h"
|
#include "RigEquil.h"
|
||||||
|
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimRiuQwtPlotOwnerInterface.h"
|
#include "RimPlotInterface.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimViewWindow.h"
|
#include "RimViewWindow.h"
|
||||||
|
|
||||||
@@ -158,11 +158,11 @@ void RimPlotAxisAnnotation::fieldChangedByUi( const caf::PdmFieldHandle* changed
|
|||||||
const QVariant& oldValue,
|
const QVariant& oldValue,
|
||||||
const QVariant& newValue )
|
const QVariant& newValue )
|
||||||
{
|
{
|
||||||
RimRiuQwtPlotOwnerInterface* parentPlot = nullptr;
|
RimPlotInterface* parentPlot = nullptr;
|
||||||
this->firstAncestorOrThisOfType( parentPlot );
|
this->firstAncestorOrThisOfType( parentPlot );
|
||||||
if ( parentPlot )
|
if ( parentPlot )
|
||||||
{
|
{
|
||||||
parentPlot->updateAxisDisplay();
|
parentPlot->updateAxes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "RigStatisticsCalculator.h"
|
#include "RigStatisticsCalculator.h"
|
||||||
|
|
||||||
#include "RimPlotAxisAnnotation.h"
|
#include "RimPlotAxisAnnotation.h"
|
||||||
#include "RimRiuQwtPlotOwnerInterface.h"
|
#include "RimPlotInterface.h"
|
||||||
|
|
||||||
#include "cafPdmUiSliderEditor.h"
|
#include "cafPdmUiSliderEditor.h"
|
||||||
|
|
||||||
@@ -416,17 +416,17 @@ void RimPlotAxisProperties::fieldChangedByUi( const caf::PdmFieldHandle* changed
|
|||||||
m_isAutoZoom = false;
|
m_isAutoZoom = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
RimRiuQwtPlotOwnerInterface* parentPlot = nullptr;
|
RimPlotInterface* parentPlot = nullptr;
|
||||||
this->firstAncestorOrThisOfType( parentPlot );
|
this->firstAncestorOrThisOfType( parentPlot );
|
||||||
if ( parentPlot )
|
if ( parentPlot )
|
||||||
{
|
{
|
||||||
if ( changedField == &isLogarithmicScaleEnabled )
|
if ( changedField == &isLogarithmicScaleEnabled )
|
||||||
{
|
{
|
||||||
parentPlot->updateAxisScaling();
|
parentPlot->loadDataAndUpdate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parentPlot->updateAxisDisplay();
|
parentPlot->updateAxes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public:
|
|||||||
|
|
||||||
virtual void setAutoScaleXEnabled( bool enabled ) = 0;
|
virtual void setAutoScaleXEnabled( bool enabled ) = 0;
|
||||||
virtual void setAutoScaleYEnabled( bool enabled ) = 0;
|
virtual void setAutoScaleYEnabled( bool enabled ) = 0;
|
||||||
|
virtual void updateAxes() = 0;
|
||||||
|
|
||||||
virtual void updateZoomInQwt() = 0;
|
virtual void updateZoomInQwt() = 0;
|
||||||
virtual void updateZoomFromQwt() = 0;
|
virtual void updateZoomFromQwt() = 0;
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Copyright (C) 2019- Equinor ASA
|
|
||||||
//
|
|
||||||
// ResInsight is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
||||||
// for more details.
|
|
||||||
//
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "RiaFontCache.h"
|
|
||||||
#include "RimViewWindow.h"
|
|
||||||
|
|
||||||
namespace caf
|
|
||||||
{
|
|
||||||
class PdmObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
class QwtPlotCurve;
|
|
||||||
|
|
||||||
class RimRiuQwtPlotOwnerInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void detachAllCurves() = 0;
|
|
||||||
virtual void updateAxisScaling() = 0;
|
|
||||||
virtual void updateAxisDisplay() = 0;
|
|
||||||
virtual void updateZoomWindowFromQwt() = 0;
|
|
||||||
virtual void selectAxisInPropertyEditor( int axis ) = 0;
|
|
||||||
virtual void setAutoZoomForAllAxes( bool enableAutoZoom ) = 0;
|
|
||||||
|
|
||||||
virtual caf::PdmObject* findRimPlotObjectFromQwtCurve( const QwtPlotCurve* curve ) const = 0;
|
|
||||||
};
|
|
||||||
@@ -923,6 +923,14 @@ void RimWellLogTrack::onAxisSelected( int axis, bool toggle )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::updateAxes()
|
||||||
|
{
|
||||||
|
updateXZoom();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -202,6 +202,8 @@ public:
|
|||||||
|
|
||||||
void onAxisSelected( int axis, bool toggle ) override;
|
void onAxisSelected( int axis, bool toggle ) override;
|
||||||
|
|
||||||
|
void updateAxes() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void calculateXZoomRange();
|
void calculateXZoomRange();
|
||||||
void calculateYZoomRange();
|
void calculateYZoomRange();
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
#include "RimPlotInterface.h"
|
#include "RimPlotInterface.h"
|
||||||
#include "RimPlotWindow.h"
|
#include "RimPlotWindow.h"
|
||||||
#include "RimRiuQwtPlotOwnerInterface.h"
|
|
||||||
|
|
||||||
#include "qwt_plot_textlabel.h"
|
#include "qwt_plot_textlabel.h"
|
||||||
|
|
||||||
@@ -105,7 +104,7 @@ public:
|
|||||||
void reattachAllCurves();
|
void reattachAllCurves();
|
||||||
void updateCaseNameHasChanged();
|
void updateCaseNameHasChanged();
|
||||||
|
|
||||||
void updateAxes();
|
void updateAxes() override;
|
||||||
|
|
||||||
bool isLogarithmicScaleEnabled( RiaDefines::PlotAxis plotAxis ) const;
|
bool isLogarithmicScaleEnabled( RiaDefines::PlotAxis plotAxis ) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user