mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
@@ -179,9 +179,7 @@ void RimWellMeasurement::setFilePath( const QString& filePath )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurement::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellMeasurement::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted( proj );
|
||||
|
||||
@@ -196,8 +196,7 @@ void RimWellMeasurementCollection::defineUiOrdering( QString uiConfigName, caf::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
void RimWellMeasurementCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
if ( !m_importedFiles.empty() )
|
||||
{
|
||||
|
||||
@@ -53,9 +53,7 @@ public:
|
||||
void removeMeasurementsForFilePath( RimWellMeasurementFilePath* measurementFilePath );
|
||||
|
||||
protected:
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
|
||||
@@ -85,11 +85,10 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
std::vector<QString> measurementKinds;
|
||||
measurementKinds.push_back( measurementKind() );
|
||||
|
||||
std::vector<RimWellMeasurement*> measurements =
|
||||
RimWellMeasurementFilter::filterMeasurements( measurementCollection->measurements(),
|
||||
*wellPathCollection,
|
||||
*m_wellPath,
|
||||
measurementKinds );
|
||||
std::vector<RimWellMeasurement*> measurements = RimWellMeasurementFilter::filterMeasurements( measurementCollection->measurements(),
|
||||
*wellPathCollection,
|
||||
*m_wellPath,
|
||||
measurementKinds );
|
||||
|
||||
// Extract the values for this measurement kind
|
||||
std::vector<double> values;
|
||||
@@ -112,8 +111,7 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
for ( double measuredDepthValue : measuredDepthValues )
|
||||
{
|
||||
trueVerticalDepthValues.push_back(
|
||||
-rigWellPath->interpolatedPointAlongWellPath( measuredDepthValue ).z() );
|
||||
trueVerticalDepthValues.push_back( -rigWellPath->interpolatedPointAlongWellPath( measuredDepthValue ).z() );
|
||||
}
|
||||
|
||||
bool useLogarithmicScale = false;
|
||||
@@ -202,9 +200,7 @@ RimWellPath* RimWellMeasurementCurve::wellPath() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellMeasurementCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
RimWellLogCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellMeasurement*>
|
||||
RimWellMeasurementFilter::filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& wellPath,
|
||||
const std::vector<QString>& measurementKinds )
|
||||
std::vector<RimWellMeasurement*> RimWellMeasurementFilter::filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& wellPath,
|
||||
const std::vector<QString>& measurementKinds )
|
||||
{
|
||||
std::vector<RimWellMeasurement*> filteredMeasurementsByKinds = filterMeasurements( measurements, measurementKinds );
|
||||
|
||||
@@ -51,14 +50,13 @@ std::vector<RimWellMeasurement*>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellMeasurement*>
|
||||
RimWellMeasurementFilter::filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& wellPath,
|
||||
const std::vector<QString>& measurementKinds,
|
||||
double lowerBound,
|
||||
double upperBound,
|
||||
const std::vector<int>& qualityFilter )
|
||||
std::vector<RimWellMeasurement*> RimWellMeasurementFilter::filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& wellPath,
|
||||
const std::vector<QString>& measurementKinds,
|
||||
double lowerBound,
|
||||
double upperBound,
|
||||
const std::vector<int>& qualityFilter )
|
||||
{
|
||||
std::vector<RimWellMeasurement*> filteredMeasurementsByKindsAndWellPath =
|
||||
filterMeasurements( measurements, wellPathCollection, wellPath, measurementKinds );
|
||||
@@ -79,9 +77,8 @@ std::vector<RimWellMeasurement*>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellMeasurement*>
|
||||
RimWellMeasurementFilter::filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const std::vector<QString>& measurementKinds )
|
||||
std::vector<RimWellMeasurement*> RimWellMeasurementFilter::filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const std::vector<QString>& measurementKinds )
|
||||
{
|
||||
std::vector<RimWellMeasurement*> filteredMeasurements;
|
||||
|
||||
|
||||
@@ -29,20 +29,20 @@ class RimWellMeasurementFilter
|
||||
{
|
||||
public:
|
||||
static std::vector<RimWellMeasurement*> filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& rimWellPath,
|
||||
const std::vector<QString>& measurementKinds );
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& rimWellPath,
|
||||
const std::vector<QString>& measurementKinds );
|
||||
|
||||
static std::vector<RimWellMeasurement*> filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& rimWellPath,
|
||||
const std::vector<QString>& measurementKinds,
|
||||
double lowerBound,
|
||||
double upperBound,
|
||||
const std::vector<int>& qualityFilter );
|
||||
const RimWellPathCollection& wellPathCollection,
|
||||
const RimWellPath& rimWellPath,
|
||||
const std::vector<QString>& measurementKinds,
|
||||
double lowerBound,
|
||||
double upperBound,
|
||||
const std::vector<int>& qualityFilter );
|
||||
|
||||
static std::vector<RimWellMeasurement*> filterMeasurements( const std::vector<RimWellMeasurement*>& measurements,
|
||||
const std::vector<QString>& measurementKinds );
|
||||
const std::vector<QString>& measurementKinds );
|
||||
|
||||
private:
|
||||
RimWellMeasurementFilter();
|
||||
|
||||
@@ -102,8 +102,7 @@ RimWellMeasurementInView::~RimWellMeasurementInView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementInView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
void RimWellMeasurementInView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
uiTreeOrdering.add( &m_legendConfig );
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
@@ -133,9 +132,7 @@ void RimWellMeasurementInView::defineUiOrdering( QString uiConfigName, caf::PdmU
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementInView::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimWellMeasurementInView::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( m_minimumResultValue == cvf::UNDEFINED_DOUBLE || m_maximumResultValue == cvf::UNDEFINED_DOUBLE )
|
||||
{
|
||||
@@ -154,8 +151,7 @@ void RimWellMeasurementInView::defineEditorAttribute( const caf::PdmFieldHandle*
|
||||
|
||||
if ( field == &m_radiusScaleFactor )
|
||||
{
|
||||
caf::PdmUiDoubleValueEditorAttribute* uiDoubleValueEditorAttr =
|
||||
dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
caf::PdmUiDoubleValueEditorAttribute* uiDoubleValueEditorAttr = dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( uiDoubleValueEditorAttr )
|
||||
{
|
||||
uiDoubleValueEditorAttr->m_decimals = 2;
|
||||
@@ -167,9 +163,7 @@ void RimWellMeasurementInView::defineEditorAttribute( const caf::PdmFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimWellMeasurementInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_wells )
|
||||
{
|
||||
@@ -228,7 +222,7 @@ bool RimWellMeasurementInView::updateLegendData()
|
||||
|
||||
if ( hasCategoryResult() )
|
||||
{
|
||||
cvf::Color3ub color = cvf::Color3ub( RimWellMeasurement::mapToColor( measurementKind() ) );
|
||||
cvf::Color3ub color = cvf::Color3ub( RimWellMeasurement::mapToColor( measurementKind() ) );
|
||||
std::vector<std::tuple<QString, int, cvf::Color3ub>> categories;
|
||||
categories.push_back( std::make_tuple( measurementKind(), 0, color ) );
|
||||
m_legendConfig->setCategoryItems( categories );
|
||||
@@ -241,8 +235,7 @@ bool RimWellMeasurementInView::updateLegendData()
|
||||
std::vector<QString> selectedMeasurementKinds;
|
||||
selectedMeasurementKinds.push_back( m_measurementKind );
|
||||
std::vector<RimWellMeasurement*> wellMeasurements =
|
||||
RimWellMeasurementFilter::filterMeasurements( wellMeasurementCollection->measurements(),
|
||||
selectedMeasurementKinds );
|
||||
RimWellMeasurementFilter::filterMeasurements( wellMeasurementCollection->measurements(), selectedMeasurementKinds );
|
||||
|
||||
m_minimumResultValue = HUGE_VAL;
|
||||
m_maximumResultValue = -HUGE_VAL;
|
||||
@@ -269,10 +262,7 @@ bool RimWellMeasurementInView::updateLegendData()
|
||||
}
|
||||
|
||||
m_legendConfig->setTitle( QString( "Well Measurement: \n" ) + selectedMeasurementKinds[0] );
|
||||
m_legendConfig->setAutomaticRanges( m_minimumResultValue,
|
||||
m_maximumResultValue,
|
||||
m_minimumResultValue,
|
||||
m_maximumResultValue );
|
||||
m_legendConfig->setAutomaticRanges( m_minimumResultValue, m_maximumResultValue, m_minimumResultValue, m_maximumResultValue );
|
||||
m_legendConfig->setClosestToZeroValues( posClosestToZero, negClosestToZero, posClosestToZero, negClosestToZero );
|
||||
return true;
|
||||
}
|
||||
@@ -284,14 +274,12 @@ bool RimWellMeasurementInView::updateLegendData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementInView::updateLegendRangesTextAndVisibility( RiuViewer* nativeOrOverrideViewer,
|
||||
bool isUsingOverrideViewer )
|
||||
void RimWellMeasurementInView::updateLegendRangesTextAndVisibility( RiuViewer* nativeOrOverrideViewer, bool isUsingOverrideViewer )
|
||||
{
|
||||
bool addToViewer = updateLegendData();
|
||||
if ( addToViewer )
|
||||
{
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( m_legendConfig->titledOverlayFrame(),
|
||||
isUsingOverrideViewer );
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( m_legendConfig->titledOverlayFrame(), isUsingOverrideViewer );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,7 @@ public:
|
||||
protected:
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
void initAfterRead() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
@@ -83,8 +83,7 @@ std::vector<RimWellMeasurementInView*> RimWellMeasurementInViewCollection::measu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellMeasurementInView*>
|
||||
RimWellMeasurementInViewCollection::visibleMeasurementsForWellPath( const QString& wellName ) const
|
||||
std::vector<RimWellMeasurementInView*> RimWellMeasurementInViewCollection::visibleMeasurementsForWellPath( const QString& wellName ) const
|
||||
{
|
||||
if ( !isChecked() ) return {};
|
||||
|
||||
@@ -110,8 +109,7 @@ std::vector<RimWellMeasurementInView*>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellMeasurementInViewCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
void RimWellMeasurementInViewCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
uiTreeOrdering.add( &m_measurementsInView );
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
@@ -180,8 +178,7 @@ void RimWellMeasurementInViewCollection::syncWithChangesInWellMeasurementCollect
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Get the "in-view" measurement corresponding to a give measurement.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellMeasurementInView*
|
||||
RimWellMeasurementInViewCollection::getWellMeasurementInView( const RimWellMeasurement* measurement ) const
|
||||
RimWellMeasurementInView* RimWellMeasurementInViewCollection::getWellMeasurementInView( const RimWellMeasurement* measurement ) const
|
||||
{
|
||||
for ( RimWellMeasurementInView* wellMeasurementInView : measurements() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user