Janitor : Apply clang-format fixes on codebase in ApplicationCode

This commit is contained in:
Magne Sjaastad
2019-11-04 11:34:34 +01:00
parent c5e3bc6898
commit 96a26662fc
77 changed files with 2339 additions and 2402 deletions

View File

@@ -646,7 +646,7 @@ std::map<QString, std::vector<RigCompletionData>>
auto it = completions.find( gridName );
if ( it == completions.end() )
{
completions.insert( std::pair<QString, std::vector<RigCompletionData>>( gridName, { completion } ) );
completions.insert( std::pair<QString, std::vector<RigCompletionData>>( gridName, {completion} ) );
}
else
{
@@ -722,19 +722,19 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile( RimEclips
RifTextDataTableFormatter formatter( stream );
formatter.setColumnSpacing( 2 );
std::vector<RifTextDataTableColumn> header = { RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "Grp" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "RefDepth" ),
RifTextDataTableColumn( "Type" ),
RifTextDataTableColumn( "DrainRad" ),
RifTextDataTableColumn( "GasInEq" ),
RifTextDataTableColumn( "AutoShut" ),
RifTextDataTableColumn( "XFlow" ),
RifTextDataTableColumn( "FluidPVT" ),
RifTextDataTableColumn( "HydSDens" ),
RifTextDataTableColumn( "FluidInPlReg" ) };
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "Grp" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "RefDepth" ),
RifTextDataTableColumn( "Type" ),
RifTextDataTableColumn( "DrainRad" ),
RifTextDataTableColumn( "GasInEq" ),
RifTextDataTableColumn( "AutoShut" ),
RifTextDataTableColumn( "XFlow" ),
RifTextDataTableColumn( "FluidPVT" ),
RifTextDataTableColumn( "HydSDens" ),
RifTextDataTableColumn( "FluidInPlReg" )};
formatter.keyword( "WELSPECS" );
formatter.header( header );
@@ -787,20 +787,20 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
RifTextDataTableFormatter formatter( stream );
formatter.setColumnSpacing( 2 );
std::vector<RifTextDataTableColumn> header = { RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "Grp" ),
RifTextDataTableColumn( "LGR" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "RefDepth" ),
RifTextDataTableColumn( "Type" ),
RifTextDataTableColumn( "DrainRad" ),
RifTextDataTableColumn( "GasInEq" ),
RifTextDataTableColumn( "AutoShut" ),
RifTextDataTableColumn( "XFlow" ),
RifTextDataTableColumn( "FluidPVT" ),
RifTextDataTableColumn( "HydSDens" ),
RifTextDataTableColumn( "FluidInPlReg" ) };
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "Grp" ),
RifTextDataTableColumn( "LGR" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "RefDepth" ),
RifTextDataTableColumn( "Type" ),
RifTextDataTableColumn( "DrainRad" ),
RifTextDataTableColumn( "GasInEq" ),
RifTextDataTableColumn( "AutoShut" ),
RifTextDataTableColumn( "XFlow" ),
RifTextDataTableColumn( "FluidPVT" ),
RifTextDataTableColumn( "HydSDens" ),
RifTextDataTableColumn( "FluidInPlReg" )};
formatter.keyword( "WELSPECL" );
formatter.header( header );
@@ -965,45 +965,45 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
if ( gridName.isEmpty() )
{
header =
{ RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K1" ),
RifTextDataTableColumn( "K2" ),
RifTextDataTableColumn( "Status" ),
RifTextDataTableColumn( "SAT" ),
RifTextDataTableColumn( "TR",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIAM" ),
RifTextDataTableColumn( "KH",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "S" ),
RifTextDataTableColumn( "Df",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIR" ) };
{RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K1" ),
RifTextDataTableColumn( "K2" ),
RifTextDataTableColumn( "Status" ),
RifTextDataTableColumn( "SAT" ),
RifTextDataTableColumn( "TR",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIAM" ),
RifTextDataTableColumn( "KH",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "S" ),
RifTextDataTableColumn( "Df",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIR" )};
formatter.keyword( "COMPDAT" );
}
else
{
header =
{ RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "LgrName" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K1" ),
RifTextDataTableColumn( "K2" ),
RifTextDataTableColumn( "Status" ),
RifTextDataTableColumn( "SAT" ),
RifTextDataTableColumn( "TR",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIAM" ),
RifTextDataTableColumn( "KH",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "S" ),
RifTextDataTableColumn( "Df",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIR" ) };
{RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "LgrName" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K1" ),
RifTextDataTableColumn( "K2" ),
RifTextDataTableColumn( "Status" ),
RifTextDataTableColumn( "SAT" ),
RifTextDataTableColumn( "TR",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIAM" ),
RifTextDataTableColumn( "KH",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "S" ),
RifTextDataTableColumn( "Df",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
RifTextDataTableColumn( "DIR" )};
formatter.keyword( "COMPDATL" );
}
@@ -1270,7 +1270,7 @@ void RicWellPathExportCompletionDataFeatureImpl::appendCompletionData(
{
completionData->insert(
std::pair<size_t, std::vector<RigCompletionData>>( completion.completionDataGridCell().globalCellIndex(),
std::vector<RigCompletionData>{ completion } ) );
std::vector<RigCompletionData>{completion} ) );
}
}
}

View File

@@ -335,15 +335,13 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
}
{
generateWelsegsSegments( formatter, exportInfo, {RigCompletionData::FISHBONES_ICD, RigCompletionData::FISHBONES} );
generateWelsegsSegments( formatter, exportInfo, {RigCompletionData::FRACTURE} );
generateWelsegsSegments( formatter,
exportInfo,
{ RigCompletionData::FISHBONES_ICD, RigCompletionData::FISHBONES } );
generateWelsegsSegments( formatter, exportInfo, { RigCompletionData::FRACTURE } );
generateWelsegsSegments( formatter,
exportInfo,
{ RigCompletionData::PERFORATION_ICD,
RigCompletionData::PERFORATION_ICV,
RigCompletionData::PERFORATION_AICD } );
{RigCompletionData::PERFORATION_ICD,
RigCompletionData::PERFORATION_ICV,
RigCompletionData::PERFORATION_AICD} );
}
formatter.tableCompleted();
@@ -476,8 +474,8 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegTables( RifTextDataTabl
*/
{
std::set<RigCompletionData::CompletionType> fishbonesTypes = { RigCompletionData::FISHBONES_ICD,
RigCompletionData::FISHBONES };
std::set<RigCompletionData::CompletionType> fishbonesTypes = {RigCompletionData::FISHBONES_ICD,
RigCompletionData::FISHBONES};
generateCompsegTable( formatter, exportInfo, false, fishbonesTypes );
if ( exportInfo.hasSubGridIntersections() )
{
@@ -486,7 +484,7 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegTables( RifTextDataTabl
}
{
std::set<RigCompletionData::CompletionType> fractureTypes = { RigCompletionData::FRACTURE };
std::set<RigCompletionData::CompletionType> fractureTypes = {RigCompletionData::FRACTURE};
generateCompsegTable( formatter, exportInfo, false, fractureTypes );
if ( exportInfo.hasSubGridIntersections() )
{
@@ -495,10 +493,10 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegTables( RifTextDataTabl
}
{
std::set<RigCompletionData::CompletionType> perforationTypes = { RigCompletionData::PERFORATION,
RigCompletionData::PERFORATION_ICD,
RigCompletionData::PERFORATION_ICV,
RigCompletionData::PERFORATION_AICD };
std::set<RigCompletionData::CompletionType> perforationTypes = {RigCompletionData::PERFORATION,
RigCompletionData::PERFORATION_ICD,
RigCompletionData::PERFORATION_ICV,
RigCompletionData::PERFORATION_AICD};
generateCompsegTable( formatter, exportInfo, false, perforationTypes );
if ( exportInfo.hasSubGridIntersections() )
{
@@ -602,7 +600,7 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegHeader( RifTextDataTabl
}
{
std::vector<RifTextDataTableColumn> header = { RifTextDataTableColumn( "Name" ) };
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "Name" )};
formatter.header( header );
formatter.add( exportInfo.wellPath()->completions()->wellNameForExport() );
formatter.rowCompleted();
@@ -615,15 +613,15 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegHeader( RifTextDataTabl
allHeaders.push_back( RifTextDataTableColumn( "Grid" ) );
}
std::vector<RifTextDataTableColumn> commonHeaders = { RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K" ),
RifTextDataTableColumn( "Branch no" ),
RifTextDataTableColumn( "Start Length" ),
RifTextDataTableColumn( "End Length" ),
RifTextDataTableColumn( "Dir Pen" ),
RifTextDataTableColumn( "End Range" ),
RifTextDataTableColumn( "Connection Depth" ) };
std::vector<RifTextDataTableColumn> commonHeaders = {RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K" ),
RifTextDataTableColumn( "Branch no" ),
RifTextDataTableColumn( "Start Length" ),
RifTextDataTableColumn( "End Length" ),
RifTextDataTableColumn( "Dir Pen" ),
RifTextDataTableColumn( "End Range" ),
RifTextDataTableColumn( "Connection Depth" )};
allHeaders.insert( allHeaders.end(), commonHeaders.begin(), commonHeaders.end() );
formatter.header( allHeaders );
}
@@ -711,27 +709,27 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
if ( !foundValve )
{
std::vector<QString> columnDescriptions =
{ "Well Name",
"Segment Number",
"Segment Number",
"Strength of AICD",
"Length of AICD",
"Density of Calibration Fluid",
"Viscosity of Calibration Fluid",
"Critical water in liquid fraction for emulsions viscosity model",
"Emulsion viscosity transition region",
"Max ratio of emulsion viscosity to continuous phase viscosity",
"Flow scaling factor method",
"Maximum flowrate for AICD device",
"Volume flow rate exponent, x",
"Viscosity function exponent, y",
"Device OPEN/SHUT",
"Exponent of the oil flowing fraction in the density mixture calculation",
"Exponent of the water flowing fraction in the density mixture calculation",
"Exponent of the gas flowing fraction in the density mixture calculation",
"Exponent of the oil flowing fraction in the density viscosity calculation",
"Exponent of the water flowing fraction in the density viscosity calculation",
"Exponent of the gas flowing fraction in the density viscosity calculation" };
{"Well Name",
"Segment Number",
"Segment Number",
"Strength of AICD",
"Length of AICD",
"Density of Calibration Fluid",
"Viscosity of Calibration Fluid",
"Critical water in liquid fraction for emulsions viscosity model",
"Emulsion viscosity transition region",
"Max ratio of emulsion viscosity to continuous phase viscosity",
"Flow scaling factor method",
"Maximum flowrate for AICD device",
"Volume flow rate exponent, x",
"Viscosity function exponent, y",
"Device OPEN/SHUT",
"Exponent of the oil flowing fraction in the density mixture calculation",
"Exponent of the water flowing fraction in the density mixture calculation",
"Exponent of the gas flowing fraction in the density mixture calculation",
"Exponent of the oil flowing fraction in the density viscosity calculation",
"Exponent of the water flowing fraction in the density viscosity calculation",
"Exponent of the gas flowing fraction in the density viscosity calculation"};
tighterFormatter.keyword( "WSEGAICD" );
tighterFormatter.comment( "Column Overview:" );
@@ -1011,7 +1009,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
RicExportFractureCompletionsImpl::generateCompdatValues( caseToApply,
wellPath->completions()->wellNameForExport(),
wellPath->wellPathGeometry(),
{ fracture },
{fracture},
nullptr,
nullptr );

View File

@@ -164,7 +164,7 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
QString fileName = dirPath.absoluteFilePath( keyword + ".GRDECL" );
bool worked = RifEclipseInputFileTools::exportKeywords( fileName,
view->eclipseCase()->eclipseCaseData(),
{ keyword },
{keyword},
fileWriteMode,
min,
max,

View File

@@ -136,8 +136,8 @@ class IjkBoundingBox
public:
IjkBoundingBox()
: m_min( { MAX_SIZE_T, MAX_SIZE_T, MAX_SIZE_T } )
, m_max( { MAX_SIZE_T, MAX_SIZE_T, MAX_SIZE_T } )
: m_min( {MAX_SIZE_T, MAX_SIZE_T, MAX_SIZE_T} )
, m_max( {MAX_SIZE_T, MAX_SIZE_T, MAX_SIZE_T} )
{
}
@@ -172,7 +172,7 @@ public:
{
if ( !isValid() )
{
m_min = m_max = { i, j, k };
m_min = m_max = {i, j, k};
}
else
{
@@ -370,16 +370,16 @@ void RicExportLgrFeature::writeLgrs( QTextStream& stream, const std::vector<LgrI
RifTextDataTableFormatter formatter( stream );
formatter.comment( QString( "LGR: " ) + lgrInfo.name );
formatter.keyword( "CARFIN" );
formatter.header( { RifTextDataTableColumn( "Name" ),
RifTextDataTableColumn( "I1" ),
RifTextDataTableColumn( "I2" ),
RifTextDataTableColumn( "J1" ),
RifTextDataTableColumn( "J2" ),
RifTextDataTableColumn( "K1" ),
RifTextDataTableColumn( "K2" ),
RifTextDataTableColumn( "NX" ),
RifTextDataTableColumn( "NY" ),
RifTextDataTableColumn( "NZ" ) } );
formatter.header( {RifTextDataTableColumn( "Name" ),
RifTextDataTableColumn( "I1" ),
RifTextDataTableColumn( "I2" ),
RifTextDataTableColumn( "J1" ),
RifTextDataTableColumn( "J2" ),
RifTextDataTableColumn( "K1" ),
RifTextDataTableColumn( "K2" ),
RifTextDataTableColumn( "NX" ),
RifTextDataTableColumn( "NY" ),
RifTextDataTableColumn( "NZ" )} );
formatter.add( lgrInfo.name );
formatter.addOneBasedCellIndex( lgrInfo.mainGridStartCell.i() );
@@ -553,7 +553,7 @@ std::vector<LgrInfo>
for ( const auto& intersectionCell : intersectingCells )
{
auto lgrName = lgrNameFactory.newName( "", lgrId );
lgrs.push_back( buildLgr( lgrId++, lgrName, eclipseCase, wellPath->name(), { intersectionCell }, lgrSizes ) );
lgrs.push_back( buildLgr( lgrId++, lgrName, eclipseCase, wellPath->name(), {intersectionCell}, lgrSizes ) );
}
return lgrs;
}
@@ -944,9 +944,9 @@ const RigGridBase* RicExportLgrFeature::hostGrid( const RigMainGrid* mainGrid, s
//--------------------------------------------------------------------------------------------------
LgrNameFactory::LgrNameFactory()
{
m_counters = { { RigCompletionData::FRACTURE, { "FRAC", 1 } },
{ RigCompletionData::FISHBONES, { "FB", 1 } },
{ RigCompletionData::PERFORATION, { "PERF", 1 } } };
m_counters = {{RigCompletionData::FRACTURE, {"FRAC", 1}},
{RigCompletionData::FISHBONES, {"FB", 1}},
{RigCompletionData::PERFORATION, {"PERF", 1}}};
}
//--------------------------------------------------------------------------------------------------

View File

@@ -136,10 +136,10 @@ bool RicBoxManipulatorEventHandler::eventFilter( QObject* obj, QEvent* inputEven
{
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( inputEvent );
cvf::ref<cvf::RayIntersectSpec> rayIS =
viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(), mouseEvent->pos().y() );
cvf::ref<cvf::RayIntersectSpec> rayIS = viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(),
mouseEvent->pos().y() );
if (rayIS.notNull())
if ( rayIS.notNull() )
{
m_partManager->updateManipulatorFromRay( rayIS->ray() );

View File

@@ -52,7 +52,7 @@ public:
explicit RicBoxManipulatorEventHandler( caf::Viewer* viewer );
~RicBoxManipulatorEventHandler() override;
void registerInAdditionalViewer( caf::Viewer* viewer);
void registerInAdditionalViewer( caf::Viewer* viewer );
void setOrigin( const cvf::Vec3d& origin );
void setSize( const cvf::Vec3d& size );
@@ -67,7 +67,7 @@ protected:
bool eventFilter( QObject* obj, QEvent* event ) override;
private:
QPointer<caf::Viewer> m_viewer;
QPointer<caf::Viewer> m_viewer;
std::vector<QPointer<caf::Viewer>> m_otherViewers;
cvf::ref<caf::BoxManipulatorPartManager> m_partManager;

View File

@@ -51,7 +51,7 @@ bool RicIntersectionBoxAtPosFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
{
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( activeMainOrComparisonView )
{
@@ -70,7 +70,7 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox, false );
activeMainOrComparisonView->showGridCells(false);
activeMainOrComparisonView->showGridCells( false );
RiuMainWindow::instance()->refreshDrawStyleActions();
activeView->scheduleCreateDisplayModelAndRedraw();

View File

@@ -53,7 +53,8 @@ bool RicIntersectionBoxXSliceFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicIntersectionBoxXSliceFeature::onActionTriggered( bool isChecked )
{
RicIntersectionFeatureImpl::createIntersectionBoxSlize("X-slice (Intersection box)", RimIntersectionBox::PLANE_STATE_X);
RicIntersectionFeatureImpl::createIntersectionBoxSlize( "X-slice (Intersection box)",
RimIntersectionBox::PLANE_STATE_X );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -53,7 +53,8 @@ bool RicIntersectionBoxYSliceFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicIntersectionBoxYSliceFeature::onActionTriggered( bool isChecked )
{
RicIntersectionFeatureImpl::createIntersectionBoxSlize("Y-slice (Intersection box)", RimIntersectionBox::PLANE_STATE_Y);
RicIntersectionFeatureImpl::createIntersectionBoxSlize( "Y-slice (Intersection box)",
RimIntersectionBox::PLANE_STATE_Y );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -53,7 +53,8 @@ bool RicIntersectionBoxZSliceFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicIntersectionBoxZSliceFeature::onActionTriggered( bool isChecked )
{
RicIntersectionFeatureImpl::createIntersectionBoxSlize("Z-slice (Intersection box)", RimIntersectionBox::PLANE_STATE_Z);
RicIntersectionFeatureImpl::createIntersectionBoxSlize( "Z-slice (Intersection box)",
RimIntersectionBox::PLANE_STATE_Z );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -28,18 +28,19 @@
#include "RiuViewerCommands.h"
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RicIntersectionFeatureImpl::createIntersectionBoxSlize(const QString& name, RimIntersectionBox::SinglePlaneState plane)
void RicIntersectionFeatureImpl::createIntersectionBoxSlize( const QString& name,
RimIntersectionBox::SinglePlaneState plane )
{
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( activeMainOrComparisonView )
{
RimIntersectionCollection* coll = activeMainOrComparisonView->crossSectionCollection();
CVF_ASSERT( coll );
cvf::Vec3d domainCoord = activeView->viewer()->viewerCommands()->lastPickPositionInDomainCoords();
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
@@ -49,7 +50,7 @@ void RicIntersectionFeatureImpl::createIntersectionBoxSlize(const QString& name,
intersectionBox->setToDefaultSizeSlice( plane, domainCoord );
coll->updateConnectedEditors();
activeMainOrComparisonView->showGridCells(false);
activeMainOrComparisonView->showGridCells( false );
activeMainOrComparisonView->scheduleCreateDisplayModelAndRedraw();
activeView->scheduleCreateDisplayModelAndRedraw();

View File

@@ -24,6 +24,6 @@ class QString;
class RicIntersectionFeatureImpl
{
public :
static void createIntersectionBoxSlize(const QString& name, RimIntersectionBox::SinglePlaneState plane );
public:
static void createIntersectionBoxSlize( const QString& name, RimIntersectionBox::SinglePlaneState plane );
};

View File

@@ -21,9 +21,9 @@
#include "RiaGuiApplication.h"
#include "Rim3dView.h"
#include "RimGridView.h"
#include "RimMeasurement.h"
#include "RimProject.h"
#include "RimGridView.h"
#include "cafCmdFeatureManager.h"
#include "cafPdmUiPropertyViewDialog.h"
@@ -124,7 +124,7 @@ Rim3dView* RicToggleMeasurementModeFeature::activeView() const
{
RiaApplication* app = RiaApplication::instance();
CAF_ASSERT( app );
auto view = dynamic_cast<Rim3dView*>(app->activeMainOrComparisonGridView());
auto view = dynamic_cast<Rim3dView*>( app->activeMainOrComparisonGridView() );
return view;
}

View File

@@ -68,7 +68,7 @@ void RicGeoMechPropertyFilterFeatureImpl::addPropertyFilter( RimGeoMechPropertyF
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter , false);
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter, false );
}
//--------------------------------------------------------------------------------------------------
@@ -85,7 +85,7 @@ void RicGeoMechPropertyFilterFeatureImpl::insertPropertyFilter( RimGeoMechProper
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter , false);
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter, false );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -68,11 +68,11 @@ bool RicSelectColorResult::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicSelectColorResult::onActionTriggered( bool isChecked )
{
Rim3dView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
bool isComparisonView = (activeView != RiaApplication::instance()->activeGridView());
Rim3dView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
bool isComparisonView = ( activeView != RiaApplication::instance()->activeGridView() );
Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( activeView );
RimGridView* gridView = nullptr;
Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( activeView );
RimGridView* gridView = nullptr;
if ( int2dView )
gridView = gridViewFrom2dIntersectionView( int2dView );

View File

@@ -287,7 +287,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
QStringList gridFileNames;
QString ensembleColoringParameter;
std::set<QString> validOptions = { "-help", "-h", "-nl", "-s", "-n", "-e", "-c", "-cl" };
std::set<QString> validOptions = {"-help", "-h", "-nl", "-s", "-n", "-e", "-c", "-cl"};
for ( int optionIdx = 0; optionIdx < arguments.size(); ++optionIdx )
{

View File

@@ -44,9 +44,9 @@ void RicCompareTo3dViewFeature::onActionTriggered( bool isChecked )
RimGridView* activeView = RiaApplication::instance()->activeGridView();
QVariant userData = this->userData();
auto view = static_cast<Rim3dView*>(userData.value<void*>());
auto view = static_cast<Rim3dView*>( userData.value<void*>() );
if (view && activeView)
if ( view && activeView )
{
activeView->setComparisonView( view );
activeView->scheduleCreateDisplayModelAndRedraw();
@@ -60,15 +60,13 @@ void RicCompareTo3dViewFeature::setupActionLook( QAction* actionToSetup )
{
QVariant userData = actionToSetup->data();
auto view = static_cast<Rim3dView*>(userData.value<void*>());
auto view = static_cast<Rim3dView*>( userData.value<void*>() );
if ( view )
{
actionToSetup->setIcon(view->uiIconProvider().icon() );
actionToSetup->setIcon( view->uiIconProvider().icon() );
}
else
{
actionToSetup->setIcon(QIcon(":/ComparisonView16x16.png"));
actionToSetup->setIcon( QIcon( ":/ComparisonView16x16.png" ) );
}
}

View File

@@ -33,5 +33,3 @@ protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};

View File

@@ -103,7 +103,10 @@ public:
RicLinkVisibleViewsFeature::linkViews( m_viewsToLink );
}
const std::vector<RimGridView*>& viewsToLink() { return m_viewsToLink;}
const std::vector<RimGridView*>& viewsToLink()
{
return m_viewsToLink;
}
private:
std::vector<RimGridView*> m_viewsToLink;
@@ -138,7 +141,6 @@ void RicLinkViewFeature::setupActionLook( QAction* actionToSetup )
RicLinkViewFeatureImpl cmdImpl;
cmdImpl.prepareToExecute();
if ( cmdImpl.viewsToLink().size() >= 2u )
{
actionToSetup->setText( "Link Selected Views" );
@@ -147,13 +149,13 @@ void RicLinkViewFeature::setupActionLook( QAction* actionToSetup )
else
{
actionToSetup->setText( "Link View" );
if (RiaApplication::instance()->project()->viewLinkerCollection()->viewLinker())
if ( RiaApplication::instance()->project()->viewLinkerCollection()->viewLinker() )
{
actionToSetup->setIcon(QIcon(":/ControlledView16x16.png"));
actionToSetup->setIcon( QIcon( ":/ControlledView16x16.png" ) );
}
else
{
actionToSetup->setIcon(QIcon(":/MasterView16x16.png"));
actionToSetup->setIcon( QIcon( ":/MasterView16x16.png" ) );
}
}
}

View File

@@ -85,5 +85,3 @@ void RicRemoveComparison3dViewFeature::setupActionLook( QAction* actionToSetup )
actionToSetup->setText( "Remove Comparison" );
actionToSetup->setIcon( QIcon( ":/RemoveComparisonView16x16.png" ) );
}

View File

@@ -33,5 +33,3 @@ protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};

View File

@@ -30,8 +30,8 @@
#include "cafCmdFeatureManager.h"
#include "cafSelectionManager.h"
#include <QAction>
#include "RimViewLinkerCollection.h"
#include <QAction>
CAF_CMD_SOURCE_INIT( RicUnLinkViewFeature, "RicUnLinkViewFeature" );
@@ -68,7 +68,8 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
{
viewController->applyRangeFilterCollectionByUserChoice();
delete viewController;
viewLinker->removeViewController( nullptr ); // Remove the slots in the vector that was set to nullptr by the destructor
viewLinker->removeViewController(
nullptr ); // Remove the slots in the vector that was set to nullptr by the destructor
}
else if ( viewLinker )
{
@@ -78,7 +79,7 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
if ( firstControlledView )
{
viewLinker->setMasterView(firstControlledView);
viewLinker->setMasterView( firstControlledView );
viewLinker->updateDependentViews();
}
@@ -86,7 +87,7 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
{
// Remove the view linker object from the view linker collection
// viewLinkerCollection->viewLinker is a PdmChildField containing one RimViewLinker child object
RiaApplication::instance()->project()->viewLinkerCollection->viewLinker.removeChildObject(viewLinker);
RiaApplication::instance()->project()->viewLinkerCollection->viewLinker.removeChildObject( viewLinker );
delete viewLinker;
}

View File

@@ -237,7 +237,7 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
paramCurvesTrack->setChecked( false );
std::vector<QString> resultNames = RiaDefines::wellPathStabilityParameterNames();
std::vector<cvf::Color3f> colors = { cvf::Color3f::CRIMSON, cvf::Color3f::DARK_YELLOW };
std::vector<cvf::Color3f> colors = {cvf::Color3f::CRIMSON, cvf::Color3f::DARK_YELLOW};
for ( size_t i = 0; i < resultNames.size(); ++i )
{
@@ -283,11 +283,11 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
std::vector<QString> resultNames = RiaDefines::wellPathStabilityResultNames();
std::vector<cvf::Color3f> colors = { cvf::Color3f::BLUE,
cvf::Color3f::BROWN,
cvf::Color3f::RED,
cvf::Color3f::PURPLE,
cvf::Color3f::DARK_GREEN };
std::vector<cvf::Color3f> colors = {cvf::Color3f::BLUE,
cvf::Color3f::BROWN,
cvf::Color3f::RED,
cvf::Color3f::PURPLE,
cvf::Color3f::DARK_GREEN};
for ( size_t i = 0; i < resultNames.size(); ++i )
{
@@ -327,9 +327,9 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
const double angleIncrement = 90.0;
std::vector<QString> resultNames = RiaDefines::wellPathAngleResultNames();
std::vector<cvf::Color3f> colors = { cvf::Color3f::GREEN, cvf::Color3f::ORANGE };
std::vector<cvf::Color3f> colors = {cvf::Color3f::GREEN, cvf::Color3f::ORANGE};
std::vector<RiuQwtPlotCurve::LineStyleEnum> lineStyles = { RiuQwtPlotCurve::STYLE_SOLID, RiuQwtPlotCurve::STYLE_DASH };
std::vector<RiuQwtPlotCurve::LineStyleEnum> lineStyles = {RiuQwtPlotCurve::STYLE_SOLID, RiuQwtPlotCurve::STYLE_DASH};
for ( size_t i = 0; i < resultNames.size(); ++i )
{