#5101 clang-format: Adjusted penalties

Use lower absolute values to improve control of behavior
This commit is contained in:
Magne Sjaastad
2020-02-12 11:43:15 +01:00
parent 10f0abc9b5
commit c82df63e10
710 changed files with 3167 additions and 4721 deletions

View File

@@ -250,11 +250,11 @@ void RiuAdvancedSnapshotExportWidget::folderSelectionClicked()
{
QString defaultPath = m_exportFolderLineEdit->text();
QString directoryPath = QFileDialog::getExistingDirectory( m_exportFolderLineEdit,
tr( "Get existing directory" ),
defaultPath,
QFileDialog::ShowDirsOnly |
QFileDialog::DontResolveSymlinks );
QString directoryPath =
QFileDialog::getExistingDirectory( m_exportFolderLineEdit,
tr( "Get existing directory" ),
defaultPath,
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks );
if ( !directoryPath.isEmpty() )
{

View File

@@ -138,8 +138,7 @@ RiuComparisonViewMover::DragState RiuComparisonViewMover::findHandleUnderMouse(
int height = viewerHeight * normalizedComparisonRect.height();
int bottomEdgePosQt = height - viewerHeight * normalizedComparisonRect.min().y();
if ( ( leftEdgePos - handleThickness * 0.4 ) < mousePos.x() &&
mousePos.x() < ( leftEdgePos + handleThickness * 0.5 ) &&
if ( ( leftEdgePos - handleThickness * 0.4 ) < mousePos.x() && mousePos.x() < ( leftEdgePos + handleThickness * 0.5 ) &&
( bottomEdgePosQt - 8 * handleThickness ) < mousePos.y() &&
mousePos.y() < ( bottomEdgePosQt - 2 * handleThickness ) )
{

View File

@@ -102,9 +102,8 @@ void RiuCvfOverlayItemWidget::renderTo( QPainter* painter, const QRect& paintRec
cvf::ref<cvf::FramebufferObject> fbo = new cvf::FramebufferObject;
cvf::ref<cvf::RenderbufferObject> rboColor = new cvf::RenderbufferObject( cvf::RenderbufferObject::RGBA,
width,
height );
cvf::ref<cvf::RenderbufferObject> rboColor =
new cvf::RenderbufferObject( cvf::RenderbufferObject::RGBA, width, height );
cvf::ref<cvf::RenderbufferObject> rboDepth =
new cvf::RenderbufferObject( cvf::RenderbufferObject::DEPTH_COMPONENT24, width, height );

View File

@@ -355,8 +355,8 @@ void RiuDragDrop::onDragCanceled()
//--------------------------------------------------------------------------------------------------
void RiuDragDrop::moveCasesToGridGroup( caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup )
{
std::vector<RimEclipseCase*> casesToBeDeleted = RiuTypedPdmObjects<RimEclipseCase>::typedObjectsFromGroup(
objectGroup );
std::vector<RimEclipseCase*> casesToBeDeleted =
RiuTypedPdmObjects<RimEclipseCase>::typedObjectsFromGroup( objectGroup );
if ( RicCloseCaseFeature::userConfirmedGridCaseGroupChange( casesToBeDeleted ) )
{
@@ -426,8 +426,8 @@ bool RiuDragDrop::handleWellLogPlotCurveDrop( Qt::DropAction action,
caf::PdmObjectGroup& draggedObjects,
RimWellLogCurve* curveDropTarget )
{
std::vector<RimWellLogCurve*> wellLogPlotCurves = RiuTypedPdmObjects<RimWellLogCurve>::typedObjectsFromGroup(
draggedObjects );
std::vector<RimWellLogCurve*> wellLogPlotCurves =
RiuTypedPdmObjects<RimWellLogCurve>::typedObjectsFromGroup( draggedObjects );
if ( wellLogPlotCurves.size() > 0 )
{
if ( action == Qt::MoveAction )
@@ -452,8 +452,7 @@ bool RiuDragDrop::handleSummaryCaseCollectionDrop( Qt::DropAction act
caf::PdmObjectGroup& draggedObjects,
RimSummaryCaseCollection* summaryCaseDropTarget )
{
std::vector<RimSummaryCase*> summaryCases = RiuTypedPdmObjects<RimSummaryCase>::typedObjectsFromGroup(
draggedObjects );
std::vector<RimSummaryCase*> summaryCases = RiuTypedPdmObjects<RimSummaryCase>::typedObjectsFromGroup( draggedObjects );
if ( action != Qt::MoveAction || summaryCases.size() == 0 ) return false;
@@ -490,8 +489,7 @@ bool RiuDragDrop::handleSummaryCaseMainCollectionDrop( Qt::DropAction
caf::PdmObjectGroup& draggedObjects,
RimSummaryCaseMainCollection* summaryCaseDropTarget )
{
std::vector<RimSummaryCase*> summaryCases = RiuTypedPdmObjects<RimSummaryCase>::typedObjectsFromGroup(
draggedObjects );
std::vector<RimSummaryCase*> summaryCases = RiuTypedPdmObjects<RimSummaryCase>::typedObjectsFromGroup( draggedObjects );
if ( action != Qt::MoveAction || summaryCases.size() == 0 ) return false;

View File

@@ -131,7 +131,8 @@ QString RiuFemResultTextBuilder::geometrySelectionText( QString itemSeparator )
int elementId = femPart->elmId( m_cellIndex );
auto elementType = femPart->elementType( m_cellIndex );
text += QString( "Element : Id[%1], Type[%2]" ).arg( elementId ).arg( RigFemTypes::elementTypeText( elementType ) );
text +=
QString( "Element : Id[%1], Type[%2]" ).arg( elementId ).arg( RigFemTypes::elementTypeText( elementType ) );
size_t i = 0;
size_t j = 0;
@@ -396,17 +397,16 @@ QString RiuFemResultTextBuilder::closestNodeResultText( RimGeoMechResultDefiniti
RigGeoMechCaseData* geomData = m_geomResDef->geoMechCase()->geoMechData();
const std::vector<float>& scalarResults = geomData->femPartResults()->resultValues( resultColors->resultAddress(),
m_gridIndex,
m_timeStepIndex );
const std::vector<float>& scalarResults =
geomData->femPartResults()->resultValues( resultColors->resultAddress(), m_gridIndex, m_timeStepIndex );
if ( scalarResults.size() && m_displayCoordView )
{
RigFemPart* femPart = geomData->femParts()->part( m_gridIndex );
RigFemResultPosEnum activeResultPosition = resultColors->resultPositionType();
cvf::Vec3d intersectionPointInDomain = m_displayCoordView->displayCoordTransform()->translateToDomainCoord(
m_intersectionPointInDisplay );
cvf::Vec3d intersectionPointInDomain =
m_displayCoordView->displayCoordTransform()->translateToDomainCoord( m_intersectionPointInDisplay );
RigFemClosestResultIndexCalculator closestIndexCalc( femPart,
activeResultPosition,
@@ -418,8 +418,7 @@ QString RiuFemResultTextBuilder::closestNodeResultText( RimGeoMechResultDefiniti
int closestNodeId = closestIndexCalc.closestNodeId();
int closestElmNodResIdx = closestIndexCalc.closestElementNodeResIdx();
float scalarValue = ( resultIndex >= 0 ) ? scalarResults[resultIndex]
: std::numeric_limits<float>::infinity();
float scalarValue = ( resultIndex >= 0 ) ? scalarResults[resultIndex] : std::numeric_limits<float>::infinity();
if ( activeResultPosition == RIG_ELEMENT )
{

View File

@@ -240,9 +240,8 @@ void RiuFlowCharacteristicsPlot::addFlowCapStorageCapCurve( const QDateTime&
{
CVF_ASSERT( !m_dateToColorMap.empty() );
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_flowCapVsStorageCapPlot,
dateTime.toString(),
m_dateToColorMap[dateTime] );
RiuQwtPlotCurve* plotCurve =
createEmptyCurve( m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, false );
m_flowCapVsStorageCapPlot->replot();
}

View File

@@ -169,8 +169,8 @@ void RiuGeoMechXfTensorResultAccessor::calculateInterpolatedValue( const cvf::Ve
return;
}
cvf::Mat3f triangleXf = cvf::GeometryTools::computePlaneHorizontalRotationMx( triangle[1] - triangle[0],
triangle[2] - triangle[0] );
cvf::Mat3f triangleXf =
cvf::GeometryTools::computePlaneHorizontalRotationMx( triangle[1] - triangle[0], triangle[2] - triangle[0] );
for ( int triangleVxIdx = 0; triangleVxIdx < 3; ++triangleVxIdx )
{
@@ -218,8 +218,8 @@ float RiuGeoMechXfTensorResultAccessor::calculateElmNodeValue( const std::array<
{
if ( tens11->size() == 0 ) return std::numeric_limits<float>::infinity();
cvf::Mat3f triangleXf = cvf::GeometryTools::computePlaneHorizontalRotationMx( triangle[1] - triangle[0],
triangle[2] - triangle[0] );
cvf::Mat3f triangleXf =
cvf::GeometryTools::computePlaneHorizontalRotationMx( triangle[1] - triangle[0], triangle[2] - triangle[0] );
float ipT11 = ( *tens11 )[globalElmNodeResIndex];
float ipT22 = ( *tens22 )[globalElmNodeResIndex];

View File

@@ -70,9 +70,7 @@ bool RiuGeoQuestNavigation::handleInputEvent( QInputEvent* inputEvent )
{
if ( me->modifiers() == Qt::NoModifier )
{
m_trackball->startNavigation( cvf::ManipulatorTrackball::PAN,
translatedMousePosX,
translatedMousePosY );
m_trackball->startNavigation( cvf::ManipulatorTrackball::PAN, translatedMousePosX, translatedMousePosY );
m_isNavigating = true;
m_hasMovedMouseDuringNavigation = false;
isEventHandled = true;

View File

@@ -89,10 +89,8 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
m_selectedPointMarker = new QwtPlotMarker;
// QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker
QwtSymbol* mySymbol = new QwtSymbol( QwtSymbol::Ellipse,
QBrush( QColor( 255, 255, 255, 50 ) ),
QPen( Qt::black, 2.0 ),
QSize( 10, 10 ) );
QwtSymbol* mySymbol =
new QwtSymbol( QwtSymbol::Ellipse, QBrush( QColor( 255, 255, 255, 50 ) ), QPen( Qt::black, 2.0 ), QSize( 10, 10 ) );
m_selectedPointMarker->setSymbol( mySymbol );
m_selectedPointMarker->setLabelAlignment( Qt::AlignRight | Qt::AlignVCenter );
m_selectedPointMarker->setSpacing( 3 );
@@ -223,10 +221,7 @@ void RiuGridCrossQwtPlot::clearPointSelection()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuGridCrossQwtPlot::curveText( const QwtPlotCurve* curve,
QString* curveTitle,
QString* xParamName,
QString* yParamName ) const
bool RiuGridCrossQwtPlot::curveText( const QwtPlotCurve* curve, QString* curveTitle, QString* xParamName, QString* yParamName ) const
{
CVF_ASSERT( curveTitle && xParamName && yParamName );

View File

@@ -239,8 +239,8 @@ void RiuMainWindow::cleanupGuiCaseClose()
for ( auto& additionalProjectView : m_additionalProjectViews )
{
RiuProjectAndPropertyView* projPropView = dynamic_cast<RiuProjectAndPropertyView*>(
additionalProjectView->widget() );
RiuProjectAndPropertyView* projPropView =
dynamic_cast<RiuProjectAndPropertyView*>( additionalProjectView->widget() );
if ( projPropView )
{
projPropView->showProperties( nullptr );
@@ -371,9 +371,8 @@ void RiuMainWindow::createActions()
// connect(m_drawStyleLinesSolidAction, SIGNAL(triggered()), SLOT(slotDrawStyleLinesSolid()));
m_dsActionGroup->addAction( m_drawStyleLinesSolidAction );
m_drawStyleFaultLinesSolidAction = new QAction( QIcon( ":/draw_style_surface_w_fault_mesh_24x24.png" ),
"Fault Mesh And Surfaces",
this );
m_drawStyleFaultLinesSolidAction =
new QAction( QIcon( ":/draw_style_surface_w_fault_mesh_24x24.png" ), "Fault Mesh And Surfaces", this );
m_dsActionGroup->addAction( m_drawStyleFaultLinesSolidAction );
m_drawStyleSurfOnlyAction = new QAction( QIcon( ":/draw_style_surface_24x24.png" ), "&Surface Only", this );
@@ -394,9 +393,8 @@ void RiuMainWindow::createActions()
m_toggleFaultsLabelAction->setCheckable( true );
connect( m_toggleFaultsLabelAction, SIGNAL( toggled( bool ) ), SLOT( slotToggleFaultLabelsAction( bool ) ) );
m_showWellCellsAction = new QAction( QIcon( ":/draw_style_WellCellsToRangeFilter_24x24.png" ),
"&Show Well Cells",
this );
m_showWellCellsAction =
new QAction( QIcon( ":/draw_style_WellCellsToRangeFilter_24x24.png" ), "&Show Well Cells", this );
m_showWellCellsAction->setCheckable( true );
m_showWellCellsAction->setToolTip( "Show Well Cells" );
connect( m_showWellCellsAction, SIGNAL( toggled( bool ) ), SLOT( slotShowWellCellsAction( bool ) ) );
@@ -1149,8 +1147,8 @@ void RiuMainWindow::setPdmRoot( caf::PdmObject* pdmRoot )
{
if ( !additionalProjectView ) continue;
RiuProjectAndPropertyView* projPropView = dynamic_cast<RiuProjectAndPropertyView*>(
additionalProjectView->widget() );
RiuProjectAndPropertyView* projPropView =
dynamic_cast<RiuProjectAndPropertyView*>( additionalProjectView->widget() );
if ( projPropView )
{
projPropView->setPdmItem( pdmRoot );
@@ -1179,8 +1177,7 @@ void RiuMainWindow::slotViewFromSouth()
{
if ( RiaApplication::instance()->activeReservoirView() && RiaApplication::instance()->activeReservoirView()->viewer() )
{
RiaApplication::instance()->activeReservoirView()->viewer()->setView( cvf::Vec3d( 0, 1, 0 ),
cvf::Vec3d( 0, 0, 1 ) );
RiaApplication::instance()->activeReservoirView()->viewer()->setView( cvf::Vec3d( 0, 1, 0 ), cvf::Vec3d( 0, 0, 1 ) );
}
}
@@ -1203,8 +1200,7 @@ void RiuMainWindow::slotViewFromWest()
{
if ( RiaApplication::instance()->activeReservoirView() && RiaApplication::instance()->activeReservoirView()->viewer() )
{
RiaApplication::instance()->activeReservoirView()->viewer()->setView( cvf::Vec3d( 1, 0, 0 ),
cvf::Vec3d( 0, 0, 1 ) );
RiaApplication::instance()->activeReservoirView()->viewer()->setView( cvf::Vec3d( 1, 0, 0 ), cvf::Vec3d( 0, 0, 1 ) );
}
}
@@ -1227,8 +1223,7 @@ void RiuMainWindow::slotViewFromBelow()
{
if ( RiaApplication::instance()->activeReservoirView() && RiaApplication::instance()->activeReservoirView()->viewer() )
{
RiaApplication::instance()->activeReservoirView()->viewer()->setView( cvf::Vec3d( 0, 0, 1 ),
cvf::Vec3d( 0, 1, 0 ) );
RiaApplication::instance()->activeReservoirView()->viewer()->setView( cvf::Vec3d( 0, 0, 1 ), cvf::Vec3d( 0, 1, 0 ) );
}
}
@@ -1303,9 +1298,8 @@ void RiuMainWindow::selectViewInProjectTreePreservingSubItemSelection( const Rim
QModelIndex tmp = route[i];
if ( newSelectionIndex.isValid() )
{
newSelectionIndex = m_projectTreeView->treeView()->model()->index( tmp.row(),
tmp.column(),
newSelectionIndex );
newSelectionIndex =
m_projectTreeView->treeView()->model()->index( tmp.row(), tmp.column(), newSelectionIndex );
}
}
@@ -1660,8 +1654,9 @@ void RiuMainWindow::restoreTreeViewState()
QString currentIndexString = RiaApplication::instance()->project()->mainWindowCurrentModelIndexPath;
if ( !currentIndexString.isEmpty() )
{
QModelIndex mi = caf::QTreeViewStateSerializer::getModelIndexFromString( m_projectTreeView->treeView()->model(),
currentIndexString );
QModelIndex mi =
caf::QTreeViewStateSerializer::getModelIndexFromString( m_projectTreeView->treeView()->model(),
currentIndexString );
m_projectTreeView->treeView()->setCurrentIndex( mi );
}
}
@@ -1727,8 +1722,7 @@ void RiuMainWindow::updateMemoryUsage()
}
QColor usageColor( (int)( okColor.red() * ( 1.0 - currentUsageFraction ) + warningColor.red() * currentUsageFraction ),
(int)( okColor.green() * ( 1.0 - currentUsageFraction ) +
warningColor.green() * currentUsageFraction ),
(int)( okColor.green() * ( 1.0 - currentUsageFraction ) + warningColor.green() * currentUsageFraction ),
(int)( okColor.blue() * ( 1.0 - currentUsageFraction ) +
warningColor.blue() * currentUsageFraction ) );
@@ -1747,8 +1741,7 @@ void RiuMainWindow::updateMemoryUsage()
m_memoryUsedButton->setText( QString( "Memory Used: %1 MiB" ).arg( currentUsage ) );
m_memoryTotalStatus->setText( QString( "Total Physical Memory: %1 MiB" ).arg( totalPhysicalMemory ) );
m_memoryUsedButton->setStyleSheet(
QString( "QLabel {color: %1; padding: 0px 5px 0px 0px;}" ).arg( usageColor.name() ) );
m_memoryUsedButton->setStyleSheet( QString( "QLabel {color: %1; padding: 0px 5px 0px 0px;}" ).arg( usageColor.name() ) );
m_memoryTotalStatus->setStyleSheet( QString( "QLabel {padding: 0px 5px 0px 0px; }" ) );
}

View File

@@ -349,11 +349,10 @@ void RiuMainWindowBase::addViewerToMdiArea( QMdiArea* mdiArea,
const QPoint& subWindowPos,
const QSize& subWindowSize )
{
RiuMdiSubWindow* subWin = new RiuMdiSubWindow( nullptr,
Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint |
Qt::WindowMaximizeButtonHint );
subWin->setAttribute(
Qt::WA_DeleteOnClose ); // Make sure the contained widget is destroyed when the MDI window is closed
RiuMdiSubWindow* subWin =
new RiuMdiSubWindow( nullptr, Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint );
subWin->setAttribute( Qt::WA_DeleteOnClose ); // Make sure the contained widget is destroyed when the MDI window is
// closed
subWin->setWidget( viewer );
bool initialStateTiled = subWindowsAreTiled();

View File

@@ -45,9 +45,7 @@ RiuMessagePanel::RiuMessagePanel( QDockWidget* parent )
m_textEdit->setLineWrapMode( QPlainTextEdit::NoWrap );
m_textEdit->setContextMenuPolicy( Qt::CustomContextMenu );
connect( m_textEdit,
SIGNAL( customContextMenuRequested( const QPoint& ) ),
SLOT( slotShowContextMenu( const QPoint& ) ) );
connect( m_textEdit, SIGNAL( customContextMenuRequested( const QPoint& ) ), SLOT( slotShowContextMenu( const QPoint& ) ) );
layout->addWidget( m_textEdit );
}

View File

@@ -579,8 +579,8 @@ QColor RiuMohrsCirclePlot::envelopeColor( const RimGeoMechCase* geomCase )
{
if ( m_envolopeColors.find( geomCase ) == m_envolopeColors.end() )
{
cvf::Color3ub cvfColor = RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3ub(
m_envolopeColors.size() );
cvf::Color3ub cvfColor =
RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3ub( m_envolopeColors.size() );
QColor color( cvfColor.r(), cvfColor.g(), cvfColor.b() );

View File

@@ -101,11 +101,11 @@ RiuMultiCaseImportDialog::~RiuMultiCaseImportDialog()
//--------------------------------------------------------------------------------------------------
void RiuMultiCaseImportDialog::on_m_addSearchFolderButton_clicked()
{
QString selectedFolder = QFileDialog::getExistingDirectory( this,
"Select an Eclipse case search folder",
RiaApplication::instance()->lastUsedDialogDirectory(
"MULTICASEIMPORT" ) );
QStringList folderNames = m_searchFolders->stringList();
QString selectedFolder =
QFileDialog::getExistingDirectory( this,
"Select an Eclipse case search folder",
RiaApplication::instance()->lastUsedDialogDirectory( "MULTICASEIMPORT" ) );
QStringList folderNames = m_searchFolders->stringList();
if ( !folderNames.contains( selectedFolder ) )
{

View File

@@ -604,8 +604,7 @@ void RiuMultiPlotPage::reinsertPlotWidgets()
std::tie( row, column ) = findAvailableRowAndColumn( row, column, colSpan, rowAndColumnCount.second );
m_gridLayout->addWidget( subTitles[visibleIndex], 3 * row, column, 1, colSpan );
m_gridLayout
->addWidget( legends[visibleIndex], 3 * row + 1, column, 1, colSpan, Qt::AlignHCenter | Qt::AlignBottom );
m_gridLayout->addWidget( legends[visibleIndex], 3 * row + 1, column, 1, colSpan, Qt::AlignHCenter | Qt::AlignBottom );
m_gridLayout->addWidget( plotWidgets[visibleIndex], 3 * row + 2, column, 1 + ( rowSpan - 1 ) * 3, colSpan );
subTitles[visibleIndex]->setVisible( m_showSubTitles );
@@ -668,9 +667,9 @@ int RiuMultiPlotPage::alignCanvasTops()
int row = visibleIndex / rowAndColumnCount.second;
if ( plotWidgets[visibleIndex]->axisEnabled( QwtPlot::xTop ) )
{
QFont font = m_plotWidgets[visibleIndex]->axisFont( QwtPlot::xTop );
maxExtents[row] = std::max( maxExtents[row],
plotWidgets[visibleIndex]->axisScaleDraw( QwtPlot::xTop )->extent( font ) );
QFont font = m_plotWidgets[visibleIndex]->axisFont( QwtPlot::xTop );
maxExtents[row] =
std::max( maxExtents[row], plotWidgets[visibleIndex]->axisScaleDraw( QwtPlot::xTop )->extent( font ) );
}
}

View File

@@ -121,12 +121,7 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
textColor = lineColor;
}
Qt::Alignment horizontalAlignment = trackTextAlignment( trackSpan );
RiuPlotAnnotationTool::horizontalDashedLine( line,
name,
yPositions[i].first,
lineColor,
textColor,
horizontalAlignment );
RiuPlotAnnotationTool::horizontalDashedLine( line, name, yPositions[i].first, lineColor, textColor, horizontalAlignment );
line->attach( m_plot );
m_markers.push_back( std::move( line ) );

View File

@@ -886,8 +886,9 @@ void RiuPlotMainWindow::restoreTreeViewState()
QString currentIndexString = RiaApplication::instance()->project()->plotWindowCurrentModelIndexPath;
if ( !currentIndexString.isEmpty() )
{
QModelIndex mi = caf::QTreeViewStateSerializer::getModelIndexFromString( m_projectTreeView->treeView()->model(),
currentIndexString );
QModelIndex mi =
caf::QTreeViewStateSerializer::getModelIndexFromString( m_projectTreeView->treeView()->model(),
currentIndexString );
m_projectTreeView->treeView()->setCurrentIndex( mi );
}
}

View File

@@ -236,9 +236,7 @@ void RiuPvtPlotWidget::plotCurves( RiaEclipseUnitTools::UnitSystem
QwtPlotCurve* qwtCurve = new QwtPlotCurve();
CVF_ASSERT( curve.pressureVals.size() == curve.yVals.size() );
qwtCurve->setSamples( curve.pressureVals.data(),
curve.yVals.data(),
static_cast<int>( curve.pressureVals.size() ) );
qwtCurve->setSamples( curve.pressureVals.data(), curve.yVals.data(), static_cast<int>( curve.pressureVals.size() ) );
qwtCurve->setStyle( QwtPlotCurve::Lines );
@@ -629,8 +627,7 @@ void RiuPvtPlotPanel::plotUiSelectedCurves()
// Determine which curves (phase) to actually plot based on selection in GUI
const int currComboIdx = m_phaseComboBox->currentIndex();
const RigFlowDiagSolverInterface::PvtCurve::Phase phaseToPlot =
static_cast<const RigFlowDiagSolverInterface::PvtCurve::Phase>(
m_phaseComboBox->itemData( currComboIdx ).toInt() );
static_cast<const RigFlowDiagSolverInterface::PvtCurve::Phase>( m_phaseComboBox->itemData( currComboIdx ).toInt() );
QString phaseString = "";
if ( phaseToPlot == RigFlowDiagSolverInterface::PvtCurve::GAS )
@@ -727,10 +724,9 @@ void RiuPvtPlotPanel::plotUiSelectedCurves()
}
}
const QString plotTitle = QString( "%1 Viscosity" ).arg( phaseString );
const QString yAxisTitle = QString( "%1 Viscosity [%2]" )
.arg( phaseString )
.arg( unitLabelFromCurveIdent( m_unitSystem, curveIdentToPlot ) );
const QString plotTitle = QString( "%1 Viscosity" ).arg( phaseString );
const QString yAxisTitle =
QString( "%1 Viscosity [%2]" ).arg( phaseString ).arg( unitLabelFromCurveIdent( m_unitSystem, curveIdentToPlot ) );
m_viscosityPlot->plotCurves( m_unitSystem,
selectedViscosityCurves,
m_cellValues.pressure,

View File

@@ -83,8 +83,8 @@ private:
QPointer<RiuDockedQwtPlot> m_qwtPlot;
std::vector<RigFlowDiagSolverInterface::PvtCurve> m_pvtCurveArr; // Array of source Pvt curves currently being plotted
std::vector<const QwtPlotCurve*>
m_qwtCurveArr; // Array of corresponding qwt curves used for mapping to Pvt curve when doing tracking
std::vector<const QwtPlotCurve*> m_qwtCurveArr; // Array of corresponding qwt curves used for mapping to Pvt curve
// when doing tracking
QPointer<RiuPvtQwtPicker> m_qwtPicker;
QString m_trackerLabel;

View File

@@ -69,8 +69,8 @@ void RiuPvtPlotUpdater::updateOnSelectionChanged( const RiuSelectionItem* select
Rim3dView* newFollowAnimView = nullptr;
RiuEclipseSelectionItem* eclipseSelectionItem = nullptr;
eclipseSelectionItem = RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem,
newFollowAnimView );
eclipseSelectionItem =
RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView );
bool mustClearPlot = true;
m_viewToFollowAnimationFrom = nullptr;
@@ -119,8 +119,8 @@ void RiuPvtPlotUpdater::updateOnTimeStepChanged( Rim3dView* changedView )
Rim3dView* newFollowAnimView = nullptr;
RiuEclipseSelectionItem* eclipseSelectionItem = nullptr;
eclipseSelectionItem = RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem,
newFollowAnimView );
eclipseSelectionItem =
RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( selectionItem, newFollowAnimView );
if ( eclipseSelectionItem && newFollowAnimView == changedView )
{
@@ -161,8 +161,8 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_FVF,
activeCellIndex );
std::vector<RigFlowDiagSolverInterface::PvtCurve> viscosityCurveArr =
eclipseResultCase->flowDiagSolverInterface()
->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_VISCOSITY, activeCellIndex );
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_VISCOSITY,
activeCellIndex );
// The following calls will read results from file in preparation for the queries below
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( RiaDefines::MATRIX_MODEL );

View File

@@ -100,12 +100,8 @@ QwtText RiuQwtCurvePointTracker::trackerText( const QPoint& pos ) const
QString curveInfoText;
QString mainAxisValueString;
QString valueAxisValueString;
QPointF closestPoint = closestCurvePoint( pos,
&curveInfoText,
&valueAxisValueString,
&mainAxisValueString,
&relatedXAxis,
&relatedYAxis );
QPointF closestPoint =
closestCurvePoint( pos, &curveInfoText, &valueAxisValueString, &mainAxisValueString, &relatedXAxis, &relatedYAxis );
if ( !closestPoint.isNull() )
{
QString str = !curveInfoText.isEmpty() ? QString( "%1: %2" ).arg( curveInfoText ).arg( valueAxisValueString )

View File

@@ -28,6 +28,5 @@
class RiuQwtLinearScaleEngine : public QwtLinearScaleEngine
{
public:
QwtScaleDiv
divideScaleWithExplicitIntervals( double x1, double x2, double majorStepInterval, double minorStepInterval );
QwtScaleDiv divideScaleWithExplicitIntervals( double x1, double x2, double majorStepInterval, double minorStepInterval );
};

View File

@@ -237,8 +237,7 @@ void RiuQwtPlotCurve::drawSymbols( QPainter* painter,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotCurve::setLineSegmentStartStopIndices(
const std::vector<std::pair<size_t, size_t>>& lineSegmentStartStopIndices )
void RiuQwtPlotCurve::setLineSegmentStartStopIndices( const std::vector<std::pair<size_t, size_t>>& lineSegmentStartStopIndices )
{
m_polyLineStartStopIndices = lineSegmentStartStopIndices;
}
@@ -391,9 +390,9 @@ std::vector<double> RiuQwtPlotCurve::fromTime_t( const std::vector<time_t>& time
doubleValues.reserve( timeSteps.size() );
for ( const auto& time : timeSteps )
{
double milliSecSinceEpoch = time *
1000; // This is kind of hack, as the c++ standard does not state what time_t
// is. "Almost always" secs since epoch according to cppreference.com
double milliSecSinceEpoch = time * 1000; // This is kind of hack, as the c++ standard does not state what
// time_t is. "Almost always" secs since epoch according to
// cppreference.com
doubleValues.push_back( milliSecSinceEpoch );
}

View File

@@ -26,7 +26,8 @@
//==================================================================================================
//
// If infinite data is present in the curve data, Qwt is not able to draw a nice curve.
// This class assumes that inf data is removed, and segments to be draw are indicated by start/stop indices into curve data.
// This class assumes that inf data is removed, and segments to be draw are indicated by start/stop indices into curve
// data.
//
// Single values in the curve are drawn using a CrossX symbol
//

View File

@@ -60,10 +60,7 @@ void RiuQwtPlotItemGroup::addLegendItem( QwtPlotItem* legendItem )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotItemGroup::draw( QPainter* painter,
const QwtScaleMap& xMap,
const QwtScaleMap& yMap,
const QRectF& canvasRect ) const
void RiuQwtPlotItemGroup::draw( QPainter* painter, const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QRectF& canvasRect ) const
{
for ( const QwtPlotItem* item : m_plotItems )
{

View File

@@ -142,11 +142,7 @@ void RiuQwtPlotTools::enableDateBasedBottomXAxis( QwtPlot*
for ( QwtDate::IntervalType interval : intervals )
{
scaleDraw->setDateFormat( interval,
dateTimeFormatForInterval( interval,
dateFormat,
timeFormat,
dateComponents,
timeComponents ) );
dateTimeFormatForInterval( interval, dateFormat, timeFormat, dateComponents, timeComponents ) );
}
QwtDateScaleEngine* scaleEngine = new QwtDateScaleEngine( Qt::UTC );
@@ -177,28 +173,26 @@ QString RiuQwtPlotTools::dateTimeFormatForInterval( QwtDate::IntervalType
return RiaQDateTimeTools::timeFormatString( timeFormat,
RiaQDateTimeTools::TIME_FORMAT_HOUR_MINUTE_SECOND_MILLISECOND );
case QwtDate::Second:
return RiaQDateTimeTools::timeFormatString( timeFormat,
RiaQDateTimeTools::TIME_FORMAT_HOUR_MINUTE_SECOND );
return RiaQDateTimeTools::timeFormatString( timeFormat, RiaQDateTimeTools::TIME_FORMAT_HOUR_MINUTE_SECOND );
case QwtDate::Minute:
{
QString fullFormat = RiaQDateTimeTools::timeFormatString( timeFormat,
RiaQDateTimeTools::TIME_FORMAT_HOUR_MINUTE );
QString fullFormat =
RiaQDateTimeTools::timeFormatString( timeFormat, RiaQDateTimeTools::TIME_FORMAT_HOUR_MINUTE );
fullFormat += "\n";
fullFormat += RiaQDateTimeTools::dateFormatString( dateFormat,
RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
fullFormat +=
RiaQDateTimeTools::dateFormatString( dateFormat, RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
return fullFormat;
}
case QwtDate::Hour:
{
QString fullFormat = RiaQDateTimeTools::timeFormatString( timeFormat,
RiaQDateTimeTools::TIME_FORMAT_HOUR );
QString fullFormat = RiaQDateTimeTools::timeFormatString( timeFormat, RiaQDateTimeTools::TIME_FORMAT_HOUR );
if ( !fullFormat.endsWith( "AP" ) )
{
fullFormat += ":00";
}
fullFormat += "\n";
fullFormat += RiaQDateTimeTools::dateFormatString( dateFormat,
RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
fullFormat +=
RiaQDateTimeTools::dateFormatString( dateFormat, RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
return fullFormat;
}
case QwtDate::Day:

View File

@@ -56,10 +56,9 @@ void RiuQwtPlotWheelZoomer::zoomOnAxis( QwtPlot* plot, QwtPlot::Axis axis, doubl
if ( axisIsLogarithmic( axis ) )
{
// Handle inverted axes as well by not assuming maxValue > minValue
double minValue = std::max( RIU_LOGARITHMIC_MINIMUM,
0.1 * std::min( axisRange.minValue(), axisRange.maxValue() ) );
double maxValue = std::max( RIU_LOGARITHMIC_MINIMUM,
10.0 * std::max( axisRange.minValue(), axisRange.maxValue() ) );
double minValue = std::max( RIU_LOGARITHMIC_MINIMUM, 0.1 * std::min( axisRange.minValue(), axisRange.maxValue() ) );
double maxValue =
std::max( RIU_LOGARITHMIC_MINIMUM, 10.0 * std::max( axisRange.minValue(), axisRange.maxValue() ) );
newMin = cvf::Math::clamp( newMin, minValue, maxValue );
newMax = cvf::Math::clamp( newMax, minValue, maxValue );

View File

@@ -317,10 +317,8 @@ void RiuQwtPlotWidget::setMajorAndMinorTickIntervals( QwtPlot::Axis axis,
RiuQwtLinearScaleEngine* scaleEngine = dynamic_cast<RiuQwtLinearScaleEngine*>( this->axisScaleEngine( axis ) );
if ( scaleEngine )
{
QwtScaleDiv scaleDiv = scaleEngine->divideScaleWithExplicitIntervals( minValue,
maxValue,
majorTickInterval,
minorTickInterval );
QwtScaleDiv scaleDiv =
scaleEngine->divideScaleWithExplicitIntervals( minValue, maxValue, majorTickInterval, minorTickInterval );
this->setAxisScaleDiv( axis, scaleDiv );
}

View File

@@ -214,16 +214,7 @@ void RiuRelativePermeabilityPlotPanel::clearPlot()
m_caseName.clear();
m_cellReferenceText.clear();
plotCurvesInQwt( m_unitSystem,
m_allCurvesArr,
m_swat,
m_sgas,
m_cellReferenceText,
false,
true,
true,
m_qwtPlot,
&m_myPlotMarkers );
plotCurvesInQwt( m_unitSystem, m_allCurvesArr, m_swat, m_sgas, m_cellReferenceText, false, true, true, m_qwtPlot, &m_myPlotMarkers );
}
//--------------------------------------------------------------------------------------------------
@@ -516,8 +507,7 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaEclipseUnitTools::Uni
plot->setAxisTitle( QwtPlot::xBottom, determineXAxisTitleFromCurveCollection( curveArr ) );
plot->setAxisTitle( QwtPlot::yLeft, "Kr" );
plot->setAxisTitle( QwtPlot::yRight,
QString( "Pc [%1]" ).arg( RiaEclipseUnitTools::unitStringPressure( unitSystem ) ) );
plot->setAxisTitle( QwtPlot::yRight, QString( "Pc [%1]" ).arg( RiaEclipseUnitTools::unitStringPressure( unitSystem ) ) );
plot->replot();
}

View File

@@ -230,8 +230,8 @@ QString RiuResultQwtPlot::asciiDataForUiSelectedCurves() const
}
out += "\n";
QString dateString = RiaQDateTimeTools::toStringUsingApplicationLocale( m_timeSteps.at( caseId )[i],
"yyyy-MM-dd hh:mm:ss " );
QString dateString =
RiaQDateTimeTools::toStringUsingApplicationLocale( m_timeSteps.at( caseId )[i], "yyyy-MM-dd hh:mm:ss " );
out += dateString;

View File

@@ -952,10 +952,7 @@ QString RiuResultTextBuilder::cellResultText( RimEclipseResultDefinition* eclRes
}
cvf::ref<RigResultAccessor> resultAccessor =
RigResultAccessorFactory::createFromResultDefinition( eclipseCaseData,
m_gridIndex,
adjustedTimeStep,
eclResDef );
RigResultAccessorFactory::createFromResultDefinition( eclipseCaseData, m_gridIndex, adjustedTimeStep, eclResDef );
if ( resultAccessor.notNull() )
{
double scalarValue = resultAccessor->cellFaceScalar( m_cellIndex, m_face );
@@ -1017,8 +1014,8 @@ QString RiuResultTextBuilder::wellResultText()
}
const RigWellResultFrame& wellResultFrame = singleWellResultData->wellResultFrame( m_timeStepIndex );
const RigWellResultPoint* wellResultCell = wellResultFrame.findResultCellWellHeadIncluded( m_gridIndex,
m_cellIndex );
const RigWellResultPoint* wellResultCell =
wellResultFrame.findResultCellWellHeadIncluded( m_gridIndex, m_cellIndex );
if ( wellResultCell )
{
text += QString( "-- Well-cell connection info --\n Well Name: %1\n Branch Id: %2\n Segment Id: %3\n" )

View File

@@ -70,9 +70,7 @@ bool RiuRmsNavigation::handleInputEvent( QInputEvent* inputEvent )
{
if ( me->modifiers() == Qt::NoModifier )
{
m_trackball->startNavigation( cvf::ManipulatorTrackball::PAN,
translatedMousePosX,
translatedMousePosY );
m_trackball->startNavigation( cvf::ManipulatorTrackball::PAN, translatedMousePosX, translatedMousePosY );
m_isNavigating = true;
m_hasMovedMouseDuringNavigation = false;
isEventHandled = true;

View File

@@ -27,9 +27,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuScalarMapperLegendFrame::RiuScalarMapperLegendFrame( QWidget* parent,
const QString& title,
cvf::ScalarMapper* scalarMapper )
RiuScalarMapperLegendFrame::RiuScalarMapperLegendFrame( QWidget* parent, const QString& title, cvf::ScalarMapper* scalarMapper )
: RiuAbstractLegendFrame( parent, title )
, m_scalarMapper( scalarMapper )
, m_tickNumberPrecision( 4 )
@@ -177,8 +175,7 @@ void RiuScalarMapperLegendFrame::renderRect( QPainter* painter, const LayoutInfo
gradient.setColorAt( 0.0, startQColor );
gradient.setColorAt( 1.0, endQColor );
QRectF rect( QPointF( layout.tickStartX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QRectF rect( QPointF( layout.tickStartX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QPointF( layout.tickMidX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );

View File

@@ -304,8 +304,8 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem( const RiuSelectionIt
}
else if ( itemAdded->type() == RiuSelectionItem::INTERSECTION_SELECTION_OBJECT )
{
const Riu2dIntersectionSelectionItem* _2dSelectionItem = static_cast<const Riu2dIntersectionSelectionItem*>(
itemAdded );
const Riu2dIntersectionSelectionItem* _2dSelectionItem =
static_cast<const Riu2dIntersectionSelectionItem*>( itemAdded );
addCurveFromSelectionItem( _2dSelectionItem );
}
@@ -345,8 +345,7 @@ void RiuSelectionChangedHandler::updateResultInfo( const RiuSelectionItem* itemA
if ( selItem->type() == RiuSelectionItem::INTERSECTION_SELECTION_OBJECT )
{
const Riu2dIntersectionSelectionItem* wrapperSelItem = dynamic_cast<Riu2dIntersectionSelectionItem*>(
selItem );
const Riu2dIntersectionSelectionItem* wrapperSelItem = dynamic_cast<Riu2dIntersectionSelectionItem*>( selItem );
if ( wrapperSelItem )
{
intersectionView = wrapperSelItem->view();

View File

@@ -442,8 +442,7 @@ std::vector<RiaSummaryCurveDefinition> RiuSummaryCurveDefSelection::allCurveDefi
{
if ( selectedAddressesFromUi.count( addressFromSource ) > 0 )
{
curveDefinitions.insert(
RiaSummaryCurveDefinition( caseFromSource, addressFromSource, ensemble ) );
curveDefinitions.insert( RiaSummaryCurveDefinition( caseFromSource, addressFromSource, ensemble ) );
}
}
}
@@ -775,8 +774,7 @@ void RiuSummaryCurveDefSelection::fieldChangedByUi( const caf::PdmFieldHandle* c
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo>
RiuSummaryCurveDefSelection::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly )
RiuSummaryCurveDefSelection::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
{
QList<caf::PdmOptionItemInfo> options;
@@ -803,8 +801,8 @@ QList<caf::PdmOptionItemInfo>
//--------------------------------------------------------------------------------------------------
void RiuSummaryCurveDefSelection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
caf::PdmUiGroup* sourcesGroup = uiOrdering.addNewGroupWithKeyword( "Sources",
RiuSummaryCurveDefinitionKeywords::sources() );
caf::PdmUiGroup* sourcesGroup =
uiOrdering.addNewGroupWithKeyword( "Sources", RiuSummaryCurveDefinitionKeywords::sources() );
sourcesGroup->add( &m_selectedSources );
caf::PdmUiGroup* itemTypesGroup =
@@ -945,8 +943,8 @@ void RiuSummaryCurveDefSelection::defineUiOrdering( QString uiConfigName, caf::P
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_IMPORTED][0]->pdmField();
}
caf::PdmUiGroup* summariesGroup = uiOrdering.addNewGroupWithKeyword( "Summaries",
RiuSummaryCurveDefinitionKeywords::summaries() );
caf::PdmUiGroup* summariesGroup =
uiOrdering.addNewGroupWithKeyword( "Summaries", RiuSummaryCurveDefinitionKeywords::summaries() );
if ( summaryiesField )
{
summariesGroup->add( summaryiesField );
@@ -1202,10 +1200,7 @@ void RiuSummaryCurveDefSelection::buildAddressListForCategoryRecursively(
if ( ( *identifierAndFieldItr )->summaryIdentifier() != RifEclipseSummaryAddress::INPUT_VECTOR_NAME )
{
buildAddressListForCategoryRecursively( category,
std::next( identifierAndFieldItr, 1 ),
identifierPath,
addressSet );
buildAddressListForCategoryRecursively( category, std::next( identifierAndFieldItr, 1 ), identifierPath, addressSet );
}
else
{
@@ -1419,9 +1414,8 @@ void RiuSummaryCurveDefSelection::appendOptionItemsForCategories( QList<caf::Pdm
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryCurveDefSelection::appendOptionItemsForSubCategoriesAndVectors(
QList<caf::PdmOptionItemInfo>& options,
SummaryIdentifierAndField* identifierAndField ) const
void RiuSummaryCurveDefSelection::appendOptionItemsForSubCategoriesAndVectors( QList<caf::PdmOptionItemInfo>& options,
SummaryIdentifierAndField* identifierAndField ) const
{
if ( identifierAndField == nullptr ) return;
@@ -1529,8 +1523,8 @@ void RiuSummaryCurveDefSelection::appendOptionItemsForSubCategoriesAndVectors(
if ( isVectorField )
{
std::string longVectorName = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromQuantityName(
itemName );
std::string longVectorName =
RiuSummaryQuantityNameInfoProvider::instance()->longNameFromQuantityName( itemName );
if ( longVectorName.empty() )
{

View File

@@ -66,9 +66,7 @@ public:
void setDefaultSelection( const std::vector<SummarySource*>& defaultCases );
private:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;

View File

@@ -59,9 +59,8 @@ RiuSummaryCurveDefSelection* RiuSummaryCurveDefSelectionEditor::summaryAddressSe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryCurveDefSelectionEditor::recursivelyConfigureAndUpdateTopLevelUiOrdering(
const caf::PdmUiOrdering& topLevelUiOrdering,
const QString& uiConfigName )
void RiuSummaryCurveDefSelectionEditor::recursivelyConfigureAndUpdateTopLevelUiOrdering( const caf::PdmUiOrdering& topLevelUiOrdering,
const QString& uiConfigName )
{
if ( !m_firstRowLeftLayout || !m_firstRowRightLayout ) return;
@@ -195,8 +194,8 @@ void RiuSummaryCurveDefSelectionEditor::configureAndUpdateFields( int
if ( fieldEditorWidget )
{
fieldEditorWidget->setParent(
this->widget() ); // To make sure this widget has the current group box as parent.
fieldEditorWidget->setParent( this->widget() ); // To make sure this widget has the current
// group box as parent.
layout->insertWidget( currentWidgetIndex++, fieldEditorWidget );
}

View File

@@ -290,8 +290,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"FNLPT", {A::SUMMARY_FIELD, "NGL Production Total"}} );
m_summaryToDescMap.insert( {"FNLPRH", {A::SUMMARY_FIELD, "NGL Production Rate History"}} );
m_summaryToDescMap.insert( {"FNLPTH", {A::SUMMARY_FIELD, "NGL Production Total History"}} );
m_summaryToDescMap.insert(
{"FAMF", {A::SUMMARY_FIELD, "Component aqueous mole fraction, from producing completions"}} );
m_summaryToDescMap.insert( {"FAMF", {A::SUMMARY_FIELD, "Component aqueous mole fraction, from producing completions"}} );
m_summaryToDescMap.insert( {"FXMF", {A::SUMMARY_FIELD, "Liquid Mole Fraction"}} );
m_summaryToDescMap.insert( {"FYMF", {A::SUMMARY_FIELD, "Vapor Mole Fraction"}} );
m_summaryToDescMap.insert( {"FXMFn", {A::SUMMARY_FIELD, "Liquid Mole Fraction for nth separator stage"}} );
@@ -401,8 +400,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"FWPV", {A::SUMMARY_FIELD, "Pore Volume containing Water"}} );
m_summaryToDescMap.insert( {"FGPV", {A::SUMMARY_FIELD, "Pore Volume containing Gas"}} );
m_summaryToDescMap.insert( {"FHPV", {A::SUMMARY_FIELD, "Pore Volume containing Hydrocarbon"}} );
m_summaryToDescMap.insert(
{"FRTM", {A::SUMMARY_FIELD, "Transmissibility Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert( {"FRTM", {A::SUMMARY_FIELD, "Transmissibility Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert( {"FOE", {A::SUMMARY_FIELD, "(OIP(initial) - OIP(now)) / OIP(initial)"}} );
m_summaryToDescMap.insert( {"FOEW", {A::SUMMARY_FIELD, "Oil Production from Wells / OIP(initial)"}} );
m_summaryToDescMap.insert(
@@ -759,10 +757,8 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"GMWPA", {A::SUMMARY_WELL_GROUP, "Number of abandoned production wells"}} );
m_summaryToDescMap.insert( {"GMWPU", {A::SUMMARY_WELL_GROUP, "Number of unused production wells"}} );
m_summaryToDescMap.insert( {"GMWPG", {A::SUMMARY_WELL_GROUP, "Number of producers on group control"}} );
m_summaryToDescMap.insert(
{"GMWPO", {A::SUMMARY_WELL_GROUP, "Number of producers controlled by own oil rate limit"}} );
m_summaryToDescMap.insert(
{"GMWPS", {A::SUMMARY_WELL_GROUP, "Number of producers on own surface rate limit control"}} );
m_summaryToDescMap.insert( {"GMWPO", {A::SUMMARY_WELL_GROUP, "Number of producers controlled by own oil rate limit"}} );
m_summaryToDescMap.insert( {"GMWPS", {A::SUMMARY_WELL_GROUP, "Number of producers on own surface rate limit control"}} );
m_summaryToDescMap.insert(
{"GMWPV", {A::SUMMARY_WELL_GROUP, "Number of producers on own reservoir volume rate limit control"}} );
m_summaryToDescMap.insert( {"GMWPP", {A::SUMMARY_WELL_GROUP, "Number of producers on pressure control"}} );
@@ -772,8 +768,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"GMWIA", {A::SUMMARY_WELL_GROUP, "Number of abandoned injection wells"}} );
m_summaryToDescMap.insert( {"GMWIU", {A::SUMMARY_WELL_GROUP, "Number of unused injection wells"}} );
m_summaryToDescMap.insert( {"GMWIG", {A::SUMMARY_WELL_GROUP, "Number of injectors on group control"}} );
m_summaryToDescMap.insert(
{"GMWIS", {A::SUMMARY_WELL_GROUP, "Number of injectors on own surface rate limit control"}} );
m_summaryToDescMap.insert( {"GMWIS", {A::SUMMARY_WELL_GROUP, "Number of injectors on own surface rate limit control"}} );
m_summaryToDescMap.insert(
{"GMWIV", {A::SUMMARY_WELL_GROUP, "Number of injectors on own reservoir volume rate limit control"}} );
m_summaryToDescMap.insert( {"GMWIP", {A::SUMMARY_WELL_GROUP, "Number of injectors on pressure control"}} );
@@ -816,8 +811,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"GCNMR", {A::SUMMARY_WELL_GROUP, "Hydrocarbon component molar rates in the NGL phase"}} );
m_summaryToDescMap.insert( {"GCNWR", {A::SUMMARY_WELL_GROUP, "Hydrocarbon component mass rates in the NGL phase"}} );
m_summaryToDescMap.insert(
{"GCGMRn",
{A::SUMMARY_WELL_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage"}} );
{"GCGMRn", {A::SUMMARY_WELL_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage"}} );
m_summaryToDescMap.insert(
{"GCGRn", {A::SUMMARY_WELL_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage"}} );
m_summaryToDescMap.insert( {"GCOMRn", {A::SUMMARY_WELL_GROUP, "Hydrocarbon component"}} );
@@ -862,8 +856,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert(
{"GOSTP", {A::SUMMARY_WELL_GROUP, "Test period for the most recent sustainable capacity test for oil"}} );
m_summaryToDescMap.insert(
{"GWSPR",
{A::SUMMARY_WELL_GROUP, "Target sustainable rate for most recent sustainable capacity test for water"}} );
{"GWSPR", {A::SUMMARY_WELL_GROUP, "Target sustainable rate for most recent sustainable capacity test for water"}} );
m_summaryToDescMap.insert( {"GWSRL",
{A::SUMMARY_WELL_GROUP,
"Maximum tested rate sustained for the test period during the most recent sustainable "
@@ -969,14 +962,12 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"GFGR", {A::SUMMARY_WELL_GROUP, "Fuel Gas rate, at and below this group"}} );
m_summaryToDescMap.insert( {"GFGT", {A::SUMMARY_WELL_GROUP, "Fuel Gas cumulative total, at and below this group"}} );
m_summaryToDescMap.insert( {"GGIMR", {A::SUMMARY_WELL_GROUP, "Gas import rate, at and below this group"}} );
m_summaryToDescMap.insert(
{"GGIMT", {A::SUMMARY_WELL_GROUP, "Gas import cumulative total, at and below this group"}} );
m_summaryToDescMap.insert( {"GGIMT", {A::SUMMARY_WELL_GROUP, "Gas import cumulative total, at and below this group"}} );
m_summaryToDescMap.insert(
{"GPRFP", {A::SUMMARY_WELL_GROUP, "Group or node Pressure in network from end of First Pass"}} );
m_summaryToDescMap.insert(
{"GGPRNBFP",
{A::SUMMARY_WELL_GROUP,
"Gas flow rate along Group's or node's outlet branch in network, from end of First Pass"}} );
{A::SUMMARY_WELL_GROUP, "Gas flow rate along Group's or node's outlet branch in network, from end of First Pass"}} );
m_summaryToDescMap.insert( {"GGLIR", {A::SUMMARY_WELL_GROUP, "Gas Lift Injection Rate"}} );
m_summaryToDescMap.insert( {"GGCV", {A::SUMMARY_WELL_GROUP, "Gas Calorific Value"}} );
m_summaryToDescMap.insert( {"GGQ", {A::SUMMARY_WELL_GROUP, "Gas molar Quality"}} );
@@ -988,8 +979,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"GEDCQ", {A::SUMMARY_WELL_GROUP, "Energy DCQ"}} );
m_summaryToDescMap.insert( {"GPR", {A::SUMMARY_WELL_GROUP, "Group or node Pressure in the production network"}} );
m_summaryToDescMap.insert( {"GPRG", {A::SUMMARY_WELL_GROUP, "Group or node Pressure in the gas injection network"}} );
m_summaryToDescMap.insert(
{"GPRW", {A::SUMMARY_WELL_GROUP, "Group or node Pressure in the water injection network"}} );
m_summaryToDescMap.insert( {"GPRW", {A::SUMMARY_WELL_GROUP, "Group or node Pressure in the water injection network"}} );
m_summaryToDescMap.insert(
{"GPRB",
{A::SUMMARY_WELL_GROUP, "Pressure drop along the group's or node's outlet branch in the production network"}} );
@@ -998,8 +988,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
{A::SUMMARY_WELL_GROUP, "Pressure drop along the group's or node's inlet branch in the gas injection network"}} );
m_summaryToDescMap.insert(
{"GPRBW",
{A::SUMMARY_WELL_GROUP,
"Pressure drop along the group's or node's inlet branch in the water injection network"}} );
{A::SUMMARY_WELL_GROUP, "Pressure drop along the group's or node's inlet branch in the water injection network"}} );
m_summaryToDescMap.insert(
{"GALQ", {A::SUMMARY_WELL_GROUP, "ALQ in the group's or node's outlet branch in the production network"}} );
m_summaryToDescMap.insert(
@@ -1271,8 +1260,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"WNLPRH", {A::SUMMARY_WELL, "NGL Production Rate History"}} );
m_summaryToDescMap.insert( {"WNLPTH", {A::SUMMARY_WELL, "NGL Production Total History"}} );
m_summaryToDescMap.insert( {"WNLPRT", {A::SUMMARY_WELL, "NGL Production Rate Target"}} );
m_summaryToDescMap.insert(
{"WAMF", {A::SUMMARY_WELL, "Component aqueous mole fraction, from producing completions"}} );
m_summaryToDescMap.insert( {"WAMF", {A::SUMMARY_WELL, "Component aqueous mole fraction, from producing completions"}} );
m_summaryToDescMap.insert( {"WXMF", {A::SUMMARY_WELL, "Liquid Mole Fraction"}} );
m_summaryToDescMap.insert( {"WYMF", {A::SUMMARY_WELL, "Vapor Mole Fraction"}} );
m_summaryToDescMap.insert( {"WXMFn", {A::SUMMARY_WELL, "Liquid Mole Fraction for nth separator stage"}} );
@@ -1325,8 +1313,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
{"WGFWCn", {A::SUMMARY_WELL, "Derivative of well gas flow rate with respect to parameter n"}} );
m_summaryToDescMap.insert(
{"WOFWCn", {A::SUMMARY_WELL, "Derivative of well oil flow rate with respect to parameter n"}} );
m_summaryToDescMap.insert(
{"WWFWCn", {A::SUMMARY_WELL, "Derivative of water flow rate with respect to parameter n"}} );
m_summaryToDescMap.insert( {"WWFWCn", {A::SUMMARY_WELL, "Derivative of water flow rate with respect to parameter n"}} );
m_summaryToDescMap.insert( {"WTPR", {A::SUMMARY_WELL, "Tracer Production Rate"}} );
m_summaryToDescMap.insert( {"WTPT", {A::SUMMARY_WELL, "Tracer Production Total"}} );
m_summaryToDescMap.insert( {"WTPC", {A::SUMMARY_WELL, "Tracer Production Concentration"}} );
@@ -1479,8 +1466,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
{"CDBF", {A::SUMMARY_WELL_COMPLETION, "Blocking factor for generalized pseudo-pressure method"}} );
m_summaryToDescMap.insert(
{"CGPPTN", {A::SUMMARY_WELL_COMPLETION, "Generalized pseudo-pressure table update counter"}} );
m_summaryToDescMap.insert(
{"CGPPTS", {A::SUMMARY_WELL_COMPLETION, "Generalized pseudo-pressure table update status"}} );
m_summaryToDescMap.insert( {"CGPPTS", {A::SUMMARY_WELL_COMPLETION, "Generalized pseudo-pressure table update status"}} );
m_summaryToDescMap.insert( {"CDSM", {A::SUMMARY_WELL_COMPLETION, "Current mass of scale deposited"}} );
m_summaryToDescMap.insert(
{"CDSML", {A::SUMMARY_WELL_COMPLETION, "Current mass of scale deposited per unit perforation length"}} );
@@ -1722,8 +1708,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"RTFTT", {A::SUMMARY_REGION_2_REGION, "Tracer inter-region Flow"}} );
m_summaryToDescMap.insert( {"RTFTF", {A::SUMMARY_REGION_2_REGION, "Tracer inter-region Flow"}} );
m_summaryToDescMap.insert( {"RTFTS", {A::SUMMARY_REGION_2_REGION, "Tracer inter-region Flow"}} );
m_summaryToDescMap.insert(
{"RTFT#", {A::SUMMARY_REGION_2_REGION, "Tracer inter-region Flow in phase # (1,2,3,...)"}} );
m_summaryToDescMap.insert( {"RTFT#", {A::SUMMARY_REGION_2_REGION, "Tracer inter-region Flow in phase # (1,2,3,...)"}} );
m_summaryToDescMap.insert( {"RTFTTFOA", {A::SUMMARY_REGION_2_REGION, "Inter-region Flow Total"}} );
m_summaryToDescMap.insert( {"RCFT", {A::SUMMARY_REGION_2_REGION, "Polymer inter-region Flow Total"}} );
m_summaryToDescMap.insert( {"RSFT", {A::SUMMARY_REGION_2_REGION, "Salt inter-region Flow Total"}} );
@@ -1754,8 +1739,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"BKRW", {A::SUMMARY_BLOCK, "Water relative permeability"}} );
m_summaryToDescMap.insert( {"BKRWG", {A::SUMMARY_BLOCK, "Two-phase water relative permeability to gas"}} );
m_summaryToDescMap.insert( {"BKRWO", {A::SUMMARY_BLOCK, "Two-phase water relative permeability to oil"}} );
m_summaryToDescMap.insert(
{"BRK", {A::SUMMARY_BLOCK, "Water relative permeability reduction factor due to polymer"}} );
m_summaryToDescMap.insert( {"BRK", {A::SUMMARY_BLOCK, "Water relative permeability reduction factor due to polymer"}} );
m_summaryToDescMap.insert( {"BEWKR", {A::SUMMARY_BLOCK, "Water effective relative permeability due to polymer"}} );
m_summaryToDescMap.insert( {"BWPC", {A::SUMMARY_BLOCK, "Water-Oil capillary pressure"}} );
m_summaryToDescMap.insert( {"BGPC", {A::SUMMARY_BLOCK, "Gas-Oil capillary pressure"}} );
@@ -1796,8 +1780,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"BHD_X", {A::SUMMARY_BLOCK, "Hydraulic head interpolated at a defined coordinate"}} );
m_summaryToDescMap.insert(
{"BHDF_X", {A::SUMMARY_BLOCK, "Hydraulic head at fresh water conditions interpolated at a defined coordinate"}} );
m_summaryToDescMap.insert(
{"BSCN_X", {A::SUMMARY_BLOCK, "Brine concentration interpolated at a defined coordinate"}} );
m_summaryToDescMap.insert( {"BSCN_X", {A::SUMMARY_BLOCK, "Brine concentration interpolated at a defined coordinate"}} );
m_summaryToDescMap.insert(
{"BCTRA_X", {A::SUMMARY_BLOCK, "Tracer concentration interpolated at a defined coordinate"}} );
m_summaryToDescMap.insert(
@@ -1811,8 +1794,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert(
{"LBSCN_X", {A::SUMMARY_BLOCK, "Brine concentration interpolated at a defined coordinate within a local grid"}} );
m_summaryToDescMap.insert(
{"LBCTRA_X",
{A::SUMMARY_BLOCK, "Tracer concentration interpolated at a defined coordinate within a local grid"}} );
{"LBCTRA_X", {A::SUMMARY_BLOCK, "Tracer concentration interpolated at a defined coordinate within a local grid"}} );
m_summaryToDescMap.insert( {"BOKRX", {A::SUMMARY_BLOCK, "Oil relative permeability in the X direction"}} );
m_summaryToDescMap.insert( {"BOKRX", {A::SUMMARY_BLOCK, "- Oil relative permeability in the -X direction"}} );
m_summaryToDescMap.insert( {"BOKRY", {A::SUMMARY_BLOCK, "Oil relative permeability in the Y direction"}} );
@@ -1867,8 +1849,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"BWPV", {A::SUMMARY_BLOCK, "Pore Volume containing Water"}} );
m_summaryToDescMap.insert( {"BGPV", {A::SUMMARY_BLOCK, "Pore Volume containing Gas"}} );
m_summaryToDescMap.insert( {"BHPV", {A::SUMMARY_BLOCK, "Pore Volume containing Hydrocarbon"}} );
m_summaryToDescMap.insert(
{"BRTM", {A::SUMMARY_BLOCK, "Transmissibility Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert( {"BRTM", {A::SUMMARY_BLOCK, "Transmissibility Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert(
{"BPERMMOD", {A::SUMMARY_BLOCK, "Transmissibility Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert(
@@ -1883,8 +1864,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
{"BPERMMDZ",
{A::SUMMARY_BLOCK,
"Directional Transmissibility Multipliers in the Z direction, associated with rock compaction"}} );
m_summaryToDescMap.insert(
{"BPORVMOD", {A::SUMMARY_BLOCK, "Pore Volume Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert( {"BPORVMOD", {A::SUMMARY_BLOCK, "Pore Volume Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert(
{"BSIGMMOD", {A::SUMMARY_BLOCK, "Dual Porosity Sigma Multiplier associated with rock compaction"}} );
m_summaryToDescMap.insert( {"BTCNF", {A::SUMMARY_BLOCK, "Tracer Concentration"}} );
@@ -1944,27 +1924,27 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
{"BCABnnn", {A::SUMMARY_BLOCK, "Adsorbed polymer by highest temperature band at which RRF was calculated"}} );
m_summaryToDescMap.insert( {"BSCN", {A::SUMMARY_BLOCK, "Salt Cell Concentration"}} );
m_summaryToDescMap.insert( {"BSIP", {A::SUMMARY_BLOCK, "Salt In Place"}} );
m_summaryToDescMap.insert(
{"BFLOW0I",
{A::SUMMARY_BLOCK, "Inter-block water flow rate in the positive I direction multiplied by the corresponding shear multiplier"}} );
m_summaryToDescMap.insert(
{"BFLOW0J",
{A::SUMMARY_BLOCK, "Inter-block water flow rate in the positive J direction multiplied by the corresponding shear multiplier"}} );
m_summaryToDescMap.insert(
{"BFLOW0K",
{A::SUMMARY_BLOCK, "Inter-block water flow rate in the positive K direction multiplied by the corresponding shear multiplier"}} );
m_summaryToDescMap.insert( {"BFLOW0I",
{A::SUMMARY_BLOCK,
"Inter-block water flow rate in the positive I direction multiplied by the "
"corresponding shear multiplier"}} );
m_summaryToDescMap.insert( {"BFLOW0J",
{A::SUMMARY_BLOCK,
"Inter-block water flow rate in the positive J direction multiplied by the "
"corresponding shear multiplier"}} );
m_summaryToDescMap.insert( {"BFLOW0K",
{A::SUMMARY_BLOCK,
"Inter-block water flow rate in the positive K direction multiplied by the "
"corresponding shear multiplier"}} );
m_summaryToDescMap.insert(
{"BVELW0I",
{A::SUMMARY_BLOCK,
"Water velocity in the positive I direction multiplied by the corresponding shear multiplier"}} );
{A::SUMMARY_BLOCK, "Water velocity in the positive I direction multiplied by the corresponding shear multiplier"}} );
m_summaryToDescMap.insert(
{"BVELW0J",
{A::SUMMARY_BLOCK,
"Water velocity in the positive J direction multiplied by the corresponding shear multiplier"}} );
{A::SUMMARY_BLOCK, "Water velocity in the positive J direction multiplied by the corresponding shear multiplier"}} );
m_summaryToDescMap.insert(
{"BVELW0K",
{A::SUMMARY_BLOCK,
"Water velocity in the positive K direction multiplied by the corresponding shear multiplier"}} );
{A::SUMMARY_BLOCK, "Water velocity in the positive K direction multiplied by the corresponding shear multiplier"}} );
m_summaryToDescMap.insert(
{"BPSHLZI", {A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive I direction"}} );
m_summaryToDescMap.insert(
@@ -2008,8 +1988,7 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
m_summaryToDescMap.insert( {"BSURFST", {A::SUMMARY_BLOCK, "Surface tension"}} );
m_summaryToDescMap.insert(
{"BEWV_SUR", {A::SUMMARY_BLOCK, "Effective water viscosity due to surfactant concentration"}} );
m_summaryToDescMap.insert(
{"BESVIS", {A::SUMMARY_BLOCK, "Effective water viscosity due to surfactant concentration"}} );
m_summaryToDescMap.insert( {"BESVIS", {A::SUMMARY_BLOCK, "Effective water viscosity due to surfactant concentration"}} );
m_summaryToDescMap.insert( {"BTCNFALK", {A::SUMMARY_BLOCK, "Concentration"}} );
m_summaryToDescMap.insert( {"BTADSALK", {A::SUMMARY_BLOCK, "Adsorption"}} );
m_summaryToDescMap.insert( {"BTSTMALK", {A::SUMMARY_BLOCK, "Surface tension multiplier"}} );
@@ -2031,12 +2010,10 @@ void RiuSummaryQuantityNameInfoProvider::populateFieldToInfoMap()
"Opposite saturation direction turning point relative permeability to water for water-oil system"}} );
m_summaryToDescMap.insert(
{"BKROGT",
{A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to oil for oil-gas system"}} );
{A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to oil for oil-gas system"}} );
m_summaryToDescMap.insert(
{"BKRGOT",
{A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to gas for gas-oil system"}} );
{A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to gas for gas-oil system"}} );
m_summaryToDescMap.insert(
{"BKRGWT",
{A::SUMMARY_BLOCK,

View File

@@ -121,8 +121,8 @@ bool RiuTreeViewEventFilter::eventFilter( QObject* obj, QEvent* event )
}
else if ( keyEvent->matches( QKeySequence::Delete ) )
{
matches = caf::CmdFeatureManager::instance()->commandFeaturesMatchingKeyboardShortcut(
QKeySequence::Delete );
matches =
caf::CmdFeatureManager::instance()->commandFeaturesMatchingKeyboardShortcut( QKeySequence::Delete );
}
else
{

View File

@@ -436,8 +436,7 @@ void RiuViewer::paintOverlayItems( QPainter* painter )
}
{
m_shortInfoLabelCompView->setText( "<center>" + compView->ownerCase()->caseUserDescription() +
"</center>" );
m_shortInfoLabelCompView->setText( "<center>" + compView->ownerCase()->caseUserDescription() + "</center>" );
QPoint topLeft = QPoint( compViewItemsXPos, yPos );
m_shortInfoLabelCompView->resize( columnWidth, m_shortInfoLabelCompView->sizeHint().height() );
m_shortInfoLabelCompView->render( painter, topLeft );
@@ -768,8 +767,7 @@ void RiuViewer::updateLegendLayout()
{
int legendWidth = prefSize.x();
legend->setLayoutFixedPosition( cvf::Vec2i( xPos, yPos ) );
legend->setRenderSize(
cvf::Vec2ui( legendWidth, viewPortHeight - 2 * border - 2 * edgeAxisBorderHeight ) );
legend->setRenderSize( cvf::Vec2ui( legendWidth, viewPortHeight - 2 * border - 2 * edgeAxisBorderHeight ) );
xPos += legendWidth + border;
}
else
@@ -1464,10 +1462,7 @@ void RiuViewer::updateOverlayItemsStyle()
QColor progressColor( Qt::green );
progressColor.setAlphaF( 0.8f );
backgroundColor.setAlphaF( 0.8f );
m_animationProgress->setTextBackgroundAndProgressColor( contrastColor,
backgroundColor,
backgroundFrameColor,
progressColor );
m_animationProgress->setTextBackgroundAndProgressColor( contrastColor, backgroundColor, backgroundFrameColor, progressColor );
m_animationProgressCompView->setTextBackgroundAndProgressColor( contrastColor,
backgroundColor,
backgroundFrameColor,

View File

@@ -228,8 +228,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
for ( const auto& pickItem : pickItemInfos )
{
const RivObjectSourceInfo* objectSourceInfo = dynamic_cast<const RivObjectSourceInfo*>(
pickItem.sourceInfo() );
const RivObjectSourceInfo* objectSourceInfo = dynamic_cast<const RivObjectSourceInfo*>( pickItem.sourceInfo() );
if ( objectSourceInfo && dynamic_cast<RimWellPathComponentInterface*>( objectSourceInfo->object() ) )
{
// Store any component hit, but keep going to find main well path
@@ -275,8 +274,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
{
const RivSourceInfo* rivSourceInfo = dynamic_cast<const RivSourceInfo*>( firstHitPart->sourceInfo() );
const RivFemPickSourceInfo* femSourceInfo = dynamic_cast<const RivFemPickSourceInfo*>(
firstHitPart->sourceInfo() );
const RivFemPickSourceInfo* femSourceInfo = dynamic_cast<const RivFemPickSourceInfo*>( firstHitPart->sourceInfo() );
const RivReservoirSurfaceIntersectionSourceInfo* surfIntersectSourceInfo =
dynamic_cast<const RivReservoirSurfaceIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
@@ -284,8 +282,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
const RivExtrudedCurveIntersectionSourceInfo* crossSectionSourceInfo =
dynamic_cast<const RivExtrudedCurveIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo = dynamic_cast<const RivBoxIntersectionSourceInfo*>(
firstHitPart->sourceInfo() );
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo =
dynamic_cast<const RivBoxIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
if ( rivSourceInfo || femSourceInfo || crossSectionSourceInfo || intersectionBoxSourceInfo ||
surfIntersectSourceInfo )
@@ -431,8 +429,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
if ( eclipseView )
{
// Hide faults command
const RigFault* fault = eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace( m_currentCellIndex,
m_currentFaceIndex );
const RigFault* fault =
eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace( m_currentCellIndex, m_currentFaceIndex );
if ( fault )
{
menuBuilder.addSeparator();
@@ -458,9 +456,9 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
// Well log curve creation commands
if ( firstHitPart && firstHitPart->sourceInfo() )
{
RimWellPath* wellPath = nullptr;
const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(
firstHitPart->sourceInfo() );
RimWellPath* wellPath = nullptr;
const RivWellPathSourceInfo* wellPathSourceInfo =
dynamic_cast<const RivWellPathSourceInfo*>( firstHitPart->sourceInfo() );
if ( wellPathSourceInfo )
{
wellPath = wellPathSourceInfo->wellPath();
@@ -469,8 +467,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
RimWellPathComponentInterface* wellPathComponent = nullptr;
if ( additionalHitPart )
{
const RivObjectSourceInfo* objectSourceInfo = dynamic_cast<const RivObjectSourceInfo*>(
additionalHitPart->sourceInfo() );
const RivObjectSourceInfo* objectSourceInfo =
dynamic_cast<const RivObjectSourceInfo*>( additionalHitPart->sourceInfo() );
if ( objectSourceInfo )
{
wellPathComponent = dynamic_cast<RimWellPathComponentInterface*>( objectSourceInfo->object() );
@@ -485,9 +483,9 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
if ( int2dView ) pickedPositionInUTM = int2dView->transformToUtm( pickedPositionInUTM );
double measuredDepth = wellPathSourceInfo->measuredDepth( firstPartTriangleIndex, pickedPositionInUTM );
cvf::Vec3d closestPointOnCenterLine = wellPathSourceInfo->closestPointOnCenterLine( firstPartTriangleIndex,
pickedPositionInUTM );
RiuSelectionItem* selItem = new RiuWellPathSelectionItem( wellPathSourceInfo,
cvf::Vec3d closestPointOnCenterLine =
wellPathSourceInfo->closestPointOnCenterLine( firstPartTriangleIndex, pickedPositionInUTM );
RiuSelectionItem* selItem = new RiuWellPathSelectionItem( wellPathSourceInfo,
closestPointOnCenterLine,
measuredDepth,
wellPathComponent );
@@ -541,8 +539,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
menuBuilder << "RicNewWellPathIntersectionFeature";
}
const RivSimWellPipeSourceInfo* eclipseWellSourceInfo = dynamic_cast<const RivSimWellPipeSourceInfo*>(
firstHitPart->sourceInfo() );
const RivSimWellPipeSourceInfo* eclipseWellSourceInfo =
dynamic_cast<const RivSimWellPipeSourceInfo*>( firstHitPart->sourceInfo() );
if ( eclipseWellSourceInfo )
{
RimSimWellInView* well = eclipseWellSourceInfo->well();
@@ -753,12 +751,10 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
}
RimStimPlanFractureTemplate* stimPlanTempl = fracture ? dynamic_cast<RimStimPlanFractureTemplate*>(
fracture->fractureTemplate() )
: nullptr;
RimEllipseFractureTemplate* ellipseTempl = fracture ? dynamic_cast<RimEllipseFractureTemplate*>(
fracture->fractureTemplate() )
: nullptr;
RimStimPlanFractureTemplate* stimPlanTempl =
fracture ? dynamic_cast<RimStimPlanFractureTemplate*>( fracture->fractureTemplate() ) : nullptr;
RimEllipseFractureTemplate* ellipseTempl =
fracture ? dynamic_cast<RimEllipseFractureTemplate*>( fracture->fractureTemplate() ) : nullptr;
if ( stimPlanTempl || ellipseTempl )
{
// Set fracture resultInfo text
@@ -806,8 +802,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
else if ( const RivExtrudedCurveIntersectionSourceInfo* crossSectionSourceInfo =
dynamic_cast<const RivExtrudedCurveIntersectionSourceInfo*>( firstHitPart->sourceInfo() ) )
{
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) ==
nullptr;
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) == nullptr;
RiuMainWindow::instance()->selectAsCurrentItem( crossSectionSourceInfo->intersection(),
allowActiveViewChange );
@@ -819,18 +814,16 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
else if ( eclipseWellSourceInfo )
{
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) ==
nullptr;
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) == nullptr;
RiuMainWindow::instance()->selectAsCurrentItem( eclipseWellSourceInfo->well(), allowActiveViewChange );
}
else if ( wellConnectionSourceInfo )
{
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) ==
nullptr;
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) == nullptr;
size_t globalCellIndex = wellConnectionSourceInfo->globalCellIndexFromTriangleIndex(
firstPartTriangleIndex );
size_t globalCellIndex =
wellConnectionSourceInfo->globalCellIndexFromTriangleIndex( firstPartTriangleIndex );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
if ( eclipseView )
@@ -844,8 +837,9 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
std::vector<RigCompletionData> completionsForOneCell;
{
auto connectionFactors = eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities();
size_t timeStep = eclipseView->currentTimeStep();
auto connectionFactors =
eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities();
size_t timeStep = eclipseView->currentTimeStep();
const auto& multipleCompletions =
connectionFactors->multipleCompletionsPerEclipseCell( wellConnectionSourceInfo->wellPath(),
@@ -867,8 +861,8 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
QString resultInfoText;
resultInfoText += QString( "<b>Well Connection Factor :</b> %1<br><br>" )
.arg( aggregatedConnectionFactor );
resultInfoText +=
QString( "<b>Well Connection Factor :</b> %1<br><br>" ).arg( aggregatedConnectionFactor );
{
RiuResultTextBuilder textBuilder( eclipseView,
@@ -904,13 +898,12 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
const RivSimWellConnectionSourceInfo* simWellConnectionSourceInfo =
dynamic_cast<const RivSimWellConnectionSourceInfo*>( firstHitPart->sourceInfo() );
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) ==
nullptr;
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) == nullptr;
size_t globalCellIndex = simWellConnectionSourceInfo->globalCellIndexFromTriangleIndex(
firstPartTriangleIndex );
double connectionFactor = simWellConnectionSourceInfo->connectionFactorFromTriangleIndex(
firstPartTriangleIndex );
size_t globalCellIndex =
simWellConnectionSourceInfo->globalCellIndexFromTriangleIndex( firstPartTriangleIndex );
double connectionFactor =
simWellConnectionSourceInfo->connectionFactorFromTriangleIndex( firstPartTriangleIndex );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
if ( eclipseView )
@@ -924,10 +917,9 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
auto connectionFactors = eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities();
size_t timeStep = eclipseView->currentTimeStep();
const auto& completionData = connectionFactors->completionsForSimWell( simWellConnectionSourceInfo
->simWellInView()
->simWellData(),
timeStep );
const auto& completionData =
connectionFactors->completionsForSimWell( simWellConnectionSourceInfo->simWellInView()->simWellData(),
timeStep );
for ( const auto& compData : completionData )
{
@@ -935,8 +927,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
{
{
QString resultInfoText =
QString( "<b>Simulation Well Connection Factor :</b> %1<br><br>" )
.arg( connectionFactor );
QString( "<b>Simulation Well Connection Factor :</b> %1<br><br>" ).arg( connectionFactor );
{
RiuResultTextBuilder textBuilder( eclipseView,

View File

@@ -82,12 +82,7 @@ public:
size_t* gridIndex );
private:
void ijkFromCellIndex( Rim3dView* mainOrComparisonView,
size_t gridIdx,
size_t cellIndex,
size_t* i,
size_t* j,
size_t* k );
void ijkFromCellIndex( Rim3dView* mainOrComparisonView, size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k );
bool handleOverlayItemPicking( int winPosX, int winPosY );
void handleTextPicking( int winPosX, int winPosY, cvf::HitItemCollection* hitItems );

View File

@@ -56,12 +56,8 @@ protected:
QString curveInfoText;
QString depthAxisValueString;
QString xAxisValueString;
QPointF closestPoint = closestCurvePoint( pos,
&curveInfoText,
&xAxisValueString,
&depthAxisValueString,
&relatedXAxis,
&relatedYAxis );
QPointF closestPoint =
closestCurvePoint( pos, &curveInfoText, &xAxisValueString, &depthAxisValueString, &relatedXAxis, &relatedYAxis );
if ( !closestPoint.isNull() )
{
QString str = QString( "depth = %1, value = %2" ).arg( depthAxisValueString ).arg( xAxisValueString );

View File

@@ -201,16 +201,8 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
double markerDepth = startDepth;
while ( markerDepth < endDepth - 5 )
{
addMarker( -casingTrackEnd,
markerDepth,
markerSize,
RiuQwtSymbol::SYMBOL_LEFT_ALIGNED_TRIANGLE,
componentColor() );
addMarker( casingTrackEnd,
markerDepth,
markerSize,
RiuQwtSymbol::SYMBOL_RIGHT_ALIGNED_TRIANGLE,
componentColor() );
addMarker( -casingTrackEnd, markerDepth, markerSize, RiuQwtSymbol::SYMBOL_LEFT_ALIGNED_TRIANGLE, componentColor() );
addMarker( casingTrackEnd, markerDepth, markerSize, RiuQwtSymbol::SYMBOL_RIGHT_ALIGNED_TRIANGLE, componentColor() );
markerDepth += markerSpacing;
}
@@ -265,16 +257,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
{
for ( double md : m_subMDs )
{
addMarker( 0.0,
md,
16,
RiuQwtSymbol::SYMBOL_ELLIPSE,
componentColor(),
"",
Qt::AlignCenter,
Qt::Horizontal,
false,
true );
addMarker( 0.0, md, 16, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor(), "", Qt::AlignCenter, Qt::Horizontal, false, true );
}
m_combinedComponentGroup.addLegendItem(
createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) );
@@ -283,16 +266,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
{
for ( double md : m_subMDs )
{
addMarker( 0.0,
md,
16,
RiuQwtSymbol::SYMBOL_ELLIPSE,
componentColor(),
"",
Qt::AlignCenter,
Qt::Horizontal,
false,
true );
addMarker( 0.0, md, 16, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor(), "", Qt::AlignCenter, Qt::Horizontal, false, true );
}
m_combinedComponentGroup.addLegendItem(
createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) );
@@ -301,16 +275,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
{
for ( double md : m_subMDs )
{
addMarker( 0.0,
md,
16,
RiuQwtSymbol::SYMBOL_ELLIPSE,
componentColor(),
"",
Qt::AlignCenter,
Qt::Horizontal,
false,
true );
addMarker( 0.0, md, 16, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor(), "", Qt::AlignCenter, Qt::Horizontal, false, true );
}
m_combinedComponentGroup.addLegendItem(
createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) );
@@ -381,16 +346,8 @@ void RiuWellPathComponentPlotItem::addMarker( double posX
bool drawLine /*= false*/,
bool contrastTextColor /*= true*/ )
{
QwtPlotItem* marker = createMarker( posX,
depth,
size,
symbolType,
baseColor,
label,
labelAlignment,
labelOrientation,
drawLine,
contrastTextColor );
QwtPlotItem* marker =
createMarker( posX, depth, size, symbolType, baseColor, label, labelAlignment, labelOrientation, drawLine, contrastTextColor );
m_combinedComponentGroup.addPlotItem( marker );
}