clang-format: Set column width to 140

* Set column width to 140
* Use c++20
* Remove redundant virtual
This commit is contained in:
Magne Sjaastad
2023-02-26 10:48:40 +01:00
committed by GitHub
parent 8768e186d8
commit f8c5cf389f
1535 changed files with 10456 additions and 19398 deletions

View File

@@ -332,8 +332,8 @@ private:
RiuGroupedBarChartBuilder::RiuGroupedBarChartBuilder( bool sortGroupsByMaxValueInGroup )
: m_isSortingByMaxValueInGroups( sortGroupsByMaxValueInGroup )
{
m_labelPointSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(),
caf::FontTools::RelativeSize::Medium );
m_labelPointSize =
caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(), caf::FontTools::RelativeSize::Medium );
}
//--------------------------------------------------------------------------------------------------
@@ -441,16 +441,15 @@ void RiuGroupedBarChartBuilder::addBarChartToPlot( QwtPlot* plot, Qt::Orientatio
{
if ( !barDef.m_majTickText.isEmpty() )
{
auto it_IsInsertedPair =
maxValuesPerMajGroup.insert( std::make_pair( barDef.m_majTickText, barDef.m_sortValue ) );
auto it_IsInsertedPair = maxValuesPerMajGroup.insert( std::make_pair( barDef.m_majTickText, barDef.m_sortValue ) );
if ( !it_IsInsertedPair.second )
it_IsInsertedPair.first->second = std::max( it_IsInsertedPair.first->second, barDef.m_sortValue );
}
if ( !barDef.m_midTickText.isEmpty() )
{
auto it_IsInsertedPair = maxValuesPerMidGroup[barDef.m_majTickText].insert(
std::make_pair( barDef.m_midTickText, barDef.m_sortValue ) );
auto it_IsInsertedPair =
maxValuesPerMidGroup[barDef.m_majTickText].insert( std::make_pair( barDef.m_midTickText, barDef.m_sortValue ) );
if ( !it_IsInsertedPair.second )
it_IsInsertedPair.first->second = std::max( it_IsInsertedPair.first->second, barDef.m_sortValue );
}
@@ -692,8 +691,7 @@ void RiuGroupedBarChartBuilder::addBarChartToPlot( QwtPlot* plot, Qt::Orientatio
QColor textColor = RiuGuiTheme::getColorByVariableName( "textColor" );
RiuBarChartScaleDraw* scaleDrawer =
new RiuBarChartScaleDraw( groupPositionedAxisTexts, m_labelPointSize, textColor );
RiuBarChartScaleDraw* scaleDrawer = new RiuBarChartScaleDraw( groupPositionedAxisTexts, m_labelPointSize, textColor );
plot->setAxisScaleDraw( axis, scaleDrawer );
plot->setAxisScaleDiv( axis, groupAxisScaleDiv );
@@ -820,8 +818,7 @@ void RiuGroupedBarChartBuilder::addBarChartToPlot( QwtPlot* plot, Qt::Orientatio
QColor textColor = RiuGuiTheme::getColorByVariableName( "textColor" );
RiuBarChartScaleDraw* barTextScaleDrawer =
new RiuBarChartScaleDraw( positionedBarLabels, m_labelPointSize, textColor );
RiuBarChartScaleDraw* barTextScaleDrawer = new RiuBarChartScaleDraw( positionedBarLabels, m_labelPointSize, textColor );
barTextScaleDrawer->setAlignment( alignment );
barTextScaleDrawer->setLabelRotation( labelRotation );
barTextScaleDrawer->setLabelAlignment( labelAlignment );

View File

@@ -276,9 +276,9 @@ RiuGeoMechSelectionItem* Riu2dIntersectionSelectionItem::geoMechSelectionItem()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellPathSelectionItem::RiuWellPathSelectionItem( const RivWellPathSourceInfo* wellPathSourceInfo,
const cvf::Vec3d& pipeCenterLineIntersectionInDomainCoords,
double measuredDepth,
RiuWellPathSelectionItem::RiuWellPathSelectionItem( const RivWellPathSourceInfo* wellPathSourceInfo,
const cvf::Vec3d& pipeCenterLineIntersectionInDomainCoords,
double measuredDepth,
RimWellPathComponentInterface* component /*=nullptr*/ )
: m_pipeCenterlineIntersectionInDomainCoords( pipeCenterLineIntersectionInDomainCoords )
, m_measuredDepth( measuredDepth )

View File

@@ -49,7 +49,7 @@ QSize RiuAbstractLegendFrame::sizeHint() const
layoutInfo( &layout );
QFontMetrics fontMetrics( this->font() );
QRect titleRect = fontMetrics.boundingRect( QRect( 0, 0, 200, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_title );
QRect titleRect = fontMetrics.boundingRect( QRect( 0, 0, 200, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_title );
int preferredContentHeight = titleRect.height() + labelCount() * layout.lineSpacing + 1.0 * layout.lineSpacing;
int preferredHeight = preferredContentHeight + layout.margins.top() + layout.margins.bottom();
@@ -64,8 +64,7 @@ QSize RiuAbstractLegendFrame::sizeHint() const
maxTickTextWidth = std::max( maxTickTextWidth, textWidth );
}
int preferredWidth = layout.tickEndX + layout.margins.left() + layout.margins.right() + layout.tickTextLeadSpace +
maxTickTextWidth;
int preferredWidth = layout.tickEndX + layout.margins.left() + layout.margins.right() + layout.tickTextLeadSpace + maxTickTextWidth;
preferredWidth = std::max( preferredWidth, titleWidth );
preferredWidth = std::min( preferredWidth, 200 );
@@ -102,8 +101,7 @@ QSize RiuAbstractLegendFrame::minimumSizeHint() const
int lastTextWidth = fontMetrics.boundingRect( label( labelCount() - 1 ) ).width();
int maxTickTextWidth = std::max( firstTextWidth, lastTextWidth );
int preferredWidth = layout.tickEndX + layout.margins.left() + layout.margins.right() + layout.tickTextLeadSpace +
maxTickTextWidth;
int preferredWidth = layout.tickEndX + layout.margins.left() + layout.margins.right() + layout.tickTextLeadSpace + maxTickTextWidth;
preferredWidth = std::max( preferredWidth, titleWidth );
preferredWidth = std::min( preferredWidth, 400 );
@@ -136,9 +134,8 @@ void RiuAbstractLegendFrame::renderTo( QPainter* painter, const QRect& targetRec
td.setDocumentMargin( 0.0 );
td.setDefaultFont( this->font() );
QString formattedTitle = m_title;
td.setHtml( QString( "<body><font color='%1'>%2</font></body>" )
.arg( textColor.name() )
.arg( formattedTitle.replace( "\n", "<br />" ) ) );
td.setHtml(
QString( "<body><font color='%1'>%2</font></body>" ).arg( textColor.name() ).arg( formattedTitle.replace( "\n", "<br />" ) ) );
td.drawContents( painter );
painter->restore();
}

View File

@@ -69,9 +69,7 @@ RiuAdvancedSnapshotExportWidget::RiuAdvancedSnapshotExportWidget( QWidget* paren
m_pdmTableView->tableView()->setContextMenuPolicy( Qt::CustomContextMenu );
m_pdmTableView->enableHeaderText( false );
connect( m_pdmTableView->tableView(),
SIGNAL( customContextMenuRequested( QPoint ) ),
SLOT( customMenuRequested( QPoint ) ) );
connect( m_pdmTableView->tableView(), SIGNAL( customContextMenuRequested( QPoint ) ), SLOT( customMenuRequested( QPoint ) ) );
m_pdmTableView->setChildArrayField( &( project->multiSnapshotDefinitions() ) );
@@ -246,8 +244,7 @@ void RiuAdvancedSnapshotExportWidget::folderSelectionClicked()
{
QString defaultPath = m_exportFolderLineEdit->text();
QString directoryPath =
RiuFileDialogTools::getExistingDirectory( m_exportFolderLineEdit, tr( "Get existing directory" ), defaultPath );
QString directoryPath = RiuFileDialogTools::getExistingDirectory( m_exportFolderLineEdit, tr( "Get existing directory" ), defaultPath );
if ( !directoryPath.isEmpty() )
{

View File

@@ -69,8 +69,7 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
m_hasMovedMouseDuringNavigation = false;
isEventHandled = true;
}
else if ( me->button() == Qt::LeftButton ||
( me->button() == Qt::MiddleButton && ( me->modifiers() & Qt::ShiftModifier ) ) )
else if ( me->button() == Qt::LeftButton || ( me->button() == Qt::MiddleButton && ( me->modifiers() & Qt::ShiftModifier ) ) )
{
m_trackball->startNavigation( cvf::ManipulatorTrackball::PAN, translatedMousePosX, translatedMousePosY );
m_isNavigating = true;

View File

@@ -87,10 +87,7 @@ bool RiuCellAndNncPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eve
size_t indexToFirstNoneNncItem = cvf::UNDEFINED_SIZE_T;
size_t indexToNncItemNearFirstItem = cvf::UNDEFINED_SIZE_T;
RiuViewerCommands::findFirstItems( mainOrComparisonView,
pickItemInfos,
&indexToFirstNoneNncItem,
&indexToNncItemNearFirstItem );
RiuViewerCommands::findFirstItems( mainOrComparisonView, pickItemInfos, &indexToFirstNoneNncItem, &indexToNncItemNearFirstItem );
if ( indexToFirstNoneNncItem != cvf::UNDEFINED_SIZE_T )
{

View File

@@ -61,8 +61,8 @@ bool RiuComparisonViewMover::eventFilter( QObject* watched, QEvent* event )
if ( m_dragState == LEFT_EDGE )
{
QPointF mousePos = mEv->windowPos();
QPointF normMousePos = { mousePos.x() / m_viewer->width(), mousePos.y() / m_viewer->height() };
QPointF mousePos = mEv->windowPos();
QPointF normMousePos = { mousePos.x() / m_viewer->width(), mousePos.y() / m_viewer->height() };
cvf::Rectf orgCompViewWindow = m_viewer->comparisonViewVisibleNormalizedRect();
float minx = normMousePos.x();
@@ -117,11 +117,7 @@ void RiuComparisonViewMover::paintMoverHandles( QPainter* painter )
handleColor = QColor( 255, 255, 255, 50 );
}
painter->fillRect( leftEdgePos - handleThickness * 0.4,
bottomEdgePosQt - 8 * handleThickness,
handleThickness,
handleThickness * 6,
handleColor );
painter->fillRect( leftEdgePos - handleThickness * 0.4, bottomEdgePosQt - 8 * handleThickness, handleThickness, handleThickness * 6, handleColor );
}
//--------------------------------------------------------------------------------------------------
@@ -139,8 +135,7 @@ RiuComparisonViewMover::DragState RiuComparisonViewMover::findHandleUnderMouse(
int bottomEdgePosQt = height - viewerHeight * normalizedComparisonRect.min().y();
if ( ( leftEdgePos - handleThickness * 0.4 ) < mousePos.x() && mousePos.x() < ( leftEdgePos + handleThickness * 0.5 ) &&
( bottomEdgePosQt - 8 * handleThickness ) < mousePos.y() &&
mousePos.y() < ( bottomEdgePosQt - 2 * handleThickness ) )
( bottomEdgePosQt - 8 * handleThickness ) < mousePos.y() && mousePos.y() < ( bottomEdgePosQt - 2 * handleThickness ) )
{
return LEFT_EDGE;
}

View File

@@ -378,40 +378,33 @@ QByteArray RiuDockWidgetTools::defaultEclipseDockState()
// Clipboard" from the Windows menu and paste the exported text into this file to update the default states.
static const char stateData[] =
{ '\x00', '\x00', '\x06', '\x13', '\x78', '\xda', '\x95', '\x54', '\xdf', '\x4f', '\xc2', '\x30', '\x10',
'\x7e', '\xf7', '\xaf', '\x68', '\xf6', '\xae', '\x30', '\xc6', '\x94', '\x25', '\x80', '\x31', '\xa0',
'\x89', '\x0f', '\x28', '\x3a', '\xd0', '\x47', '\x53', '\xbb', '\x13', '\xab', '\x5d', '\x4b', '\xae',
'\x07', '\xfe', '\x88', '\x7f', '\xbc', '\x1d', '\x18', '\x12', '\xa0', '\xdb', '\xe4', '\x69', '\xdd',
'\xdd', '\xf7', '\xf5', '\xfb', '\xae', '\xbd', '\x6b', '\xf7', '\xfc', '\x33', '\x57', '\x6c', '\x09',
'\x68', '\xa5', '\xd1', '\xbd', '\x20', '\x3c', '\x69', '\x06', '\x0c', '\xb4', '\x30', '\x99', '\xd4',
'\xb3', '\x5e', '\x30', '\x9d', '\x5c', '\x1d', '\x77', '\x82', '\xf3', '\x7e', '\xf7', '\x8e', '\x2e',
'\xb2', '\x25', '\xd7', '\x02', '\xb2', '\xa1', '\x11', '\xef', '\x2e', '\x97', '\x7e', '\x59', '\x82',
'\x9c', '\x3d', '\x6c', '\x88', '\x01', '\x9b', '\x5a', '\xc0', '\xcd', '\x7f', '\x2b', '\x60', '\x03',
'\xa3', '\x89', '\x4b', '\xed', '\x22', '\xab', '\xf4', '\x00', '\x34', '\x21', '\x57', '\x8f', '\x32',
'\x9b', '\x01', '\xf5', '\x82', '\xcc', '\xed', '\x13', '\x0d', '\x1f', '\xa5', '\xce', '\xcc', '\xc7',
'\x53', '\xee', '\x70', '\xeb', '\x65', '\xd0', '\xef', '\x6e', '\x78', '\xec', '\x4a', '\x19', '\x4e',
'\x2b', '\x23', '\x4d', '\x17', '\x4f', '\xe7', '\x4a', '\x12', '\xb9', '\xf0', '\x2d', '\x4a', '\xb7',
'\x97', '\xcb', '\x14', '\x42', '\x3f', '\x85', '\xd0', '\x42', '\x53', '\x21', '\x59', '\x86', '\x39',
'\xde', '\xc2', '\x5c', '\x20', '\x70', '\x36', '\xe1', '\xcf', '\xce', '\x56', '\xe4', '\x12', '\x0b',
'\x44', '\xd0', '\x7f', '\x86', '\xc6', '\x68', '\xde', '\x40', '\xd0', '\x04', '\x01', '\xb6', '\x3d',
'\xad', '\x5d', '\xb3', '\x1b', '\x9e', '\x43', '\x25', '\x92', '\x0d', '\x94', '\xb1', '\x90', '\x15',
'\x86', '\x1b', '\x1e', '\xd6', '\x90', '\x13', '\x4f', '\xcd', '\x02', '\x05', '\x1c', '\x48', '\x4c',
'\x05', '\xca', '\x39', '\xd9', '\x6a', '\x56', '\xa3', '\xa8', '\x6c', '\xab', '\xbe', '\x70', '\xbf',
'\xbe', '\x39', '\x20', '\x7d', '\x5d', '\x66', '\x92', '\x0c', '\xd6', '\x97', '\x58', '\x02', '\xf6',
'\xca', '\xa6', '\xf2', '\x1b', '\x6c', '\xff', '\xac', '\xd3', '\x62', '\xed', '\xd3', '\x0e', '\xeb',
'\x36', '\xd6', '\xff', '\xee', '\xfb', '\x77', '\x25', '\x07', '\x5f', '\xce', '\xae', '\x79', '\x5f',
'\xb7', '\xb8', '\x16', '\xe1', '\xb3', '\x15', '\xd6', '\x53', '\x80', '\x97', '\xe0', '\xb5', '\x5e',
'\xd3', '\x59', '\x51', '\xb5', '\xb1', '\x7b', '\xb0', '\x0b', '\x45', '\xd7', '\xfa', '\xc5', '\xd4',
'\x9c', '\xa8', '\x1f', '\x58', '\x77', '\x89', '\x6d', '\xaf', '\xdc', '\x58', '\x19', '\xfa', '\x97',
'\xdc', '\x2e', '\xb0', '\xa6', '\xd3', '\x46', '\xe6', '\x15', '\xed', '\x40', '\xa2', '\x50', '\x50',
'\xca', '\x0c', '\xbd', '\xcc', '\x7b', '\x50', '\x63', '\xc0', '\xfc', '\x40', '\xbd', '\xf1', '\xb2',
'\xc6', '\xe1', '\xfe', '\x81', '\xec', '\x4e', '\xed', '\x08', '\xac', '\xe5', '\x33', '\xb0', '\x35',
'\xc7', '\xe1', '\x83', '\xd5', '\x99', '\x43', '\x23', '\x1c', '\x6b', '\x64', '\x74', '\xf5', '\x08',
'\xec', '\x11', '\xa7', '\x0e', '\x94', '\x12', '\x17', '\xef', '\xff', '\x1c', '\x9b', '\x28', '\x89',
'\x59', '\xd8', '\x4a', '\x9a', '\xac', '\x1d', '\x97', '\xcc', '\xce', '\x2a', '\xd2', '\x49', '\x4e',
'\x59', '\x14', '\xb7', '\x2b', '\x10', '\x51', '\x92', '\xb0', '\x56', '\x18', '\xc7', '\x5e', '\x48',
'\x63', '\xf3', '\xb4', '\xba', '\x75', '\xc9', '\x93', '\xde', '\x3f', '\xfa', '\x05', '\x48', '\x0b',
'\x16', '\x15' };
{ '\x00', '\x00', '\x06', '\x13', '\x78', '\xda', '\x95', '\x54', '\xdf', '\x4f', '\xc2', '\x30', '\x10', '\x7e', '\xf7', '\xaf',
'\x68', '\xf6', '\xae', '\x30', '\xc6', '\x94', '\x25', '\x80', '\x31', '\xa0', '\x89', '\x0f', '\x28', '\x3a', '\xd0', '\x47',
'\x53', '\xbb', '\x13', '\xab', '\x5d', '\x4b', '\xae', '\x07', '\xfe', '\x88', '\x7f', '\xbc', '\x1d', '\x18', '\x12', '\xa0',
'\xdb', '\xe4', '\x69', '\xdd', '\xdd', '\xf7', '\xf5', '\xfb', '\xae', '\xbd', '\x6b', '\xf7', '\xfc', '\x33', '\x57', '\x6c',
'\x09', '\x68', '\xa5', '\xd1', '\xbd', '\x20', '\x3c', '\x69', '\x06', '\x0c', '\xb4', '\x30', '\x99', '\xd4', '\xb3', '\x5e',
'\x30', '\x9d', '\x5c', '\x1d', '\x77', '\x82', '\xf3', '\x7e', '\xf7', '\x8e', '\x2e', '\xb2', '\x25', '\xd7', '\x02', '\xb2',
'\xa1', '\x11', '\xef', '\x2e', '\x97', '\x7e', '\x59', '\x82', '\x9c', '\x3d', '\x6c', '\x88', '\x01', '\x9b', '\x5a', '\xc0',
'\xcd', '\x7f', '\x2b', '\x60', '\x03', '\xa3', '\x89', '\x4b', '\xed', '\x22', '\xab', '\xf4', '\x00', '\x34', '\x21', '\x57',
'\x8f', '\x32', '\x9b', '\x01', '\xf5', '\x82', '\xcc', '\xed', '\x13', '\x0d', '\x1f', '\xa5', '\xce', '\xcc', '\xc7', '\x53',
'\xee', '\x70', '\xeb', '\x65', '\xd0', '\xef', '\x6e', '\x78', '\xec', '\x4a', '\x19', '\x4e', '\x2b', '\x23', '\x4d', '\x17',
'\x4f', '\xe7', '\x4a', '\x12', '\xb9', '\xf0', '\x2d', '\x4a', '\xb7', '\x97', '\xcb', '\x14', '\x42', '\x3f', '\x85', '\xd0',
'\x42', '\x53', '\x21', '\x59', '\x86', '\x39', '\xde', '\xc2', '\x5c', '\x20', '\x70', '\x36', '\xe1', '\xcf', '\xce', '\x56',
'\xe4', '\x12', '\x0b', '\x44', '\xd0', '\x7f', '\x86', '\xc6', '\x68', '\xde', '\x40', '\xd0', '\x04', '\x01', '\xb6', '\x3d',
'\xad', '\x5d', '\xb3', '\x1b', '\x9e', '\x43', '\x25', '\x92', '\x0d', '\x94', '\xb1', '\x90', '\x15', '\x86', '\x1b', '\x1e',
'\xd6', '\x90', '\x13', '\x4f', '\xcd', '\x02', '\x05', '\x1c', '\x48', '\x4c', '\x05', '\xca', '\x39', '\xd9', '\x6a', '\x56',
'\xa3', '\xa8', '\x6c', '\xab', '\xbe', '\x70', '\xbf', '\xbe', '\x39', '\x20', '\x7d', '\x5d', '\x66', '\x92', '\x0c', '\xd6',
'\x97', '\x58', '\x02', '\xf6', '\xca', '\xa6', '\xf2', '\x1b', '\x6c', '\xff', '\xac', '\xd3', '\x62', '\xed', '\xd3', '\x0e',
'\xeb', '\x36', '\xd6', '\xff', '\xee', '\xfb', '\x77', '\x25', '\x07', '\x5f', '\xce', '\xae', '\x79', '\x5f', '\xb7', '\xb8',
'\x16', '\xe1', '\xb3', '\x15', '\xd6', '\x53', '\x80', '\x97', '\xe0', '\xb5', '\x5e', '\xd3', '\x59', '\x51', '\xb5', '\xb1',
'\x7b', '\xb0', '\x0b', '\x45', '\xd7', '\xfa', '\xc5', '\xd4', '\x9c', '\xa8', '\x1f', '\x58', '\x77', '\x89', '\x6d', '\xaf',
'\xdc', '\x58', '\x19', '\xfa', '\x97', '\xdc', '\x2e', '\xb0', '\xa6', '\xd3', '\x46', '\xe6', '\x15', '\xed', '\x40', '\xa2',
'\x50', '\x50', '\xca', '\x0c', '\xbd', '\xcc', '\x7b', '\x50', '\x63', '\xc0', '\xfc', '\x40', '\xbd', '\xf1', '\xb2', '\xc6',
'\xe1', '\xfe', '\x81', '\xec', '\x4e', '\xed', '\x08', '\xac', '\xe5', '\x33', '\xb0', '\x35', '\xc7', '\xe1', '\x83', '\xd5',
'\x99', '\x43', '\x23', '\x1c', '\x6b', '\x64', '\x74', '\xf5', '\x08', '\xec', '\x11', '\xa7', '\x0e', '\x94', '\x12', '\x17',
'\xef', '\xff', '\x1c', '\x9b', '\x28', '\x89', '\x59', '\xd8', '\x4a', '\x9a', '\xac', '\x1d', '\x97', '\xcc', '\xce', '\x2a',
'\xd2', '\x49', '\x4e', '\x59', '\x14', '\xb7', '\x2b', '\x10', '\x51', '\x92', '\xb0', '\x56', '\x18', '\xc7', '\x5e', '\x48',
'\x63', '\xf3', '\xb4', '\xba', '\x75', '\xc9', '\x93', '\xde', '\x3f', '\xfa', '\x05', '\x48', '\x0b', '\x16', '\x15' };
QByteArray retVal( stateData, sizeof( stateData ) );
@@ -424,40 +417,33 @@ QByteArray RiuDockWidgetTools::defaultEclipseDockState()
QByteArray RiuDockWidgetTools::defaultGeoMechDockState()
{
static const char stateData[] =
{ '\x00', '\x00', '\x06', '\x13', '\x78', '\xda', '\x95', '\x54', '\xdf', '\x4f', '\xc2', '\x30', '\x10',
'\x7e', '\xf7', '\xaf', '\x68', '\xf6', '\x8e', '\xb0', '\x8d', '\x29', '\x4b', '\xf8', '\x11', '\x03',
'\x9a', '\xf8', '\x80', '\xa2', '\x03', '\x79', '\x34', '\xb5', '\x3b', '\xb1', '\xda', '\xb5', '\xa4',
'\x3d', '\xf0', '\x47', '\xfc', '\xe3', '\xed', '\x86', '\x21', '\x01', '\xba', '\x0d', '\x9e', '\xda',
'\xde', '\x7d', '\x5f', '\xef', '\xbb', '\xeb', '\x5d', '\xbb', '\x83', '\xaf', '\x4c', '\x90', '\x35',
'\x68', '\xc3', '\x95', '\xec', '\x79', '\xfe', '\x79', '\xcb', '\x23', '\x20', '\x99', '\x4a', '\xb9',
'\x5c', '\xf4', '\xbc', '\xd9', '\xf4', '\xa6', '\xd1', '\xf1', '\x06', '\xfd', '\xee', '\x03', '\x5e',
'\xa5', '\x6b', '\x2a', '\x19', '\xa4', '\x23', '\xc5', '\x3e', '\xac', '\x2f', '\xf9', '\x36', '\x08',
'\x19', '\x79', '\xda', '\x12', '\x3d', '\x32', '\x33', '\xa0', '\xb7', '\xe7', '\xc0', '\x23', '\x43',
'\x25', '\x91', '\x72', '\x69', '\x2d', '\x85', '\x7b', '\x08', '\x12', '\x35', '\x15', '\x73', '\x9e',
'\x2e', '\x00', '\x7b', '\x5e', '\x6a', '\xef', '\x09', '\x47', '\x73', '\x2e', '\x53', '\xf5', '\xf9',
'\x9c', '\x59', '\xdc', '\x66', '\xeb', '\xf5', '\xbb', '\x5b', '\x1e', '\xb9', '\x11', '\x8a', '\x62',
'\x21', '\xa4', '\x65', '\xed', '\xc9', '\x52', '\x70', '\x44', '\x6b', '\xbe', '\xd7', '\xdc', '\xde',
'\x65', '\x3d', '\x79', '\xa0', '\xdf', '\x3c', '\xd0', '\x4a', '\x62', '\x1e', '\xb2', '\x0c', '\xd3',
'\xd8', '\xc1', '\x5c', '\x69', '\xa0', '\x64', '\x4a', '\x5f', '\xac', '\xac', '\xd0', '\x3a', '\x56',
'\x5a', '\x83', '\xfc', '\x17', '\x34', '\xd1', '\xea', '\x1d', '\x18', '\x4e', '\x35', '\xc0', '\xae',
'\xa6', '\x8d', '\x6a', '\x72', '\x47', '\x33', '\xa8', '\x44', '\x92', '\xa1', '\x50', '\x06', '\xd2',
'\x5c', '\x70', '\xd3', '\xc1', '\x1a', '\x51', '\xa4', '\x89', '\x5a', '\x69', '\x06', '\x27', '\x12',
'\x13', '\xa6', '\xf9', '\x12', '\x4d', '\x35', '\xab', '\x99', '\x67', '\xb6', '\x93', '\x9f', '\x7f',
'\x98', '\xdf', '\x12', '\x34', '\x7e', '\x5f', '\xa7', '\x1c', '\x95', '\xae', '\x4f', '\xb1', '\x04',
'\xec', '\x0c', '\x9b', '\xf0', '\x1f', '\x30', '\xfd', '\xcb', '\x4e', '\x40', '\xda', '\x17', '\x1d',
'\xd2', '\x6d', '\x6e', '\xce', '\x76', '\xfd', '\x7f', '\x92', '\x93', '\x1f', '\x67', '\x5f', '\xbc',
'\xab', '\x5b', '\x6c', '\x8b', '\xd0', '\x45', '\x81', '\x75', '\x24', '\xe0', '\x24', '\x38', '\xa5',
'\xd7', '\x74', '\x56', '\x58', '\x2d', '\xec', '\x11', '\xcc', '\x4a', '\xe0', '\xad', '\x7c', '\x55',
'\x35', '\x15', '\x75', '\x03', '\xeb', '\x1e', '\xb1', '\xed', '\x0c', '\x37', '\x11', '\x0a', '\x8f',
'\x0a', '\xb7', '\x0f', '\xac', '\xe9', '\xb4', '\xb1', '\x7a', '\xd3', '\x66', '\xc8', '\x35', '\x13',
'\x70', '\x22', '\xf3', '\x11', '\xc4', '\x04', '\x74', '\x56', '\xca', '\xf2', '\x9d', '\xac', '\xc9',
'\x1a', '\xab', '\x19', '\x87', '\x05', '\xd9', '\x9f', '\xda', '\x31', '\x18', '\x43', '\x17', '\x60',
'\x6a', '\xca', '\xe1', '\x82', '\xd5', '\xa4', '\x64', '\x47', '\x80', '\x59', '\xd6', '\x58', '\xc9',
'\xea', '\x11', '\x38', '\x20', '\xce', '\x2c', '\x28', '\x41', '\xca', '\x3e', '\x8e', '\x1c', '\x9b',
'\x30', '\x8e', '\x88', '\x1f', '\xc4', '\x2d', '\xd2', '\x8e', '\x4a', '\x66', '\xa7', '\xb0', '\x74',
'\xe2', '\x0b', '\x12', '\x46', '\xed', '\x0a', '\x44', '\x18', '\xc7', '\x24', '\xf0', '\xa3', '\xc8',
'\x09', '\x69', '\x6e', '\xbf', '\x56', '\xbb', '\x2f', '\xf9', '\xd2', '\xfb', '\x67', '\x7f', '\x49',
'\x4b', '\x16', '\x16' };
{ '\x00', '\x00', '\x06', '\x13', '\x78', '\xda', '\x95', '\x54', '\xdf', '\x4f', '\xc2', '\x30', '\x10', '\x7e', '\xf7', '\xaf',
'\x68', '\xf6', '\x8e', '\xb0', '\x8d', '\x29', '\x4b', '\xf8', '\x11', '\x03', '\x9a', '\xf8', '\x80', '\xa2', '\x03', '\x79',
'\x34', '\xb5', '\x3b', '\xb1', '\xda', '\xb5', '\xa4', '\x3d', '\xf0', '\x47', '\xfc', '\xe3', '\xed', '\x86', '\x21', '\x01',
'\xba', '\x0d', '\x9e', '\xda', '\xde', '\x7d', '\x5f', '\xef', '\xbb', '\xeb', '\x5d', '\xbb', '\x83', '\xaf', '\x4c', '\x90',
'\x35', '\x68', '\xc3', '\x95', '\xec', '\x79', '\xfe', '\x79', '\xcb', '\x23', '\x20', '\x99', '\x4a', '\xb9', '\x5c', '\xf4',
'\xbc', '\xd9', '\xf4', '\xa6', '\xd1', '\xf1', '\x06', '\xfd', '\xee', '\x03', '\x5e', '\xa5', '\x6b', '\x2a', '\x19', '\xa4',
'\x23', '\xc5', '\x3e', '\xac', '\x2f', '\xf9', '\x36', '\x08', '\x19', '\x79', '\xda', '\x12', '\x3d', '\x32', '\x33', '\xa0',
'\xb7', '\xe7', '\xc0', '\x23', '\x43', '\x25', '\x91', '\x72', '\x69', '\x2d', '\x85', '\x7b', '\x08', '\x12', '\x35', '\x15',
'\x73', '\x9e', '\x2e', '\x00', '\x7b', '\x5e', '\x6a', '\xef', '\x09', '\x47', '\x73', '\x2e', '\x53', '\xf5', '\xf9', '\x9c',
'\x59', '\xdc', '\x66', '\xeb', '\xf5', '\xbb', '\x5b', '\x1e', '\xb9', '\x11', '\x8a', '\x62', '\x21', '\xa4', '\x65', '\xed',
'\xc9', '\x52', '\x70', '\x44', '\x6b', '\xbe', '\xd7', '\xdc', '\xde', '\x65', '\x3d', '\x79', '\xa0', '\xdf', '\x3c', '\xd0',
'\x4a', '\x62', '\x1e', '\xb2', '\x0c', '\xd3', '\xd8', '\xc1', '\x5c', '\x69', '\xa0', '\x64', '\x4a', '\x5f', '\xac', '\xac',
'\xd0', '\x3a', '\x56', '\x5a', '\x83', '\xfc', '\x17', '\x34', '\xd1', '\xea', '\x1d', '\x18', '\x4e', '\x35', '\xc0', '\xae',
'\xa6', '\x8d', '\x6a', '\x72', '\x47', '\x33', '\xa8', '\x44', '\x92', '\xa1', '\x50', '\x06', '\xd2', '\x5c', '\x70', '\xd3',
'\xc1', '\x1a', '\x51', '\xa4', '\x89', '\x5a', '\x69', '\x06', '\x27', '\x12', '\x13', '\xa6', '\xf9', '\x12', '\x4d', '\x35',
'\xab', '\x99', '\x67', '\xb6', '\x93', '\x9f', '\x7f', '\x98', '\xdf', '\x12', '\x34', '\x7e', '\x5f', '\xa7', '\x1c', '\x95',
'\xae', '\x4f', '\xb1', '\x04', '\xec', '\x0c', '\x9b', '\xf0', '\x1f', '\x30', '\xfd', '\xcb', '\x4e', '\x40', '\xda', '\x17',
'\x1d', '\xd2', '\x6d', '\x6e', '\xce', '\x76', '\xfd', '\x7f', '\x92', '\x93', '\x1f', '\x67', '\x5f', '\xbc', '\xab', '\x5b',
'\x6c', '\x8b', '\xd0', '\x45', '\x81', '\x75', '\x24', '\xe0', '\x24', '\x38', '\xa5', '\xd7', '\x74', '\x56', '\x58', '\x2d',
'\xec', '\x11', '\xcc', '\x4a', '\xe0', '\xad', '\x7c', '\x55', '\x35', '\x15', '\x75', '\x03', '\xeb', '\x1e', '\xb1', '\xed',
'\x0c', '\x37', '\x11', '\x0a', '\x8f', '\x0a', '\xb7', '\x0f', '\xac', '\xe9', '\xb4', '\xb1', '\x7a', '\xd3', '\x66', '\xc8',
'\x35', '\x13', '\x70', '\x22', '\xf3', '\x11', '\xc4', '\x04', '\x74', '\x56', '\xca', '\xf2', '\x9d', '\xac', '\xc9', '\x1a',
'\xab', '\x19', '\x87', '\x05', '\xd9', '\x9f', '\xda', '\x31', '\x18', '\x43', '\x17', '\x60', '\x6a', '\xca', '\xe1', '\x82',
'\xd5', '\xa4', '\x64', '\x47', '\x80', '\x59', '\xd6', '\x58', '\xc9', '\xea', '\x11', '\x38', '\x20', '\xce', '\x2c', '\x28',
'\x41', '\xca', '\x3e', '\x8e', '\x1c', '\x9b', '\x30', '\x8e', '\x88', '\x1f', '\xc4', '\x2d', '\xd2', '\x8e', '\x4a', '\x66',
'\xa7', '\xb0', '\x74', '\xe2', '\x0b', '\x12', '\x46', '\xed', '\x0a', '\x44', '\x18', '\xc7', '\x24', '\xf0', '\xa3', '\xc8',
'\x09', '\x69', '\x6e', '\xbf', '\x56', '\xbb', '\x2f', '\xf9', '\xd2', '\xfb', '\x67', '\x7f', '\x49', '\x4b', '\x16', '\x16' };
QByteArray retVal( stateData, sizeof( stateData ) );
@@ -470,36 +456,31 @@ QByteArray RiuDockWidgetTools::defaultGeoMechDockState()
QByteArray RiuDockWidgetTools::defaultPlotDockState()
{
static const char stateData[] =
{ '\x00', '\x00', '\x04', '\xf5', '\x78', '\xda', '\x9d', '\x54', '\x51', '\x6f', '\x82', '\x30', '\x10',
'\x7e', '\xdf', '\xaf', '\x68', '\xfa', '\xee', '\x04', '\x99', '\x13', '\x13', '\xd4', '\x18', '\x9c',
'\x6f', '\x6e', '\x2e', '\xe8', '\x7c', '\x34', '\x1d', '\x5c', '\x48', '\x23', '\xb4', '\xa4', '\x2d',
'\x6e', '\x2e', '\xfb', '\xf1', '\x3b', '\x70', '\x61', '\x9b', '\x01', '\xc5', '\x3d', '\xb5', '\xbd',
'\xfb', '\xbe', '\xbb', '\xef', '\x72', '\x5f', '\xea', '\x4d', '\xde', '\xd3', '\x84', '\xec', '\x41',
'\x69', '\x2e', '\xc5', '\x88', '\xda', '\xb7', '\x16', '\x25', '\x20', '\x42', '\x19', '\x71', '\x11',
'\x8f', '\xe8', '\x7a', '\x35', '\xef', '\xb8', '\x74', '\x32', '\xf6', '\x9e', '\xcd', '\x34', '\xda',
'\x33', '\x11', '\x42', '\x34', '\x93', '\xe1', '\x0e', '\x73', '\xc1', '\x41', '\x1b', '\x48', '\xc9',
'\x4b', '\x45', '\xa4', '\x64', '\xad', '\x41', '\x55', '\xef', '\x1e', '\x25', '\xbe', '\x14', '\x86',
'\x71', '\x81', '\x91', '\x32', '\xed', '\x83', '\x30', '\x8a', '\x25', '\x1b', '\x1e', '\xc5', '\x60',
'\x46', '\x34', '\xc2', '\x3a', '\xcb', '\x44', '\x9a', '\x0d', '\x17', '\x91', '\x7c', '\xdb', '\xa6',
'\x88', '\xfc', '\x79', '\xd2', '\xb1', '\x57', '\xb1', '\xc9', '\x3c', '\x91', '\xcc', '\x94', '\x72',
'\x2c', '\x8c', '\x07', '\x59', '\xc2', '\x8d', '\xc1', '\xf0', '\x93', '\xe2', '\x58', '\x11', '\x33',
'\x45', '\xbb', '\xcf', '\xa2', '\x5d', '\x2e', '\xb0', '\xae', '\xd3', '\x88', '\xe9', '\x54', '\x98',
'\x1e', '\x62', '\xa6', '\x0a', '\x18', '\x59', '\xb1', '\x57', '\x5d', '\x50', '\x88', '\x9f', '\x2b',
'\x05', '\xe2', '\x97', '\x2c', '\xbd', '\x52', '\x00', '\xdb', '\x0c', '\x6f', '\x0b', '\x54', '\x51',
'\xa9', '\x3a', '\xaa', '\x27', '\x8f', '\x2c', '\x85', '\x0b', '\x58', '\xe2', '\x27', '\x52', '\x43',
'\x54', '\x88', '\xee', '\xd6', '\xf0', '\x56', '\x90', '\x66', '\x09', '\x33', '\xf0', '\x1f', '\x6e',
'\x10', '\x2a', '\x9e', '\xb5', '\xe9', '\xda', '\x2d', '\x86', '\xfc', '\x33', '\xaa', '\x7d', '\x3a',
'\xaa', '\x92', '\x19', '\x28', '\x73', '\x78', '\x88', '\xb8', '\x91', '\xaa', '\xcd', '\xbc', '\x67',
'\x09', '\xb5', '\xed', '\x03', '\xfe', '\x01', '\x7a', '\xec', '\xda', '\x43', '\x72', '\xd7', '\x77',
'\x89', '\xd7', '\x3d', '\xbe', '\xf1', '\xfc', '\xde', '\xd2', '\x79', '\x81', '\x8d', '\x16', '\x41',
'\x5f', '\xb0', '\xb8', '\x64', '\x34', '\xac', '\xa5', '\x81', '\x56', '\x2b', '\xf1', '\x3a', '\xc3',
'\xf4', '\x4e', '\x44', '\xce', '\x98', '\x61', '\x81', '\xcc', '\x55', '\x08', '\x2d', '\x5d', '\x73',
'\x9e', '\x70', '\x69', '\xfd', '\x79', '\x9a', '\x32', '\x75', '\x58', '\x96', '\x24', '\xc1', '\x62',
'\x50', '\x17', '\xd7', '\x7e', '\x2a', '\x78', '\x01', '\x5a', '\x23', '\x51', '\xb7', '\x90', '\xda',
'\x04', '\xbd', '\x20', '\x72', '\x8d', '\xa0', '\xc0', '\xb0', '\x70', '\x77', '\x8d', '\x45', '\x86',
'\x16', '\x71', '\xdc', '\x41', '\xad', '\x45', '\x8e', '\x11', '\xc7', '\xe9', '\x13', '\x7b', '\x70',
'\x6f', '\xa1', '\x93', '\x9c', '\x5a', '\x58', '\xb7', '\xfa', '\x36', '\xf0', '\xde', '\xf0', '\x69',
'\x8d', '\x6f', '\xbe', '\x00', '\x0a', '\x89', '\xb7', '\xa8' };
{ '\x00', '\x00', '\x04', '\xf5', '\x78', '\xda', '\x9d', '\x54', '\x51', '\x6f', '\x82', '\x30', '\x10', '\x7e', '\xdf', '\xaf',
'\x68', '\xfa', '\xee', '\x04', '\x99', '\x13', '\x13', '\xd4', '\x18', '\x9c', '\x6f', '\x6e', '\x2e', '\xe8', '\x7c', '\x34',
'\x1d', '\x5c', '\x48', '\x23', '\xb4', '\xa4', '\x2d', '\x6e', '\x2e', '\xfb', '\xf1', '\x3b', '\x70', '\x61', '\x9b', '\x01',
'\xc5', '\x3d', '\xb5', '\xbd', '\xfb', '\xbe', '\xbb', '\xef', '\x72', '\x5f', '\xea', '\x4d', '\xde', '\xd3', '\x84', '\xec',
'\x41', '\x69', '\x2e', '\xc5', '\x88', '\xda', '\xb7', '\x16', '\x25', '\x20', '\x42', '\x19', '\x71', '\x11', '\x8f', '\xe8',
'\x7a', '\x35', '\xef', '\xb8', '\x74', '\x32', '\xf6', '\x9e', '\xcd', '\x34', '\xda', '\x33', '\x11', '\x42', '\x34', '\x93',
'\xe1', '\x0e', '\x73', '\xc1', '\x41', '\x1b', '\x48', '\xc9', '\x4b', '\x45', '\xa4', '\x64', '\xad', '\x41', '\x55', '\xef',
'\x1e', '\x25', '\xbe', '\x14', '\x86', '\x71', '\x81', '\x91', '\x32', '\xed', '\x83', '\x30', '\x8a', '\x25', '\x1b', '\x1e',
'\xc5', '\x60', '\x46', '\x34', '\xc2', '\x3a', '\xcb', '\x44', '\x9a', '\x0d', '\x17', '\x91', '\x7c', '\xdb', '\xa6', '\x88',
'\xfc', '\x79', '\xd2', '\xb1', '\x57', '\xb1', '\xc9', '\x3c', '\x91', '\xcc', '\x94', '\x72', '\x2c', '\x8c', '\x07', '\x59',
'\xc2', '\x8d', '\xc1', '\xf0', '\x93', '\xe2', '\x58', '\x11', '\x33', '\x45', '\xbb', '\xcf', '\xa2', '\x5d', '\x2e', '\xb0',
'\xae', '\xd3', '\x88', '\xe9', '\x54', '\x98', '\x1e', '\x62', '\xa6', '\x0a', '\x18', '\x59', '\xb1', '\x57', '\x5d', '\x50',
'\x88', '\x9f', '\x2b', '\x05', '\xe2', '\x97', '\x2c', '\xbd', '\x52', '\x00', '\xdb', '\x0c', '\x6f', '\x0b', '\x54', '\x51',
'\xa9', '\x3a', '\xaa', '\x27', '\x8f', '\x2c', '\x85', '\x0b', '\x58', '\xe2', '\x27', '\x52', '\x43', '\x54', '\x88', '\xee',
'\xd6', '\xf0', '\x56', '\x90', '\x66', '\x09', '\x33', '\xf0', '\x1f', '\x6e', '\x10', '\x2a', '\x9e', '\xb5', '\xe9', '\xda',
'\x2d', '\x86', '\xfc', '\x33', '\xaa', '\x7d', '\x3a', '\xaa', '\x92', '\x19', '\x28', '\x73', '\x78', '\x88', '\xb8', '\x91',
'\xaa', '\xcd', '\xbc', '\x67', '\x09', '\xb5', '\xed', '\x03', '\xfe', '\x01', '\x7a', '\xec', '\xda', '\x43', '\x72', '\xd7',
'\x77', '\x89', '\xd7', '\x3d', '\xbe', '\xf1', '\xfc', '\xde', '\xd2', '\x79', '\x81', '\x8d', '\x16', '\x41', '\x5f', '\xb0',
'\xb8', '\x64', '\x34', '\xac', '\xa5', '\x81', '\x56', '\x2b', '\xf1', '\x3a', '\xc3', '\xf4', '\x4e', '\x44', '\xce', '\x98',
'\x61', '\x81', '\xcc', '\x55', '\x08', '\x2d', '\x5d', '\x73', '\x9e', '\x70', '\x69', '\xfd', '\x79', '\x9a', '\x32', '\x75',
'\x58', '\x96', '\x24', '\xc1', '\x62', '\x50', '\x17', '\xd7', '\x7e', '\x2a', '\x78', '\x01', '\x5a', '\x23', '\x51', '\xb7',
'\x90', '\xda', '\x04', '\xbd', '\x20', '\x72', '\x8d', '\xa0', '\xc0', '\xb0', '\x70', '\x77', '\x8d', '\x45', '\x86', '\x16',
'\x71', '\xdc', '\x41', '\xad', '\x45', '\x8e', '\x11', '\xc7', '\xe9', '\x13', '\x7b', '\x70', '\x6f', '\xa1', '\x93', '\x9c',
'\x5a', '\x58', '\xb7', '\xfa', '\x36', '\xf0', '\xde', '\xf0', '\x69', '\x8d', '\x6f', '\xbe', '\x00', '\x0a', '\x89', '\xb7',
'\xa8' };
QByteArray retVal( stateData, sizeof( stateData ) );
@@ -512,38 +493,32 @@ QByteArray RiuDockWidgetTools::defaultPlotDockState()
QByteArray RiuDockWidgetTools::hideAllDocking3DState()
{
static const char stateData[] =
{ '\x00', '\x00', '\x06', '\x11', '\x78', '\xda', '\x95', '\x54', '\x4d', '\x53', '\xc2', '\x30', '\x10',
'\xbd', '\xfb', '\x2b', '\x32', '\xbd', '\x2b', '\x05', '\xd4', '\xf1', '\xc0', '\xc7', '\x30', '\xa0',
'\x33', '\x1e', '\x50', '\xb4', '\x20', '\x47', '\x27', '\xa6', '\x2b', '\x46', '\xd3', '\x84', '\xd9',
'\x2c', '\xf8', '\x31', '\xfe', '\x78', '\xb7', '\x05', '\x19', '\x29', '\xa5', '\x95', '\x53', '\xd3',
'\xdd', '\xf7', '\xf2', '\xde', '\x26', '\xbb', '\x69', '\x75', '\x3f', '\x12', '\x23', '\x96', '\x80',
'\x5e', '\x3b', '\xdb', '\x0e', '\xea', '\x27', '\x61', '\x20', '\xc0', '\x2a', '\x17', '\x6b', '\x3b',
'\x6b', '\x07', '\x93', '\xf1', '\xd5', '\xf1', '\x45', '\xd0', '\xed', '\xb4', '\xee', '\xa8', '\x17',
'\x2f', '\xa5', '\x55', '\x10', '\x0f', '\x9c', '\x7a', '\xe3', '\x5c', '\xf4', '\xe9', '\x09', '\x12',
'\xf1', '\xb0', '\x21', '\x06', '\x62', '\xe2', '\x01', '\x37', '\xff', '\x8d', '\x40', '\xf4', '\x9d',
'\x25', '\xa9', '\x2d', '\x47', '\xb2', '\x74', '\x1f', '\x2c', '\xa1', '\x34', '\x53', '\x1d', '\xcf',
'\x80', '\xda', '\x41', '\xcc', '\xfb', '\x34', '\x07', '\x53', '\x6d', '\x63', '\xf7', '\xfe', '\x98',
'\x30', '\x6e', '\xb5', '\x0c', '\x3a', '\xad', '\x0d', '\x4f', '\x5c', '\x19', '\x27', '\x29', '\x33',
'\x12', '\x72', '\x3c', '\x9a', '\x1b', '\x4d', '\xc4', '\xe1', '\x5b', '\xd4', '\xbc', '\x17', '\x67',
'\x52', '\xa1', '\xef', '\x54', '\x68', '\x61', '\x29', '\x95', '\xdc', '\x87', '\x39', '\xde', '\xc2',
'\xf4', '\x10', '\xa4', '\x18', '\xcb', '\x27', '\xb6', '\xd5', '\xe4', '\xc4', '\x02', '\x11', '\xec',
'\xda', '\x50', '\xa4', '\x50', '\xcf', '\xc9', '\x8f', '\x11', '\x60', '\xdb', '\xd3', '\xca', '\xb5',
'\xb8', '\x91', '\x09', '\xac', '\x90', '\x23', '\x74', '\xaf', '\xa0', '\x28', '\x8f', '\x14', '\x7d',
'\xe3', '\x3c', '\xc4', '\x69', '\xc1', '\xb5', '\x02', '\xd6', '\x40', '\x92', '\x8c', '\xdc', '\x02',
'\x15', '\x1c', '\x48', '\xdc', '\x63', '\x6c', '\x9b', '\x55', '\x4b', '\x2b', '\xdb', '\xaa', '\xaf',
'\x9e', '\xab', '\x8f', '\x5d', '\xcf', '\x01', '\xe9', '\xf3', '\x32', '\xd6', '\xe4', '\xb0', '\xba',
'\xc4', '\x3d', '\xe0', '\x42', '\xd9', '\x48', '\x7f', '\x81', '\xef', '\x84', '\xa2', '\xde', '\x38',
'\x3b', '\x17', '\xad', '\xda', '\xea', '\x97', '\xbf', '\xeb', '\x1b', '\x39', '\xf8', '\x6e', '\xf2',
'\xde', '\x8b', '\x9a', '\x85', '\x3b', '\x44', '\xce', '\x32', '\x6c', '\x81', '\xff', '\x42', '\xc2',
'\xaf', '\xf3', '\xf0', '\xaf', '\xf3', '\x8a', '\xc6', '\x6a', '\x96', '\x1b', '\xbb', '\x07', '\xbf',
'\x30', '\x74', '\x6d', '\x9f', '\x5d', '\xc5', '\x81', '\x16', '\x03', '\xab', '\xee', '\xf0', '\x34',
'\x27', '\x37', '\x74', '\x2f', '\xe8', '\xfb', '\x1a', '\x95', '\x81', '\x91', '\x71', '\xf4', '\x2f',
'\xcd', '\x3c', '\xb0', '\xa2', '\xdb', '\x4a', '\x24', '\x2a', '\x98', '\xf7', '\x60', '\x46', '\x80',
'\xc9', '\x81', '\xac', '\xd1', '\xb2', '\xc2', '\xe1', '\xee', '\xa9', '\xe4', '\x27', '\x77', '\xc2',
'\xac', '\x88', '\xa4', '\x7a', '\xab', '\x38', '\x8f', '\x21', '\x78', '\x2f', '\x67', '\xe0', '\x0f',
'\x71', '\x87', '\x4e', '\x31', '\x6b', '\xe8', '\x6c', '\xf9', '\x1c', '\xec', '\x10', '\x0b', '\x3d',
'\x95', '\xce', '\x4e', '\x28', '\x78', '\x78', '\xc2', '\xe2', '\xe9', '\xc9', '\x22', '\xd9', '\x70',
'\x95', '\x01', '\x4a', '\x76', '\xa8', '\x6d', '\x1e', '\x56', '\x5e', '\xef', '\x79', '\xd0', '\x3b',
{ '\x00', '\x00', '\x06', '\x11', '\x78', '\xda', '\x95', '\x54', '\x4d', '\x53', '\xc2', '\x30', '\x10', '\xbd', '\xfb', '\x2b',
'\x32', '\xbd', '\x2b', '\x05', '\xd4', '\xf1', '\xc0', '\xc7', '\x30', '\xa0', '\x33', '\x1e', '\x50', '\xb4', '\x20', '\x47',
'\x27', '\xa6', '\x2b', '\x46', '\xd3', '\x84', '\xd9', '\x2c', '\xf8', '\x31', '\xfe', '\x78', '\xb7', '\x05', '\x19', '\x29',
'\xa5', '\x95', '\x53', '\xd3', '\xdd', '\xf7', '\xf2', '\xde', '\x26', '\xbb', '\x69', '\x75', '\x3f', '\x12', '\x23', '\x96',
'\x80', '\x5e', '\x3b', '\xdb', '\x0e', '\xea', '\x27', '\x61', '\x20', '\xc0', '\x2a', '\x17', '\x6b', '\x3b', '\x6b', '\x07',
'\x93', '\xf1', '\xd5', '\xf1', '\x45', '\xd0', '\xed', '\xb4', '\xee', '\xa8', '\x17', '\x2f', '\xa5', '\x55', '\x10', '\x0f',
'\x9c', '\x7a', '\xe3', '\x5c', '\xf4', '\xe9', '\x09', '\x12', '\xf1', '\xb0', '\x21', '\x06', '\x62', '\xe2', '\x01', '\x37',
'\xff', '\x8d', '\x40', '\xf4', '\x9d', '\x25', '\xa9', '\x2d', '\x47', '\xb2', '\x74', '\x1f', '\x2c', '\xa1', '\x34', '\x53',
'\x1d', '\xcf', '\x80', '\xda', '\x41', '\xcc', '\xfb', '\x34', '\x07', '\x53', '\x6d', '\x63', '\xf7', '\xfe', '\x98', '\x30',
'\x6e', '\xb5', '\x0c', '\x3a', '\xad', '\x0d', '\x4f', '\x5c', '\x19', '\x27', '\x29', '\x33', '\x12', '\x72', '\x3c', '\x9a',
'\x1b', '\x4d', '\xc4', '\xe1', '\x5b', '\xd4', '\xbc', '\x17', '\x67', '\x52', '\xa1', '\xef', '\x54', '\x68', '\x61', '\x29',
'\x95', '\xdc', '\x87', '\x39', '\xde', '\xc2', '\xf4', '\x10', '\xa4', '\x18', '\xcb', '\x27', '\xb6', '\xd5', '\xe4', '\xc4',
'\x02', '\x11', '\xec', '\xda', '\x50', '\xa4', '\x50', '\xcf', '\xc9', '\x8f', '\x11', '\x60', '\xdb', '\xd3', '\xca', '\xb5',
'\xb8', '\x91', '\x09', '\xac', '\x90', '\x23', '\x74', '\xaf', '\xa0', '\x28', '\x8f', '\x14', '\x7d', '\xe3', '\x3c', '\xc4',
'\x69', '\xc1', '\xb5', '\x02', '\xd6', '\x40', '\x92', '\x8c', '\xdc', '\x02', '\x15', '\x1c', '\x48', '\xdc', '\x63', '\x6c',
'\x9b', '\x55', '\x4b', '\x2b', '\xdb', '\xaa', '\xaf', '\x9e', '\xab', '\x8f', '\x5d', '\xcf', '\x01', '\xe9', '\xf3', '\x32',
'\xd6', '\xe4', '\xb0', '\xba', '\xc4', '\x3d', '\xe0', '\x42', '\xd9', '\x48', '\x7f', '\x81', '\xef', '\x84', '\xa2', '\xde',
'\x38', '\x3b', '\x17', '\xad', '\xda', '\xea', '\x97', '\xbf', '\xeb', '\x1b', '\x39', '\xf8', '\x6e', '\xf2', '\xde', '\x8b',
'\x9a', '\x85', '\x3b', '\x44', '\xce', '\x32', '\x6c', '\x81', '\xff', '\x42', '\xc2', '\xaf', '\xf3', '\xf0', '\xaf', '\xf3',
'\x8a', '\xc6', '\x6a', '\x96', '\x1b', '\xbb', '\x07', '\xbf', '\x30', '\x74', '\x6d', '\x9f', '\x5d', '\xc5', '\x81', '\x16',
'\x03', '\xab', '\xee', '\xf0', '\x34', '\x27', '\x37', '\x74', '\x2f', '\xe8', '\xfb', '\x1a', '\x95', '\x81', '\x91', '\x71',
'\xf4', '\x2f', '\xcd', '\x3c', '\xb0', '\xa2', '\xdb', '\x4a', '\x24', '\x2a', '\x98', '\xf7', '\x60', '\x46', '\x80', '\xc9',
'\x81', '\xac', '\xd1', '\xb2', '\xc2', '\xe1', '\xee', '\xa9', '\xe4', '\x27', '\x77', '\xc2', '\xac', '\x88', '\xa4', '\x7a',
'\xab', '\x38', '\x8f', '\x21', '\x78', '\x2f', '\x67', '\xe0', '\x0f', '\x71', '\x87', '\x4e', '\x31', '\x6b', '\xe8', '\x6c',
'\xf9', '\x1c', '\xec', '\x10', '\x0b', '\x3d', '\x95', '\xce', '\x4e', '\x28', '\x78', '\x78', '\xc2', '\xe2', '\xe9', '\xc9',
'\x22', '\xd9', '\x70', '\x95', '\x01', '\x4a', '\x76', '\xa8', '\x6d', '\x1e', '\x56', '\x5e', '\xef', '\x79', '\xd0', '\x3b',
'\x47', '\x3f', '\x6f', '\xaf', '\x16', '\x81' };
QByteArray retVal( stateData, sizeof( stateData ) );
@@ -557,36 +532,30 @@ QByteArray RiuDockWidgetTools::hideAllDocking3DState()
QByteArray RiuDockWidgetTools::hideAllDockingPlotState()
{
static const char stateData[] =
{ '\x00', '\x00', '\x04', '\xe7', '\x78', '\xda', '\x9d', '\x94', '\x51', '\x6f', '\x82', '\x30', '\x14',
'\x85', '\xdf', '\xf7', '\x2b', '\x9a', '\xbe', '\x3b', '\x10', '\xb3', '\xc5', '\x07', '\xc4', '\x18',
'\x9c', '\x6f', '\x6e', '\x2e', '\xe0', '\x7c', '\x34', '\x1d', '\xdc', '\x90', '\x46', '\x68', '\x49',
'\x5b', '\xdc', '\x5c', '\xf6', '\xe3', '\x77', '\x41', '\xc5', '\xe9', '\xc0', '\xa9', '\x4f', '\xd0',
'\xf6', '\x9c', '\x9e', '\xef', '\x72', '\x6f', '\x70', '\x87', '\x9f', '\x59', '\x4a', '\xd6', '\xa0',
'\x34', '\x97', '\x62', '\x40', '\xbb', '\xf7', '\x36', '\x25', '\x20', '\x22', '\x19', '\x73', '\x91',
'\x0c', '\xe8', '\x3c', '\x9c', '\x74', '\xfa', '\x74', '\xe8', '\xb9', '\xaf', '\x66', '\x14', '\xaf',
'\x99', '\x88', '\x20', '\x1e', '\xcb', '\x68', '\x85', '\x67', '\xc1', '\x46', '\x1b', '\xc8', '\xc8',
'\x5b', '\x6d', '\xa4', '\x64', '\xae', '\x41', '\xd5', '\x6b', '\x87', '\x12', '\x5f', '\x0a', '\xc3',
'\xb8', '\xc0', '\x9d', '\xea', '\xd8', '\x07', '\x61', '\x14', '\x4b', '\x17', '\x3c', '\x4e', '\xc0',
'\x0c', '\x68', '\x8c', '\xf7', '\xcc', '\x52', '\x69', '\x16', '\x5c', '\xc4', '\xf2', '\x63', '\x99',
'\xa1', '\xf2', '\xb0', '\xa4', '\x9e', '\x5b', '\xbb', '\xc9', '\x24', '\x95', '\xcc', '\x54', '\x38',
'\x36', '\xee', '\x07', '\x79', '\xca', '\x8d', '\xc1', '\xed', '\x17', '\xc5', '\xf1', '\x46', '\x3c',
'\x29', '\xe3', '\xbe', '\xcb', '\xb8', '\x42', '\xe0', '\xbd', '\xbd', '\x56', '\x4d', '\xa7', '\xd6',
'\x38', '\xa8', '\x19', '\x29', '\x60', '\x24', '\x64', '\xef', '\xba', '\xb4', '\x10', '\xbf', '\x50',
'\x0a', '\xc4', '\x0e', '\x2b', '\x88', '\x14', '\xcf', '\x8d', '\x0e', '\x15', '\xc0', '\x32', '\x47',
'\xa6', '\x29', '\x72', '\xd4', '\x5c', '\x5b', '\x7e', '\xf2', '\xcc', '\x32', '\x38', '\x14', '\xd1',
'\xa8', '\x25', '\x7e', '\x2a', '\x35', '\xc4', '\x65', '\xf1', '\x56', '\x83', '\x2f', '\x84', '\x2c',
'\x4f', '\x99', '\x81', '\x5b', '\xbc', '\x67', '\x08', '\x8f', '\x9d', '\x56', '\x59', '\xe6', '\x51',
'\xb1', '\xdd', '\x93', '\x62', '\x67', '\x4a', '\xe6', '\xa0', '\xcc', '\xe6', '\x29', '\xe6', '\x46',
'\xaa', '\x4b', '\xea', '\x3d', '\x6b', '\x68', '\x8c', '\x0f', '\xf8', '\x17', '\x68', '\xcf', '\x26',
'\x5d', '\xa7', '\xdf', '\x23', '\xae', '\xb5', '\x5d', '\xe2', '\x73', '\xd7', '\xa6', '\xf3', '\x7c',
'\xad', '\x33', '\x82', '\x83', '\xc1', '\x92', '\xca', '\xd1', '\xd2', '\x95', '\x16', '\xdb', '\x9e',
'\xd0', '\xfe', '\x4d', '\x78', '\xdd', '\xc4', '\x38', '\xa7', '\x13', '\x53', '\x64', '\x19', '\x53',
'\x9b', '\x59', '\xf5', '\x2d', '\x04', '\x4b', '\x40', '\x35', '\x31', '\x8d', '\x99', '\x61', '\x81',
'\x2c', '\x54', '\x04', '\xb7', '\xb4', '\xfc', '\x6f', '\xc4', '\x7f', '\xad', '\x3e', '\xa5', '\x9c',
'\x63', '\x4e', '\x60', '\x58', '\xb4', '\xba', '\xa0', '\xcb', '\x53', '\xd0', '\x1a', '\x43', '\xf4',
'\x95', '\x94', '\xad', '\x11', '\xb7', '\xcd', '\xc5', '\x5e', '\xe0', '\x3c', '\x3c', '\xda', '\xc4',
'\x6e', '\x94', '\x58', '\xf5', '\x8f', '\x02', '\xdf', '\x5b', '\x7e', '\x53', '\xde', '\xdd', '\x0f',
'\x36', '\x41', '\xb3', '\x2a' };
{ '\x00', '\x00', '\x04', '\xe7', '\x78', '\xda', '\x9d', '\x94', '\x51', '\x6f', '\x82', '\x30', '\x14', '\x85', '\xdf', '\xf7',
'\x2b', '\x9a', '\xbe', '\x3b', '\x10', '\xb3', '\xc5', '\x07', '\xc4', '\x18', '\x9c', '\x6f', '\x6e', '\x2e', '\xe0', '\x7c',
'\x34', '\x1d', '\xdc', '\x90', '\x46', '\x68', '\x49', '\x5b', '\xdc', '\x5c', '\xf6', '\xe3', '\x77', '\x41', '\xc5', '\xe9',
'\xc0', '\xa9', '\x4f', '\xd0', '\xf6', '\x9c', '\x9e', '\xef', '\x72', '\x6f', '\x70', '\x87', '\x9f', '\x59', '\x4a', '\xd6',
'\xa0', '\x34', '\x97', '\x62', '\x40', '\xbb', '\xf7', '\x36', '\x25', '\x20', '\x22', '\x19', '\x73', '\x91', '\x0c', '\xe8',
'\x3c', '\x9c', '\x74', '\xfa', '\x74', '\xe8', '\xb9', '\xaf', '\x66', '\x14', '\xaf', '\x99', '\x88', '\x20', '\x1e', '\xcb',
'\x68', '\x85', '\x67', '\xc1', '\x46', '\x1b', '\xc8', '\xc8', '\x5b', '\x6d', '\xa4', '\x64', '\xae', '\x41', '\xd5', '\x6b',
'\x87', '\x12', '\x5f', '\x0a', '\xc3', '\xb8', '\xc0', '\x9d', '\xea', '\xd8', '\x07', '\x61', '\x14', '\x4b', '\x17', '\x3c',
'\x4e', '\xc0', '\x0c', '\x68', '\x8c', '\xf7', '\xcc', '\x52', '\x69', '\x16', '\x5c', '\xc4', '\xf2', '\x63', '\x99', '\xa1',
'\xf2', '\xb0', '\xa4', '\x9e', '\x5b', '\xbb', '\xc9', '\x24', '\x95', '\xcc', '\x54', '\x38', '\x36', '\xee', '\x07', '\x79',
'\xca', '\x8d', '\xc1', '\xed', '\x17', '\xc5', '\xf1', '\x46', '\x3c', '\x29', '\xe3', '\xbe', '\xcb', '\xb8', '\x42', '\xe0',
'\xbd', '\xbd', '\x56', '\x4d', '\xa7', '\xd6', '\x38', '\xa8', '\x19', '\x29', '\x60', '\x24', '\x64', '\xef', '\xba', '\xb4',
'\x10', '\xbf', '\x50', '\x0a', '\xc4', '\x0e', '\x2b', '\x88', '\x14', '\xcf', '\x8d', '\x0e', '\x15', '\xc0', '\x32', '\x47',
'\xa6', '\x29', '\x72', '\xd4', '\x5c', '\x5b', '\x7e', '\xf2', '\xcc', '\x32', '\x38', '\x14', '\xd1', '\xa8', '\x25', '\x7e',
'\x2a', '\x35', '\xc4', '\x65', '\xf1', '\x56', '\x83', '\x2f', '\x84', '\x2c', '\x4f', '\x99', '\x81', '\x5b', '\xbc', '\x67',
'\x08', '\x8f', '\x9d', '\x56', '\x59', '\xe6', '\x51', '\xb1', '\xdd', '\x93', '\x62', '\x67', '\x4a', '\xe6', '\xa0', '\xcc',
'\xe6', '\x29', '\xe6', '\x46', '\xaa', '\x4b', '\xea', '\x3d', '\x6b', '\x68', '\x8c', '\x0f', '\xf8', '\x17', '\x68', '\xcf',
'\x26', '\x5d', '\xa7', '\xdf', '\x23', '\xae', '\xb5', '\x5d', '\xe2', '\x73', '\xd7', '\xa6', '\xf3', '\x7c', '\xad', '\x33',
'\x82', '\x83', '\xc1', '\x92', '\xca', '\xd1', '\xd2', '\x95', '\x16', '\xdb', '\x9e', '\xd0', '\xfe', '\x4d', '\x78', '\xdd',
'\xc4', '\x38', '\xa7', '\x13', '\x53', '\x64', '\x19', '\x53', '\x9b', '\x59', '\xf5', '\x2d', '\x04', '\x4b', '\x40', '\x35',
'\x31', '\x8d', '\x99', '\x61', '\x81', '\x2c', '\x54', '\x04', '\xb7', '\xb4', '\xfc', '\x6f', '\xc4', '\x7f', '\xad', '\x3e',
'\xa5', '\x9c', '\x63', '\x4e', '\x60', '\x58', '\xb4', '\xba', '\xa0', '\xcb', '\x53', '\xd0', '\x1a', '\x43', '\xf4', '\x95',
'\x94', '\xad', '\x11', '\xb7', '\xcd', '\xc5', '\x5e', '\xe0', '\x3c', '\x3c', '\xda', '\xc4', '\x6e', '\x94', '\x58', '\xf5',
'\x8f', '\x02', '\xdf', '\x5b', '\x7e', '\x53', '\xde', '\xdd', '\x0f', '\x36', '\x41', '\xb3', '\x2a' };
QByteArray retVal( stateData, sizeof( stateData ) );

View File

@@ -192,8 +192,7 @@ RiuDragDrop::~RiuDragDrop()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<caf::PdmObjectHandle*> RiuDragDrop::draggedObjectsFromTreeView( caf::PdmUiTreeView* dragSource,
const QMimeData* data )
std::vector<caf::PdmObjectHandle*> RiuDragDrop::draggedObjectsFromTreeView( caf::PdmUiTreeView* dragSource, const QMimeData* data )
{
const MimeDataWithIndexes* myMimeData = qobject_cast<const MimeDataWithIndexes*>( data );
if ( myMimeData )
@@ -254,8 +253,7 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
if ( dynamic_cast<RimEclipseCase*>( uiItem ) || dynamic_cast<RimWellLogCurve*>( uiItem ) ||
dynamic_cast<RimWellLogFileChannel*>( uiItem ) || dynamic_cast<RimPlot*>( uiItem ) ||
dynamic_cast<RimSummaryCase*>( uiItem ) || dynamic_cast<RimSummaryCurve*>( uiItem ) ||
dynamic_cast<RimSurface*>( uiItem ) )
dynamic_cast<RimSummaryCase*>( uiItem ) || dynamic_cast<RimSummaryCurve*>( uiItem ) || dynamic_cast<RimSurface*>( uiItem ) )
{
itemflags |= Qt::ItemIsDragEnabled;
}
@@ -293,9 +291,8 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
{
if ( RiuTypedPdmObjects<RimWellLogTrack>::containsTypedObjects( m_dragItems ) )
{
auto plotParents = RiuTypedPdmObjects<RimWellLogPlot>::typedAncestorsFromGroup( m_dragItems );
bool draggedOntoSameParent = index.row() == -1 && plotParents.size() == 1u &&
plotParents.front() == uiItem;
auto plotParents = RiuTypedPdmObjects<RimWellLogPlot>::typedAncestorsFromGroup( m_dragItems );
bool draggedOntoSameParent = index.row() == -1 && plotParents.size() == 1u && plotParents.front() == uiItem;
if ( !draggedOntoSameParent )
{
@@ -315,9 +312,8 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
{
if ( RiuTypedPdmObjects<RimWellLogCurve>::containsTypedObjects( m_dragItems ) )
{
auto trackParents = RiuTypedPdmObjects<RimWellLogTrack>::typedAncestorsFromGroup( m_dragItems );
bool draggedOntoSameParent = index.row() == -1 && trackParents.size() == 1u &&
trackParents.front() == uiItem;
auto trackParents = RiuTypedPdmObjects<RimWellLogTrack>::typedAncestorsFromGroup( m_dragItems );
bool draggedOntoSameParent = index.row() == -1 && trackParents.size() == 1u && trackParents.front() == uiItem;
if ( !draggedOntoSameParent )
{
@@ -401,8 +397,7 @@ bool RiuDragDrop::dropMimeData( const QMimeData* data, Qt::DropAction action, in
RiuDragAndDropTreeViewUpdater updater( uiTreeView,
dropTargetIndex.parent(),
RiuTypedPdmObjects<const caf::PdmUiItem>::typedObjectsFromGroup(
draggedObjects ) );
RiuTypedPdmObjects<const caf::PdmUiItem>::typedObjectsFromGroup( draggedObjects ) );
RimIdenticalGridCaseGroup* gridCaseGroup;
dropTarget->firstAncestorOrThisOfType( gridCaseGroup );
@@ -498,8 +493,7 @@ 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 ) )
{
@@ -515,9 +509,7 @@ void RiuDragDrop::moveCasesToGridGroup( caf::PdmObjectGroup& objectGroup, RimIde
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuDragDrop::handleGridCaseGroupDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimIdenticalGridCaseGroup* gridCaseGroup )
bool RiuDragDrop::handleGridCaseGroupDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup )
{
if ( action == Qt::CopyAction )
{
@@ -534,10 +526,7 @@ bool RiuDragDrop::handleGridCaseGroupDrop( Qt::DropAction action,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuDragDrop::handleMultiPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& draggedObjects,
RimMultiPlot* multiPlot,
int insertAtPosition )
bool RiuDragDrop::handleMultiPlotDrop( Qt::DropAction action, caf::PdmObjectGroup& draggedObjects, RimMultiPlot* multiPlot, int insertAtPosition )
{
std::vector<RimPlot*> plots = RiuTypedPdmObjects<RimPlot>::typedObjectsFromGroup( draggedObjects );
if ( plots.size() > 0 )
@@ -571,8 +560,7 @@ bool RiuDragDrop::handleWellLogPlotTrackDrop( Qt::DropAction action,
}
}
std::vector<RimWellLogCurve*> wellLogPlotCurves =
RiuTypedPdmObjects<RimWellLogCurve>::typedObjectsFromGroup( draggedObjects );
std::vector<RimWellLogCurve*> wellLogPlotCurves = RiuTypedPdmObjects<RimWellLogCurve>::typedObjectsFromGroup( draggedObjects );
if ( wellLogPlotCurves.size() > 0 )
{
if ( action == Qt::MoveAction )
@@ -593,8 +581,7 @@ bool RiuDragDrop::handleWellLogPlotDrop( Qt::DropAction action,
RimWellLogPlot* wellLogPlotTarget,
int insertAtPosition )
{
std::vector<RimWellLogTrack*> wellLogPlotTracks =
RiuTypedPdmObjects<RimWellLogTrack>::typedObjectsFromGroup( draggedObjects );
std::vector<RimWellLogTrack*> wellLogPlotTracks = RiuTypedPdmObjects<RimWellLogTrack>::typedObjectsFromGroup( draggedObjects );
if ( wellLogPlotTracks.size() > 0 )
{
if ( action == Qt::MoveAction )
@@ -610,10 +597,7 @@ bool RiuDragDrop::handleWellLogPlotDrop( Qt::DropAction action,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuDragDrop::handleSummaryPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimSummaryPlot* summaryPlot,
int insertAtPosition )
bool RiuDragDrop::handleSummaryPlotDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimSummaryPlot* summaryPlot, int insertAtPosition )
{
std::vector<RimSummaryCurve*> summaryCurves = RiuTypedPdmObjects<RimSummaryCurve>::typedObjectsFromGroup( objectGroup );
if ( summaryCurves.size() > 0 )
@@ -696,9 +680,7 @@ bool RiuDragDrop::handleSummaryCaseMainCollectionDrop( Qt::DropAction
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuDragDrop::objectGroupFromModelIndexes( caf::PdmUiTreeView* uiTreeView,
caf::PdmObjectGroup* objectGroup,
const QModelIndexList& indexes )
void RiuDragDrop::objectGroupFromModelIndexes( caf::PdmUiTreeView* uiTreeView, caf::PdmObjectGroup* objectGroup, const QModelIndexList& indexes )
{
CVF_ASSERT( objectGroup );
@@ -744,10 +726,7 @@ void RiuDragDrop::onProposedDropActionUpdated( Qt::DropAction action )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuDragDrop::handleSurfaceCollectionDrop( Qt::DropAction action,
int row,
caf::PdmObjectGroup& objectGroup,
RimSurfaceCollection* targetCollection )
bool RiuDragDrop::handleSurfaceCollectionDrop( Qt::DropAction action, int row, caf::PdmObjectGroup& objectGroup, RimSurfaceCollection* targetCollection )
{
std::vector<RimSurface*> surfaces = RiuTypedPdmObjects<RimSurface>::typedObjectsFromGroup( objectGroup );

View File

@@ -51,8 +51,7 @@ public:
RiuDragDrop( caf::PdmUiTreeView* treeView );
~RiuDragDrop() override;
static std::vector<caf::PdmObjectHandle*> draggedObjectsFromTreeView( caf::PdmUiTreeView* dragSource,
const QMimeData* data );
static std::vector<caf::PdmObjectHandle*> draggedObjectsFromTreeView( caf::PdmUiTreeView* dragSource, const QMimeData* data );
static bool handleGenericDropEvent( QEvent* event, std::vector<caf::PdmObjectHandle*>& droppedObjects );
@@ -61,38 +60,27 @@ public:
protected:
Qt::DropActions supportedDropActions() const override;
Qt::ItemFlags flags( const QModelIndex& index ) const override;
bool dropMimeData( const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent ) override;
QMimeData* mimeData( const QModelIndexList& indexes ) const override;
QStringList mimeTypes() const override;
bool dropMimeData( const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent ) override;
QMimeData* mimeData( const QModelIndexList& indexes ) const override;
QStringList mimeTypes() const override;
void onDragCanceled() override;
void onProposedDropActionUpdated( Qt::DropAction action ) override;
private:
void moveCasesToGridGroup( caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup );
bool handleGridCaseGroupDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimIdenticalGridCaseGroup* gridCaseGroup );
bool handleGridCaseGroupDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup );
bool handleWellLogPlotTrackDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimWellLogTrack* wellLogPlotTrack,
int insertAtPosition );
bool handleWellLogPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimWellLogPlot* wellLogPlot,
int insertAtPosition );
bool handleWellLogPlotDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogPlot* wellLogPlot, int insertAtPosition );
bool handleSummaryPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimSummaryPlot* summaryPlot,
int insertAtPosition );
bool handleSummaryPlotDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimSummaryPlot* summaryPlot, int insertAtPosition );
bool handleMultiPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimMultiPlot* multiPlot,
int insertAtPosition );
bool handleMultiPlotDrop( Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimMultiPlot* multiPlot, int insertAtPosition );
bool handleSummaryCaseCollectionDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimSummaryCaseCollection* summaryCaseCollection );
@@ -100,14 +88,9 @@ private:
caf::PdmObjectGroup& objectGroup,
RimSummaryCaseMainCollection* summaryCaseMainCollection );
bool handleSurfaceCollectionDrop( Qt::DropAction action,
int row,
caf::PdmObjectGroup& objectGroup,
RimSurfaceCollection* surfaceCollection );
bool handleSurfaceCollectionDrop( Qt::DropAction action, int row, caf::PdmObjectGroup& objectGroup, RimSurfaceCollection* surfaceCollection );
static void objectGroupFromModelIndexes( caf::PdmUiTreeView* uiTreeView,
caf::PdmObjectGroup* objectGroup,
const QModelIndexList& indexes );
static void objectGroupFromModelIndexes( caf::PdmUiTreeView* uiTreeView, caf::PdmObjectGroup* objectGroup, const QModelIndexList& indexes );
static std::vector<caf::PdmPointer<caf::PdmObjectHandle>> objectHandlesFromSelection();
private:

View File

@@ -38,9 +38,7 @@ public:
};
public:
RiuDraggableOverlayFrame( QWidget* parent,
const int snapMargins,
const QColor& backgroundColor = QColor( 255, 255, 255, 100 ) );
RiuDraggableOverlayFrame( QWidget* parent, const int snapMargins, const QColor& backgroundColor = QColor( 255, 255, 255, 100 ) );
RiuAbstractOverlayContentFrame* contentFrame();
void setContentFrame( RiuAbstractOverlayContentFrame* contentFrame );

View File

@@ -37,8 +37,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuEditPerforationCollectionWidget::RiuEditPerforationCollectionWidget( QWidget* parent,
RimPerforationCollection* perforationCollection )
RiuEditPerforationCollectionWidget::RiuEditPerforationCollectionWidget( QWidget* parent, RimPerforationCollection* perforationCollection )
: QDialog( parent, RiuTools::defaultDialogFlags() )
, m_perforationCollection( perforationCollection )
{
@@ -52,9 +51,7 @@ RiuEditPerforationCollectionWidget::RiuEditPerforationCollectionWidget( QWidget*
m_pdmTableView->tableView()->setContextMenuPolicy( Qt::CustomContextMenu );
m_pdmTableView->enableHeaderText( false );
connect( m_pdmTableView->tableView(),
SIGNAL( customContextMenuRequested( QPoint ) ),
SLOT( customMenuRequested( QPoint ) ) );
connect( m_pdmTableView->tableView(), SIGNAL( customContextMenuRequested( QPoint ) ), SLOT( customMenuRequested( QPoint ) ) );
m_pdmTableView->setChildArrayField( &( m_perforationCollection->m_perforations ) );

View File

@@ -24,16 +24,13 @@ const std::map<QString, std::set<QString>> RiuExpressionContextMenuManager::MENU
{ { "Basic Operators", { "+", "-", "*", "/", "x^n" } },
{ "Assignment Operators", { ":=" } },
{ "If Statements",
{ "VAR_1 := if((X < 0.01), 0.01, X)",
"VAR_1 := if((X < 0.01 AND Y > 2.5), 0.01, X)",
"VAR_1 := if((X < 0.01 OR Y > 2.5), 0.01, X)" } },
{ "VAR_1 := if((X < 0.01), 0.01, X)", "VAR_1 := if((X < 0.01 AND Y > 2.5), 0.01, X)", "VAR_1 := if((X < 0.01 OR Y > 2.5), 0.01, X)" } },
{ "Scalar Functions", { "avg(x)", "max(x)", "min(x)", "sum(x)" } },
{ "Vector Functions",
{ "abs(x)", "ceil(x)", "floor(x)", "frac(x)", "log(x)", "log10(x)", "pow(x, n)", "round(x)", "sgn(x)", "sqrt(x)", "trunc(x)" } },
{ "Trigonometry Functions",
{ "acos(x)", "acosh(x)", "asin(x)", "asinh(x)", "atan(x)", "atanh(x)", "cos(x)",
"cosh(x)", "cot(x)", "csc(x)", "sec(x)", "sin(x)", "sinc(x)", "sinh(x)",
"tan(x)", "tanh(x)", "rad2deg(x)", "deg2grad(x)", "deg2rad(x)", "grad2deg(x)" } } };
{ "Trigonometry Functions", { "acos(x)", "acosh(x)", "asin(x)", "asinh(x)", "atan(x)", "atanh(x)", "cos(x)",
"cosh(x)", "cot(x)", "csc(x)", "sec(x)", "sin(x)", "sinc(x)", "sinh(x)",
"tan(x)", "tanh(x)", "rad2deg(x)", "deg2grad(x)", "deg2rad(x)", "grad2deg(x)" } } };
//--------------------------------------------------------------------------------------------------
///

View File

@@ -134,8 +134,7 @@ 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;
@@ -152,12 +151,10 @@ QString RiuFemResultTextBuilder::geometrySelectionText( QString itemSeparator )
QString formattedText;
if ( m_2dIntersectionView )
{
formattedText =
QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
formattedText = QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
text += formattedText + itemSeparator;
cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(
m_intersectionPointInDisplay );
cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix( m_intersectionPointInDisplay );
if ( !t.isZero() )
{
cvf::Vec3d intPt = m_intersectionPointInDisplay.getTransformedPoint( t );
@@ -173,7 +170,7 @@ QString RiuFemResultTextBuilder::geometrySelectionText( QString itemSeparator )
if ( m_displayCoordView )
{
cvf::ref<caf::DisplayCoordTransform> transForm = m_displayCoordView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->translateToDomainCoord( m_intersectionPointInDisplay );
cvf::Vec3d domainCoord = transForm->translateToDomainCoord( m_intersectionPointInDisplay );
formattedText = QString( "Intersection point : [E: %1, N: %2, Depth: %3]" )
.arg( domainCoord.x(), 5, 'f', 2 )
@@ -200,13 +197,7 @@ QString RiuFemResultTextBuilder::gridResultDetails()
{
RigGeoMechCaseData* eclipseCaseData = m_geomResDef->geoMechCase()->geoMechData();
this->appendTextFromResultColors( eclipseCaseData,
m_gridIndex,
m_cellIndex,
m_timeStepIndex,
m_frameIndex,
m_geomResDef,
&text );
this->appendTextFromResultColors( eclipseCaseData, m_gridIndex, m_cellIndex, m_timeStepIndex, m_frameIndex, m_geomResDef, &text );
if ( !text.isEmpty() )
{
@@ -239,10 +230,7 @@ QString RiuFemResultTextBuilder::formationDetails()
{
size_t i = 0;
size_t j = 0;
geomData->femParts()
->part( m_gridIndex )
->getOrCreateStructGrid()
->ijkFromCellIndex( m_cellIndex, &i, &j, &k );
geomData->femParts()->part( m_gridIndex )->getOrCreateStructGrid()->ijkFromCellIndex( m_cellIndex, &i, &j, &k );
}
}
}
@@ -301,9 +289,8 @@ void RiuFemResultTextBuilder::appendTextFromResultColors( RigGeoMechCaseData*
{
float scalarValue = std::numeric_limits<float>::infinity();
int nodeIdx = elementConn[lNodeIdx];
if ( resultDefinition->resultPositionType() == RIG_NODAL ||
( resultDefinition->resultPositionType() == RIG_DIFFERENTIALS &&
resultDefinition->resultFieldName() == "POR-Bar" ) )
if ( resultDefinition->resultPositionType() == RIG_NODAL || ( resultDefinition->resultPositionType() == RIG_DIFFERENTIALS &&
resultDefinition->resultFieldName() == "POR-Bar" ) )
{
scalarValue = scalarResults[nodeIdx];
}
@@ -326,13 +313,11 @@ void RiuFemResultTextBuilder::appendTextFromResultColors( RigGeoMechCaseData*
}
else
{
resultInfoText->append(
QString( "\tN:%1 \t: %2" ).arg( femPart->nodes().nodeIds[nodeIdx] ).arg( scalarValue ) );
resultInfoText->append( QString( "\tN:%1 \t: %2" ).arg( femPart->nodes().nodeIds[nodeIdx] ).arg( scalarValue ) );
}
cvf::Vec3f nodeCoord = femPart->nodes().coordinates[nodeIdx];
resultInfoText->append(
QString( "\t( %3, %4, %5)\n" ).arg( nodeCoord[0] ).arg( nodeCoord[1] ).arg( nodeCoord[2] ) );
resultInfoText->append( QString( "\t( %3, %4, %5)\n" ).arg( nodeCoord[0] ).arg( nodeCoord[1] ).arg( nodeCoord[2] ) );
}
}
else
@@ -408,10 +393,8 @@ QString RiuFemResultTextBuilder::closestNodeResultText( RimGeoMechResultDefiniti
RigGeoMechCaseData* geomData = m_geomResDef->geoMechCase()->geoMechData();
const std::vector<float>& scalarResults = geomData->femPartResults()->resultValues( resultColors->resultAddress(),
m_gridIndex,
m_timeStepIndex,
m_frameIndex );
const std::vector<float>& scalarResults =
geomData->femPartResults()->resultValues( resultColors->resultAddress(), m_gridIndex, m_timeStepIndex, m_frameIndex );
if ( scalarResults.size() && m_displayCoordView )
{
@@ -421,11 +404,7 @@ QString RiuFemResultTextBuilder::closestNodeResultText( RimGeoMechResultDefiniti
cvf::Vec3d intersectionPointInDomain =
m_displayCoordView->displayCoordTransform()->translateToDomainCoord( m_intersectionPointInDisplay );
RigFemClosestResultIndexCalculator closestIndexCalc( femPart,
activeResultPosition,
m_cellIndex,
m_face,
intersectionPointInDomain );
RigFemClosestResultIndexCalculator closestIndexCalc( femPart, activeResultPosition, m_cellIndex, m_face, intersectionPointInDomain );
int resultIndex = closestIndexCalc.resultIndexToClosestResult();
int closestNodeId = closestIndexCalc.closestNodeId();

View File

@@ -56,12 +56,12 @@ RiuFemTimeHistoryResultAccessor::RiuFemTimeHistoryResultAccessor( RigGeoMechCase
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuFemTimeHistoryResultAccessor::RiuFemTimeHistoryResultAccessor( RigGeoMechCaseData* geomData,
RigFemResultAddress femResultAddress,
size_t gridIndex,
int elementIndex,
int face,
const cvf::Vec3d& intersectionPointInDomain,
RiuFemTimeHistoryResultAccessor::RiuFemTimeHistoryResultAccessor( RigGeoMechCaseData* geomData,
RigFemResultAddress femResultAddress,
size_t gridIndex,
int elementIndex,
int face,
const cvf::Vec3d& intersectionPointInDomain,
const std::array<cvf::Vec3f, 3>& intersectionTriangle )
: m_geoMechCaseData( geomData )
, m_femResultAddress( new RigFemResultAddress( femResultAddress ) )
@@ -91,10 +91,7 @@ QString RiuFemTimeHistoryResultAccessor::geometrySelectionText() const
size_t i = 0;
size_t j = 0;
size_t k = 0;
if ( m_geoMechCaseData->femParts()
->part( m_gridIndex )
->getOrCreateStructGrid()
->ijkFromCellIndex( m_elementIndex, &i, &j, &k ) )
if ( m_geoMechCaseData->femParts()->part( m_gridIndex )->getOrCreateStructGrid()->ijkFromCellIndex( m_elementIndex, &i, &j, &k ) )
{
// Adjust to 1-based Eclipse indexing
i++;
@@ -108,8 +105,7 @@ QString RiuFemTimeHistoryResultAccessor::geometrySelectionText() const
auto yTxt = RiaNumberFormat::valueToText( domainCoord.y(), RiaNumberFormat::NumberFormatType::FIXED, 2 );
auto zTxt = RiaNumberFormat::valueToText( -domainCoord.z(), RiaNumberFormat::NumberFormatType::FIXED, 2 );
QString formattedText =
QString( "Intersection point : [E: %1, N: %2, Depth: %3]" ).arg( xTxt ).arg( yTxt ).arg( zTxt );
QString formattedText = QString( "Intersection point : [E: %1, N: %2, Depth: %3]" ).arg( xTxt ).arg( yTxt ).arg( zTxt );
text += formattedText;
}
@@ -162,13 +158,8 @@ void RiuFemTimeHistoryResultAccessor::computeTimeHistoryData()
const int frameCount = femPartResultsColl->frameCount( stepIdx );
for ( int frameIdx = 0; frameIdx < frameCount; frameIdx++ )
{
RiuGeoMechXfTensorResultAccessor stressXfAccessor( femPartResultsColl,
*m_femResultAddress,
m_gridIndex,
stepIdx,
frameIdx );
float scalarValue =
stressXfAccessor.calculateElmNodeValue( m_intersectionTriangle, closestElmNodeResIndex );
RiuGeoMechXfTensorResultAccessor stressXfAccessor( femPartResultsColl, *m_femResultAddress, m_gridIndex, stepIdx, frameIdx );
float scalarValue = stressXfAccessor.calculateElmNodeValue( m_intersectionTriangle, closestElmNodeResIndex );
m_timeHistoryValues.push_back( scalarValue );
}
}
@@ -184,10 +175,7 @@ void RiuFemTimeHistoryResultAccessor::computeTimeHistoryData()
for ( int frameIdx = 0; frameIdx < frameCount; frameIdx++ )
{
const std::vector<float>& scalarResults =
m_geoMechCaseData->femPartResults()->resultValues( *m_femResultAddress,
static_cast<int>( m_gridIndex ),
stepIdx,
frameIdx );
m_geoMechCaseData->femPartResults()->resultValues( *m_femResultAddress, static_cast<int>( m_gridIndex ), stepIdx, frameIdx );
if ( scalarResults.size() )
{
float scalarValue = scalarResults[scalarResultIndex];

View File

@@ -37,8 +37,7 @@ QStringList getOpenFileNames( QWidget* parent = nullptr,
const QString& filter = QString(),
QString* selectedFilter = nullptr );
QString
getExistingDirectory( QWidget* parent = nullptr, const QString& caption = QString(), const QString& dir = QString() );
QString getExistingDirectory( QWidget* parent = nullptr, const QString& caption = QString(), const QString& dir = QString() );
QString getOpenFileName( QWidget* parent = nullptr,
const QString& caption = QString(),

View File

@@ -95,8 +95,8 @@ RiuFlowCharacteristicsPlot::RiuFlowCharacteristicsPlot( RimFlowCharacteristicsPl
addWindowZoom( m_sweepEffPlot );
m_sweepEffPlot->setTitle( "Sweep Efficiency" );
int legendFontSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(),
caf::FontTools::RelativeSize::Small );
int legendFontSize =
caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(), caf::FontTools::RelativeSize::Small );
{
QwtText axisTitle = m_sweepEffPlot->axisTitle( QwtAxis::XBottom );
@@ -176,11 +176,7 @@ void RiuFlowCharacteristicsPlot::setLorenzCurve( const QStringList& d
QString curveName = dateTimeStrings[static_cast<int>( tsIdx )];
RiuFlowCharacteristicsPlot::addCurveWithLargeSymbol( m_lorenzPlot,
curveName,
m_dateToColorMap[dateTime],
dateTime,
timeHistoryValue );
RiuFlowCharacteristicsPlot::addCurveWithLargeSymbol( m_lorenzPlot, curveName, m_dateToColorMap[dateTime], dateTime, timeHistoryValue );
}
}
@@ -220,8 +216,7 @@ void RiuFlowCharacteristicsPlot::addCurveWithLargeSymbol( QwtPlot* plot,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuQwtPlotCurve*
RiuFlowCharacteristicsPlot::createEmptyCurve( QwtPlot* plot, const QString& curveName, const QColor& curveColor )
RiuQwtPlotCurve* RiuFlowCharacteristicsPlot::createEmptyCurve( QwtPlot* plot, const QString& curveName, const QColor& curveColor )
{
RiuQwtPlotCurve* plotCurve = new RiuQwtPlotCurve( nullptr, curveName );
@@ -240,9 +235,8 @@ void RiuFlowCharacteristicsPlot::addFlowCapStorageCapCurve( const QDateTime&
{
CVF_ASSERT( !m_dateToColorMap.empty() );
RiuQwtPlotCurve* plotCurve =
createEmptyCurve( m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
bool useLogarithmicScale = false;
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
bool useLogarithmicScale = false;
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, useLogarithmicScale );
m_flowCapVsStorageCapPlot->replot();
}
@@ -256,7 +250,7 @@ void RiuFlowCharacteristicsPlot::addSweepEfficiencyCurve( const QDateTime&
{
CVF_ASSERT( !m_dateToColorMap.empty() );
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
bool useLogarithmicScale = false;
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, useLogarithmicScale );
@@ -386,8 +380,8 @@ void RiuFlowCharacteristicsPlot::initializeColors( const std::vector<QDateTime>&
{
CVF_ASSERT( m_dateToColorMap.empty() );
const caf::ColorTable& palette = RiaColorTables::timestepsPaletteColors();
cvf::Color3ubArray colorArray = caf::ColorTable::interpolateColorArray( palette.color3ubArray(), dateTimes.size() );
const caf::ColorTable& palette = RiaColorTables::timestepsPaletteColors();
cvf::Color3ubArray colorArray = caf::ColorTable::interpolateColorArray( palette.color3ubArray(), dateTimes.size() );
for ( size_t tsIdx = 0; tsIdx < dateTimes.size(); ++tsIdx )
{

View File

@@ -54,12 +54,8 @@ public:
void setLorenzCurve( const QStringList& dateTimeStrings,
const std::vector<QDateTime>& dateTimes,
const std::vector<double>& timeHistoryValues );
void addFlowCapStorageCapCurve( const QDateTime& dateTime,
const std::vector<double>& xVals,
const std::vector<double>& yVals );
void addSweepEfficiencyCurve( const QDateTime& dateTime,
const std::vector<double>& xVals,
const std::vector<double>& yVals );
void addFlowCapStorageCapCurve( const QDateTime& dateTime, const std::vector<double>& xVals, const std::vector<double>& yVals );
void addSweepEfficiencyCurve( const QDateTime& dateTime, const std::vector<double>& xVals, const std::vector<double>& yVals );
void removeAllCurves();
void zoomAll();
@@ -81,11 +77,8 @@ private:
void setDefaults();
void initializeColors( const std::vector<QDateTime>& dateTimes );
static void addCurveWithLargeSymbol( QwtPlot* plot,
const QString& curveName,
const QColor& color,
const QDateTime& dateTime,
double timeHistoryValue );
static void
addCurveWithLargeSymbol( QwtPlot* plot, const QString& curveName, const QColor& color, const QDateTime& dateTime, double timeHistoryValue );
private:
caf::PdmPointer<RimFlowCharacteristicsPlot> m_plotDefinition;

View File

@@ -171,8 +171,7 @@ 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 )
{
@@ -196,9 +195,9 @@ void RiuGeoMechXfTensorResultAccessor::calculateInterpolatedValue( const cvf::Ve
ipT13 += ( *tens13 )[resIdx] * interpolationWeight;
}
if ( ipT11 == HUGE_VAL || ipT11 != ipT11 || ipT22 == HUGE_VAL || ipT22 != ipT22 || ipT33 == HUGE_VAL ||
ipT33 != ipT33 || ipT12 == HUGE_VAL || ipT12 != ipT12 || ipT23 == HUGE_VAL || ipT23 != ipT23 ||
ipT13 == HUGE_VAL || ipT13 != ipT13 ) // a != a is true for NAN's
if ( ipT11 == HUGE_VAL || ipT11 != ipT11 || ipT22 == HUGE_VAL || ipT22 != ipT22 || ipT33 == HUGE_VAL || ipT33 != ipT33 ||
ipT12 == HUGE_VAL || ipT12 != ipT12 || ipT23 == HUGE_VAL || ipT23 != ipT23 || ipT13 == HUGE_VAL ||
ipT13 != ipT13 ) // a != a is true for NAN's
{
returnValues[triangleVxIdx] = std::numeric_limits<float>::infinity();
}
@@ -215,13 +214,11 @@ void RiuGeoMechXfTensorResultAccessor::calculateInterpolatedValue( const cvf::Ve
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
float RiuGeoMechXfTensorResultAccessor::calculateElmNodeValue( const std::array<cvf::Vec3f, 3>& triangle,
int globalElmNodeResIndex )
float RiuGeoMechXfTensorResultAccessor::calculateElmNodeValue( const std::array<cvf::Vec3f, 3>& triangle, int globalElmNodeResIndex )
{
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];
@@ -230,9 +227,8 @@ float RiuGeoMechXfTensorResultAccessor::calculateElmNodeValue( const std::array<
float ipT23 = ( *tens23 )[globalElmNodeResIndex];
float ipT13 = ( *tens13 )[globalElmNodeResIndex];
if ( ipT11 == HUGE_VAL || ipT11 != ipT11 || ipT22 == HUGE_VAL || ipT22 != ipT22 || ipT33 == HUGE_VAL ||
ipT33 != ipT33 || ipT12 == HUGE_VAL || ipT12 != ipT12 || ipT23 == HUGE_VAL || ipT23 != ipT23 ||
ipT13 == HUGE_VAL || ipT13 != ipT13 ) // a != a is true for NAN's
if ( ipT11 == HUGE_VAL || ipT11 != ipT11 || ipT22 == HUGE_VAL || ipT22 != ipT22 || ipT33 == HUGE_VAL || ipT33 != ipT33 ||
ipT12 == HUGE_VAL || ipT12 != ipT12 || ipT23 == HUGE_VAL || ipT23 != ipT23 || ipT13 == HUGE_VAL || ipT13 != ipT13 )
{
return std::numeric_limits<float>::infinity();
}

View File

@@ -36,9 +36,7 @@ public:
int timeStepIdx,
int frameIdx );
void calculateInterpolatedValue( const cvf::Vec3f triangle[3],
const RivIntersectionVertexWeights vertexWeights[3],
float returnValues[3] );
void calculateInterpolatedValue( const cvf::Vec3f triangle[3], const RivIntersectionVertexWeights vertexWeights[3], float returnValues[3] );
float calculateElmNodeValue( const std::array<cvf::Vec3f, 3>& triangle, int globalElmNodeResIndex );

View File

@@ -93,9 +93,8 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
m_selectedPointMarker = new QwtPlotMarker;
// QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
QwtSymbol* mySymbol =
new QwtSymbol( QwtSymbol::Ellipse, QBrush( QColor( 255, 255, 255, 50 ) ), QPen( color, 2.0 ), QSize( 10, 10 ) );
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
QwtSymbol* mySymbol = new QwtSymbol( QwtSymbol::Ellipse, QBrush( QColor( 255, 255, 255, 50 ) ), QPen( color, 2.0 ), QSize( 10, 10 ) );
m_selectedPointMarker->setSymbol( mySymbol );
m_selectedPointMarker->setLabelAlignment( Qt::AlignRight | Qt::AlignVCenter );
@@ -208,8 +207,7 @@ void RiuGridCrossQwtPlot::onPlotItemSelected( std::shared_ptr<RiuPlotItem> plotI
if ( curveText( curve, &curveName, &xAxisName, &yAxisName ) )
{
QString labelFormat( "<div style=\"margin: 4px;\"><b>%1:</b><br/>%2 = %3, %4 = %5</div>" );
QString labelString =
labelFormat.arg( curveName ).arg( xAxisName ).arg( sample.x() ).arg( yAxisName ).arg( sample.y() );
QString labelString = labelFormat.arg( curveName ).arg( xAxisName ).arg( sample.x() ).arg( yAxisName ).arg( sample.y() );
QwtText curveLabel( labelString, QwtText::RichText );
curveLabel.setBackgroundBrush( QBrush( QColor( 250, 250, 250, 220 ) ) );
curveLabel.setPaintAttribute( QwtText::PaintBackground );

View File

@@ -52,10 +52,9 @@ QMap<RiaDefines::ThemeEnum, QMap<QString, QString>> RiuGuiTheme:
QMap<RiaDefines::ThemeEnum, QMap<QString, QString>> RiuGuiTheme::s_variableGuiTextMap = {};
QMap<QString, QMap<QString, QMap<QString, QMap<QString, QString>>>> RiuGuiTheme::s_qwtPlotItemPropertiesMap = {};
QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme::s_customStyleSheetApplicators =
{ { QString(
"QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::curve\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]\\s*\\{("
"?<properties>([\\n\\r]*\\s*((line-color|symbol-color):"
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
{ { QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::curve\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]\\s*\\{("
"?<properties>([\\n\\r]*\\s*((line-color|symbol-color):"
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
[]( QRegularExpressionMatch& match ) {
QRegExp plotNameRegExp( match.captured( "plotName" ) );
QRegExp itemNameRegExp( match.captured( "itemName" ) );
@@ -66,11 +65,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
QString symbolColor = symbolColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
if ( !lineColor.isEmpty() )
{
storeQwtStyleSheetProperty( match.captured( "plotName" ),
QString( "curve" ),
match.captured( "itemName" ),
"line-color",
lineColor );
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "curve" ), match.captured( "itemName" ), "line-color", lineColor );
}
if ( !symbolColor.isEmpty() )
{
@@ -94,8 +89,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
{
if ( QwtPlotCurve* curve = dynamic_cast<QwtPlotCurve*>( item ) )
{
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
match.captured( "itemName" ) == "*" )
if ( itemNameRegExp.exactMatch( item->title().text() ) || match.captured( "itemName" ) == "*" )
{
QPen pen = curve->pen();
pen.setColor( QColor( lineColor ) );
@@ -129,25 +123,19 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
if ( !color.isEmpty() )
{
storeQwtStyleSheetProperty( match.captured( "plotName" ),
QString( "grid" ),
match.captured( "itemName" ),
"color",
color );
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "grid" ), match.captured( "itemName" ), "color", color );
}
for ( QWidget* widget : topLevelWidgets )
{
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
{
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
match.captured( "plotName" ) == "*" )
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) || match.captured( "plotName" ) == "*" )
{
for ( QwtPlotItem* item : plotWidget->itemList() )
{
if ( QwtPlotGrid* grid = dynamic_cast<QwtPlotGrid*>( item ) )
{
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
match.captured( "itemName" ) == "*" )
if ( itemNameRegExp.exactMatch( item->title().text() ) || match.captured( "itemName" ) == "*" )
{
QPen pen = grid->majorPen();
pen.setColor( QColor( color ) );
@@ -172,18 +160,13 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
if ( !color.isEmpty() )
{
storeQwtStyleSheetProperty( match.captured( "plotName" ),
QString( "legend" ),
match.captured( "itemName" ),
"text-color",
color );
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "legend" ), match.captured( "itemName" ), "text-color", color );
}
for ( QWidget* widget : topLevelWidgets )
{
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
{
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
match.captured( "plotName" ) == "*" )
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) || match.captured( "plotName" ) == "*" )
{
for ( QwtLegendLabel* label : plotWidget->findChildren<QwtLegendLabel*>() )
{
@@ -213,11 +196,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
if ( !color.isEmpty() )
{
storeQwtStyleSheetProperty( match.captured( "plotName" ),
QString( "lineMarker" ),
match.captured( "itemName" ),
"color",
color );
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "lineMarker" ), match.captured( "itemName" ), "color", color );
}
if ( !textColor.isEmpty() )
{
@@ -231,8 +210,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
{
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
{
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
match.captured( "plotName" ) == "*" )
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) || match.captured( "plotName" ) == "*" )
{
for ( QwtPlotItem* item : plotWidget->itemList() )
{
@@ -240,8 +218,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
{
if ( marker->symbol() == nullptr || marker->symbol()->style() == QwtSymbol::NoSymbol )
{
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
match.captured( "itemName" ) == "*" )
if ( itemNameRegExp.exactMatch( item->title().text() ) || match.captured( "itemName" ) == "*" )
{
QPen pen = marker->linePen();
pen.setColor( QColor( color ) );
@@ -272,11 +249,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
if ( !color.isEmpty() )
{
storeQwtStyleSheetProperty( match.captured( "plotName" ),
QString( "pointMarker" ),
match.captured( "itemName" ),
"color",
color );
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "pointMarker" ), match.captured( "itemName" ), "color", color );
}
if ( !textColor.isEmpty() )
{
@@ -290,8 +263,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
{
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
{
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
match.captured( "plotName" ) == "*" )
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) || match.captured( "plotName" ) == "*" )
{
for ( QwtPlotItem* item : plotWidget->itemList() )
{
@@ -299,8 +271,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
{
if ( marker->symbol() && marker->symbol()->style() != QwtSymbol::NoSymbol )
{
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
match.captured( "itemName" ) == "*" )
if ( itemNameRegExp.exactMatch( item->title().text() ) || match.captured( "itemName" ) == "*" )
{
QPen pen = marker->symbol()->pen();
pen.setColor( QColor( color ) );
@@ -337,8 +308,7 @@ QMap<QString, CustomStyleSheetApplicator> RiuGuiTheme:
{
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
{
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
match.captured( "plotName" ) == "*" )
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) || match.captured( "plotName" ) == "*" )
{
QWidget* canvas = plotWidget->canvas();
if ( canvas )
@@ -597,10 +567,7 @@ QColor RiuGuiTheme::getColorByVariableName( const QString& variable, RiaDefines:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiuGuiTheme::getQwtStyleSheetProperty( QString plotName,
const QString& itemType,
QString itemName,
const QString& propertyName )
QString RiuGuiTheme::getQwtStyleSheetProperty( QString plotName, const QString& itemType, QString itemName, const QString& propertyName )
{
if ( !s_qwtPlotItemPropertiesMap.keys().contains( plotName ) )
{
@@ -615,8 +582,7 @@ QString RiuGuiTheme::getQwtStyleSheetProperty( QString plotName,
}
if ( !s_qwtPlotItemPropertiesMap[plotName].keys().contains( itemType ) )
{
if ( s_qwtPlotItemPropertiesMap.keys().contains( "*" ) &&
s_qwtPlotItemPropertiesMap["*"].keys().contains( itemType ) )
if ( s_qwtPlotItemPropertiesMap.keys().contains( "*" ) && s_qwtPlotItemPropertiesMap["*"].keys().contains( itemType ) )
{
plotName = "*";
}
@@ -629,8 +595,7 @@ QString RiuGuiTheme::getQwtStyleSheetProperty( QString plotName,
{
if ( !s_qwtPlotItemPropertiesMap[plotName][itemType].keys().contains( "*" ) )
{
if ( s_qwtPlotItemPropertiesMap.keys().contains( "*" ) &&
s_qwtPlotItemPropertiesMap["*"].keys().contains( itemType ) &&
if ( s_qwtPlotItemPropertiesMap.keys().contains( "*" ) && s_qwtPlotItemPropertiesMap["*"].keys().contains( itemType ) &&
s_qwtPlotItemPropertiesMap["*"][itemType].keys().contains( "*" ) )
{
plotName = "*";
@@ -811,9 +776,8 @@ void RiuGuiTheme::preparseStyleSheet( RiaDefines::ThemeEnum theme, QString& styl
styleSheet.replace( match.captured( 0 ), color.name() );
}
QRegularExpression variableRegExp(
"[ \\t]*(?<name>\\$[a-zA-z0-9_]+)[ \\t]*:[ \\t]*(?<value>[a-zA-Z-_0-9#]+);[ \\t]*(\\/\\/[ "
"\\t]*(?<descriptor>(.*)))?[\\n\\r]*" );
QRegularExpression variableRegExp( "[ \\t]*(?<name>\\$[a-zA-z0-9_]+)[ \\t]*:[ \\t]*(?<value>[a-zA-Z-_0-9#]+);[ \\t]*(\\/\\/[ "
"\\t]*(?<descriptor>(.*)))?[\\n\\r]*" );
matchIterator = variableRegExp.globalMatch( styleSheet );
if ( !s_variableValueMap.keys().contains( theme ) )
@@ -837,14 +801,12 @@ void RiuGuiTheme::preparseStyleSheet( RiaDefines::ThemeEnum theme, QString& styl
QRegularExpressionMatch replaceMatch = replaceMatchIterator.next();
if ( s_variableValueMap[theme].keys().contains( match.captured( "name" ) ) )
{
styleSheet = styleSheet.left( replaceMatch.capturedStart( 1 ) ) +
s_variableValueMap[theme].value( match.captured( "name" ) ) + replaceMatch.captured( 2 ) +
styleSheet.right( styleSheet.length() - replaceMatch.capturedEnd( 0 ) );
styleSheet = styleSheet.left( replaceMatch.capturedStart( 1 ) ) + s_variableValueMap[theme].value( match.captured( "name" ) ) +
replaceMatch.captured( 2 ) + styleSheet.right( styleSheet.length() - replaceMatch.capturedEnd( 0 ) );
}
else
{
styleSheet = styleSheet.left( replaceMatch.capturedStart( 0 ) ) + match.captured( "value" ) +
replaceMatch.captured( 2 ) +
styleSheet = styleSheet.left( replaceMatch.capturedStart( 0 ) ) + match.captured( "value" ) + replaceMatch.captured( 2 ) +
styleSheet.right( styleSheet.length() - replaceMatch.capturedEnd( 0 ) );
}
// Positions got updated, we need to reassign the iterator.
@@ -858,8 +820,7 @@ void RiuGuiTheme::preparseStyleSheet( RiaDefines::ThemeEnum theme, QString& styl
}
QMap<QString, CustomStyleSheetApplicator>::iterator applicatorIterator;
for ( applicatorIterator = s_customStyleSheetApplicators.begin();
applicatorIterator != s_customStyleSheetApplicators.end();
for ( applicatorIterator = s_customStyleSheetApplicators.begin(); applicatorIterator != s_customStyleSheetApplicators.end();
applicatorIterator++ )
{
matchIterator = QRegularExpression( applicatorIterator.key() ).globalMatch( styleSheet );

View File

@@ -43,22 +43,20 @@ typedef std::function<void( QRegularExpressionMatch& )> CustomStyleSheetApplicat
class RiuGuiTheme
{
public:
static RiaDefines::ThemeEnum currentGuiTheme();
static void updateGuiTheme( RiaDefines::ThemeEnum theme );
static bool applyStyleSheet( RiaDefines::ThemeEnum theme );
static void changeVariableValue( RiaDefines::ThemeEnum theme, const QString& variableName, const QString& newValue );
static RiaDefines::ThemeEnum currentGuiTheme();
static void updateGuiTheme( RiaDefines::ThemeEnum theme );
static bool applyStyleSheet( RiaDefines::ThemeEnum theme );
static void changeVariableValue( RiaDefines::ThemeEnum theme, const QString& variableName, const QString& newValue );
static QMap<QString, QString> getVariableValueMap( RiaDefines::ThemeEnum theme );
static QMap<QString, QString> getVariableGuiTextMap( RiaDefines::ThemeEnum theme );
static QString applyVariableValueMapToStyleSheet( RiaDefines::ThemeEnum theme );
static bool writeStyleSheetToFile( RiaDefines::ThemeEnum theme, const QString& styleSheet );
static QString loadStyleSheet( RiaDefines::ThemeEnum theme );
static QAbstractItemModel* getQssCompletionModel( QCompleter* completer );
static QColor getColorByVariableName( const QString& variable,
RiaDefines::ThemeEnum theme = RiaDefines::ThemeEnum::UNDEFINED );
static QString
getQwtStyleSheetProperty( QString plotName, const QString& itemType, QString itemName, const QString& propertyName );
static void styleQwtItem( QwtPlotItem* item );
static void styleQwtItem( QwtPicker* item );
static QColor getColorByVariableName( const QString& variable, RiaDefines::ThemeEnum theme = RiaDefines::ThemeEnum::UNDEFINED );
static QString getQwtStyleSheetProperty( QString plotName, const QString& itemType, QString itemName, const QString& propertyName );
static void styleQwtItem( QwtPlotItem* item );
static void styleQwtItem( QwtPicker* item );
private:
static void preparseStyleSheet( RiaDefines::ThemeEnum theme, QString& styleSheet );

View File

@@ -132,8 +132,7 @@ RiuMainWindow::RiuMainWindow()
m_mdiArea = new RiuMdiArea( this );
connect( m_mdiArea, SIGNAL( subWindowActivated( QMdiSubWindow* ) ), SLOT( slotSubWindowActivated( QMdiSubWindow* ) ) );
ads::CDockWidget* cWidget =
RiuDockWidgetTools::createDockWidget( "3D Views", RiuDockWidgetTools::main3DWindowName(), this );
ads::CDockWidget* cWidget = RiuDockWidgetTools::createDockWidget( "3D Views", RiuDockWidgetTools::main3DWindowName(), this );
cWidget->setWidget( m_mdiArea );
dockManager()->setCentralWidget( cWidget );
@@ -148,9 +147,7 @@ RiuMainWindow::RiuMainWindow()
{
m_undoView->setStack( caf::CmdExecCommandManager::instance()->undoStack() );
}
connect( caf::CmdExecCommandManager::instance()->undoStack(),
SIGNAL( indexChanged( int ) ),
SLOT( slotRefreshUndoRedoActions() ) );
connect( caf::CmdExecCommandManager::instance()->undoStack(), SIGNAL( indexChanged( int ) ), SLOT( slotRefreshUndoRedoActions() ) );
initializeGuiNewProjectLoaded();
@@ -158,8 +155,7 @@ RiuMainWindow::RiuMainWindow()
m_memoryUsedButton = new QToolButton( nullptr );
m_memoryTotalStatus = new QLabel( "" );
m_memoryUsedButton->setDefaultAction(
caf::CmdFeatureManager::instance()->action( "RicShowMemoryCleanupDialogFeature" ) );
m_memoryUsedButton->setDefaultAction( caf::CmdFeatureManager::instance()->action( "RicShowMemoryCleanupDialogFeature" ) );
statusBar()->addPermanentWidget( m_memoryCriticalWarning );
statusBar()->addPermanentWidget( m_memoryUsedButton );
@@ -271,16 +267,15 @@ 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 );
}
}
RicEditSummaryPlotFeature* editSumCurves = dynamic_cast<RicEditSummaryPlotFeature*>(
caf::CmdFeatureManager::instance()->getCommandFeature( "RicEditSummaryPlotFeature" ) );
RicEditSummaryPlotFeature* editSumCurves =
dynamic_cast<RicEditSummaryPlotFeature*>( caf::CmdFeatureManager::instance()->getCommandFeature( "RicEditSummaryPlotFeature" ) );
if ( editSumCurves )
{
editSumCurves->closeDialogAndResetTargetPlot();
@@ -396,15 +391,13 @@ void RiuMainWindow::createActions()
m_drawStyleSurfOnlyAction = new QAction( QIcon( ":/DrawStyleSurface.svg" ), "&Surface Only", this );
m_dsActionGroup->addAction( m_drawStyleSurfOnlyAction );
m_drawStyleDeformationsAction =
new QAction( QIcon( ":/draw_style_deformation_24x24.png" ), "Show &Displacements", this );
m_drawStyleDeformationsAction = new QAction( QIcon( ":/draw_style_deformation_24x24.png" ), "Show &Displacements", this );
m_drawStyleDeformationsAction->setCheckable( true );
m_dsActionGroup->addAction( m_drawStyleDeformationsAction );
connect( m_dsActionGroup, SIGNAL( triggered( QAction* ) ), SLOT( slotDrawStyleChanged( QAction* ) ) );
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_drawStyleHideGridCellsAction = new QAction( QIcon( ":/draw_style_faults_24x24.png" ), "&Hide Grid Cells", this );
@@ -415,8 +408,7 @@ 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 ) ) );
@@ -753,9 +745,9 @@ void RiuMainWindow::createToolBars()
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::createDockPanels()
{
const int nTreeViews = 3;
const std::vector<QString> treeViewTitles = { "Project Tree", "Calculator Data ", "Scripts" };
const std::vector<QString> treeViewConfigs = { "MainWindow.ProjectTree", "MainWindow.DataSources", "MainWindow.Scripts" };
const int nTreeViews = 3;
const std::vector<QString> treeViewTitles = { "Project Tree", "Calculator Data ", "Scripts" };
const std::vector<QString> treeViewConfigs = { "MainWindow.ProjectTree", "MainWindow.DataSources", "MainWindow.Scripts" };
const std::vector<QString> treeViewDockNames = { RiuDockWidgetTools::mainWindowProjectTreeName(),
RiuDockWidgetTools::mainWindowDataSourceTreeName(),
RiuDockWidgetTools::mainWindowScriptsTreeName() };
@@ -795,16 +787,13 @@ void RiuMainWindow::createDockPanels()
projectTree->treeView()->installEventFilter( treeViewEventFilter );
if ( defaultDockWidgetArea[i] == ads::DockWidgetArea::LeftDockWidgetArea ) leftWidgets.push_back( dockWidget );
if ( defaultDockWidgetArea[i] == ads::DockWidgetArea::RightDockWidgetArea )
rightWidgets.push_back( dockWidget );
if ( defaultDockWidgetArea[i] == ads::DockWidgetArea::RightDockWidgetArea ) rightWidgets.push_back( dockWidget );
connect( dockWidget, SIGNAL( visibilityChanged( bool ) ), projectTree, SLOT( treeVisibilityChanged( bool ) ) );
connect( projectTree, SIGNAL( selectionChanged() ), this, SLOT( selectedObjectsChanged() ) );
projectTree->treeView()->setContextMenuPolicy( Qt::CustomContextMenu );
connect( projectTree->treeView(),
SIGNAL( customContextMenuRequested( const QPoint& ) ),
SLOT( customMenuRequested( const QPoint& ) ) );
connect( projectTree->treeView(), SIGNAL( customContextMenuRequested( const QPoint& ) ), SLOT( customMenuRequested( const QPoint& ) ) );
projectTree->setUiConfigurationName( treeViewConfigs[i] );
}
@@ -812,33 +801,27 @@ void RiuMainWindow::createDockPanels()
// undo/redo view
if ( m_undoView && RiaPreferences::current()->useUndoRedo() )
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Undo Stack",
RiuDockWidgetTools::mainWindowUndoStackName(),
dockManager() );
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Undo Stack", RiuDockWidgetTools::mainWindowUndoStackName(), dockManager() );
dockWidget->setWidget( m_undoView );
rightWidgets.push_back( dockWidget );
}
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Result Plot",
RiuDockWidgetTools::mainWindowResultPlotName(),
dockManager() );
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Result Plot", RiuDockWidgetTools::mainWindowResultPlotName(), dockManager() );
m_resultQwtPlot = new RiuResultQwtPlot( dockWidget );
dockWidget->setWidget( m_resultQwtPlot );
bottomWidgets.push_back( dockWidget );
}
ads::CDockAreaWidget* leftArea = addTabbedWidgets( leftWidgets, ads::DockWidgetArea::LeftDockWidgetArea );
ads::CDockAreaWidget* rightArea = addTabbedWidgets( rightWidgets, ads::DockWidgetArea::RightDockWidgetArea );
ads::CDockAreaWidget* bottomArea = addTabbedWidgets( bottomWidgets,
ads::DockWidgetArea::BottomDockWidgetArea,
dockManager()->centralWidget()->dockAreaWidget() );
ads::CDockAreaWidget* leftArea = addTabbedWidgets( leftWidgets, ads::DockWidgetArea::LeftDockWidgetArea );
ads::CDockAreaWidget* rightArea = addTabbedWidgets( rightWidgets, ads::DockWidgetArea::RightDockWidgetArea );
ads::CDockAreaWidget* bottomArea =
addTabbedWidgets( bottomWidgets, ads::DockWidgetArea::BottomDockWidgetArea, dockManager()->centralWidget()->dockAreaWidget() );
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Property Editor",
RiuDockWidgetTools::mainWindowPropertyEditorName(),
dockManager() );
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Property Editor", RiuDockWidgetTools::mainWindowPropertyEditorName(), dockManager() );
m_pdmUiPropertyView = new caf::PdmUiPropertyView( dockWidget );
dockWidget->setWidget( m_pdmUiPropertyView );
@@ -847,9 +830,8 @@ void RiuMainWindow::createDockPanels()
#ifdef USE_ODB_API
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Mohr's Circle Plot",
RiuDockWidgetTools::mainWindowMohrsCirclePlotName(),
dockManager() );
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Mohr's Circle Plot", RiuDockWidgetTools::mainWindowMohrsCirclePlotName(), dockManager() );
m_mohrsCirclePlot = new RiuMohrsCirclePlot( dockWidget );
dockWidget->setWidget( m_mohrsCirclePlot );
@@ -868,8 +850,7 @@ void RiuMainWindow::createDockPanels()
}
{
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "PVT Plot", RiuDockWidgetTools::mainWindowPvtPlotName(), dockManager() );
auto dockWidget = RiuDockWidgetTools::createDockWidget( "PVT Plot", RiuDockWidgetTools::mainWindowPvtPlotName(), dockManager() );
m_pvtPlotPanel = new RiuPvtPlotPanel( dockWidget );
dockWidget->setWidget( m_pvtPlotPanel );
@@ -878,9 +859,7 @@ void RiuMainWindow::createDockPanels()
// result info
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Result Info",
RiuDockWidgetTools::mainWindowResultInfoName(),
dockManager() );
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Result Info", RiuDockWidgetTools::mainWindowResultInfoName(), dockManager() );
m_resultInfoPanel = new RiuResultInfoPanel( dockWidget );
dockWidget->setWidget( m_resultInfoPanel );
@@ -890,9 +869,8 @@ void RiuMainWindow::createDockPanels()
ads::CDockAreaWidget* procAndMsgTabs = nullptr;
// process monitor
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Process Monitor",
RiuDockWidgetTools::mainWindowProcessMonitorName(),
dockManager() );
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Process Monitor", RiuDockWidgetTools::mainWindowProcessMonitorName(), dockManager() );
m_processMonitor = new RiuProcessMonitor( dockWidget );
dockWidget->setWidget( m_processMonitor );
@@ -900,8 +878,7 @@ void RiuMainWindow::createDockPanels()
}
{
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Messages", RiuDockWidgetTools::mainWindowMessagesName(), dockManager() );
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Messages", RiuDockWidgetTools::mainWindowMessagesName(), dockManager() );
m_messagePanel = new RiuMessagePanel( dockWidget );
dockWidget->setWidget( m_messagePanel );
@@ -1253,8 +1230,7 @@ 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 );
@@ -1269,8 +1245,7 @@ void RiuMainWindow::slotViewFromNorth()
{
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 ) );
}
}
@@ -1292,8 +1267,7 @@ void RiuMainWindow::slotViewFromEast()
{
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 ) );
}
}
@@ -1315,8 +1289,7 @@ void RiuMainWindow::slotViewFromAbove()
{
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 ) );
}
}
@@ -1357,8 +1330,7 @@ void RiuMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::selectViewInProjectTreePreservingSubItemSelection( const Rim3dView* previousActiveReservoirView,
Rim3dView* activatedView )
void RiuMainWindow::selectViewInProjectTreePreservingSubItemSelection( const Rim3dView* previousActiveReservoirView, Rim3dView* activatedView )
{
bool is3dViewCurrentlySelected = false;
if ( caf::SelectionManager::instance()->selectedItem() )
@@ -1745,8 +1717,7 @@ void RiuMainWindow::slotToggleLightingAction( bool enable )
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::restoreTreeViewState()
{
restoreTreeViewStates( RimProject::current()->mainWindowTreeViewStates(),
RimProject::current()->mainWindowCurrentModelIndexPaths() );
restoreTreeViewStates( RimProject::current()->mainWindowTreeViewStates(), RimProject::current()->mainWindowCurrentModelIndexPaths() );
}
//--------------------------------------------------------------------------------------------------
@@ -1803,8 +1774,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.blue() * ( 1.0 - currentUsageFraction ) +
warningColor.blue() * currentUsageFraction ) );
(int)( okColor.blue() * ( 1.0 - currentUsageFraction ) + warningColor.blue() * currentUsageFraction ) );
m_memoryCriticalWarning->setText( QString( "" ) );
if ( availVirtualFraction < caf::MemoryInspector::getRemainingMemoryCriticalThresholdFraction() )
@@ -1987,10 +1957,8 @@ void RiuMainWindow::slotExecutePaintEventPerformanceTest()
double msPerFrame = totalTimeMS / redrawCount;
QString resultInfo = QString( "Total time '%1 ms' for %2 number of redraws, frame time '%3 ms'" )
.arg( totalTimeMS )
.arg( redrawCount )
.arg( msPerFrame );
QString resultInfo =
QString( "Total time '%1 ms' for %2 number of redraws, frame time '%3 ms'" ).arg( totalTimeMS ).arg( redrawCount ).arg( msPerFrame );
setResultInfo( resultInfo );
}
}

View File

@@ -251,8 +251,7 @@ private slots:
void customMenuRequested( const QPoint& pos );
private:
void selectViewInProjectTreePreservingSubItemSelection( const Rim3dView* previousActiveReservoirView,
Rim3dView* activatedView );
void selectViewInProjectTreePreservingSubItemSelection( const Rim3dView* previousActiveReservoirView, Rim3dView* activatedView );
// Pdm System :
public:

View File

@@ -180,8 +180,7 @@ void RiuMainWindowBase::loadWinGeoAndDockToolBarLayout()
if ( !dockingOk )
{
m_dockManager->restoreState( RiuDockWidgetTools::defaultDockState( defaultDockStateNames()[0] ),
DOCKSTATE_VERSION );
m_dockManager->restoreState( RiuDockWidgetTools::defaultDockState( defaultDockStateNames()[0] ), DOCKSTATE_VERSION );
}
}
@@ -215,8 +214,7 @@ void RiuMainWindowBase::saveWinGeoAndDockToolBarLayout()
settings.setValue( QString( "%1/isMaximized" ).arg( registryFolderName() ), isMaximized() );
settings.setValue( QString( "%1/dockLayout" ).arg( registryFolderName() ),
m_dockManager->saveState( DOCKSTATE_VERSION ) );
settings.setValue( QString( "%1/dockLayout" ).arg( registryFolderName() ), m_dockManager->saveState( DOCKSTATE_VERSION ) );
}
//--------------------------------------------------------------------------------------------------
@@ -416,10 +414,7 @@ void RiuMainWindowBase::slotDockWidgetToggleViewActionTriggered()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindowBase::initializeSubWindow( RiuMdiArea* mdiArea,
QMdiSubWindow* mdiSubWindow,
const QPoint& subWindowPos,
const QSize& subWindowSize )
void RiuMainWindowBase::initializeSubWindow( RiuMdiArea* mdiArea, QMdiSubWindow* mdiSubWindow, const QPoint& subWindowPos, const QSize& subWindowSize )
{
bool initialStateMaximized = false;
auto initialState3dWindow = RimProject::current()->subWindowsTileMode3DWindow();
@@ -581,8 +576,7 @@ void RiuMainWindowBase::restoreTreeViewStates( QString treeStateString, QString
QString currentIndexString = treeIndexes[treeId];
if ( !currentIndexString.isEmpty() )
{
QModelIndex mi =
caf::QTreeViewStateSerializer::getModelIndexFromString( tv->treeView()->model(), currentIndexString );
QModelIndex mi = caf::QTreeViewStateSerializer::getModelIndexFromString( tv->treeView()->model(), currentIndexString );
tv->treeView()->setCurrentIndex( mi );
}
}
@@ -651,11 +645,7 @@ void RiuMainWindowBase::deleteDockLayout()
QString name = action->text();
QString questionStr = "Are you sure you want to delete the window layout \"" + name + "\"?";
auto reply = QMessageBox::question( this,
"Delete Window Layout",
questionStr,
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No );
auto reply = QMessageBox::question( this, "Delete Window Layout", questionStr, QMessageBox::Yes | QMessageBox::No, QMessageBox::No );
if ( reply == QMessageBox::Yes )
{
dockManager()->removePerspective( name );
@@ -704,9 +694,8 @@ void RiuMainWindowBase::exportDockLayout()
//--------------------------------------------------------------------------------------------------
void RiuMainWindowBase::saveDockLayout()
{
bool ok = false;
QString name =
QInputDialog::getText( this, "Save Window Layout", "Give the window layout a name:", QLineEdit::Normal, "", &ok );
bool ok = false;
QString name = QInputDialog::getText( this, "Save Window Layout", "Give the window layout a name:", QLineEdit::Normal, "", &ok );
if ( ok && !name.isEmpty() )
{
dockManager()->addPerspective( name );

View File

@@ -66,11 +66,9 @@ public:
QMdiSubWindow* createViewWindow();
virtual void removeViewer( QWidget* viewer ) = 0;
virtual void initializeViewer( QMdiSubWindow* viewWindow,
QWidget* viewWidget,
const RimMdiWindowGeometry& windowsGeometry ) = 0;
virtual void setActiveViewer( QWidget* subWindow ) = 0;
virtual void removeViewer( QWidget* viewer ) = 0;
virtual void initializeViewer( QMdiSubWindow* viewWindow, QWidget* viewWidget, const RimMdiWindowGeometry& windowsGeometry ) = 0;
virtual void setActiveViewer( QWidget* subWindow ) = 0;
virtual QMdiSubWindow* findMdiSubWindow( QWidget* viewer ) = 0;
@@ -103,10 +101,7 @@ public:
protected:
void createTreeViews( int numberOfTrees );
void removeViewerFromMdiArea( RiuMdiArea* mdiArea, QWidget* viewer );
void initializeSubWindow( RiuMdiArea* mdiArea,
QMdiSubWindow* mdiSubWindow,
const QPoint& subWindowPos,
const QSize& subWindowSize );
void initializeSubWindow( RiuMdiArea* mdiArea, QMdiSubWindow* mdiSubWindow, const QPoint& subWindowPos, const QSize& subWindowSize );
void restoreTreeViewStates( QString treeStateString, QString treeIndexString );

View File

@@ -111,7 +111,7 @@ void RiuMohrsCirclePlot::appendSelection( const RiuSelectionItem* selectionItem
if ( geoMechSelectionItem )
{
const size_t gridIndex = geoMechSelectionItem->m_gridIndex;
RigFemPart* femPart = geoMechSelectionItem->m_resultDefinition->ownerCaseData()->femParts()->part( gridIndex );
RigFemPart* femPart = geoMechSelectionItem->m_resultDefinition->ownerCaseData()->femParts()->part( gridIndex );
const size_t cellIndex = geoMechSelectionItem->m_cellIndex;
const int elmId = femPart->elmId( cellIndex );
@@ -177,13 +177,7 @@ void RiuMohrsCirclePlot::updateOnTimeStepChanged( Rim3dView* changedView )
for ( const MohrsCirclesInfo& mohrInfo : mohrsCiclesInfosCopy )
{
addOrUpdateCurves( mohrInfo.geomResDef,
stepIdx,
frameIdx,
mohrInfo.gridIndex,
mohrInfo.elmIndex,
mohrInfo.elmId,
mohrInfo.color );
addOrUpdateCurves( mohrInfo.geomResDef, stepIdx, frameIdx, mohrInfo.gridIndex, mohrInfo.elmIndex, mohrInfo.elmId, mohrInfo.color );
}
updatePlot();
@@ -238,8 +232,7 @@ void RiuMohrsCirclePlot::addOrUpdateMohrCircleCurves( const MohrsCirclesInfo& mo
if ( i == 0 )
{
QString textBuilder;
textBuilder.append(
QString( "<b>FOS</b>: %1, " ).arg( QString::number( mohrsCirclesInfo.factorOfSafety, 'f', 2 ) ) );
textBuilder.append( QString( "<b>FOS</b>: %1, " ).arg( QString::number( mohrsCirclesInfo.factorOfSafety, 'f', 2 ) ) );
textBuilder.append( QString( "<b>Element Id</b>: %1, <b>ijk</b>[%2, %3, %4]," )
.arg( mohrsCirclesInfo.elmId )
@@ -418,16 +411,8 @@ bool RiuMohrsCirclePlot::addOrUpdateCurves( const RimGeoMechResultDefinition* ge
{
int elmId = femPart->elmId( elmIndex );
MohrsCirclesInfo mohrsCircle( principals,
gridIndex,
elmIndex,
elmId,
i,
j,
k,
geomResDef,
calculateFOS( principals, frictionAngleDeg, cohesion ),
color );
MohrsCirclesInfo
mohrsCircle( principals, gridIndex, elmIndex, elmId, i, j, k, geomResDef, calculateFOS( principals, frictionAngleDeg, cohesion ), color );
m_mohrsCiclesInfos.push_back( mohrsCircle );
@@ -596,8 +581,7 @@ 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() );
@@ -737,8 +721,7 @@ void RiuMohrsCirclePlot::setAxesScaleAndReplot()
this->replot();
}
RiuGeoMechSelectionItem* RiuMohrsCirclePlot::extractGeoMechSelectionItem( const RiuSelectionItem* selectionItem,
Rim3dView*& newFollowAnimView )
RiuGeoMechSelectionItem* RiuMohrsCirclePlot::extractGeoMechSelectionItem( const RiuSelectionItem* selectionItem, Rim3dView*& newFollowAnimView )
{
newFollowAnimView = nullptr;
RiuGeoMechSelectionItem* geoMechSelectionItem = nullptr;

View File

@@ -125,8 +125,7 @@ private:
static bool isValidPrincipals( const cvf::Vec3f& principals );
static float calculateFOS( const cvf::Vec3f& principals, double frictionAngle, double cohesion );
static RiuGeoMechSelectionItem* extractGeoMechSelectionItem( const RiuSelectionItem* selectionItem,
Rim3dView*& newFollowAnimView );
static RiuGeoMechSelectionItem* extractGeoMechSelectionItem( const RiuSelectionItem* selectionItem, Rim3dView*& newFollowAnimView );
private slots:
void setAxesScaleAndReplot();

View File

@@ -494,8 +494,7 @@ void RiuMultiPlotBook::performUpdate( RiaDefines::MultiPlotPageUpdateType whatTo
if ( !m_plotDefinition || !m_plotDefinition->isValid() || !m_plotDefinition->showWindow() ) return;
applyLook();
if ( ( ( whatToUpdate & RiaDefines::MultiPlotPageUpdateType::PLOT ) == RiaDefines::MultiPlotPageUpdateType::PLOT ) ||
m_pages.size() == 0 )
if ( ( ( whatToUpdate & RiaDefines::MultiPlotPageUpdateType::PLOT ) == RiaDefines::MultiPlotPageUpdateType::PLOT ) || m_pages.size() == 0 )
{
deleteAllPages();
createPages();

View File

@@ -175,9 +175,8 @@ void RiuMultiPlotPage::insertPlot( RiuPlotWidget* plotWidget, size_t index )
RiuQwtPlotWidget* qwtPlotWidget = dynamic_cast<RiuQwtPlotWidget*>( plotWidget );
RiuQwtPlotLegend* legend = nullptr;
RiuDraggableOverlayFrame* legendFrame =
new RiuDraggableOverlayFrame( plotWidget->getParentForOverlay(), plotWidget->overlayMargins() );
RiuQwtPlotLegend* legend = nullptr;
RiuDraggableOverlayFrame* legendFrame = new RiuDraggableOverlayFrame( plotWidget->getParentForOverlay(), plotWidget->overlayMargins() );
if ( m_plotDefinition->legendsVisible() && plotWidget->plotDefinition()->legendsVisible() )
{
@@ -201,9 +200,7 @@ void RiuMultiPlotPage::insertPlot( RiuPlotWidget* plotWidget, size_t index )
legend->connect( qwtPlotWidget->qwtPlot(),
SIGNAL( legendDataChanged( const QVariant&, const QList<QwtLegendData>& ) ),
SLOT( updateLegend( const QVariant&, const QList<QwtLegendData>& ) ) );
qwtPlotWidget->connect( legend,
SIGNAL( clicked( const QVariant&, int ) ),
SLOT( onLegendClicked( const QVariant&, int ) ) );
qwtPlotWidget->connect( legend, SIGNAL( clicked( const QVariant&, int ) ), SLOT( onLegendClicked( const QVariant&, int ) ) );
}
else
{
@@ -766,9 +763,7 @@ void RiuMultiPlotPage::addLegendWidget( RiuPlotWidget* plotWidget,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMultiPlotPage::updateLegendVisibility( RiuPlotWidget* plotWidget,
RiuQwtPlotLegend* legend,
RiuDraggableOverlayFrame* legendFrame )
void RiuMultiPlotPage::updateLegendVisibility( RiuPlotWidget* plotWidget, RiuQwtPlotLegend* legend, RiuDraggableOverlayFrame* legendFrame )
{
if ( !legend ) return;
@@ -913,8 +908,7 @@ int RiuMultiPlotPage::alignCanvasTops()
if ( plotWidgets[visibleIndex]->axisEnabled( RiuPlotAxis::defaultTop() ) )
{
QFont font = qwtPlotWidget->qwtPlot()->axisFont( QwtAxis::XTop );
maxExtents[row] = std::max( maxExtents[row],
qwtPlotWidget->qwtPlot()->axisScaleDraw( QwtAxis::XTop )->extent( font ) );
maxExtents[row] = std::max( maxExtents[row], qwtPlotWidget->qwtPlot()->axisScaleDraw( QwtAxis::XTop )->extent( font ) );
}
}
}
@@ -1061,8 +1055,7 @@ QList<QPointer<QLabel>> RiuMultiPlotPage::subTitlesForVisiblePlots() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<int, int>
RiuMultiPlotPage::findAvailableRowAndColumn( int startRow, int startColumn, int columnSpan, int columnCount ) const
std::pair<int, int> RiuMultiPlotPage::findAvailableRowAndColumn( int startRow, int startColumn, int columnSpan, int columnCount ) const
{
int availableRow = startRow;
int availableColumn = startColumn;

View File

@@ -84,8 +84,8 @@ public:
void setAutoAlignAxes( bool autoAlignAxes );
void scheduleUpdate( RiaDefines::MultiPlotPageUpdateType whatToUpdate = RiaDefines::MultiPlotPageUpdateType::ALL );
void scheduleReplotOfAllPlots();
void scheduleUpdate( RiaDefines::MultiPlotPageUpdateType whatToUpdate = RiaDefines::MultiPlotPageUpdateType::ALL );
void scheduleReplotOfAllPlots();
virtual void updateVerticalScrollBar( double visibleMin, double visibleMax, double totalMin, double totalMax ) {}
void updateSubTitles();
@@ -125,12 +125,7 @@ protected:
virtual void refreshLegends();
void updatePlotLayouts();
void addLegendWidget( RiuPlotWidget* plotWidget,
RiuQwtPlotLegend* legend,
RiuDraggableOverlayFrame* legendFrame,
int row,
int column,
int colSpan );
void addLegendWidget( RiuPlotWidget* plotWidget, RiuQwtPlotLegend* legend, RiuDraggableOverlayFrame* legendFrame, int row, int column, int colSpan );
void reinsertPlotWidget( RiuPlotWidget* plotWidget,
RiuQwtPlotLegend* legend,

View File

@@ -61,7 +61,7 @@ RiuPickItemInfo RiuPickItemInfo::extractPickItemInfo( const cvf::HitItem* hitIte
//--------------------------------------------------------------------------------------------------
std::vector<RiuPickItemInfo> RiuPickItemInfo::convertToPickItemInfos( const cvf::HitItemCollection& hitItems,
const cvf::Vec3d& globalRayOrigin,
double coincidentRayDistanceTolerance )
double coincidentRayDistanceTolerance )
{
sm_rayDistanceTolerance = coincidentRayDistanceTolerance;

View File

@@ -71,7 +71,7 @@ public:
static RiuPickItemInfo extractPickItemInfo( const cvf::HitItem* hitItem );
static std::vector<RiuPickItemInfo> convertToPickItemInfos( const cvf::HitItemCollection& hitItems,
const cvf::Vec3d& globalRayOrigin,
double coincidentRayDistanceTolerance = 1e-3 );
double coincidentRayDistanceTolerance = 1e-3 );
private:
double m_distanceAlongRay;

View File

@@ -51,9 +51,9 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames /*= true */,
RiaDefines::TrackSpan trackSpan /*= FULL_WIDTH*/,
const std::vector<Qt::BrushStyle>& brushStyles /* = {}*/,
int fontSize )
RiaDefines::TrackSpan trackSpan /*= FULL_WIDTH*/,
const std::vector<Qt::BrushStyle>& brushStyles /* = {}*/,
int fontSize )
{
if ( names.size() != regionRanges.size() ) return;
m_plot = plot;
@@ -68,8 +68,7 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
catMapper.setInterpolateColors( colorTable.color3ubArray() );
RiaDefines::Orientation annotationOrientation = RiaDefines::Orientation::HORIZONTAL;
if ( depthOrientation == RiaDefines::Orientation::HORIZONTAL )
annotationOrientation = RiaDefines::Orientation::VERTICAL;
if ( depthOrientation == RiaDefines::Orientation::HORIZONTAL ) annotationOrientation = RiaDefines::Orientation::VERTICAL;
for ( size_t i = 0; i < names.size(); i++ )
{
@@ -112,8 +111,7 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
QColor lineColor( 0, 0, 0, 0 );
QColor textColor( 0, 0, 0, 255 );
if ( regionDisplay & RiaDefines::DARK_LINES || regionDisplay & RiaDefines::COLORED_LINES ||
regionDisplay & RiaDefines::LIGHT_LINES )
if ( regionDisplay & RiaDefines::DARK_LINES || regionDisplay & RiaDefines::COLORED_LINES || regionDisplay & RiaDefines::LIGHT_LINES )
{
cvf::Color3ub cvfColor = catMapper.mapToColor( static_cast<double>( i ) );
QColor cycledColor( cvfColor.r(), cvfColor.g(), cvfColor.b() );
@@ -168,9 +166,7 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotAnnotationTool::attachWellPicks( QwtPlot* plot,
const std::vector<QString>& names,
const std::vector<double>& yPositions )
void RiuPlotAnnotationTool::attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double>& yPositions )
{
detachAllAnnotations();
@@ -214,18 +210,11 @@ void RiuPlotAnnotationTool::attachAnnotationLine( QwtPlot* plot,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotAnnotationTool::attachAnnotation( QwtPlot* plot,
RimPlotAxisAnnotation* annotation,
RiaDefines::Orientation orientation )
void RiuPlotAnnotationTool::attachAnnotation( QwtPlot* plot, RimPlotAxisAnnotation* annotation, RiaDefines::Orientation orientation )
{
if ( annotation->annotationType() == RimPlotAxisAnnotation::AnnotationType::LINE )
{
attachAnnotationLine( plot,
annotation->color(),
annotation->name(),
annotation->penStyle(),
annotation->value(),
orientation );
attachAnnotationLine( plot, annotation->color(), annotation->name(), annotation->penStyle(), annotation->value(), orientation );
}
}
@@ -316,25 +305,12 @@ void RiuPlotAnnotationTool::horizontalRange( const QString& nam
m_plotItems.push_back( shading );
auto* line( new QwtPlotMarker() );
RiuPlotAnnotationTool::setLineProperties( line,
name,
RiaDefines::Orientation::HORIZONTAL,
yRange.first,
Qt::DashLine,
color,
color,
horizontalAlignment );
RiuPlotAnnotationTool::setLineProperties( line, name, RiaDefines::Orientation::HORIZONTAL, yRange.first, Qt::DashLine, color, color, horizontalAlignment );
line->attach( m_plot );
m_plotItems.push_back( line );
auto* bottomLine( new QwtPlotMarker() );
RiuPlotAnnotationTool::setLineProperties( bottomLine,
QString(),
RiaDefines::Orientation::HORIZONTAL,
yRange.second,
Qt::DashLine,
color,
color );
RiuPlotAnnotationTool::setLineProperties( bottomLine, QString(), RiaDefines::Orientation::HORIZONTAL, yRange.second, Qt::DashLine, color, color );
bottomLine->attach( m_plot );
m_plotItems.push_back( bottomLine );

View File

@@ -47,10 +47,10 @@ public:
RiaDefines::RegionDisplay regionDisplay,
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames = true,
RiaDefines::TrackSpan trackSpan = RiaDefines::TrackSpan::FULL_WIDTH,
const std::vector<Qt::BrushStyle>& brushStyles = {},
int fontSize = 0 );
bool showNames = true,
RiaDefines::TrackSpan trackSpan = RiaDefines::TrackSpan::FULL_WIDTH,
const std::vector<Qt::BrushStyle>& brushStyles = {},
int fontSize = 0 );
void attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double>& yPositions );
void attachAnnotationLine( QwtPlot* plot,

View File

@@ -55,9 +55,7 @@ void RiuPlotCurve::setSamplesValues( const std::vector<double>& xValues, const s
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
const std::vector<double>& yValues,
bool useLogarithmicScale )
void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& xValues, const std::vector<double>& yValues, bool useLogarithmicScale )
{
computeValidIntervalsAndSetCurveData( xValues, yValues, useLogarithmicScale );
}
@@ -77,9 +75,7 @@ void RiuPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
const std::vector<double>& yValues,
bool useLogarithmicScale )
void RiuPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes, const std::vector<double>& yValues, bool useLogarithmicScale )
{
auto xValues = RiuPlotCurve::fromTime_t( dateTimes );

View File

@@ -63,24 +63,17 @@ public:
virtual void setSamplesValues( const std::vector<double>& xValues, const std::vector<double>& yValues );
void setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
const std::vector<double>& yValues,
bool useLogarithmicScale );
void setSamplesFromXValuesAndYValues( const std::vector<double>& xValues, const std::vector<double>& yValues, bool useLogarithmicScale );
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
const std::vector<double>& yValues,
bool useLogarithmicScale );
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes, const std::vector<double>& yValues, bool useLogarithmicScale );
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
const std::vector<double>& yValues,
bool useLogarithmicScale );
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes, const std::vector<double>& yValues, bool useLogarithmicScale );
virtual void setSamplesFromXYErrorValues(
const std::vector<double>& xValues,
const std::vector<double>& yValues,
const std::vector<double>& errorValues,
bool useLogarithmicScale,
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
virtual void setSamplesFromXYErrorValues( const std::vector<double>& xValues,
const std::vector<double>& yValues,
const std::vector<double>& errorValues,
bool useLogarithmicScale,
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
void setLineSegmentStartStopIndices( const std::vector<std::pair<size_t, size_t>>& lineSegmentStartStopIndices );
@@ -136,9 +129,7 @@ protected:
virtual void setSamplesInPlot( const std::vector<double>& xValues, const std::vector<double>& yValues ) = 0;
private:
void computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
const std::vector<double>& yValues,
bool useLogarithmicScale );
void computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues, const std::vector<double>& yValues, bool useLogarithmicScale );
protected:
float m_symbolSkipPixelDistance;

View File

@@ -28,10 +28,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuPlotCurveSymbol::RiuPlotCurveSymbol( PointSymbolEnum riuStyle,
const QString& label,
LabelPosition labelPosition,
int labelFontSizePt )
RiuPlotCurveSymbol::RiuPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSizePt )
: m_style( riuStyle )
, m_globalLabel( label )
, m_labelPosition( labelPosition )

View File

@@ -64,10 +64,7 @@ public:
SYMBOL_DOWN_ALIGNED_TRIANGLE
};
RiuPlotCurveSymbol( PointSymbolEnum riuStyle,
const QString& label,
LabelPosition labelPosition = LabelAboveSymbol,
int labelFontSizePt = 8 );
RiuPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition = LabelAboveSymbol, int labelFontSizePt = 8 );
QString globalLabel() const;

View File

@@ -91,7 +91,7 @@ QImage RiuPlotCurveSymbolImageCreator::createSymbolImage( RiuPlotCurveSymbol::Po
//--------------------------------------------------------------------------------------------------
QImage RiuPlotCurveSymbolImageCreator::createSymbolImage( RiuPlotCurveSymbol::RiuPlotCurveSymbol::PointSymbolEnum symbolStyle,
const QSize& size,
const QColor& color )
const QColor& color )
{
QPen defaultPen;
return createSymbolImage( symbolStyle, size, defaultPen, color );
@@ -101,9 +101,9 @@ QImage RiuPlotCurveSymbolImageCreator::createSymbolImage( RiuPlotCurveSymbol::Ri
/// Adapted from QwtSymbol::qwtDrawTriangleSymbols
//--------------------------------------------------------------------------------------------------
QImage RiuPlotCurveSymbolImageCreator::createTriangleImage( RiuPlotCurveSymbol::RiuPlotCurveSymbol::PointSymbolEnum symbolStyle,
const QSize& size,
const QPen& m_pen,
const QColor& color )
const QSize& size,
const QPen& m_pen,
const QColor& color )
{
QImage star( size, QImage::Format_ARGB32 );
star.fill( Qt::transparent );

View File

@@ -32,19 +32,13 @@ class QPen;
class RiuPlotCurveSymbolImageCreator
{
public:
static QImage createSymbolImage( RiuPlotCurveSymbol::PointSymbolEnum symbolStyle,
const QSize& size,
const QPen& pen,
const QColor& color );
static QImage createSymbolImage( RiuPlotCurveSymbol::PointSymbolEnum symbolStyle, const QSize& size, const QPen& pen, const QColor& color );
static QImage
createSymbolImage( RiuPlotCurveSymbol::PointSymbolEnum symbolStyle, const QSize& size, const QColor& color );
static QImage createSymbolImage( RiuPlotCurveSymbol::PointSymbolEnum symbolStyle, const QSize& size, const QColor& color );
protected:
static QImage createTriangleImage( RiuPlotCurveSymbol::PointSymbolEnum symbolStyle,
const QSize& size,
const QPen& pen,
const QColor& color );
static QImage
createTriangleImage( RiuPlotCurveSymbol::PointSymbolEnum symbolStyle, const QSize& size, const QPen& pen, const QColor& color );
static QImage createRectImage( const QSize& size, const QPen& pen, const QColor& color );
static QImage createStar1Image( const QSize& size, const QPen& pen, const QColor& color );
static QImage createStar2Image( const QSize& size, const QPen& pen, const QColor& color );

View File

@@ -98,8 +98,7 @@ RiuPlotMainWindow::RiuPlotMainWindow()
menuForMdiArea << "RicOpenSummaryPlotEditorFromMdiAreaFeature";
new RiuContextMenuLauncher( m_mdiArea, menuForMdiArea );
ads::CDockWidget* cWidget =
RiuDockWidgetTools::createDockWidget( "Plot Window", RiuDockWidgetTools::mainPlotWindowName(), this );
ads::CDockWidget* cWidget = RiuDockWidgetTools::createDockWidget( "Plot Window", RiuDockWidgetTools::mainPlotWindowName(), this );
cWidget->setWidget( m_mdiArea );
auto dockArea = dockManager()->setCentralWidget( cWidget );
@@ -121,9 +120,7 @@ RiuPlotMainWindow::RiuPlotMainWindow()
{
m_undoView->setStack( caf::CmdExecCommandManager::instance()->undoStack() );
}
connect( caf::CmdExecCommandManager::instance()->undoStack(),
SIGNAL( indexChanged( int ) ),
SLOT( slotRefreshUndoRedoActions() ) );
connect( caf::CmdExecCommandManager::instance()->undoStack(), SIGNAL( indexChanged( int ) ), SLOT( slotRefreshUndoRedoActions() ) );
}
//--------------------------------------------------------------------------------------------------
@@ -209,8 +206,7 @@ void RiuPlotMainWindow::initializeGuiNewProjectLoaded()
m_mdiArea->applyTiling();
if ( m_activePlotViewWindow && m_activePlotViewWindow->viewWidget() &&
!RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
if ( m_activePlotViewWindow && m_activePlotViewWindow->viewWidget() && !RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
{
if ( m_activePlotViewWindow->mdiWindowGeometry().isMaximized )
{
@@ -507,12 +503,9 @@ void RiuPlotMainWindow::refreshToolbars()
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::createDockPanels()
{
const int nTreeViews = 4;
const std::vector<QString> treeViewTitles = { "Plots", "Data Sources", "Templates", "Scripts" };
const std::vector<QString> treeViewConfigs = { "PlotWindow.Plots",
"PlotWindow.DataSources",
"PlotWindow.Templates",
"PlotWindow.Scripts" };
const int nTreeViews = 4;
const std::vector<QString> treeViewTitles = { "Plots", "Data Sources", "Templates", "Scripts" };
const std::vector<QString> treeViewConfigs = { "PlotWindow.Plots", "PlotWindow.DataSources", "PlotWindow.Templates", "PlotWindow.Scripts" };
const std::vector<QString> treeViewDockNames = { RiuDockWidgetTools::plotMainWindowPlotsTreeName(),
RiuDockWidgetTools::plotMainWindowDataSourceTreeName(),
RiuDockWidgetTools::plotMainWindowTemplateTreeName(),
@@ -555,25 +548,21 @@ void RiuPlotMainWindow::createDockPanels()
projectTree->treeView()->installEventFilter( treeViewEventFilter );
if ( defaultDockWidgetArea[i] == ads::DockWidgetArea::LeftDockWidgetArea ) leftWidgets.push_back( dockWidget );
if ( defaultDockWidgetArea[i] == ads::DockWidgetArea::RightDockWidgetArea )
rightWidgets.push_back( dockWidget );
if ( defaultDockWidgetArea[i] == ads::DockWidgetArea::RightDockWidgetArea ) rightWidgets.push_back( dockWidget );
connect( dockWidget, SIGNAL( visibilityChanged( bool ) ), projectTree, SLOT( treeVisibilityChanged( bool ) ) );
connect( projectTree, SIGNAL( selectionChanged() ), this, SLOT( selectedObjectsChanged() ) );
projectTree->treeView()->setContextMenuPolicy( Qt::CustomContextMenu );
connect( projectTree->treeView(),
SIGNAL( customContextMenuRequested( const QPoint& ) ),
SLOT( customMenuRequested( const QPoint& ) ) );
connect( projectTree->treeView(), SIGNAL( customContextMenuRequested( const QPoint& ) ), SLOT( customMenuRequested( const QPoint& ) ) );
projectTree->setUiConfigurationName( treeViewConfigs[i] );
}
// the plot manager
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Plot Manager",
RiuDockWidgetTools::plotMainWindowPlotManagerName(),
dockManager() );
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Plot Manager", RiuDockWidgetTools::plotMainWindowPlotManagerName(), dockManager() );
m_summaryPlotManagerView = std::make_unique<caf::PdmUiPropertyView>( dockWidget );
@@ -590,25 +579,22 @@ void RiuPlotMainWindow::createDockPanels()
// the undo stack
if ( m_undoView && RiaPreferences::current()->useUndoRedo() )
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Undo Stack",
RiuDockWidgetTools::plotMainWindowUndoStackName(),
dockManager() );
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Undo Stack", RiuDockWidgetTools::plotMainWindowUndoStackName(), dockManager() );
dockWidget->setWidget( m_undoView );
rightWidgets.push_back( dockWidget );
}
ads::CDockAreaWidget* leftArea = addTabbedWidgets( leftWidgets, ads::DockWidgetArea::LeftDockWidgetArea );
ads::CDockAreaWidget* rightArea = addTabbedWidgets( rightWidgets, ads::DockWidgetArea::RightDockWidgetArea );
ads::CDockAreaWidget* bottomArea = addTabbedWidgets( bottomWidgets,
ads::DockWidgetArea::BottomDockWidgetArea,
dockManager()->centralWidget()->dockAreaWidget() );
ads::CDockAreaWidget* leftArea = addTabbedWidgets( leftWidgets, ads::DockWidgetArea::LeftDockWidgetArea );
ads::CDockAreaWidget* rightArea = addTabbedWidgets( rightWidgets, ads::DockWidgetArea::RightDockWidgetArea );
ads::CDockAreaWidget* bottomArea =
addTabbedWidgets( bottomWidgets, ads::DockWidgetArea::BottomDockWidgetArea, dockManager()->centralWidget()->dockAreaWidget() );
// the property editor
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Property Editor",
RiuDockWidgetTools::plotMainWindowPropertyEditorName(),
dockManager() );
auto dockWidget =
RiuDockWidgetTools::createDockWidget( "Property Editor", RiuDockWidgetTools::plotMainWindowPropertyEditorName(), dockManager() );
m_pdmUiPropertyView = std::make_unique<caf::PdmUiPropertyView>( dockWidget );
dockWidget->setWidget( m_pdmUiPropertyView.get() );
@@ -617,9 +603,7 @@ void RiuPlotMainWindow::createDockPanels()
// the log message view
{
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Messages",
RiuDockWidgetTools::plotMainWindowMessagesName(),
dockManager() );
auto dockWidget = RiuDockWidgetTools::createDockWidget( "Messages", RiuDockWidgetTools::plotMainWindowMessagesName(), dockManager() );
m_messagePanel = new RiuMessagePanel( dockWidget );
dockWidget->setWidget( m_messagePanel );
@@ -818,8 +802,7 @@ RiuMessagePanel* RiuPlotMainWindow::messagePanel()
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::showAndSetKeyboardFocusToSummaryPlotManager()
{
auto dockWidget =
RiuDockWidgetTools::findDockWidget( this->dockManager(), RiuDockWidgetTools::plotMainWindowPlotManagerName() );
auto dockWidget = RiuDockWidgetTools::findDockWidget( this->dockManager(), RiuDockWidgetTools::plotMainWindowPlotManagerName() );
if ( dockWidget )
{
dockWidget->setVisible( true );
@@ -1034,8 +1017,7 @@ void RiuPlotMainWindow::selectedObjectsChanged()
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::restoreTreeViewState()
{
restoreTreeViewStates( RimProject::current()->plotWindowTreeViewStates(),
RimProject::current()->plotWindowCurrentModelIndexPaths() );
restoreTreeViewStates( RimProject::current()->plotWindowTreeViewStates(), RimProject::current()->plotWindowCurrentModelIndexPaths() );
}
//--------------------------------------------------------------------------------------------------
@@ -1103,8 +1085,7 @@ void RiuPlotMainWindow::dropEvent( QDropEvent* event )
//--------------------------------------------------------------------------------------------------
QStringList RiuPlotMainWindow::defaultDockStateNames()
{
QStringList retList = { RiuDockWidgetTools::dockStatePlotWindowName(),
RiuDockWidgetTools::dockStateHideAllPlotWindowName() };
QStringList retList = { RiuDockWidgetTools::dockStatePlotWindowName(), RiuDockWidgetTools::dockStateHideAllPlotWindowName() };
return retList;
}

View File

@@ -87,10 +87,8 @@ public:
int valueFontSize,
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) = 0;
virtual void setAxesFontsAndAlignment( int titleFontSize,
int valueFontSize,
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) = 0;
virtual void
setAxesFontsAndAlignment( int titleFontSize, int valueFontSize, bool titleBold = false, int alignment = (int)Qt::AlignCenter ) = 0;
virtual void enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled ) = 0;
virtual void enableAxis( RiuPlotAxis axis, bool isEnabled ) = 0;
@@ -102,8 +100,8 @@ public:
virtual void setAxisMaxMinor( RiuPlotAxis axis, int maxMinor ) = 0;
virtual void setAxisMaxMajor( RiuPlotAxis axis, int maxMajor ) = 0;
virtual RiuPlotWidget::AxisScaleType axisScaleType( RiuPlotAxis axis ) const = 0;
virtual void setAxisScaleType( RiuPlotAxis axis, RiuPlotWidget::AxisScaleType axisScaleType ) = 0;
virtual RiuPlotWidget::AxisScaleType axisScaleType( RiuPlotAxis axis ) const = 0;
virtual void setAxisScaleType( RiuPlotAxis axis, RiuPlotWidget::AxisScaleType axisScaleType ) = 0;
virtual void setAxisTitleText( RiuPlotAxis axis, const QString& title ) = 0;
virtual void setAxisTitleEnabled( RiuPlotAxis axis, bool enable ) = 0;
@@ -135,23 +133,21 @@ public:
virtual void enableGridLines( RiuPlotAxis axis, bool majorGridLines, bool minorGridLines ) = 0;
virtual void
setMajorTicksList( RiuPlotAxis axis, const QList<double>& majorTicks, double minValue, double maxValue ) = 0;
virtual void setMajorTicksList( RiuPlotAxis axis, const QList<double>& majorTicks, double minValue, double maxValue ) = 0;
virtual void setMajorAndMinorTickIntervals( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minValue,
double maxValue ) = 0;
double maxValue ) = 0;
virtual void setMajorAndMinorTickIntervalsAndRange( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minTickValue,
double maxTickValue,
double rangeMin,
double rangeMax ) = 0;
double rangeMax ) = 0;
virtual void
setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount ) = 0;
virtual void setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount ) = 0;
virtual double majorTickInterval( RiuPlotAxis axis ) const = 0;
virtual double minorTickInterval( RiuPlotAxis axis ) const = 0;

View File

@@ -92,9 +92,7 @@ void RiuProcessMonitor::startMonitorWorkProcess( caf::UiProcess* pProcess )
m_monitoredProcess = pProcess;
if ( !m_monitoredProcess ) return;
connect( m_monitoredProcess,
SIGNAL( signalStatusMsg( const QString&, int ) ),
SLOT( slotShowProcStatusMsg( const QString&, int ) ) );
connect( m_monitoredProcess, SIGNAL( signalStatusMsg( const QString&, int ) ), SLOT( slotShowProcStatusMsg( const QString&, int ) ) );
connect( m_monitoredProcess, SIGNAL( readyReadStandardError() ), SLOT( slotProcReadyReadStdErr() ) );
connect( m_monitoredProcess, SIGNAL( readyReadStandardOutput() ), SLOT( slotProcReadyReadStdOut() ) );

View File

@@ -34,10 +34,7 @@ class QStringList;
class RiuPropertyViewTabWidget : public QDialog
{
public:
RiuPropertyViewTabWidget( QWidget* parent,
caf::PdmObject* object,
const QString& windowTitle,
const QStringList& uiConfigNameForTabs );
RiuPropertyViewTabWidget( QWidget* parent, caf::PdmObject* object, const QString& windowTitle, const QStringList& uiConfigNameForTabs );
~RiuPropertyViewTabWidget() override;
QSize minimumSizeHint() const override;

View File

@@ -202,8 +202,7 @@ void RiuPvtPlotWidget::plotCurves( RiaDefines::EclipseUnitSystem
for ( size_t i = 0; i < curveArr.size(); i++ )
{
const RigFlowDiagSolverInterface::PvtCurve& curve = curveArr[i];
if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::OIL && curve.pressureVals.size() > 0 &&
curve.yVals.size() > 0 )
if ( curve.phase == RigFlowDiagSolverInterface::PvtCurve::OIL && curve.pressureVals.size() > 0 && curve.yVals.size() > 0 )
{
xVals.push_back( curve.pressureVals[0] );
yVals.push_back( curve.yVals[0] );
@@ -310,8 +309,7 @@ void RiuPvtPlotWidget::plotCurves( RiaDefines::EclipseUnitSystem
m_qwtPlot->setTitle( plotTitle );
m_qwtPlot->setAxisTitle( QwtAxis::XBottom,
QString( "Pressure [%1]" ).arg( RiaEclipseUnitTools::unitStringPressure( unitSystem ) ) );
m_qwtPlot->setAxisTitle( QwtAxis::XBottom, QString( "Pressure [%1]" ).arg( RiaEclipseUnitTools::unitStringPressure( unitSystem ) ) );
m_qwtPlot->setAxisTitle( QwtAxis::YLeft, yAxisTitle );
updateTrackerPlotMarkerAndLabelFromPicker();
@@ -682,22 +680,15 @@ void RiuPvtPlotPanel::plotUiSelectedCurves()
}
}
const QString plotTitle = QString( "%1 Formation Volume Factor" ).arg( phaseString );
const QString yAxisTitle = QString( "%1 Formation Volume Factor [%2]" )
.arg( phaseString )
.arg( unitLabelFromCurveIdent( m_unitSystem, curveIdentToPlot ) );
m_fvfPlot->plotCurves( m_unitSystem,
selectedFvfCurves,
m_cellValues.pressure,
pointMarkerFvfValue,
pointMarkerLabel,
plotTitle,
yAxisTitle );
const QString plotTitle = QString( "%1 Formation Volume Factor" ).arg( phaseString );
const QString yAxisTitle =
QString( "%1 Formation Volume Factor [%2]" ).arg( phaseString ).arg( unitLabelFromCurveIdent( m_unitSystem, curveIdentToPlot ) );
m_fvfPlot->plotCurves( m_unitSystem, selectedFvfCurves, m_cellValues.pressure, pointMarkerFvfValue, pointMarkerLabel, plotTitle, yAxisTitle );
}
// Viscosity plot
{
RigFlowDiagSolverInterface::PvtCurve::Ident curveIdentToPlot = RigFlowDiagSolverInterface::PvtCurve::Unknown;
RigFlowDiagSolverInterface::PvtCurve::Ident curveIdentToPlot = RigFlowDiagSolverInterface::PvtCurve::Unknown;
double pointMarkerViscosityValue = HUGE_VAL;
QString pointMarkerLabel = "";
@@ -705,7 +696,7 @@ void RiuPvtPlotPanel::plotUiSelectedCurves()
{
curveIdentToPlot = RigFlowDiagSolverInterface::PvtCurve::Visc_g;
pointMarkerViscosityValue = m_viscosityDynProps.mu_g;
pointMarkerLabel = QString( "%1 (%2)" ).arg( pointMarkerViscosityValue ).arg( m_cellValues.pressure );
pointMarkerLabel = QString( "%1 (%2)" ).arg( pointMarkerViscosityValue ).arg( m_cellValues.pressure );
if ( m_cellValues.rv != HUGE_VAL )
{
pointMarkerLabel += QString( "\nRv = %1" ).arg( m_cellValues.rv );
@@ -715,7 +706,7 @@ void RiuPvtPlotPanel::plotUiSelectedCurves()
{
curveIdentToPlot = RigFlowDiagSolverInterface::PvtCurve::Visc_o;
pointMarkerViscosityValue = m_viscosityDynProps.mu_o;
pointMarkerLabel = QString( "%1 (%2)" ).arg( pointMarkerViscosityValue ).arg( m_cellValues.pressure );
pointMarkerLabel = QString( "%1 (%2)" ).arg( pointMarkerViscosityValue ).arg( m_cellValues.pressure );
if ( m_cellValues.rs != HUGE_VAL )
{
pointMarkerLabel += QString( "\nRs = %1" ).arg( m_cellValues.rs );
@@ -787,8 +778,7 @@ QString RiuPvtPlotPanel::unitLabelFromCurveIdent( RiaDefines::EclipseUnitSystem
return "";
}
}
else if ( curveIdent == RigFlowDiagSolverInterface::PvtCurve::Visc_o ||
curveIdent == RigFlowDiagSolverInterface::PvtCurve::Visc_g )
else if ( curveIdent == RigFlowDiagSolverInterface::PvtCurve::Visc_o || curveIdent == RigFlowDiagSolverInterface::PvtCurve::Visc_g )
{
switch ( unitSystem )
{

View File

@@ -82,7 +82,7 @@ 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
std::vector<const QwtPlotCurve*> m_qwtCurveArr; // Array of corresponding qwt curves used for mapping to Pvt curve
// when doing tracking
QPointer<RiuPvtQwtPicker> m_qwtPicker;
@@ -136,8 +136,7 @@ public:
private:
void plotUiSelectedCurves();
static QString unitLabelFromCurveIdent( RiaDefines::EclipseUnitSystem unitSystem,
RigFlowDiagSolverInterface::PvtCurve::Ident curveIdent );
static QString unitLabelFromCurveIdent( RiaDefines::EclipseUnitSystem unitSystem, RigFlowDiagSolverInterface::PvtCurve::Ident curveIdent );
private slots:
void slotPhaseComboCurrentIndexChanged( int );

View File

@@ -62,8 +62,7 @@ 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;
@@ -112,8 +111,7 @@ 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 )
{
@@ -141,9 +139,9 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
if ( !eclipseResDef ) return false;
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( eclipseResDef->eclipseCase() );
RigEclipseCaseData* eclipseCaseData = eclipseResultCase ? eclipseResultCase->eclipseCaseData() : nullptr;
RiaDefines::PorosityModelType porosityModel = eclipseResDef->porosityModel();
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( eclipseResDef->eclipseCase() );
RigEclipseCaseData* eclipseCaseData = eclipseResultCase ? eclipseResultCase->eclipseCaseData() : nullptr;
RiaDefines::PorosityModelType porosityModel = eclipseResDef->porosityModel();
if ( eclipseResultCase && eclipseCaseData && eclipseResultCase->flowDiagSolverInterface() )
{
@@ -152,61 +150,49 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
// The following calls will read results from file in preparation for the queries below
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( porosityModel );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
cvf::ref<RigResultAccessor> rsAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
gridIndex,
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"RS" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RS" ) );
cvf::ref<RigResultAccessor> rvAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
gridIndex,
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"RV" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "RV" ) );
cvf::ref<RigResultAccessor> pressureAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
gridIndex,
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
"PRESSURE" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, "PRESSURE" ) );
cvf::ref<RigResultAccessor> pvtnumAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCaseData,
gridIndex,
porosityModel,
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
"PVTNUM" ) );
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PVTNUM" ) );
RiuPvtPlotPanel::CellValues cellValues;
cellValues.rs = rsAccessor.notNull() ? rsAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
cellValues.rv = rvAccessor.notNull() ? rvAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
cellValues.pressure = pressureAccessor.notNull() ? pressureAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellPvtNumDouble = pvtnumAccessor.notNull() ? pvtnumAccessor->cellScalar( gridLocalCellIndex )
: HUGE_VAL;
const double cellPvtNumDouble = pvtnumAccessor.notNull() ? pvtnumAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const int cellPvtNum = ( cellPvtNumDouble != HUGE_VAL ) ? static_cast<int>( cellPvtNumDouble )
: std::numeric_limits<int>::max();
const int cellPvtNum = ( cellPvtNumDouble != HUGE_VAL ) ? static_cast<int>( cellPvtNumDouble ) : std::numeric_limits<int>::max();
std::vector<RigFlowDiagSolverInterface::PvtCurve> fvfCurveArr =
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_FVF,
cellPvtNum );
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_FVF, cellPvtNum );
std::vector<RigFlowDiagSolverInterface::PvtCurve> viscosityCurveArr =
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_VISCOSITY,
cellPvtNum );
eclipseResultCase->flowDiagSolverInterface()->calculatePvtCurves( RigFlowDiagSolverInterface::PVT_CT_VISCOSITY, cellPvtNum );
RiuPvtPlotPanel::FvfDynProps fvfDynProps;
eclipseResultCase->flowDiagSolverInterface()->calculatePvtDynamicPropertiesFvf( cellPvtNum,
@@ -230,13 +216,7 @@ bool RiuPvtPlotUpdater::queryDataAndUpdatePlot( const RimEclipseResultDefinition
"PVTNUM",
cellPvtNumDouble );
plotPanel->setPlotData( eclipseCaseData->unitsType(),
fvfCurveArr,
viscosityCurveArr,
fvfDynProps,
viscosityDynProps,
cellValues,
cellRefText );
plotPanel->setPlotData( eclipseCaseData->unitsType(), fvfCurveArr, viscosityCurveArr, fvfDynProps, viscosityDynProps, cellValues, cellRefText );
return true;
}

View File

@@ -96,8 +96,8 @@ void QssSyntaxHighligter::highlightBlock( const QString& text )
if ( previousBlockState() == -1 )
{
QRegularExpression expression = QRegularExpression( "([a-zA-z0-9_-]+)(::[a-zA-Z0-9_-]+)?(:[a-zA-Z0-9_-]+)?" );
QRegularExpressionMatchIterator i = expression.globalMatch( text );
QRegularExpression expression = QRegularExpression( "([a-zA-z0-9_-]+)(::[a-zA-Z0-9_-]+)?(:[a-zA-Z0-9_-]+)?" );
QRegularExpressionMatchIterator i = expression.globalMatch( text );
while ( i.hasNext() )
{
QRegularExpressionMatch matchClass = i.next();

View File

@@ -123,7 +123,7 @@ void RiuQtChartsPlotCurve::setAppearance( RiuQwtPlotCurveDefines::LineStyleEnum
RiuQwtPlotCurveDefines::CurveInterpolationEnum interpolationType,
int requestedCurveThickness,
const QColor& curveColor,
const QBrush& fillBrush /* = QBrush( Qt::NoBrush )*/ )
const QBrush& fillBrush /* = QBrush( Qt::NoBrush )*/ )
{
if ( !isQtChartObjectsPresent() ) return;

View File

@@ -37,10 +37,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuQtChartsPlotCurveSymbol::RiuQtChartsPlotCurveSymbol( PointSymbolEnum riuStyle,
const QString& label,
LabelPosition labelPosition,
int labelFontSizePt )
RiuQtChartsPlotCurveSymbol::RiuQtChartsPlotCurveSymbol( PointSymbolEnum riuStyle, const QString& label, LabelPosition labelPosition, int labelFontSizePt )
: RiuPlotCurveSymbol( riuStyle, label, labelPosition, labelFontSizePt )
{
}

View File

@@ -42,9 +42,9 @@ class RiuQtChartsPlotCurveSymbol : public RiuPlotCurveSymbol
{
public:
RiuQtChartsPlotCurveSymbol( RiuPlotCurveSymbol::PointSymbolEnum riuStyle,
const QString& label = QString(),
LabelPosition labelPosition = RiuPlotCurveSymbol::LabelAboveSymbol,
int labelFontSizePt = 8 );
const QString& label = QString(),
LabelPosition labelPosition = RiuPlotCurveSymbol::LabelAboveSymbol,
int labelFontSizePt = 8 );
void renderSymbolLabel( QPainter* painter, const QPointF& position, const QString& label ) const;

View File

@@ -39,13 +39,13 @@ void RiuQtChartsPlotTools::setCommonPlotBehaviour( RiuQtChartsPlotWidget* plot )
plot->setAutoFillBackground( true );
// Axis number font
int axisFontSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(),
caf::FontTools::RelativeSize::Medium );
int axisFontSize =
caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(), caf::FontTools::RelativeSize::Medium );
// Axis title font
int titleFontSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(),
caf::FontTools::RelativeSize::Medium );
bool titleBold = false;
int titleFontSize =
caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(), caf::FontTools::RelativeSize::Medium );
bool titleBold = false;
plot->setAxesFontsAndAlignment( titleFontSize, axisFontSize, titleBold, Qt::AlignRight );
// Store the pointer address as an object name. This way

View File

@@ -56,9 +56,7 @@ using namespace QtCharts;
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuQtChartsPlotWidget::RiuQtChartsPlotWidget( RimPlot* plotDefinition,
QWidget* parent,
RiuPlotCurveInfoTextProvider* plotCurveNameProvider )
RiuQtChartsPlotWidget::RiuQtChartsPlotWidget( RimPlot* plotDefinition, QWidget* parent, RiuPlotCurveInfoTextProvider* plotCurveNameProvider )
: RiuPlotWidget( plotDefinition, parent )
, m_plotCurveNameProvider( plotCurveNameProvider )
, m_dateScaleWrapper( new RiuQwtDateScaleWrapper() )
@@ -162,11 +160,7 @@ int RiuQtChartsPlotWidget::axisValueFontSize( RiuPlotAxis axis ) const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQtChartsPlotWidget::setAxisFontsAndAlignment( RiuPlotAxis axis,
int titleFontSize,
int valueFontSize,
bool titleBold,
int alignment )
void RiuQtChartsPlotWidget::setAxisFontsAndAlignment( RiuPlotAxis axis, int titleFontSize, int valueFontSize, bool titleBold, int alignment )
{
int titleFontPixelSize = caf::FontTools::pointSizeToPixelSize( titleFontSize );
int valueFontPixelSize = caf::FontTools::pointSizeToPixelSize( valueFontSize );
@@ -444,9 +438,7 @@ void RiuQtChartsPlotWidget::setMajorAndMinorTickIntervalsAndRange( RiuPlotAxis a
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQtChartsPlotWidget::setAutoTickIntervalCounts( RiuPlotAxis axis,
int maxMajorTickIntervalCount,
int maxMinorTickIntervalCount )
void RiuQtChartsPlotWidget::setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount )
{
setAxisMaxMajor( axis, maxMajorTickIntervalCount );
setAxisMaxMinor( axis, maxMinorTickIntervalCount );
@@ -1007,11 +999,7 @@ void RiuQtChartsPlotWidget::attachSeriesToAxis( RiuPlotAxis axis, QAbstractSerie
connect( newAxis, SIGNAL( rangeChanged( double, double ) ), this, SLOT( axisRangeChanged() ), Qt::UniqueConnection );
if ( plotCurve )
{
connect( newAxis,
SIGNAL( rangeChanged( double, double ) ),
plotCurve,
SLOT( axisRangeChanged() ),
Qt::UniqueConnection );
connect( newAxis, SIGNAL( rangeChanged( double, double ) ), plotCurve, SLOT( axisRangeChanged() ), Qt::UniqueConnection );
}
}
}
@@ -1167,8 +1155,7 @@ QAbstractAxis* RiuQtChartsPlotWidget::plotAxis( RiuPlotAxis axis ) const
//--------------------------------------------------------------------------------------------------
Qt::Orientation RiuQtChartsPlotWidget::orientation( RiaDefines::PlotAxis axis ) const
{
if ( axis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM || axis == RiaDefines::PlotAxis::PLOT_AXIS_TOP )
return Qt::Orientation::Horizontal;
if ( axis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM || axis == RiaDefines::PlotAxis::PLOT_AXIS_TOP ) return Qt::Orientation::Horizontal;
return Qt::Orientation::Vertical;
}

View File

@@ -69,9 +69,7 @@ class RiuQtChartsPlotWidget : public RiuPlotWidget
Q_OBJECT
public:
RiuQtChartsPlotWidget( RimPlot* plotDefinition,
QWidget* parent = nullptr,
RiuPlotCurveInfoTextProvider* plotCurveNameProvider = nullptr );
RiuQtChartsPlotWidget( RimPlot* plotDefinition, QWidget* parent = nullptr, RiuPlotCurveInfoTextProvider* plotCurveNameProvider = nullptr );
~RiuQtChartsPlotWidget() override;
int axisTitleFontSize( RiuPlotAxis axis ) const override;
@@ -81,10 +79,7 @@ public:
int valueFontSize,
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) override;
void setAxesFontsAndAlignment( int titleFontSize,
int valueFontSize,
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) override;
void setAxesFontsAndAlignment( int titleFontSize, int valueFontSize, bool titleBold = false, int alignment = (int)Qt::AlignCenter ) override;
void enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled ) override;
void enableAxis( RiuPlotAxis axis, bool isEnabled ) override;
@@ -97,7 +92,7 @@ public:
void setAxisMaxMajor( RiuPlotAxis axis, int maxMajor ) override;
RiuPlotWidget::AxisScaleType axisScaleType( RiuPlotAxis axis ) const override;
void setAxisScaleType( RiuPlotAxis axis, RiuPlotWidget::AxisScaleType axisScaleType ) override;
void setAxisScaleType( RiuPlotAxis axis, RiuPlotWidget::AxisScaleType axisScaleType ) override;
void setAxisTitleText( RiuPlotAxis axis, const QString& title ) override;
void setAxisTitleEnabled( RiuPlotAxis axis, bool enable ) override;
@@ -129,23 +124,18 @@ public:
void enableGridLines( RiuPlotAxis axis, bool majorGridLines, bool minorGridLines ) override;
virtual void
setMajorTicksList( RiuPlotAxis axis, const QList<double>& majorTicks, double minValue, double maxValue ) override;
void setMajorAndMinorTickIntervals( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minValue,
double maxValue ) override;
void setMajorAndMinorTickIntervalsAndRange( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minTickValue,
double maxTickValue,
double rangeMin,
double rangeMax ) override;
void setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount ) override;
double majorTickInterval( RiuPlotAxis axis ) const override;
double minorTickInterval( RiuPlotAxis axis ) const override;
virtual void setMajorTicksList( RiuPlotAxis axis, const QList<double>& majorTicks, double minValue, double maxValue ) override;
void setMajorAndMinorTickIntervals( RiuPlotAxis axis, double majorTickInterval, double minorTickInterval, double minValue, double maxValue ) override;
void setMajorAndMinorTickIntervalsAndRange( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minTickValue,
double maxTickValue,
double rangeMin,
double rangeMax ) override;
void setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount ) override;
double majorTickInterval( RiuPlotAxis axis ) const override;
double minorTickInterval( RiuPlotAxis axis ) const override;
void detachItems( RiuPlotWidget::PlotItemType plotItemType ) override;

View File

@@ -36,9 +36,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuQwtCurvePointTracker::RiuQwtCurvePointTracker( QwtPlot* plot,
bool isMainAxisHorizontal,
RiuPlotCurveInfoTextProvider* curveInfoTextProvider )
RiuQwtCurvePointTracker::RiuQwtCurvePointTracker( QwtPlot* plot, bool isMainAxisHorizontal, RiuPlotCurveInfoTextProvider* curveInfoTextProvider )
: QwtPlotPicker( plot->canvas() )
, m_plot( plot )
, m_isMainAxisHorizontal( isMainAxisHorizontal )
@@ -222,8 +220,8 @@ QPointF RiuQwtCurvePointTracker::closestCurvePoint( const QPoint& cursorPosition
if ( m_curveInfoTextProvider )
{
auto additionalText = m_curveInfoTextProvider->additionalText( dynamic_cast<RiuPlotCurve*>( closestCurve ),
closestPointSampleIndex );
auto additionalText =
m_curveInfoTextProvider->additionalText( dynamic_cast<RiuPlotCurve*>( closestCurve ), closestPointSampleIndex );
if ( !additionalText.isEmpty() )
{
@@ -239,9 +237,7 @@ QPointF RiuQwtCurvePointTracker::closestCurvePoint( const QPoint& cursorPosition
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtCurvePointTracker::updateClosestCurvePointMarker( const QPointF& closestPoint,
QwtAxisId relatedXAxis,
QwtAxisId relatedYAxis ) const
void RiuQwtCurvePointTracker::updateClosestCurvePointMarker( const QPointF& closestPoint, QwtAxisId relatedXAxis, QwtAxisId relatedYAxis ) const
{
bool replotRequired = false;

View File

@@ -32,9 +32,7 @@ class RiuPlotCurveInfoTextProvider;
class RiuQwtCurvePointTracker : public QwtPlotPicker
{
public:
explicit RiuQwtCurvePointTracker( QwtPlot* plot,
bool isMainAxisHorizontal,
RiuPlotCurveInfoTextProvider* curveInfoTextProvider = nullptr );
explicit RiuQwtCurvePointTracker( QwtPlot* plot, bool isMainAxisHorizontal, RiuPlotCurveInfoTextProvider* curveInfoTextProvider = nullptr );
~RiuQwtCurvePointTracker() override;
protected:
@@ -48,7 +46,7 @@ protected:
QString* mainAxisValueString,
QwtAxisId* relatedXAxis,
QwtAxisId* relatedYAxis ) const;
void updateClosestCurvePointMarker( const QPointF& closestPoint, QwtAxisId relatedXAxis, QwtAxisId relatedYAxis ) const;
void updateClosestCurvePointMarker( const QPointF& closestPoint, QwtAxisId relatedXAxis, QwtAxisId relatedYAxis ) const;
QPointer<QwtPlot> m_plot;
QwtPlotMarker* m_plotMarker;

View File

@@ -40,23 +40,13 @@ void RiuQwtDateScaleWrapper::setFormatStrings( const QString&
RiaDefines::DateFormatComponents dateComponents,
RiaDefines::TimeFormatComponents timeComponents )
{
std::set<QwtDate::IntervalType> intervals = { QwtDate::Year,
QwtDate::Month,
QwtDate::Week,
QwtDate::Day,
QwtDate::Hour,
QwtDate::Minute,
QwtDate::Second,
QwtDate::Millisecond };
std::set<QwtDate::IntervalType> intervals =
{ QwtDate::Year, QwtDate::Month, QwtDate::Week, QwtDate::Day, QwtDate::Hour, QwtDate::Minute, QwtDate::Second, QwtDate::Millisecond };
for ( QwtDate::IntervalType interval : intervals )
{
m_scaleDraw.setDateFormat( interval,
RiuQwtPlotTools::dateTimeFormatForInterval( interval,
dateFormat,
timeFormat,
dateComponents,
timeComponents ) );
RiuQwtPlotTools::dateTimeFormatForInterval( interval, dateFormat, timeFormat, dateComponents, timeComponents ) );
}
}
@@ -112,8 +102,7 @@ std::vector<std::pair<double, QString>> RiuQwtDateScaleWrapper::positionsAndLabe
m_scaleDraw.setScaleDiv( scaleDiv );
auto formatString =
formatStringForRange( QDateTime::fromMSecsSinceEpoch( min ), QDateTime::fromMSecsSinceEpoch( max ) );
auto formatString = formatStringForRange( QDateTime::fromMSecsSinceEpoch( min ), QDateTime::fromMSecsSinceEpoch( max ) );
std::vector<std::pair<double, QString>> valueAndLabel;
for ( auto t : ticks )

View File

@@ -23,10 +23,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QwtScaleDiv RiuQwtLinearScaleEngine::divideScaleWithExplicitIntervals( double x1,
double x2,
double majorStepInterval,
double minorStepInterval )
QwtScaleDiv RiuQwtLinearScaleEngine::divideScaleWithExplicitIntervals( double x1, double x2, double majorStepInterval, double minorStepInterval )
{
QwtInterval interval( x1, x2 );
QwtInterval roundedInterval = this->align( interval, majorStepInterval );

View File

@@ -28,10 +28,7 @@
class RiuQwtLinearScaleEngine : public QwtLinearScaleEngine
{
public:
QwtScaleDiv divideScaleWithExplicitIntervals( double tickStart,
double tickEnd,
double majorStepInterval,
double minorStepInterval );
QwtScaleDiv divideScaleWithExplicitIntervals( double tickStart, double tickEnd, double majorStepInterval, double minorStepInterval );
QwtScaleDiv divideScaleWithExplicitIntervalsAndRange( double tickStart,
double tickEnd,
double majorStepInterval,

View File

@@ -83,13 +83,7 @@ void RiuQwtPlotCurve::setTitle( const QString& title )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotCurve::drawCurve( QPainter* p,
int style,
const QwtScaleMap& xMap,
const QwtScaleMap& yMap,
const QRectF& canvasRect,
int from,
int to ) const
void RiuQwtPlotCurve::drawCurve( QPainter* p, int style, const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QRectF& canvasRect, int from, int to ) const
{
size_t intervalCount = m_polyLineStartStopIndices.size();
if ( intervalCount > 0 )
@@ -224,7 +218,7 @@ void RiuQwtPlotCurve::setAppearance( RiuQwtPlotCurveDefines::LineStyleEnum
RiuQwtPlotCurveDefines::CurveInterpolationEnum interpolationType,
int requestedCurveThickness,
const QColor& curveColor,
const QBrush& fillBrush /* = QBrush( Qt::NoBrush )*/ )
const QBrush& fillBrush /* = QBrush( Qt::NoBrush )*/ )
{
QwtPlotCurve::CurveStyle curveStyle = QwtPlotCurve::Lines;
Qt::PenStyle penStyle = RiuQwtPlotCurveDefines::convertToPenStyle( lineStyle );
@@ -436,7 +430,7 @@ void RiuQwtPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>&
CVF_ASSERT( xValues.size() == yValues.size() );
CVF_ASSERT( xValues.size() == errorValues.size() );
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, useLogarithmicScale );
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, useLogarithmicScale );
std::vector<double> filteredYValues;
std::vector<double> filteredXValues;

View File

@@ -69,12 +69,11 @@ public:
std::pair<double, double> xDataRange() const override;
std::pair<double, double> yDataRange() const override;
void setSamplesFromXYErrorValues(
const std::vector<double>& xValues,
const std::vector<double>& yValues,
const std::vector<double>& errorValues,
bool useLogarithmicScale,
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS ) override;
void setSamplesFromXYErrorValues( const std::vector<double>& xValues,
const std::vector<double>& yValues,
const std::vector<double>& errorValues,
bool useLogarithmicScale,
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS ) override;
void setXAxis( RiuPlotAxis axis ) override;
void setYAxis( RiuPlotAxis axis ) override;
@@ -85,13 +84,7 @@ public:
void setCurveFittingTolerance( double tolerance ) override;
protected:
void drawCurve( QPainter* p,
int style,
const QwtScaleMap& xMap,
const QwtScaleMap& yMap,
const QRectF& canvasRect,
int from,
int to ) const override;
void drawCurve( QPainter* p, int style, const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QRectF& canvasRect, int from, int to ) const override;
void drawSymbols( QPainter* p,
const QwtSymbol& symbol,

View File

@@ -26,9 +26,7 @@ namespace caf
template <>
void caf::AppEnum<RiuQwtPlotCurveDefines::CurveInterpolationEnum>::setUp()
{
addItem( RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT,
"INTERPOLATION_POINT_TO_POINT",
"Point to Point" );
addItem( RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT, "INTERPOLATION_POINT_TO_POINT", "Point to Point" );
addItem( RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_STEP_LEFT, "INTERPOLATION_STEP_LEFT", "Step Left" );
setDefault( RiuQwtPlotCurveDefines::CurveInterpolationEnum::INTERPOLATION_POINT_TO_POINT );

View File

@@ -37,8 +37,8 @@ public:
void addPlotItem( QwtPlotItem* plotItem );
void addLegendItem( QwtPlotItem* legendItem );
int rtti() const override { return 5000; }
void draw( QPainter* painter, const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QRectF& canvasRect ) const override;
int rtti() const override { return 5000; }
void draw( QPainter* painter, const QwtScaleMap& xMap, const QwtScaleMap& yMap, const QRectF& canvasRect ) const override;
QRectF boundingRect() const override;
QwtGraphic legendIcon( int index, const QSizeF& size ) const override;

View File

@@ -78,9 +78,8 @@ QSize RiuQwtPlotLegend::sizeHint() const
auto widgetSize = size();
int numColumns =
std::max( 1, (int)legendLayout->columnsForWidth( widgetSize.width() - margins.left() - margins.right() ) );
int numRows = legendLayout->itemCount() / numColumns;
int numColumns = std::max( 1, (int)legendLayout->columnsForWidth( widgetSize.width() - margins.left() - margins.right() ) );
int numRows = legendLayout->itemCount() / numColumns;
if ( numRows == 0 )
{
return { 0, 0 };

View File

@@ -68,9 +68,9 @@ void RiuQwtPlotTools::setCommonPlotBehaviour( QwtPlot* plot )
RiuGuiTheme::styleQwtItem( grid );
// Axis number font
int axisFontSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(),
caf::FontTools::RelativeSize::Medium );
QFont axisFont = plot->axisFont( QwtAxis::XBottom );
int axisFontSize =
caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultPlotFontSize(), caf::FontTools::RelativeSize::Medium );
QFont axisFont = plot->axisFont( QwtAxis::XBottom );
axisFont.setPixelSize( caf::FontTools::pointSizeToPixelSize( axisFontSize ) );
plot->setAxisFont( QwtAxis::XBottom, axisFont );
@@ -141,19 +141,12 @@ void RiuQwtPlotTools::enableDateBasedBottomXAxis( QwtPlot*
{
QwtDateScaleDraw* scaleDraw = new QwtDateScaleDraw( Qt::UTC );
std::set<QwtDate::IntervalType> intervals = { QwtDate::Year,
QwtDate::Month,
QwtDate::Week,
QwtDate::Day,
QwtDate::Hour,
QwtDate::Minute,
QwtDate::Second,
QwtDate::Millisecond };
std::set<QwtDate::IntervalType> intervals =
{ QwtDate::Year, QwtDate::Month, QwtDate::Week, QwtDate::Day, QwtDate::Hour, QwtDate::Minute, QwtDate::Second, QwtDate::Millisecond };
for ( QwtDate::IntervalType interval : intervals )
{
scaleDraw->setDateFormat( interval,
dateTimeFormatForInterval( interval, dateFormat, timeFormat, dateComponents, timeComponents ) );
scaleDraw->setDateFormat( interval, dateTimeFormatForInterval( interval, dateFormat, timeFormat, dateComponents, timeComponents ) );
}
QwtDateScaleEngine* scaleEngine = new QwtDateScaleEngine( Qt::UTC );
@@ -184,47 +177,36 @@ QString RiuQwtPlotTools::dateTimeFormatForInterval( QwtDate::IntervalType
return RiaQDateTimeTools::timeFormatString( timeFormat,
RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND_MILLISECOND );
case QwtDate::Second:
return RiaQDateTimeTools::timeFormatString( timeFormat,
RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
return RiaQDateTimeTools::timeFormatString( timeFormat, RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
case QwtDate::Minute:
{
QString fullFormat =
RiaQDateTimeTools::timeFormatString( timeFormat,
RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE );
RiaQDateTimeTools::timeFormatString( timeFormat, RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE );
fullFormat += "\n";
fullFormat +=
RiaQDateTimeTools::dateFormatString( dateFormat,
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
fullFormat += RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
return fullFormat;
}
case QwtDate::Hour:
{
QString fullFormat =
RiaQDateTimeTools::timeFormatString( timeFormat, RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR );
QString fullFormat = RiaQDateTimeTools::timeFormatString( timeFormat, RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR );
if ( !fullFormat.endsWith( "AP" ) )
{
fullFormat += ":00";
}
fullFormat += "\n";
fullFormat +=
RiaQDateTimeTools::dateFormatString( dateFormat,
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
fullFormat += RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
return fullFormat;
}
case QwtDate::Day:
return RiaQDateTimeTools::dateFormatString( dateFormat,
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
return RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
case QwtDate::Week:
return RiaQDateTimeTools::dateFormatString( dateFormat,
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH );
return RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH );
case QwtDate::Month:
return RiaQDateTimeTools::dateFormatString( dateFormat,
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH );
return RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH );
case QwtDate::Year:
return RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR );
default:
return RiaQDateTimeTools::dateFormatString( dateFormat,
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
return RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
}
}
}
@@ -232,13 +214,8 @@ QString RiuQwtPlotTools::dateTimeFormatForInterval( QwtDate::IntervalType
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QwtPlotShapeItem* RiuQwtPlotTools::createBoxShape( const QString& label,
double startX,
double endX,
double startY,
double endY,
QColor color,
Qt::BrushStyle brushStyle )
QwtPlotShapeItem*
RiuQwtPlotTools::createBoxShape( const QString& label, double startX, double endX, double startY, double endY, QColor color, Qt::BrushStyle brushStyle )
{
return createBoxShapeT<QwtPlotShapeItem>( label, startX, endX, startY, endY, color, brushStyle );
}
@@ -325,10 +302,9 @@ QList<QwtLegendData> RiuQwtPlotTools::createLegendData( const std::vector<RimPlo
if ( c->symbol() != RiuPlotCurveSymbol::SYMBOL_NONE )
{
auto image =
RiuPlotCurveSymbolImageCreator::createSymbolImage( c->symbol(),
QSize( size.width() / 2, size.height() / 2 ),
RiaColorTools::toQColor( c->color() ) );
auto image = RiuPlotCurveSymbolImageCreator::createSymbolImage( c->symbol(),
QSize( size.width() / 2, size.height() / 2 ),
RiaColorTools::toQColor( c->color() ) );
QPoint p( size.width() / 4, size.height() / 4 );
painter.drawImage( p, image );

View File

@@ -62,8 +62,7 @@ void RiuQwtPlotWheelZoomer::zoomOnAxis( QwtPlot* plot, QwtAxis::Position axis, d
{
// 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 maxValue = std::max( RIU_LOGARITHMIC_MINIMUM, 10.0 * std::max( axisRange.minValue(), axisRange.maxValue() ) );
newMin = std::clamp( newMin, minValue, maxValue );
newMax = std::clamp( newMax, minValue, maxValue );

View File

@@ -410,8 +410,7 @@ void RiuQwtPlotWidget::setMajorAndMinorTickIntervals( RiuPlotAxis axis,
auto* linearScaleEngine = dynamic_cast<RiuQwtLinearScaleEngine*>( m_plot->axisScaleEngine( qwtAxis ) );
if ( linearScaleEngine )
{
QwtScaleDiv scaleDiv =
linearScaleEngine->divideScaleWithExplicitIntervals( minValue, maxValue, majorTickInterval, minorTickInterval );
QwtScaleDiv scaleDiv = linearScaleEngine->divideScaleWithExplicitIntervals( minValue, maxValue, majorTickInterval, minorTickInterval );
m_plot->setAxisScaleDiv( qwtAxis, scaleDiv );
}
@@ -595,8 +594,7 @@ bool RiuQwtPlotWidget::eventFilter( QObject* watched, QEvent* event )
if ( watched == m_plot && !m_plot->canvas()->geometry().contains( mouseEvent->pos() ) )
{
if ( mouseEvent->type() == QMouseEvent::MouseButtonPress && ( mouseEvent->button() == Qt::LeftButton ) &&
!m_clickPosition.isNull() )
if ( mouseEvent->type() == QMouseEvent::MouseButtonPress && ( mouseEvent->button() == Qt::LeftButton ) && !m_clickPosition.isNull() )
{
QWidget* childClicked = m_plot->childAt( m_clickPosition );
if ( childClicked )
@@ -620,8 +618,7 @@ bool RiuQwtPlotWidget::eventFilter( QObject* watched, QEvent* event )
}
else if ( watched == m_plot->canvas() )
{
if ( mouseEvent->type() == QMouseEvent::MouseButtonRelease && mouseEvent->button() == Qt::LeftButton &&
!m_clickPosition.isNull() )
if ( mouseEvent->type() == QMouseEvent::MouseButtonRelease && mouseEvent->button() == Qt::LeftButton && !m_clickPosition.isNull() )
{
endZoomOperations();
@@ -760,12 +757,10 @@ void RiuQwtPlotWidget::renderTo( QPainter* painter, const QRect& targetRect, dou
overlayRect.setSize( actualSize );
QPoint overlayBottomRightInWindowCoords = overlayRect.bottomRight();
overlayBottomRightInWindowCoords.setX(
std::min( overlayBottomRightInWindowCoords.x(),
canvasBottomRightInWindowCoords.x() - (int)scaling * m_overlayMargins ) );
overlayBottomRightInWindowCoords.setY(
std::min( overlayBottomRightInWindowCoords.y(),
canvasBottomRightInWindowCoords.y() - (int)scaling * m_overlayMargins ) );
overlayBottomRightInWindowCoords.setX( std::min( overlayBottomRightInWindowCoords.x(),
canvasBottomRightInWindowCoords.x() - (int)scaling * m_overlayMargins ) );
overlayBottomRightInWindowCoords.setY( std::min( overlayBottomRightInWindowCoords.y(),
canvasBottomRightInWindowCoords.y() - (int)scaling * m_overlayMargins ) );
overlayRect.moveBottomRight( overlayBottomRightInWindowCoords );
overlayFrame->renderTo( painter, overlayRect );
}
@@ -859,10 +854,7 @@ QWidget* RiuQwtPlotWidget::getParentForOverlay() const
//--------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos,
QwtPlotItem** closestItem,
int* closestCurvePoint,
double* distanceFromClick ) const
void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos, QwtPlotItem** closestItem, int* closestCurvePoint, double* distanceFromClick ) const
{
CAF_ASSERT( closestItem && closestCurvePoint && distanceFromClick );
@@ -889,8 +881,7 @@ void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos,
else if ( it->rtti() == QwtPlotItem::Rtti_PlotShape )
{
auto* shapeItem = static_cast<QwtPlotShapeItem*>( it );
QPointF scalePos( m_plot->invTransform( QwtAxis::XBottom, pos.x() ),
m_plot->invTransform( QwtAxis::YLeft, pos.y() ) );
QPointF scalePos( m_plot->invTransform( QwtAxis::XBottom, pos.x() ), m_plot->invTransform( QwtAxis::YLeft, pos.y() ) );
if ( shapeItem->shape().boundingRect().contains( scalePos ) )
{
*closestItem = it;
@@ -900,15 +891,13 @@ void RiuQwtPlotWidget::findClosestPlotItem( const QPoint& pos,
else if ( it->rtti() == QwtPlotItem::Rtti_PlotBarChart )
{
auto* barChart = static_cast<QwtPlotBarChart*>( it );
QPointF scalePos( m_plot->invTransform( QwtAxis::XBottom, pos.x() ),
m_plot->invTransform( QwtAxis::YLeft, pos.y() ) );
QPointF scalePos( m_plot->invTransform( QwtAxis::XBottom, pos.x() ), m_plot->invTransform( QwtAxis::YLeft, pos.y() ) );
bool horizontal = barChart->orientation() == Qt::Horizontal;
for ( size_t i = 0; i < barChart->dataSize(); ++i )
{
QPointF samplePoint = barChart->sample( (int)i );
double dist = horizontal ? std::abs( samplePoint.x() - scalePos.y() )
: std::abs( samplePoint.x() - scalePos.x() );
double dist = horizontal ? std::abs( samplePoint.x() - scalePos.y() ) : std::abs( samplePoint.x() - scalePos.x() );
if ( dist < *distanceFromClick )
{
*closestItem = it;
@@ -1103,8 +1092,7 @@ void RiuQwtPlotWidget::resetPlotCurveHighlighting()
{
auto* riuPlotCurve = dynamic_cast<RiuPlotCurve*>( plotItem );
if ( auto rimPlotCurve =
dynamic_cast<RimPlotCurve*>( m_plotDefinition->findPdmObjectFromPlotCurve( riuPlotCurve ) ) )
if ( auto rimPlotCurve = dynamic_cast<RimPlotCurve*>( m_plotDefinition->findPdmObjectFromPlotCurve( riuPlotCurve ) ) )
{
rimPlotCurve->updateCurveAppearance();
double zValue = m_originalZValues[plotCurve];
@@ -1152,8 +1140,7 @@ void RiuQwtPlotWidget::resetPlotAxisHighlighting()
// Use text color from theme
QColor textColor = RiuGuiTheme::getColorByVariableName( "text-color" );
QString style =
QString( "color: rgb(%1, %2, %3);" ).arg( textColor.red() ).arg( textColor.green() ).arg( textColor.blue() );
QString style = QString( "color: rgb(%1, %2, %3);" ).arg( textColor.red() ).arg( textColor.green() ).arg( textColor.blue() );
for ( auto pos : axisPositions )
{

View File

@@ -73,10 +73,7 @@ public:
int valueFontSize,
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) override;
void setAxesFontsAndAlignment( int titleFontSize,
int valueFontSize,
bool titleBold = false,
int alignment = (int)Qt::AlignCenter ) override;
void setAxesFontsAndAlignment( int titleFontSize, int valueFontSize, bool titleBold = false, int alignment = (int)Qt::AlignCenter ) override;
void enableAxis( RiuPlotAxis axis, bool isEnabled ) override;
void enableAxisNumberLabels( RiuPlotAxis axis, bool isEnabled ) override;
@@ -89,7 +86,7 @@ public:
void setAxisMaxMajor( RiuPlotAxis axis, int maxMajor ) override;
RiuPlotWidget::AxisScaleType axisScaleType( RiuPlotAxis axis ) const override;
void setAxisScaleType( RiuPlotAxis axis, RiuPlotWidget::AxisScaleType axisScaleType ) override;
void setAxisScaleType( RiuPlotAxis axis, RiuPlotWidget::AxisScaleType axisScaleType ) override;
void setAxisTitleText( RiuPlotAxis axis, const QString& title ) override;
void setAxisTitleEnabled( RiuPlotAxis axis, bool enable ) override;
@@ -118,23 +115,18 @@ public:
void enableGridLines( RiuPlotAxis axis, bool majorGridLines, bool minorGridLines ) override;
virtual void
setMajorTicksList( RiuPlotAxis axis, const QList<double>& majorTicks, double minValue, double maxValue ) override;
void setMajorAndMinorTickIntervals( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minValue,
double maxValue ) override;
void setMajorAndMinorTickIntervalsAndRange( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minTickValue,
double maxTickValue,
double rangeMin,
double rangeMax ) override;
void setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount ) override;
double majorTickInterval( RiuPlotAxis axis ) const override;
double minorTickInterval( RiuPlotAxis axis ) const override;
virtual void setMajorTicksList( RiuPlotAxis axis, const QList<double>& majorTicks, double minValue, double maxValue ) override;
void setMajorAndMinorTickIntervals( RiuPlotAxis axis, double majorTickInterval, double minorTickInterval, double minValue, double maxValue ) override;
void setMajorAndMinorTickIntervalsAndRange( RiuPlotAxis axis,
double majorTickInterval,
double minorTickInterval,
double minTickValue,
double maxTickValue,
double rangeMin,
double rangeMax ) override;
void setAutoTickIntervalCounts( RiuPlotAxis axis, int maxMajorTickIntervalCount, int maxMinorTickIntervalCount ) override;
double majorTickInterval( RiuPlotAxis axis ) const override;
double minorTickInterval( RiuPlotAxis axis ) const override;
int axisExtent( RiuPlotAxis axis ) const override;
@@ -163,10 +155,7 @@ public:
void detachItems( RiuPlotWidget::PlotItemType plotItemType ) override;
void findClosestPlotItem( const QPoint& pos,
QwtPlotItem** closestItem,
int* closestCurvePoint,
double* distanceFromClick ) const;
void findClosestPlotItem( const QPoint& pos, QwtPlotItem** closestItem, int* closestCurvePoint, double* distanceFromClick ) const;
const QColor& backgroundColor() const override;

View File

@@ -190,12 +190,12 @@ void RiuRelativePermeabilityPlotPanel::setPlotDefaults( QwtPlot* plot )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuRelativePermeabilityPlotPanel::setPlotData( RiaDefines::EclipseUnitSystem unitSystem,
void RiuRelativePermeabilityPlotPanel::setPlotData( RiaDefines::EclipseUnitSystem unitSystem,
const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& relPermCurves,
double swat,
double sgas,
const QString& caseName,
const QString& cellReferenceText )
const QString& caseName,
const QString& cellReferenceText )
{
// cvf::Trace::show("Set RelPerm plot data");
@@ -257,16 +257,7 @@ void RiuRelativePermeabilityPlotPanel::plotUiSelectedCurves()
const bool useLogScale = m_logarithmicScaleKrAxisCheckBox->isChecked();
const bool fixedXAxis = m_fixedXAxisCheckBox->isChecked();
const bool fixedYAxis = m_fixedLeftYAxisCheckBox->isChecked();
plotCurvesInQwt( m_unitSystem,
selectedCurves,
m_swat,
m_sgas,
m_cellReferenceText,
useLogScale,
fixedXAxis,
fixedYAxis,
m_qwtPlot,
&m_myPlotMarkers );
plotCurvesInQwt( m_unitSystem, selectedCurves, m_swat, m_sgas, m_cellReferenceText, useLogScale, fixedXAxis, fixedYAxis, m_qwtPlot, &m_myPlotMarkers );
}
//--------------------------------------------------------------------------------------------------
@@ -319,16 +310,16 @@ void RiuRelativePermeabilityPlotPanel::addTransparentCurve( QwtPlot*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitSystem unitSystem,
void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitSystem unitSystem,
const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& curveArr,
double swat,
double sgas,
QString cellReferenceText,
bool logScaleLeftAxis,
bool fixedXAxis,
bool fixedLeftYAxis,
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers )
double swat,
double sgas,
QString cellReferenceText,
bool logScaleLeftAxis,
bool fixedXAxis,
bool fixedLeftYAxis,
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers )
{
plot->detachItems( QwtPlotItem::Rtti_PlotCurve );
@@ -356,8 +347,7 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS
// Which axis should this curve be plotted on
WhichYAxis plotOnWhichYAxis = LEFT_YAXIS;
if ( curve.ident == RigFlowDiagSolverInterface::RelPermCurve::PCOW ||
curve.ident == RigFlowDiagSolverInterface::RelPermCurve::PCOG )
if ( curve.ident == RigFlowDiagSolverInterface::RelPermCurve::PCOW || curve.ident == RigFlowDiagSolverInterface::RelPermCurve::PCOG )
{
plotOnWhichYAxis = RIGHT_YAXIS;
}
@@ -425,34 +415,18 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS
// Note that if we're using log scale we must guard against non-positive values
if ( swat != HUGE_VAL )
{
if ( curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KRW ||
curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KROW ||
if ( curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KRW || curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KROW ||
curve.ident == RigFlowDiagSolverInterface::RelPermCurve::PCOW )
{
addCurveConstSaturationIntersectionMarker( curve,
swat,
waterColor,
plotOnWhichYAxis,
plot,
myPlotMarkers,
&points,
&axes );
addCurveConstSaturationIntersectionMarker( curve, swat, waterColor, plotOnWhichYAxis, plot, myPlotMarkers, &points, &axes );
}
}
if ( sgas != HUGE_VAL )
{
if ( curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KRG ||
curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KROG ||
if ( curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KRG || curve.ident == RigFlowDiagSolverInterface::RelPermCurve::KROG ||
curve.ident == RigFlowDiagSolverInterface::RelPermCurve::PCOG )
{
addCurveConstSaturationIntersectionMarker( curve,
sgas,
gasColor,
plotOnWhichYAxis,
plot,
myPlotMarkers,
&points,
&axes );
addCurveConstSaturationIntersectionMarker( curve, sgas, gasColor, plotOnWhichYAxis, plot, myPlotMarkers, &points, &axes );
}
}
}
@@ -532,8 +506,7 @@ void RiuRelativePermeabilityPlotPanel::plotCurvesInQwt( RiaDefines::EclipseUnitS
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiuRelativePermeabilityPlotPanel::determineXAxisTitleFromCurveCollection(
const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& curveArr )
QString RiuRelativePermeabilityPlotPanel::determineXAxisTitleFromCurveCollection( const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& curveArr )
{
bool sawWater = false;
bool sawGas = false;
@@ -601,15 +574,14 @@ void RiuRelativePermeabilityPlotPanel::addVerticalSaturationMarkerLine( double
//--------------------------------------------------------------------------------------------------
/// Add a marker at the intersection of the passed curve and the constant saturation value
//--------------------------------------------------------------------------------------------------
void RiuRelativePermeabilityPlotPanel::addCurveConstSaturationIntersectionMarker(
const RigFlowDiagSolverInterface::RelPermCurve& curve,
double saturationValue,
QColor markerColor,
WhichYAxis whichYAxis,
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers,
std::vector<QPointF>* points,
std::vector<WhichYAxis>* axes )
void RiuRelativePermeabilityPlotPanel::addCurveConstSaturationIntersectionMarker( const RigFlowDiagSolverInterface::RelPermCurve& curve,
double saturationValue,
QColor markerColor,
WhichYAxis whichYAxis,
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers,
std::vector<QPointF>* points,
std::vector<WhichYAxis>* axes )
{
const double yVal = interpolatedCurveYValue( curve.saturationVals, curve.yVals, saturationValue );
if ( yVal != HUGE_VAL )
@@ -638,9 +610,7 @@ void RiuRelativePermeabilityPlotPanel::addCurveConstSaturationIntersectionMarker
//--------------------------------------------------------------------------------------------------
/// Assumes that all the x-values are ordered in increasing order
//--------------------------------------------------------------------------------------------------
double RiuRelativePermeabilityPlotPanel::interpolatedCurveYValue( const std::vector<double>& xVals,
const std::vector<double>& yVals,
double x )
double RiuRelativePermeabilityPlotPanel::interpolatedCurveYValue( const std::vector<double>& xVals, const std::vector<double>& yVals, double x )
{
if ( xVals.size() == 0 ) return HUGE_VAL;
if ( x < xVals.front() ) return HUGE_VAL;
@@ -685,9 +655,9 @@ std::vector<RigFlowDiagSolverInterface::RelPermCurve> RiuRelativePermeabilityPlo
std::vector<RigFlowDiagSolverInterface::RelPermCurve> selectedCurves;
// Determine which curves to actually plot based on selection in GUI
const RigFlowDiagSolverInterface::RelPermCurve::EpsMode epsModeToShow =
m_showUnscaledCheckBox->isChecked() ? RigFlowDiagSolverInterface::RelPermCurve::EPS_OFF
: RigFlowDiagSolverInterface::RelPermCurve::EPS_ON;
const RigFlowDiagSolverInterface::RelPermCurve::EpsMode epsModeToShow = m_showUnscaledCheckBox->isChecked()
? RigFlowDiagSolverInterface::RelPermCurve::EPS_OFF
: RigFlowDiagSolverInterface::RelPermCurve::EPS_ON;
for ( size_t i = 0; i < m_allCurvesArr.size(); i++ )
{
@@ -696,8 +666,7 @@ std::vector<RigFlowDiagSolverInterface::RelPermCurve> RiuRelativePermeabilityPlo
if ( curveEpsMode == epsModeToShow )
{
if ( m_selectedCurvesButtonGroup->button( curveIdent ) &&
m_selectedCurvesButtonGroup->button( curveIdent )->isChecked() )
if ( m_selectedCurvesButtonGroup->button( curveIdent ) && m_selectedCurvesButtonGroup->button( curveIdent )->isChecked() )
{
selectedCurves.push_back( m_allCurvesArr[i] );
}

View File

@@ -89,8 +89,7 @@ private:
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers );
static QString
determineXAxisTitleFromCurveCollection( const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& curveArr );
static QString determineXAxisTitleFromCurveCollection( const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& curveArr );
static void addVerticalSaturationMarkerLine( double saturationValue,
QString label,
@@ -99,20 +98,18 @@ private:
std::vector<QwtPlotMarker*>* myPlotMarkers );
static void addCurveConstSaturationIntersectionMarker( const RigFlowDiagSolverInterface::RelPermCurve& curve,
double saturationValue,
QColor markerColor,
WhichYAxis whichYAxis,
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers,
std::vector<QPointF>* points,
std::vector<WhichYAxis>* axes );
double saturationValue,
QColor markerColor,
WhichYAxis whichYAxis,
QwtPlot* plot,
std::vector<QwtPlotMarker*>* myPlotMarkers,
std::vector<QPointF>* points,
std::vector<WhichYAxis>* axes );
static double interpolatedCurveYValue( const std::vector<double>& xVals, const std::vector<double>& yVals, double x );
static void addTransparentCurve( QwtPlot* plot,
const std::vector<QPointF>& points,
const std::vector<WhichYAxis>& axes,
bool logScaleLeftAxis );
static void
addTransparentCurve( QwtPlot* plot, const std::vector<QPointF>& points, const std::vector<WhichYAxis>& axes, bool logScaleLeftAxis );
std::vector<RigFlowDiagSolverInterface::RelPermCurve> gatherUiSelectedCurves() const;
QString asciiDataForUiSelectedCurves() const;

View File

@@ -169,14 +169,12 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
eclipseResultCase->flowDiagSolverInterface()->calculateRelPermCurves( activeCellIndex );
// Make sure we load the results that we'll query below
RigCaseCellResultsData* cellResultsData =
eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
RigCaseCellResultsData* cellResultsData = eclipseCaseData->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
cellResultsData->ensureKnownResultLoaded(
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "SATNUM" ) );
cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "SATNUM" ) );
// Fetch SWAT and SGAS cell values for the selected cell
cvf::ref<RigResultAccessor> swatAccessor =
@@ -200,15 +198,13 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
timeStepIndex,
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE,
"SATNUM" ) );
const double cellSWAT = swatAccessor.notNull() ? swatAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellSGAS = sgasAccessor.notNull() ? sgasAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellSATNUM = satnumAccessor.notNull() ? satnumAccessor->cellScalar( gridLocalCellIndex )
: HUGE_VAL;
const double cellSWAT = swatAccessor.notNull() ? swatAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellSGAS = sgasAccessor.notNull() ? sgasAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
const double cellSATNUM = satnumAccessor.notNull() ? satnumAccessor->cellScalar( gridLocalCellIndex ) : HUGE_VAL;
// cvf::Trace::show("cellSWAT = %f cellSGAS = %f cellSATNUM = %f", cellSWAT, cellSGAS, cellSATNUM);
QString cellRefText =
constructCellReferenceText( eclipseCaseData, gridIndex, gridLocalCellIndex, "SATNUM", cellSATNUM );
QString caseName = eclipseResultCase->caseUserDescription();
QString cellRefText = constructCellReferenceText( eclipseCaseData, gridIndex, gridLocalCellIndex, "SATNUM", cellSATNUM );
QString caseName = eclipseResultCase->caseUserDescription();
plotPanel->setPlotData( eclipseCaseData->unitsType(), relPermCurveArr, cellSWAT, cellSGAS, caseName, cellRefText );
@@ -266,9 +262,8 @@ QString RiuRelativePermeabilityPlotUpdater::constructCellReferenceText( const Ri
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuEclipseSelectionItem*
RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( const RiuSelectionItem* selectionItem,
Rim3dView*& newFollowAnimView )
RiuEclipseSelectionItem* RiuRelativePermeabilityPlotUpdater::extractEclipseSelectionItem( const RiuSelectionItem* selectionItem,
Rim3dView*& newFollowAnimView )
{
newFollowAnimView = nullptr;
RiuEclipseSelectionItem* eclipseSelectionItem = nullptr;
@@ -310,9 +305,7 @@ RiuEclipseSelectionItem*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t CellLookupHelper::mapToActiveCellIndex( const RigEclipseCaseData* eclipseCaseData,
size_t gridIndex,
size_t gridLocalCellIndex )
size_t CellLookupHelper::mapToActiveCellIndex( const RigEclipseCaseData* eclipseCaseData, size_t gridIndex, size_t gridLocalCellIndex )
{
const size_t gridCount = eclipseCaseData ? eclipseCaseData->gridCount() : 0;
@@ -322,8 +315,7 @@ size_t CellLookupHelper::mapToActiveCellIndex( const RigEclipseCaseData* eclipse
{
// Note!!
// Which type of porosity model to choose? Currently hard-code to MATRIX_MODEL
const RigActiveCellInfo* activeCellInfo =
eclipseCaseData->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
const RigActiveCellInfo* activeCellInfo = eclipseCaseData->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
CVF_ASSERT( activeCellInfo );

View File

@@ -43,8 +43,7 @@ public:
void updateOnSelectionChanged( const RiuSelectionItem* selectionItem );
void updateOnTimeStepChanged( Rim3dView* changedView );
static RiuEclipseSelectionItem* extractEclipseSelectionItem( const RiuSelectionItem* selectionItem,
Rim3dView*& newFollowAnimView );
static RiuEclipseSelectionItem* extractEclipseSelectionItem( const RiuSelectionItem* selectionItem, Rim3dView*& newFollowAnimView );
static QString constructCellReferenceText( const RigEclipseCaseData* eclipseCaseData,
size_t gridIndex,
size_t gridLocalCellIndex,
@@ -71,6 +70,5 @@ private:
class CellLookupHelper
{
public:
static size_t
mapToActiveCellIndex( const RigEclipseCaseData* eclipseCaseData, size_t gridIndex, size_t gridLocalCellIndex );
static size_t mapToActiveCellIndex( const RigEclipseCaseData* eclipseCaseData, size_t gridIndex, size_t gridLocalCellIndex );
};

View File

@@ -229,8 +229,7 @@ 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

@@ -245,17 +245,14 @@ QString RiuResultTextBuilder::geometrySelectionText( const QString& itemSeparato
QString formattedText;
if ( m_2dIntersectionView )
{
formattedText =
QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
formattedText = QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
text += formattedText + itemSeparator;
cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(
m_intersectionPointInDisplay );
cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix( m_intersectionPointInDisplay );
if ( !t.isZero() )
{
cvf::Vec3d intPt = m_intersectionPointInDisplay.getTransformedPoint( t );
formattedText =
createTextFromDomainCoordinate( "Intersection point : [E: %1, N: %2, Depth: %3]", intPt );
formattedText = createTextFromDomainCoordinate( "Intersection point : [E: %1, N: %2, Depth: %3]", intPt );
text += formattedText;
}
}
@@ -264,10 +261,9 @@ QString RiuResultTextBuilder::geometrySelectionText( const QString& itemSeparato
if ( m_displayCoordView )
{
cvf::ref<caf::DisplayCoordTransform> transForm = m_displayCoordView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->translateToDomainCoord( m_intersectionPointInDisplay );
cvf::Vec3d domainCoord = transForm->translateToDomainCoord( m_intersectionPointInDisplay );
formattedText =
createTextFromDomainCoordinate( "Intersection point : [E: %1, N: %2, Depth: %3]", domainCoord );
formattedText = createTextFromDomainCoordinate( "Intersection point : [E: %1, N: %2, Depth: %3]", domainCoord );
text += formattedText;
}
}
@@ -330,8 +326,7 @@ QString RiuResultTextBuilder::coordinatesText( const RigGridBase* grid, size_t g
const auto& [nodeIndex, nodeText] = riNodeOrder[i];
auto v = mainGrid->nodes()[indices[nodeIndex]];
text += createTextFromDomainCoordinate( QString::fromStdString( nodeText ) + " : [%1, %2, %3]" + itemSeparator,
v );
text += createTextFromDomainCoordinate( QString::fromStdString( nodeText ) + " : [%1, %2, %3]" + itemSeparator, v );
}
}
@@ -421,8 +416,7 @@ QString RiuResultTextBuilder::faultResultDetails()
if ( m_eclipseView && m_eclipseView->faultResultSettings()->hasValidCustomResult() )
{
if ( m_eclipseView->faultResultSettings()->customFaultResult()->resultType() !=
RiaDefines::ResultCatType::ALLAN_DIAGRAMS )
if ( m_eclipseView->faultResultSettings()->customFaultResult()->resultType() != RiaDefines::ResultCatType::ALLAN_DIAGRAMS )
{
text += "Fault result data:\n";
this->appendTextFromResultColors( eclipseCaseData,
@@ -550,9 +544,8 @@ QString RiuResultTextBuilder::nncResultText()
if ( m_eclipseView && m_eclipseView->currentFaultResultColors() )
{
RigEclipseResultAddress eclipseResultAddress =
m_eclipseView->currentFaultResultColors()->eclipseResultAddress();
RiaDefines::ResultCatType resultType = m_eclipseView->currentFaultResultColors()->resultType();
RigEclipseResultAddress eclipseResultAddress = m_eclipseView->currentFaultResultColors()->eclipseResultAddress();
RiaDefines::ResultCatType resultType = m_eclipseView->currentFaultResultColors()->resultType();
const std::vector<double>* nncValues = nullptr;
@@ -565,7 +558,7 @@ QString RiuResultTextBuilder::nncResultText()
if ( m_eclResDef.notNull() && m_eclResDef->eclipseCase() )
{
size_t nativeTimeStep = m_eclResDef->eclipseCase()->uiToNativeTimeStepIndex( m_timeStepIndex );
nncValues = nncData->dynamicConnectionScalarResult( eclipseResultAddress, nativeTimeStep );
nncValues = nncData->dynamicConnectionScalarResult( eclipseResultAddress, nativeTimeStep );
}
}
@@ -582,12 +575,10 @@ QString RiuResultTextBuilder::nncResultText()
nncValues = nncData->staticConnectionScalarResult( eclipseResultAddress );
QString resultValueText;
if ( m_eclipseView->currentFaultResultColors()->resultVariable() ==
RiaResultNames::formationAllanResultName() )
if ( m_eclipseView->currentFaultResultColors()->resultVariable() == RiaResultNames::formationAllanResultName() )
{
std::pair<int, int> fmIndexPair =
eclipseCase->allanDiagramData()->formationIndexCombinationFromCategory(
( *nncValues )[m_nncIndex] );
eclipseCase->allanDiagramData()->formationIndexCombinationFromCategory( ( *nncValues )[m_nncIndex] );
std::vector<QString> fmNames = eclipseCase->formationNames();
// clang-format off
@@ -695,8 +686,7 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
{
if ( resultColors->hasStaticResult() )
{
if ( resultColors->resultVariable().compare( RiaResultNames::combinedTransmissibilityResultName(),
Qt::CaseInsensitive ) == 0 )
if ( resultColors->resultVariable().compare( RiaResultNames::combinedTransmissibilityResultName(), Qt::CaseInsensitive ) == 0 )
{
cvf::ref<RigResultAccessor> transResultAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
@@ -718,16 +708,14 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
return;
}
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedMultResultName(),
Qt::CaseInsensitive ) == 0 )
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedMultResultName(), Qt::CaseInsensitive ) == 0 )
{
cvf::ref<RigResultAccessor> multResultAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
0,
RigEclipseResultAddress(
RiaResultNames::combinedMultResultName() ) );
RigEclipseResultAddress( RiaResultNames::combinedMultResultName() ) );
{
double scalarValue = multResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I );
resultInfoText->append( QString( "MULTX : %1\n" ).arg( scalarValue ) );
@@ -747,16 +735,14 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
return;
}
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiTranResultName(),
Qt::CaseInsensitive ) == 0 )
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiTranResultName(), Qt::CaseInsensitive ) == 0 )
{
cvf::ref<RigResultAccessor> transResultAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
0,
RigEclipseResultAddress(
RiaResultNames::combinedRiTranResultName() ) );
RigEclipseResultAddress( RiaResultNames::combinedRiTranResultName() ) );
{
double scalarValue = transResultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I );
resultInfoText->append( QString( "riTran X : %1\n" ).arg( scalarValue ) );
@@ -770,16 +756,14 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
return;
}
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiMultResultName(),
Qt::CaseInsensitive ) == 0 )
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiMultResultName(), Qt::CaseInsensitive ) == 0 )
{
cvf::ref<RigResultAccessor> resultAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
gridIndex,
porosityModel,
0,
RigEclipseResultAddress(
RiaResultNames::combinedRiMultResultName() ) );
RigEclipseResultAddress( RiaResultNames::combinedRiMultResultName() ) );
{
double scalarValue = resultAccessor->cellFaceScalar( cellIndex, cvf::StructGridInterface::POS_I );
resultInfoText->append( QString( "riMult X : %1\n" ).arg( scalarValue ) );
@@ -792,8 +776,7 @@ void RiuResultTextBuilder::appendTextFromResultColors( RigEclipseCaseData*
}
return;
}
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiAreaNormTranResultName(),
Qt::CaseInsensitive ) == 0 )
else if ( resultColors->resultVariable().compare( RiaResultNames::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive ) == 0 )
{
cvf::ref<RigResultAccessor> resultAccessor =
RigResultAccessorFactory::createFromResultAddress( eclipseCase,
@@ -953,12 +936,8 @@ QString RiuResultTextBuilder::nncDetails()
k++;
QString gridName = QString::fromStdString( hostGrid->gridName() );
text.append( QString( "NNC 1 : cell [%1, %2, %3] face %4 (%5)\n" )
.arg( i )
.arg( j )
.arg( k )
.arg( face.text() )
.arg( gridName ) );
text.append(
QString( "NNC 1 : cell [%1, %2, %3] face %4 (%5)\n" ).arg( i ).arg( j ).arg( k ).arg( face.text() ).arg( gridName ) );
}
}
@@ -978,17 +957,12 @@ QString RiuResultTextBuilder::nncDetails()
j++;
k++;
QString gridName = QString::fromStdString( hostGrid->gridName() );
cvf::StructGridInterface::FaceEnum oppositeFaceEnum(
cvf::StructGridInterface::oppositeFace( face ) );
QString faceText = oppositeFaceEnum.text();
QString gridName = QString::fromStdString( hostGrid->gridName() );
cvf::StructGridInterface::FaceEnum oppositeFaceEnum( cvf::StructGridInterface::oppositeFace( face ) );
QString faceText = oppositeFaceEnum.text();
text.append( QString( "NNC 2 : cell [%1, %2, %3] face %4 (%5)\n" )
.arg( i )
.arg( j )
.arg( k )
.arg( faceText )
.arg( gridName ) );
text.append(
QString( "NNC 2 : cell [%1, %2, %3] face %4 (%5)\n" ).arg( i ).arg( j ).arg( k ).arg( faceText ).arg( gridName ) );
}
}
}
@@ -1014,8 +988,7 @@ void RiuResultTextBuilder::appendDetails( QString& text, const QString& details
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiuResultTextBuilder::cellResultText( const std::vector<RimEclipseResultDefinition*>& resultDefinitions,
bool appendCaseName )
QString RiuResultTextBuilder::cellResultText( const std::vector<RimEclipseResultDefinition*>& resultDefinitions, bool appendCaseName )
{
std::map<QString, QString> keyValues;
@@ -1192,8 +1165,7 @@ 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 "

View File

@@ -47,15 +47,8 @@ class Part;
class RiuResultTextBuilder
{
public:
RiuResultTextBuilder( RimGridView* settingsView,
RimEclipseResultDefinition* eclResDef,
size_t gridIndex,
size_t cellIndex,
size_t timeStepIndex );
RiuResultTextBuilder( RimGridView* settingsView,
RimEclipseResultDefinition* eclResDef,
size_t reservoirCellIndex,
size_t timeStepIndex );
RiuResultTextBuilder( RimGridView* settingsView, RimEclipseResultDefinition* eclResDef, size_t gridIndex, size_t cellIndex, size_t timeStepIndex );
RiuResultTextBuilder( RimGridView* settingsView, RimEclipseResultDefinition* eclResDef, size_t reservoirCellIndex, size_t timeStepIndex );
void setFace( cvf::StructGridInterface::FaceType face );
void setNncIndex( size_t nncIndex );

View File

@@ -166,10 +166,8 @@ void RiuScalarMapperLegendFrame::renderRect( QPainter* painter, const LayoutInfo
QColor startQColor( startColor.r(), startColor.g(), startColor.b() );
QColor endQColor( endColor.r(), endColor.g(), endColor.b() );
QRectF gradientRect( QPointF( layout.tickStartX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QPointF( layout.tickStartX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );
QRectF gradientRect( QPointF( layout.tickStartX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QPointF( layout.tickStartX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );
QLinearGradient gradient( gradientRect.topLeft(), gradientRect.bottomRight() );
gradient.setCoordinateMode( QGradient::LogicalMode );
@@ -177,18 +175,13 @@ void RiuScalarMapperLegendFrame::renderRect( QPainter* painter, const LayoutInfo
gradient.setColorAt( 1.0, endQColor );
QRectF rect( QPointF( layout.tickStartX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QPointF( layout.tickMidX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );
QPointF( layout.tickMidX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );
painter->fillRect( rect, QBrush( gradient ) );
painter->drawLine( QPointF( layout.tickStartX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QPointF( layout.tickEndX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ) );
painter->drawLine( QPointF( layout.tickStartX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ),
QPointF( layout.tickEndX,
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );
painter->drawLine( QPointF( layout.tickStartX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
QPointF( layout.tickEndX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ) );
painter->drawLine( QPointF( layout.tickStartX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ),
QPointF( layout.tickEndX, layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom + 1] + 1 ) );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -83,8 +83,7 @@ void RiuSelectionChangedHandler::handleSelectionDeleted() const
RiuMainWindow::instance()->resultPlot()->deleteAllCurves();
RiuRelativePermeabilityPlotUpdater* relPermPlotUpdater =
RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
RiuRelativePermeabilityPlotUpdater* relPermPlotUpdater = RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
relPermPlotUpdater->updateOnSelectionChanged( nullptr );
RiuPvtPlotUpdater* pvtPlotUpdater = RiuMainWindow::instance()->pvtPlotPanel()->plotUpdater();
@@ -107,8 +106,7 @@ void RiuSelectionChangedHandler::handleItemAppended( const RiuSelectionItem* ite
addCurveFromSelectionItem( item );
RiuRelativePermeabilityPlotUpdater* relPermUpdater =
RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
RiuRelativePermeabilityPlotUpdater* relPermUpdater = RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
relPermUpdater->updateOnSelectionChanged( item );
RiuPvtPlotUpdater* pvtPlotUpdater = RiuMainWindow::instance()->pvtPlotPanel()->plotUpdater();
@@ -156,8 +154,7 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem( const RiuEclipseSele
{
RiaDefines::PorosityModelType porosityModel = eclResDef->porosityModel();
std::vector<QDateTime> timeStepDates =
eclResDef->eclipseCase()->eclipseCaseData()->results( porosityModel )->timeStepDates();
std::vector<QDateTime> timeStepDates = eclResDef->eclipseCase()->eclipseCaseData()->results( porosityModel )->timeStepDates();
QString curveName = eclResDef->eclipseCase()->caseUserDescription();
curveName += ", ";
@@ -169,12 +166,11 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem( const RiuEclipseSele
eclipseSelectionItem->m_gridIndex,
eclipseSelectionItem->m_gridLocalCellIndex );
std::vector<double> timeHistoryValues =
RigTimeHistoryResultAccessor::timeHistoryValues( eclResDef->eclipseCase()->eclipseCaseData(),
eclResDef,
eclipseSelectionItem->m_gridIndex,
eclipseSelectionItem->m_gridLocalCellIndex,
timeStepDates.size() );
std::vector<double> timeHistoryValues = RigTimeHistoryResultAccessor::timeHistoryValues( eclResDef->eclipseCase()->eclipseCaseData(),
eclResDef,
eclipseSelectionItem->m_gridIndex,
eclipseSelectionItem->m_gridLocalCellIndex,
timeStepDates.size() );
CVF_ASSERT( timeStepDates.size() == timeHistoryValues.size() );
RiuMainWindow::instance()->resultPlot()->addCurve( eclResDef->eclipseCase(),
@@ -196,8 +192,8 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem( const RiuGeoMechSele
{
std::unique_ptr<RiuFemTimeHistoryResultAccessor> timeHistResultAccessor;
cvf::Vec3d intersectionPointInDomain = geomSelectionItem->m_view->displayCoordTransform()->translateToDomainCoord(
geomSelectionItem->m_localIntersectionPointInDisplay );
cvf::Vec3d intersectionPointInDomain =
geomSelectionItem->m_view->displayCoordTransform()->translateToDomainCoord( geomSelectionItem->m_localIntersectionPointInDisplay );
if ( geomSelectionItem->m_hasIntersectionTriangle )
{
@@ -233,13 +229,11 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem( const RiuGeoMechSele
{
if ( geomSelectionItem->m_elementFace >= 0 )
{
curveName.append( ", " + caf::AppEnum<cvf::StructGridInterface::FaceType>::textFromIndex(
geomSelectionItem->m_elementFace ) );
curveName.append( ", " + caf::AppEnum<cvf::StructGridInterface::FaceType>::textFromIndex( geomSelectionItem->m_elementFace ) );
}
else
{
curveName.append( ", from N[" + QString::number( timeHistResultAccessor->closestNodeId() ) +
"] transformed onto intersection" );
curveName.append( ", from N[" + QString::number( timeHistResultAccessor->closestNodeId() ) + "] transformed onto intersection" );
}
}
curveName.append( "\n" );
@@ -308,8 +302,7 @@ 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 );
}

View File

@@ -27,9 +27,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuSimpleHistogramWidget::RiuSimpleHistogramWidget( const QString& objectName,
QWidget* parent /*= 0*/,
Qt::WindowFlags f /*= 0*/ )
RiuSimpleHistogramWidget::RiuSimpleHistogramWidget( const QString& objectName, QWidget* parent /*= 0*/, Qt::WindowFlags f /*= 0*/ )
: QWidget( parent, f )
{
m_minPercentile = HUGE_VAL;

View File

@@ -103,9 +103,7 @@ void RiuSummaryPlot::showContextMenu( QPoint pos )
if ( curveClicked )
{
QVariant curveVariant( QVariant::fromValue( static_cast<void*>( summaryCurve ) ) );
menuBuilder.addCmdFeatureWithUserData( "RicNewSummaryPlotFromCurveFeature",
"Create New Plot from Curve",
curveVariant );
menuBuilder.addCmdFeatureWithUserData( "RicNewSummaryPlotFromCurveFeature", "Create New Plot from Curve", curveVariant );
}
}
}
@@ -126,7 +124,7 @@ void RiuSummaryPlot::showContextMenu( QPoint pos )
if ( !curveClicked )
{
auto* summaryPlot = static_cast<RimSummaryPlot*>( plotWidget()->plotDefinition() );
auto* summaryPlot = static_cast<RimSummaryPlot*>( plotWidget()->plotDefinition() );
std::vector<RimEnsembleCurveSet*> allCurveSetsInPlot;
summaryPlot->descendantsOfType( allCurveSetsInPlot );
for ( auto curveSet : allCurveSetsInPlot )
@@ -158,20 +156,13 @@ void RiuSummaryPlot::showContextMenu( QPoint pos )
{
if ( curveClicked )
{
menuBuilder.addCmdFeatureWithUserData( "RicNewCorrelationPlotFeature",
"New Tornado Plot",
variant );
menuBuilder.addCmdFeatureWithUserData( "RicNewCorrelationPlotFeature", "New Tornado Plot", variant );
}
menuBuilder.addCmdFeatureWithUserData( "RicNewCorrelationMatrixPlotFeature",
"New Matrix Plot",
variant );
menuBuilder.addCmdFeatureWithUserData( "RicNewCorrelationReportPlotFeature",
"New Report Plot",
variant );
menuBuilder.addCmdFeatureWithUserData( "RicNewCorrelationMatrixPlotFeature", "New Matrix Plot", variant );
menuBuilder.addCmdFeatureWithUserData( "RicNewCorrelationReportPlotFeature", "New Report Plot", variant );
if ( curveClicked )
{
menuBuilder.subMenuStart( "Cross Plots",
*caf::IconProvider( ":/CorrelationCrossPlot16x16.png" ).icon() );
menuBuilder.subMenuStart( "Cross Plots", *caf::IconProvider( ":/CorrelationCrossPlot16x16.png" ).icon() );
std::vector<std::pair<RigEnsembleParameter, double>> ensembleParameters =
ensemble->parameterCorrelations( clickedEnsembleCurveSet->summaryAddress(), timeStep );
std::sort( ensembleParameters.begin(),

View File

@@ -39,11 +39,11 @@ public:
RiuSummaryPlot( RimSummaryPlot* plot );
~RiuSummaryPlot() override;
virtual void useDateBasedTimeAxis(
const QString& dateFormat,
const QString& timeFormat,
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_UNSPECIFIED,
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_UNSPECIFIED ) = 0;
virtual void
useDateBasedTimeAxis( const QString& dateFormat,
const QString& timeFormat,
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_UNSPECIFIED,
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_UNSPECIFIED ) = 0;
virtual void useTimeBasedTimeAxis() = 0;

View File

@@ -42,11 +42,10 @@ public:
RiuSummaryQtChartsPlot( RimSummaryPlot* plot, QWidget* parent );
~RiuSummaryQtChartsPlot() override;
void useDateBasedTimeAxis(
const QString& dateFormat,
const QString& timeFormat,
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_UNSPECIFIED,
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_UNSPECIFIED ) override;
void useDateBasedTimeAxis( const QString& dateFormat,
const QString& timeFormat,
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_UNSPECIFIED,
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_UNSPECIFIED ) override;
void useTimeBasedTimeAxis() override;

View File

@@ -62,16 +62,14 @@ RiuSummaryQuantityNameInfoProvider* RiuSummaryQuantityNameInfoProvider::instance
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseSummaryAddress::SummaryVarCategory
RiuSummaryQuantityNameInfoProvider::identifyCategory( const std::string& vectorName )
RifEclipseSummaryAddress::SummaryVarCategory RiuSummaryQuantityNameInfoProvider::identifyCategory( const std::string& vectorName )
{
// Try to an exact match on the vector name first in the vector table.
bool exactMatch = true;
auto exactCategory = categoryFromVectorName( vectorName, exactMatch );
if ( exactCategory != RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID ) return exactCategory;
if ( vectorName.size() < 3 || vectorName.size() > 8 )
return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID;
if ( vectorName.size() < 3 || vectorName.size() > 8 ) return RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID;
// Try to match the base vector name with more heuristics
auto strippedQuantityName = RifEclipseSummaryAddress::baseVectorName( vectorName );
@@ -119,8 +117,8 @@ RifEclipseSummaryAddress::SummaryVarCategory
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseSummaryAddress::SummaryVarCategory
RiuSummaryQuantityNameInfoProvider::categoryFromVectorName( const std::string& vectorName, bool exactMatch ) const
RifEclipseSummaryAddress::SummaryVarCategory RiuSummaryQuantityNameInfoProvider::categoryFromVectorName( const std::string& vectorName,
bool exactMatch ) const
{
auto info = quantityInfo( vectorName, exactMatch );
@@ -130,8 +128,8 @@ RifEclipseSummaryAddress::SummaryVarCategory
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityInfo
RiuSummaryQuantityNameInfoProvider::quantityInfo( const std::string& vectorName, bool exactMatch ) const
RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityInfo RiuSummaryQuantityNameInfoProvider::quantityInfo( const std::string& vectorName,
bool exactMatch ) const
{
auto it = m_summaryToDescMap.find( vectorName );
if ( it != m_summaryToDescMap.end() )
@@ -182,12 +180,10 @@ RiuSummaryQuantityNameInfoProvider::RiuSummaryQuantityInfo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RiuSummaryQuantityNameInfoProvider::longNameFromVectorName( const std::string& vectorName,
bool returnVectorNameIfNotFound ) const
std::string RiuSummaryQuantityNameInfoProvider::longNameFromVectorName( const std::string& vectorName, bool returnVectorNameIfNotFound ) const
{
auto info = quantityInfo( vectorName );
return info.category != RifEclipseSummaryAddress::SUMMARY_INVALID || !returnVectorNameIfNotFound ? info.longName
: vectorName;
return info.category != RifEclipseSummaryAddress::SUMMARY_INVALID || !returnVectorNameIfNotFound ? info.longName : vectorName;
}
//--------------------------------------------------------------------------------------------------
@@ -423,17 +419,14 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "FCOMT", { A::SUMMARY_FIELD, "Hydrocarbon component" } } );
info.insert( { "FCNMR", { A::SUMMARY_FIELD, "Hydrocarbon component molar rates in the NGL phase" } } );
info.insert( { "FCNWR", { A::SUMMARY_FIELD, "Hydrocarbon component mass rates in the NGL phase" } } );
info.insert( { "FCGMRn",
{ A::SUMMARY_FIELD, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert(
{ "FCGRn", { A::SUMMARY_FIELD, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "FCGMRn", { A::SUMMARY_FIELD, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "FCGRn", { A::SUMMARY_FIELD, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "FCOMRn", { A::SUMMARY_FIELD, "Hydrocarbon component" } } );
info.insert( { "FCORn", { A::SUMMARY_FIELD, "Hydrocarbon component" } } );
info.insert( { "FMUF", { A::SUMMARY_FIELD, "Make-up fraction" } } );
info.insert( { "FAMR", { A::SUMMARY_FIELD, "Make-up gas rate" } } );
info.insert( { "FAMT", { A::SUMMARY_FIELD, "Make-up gas total" } } );
info.insert(
{ "FGSPR", { A::SUMMARY_FIELD, "Target sustainable rate for most recent sustainable capacity test for gas" } } );
info.insert( { "FGSPR", { A::SUMMARY_FIELD, "Target sustainable rate for most recent sustainable capacity test for gas" } } );
info.insert( { "FGSRL",
{ A::SUMMARY_FIELD,
"Maximum tested rate sustained for the test period during the most recent "
@@ -447,8 +440,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
"Period for which target sustainable rate could be maintained for the most recent "
"sustainable capacity test for gas" } } );
info.insert( { "FGSTP", { A::SUMMARY_FIELD, "Test period for the most recent sustainable capacity test for gas" } } );
info.insert(
{ "FOSPR", { A::SUMMARY_FIELD, "Target sustainable rate for most recent sustainable capacity test for oil" } } );
info.insert( { "FOSPR", { A::SUMMARY_FIELD, "Target sustainable rate for most recent sustainable capacity test for oil" } } );
info.insert( { "FOSRL",
{ A::SUMMARY_FIELD,
"Maximum tested rate sustained for the test period during the most recent "
@@ -462,8 +454,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
"Period for which target sustainable rate could be maintained for the most recent "
"sustainable capacity test for oil" } } );
info.insert( { "FOSTP", { A::SUMMARY_FIELD, "Test period for the most recent sustainable capacity test for oil" } } );
info.insert(
{ "FWSPR", { A::SUMMARY_FIELD, "Target sustainable rate for most recent sustainable capacity test for water" } } );
info.insert( { "FWSPR", { A::SUMMARY_FIELD, "Target sustainable rate for most recent sustainable capacity test for water" } } );
info.insert( { "FWSRL",
{ A::SUMMARY_FIELD,
"Maximum tested rate sustained for the test period during the most recent "
@@ -903,17 +894,14 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "GCOMT", { A::SUMMARY_GROUP, "Hydrocarbon component" } } );
info.insert( { "GCNMR", { A::SUMMARY_GROUP, "Hydrocarbon component molar rates in the NGL phase" } } );
info.insert( { "GCNWR", { A::SUMMARY_GROUP, "Hydrocarbon component mass rates in the NGL phase" } } );
info.insert( { "GCGMRn",
{ A::SUMMARY_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert(
{ "GCGRn", { A::SUMMARY_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "GCGMRn", { A::SUMMARY_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "GCGRn", { A::SUMMARY_GROUP, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "GCOMRn", { A::SUMMARY_GROUP, "Hydrocarbon component" } } );
info.insert( { "GCORn", { A::SUMMARY_GROUP, "Hydrocarbon component" } } );
info.insert( { "GMUF", { A::SUMMARY_GROUP, "Make-up fraction" } } );
info.insert( { "GAMR", { A::SUMMARY_GROUP, "Make-up gas rate" } } );
info.insert( { "GAMT", { A::SUMMARY_GROUP, "Make-up gas total" } } );
info.insert(
{ "GGSPR", { A::SUMMARY_GROUP, "Target sustainable rate for most recent sustainable capacity test for gas" } } );
info.insert( { "GGSPR", { A::SUMMARY_GROUP, "Target sustainable rate for most recent sustainable capacity test for gas" } } );
info.insert( { "GGSRL",
{ A::SUMMARY_GROUP,
"Maximum tested rate sustained for the test period during the most recent sustainable "
@@ -929,8 +917,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
"sustainable capacity test "
"for gas" } } );
info.insert( { "GGSTP", { A::SUMMARY_GROUP, "Test period for the most recent sustainable capacity test for gas" } } );
info.insert(
{ "GOSPR", { A::SUMMARY_GROUP, "Target sustainable rate for most recent sustainable capacity test for oil" } } );
info.insert( { "GOSPR", { A::SUMMARY_GROUP, "Target sustainable rate for most recent sustainable capacity test for oil" } } );
info.insert( { "GOSRL",
{ A::SUMMARY_GROUP,
"Maximum tested rate sustained for the test period during the most recent sustainable "
@@ -946,8 +933,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
"sustainable capacity test "
"for oil" } } );
info.insert( { "GOSTP", { A::SUMMARY_GROUP, "Test period for the most recent sustainable capacity test for oil" } } );
info.insert(
{ "GWSPR", { A::SUMMARY_GROUP, "Target sustainable rate for most recent sustainable capacity test for water" } } );
info.insert( { "GWSPR", { A::SUMMARY_GROUP, "Target sustainable rate for most recent sustainable capacity test for water" } } );
info.insert( { "GWSRL",
{ A::SUMMARY_GROUP,
"Maximum tested rate sustained for the test period during the most recent sustainable "
@@ -1053,9 +1039,8 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "GGIMR", { A::SUMMARY_GROUP, "Gas import rate, at and below this group" } } );
info.insert( { "GGIMT", { A::SUMMARY_GROUP, "Gas import cumulative total, at and below this group" } } );
info.insert( { "GPRFP", { A::SUMMARY_GROUP, "Group or node Pressure in network from end of First Pass" } } );
info.insert( { "GGPRNBFP",
{ A::SUMMARY_GROUP,
"Gas flow rate along Group's or node's outlet branch in network, from end of First Pass" } } );
info.insert(
{ "GGPRNBFP", { A::SUMMARY_GROUP, "Gas flow rate along Group's or node's outlet branch in network, from end of First Pass" } } );
info.insert( { "GGLIR", { A::SUMMARY_GROUP, "Gas Lift Injection Rate" } } );
info.insert( { "GGCV", { A::SUMMARY_GROUP, "Gas Calorific Value" } } );
info.insert( { "GGQ", { A::SUMMARY_GROUP, "Gas molar Quality" } } );
@@ -1068,70 +1053,28 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "GPR", { A::SUMMARY_GROUP, "Group or node Pressure in the production network" } } );
info.insert( { "GPRG", { A::SUMMARY_GROUP, "Group or node Pressure in the gas injection network" } } );
info.insert( { "GPRW", { A::SUMMARY_GROUP, "Group or node Pressure in the water injection network" } } );
info.insert(
{ "GPRB",
{ A::SUMMARY_GROUP, "Pressure drop along the group's or node's outlet branch in the production network" } } );
info.insert(
{ "GPRBG",
{ A::SUMMARY_GROUP, "Pressure drop along the group's or node's inlet branch in the gas injection network" } } );
info.insert( { "GPRBW",
{ A::SUMMARY_GROUP,
"Pressure drop along the group's or node's inlet branch in the water injection network" } } );
info.insert( { "GPRB", { A::SUMMARY_GROUP, "Pressure drop along the group's or node's outlet branch in the production network" } } );
info.insert( { "GPRBG", { A::SUMMARY_GROUP, "Pressure drop along the group's or node's inlet branch in the gas injection network" } } );
info.insert( { "GPRBW", { A::SUMMARY_GROUP, "Pressure drop along the group's or node's inlet branch in the water injection network" } } );
info.insert( { "GALQ", { A::SUMMARY_GROUP, "ALQ in the group's or node's outlet branch in the production network" } } );
info.insert(
{ "GOPRNB",
{ A::SUMMARY_GROUP, "Oil flow rate along the group's or node's outlet branch in the production network" } } );
info.insert(
{ "GWPRNB",
{ A::SUMMARY_GROUP, "Water flow rate along the group's or node's outlet branch in the production network" } } );
info.insert(
{ "GGPRNB",
{ A::SUMMARY_GROUP, "Gas flow rate along the group's or node's outlet branch in the production network" } } );
info.insert( { "GLPRNB",
{ A::SUMMARY_GROUP,
"Liquid flow rate along the group's or node's outlet branch in the production network" } } );
info.insert( { "GWIRNB",
{ A::SUMMARY_GROUP,
"Water flow rate along the group's or node's inlet branch in the water injection network" } } );
info.insert(
{ "GGIRNB",
{ A::SUMMARY_GROUP, "Gas flow rate along the group's or node's inlet branch in the gas injection network" } } );
info.insert(
{ "GOMNR",
{ A::SUMMARY_GROUP, "Group or node minimum oil rate as specified with GNETDP in the production network" } } );
info.insert(
{ "GGMNR",
{ A::SUMMARY_GROUP, "Group or node minimum gas rate as specified with GNETDP in the production network" } } );
info.insert(
{ "GWMNR",
{ A::SUMMARY_GROUP, "Group or node minimum water rate as specified with GNETDP in the production network" } } );
info.insert( { "GLMNR",
{ A::SUMMARY_GROUP,
"Group or node minimum liquid rate as specified with GNETDP in the production network" } } );
info.insert(
{ "GOMXR",
{ A::SUMMARY_GROUP, "Group or node maximum oil rate as specified with GNETDP in the production network" } } );
info.insert(
{ "GGMXR",
{ A::SUMMARY_GROUP, "Group or node maximum gas rate as specified with GNETDP in the production network" } } );
info.insert(
{ "GWMXR",
{ A::SUMMARY_GROUP, "Group or node maximum water rate as specified with GNETDP in the production network" } } );
info.insert( { "GLMXR",
{ A::SUMMARY_GROUP,
"Group or node maximum liquid rate as specified with GNETDP in the production network" } } );
info.insert(
{ "GMNP",
{ A::SUMMARY_GROUP, "Group or node minimum pressure as specified with GNETDP in the production network" } } );
info.insert(
{ "GMXP",
{ A::SUMMARY_GROUP, "Group or node maximum pressure as specified with GNETDP in the production network" } } );
info.insert(
{ "GPRINC",
{ A::SUMMARY_GROUP, "Group or node pressure increment as specified with GNETDP in the production network" } } );
info.insert(
{ "GPRDEC",
{ A::SUMMARY_GROUP, "Group or node pressure decrement as specified with GNETDP in the production network" } } );
info.insert( { "GOPRNB", { A::SUMMARY_GROUP, "Oil flow rate along the group's or node's outlet branch in the production network" } } );
info.insert( { "GWPRNB", { A::SUMMARY_GROUP, "Water flow rate along the group's or node's outlet branch in the production network" } } );
info.insert( { "GGPRNB", { A::SUMMARY_GROUP, "Gas flow rate along the group's or node's outlet branch in the production network" } } );
info.insert( { "GLPRNB", { A::SUMMARY_GROUP, "Liquid flow rate along the group's or node's outlet branch in the production network" } } );
info.insert( { "GWIRNB", { A::SUMMARY_GROUP, "Water flow rate along the group's or node's inlet branch in the water injection network" } } );
info.insert( { "GGIRNB", { A::SUMMARY_GROUP, "Gas flow rate along the group's or node's inlet branch in the gas injection network" } } );
info.insert( { "GOMNR", { A::SUMMARY_GROUP, "Group or node minimum oil rate as specified with GNETDP in the production network" } } );
info.insert( { "GGMNR", { A::SUMMARY_GROUP, "Group or node minimum gas rate as specified with GNETDP in the production network" } } );
info.insert( { "GWMNR", { A::SUMMARY_GROUP, "Group or node minimum water rate as specified with GNETDP in the production network" } } );
info.insert( { "GLMNR", { A::SUMMARY_GROUP, "Group or node minimum liquid rate as specified with GNETDP in the production network" } } );
info.insert( { "GOMXR", { A::SUMMARY_GROUP, "Group or node maximum oil rate as specified with GNETDP in the production network" } } );
info.insert( { "GGMXR", { A::SUMMARY_GROUP, "Group or node maximum gas rate as specified with GNETDP in the production network" } } );
info.insert( { "GWMXR", { A::SUMMARY_GROUP, "Group or node maximum water rate as specified with GNETDP in the production network" } } );
info.insert( { "GLMXR", { A::SUMMARY_GROUP, "Group or node maximum liquid rate as specified with GNETDP in the production network" } } );
info.insert( { "GMNP", { A::SUMMARY_GROUP, "Group or node minimum pressure as specified with GNETDP in the production network" } } );
info.insert( { "GMXP", { A::SUMMARY_GROUP, "Group or node maximum pressure as specified with GNETDP in the production network" } } );
info.insert( { "GPRINC", { A::SUMMARY_GROUP, "Group or node pressure increment as specified with GNETDP in the production network" } } );
info.insert( { "GPRDEC", { A::SUMMARY_GROUP, "Group or node pressure decrement as specified with GNETDP in the production network" } } );
info.insert( { "GCPR", { A::SUMMARY_GROUP, "Polymer Production Rate" } } );
info.insert( { "GCPC", { A::SUMMARY_GROUP, "Polymer Production Concentration" } } );
info.insert( { "GCPT", { A::SUMMARY_GROUP, "Polymer Production Total" } } );
@@ -1326,11 +1269,10 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
{ A::SUMMARY_WELL,
"Hydraulic head in well based on the reference depth given in HYDRHEAD and the well's reference "
"depth" } } );
info.insert(
{ "WHDF",
{ A::SUMMARY_WELL,
"Hydraulic head in well based on the reference depth given in HYDRHEAD and the well's reference depth "
"calculated at freshwater conditions" } } );
info.insert( { "WHDF",
{ A::SUMMARY_WELL,
"Hydraulic head in well based on the reference depth given in HYDRHEAD and the well's reference depth "
"calculated at freshwater conditions" } } );
info.insert( { "WSTAT", { A::SUMMARY_WELL, "Well State Indicator" } } );
info.insert( { "WMCTL", { A::SUMMARY_WELL, "Mode of Control" } } );
info.insert( { "WMCON", { A::SUMMARY_WELL, "The number of connections capable of flowing in the well" } } );
@@ -1374,10 +1316,8 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "WCOMT", { A::SUMMARY_WELL, "Hydrocarbon component" } } );
info.insert( { "WCNMR", { A::SUMMARY_WELL, "Hydrocarbon component molar rates in the NGL phase" } } );
info.insert( { "WCNWR", { A::SUMMARY_WELL, "Hydrocarbon component mass rates in the NGL phase" } } );
info.insert( { "WCGMRn",
{ A::SUMMARY_WELL, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert(
{ "WCGRn", { A::SUMMARY_WELL, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "WCGMRn", { A::SUMMARY_WELL, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "WCGRn", { A::SUMMARY_WELL, "Hydrocarbon component molar rates in the gas phase for nth separator stage" } } );
info.insert( { "WCOMRn", { A::SUMMARY_WELL, "Hydrocarbon component" } } );
info.insert( { "WCORn", { A::SUMMARY_WELL, "Hydrocarbon component" } } );
info.insert( { "WMUF", { A::SUMMARY_WELL, "Make-up fraction" } } );
@@ -1522,9 +1462,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "COFR", { A::SUMMARY_WELL_COMPLETION, "Oil Flow Rate" } } );
info.insert( { "COFRF", { A::SUMMARY_WELL_COMPLETION, "Free Oil Flow Rate" } } );
info.insert( { "COFRS", { A::SUMMARY_WELL_COMPLETION, "Solution oil flow rate" } } );
info.insert( { "COFRU",
{ A::SUMMARY_WELL_COMPLETION,
"Sum of connection oil flow rates upstream of, and including, this connection" } } );
info.insert( { "COFRU", { A::SUMMARY_WELL_COMPLETION, "Sum of connection oil flow rates upstream of, and including, this connection" } } );
info.insert( { "COPR", { A::SUMMARY_WELL_COMPLETION, "Oil Production Rate" } } );
info.insert( { "COPT", { A::SUMMARY_WELL_COMPLETION, "Oil Production Total" } } );
info.insert( { "COPTF", { A::SUMMARY_WELL_COMPLETION, "Free Oil Production Total" } } );
@@ -1533,9 +1471,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "COPP", { A::SUMMARY_WELL_COMPLETION, "Oil Potential Production rate" } } );
info.insert( { "COPI", { A::SUMMARY_WELL_COMPLETION, "Oil Potential Injection rate" } } );
info.insert( { "CWFR", { A::SUMMARY_WELL_COMPLETION, "Water Flow Rate" } } );
info.insert( { "CWFRU",
{ A::SUMMARY_WELL_COMPLETION,
"Sum of connection water flow rates upstream of, and including, this connection" } } );
info.insert( { "CWFRU", { A::SUMMARY_WELL_COMPLETION, "Sum of connection water flow rates upstream of, and including, this connection" } } );
info.insert( { "CWPR", { A::SUMMARY_WELL_COMPLETION, "Water Production Rate" } } );
info.insert( { "CWPT", { A::SUMMARY_WELL_COMPLETION, "Water Production Total" } } );
info.insert( { "CWIR", { A::SUMMARY_WELL_COMPLETION, "Water Injection Rate" } } );
@@ -1545,9 +1481,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "CGFR", { A::SUMMARY_WELL_COMPLETION, "Gas Flow Rate" } } );
info.insert( { "CGFRF", { A::SUMMARY_WELL_COMPLETION, "Free Gas Flow Rate" } } );
info.insert( { "CGFRS", { A::SUMMARY_WELL_COMPLETION, "Solution Gas Flow Rate" } } );
info.insert( { "CGFRU",
{ A::SUMMARY_WELL_COMPLETION,
"Sum of connection gas flow rates upstream of, and including, this connection" } } );
info.insert( { "CGFRU", { A::SUMMARY_WELL_COMPLETION, "Sum of connection gas flow rates upstream of, and including, this connection" } } );
info.insert( { "CGPR", { A::SUMMARY_WELL_COMPLETION, "Gas Production Rate " } } );
info.insert( { "CGPT", { A::SUMMARY_WELL_COMPLETION, "Gas Production Total" } } );
info.insert( { "CGPTF", { A::SUMMARY_WELL_COMPLETION, "Free Gas Production Total" } } );
@@ -1576,8 +1510,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "CGPPTN", { A::SUMMARY_WELL_COMPLETION, "Generalized pseudo-pressure table update counter" } } );
info.insert( { "CGPPTS", { A::SUMMARY_WELL_COMPLETION, "Generalized pseudo-pressure table update status" } } );
info.insert( { "CDSM", { A::SUMMARY_WELL_COMPLETION, "Current mass of scale deposited" } } );
info.insert(
{ "CDSML", { A::SUMMARY_WELL_COMPLETION, "Current mass of scale deposited per unit perforation length" } } );
info.insert( { "CDSML", { A::SUMMARY_WELL_COMPLETION, "Current mass of scale deposited per unit perforation length" } } );
info.insert( { "CDSF", { A::SUMMARY_WELL_COMPLETION, "PI multiplicative factor due to scale damage" } } );
info.insert( { "CAMF", { A::SUMMARY_WELL_COMPLETION, "Component aqueous mole fraction, from producing completions" } } );
info.insert( { "CZMF", { A::SUMMARY_WELL_COMPLETION, "Total Mole Fraction" } } );
@@ -1651,15 +1584,9 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "CTFRALK", { A::SUMMARY_WELL_COMPLETION, "Flow Rate" } } );
info.insert( { "CTPTALK", { A::SUMMARY_WELL_COMPLETION, "Production Total" } } );
info.insert( { "CTITALK", { A::SUMMARY_WELL_COMPLETION, "Injection Total" } } );
info.insert( { "COFRU",
{ A::SUMMARY_WELL_COMPLETION,
"Sum of connection oil flow rates upstream of, and including, this connection" } } );
info.insert( { "CWFRU",
{ A::SUMMARY_WELL_COMPLETION,
"Sum of connection water flow rates upstream of, and including, this connection" } } );
info.insert( { "CGFRU",
{ A::SUMMARY_WELL_COMPLETION,
"Sum of connection gas flow rates upstream of, and including, this connection" } } );
info.insert( { "COFRU", { A::SUMMARY_WELL_COMPLETION, "Sum of connection oil flow rates upstream of, and including, this connection" } } );
info.insert( { "CWFRU", { A::SUMMARY_WELL_COMPLETION, "Sum of connection water flow rates upstream of, and including, this connection" } } );
info.insert( { "CGFRU", { A::SUMMARY_WELL_COMPLETION, "Sum of connection gas flow rates upstream of, and including, this connection" } } );
info.insert( { "LCOFRU", { A::SUMMARY_WELL_COMPLETION, "As COFRU but for local grids" } } );
info.insert( { "LCWFRU", { A::SUMMARY_WELL_COMPLETION, "As CWFRU but for local grids" } } );
info.insert( { "LCGFRU", { A::SUMMARY_WELL_COMPLETION, "As CGFRU but for local grids" } } );
@@ -1710,10 +1637,8 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "RRTM", { A::SUMMARY_REGION, "Transmissibility Multiplier associated with rock compaction" } } );
info.insert( { "ROE", { A::SUMMARY_REGION, "(OIP(initial) - OIP(now)) / OIP(initial)" } } );
info.insert( { "ROEW", { A::SUMMARY_REGION, "Oil Production from Wells / OIP(initial)" } } );
info.insert(
{ "ROEIW", { A::SUMMARY_REGION, "(OIP(initial) - OIP(now)) / Initial Mobile Oil with respect to Water" } } );
info.insert(
{ "ROEWW", { A::SUMMARY_REGION, "Oil Production from Wells / Initial Mobile Oil with respect to Water" } } );
info.insert( { "ROEIW", { A::SUMMARY_REGION, "(OIP(initial) - OIP(now)) / Initial Mobile Oil with respect to Water" } } );
info.insert( { "ROEWW", { A::SUMMARY_REGION, "Oil Production from Wells / Initial Mobile Oil with respect to Water" } } );
info.insert( { "ROEIG", { A::SUMMARY_REGION, "(OIP(initial) - OIP(now)) / Initial Mobile Oil with respect to Gas" } } );
info.insert( { "ROEWG", { A::SUMMARY_REGION, "Oil Production from Wells / Initial Mobile Oil with respect to Gas" } } );
info.insert( { "RORMR", { A::SUMMARY_REGION, "Total stock tank oil produced by rock compaction" } } );
@@ -1825,14 +1750,9 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BPCW", { A::SUMMARY_BLOCK, "Water Capillary Pressures" } } );
info.insert( { "BGTRP", { A::SUMMARY_BLOCK, "Trapped gas saturation" } } );
info.insert( { "BGTPD", { A::SUMMARY_BLOCK, "Dynamic trapped gas saturation" } } );
info.insert( { "BGSHY",
{ A::SUMMARY_BLOCK,
"Departure saturation from drainage to imbibition for gas capillary pressure hysteresis" } } );
info.insert(
{ "BGSTRP", { A::SUMMARY_BLOCK, "Trapped gas critical saturation for gas capillary pressure hysteresis" } } );
info.insert( { "BWSHY",
{ A::SUMMARY_BLOCK,
"Departure saturation from drainage to imbibition for water capillary pressure hysteresis" } } );
info.insert( { "BGSHY", { A::SUMMARY_BLOCK, "Departure saturation from drainage to imbibition for gas capillary pressure hysteresis" } } );
info.insert( { "BGSTRP", { A::SUMMARY_BLOCK, "Trapped gas critical saturation for gas capillary pressure hysteresis" } } );
info.insert( { "BWSHY", { A::SUMMARY_BLOCK, "Departure saturation from drainage to imbibition for water capillary pressure hysteresis" } } );
info.insert( { "BWSMA", { A::SUMMARY_BLOCK, "Maximum wetting saturation for water capillary pressure hysteresis" } } );
info.insert( { "BMLSC", { A::SUMMARY_BLOCK, "Hydrocarbon molar density" } } );
info.insert( { "BMLST", { A::SUMMARY_BLOCK, "Total hydrocarbon molar density" } } );
@@ -1844,8 +1764,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BAMF", { A::SUMMARY_BLOCK, "Component aqueous mole fraction" } } );
info.insert( { "BXMF", { A::SUMMARY_BLOCK, "Liquid hydrocarbon component mole fraction" } } );
info.insert( { "BYMF", { A::SUMMARY_BLOCK, "Vapor hydrocarbon component mole fraction / vapor steam" } } );
info.insert(
{ "BSMF", { A::SUMMARY_BLOCK, "CO2STORE with SOLID option only Solid hydrocarbon component mole fraction" } } );
info.insert( { "BSMF", { A::SUMMARY_BLOCK, "CO2STORE with SOLID option only Solid hydrocarbon component mole fraction" } } );
info.insert( { "BSTEN", { A::SUMMARY_BLOCK, "Surface Tension" } } );
info.insert( { "BFMISC", { A::SUMMARY_BLOCK, "Miscibility Factor" } } );
info.insert( { "BREAC", { A::SUMMARY_BLOCK, "Reaction rate. The reaction number is given as a component index" } } );
@@ -1853,21 +1772,15 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BHDF", { A::SUMMARY_BLOCK, "Hydraulic head at fresh water conditions" } } );
info.insert( { "BPR_X", { A::SUMMARY_BLOCK, "Pressure interpolated at a defined coordinate" } } );
info.insert( { "BHD_X", { A::SUMMARY_BLOCK, "Hydraulic head interpolated at a defined coordinate" } } );
info.insert( { "BHDF_X",
{ A::SUMMARY_BLOCK, "Hydraulic head at fresh water conditions interpolated at a defined coordinate" } } );
info.insert( { "BHDF_X", { A::SUMMARY_BLOCK, "Hydraulic head at fresh water conditions interpolated at a defined coordinate" } } );
info.insert( { "BSCN_X", { A::SUMMARY_BLOCK, "Brine concentration interpolated at a defined coordinate" } } );
info.insert( { "BCTRA_X", { A::SUMMARY_BLOCK, "Tracer concentration interpolated at a defined coordinate" } } );
info.insert( { "LBPR_X", { A::SUMMARY_BLOCK, "Pressure interpolated at a defined coordinate within a local grid" } } );
info.insert(
{ "LBHD_X", { A::SUMMARY_BLOCK, "Hydraulic head interpolated at a defined coordinate within a local grid" } } );
info.insert(
{ "LBHDF_X",
{ A::SUMMARY_BLOCK,
"Hydraulic head at freshwater conditions interpolated at a defined coordinate within a local grid" } } );
info.insert( { "LBSCN_X",
{ A::SUMMARY_BLOCK, "Brine concentration interpolated at a defined coordinate within a local grid" } } );
info.insert( { "LBCTRA_X",
{ A::SUMMARY_BLOCK, "Tracer concentration interpolated at a defined coordinate within a local grid" } } );
info.insert( { "LBHD_X", { A::SUMMARY_BLOCK, "Hydraulic head interpolated at a defined coordinate within a local grid" } } );
info.insert( { "LBHDF_X",
{ A::SUMMARY_BLOCK, "Hydraulic head at freshwater conditions interpolated at a defined coordinate within a local grid" } } );
info.insert( { "LBSCN_X", { A::SUMMARY_BLOCK, "Brine concentration interpolated at a defined coordinate within a local grid" } } );
info.insert( { "LBCTRA_X", { A::SUMMARY_BLOCK, "Tracer concentration interpolated at a defined coordinate within a local grid" } } );
info.insert( { "BOKRX", { A::SUMMARY_BLOCK, "Oil relative permeability in the X direction" } } );
info.insert( { "BOKRX", { A::SUMMARY_BLOCK, "- Oil relative permeability in the -X direction" } } );
info.insert( { "BOKRY", { A::SUMMARY_BLOCK, "Oil relative permeability in the Y direction" } } );
@@ -1924,18 +1837,12 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BHPV", { A::SUMMARY_BLOCK, "Pore Volume containing Hydrocarbon" } } );
info.insert( { "BRTM", { A::SUMMARY_BLOCK, "Transmissibility Multiplier associated with rock compaction" } } );
info.insert( { "BPERMMOD", { A::SUMMARY_BLOCK, "Transmissibility Multiplier associated with rock compaction" } } );
info.insert(
{ "BPERMMDX",
{ A::SUMMARY_BLOCK,
"Directional Transmissibility Multipliers in the X direction, associated with rock compaction" } } );
info.insert(
{ "BPERMMDY",
{ A::SUMMARY_BLOCK,
"Directional Transmissibility Multipliers in the Y direction, associated with rock compaction" } } );
info.insert(
{ "BPERMMDZ",
{ A::SUMMARY_BLOCK,
"Directional Transmissibility Multipliers in the Z direction, associated with rock compaction" } } );
info.insert( { "BPERMMDX",
{ A::SUMMARY_BLOCK, "Directional Transmissibility Multipliers in the X direction, associated with rock compaction" } } );
info.insert( { "BPERMMDY",
{ A::SUMMARY_BLOCK, "Directional Transmissibility Multipliers in the Y direction, associated with rock compaction" } } );
info.insert( { "BPERMMDZ",
{ A::SUMMARY_BLOCK, "Directional Transmissibility Multipliers in the Z direction, associated with rock compaction" } } );
info.insert( { "BPORVMOD", { A::SUMMARY_BLOCK, "Pore Volume Multiplier associated with rock compaction" } } );
info.insert( { "BSIGMMOD", { A::SUMMARY_BLOCK, "Dual Porosity Sigma Multiplier associated with rock compaction" } } );
info.insert( { "BTCNF", { A::SUMMARY_BLOCK, "Tracer Concentration" } } );
@@ -1985,13 +1892,11 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BEMVIS", { A::SUMMARY_BLOCK, "Effective mixture" } } );
info.insert( { "BEWV_POL", { A::SUMMARY_BLOCK, "Effective water viscosity" } } );
info.insert( { "BCAD", { A::SUMMARY_BLOCK, "Polymer Adsorption concentration" } } );
info.insert(
{ "BCDCS", { A::SUMMARY_BLOCK, "Polymer thermal degradation - total mass degraded in previous timestep" } } );
info.insert( { "BCDCS", { A::SUMMARY_BLOCK, "Polymer thermal degradation - total mass degraded in previous timestep" } } );
info.insert( { "BCDCR", { A::SUMMARY_BLOCK, "Polymer thermal degradation - total degradation rate" } } );
info.insert( { "BCDCP", { A::SUMMARY_BLOCK, "Polymer thermal degradation solution degradation rate" } } );
info.insert( { "BCDCA", { A::SUMMARY_BLOCK, "Polymer thermal degradation adsorbed degradation rate" } } );
info.insert( { "BCABnnn",
{ A::SUMMARY_BLOCK, "Adsorbed polymer by highest temperature band at which RRF was calculated" } } );
info.insert( { "BCABnnn", { A::SUMMARY_BLOCK, "Adsorbed polymer by highest temperature band at which RRF was calculated" } } );
info.insert( { "BSCN", { A::SUMMARY_BLOCK, "Salt Cell Concentration" } } );
info.insert( { "BSIP", { A::SUMMARY_BLOCK, "Salt In Place" } } );
info.insert( { "BFLOW0I",
@@ -2006,36 +1911,21 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
{ A::SUMMARY_BLOCK,
"Inter-block water flow rate in the positive K direction multiplied by the "
"corresponding shear multiplier" } } );
info.insert(
{ "BVELW0I",
{ A::SUMMARY_BLOCK,
"Water velocity in the positive I direction multiplied by the corresponding shear multiplier" } } );
info.insert(
{ "BVELW0J",
{ A::SUMMARY_BLOCK,
"Water velocity in the positive J direction multiplied by the corresponding shear multiplier" } } );
info.insert(
{ "BVELW0K",
{ A::SUMMARY_BLOCK,
"Water velocity in the positive K direction multiplied by the corresponding shear multiplier" } } );
info.insert( { "BPSHLZI",
{ A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive I direction" } } );
info.insert( { "BPSHLZJ",
{ A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive J direction" } } );
info.insert( { "BPSHLZK",
{ A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive K direction" } } );
info.insert(
{ "BSRTW0I", { A::SUMMARY_BLOCK, "Water shear rate in the positive I direction prior to shear effects" } } );
info.insert(
{ "BSRTW0J", { A::SUMMARY_BLOCK, "Water shear rate in the positive J direction prior to shear effects" } } );
info.insert(
{ "BSRTW0K", { A::SUMMARY_BLOCK, "Water shear rate in the positive K direction prior to shear effects" } } );
info.insert(
{ "BSRTWI", { A::SUMMARY_BLOCK, "Water shear rate in the positive I direction following shear effects" } } );
info.insert(
{ "BSRTWJ", { A::SUMMARY_BLOCK, "Water shear rate in the positive J direction following shear effects" } } );
info.insert(
{ "BSRTWK", { A::SUMMARY_BLOCK, "Water shear rate in the positive K direction following shear effects" } } );
info.insert( { "BVELW0I",
{ A::SUMMARY_BLOCK, "Water velocity in the positive I direction multiplied by the corresponding shear multiplier" } } );
info.insert( { "BVELW0J",
{ A::SUMMARY_BLOCK, "Water velocity in the positive J direction multiplied by the corresponding shear multiplier" } } );
info.insert( { "BVELW0K",
{ A::SUMMARY_BLOCK, "Water velocity in the positive K direction multiplied by the corresponding shear multiplier" } } );
info.insert( { "BPSHLZI", { A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive I direction" } } );
info.insert( { "BPSHLZJ", { A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive J direction" } } );
info.insert( { "BPSHLZK", { A::SUMMARY_BLOCK, "Viscosity multiplier due to sheared water flow in the positive K direction" } } );
info.insert( { "BSRTW0I", { A::SUMMARY_BLOCK, "Water shear rate in the positive I direction prior to shear effects" } } );
info.insert( { "BSRTW0J", { A::SUMMARY_BLOCK, "Water shear rate in the positive J direction prior to shear effects" } } );
info.insert( { "BSRTW0K", { A::SUMMARY_BLOCK, "Water shear rate in the positive K direction prior to shear effects" } } );
info.insert( { "BSRTWI", { A::SUMMARY_BLOCK, "Water shear rate in the positive I direction following shear effects" } } );
info.insert( { "BSRTWJ", { A::SUMMARY_BLOCK, "Water shear rate in the positive J direction following shear effects" } } );
info.insert( { "BSRTWK", { A::SUMMARY_BLOCK, "Water shear rate in the positive K direction following shear effects" } } );
info.insert( { "BSHWVISI",
{ A::SUMMARY_BLOCK,
"Shear viscosity of the water/polymer solution due to shear thinning/thickening in "
@@ -2069,30 +1959,18 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BKRGOE", { A::SUMMARY_BLOCK, "Equivalent relative permeability to gas for gas-oil system" } } );
info.insert( { "BKRGWE", { A::SUMMARY_BLOCK, "Equivalent relative permeability to gas for gas-water system" } } );
info.insert( { "BKRWGE", { A::SUMMARY_BLOCK, "Equivalent relative permeability to water for water-gas system" } } );
info.insert( { "BKROWT",
{ A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to oil for oil-water system" } } );
info.insert( { "BKRWOT",
{ A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to water for water-oil system" } } );
info.insert(
{ "BKROWT",
{ A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to oil for oil-water system" } } );
{ "BKROGT", { A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to oil for oil-gas system" } } );
info.insert(
{ "BKRWOT",
{ A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to water for water-oil system" } } );
info.insert(
{ "BKROGT",
{ A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to oil for oil-gas system" } } );
info.insert(
{ "BKRGOT",
{ A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to gas for gas-oil system" } } );
info.insert(
{ "BKRGWT",
{ A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to gas for gas-water system" } } );
info.insert(
{ "BKRWGT",
{ A::SUMMARY_BLOCK,
"Opposite saturation direction turning point relative permeability to water for water-gas system" } } );
{ "BKRGOT", { A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to gas for gas-oil system" } } );
info.insert( { "BKRGWT",
{ A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to gas for gas-water system" } } );
info.insert( { "BKRWGT",
{ A::SUMMARY_BLOCK, "Opposite saturation direction turning point relative permeability to water for water-gas system" } } );
info.insert( { "BIFTOW", { A::SUMMARY_BLOCK, "Oil-water interfacial tension" } } );
info.insert( { "BIFTWO", { A::SUMMARY_BLOCK, "Water-oil interfacial tension" } } );
info.insert( { "BIFTOG", { A::SUMMARY_BLOCK, "Oil-gas interfacial tension" } } );
@@ -2307,8 +2185,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BPCOIL" + suffix, { A::SUMMARY_BLOCK, "Oil Capillary Pressure" + descadd } } );
info.insert( { "BPCOW" + suffix, { A::SUMMARY_BLOCK, "Oil-Water Capillary Pressure" + descadd } } );
info.insert( { "BPCWAT" + suffix, { A::SUMMARY_BLOCK, "Water Capillary Pressure" + descadd } } );
info.insert( { "BPMODHYS" + suffix,
{ A::SUMMARY_BLOCK, "Dynamic Pmod Hysteresis Curve Type (1/2/3=B/S/P)" + descadd } } );
info.insert( { "BPMODHYS" + suffix, { A::SUMMARY_BLOCK, "Dynamic Pmod Hysteresis Curve Type (1/2/3=B/S/P)" + descadd } } );
info.insert( { "BPR" + suffix, { A::SUMMARY_BLOCK, "Pressure" + descadd } } );
info.insert( { "BRS" + suffix, { A::SUMMARY_BLOCK, "Gas Rs" + descadd } } );
info.insert( { "BRV" + suffix, { A::SUMMARY_BLOCK, "Gas Rv" + descadd } } );
@@ -2318,8 +2195,7 @@ std::unordered_map<std::string, RiuSummaryQuantityNameInfoProvider::RiuSummaryQu
info.insert( { "BSRVSTAT" + suffix, { A::SUMMARY_BLOCK, "Srv Status (1/2/3=Stim/Sigprop/Propprop)" + descadd } } );
info.insert( { "BSTRAIN" + suffix, { A::SUMMARY_BLOCK, "Volumetric Strain" + descadd } } );
info.insert( { "BSTRESS" + suffix, { A::SUMMARY_BLOCK, "Mean Normal Stress" + descadd } } );
info.insert(
{ "BSTRESSA" + suffix, { A::SUMMARY_BLOCK, "Mean Normal Stress Idealised Analytic Solution" + descadd } } );
info.insert( { "BSTRESSA" + suffix, { A::SUMMARY_BLOCK, "Mean Normal Stress Idealised Analytic Solution" + descadd } } );
info.insert( { "BSTRESSN" + suffix, { A::SUMMARY_BLOCK, "Net Stress" + descadd } } );
info.insert( { "BVISCGAS" + suffix, { A::SUMMARY_BLOCK, "Gas Viscosity" + descadd } } );
info.insert( { "BVISCOIL" + suffix, { A::SUMMARY_BLOCK, "Oil Viscosity" + descadd } } );

View File

@@ -56,9 +56,8 @@ private:
private:
RiuSummaryQuantityNameInfoProvider();
RiuSummaryQuantityInfo quantityInfo( const std::string& vectorName, bool exactMatch = false ) const;
RifEclipseSummaryAddress::SummaryVarCategory categoryFromVectorName( const std::string& vectorName,
bool exactMatch = false ) const;
RiuSummaryQuantityInfo quantityInfo( const std::string& vectorName, bool exactMatch = false ) const;
RifEclipseSummaryAddress::SummaryVarCategory categoryFromVectorName( const std::string& vectorName, bool exactMatch = false ) const;
static std::unordered_map<std::string, RiuSummaryQuantityInfo> createInfoForEclipseKeywords();
static std::unordered_map<std::string, RiuSummaryQuantityInfo> createInfoFor6xKeywords();

View File

@@ -47,11 +47,10 @@ public:
RiuSummaryQwtPlot( RimSummaryPlot* plot, QWidget* parent = nullptr );
~RiuSummaryQwtPlot() override;
void useDateBasedTimeAxis(
const QString& dateFormat,
const QString& timeFormat,
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_UNSPECIFIED,
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_UNSPECIFIED ) override;
void useDateBasedTimeAxis( const QString& dateFormat,
const QString& timeFormat,
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_UNSPECIFIED,
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_UNSPECIFIED ) override;
void useTimeBasedTimeAxis() override;

View File

@@ -37,8 +37,7 @@
RiuSummaryVectorSelectionDialog::RiuSummaryVectorSelectionDialog( QWidget* parent )
: QDialog( parent, RiuTools::defaultDialogFlags() )
{
m_addrSelWidget =
std::unique_ptr<RiuSummaryVectorSelectionWidgetCreator>( new RiuSummaryVectorSelectionWidgetCreator() );
m_addrSelWidget = std::unique_ptr<RiuSummaryVectorSelectionWidgetCreator>( new RiuSummaryVectorSelectionWidgetCreator() );
QWidget* addrWidget = m_addrSelWidget->getOrCreateWidget( this );
QVBoxLayout* mainLayout = new QVBoxLayout( this );
@@ -76,8 +75,7 @@ RiuSummaryVectorSelectionDialog::~RiuSummaryVectorSelectionDialog()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionDialog::setCaseAndAddress( RimSummaryCase* summaryCase,
const RifEclipseSummaryAddress& address )
void RiuSummaryVectorSelectionDialog::setCaseAndAddress( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& address )
{
if ( summaryCase )
{
@@ -96,8 +94,7 @@ void RiuSummaryVectorSelectionDialog::setCaseAndAddress( RimSummaryCase*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionDialog::setEnsembleAndAddress( RimSummaryCaseCollection* ensemble,
const RifEclipseSummaryAddress& address )
void RiuSummaryVectorSelectionDialog::setEnsembleAndAddress( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& address )
{
if ( ensemble )
{

View File

@@ -166,16 +166,12 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
CAF_PDM_InitFieldNoDefault( &m_currentSummaryCategory, "CurrentSummaryCategory", "Current Summary Category" );
CAF_PDM_InitFieldNoDefault( &m_selectedSummaryCategories, "SelectedSummaryCategories", "Summary Categories" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][0]->pdmField(),
"FieldVectors",
"Field vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][0]->pdmField(), "FieldVectors", "Field vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][1]->pdmField(),
"FieldCalculationIds",
"Calculation Ids" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(),
"Aquifers",
"Aquifers" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(), "Aquifers", "Aquifers" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField(),
"AquiferVectors",
"Aquifer Vectors" );
@@ -190,16 +186,12 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
"NetworkCalculationIds",
"Calculation Ids" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_MISC][0]->pdmField(),
"MiscVectors",
"Misc Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_MISC][0]->pdmField(), "MiscVectors", "Misc Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_MISC][1]->pdmField(),
"MiscCalculationIds",
"Calculation Ids" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][0]->pdmField(),
"Regions",
"Regions" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][0]->pdmField(), "Regions", "Regions" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_REGION][1]->pdmField(),
"RegionsVectors",
"Regions Vectors" );
@@ -227,12 +219,8 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
"WellGroupCalculationIds",
"Calculation Ids" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][0]->pdmField(),
"WellWellName",
"Wells" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][1]->pdmField(),
"WellVectors",
"Well Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][0]->pdmField(), "WellWellName", "Wells" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][1]->pdmField(), "WellVectors", "Well Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL][2]->pdmField(),
"WellCalculationIds",
"Calculation Ids" );
@@ -266,15 +254,9 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
"WellCompletionLgrCalculationIds",
"Calculation Ids" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][0]->pdmField(),
"WellLgrLgrName",
"LGR Names" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][1]->pdmField(),
"WellLgrWellName",
"Wells" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][2]->pdmField(),
"WellLgrVectors",
"Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][0]->pdmField(), "WellLgrLgrName", "LGR Names" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][1]->pdmField(), "WellLgrWellName", "Wells" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][2]->pdmField(), "WellLgrVectors", "Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_WELL_LGR][3]->pdmField(),
"WellLgrCalculationIds",
"Calculation Ids" );
@@ -292,12 +274,8 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
"WellSegmentCalculationIds",
"Calculation Ids" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][0]->pdmField(),
"BlockIjk",
"Cell IJK" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][1]->pdmField(),
"BlockVectors",
"Block Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][0]->pdmField(), "BlockIjk", "Cell IJK" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][1]->pdmField(), "BlockVectors", "Block Vectors" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK][2]->pdmField(),
"BlockCalculationIds",
"Calculation Ids" );
@@ -305,9 +283,7 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][0]->pdmField(),
"BlockLgrLgrName",
"LGR Names" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][1]->pdmField(),
"BlockLgrIjk",
"Cell IJK" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][1]->pdmField(), "BlockLgrIjk", "Cell IJK" );
CAF_PDM_InitFieldNoDefault( m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR][2]->pdmField(),
"BlockLgrVectors",
"Block Vectors" );
@@ -326,11 +302,10 @@ RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
{
for ( const auto& itemInputType : itemTypes.second )
{
itemInputType->pdmField()->uiCapability()->setUiEditorTypeName(
caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
itemInputType->pdmField()->uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
itemInputType->pdmField()->uiCapability()->setUiLabelPosition(
itemTypes.second.size() > 2 ? caf::PdmUiItemInfo::TOP : caf::PdmUiItemInfo::HIDDEN );
itemInputType->pdmField()->uiCapability()->setUiLabelPosition( itemTypes.second.size() > 2 ? caf::PdmUiItemInfo::TOP
: caf::PdmUiItemInfo::HIDDEN );
itemInputType->pdmField()->uiCapability()->setAutoAddingOptionFromValue( false );
}
@@ -602,9 +577,8 @@ void RiuSummaryVectorSelectionUi::setDefaultSelection( const std::vector<Summary
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RiuSummaryVectorSelectionUi::optionsForSummaryDataSource( bool hideSummaryCases,
bool hideEnsembles,
bool showIndividualEnsembleCases )
QList<caf::PdmOptionItemInfo>
RiuSummaryVectorSelectionUi::optionsForSummaryDataSource( bool hideSummaryCases, bool hideEnsembles, bool showIndividualEnsembleCases )
{
QList<caf::PdmOptionItemInfo> options;
@@ -707,8 +681,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
// Select summary category if not already selected
auto& selectedCategories = m_selectedSummaryCategories();
if ( std::find( selectedCategories.begin(), selectedCategories.end(), summaryAddress.category() ) ==
selectedCategories.end() )
if ( std::find( selectedCategories.begin(), selectedCategories.end(), summaryAddress.category() ) == selectedCategories.end() )
{
if ( summaryAddress.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
{
@@ -726,8 +699,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
{
if ( curveDef.ensemble() && !m_hideEnsembles )
{
if ( std::find( m_selectedSources.begin(), m_selectedSources.end(), curveDef.ensemble() ) ==
m_selectedSources.end() )
if ( std::find( m_selectedSources.begin(), m_selectedSources.end(), curveDef.ensemble() ) == m_selectedSources.end() )
{
m_selectedSources.push_back( curveDef.ensemble() );
}
@@ -737,8 +709,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
{
if ( curveDef.summaryCase() && ( !curveDef.ensemble() || m_showIndividualEnsembleCases ) )
{
if ( std::find( m_selectedSources.begin(), m_selectedSources.end(), curveDef.summaryCase() ) ==
m_selectedSources.end() )
if ( std::find( m_selectedSources.begin(), m_selectedSources.end(), curveDef.summaryCase() ) == m_selectedSources.end() )
{
m_selectedSources.push_back( curveDef.summaryCase() );
}
@@ -750,9 +721,8 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
auto identifierAndFieldList = m_identifierFieldsMap[summaryAddress.category()];
for ( const auto& identifierAndField : identifierAndFieldList )
{
bool isVectorField = identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
QString avalue =
QString::fromStdString( summaryAddress.addressComponentUiText( identifierAndField->summaryIdentifier() ) );
bool isVectorField = identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
QString avalue = QString::fromStdString( summaryAddress.addressComponentUiText( identifierAndField->summaryIdentifier() ) );
if ( isVectorField && isObservedDataCase )
{
avalue = avalue + QString( OBSERVED_DATA_AVALUE_POSTFIX );
@@ -765,8 +735,7 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
}
const auto& currentSelectionVector = identifierAndField->pdmField()->v();
if ( std::find( currentSelectionVector.begin(), currentSelectionVector.end(), avalue ) ==
currentSelectionVector.end() )
if ( std::find( currentSelectionVector.begin(), currentSelectionVector.end(), avalue ) == currentSelectionVector.end() )
{
std::vector<QString> newSelectionVector( currentSelectionVector.begin(), currentSelectionVector.end() );
newSelectionVector.push_back( avalue );
@@ -790,12 +759,9 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
if ( changedField != &m_selectedSources && changedField != &m_selectedSummaryCategories &&
changedField != &m_currentSummaryCategory )
if ( changedField != &m_selectedSources && changedField != &m_selectedSummaryCategories && changedField != &m_currentSummaryCategory )
{
RifEclipseSummaryAddress::SummaryVarCategory currentCategory = m_currentSummaryCategory();
if ( currentCategory != RifEclipseSummaryAddress::SUMMARY_INVALID )
@@ -805,9 +771,8 @@ void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* c
if ( newValue.toList().size() > oldValue.toList().size() )
{
if ( std::find( m_selectedSummaryCategories.v().begin(),
m_selectedSummaryCategories.v().end(),
currentCategory ) == m_selectedSummaryCategories.v().end() )
if ( std::find( m_selectedSummaryCategories.v().begin(), m_selectedSummaryCategories.v().end(), currentCategory ) ==
m_selectedSummaryCategories.v().end() )
{
m_selectedSummaryCategories.v().push_back( currentCategory );
}
@@ -818,8 +783,7 @@ void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* c
auto identifierAndFieldList = m_identifierFieldsMap[currentCategory];
for ( const auto identifierAndField : identifierAndFieldList )
{
if ( identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME )
continue;
if ( identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) continue;
auto v = identifierAndField->pdmField()->value();
if ( v.empty() )
@@ -865,8 +829,7 @@ void RiuSummaryVectorSelectionUi::fieldChangedByUi( const caf::PdmFieldHandle* c
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo>
RiuSummaryVectorSelectionUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
QList<caf::PdmOptionItemInfo> RiuSummaryVectorSelectionUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
{
QList<caf::PdmOptionItemInfo> options;
@@ -893,12 +856,10 @@ QList<caf::PdmOptionItemInfo>
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionUi::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 =
uiOrdering.addNewGroupWithKeyword( "Summary Types", RiuSummaryCurveDefinitionKeywords::summaryTypes() );
caf::PdmUiGroup* itemTypesGroup = uiOrdering.addNewGroupWithKeyword( "Summary Types", RiuSummaryCurveDefinitionKeywords::summaryTypes() );
itemTypesGroup->add( &m_selectedSummaryCategories );
caf::PdmField<std::vector<QString>>* summaryiesField = nullptr;
@@ -1031,8 +992,7 @@ void RiuSummaryVectorSelectionUi::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 );
@@ -1044,8 +1004,8 @@ void RiuSummaryVectorSelectionUi::defineUiOrdering( QString uiConfigName, caf::P
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::findPossibleSummaryAddressesFromSelectedCases(
const SummaryIdentifierAndField* identifierAndField ) const
std::set<RifEclipseSummaryAddress>
RiuSummaryVectorSelectionUi::findPossibleSummaryAddressesFromSelectedCases( const SummaryIdentifierAndField* identifierAndField ) const
{
std::vector<SummarySource*> sources;
for ( const auto& source : m_selectedSources.value() )
@@ -1071,8 +1031,8 @@ std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::findPossibleSumm
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::findPossibleSummaryAddressesFromSelectedObservedData(
const SummaryIdentifierAndField* identifierAndField ) const
std::set<RifEclipseSummaryAddress>
RiuSummaryVectorSelectionUi::findPossibleSummaryAddressesFromSelectedObservedData( const SummaryIdentifierAndField* identifierAndField ) const
{
std::vector<SummarySource*> obsData;
for ( const auto& source : m_selectedSources.value() )
@@ -1092,16 +1052,14 @@ std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::findPossibleSumm
//--------------------------------------------------------------------------------------------------
std::set<RifEclipseSummaryAddress>
RiuSummaryVectorSelectionUi::findPossibleSummaryAddresses( const std::vector<SummarySource*>& selectedSources,
const SummaryIdentifierAndField* identifierAndField ) const
const SummaryIdentifierAndField* identifierAndField ) const
{
std::set<RifEclipseSummaryAddress> addrUnion;
auto isVectorField = identifierAndField != nullptr &&
identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
auto controllingIdentifierAndField = identifierAndField != nullptr ? lookupControllingField( identifierAndField )
: nullptr;
if ( !isVectorField && controllingIdentifierAndField != nullptr &&
controllingIdentifierAndField->pdmField()->v().size() == 0 )
auto controllingIdentifierAndField = identifierAndField != nullptr ? lookupControllingField( identifierAndField ) : nullptr;
if ( !isVectorField && controllingIdentifierAndField != nullptr && controllingIdentifierAndField->pdmField()->v().size() == 0 )
{
return addrUnion;
}
@@ -1123,8 +1081,7 @@ std::set<RifEclipseSummaryAddress>
allAddresses = currEnsemble->ensembleSummaryAddresses();
}
bool applySelections = identifierAndField == nullptr ||
( !isVectorField && controllingIdentifierAndField != nullptr );
bool applySelections = identifierAndField == nullptr || ( !isVectorField && controllingIdentifierAndField != nullptr );
std::vector<SummaryIdentifierAndField*> controllingFields;
if ( applySelections )
{
@@ -1136,9 +1093,7 @@ std::set<RifEclipseSummaryAddress>
{
if ( address.category() == m_currentSummaryCategory() )
{
bool addressSelected = applySelections
? isAddressCompatibleWithControllingFieldSelection( address, controllingFields )
: true;
bool addressSelected = applySelections ? isAddressCompatibleWithControllingFieldSelection( address, controllingFields ) : true;
if ( addressSelected )
{
addrUnion.insert( address );
@@ -1190,7 +1145,7 @@ std::vector<SummaryIdentifierAndField*>
RiuSummaryVectorSelectionUi::buildControllingFieldList( const SummaryIdentifierAndField* identifierAndField ) const
{
std::vector<SummaryIdentifierAndField*> controllingFields;
const auto& identifierAndFieldList = m_identifierFieldsMap.at( m_currentSummaryCategory() );
const auto& identifierAndFieldList = m_identifierFieldsMap.at( m_currentSummaryCategory() );
for ( const auto& identifierAndFieldItem : identifierAndFieldList )
{
if ( identifierAndFieldItem == identifierAndField )
@@ -1205,8 +1160,7 @@ std::vector<SummaryIdentifierAndField*>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
SummaryIdentifierAndField*
RiuSummaryVectorSelectionUi::lookupIdentifierAndFieldFromFieldHandle( const caf::PdmFieldHandle* pdmFieldHandle ) const
SummaryIdentifierAndField* RiuSummaryVectorSelectionUi::lookupIdentifierAndFieldFromFieldHandle( const caf::PdmFieldHandle* pdmFieldHandle ) const
{
for ( const auto& itemTypes : m_identifierFieldsMap )
{
@@ -1226,8 +1180,7 @@ SummaryIdentifierAndField*
/// Controlling means the field controlling the dependent field
/// If the specified pdm field info is the topmost (i.e. index is 0), nullptr is returned
//--------------------------------------------------------------------------------------------------
SummaryIdentifierAndField*
RiuSummaryVectorSelectionUi::lookupControllingField( const SummaryIdentifierAndField* dependentField ) const
SummaryIdentifierAndField* RiuSummaryVectorSelectionUi::lookupControllingField( const SummaryIdentifierAndField* dependentField ) const
{
for ( const auto& identifierAndFieldList : m_identifierFieldsMap )
{
@@ -1256,8 +1209,7 @@ bool RiuSummaryVectorSelectionUi::isAddressCompatibleWithControllingFieldSelecti
bool match = false;
for ( const auto& selectedText : identifierAndField->pdmField()->v() )
{
if ( QString::compare( QString::fromStdString(
address.addressComponentUiText( identifierAndField->summaryIdentifier() ) ),
if ( QString::compare( QString::fromStdString( address.addressComponentUiText( identifierAndField->summaryIdentifier() ) ),
selectedText ) == 0 )
{
match = true;
@@ -1282,8 +1234,7 @@ std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::buildAddressList
std::set<RifEclipseSummaryAddress> addressSet;
for ( const auto& category : m_selectedSummaryCategories() )
{
if ( m_identifierFieldsMap.at( category ).size() == 0 ||
category == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID )
if ( m_identifierFieldsMap.at( category ).size() == 0 || category == RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_INVALID )
continue;
const auto& identifierAndFieldList = m_identifierFieldsMap.at( category );
@@ -1421,8 +1372,7 @@ std::vector<SummarySource*> RiuSummaryVectorSelectionUi::selectedSummarySources(
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionUi::appendOptionItemsForSources( QList<caf::PdmOptionItemInfo>& options ) const
{
auto dataSourceOptions =
optionsForSummaryDataSource( m_hideSummaryCases, m_hideEnsembles, m_showIndividualEnsembleCases );
auto dataSourceOptions = optionsForSummaryDataSource( m_hideSummaryCases, m_hideEnsembles, m_showIndividualEnsembleCases );
for ( auto& o : dataSourceOptions )
{
@@ -1471,7 +1421,7 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForCategories( QList<caf::Pdm
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionUi::appendOptionItemsForSubCategoriesAndVectors( QList<caf::PdmOptionItemInfo>& options,
SummaryIdentifierAndField* identifierAndField ) const
SummaryIdentifierAndField* identifierAndField ) const
{
if ( identifierAndField == nullptr ) return;
@@ -1572,8 +1522,7 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForSubCategoriesAndVectors( Q
if ( isVectorField )
{
std::string longVectorName =
RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( itemName );
std::string longVectorName = RiuSummaryQuantityNameInfoProvider::instance()->longNameFromVectorName( itemName );
if ( longVectorName.empty() )
{

View File

@@ -53,7 +53,7 @@ public:
RiuSummaryVectorSelectionUi();
~RiuSummaryVectorSelectionUi() override;
void setSelectedCurveDefinitions( const std::vector<RiaSummaryCurveDefinition>& curveDefinitions );
void setSelectedCurveDefinitions( const std::vector<RiaSummaryCurveDefinition>& curveDefinitions );
std::vector<RiaSummaryCurveDefinition> allCurveDefinitionsFromSelection() const;
std::vector<RiaCurveSetDefinition> allCurveSetDefinitionsFromSelections() const;
std::vector<RiaSummaryCurveDefinition> selection() const;
@@ -76,35 +76,28 @@ public:
optionsForSummaryDataSource( bool hideSummaryCases, bool hideEnsembles, bool showIndividualEnsembleCases );
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 ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
std::set<RifEclipseSummaryAddress>
findPossibleSummaryAddresses( const std::vector<SummarySource*>& selectedSources,
const SummaryIdentifierAndField* identifierAndField ) const;
std::set<RifEclipseSummaryAddress>
findPossibleSummaryAddressesFromSelectedCases( const SummaryIdentifierAndField* identifierAndField ) const;
std::set<RifEclipseSummaryAddress> findPossibleSummaryAddresses( const std::vector<SummarySource*>& selectedSources,
const SummaryIdentifierAndField* identifierAndField ) const;
std::set<RifEclipseSummaryAddress> findPossibleSummaryAddressesFromSelectedCases( const SummaryIdentifierAndField* identifierAndField ) const;
std::set<RifEclipseSummaryAddress>
findPossibleSummaryAddressesFromSelectedObservedData( const SummaryIdentifierAndField* identifierAndField ) const;
std::vector<SummaryIdentifierAndField*>
buildControllingFieldList( const SummaryIdentifierAndField* identifierAndField ) const;
SummaryIdentifierAndField* lookupIdentifierAndFieldFromFieldHandle( const caf::PdmFieldHandle* pdmFieldHandle ) const;
SummaryIdentifierAndField* lookupControllingField( const SummaryIdentifierAndField* dependentField ) const;
bool isAddressCompatibleWithControllingFieldSelection(
const RifEclipseSummaryAddress& address,
const std::vector<SummaryIdentifierAndField*>& identifierAndFieldList ) const;
std::vector<SummaryIdentifierAndField*> buildControllingFieldList( const SummaryIdentifierAndField* identifierAndField ) const;
SummaryIdentifierAndField* lookupIdentifierAndFieldFromFieldHandle( const caf::PdmFieldHandle* pdmFieldHandle ) const;
SummaryIdentifierAndField* lookupControllingField( const SummaryIdentifierAndField* dependentField ) const;
bool isAddressCompatibleWithControllingFieldSelection( const RifEclipseSummaryAddress& address,
const std::vector<SummaryIdentifierAndField*>& identifierAndFieldList ) const;
std::set<RifEclipseSummaryAddress> buildAddressListFromSelections() const;
void buildAddressListForCategoryRecursively(
RifEclipseSummaryAddress::SummaryVarCategory category,
std::vector<SummaryIdentifierAndField*>::const_iterator identifierAndFieldItr,
std::vector<std::pair<RifEclipseSummaryAddress::SummaryIdentifierType, QString>>& identifierPath,
std::set<RifEclipseSummaryAddress>& addressSet ) const;
void buildAddressListForCategoryRecursively( RifEclipseSummaryAddress::SummaryVarCategory category,
std::vector<SummaryIdentifierAndField*>::const_iterator identifierAndFieldItr,
std::vector<std::pair<RifEclipseSummaryAddress::SummaryIdentifierType, QString>>& identifierPath,
std::set<RifEclipseSummaryAddress>& addressSet ) const;
void resetAllFields();
bool isObservedData( const RimSummaryCase* sumCase ) const;

View File

@@ -59,9 +59,8 @@ RiuSummaryVectorSelectionUi* RiuSummaryVectorSelectionWidgetCreator::summaryAddr
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionWidgetCreator::recursivelyConfigureAndUpdateTopLevelUiOrdering(
const caf::PdmUiOrdering& topLevelUiOrdering,
const QString& uiConfigName )
void RiuSummaryVectorSelectionWidgetCreator::recursivelyConfigureAndUpdateTopLevelUiOrdering( const caf::PdmUiOrdering& topLevelUiOrdering,
const QString& uiConfigName )
{
if ( !m_firstRowLeftLayout || !m_firstRowRightLayout ) return;
@@ -142,10 +141,10 @@ QWidget* RiuSummaryVectorSelectionWidgetCreator::createWidget( QWidget* parent )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryVectorSelectionWidgetCreator::configureAndUpdateFields( int widgetStartIndex,
QBoxLayout* layout,
void RiuSummaryVectorSelectionWidgetCreator::configureAndUpdateFields( int widgetStartIndex,
QBoxLayout* layout,
const std::vector<caf::PdmUiItem*>& uiItems,
const QString& uiConfigName )
const QString& uiConfigName )
{
int currentWidgetIndex = widgetStartIndex;
@@ -211,8 +210,7 @@ void RiuSummaryVectorSelectionWidgetCreator::configureAndUpdateFields( int
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QMinimizePanel* RiuSummaryVectorSelectionWidgetCreator::createGroupBoxWithContent( caf::PdmUiGroup* group,
const QString& uiConfigName )
QMinimizePanel* RiuSummaryVectorSelectionWidgetCreator::createGroupBoxWithContent( caf::PdmUiGroup* group, const QString& uiConfigName )
{
QMinimizePanel* groupBox = findOrCreateGroupBox( this->widget(), group, uiConfigName );

View File

@@ -52,8 +52,7 @@ public:
RiuSummaryVectorSelectionUi* summaryAddressSelection() const;
private:
void recursivelyConfigureAndUpdateTopLevelUiOrdering( const caf::PdmUiOrdering& topLevelUiOrdering,
const QString& uiConfigName ) override;
void recursivelyConfigureAndUpdateTopLevelUiOrdering( const caf::PdmUiOrdering& topLevelUiOrdering, const QString& uiConfigName ) override;
QWidget* createWidget( QWidget* parent ) override;

View File

@@ -51,8 +51,8 @@ QSize RiuTextContentFrame::sizeHint() const
layoutInfo( &layout );
QFontMetrics fontMetrics( this->font() );
QRect titleRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_title );
QRect textRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_text );
QRect titleRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_title );
QRect textRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_text );
int preferredContentHeight = titleRect.height() + layout.lineSpacing + textRect.height();
int preferredHeight = preferredContentHeight + layout.margins.top() + layout.margins.bottom();
@@ -74,13 +74,13 @@ QSize RiuTextContentFrame::minimumSizeHint() const
QFont titleFont = this->font();
titleFont.setBold( true );
QFontMetrics fontMetrics( titleFont );
QRect titleRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_title );
fontMetrics = QFontMetrics( this->font() );
QRect textRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_text );
QRect titleRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_title );
fontMetrics = QFontMetrics( this->font() );
QRect textRect = fontMetrics.boundingRect( QRect( 0, 0, 2000, 200 ), Qt::AlignLeft | Qt::TextWordWrap, m_text );
int preferredContentHeight = titleRect.height() + layout.lineSpacing + textRect.height();
int preferredHeight = preferredContentHeight + layout.margins.top() + layout.margins.bottom();
int preferredWidth = std::max( titleRect.width(), textRect.width() ) + layout.margins.left() + layout.margins.right();
int preferredWidth = std::max( titleRect.width(), textRect.width() ) + layout.margins.left() + layout.margins.right();
preferredWidth = std::min( preferredWidth, 2000 );
@@ -112,9 +112,8 @@ void RiuTextContentFrame::renderTo( QPainter* painter, const QRect& targetRect )
td.setDocumentMargin( 0.0 );
td.setDefaultFont( this->font() );
QString formattedTitle = m_title;
td.setHtml( QString( "<body><font color='%1' ><b>%2</b></font></body>" )
.arg( textColor.name() )
.arg( formattedTitle.replace( "\n", "<br />" ) ) );
td.setHtml(
QString( "<body><font color='%1' ><b>%2</b></font></body>" ).arg( textColor.name() ).arg( formattedTitle.replace( "\n", "<br />" ) ) );
td.drawContents( painter );
painter->restore();
}
@@ -128,9 +127,8 @@ void RiuTextContentFrame::renderTo( QPainter* painter, const QRect& targetRect )
td.setDocumentMargin( 0.0 );
td.setDefaultFont( this->font() );
QString formattedTitle = m_text;
td.setHtml( QString( "<body><font color='%1'>%2</font></body>" )
.arg( textColor.name() )
.arg( formattedTitle.replace( "\n", "<br />" ) ) );
td.setHtml(
QString( "<body><font color='%1'>%2</font></body>" ).arg( textColor.name() ).arg( formattedTitle.replace( "\n", "<br />" ) ) );
td.drawContents( painter );
painter->restore();

View File

@@ -115,7 +115,7 @@ void RiuQPlainTextEdit::slotExportToFile()
if ( dialog )
{
QString defaultDir = RicAsciiExportSummaryPlotFeature::defaultExportDir();
auto fileName = RicAsciiExportSummaryPlotFeature::getFileNameFromUserDialog( dialog->description(), defaultDir );
auto fileName = RicAsciiExportSummaryPlotFeature::getFileNameFromUserDialog( dialog->description(), defaultDir );
RicAsciiExportSummaryPlotFeature::exportTextToFile( fileName, this->toPlainText() );
}
}
@@ -279,8 +279,7 @@ RiuQPlainTextEdit* RiuTabbedTextDialog::currentTextEdit() const
void RiuTabbedTextDialog::updateTabText()
{
auto currIndex = m_tabWidget->currentIndex();
if ( m_textProvider && m_textProvider->isValid() &&
m_tabWidget->tabText( currIndex ) == m_textProvider->tabTitle( currIndex ) )
if ( m_textProvider && m_textProvider->isValid() && m_tabWidget->tabText( currIndex ) == m_textProvider->tabTitle( currIndex ) )
{
m_tabTexts[currIndex] = m_textProvider->tabText( currIndex );
}

View File

@@ -97,16 +97,14 @@ void TextEditWithCompletion::keyPressEvent( QKeyEvent* e )
if ( !m_completer || !isShortcut ) // do not process the shortcut when we have a completer
QTextEdit::keyPressEvent( e );
const bool ctrlOrShift = e->modifiers().testFlag( Qt::ControlModifier ) ||
e->modifiers().testFlag( Qt::ShiftModifier );
const bool ctrlOrShift = e->modifiers().testFlag( Qt::ControlModifier ) || e->modifiers().testFlag( Qt::ShiftModifier );
if ( !m_completer || ( ctrlOrShift && e->text().isEmpty() ) ) return;
static QString eow( "~!@#$%^&*()_+{}|:\"<>?,./;'[]\\-=" ); // end of word
const bool hasModifier = ( e->modifiers() != Qt::NoModifier ) && !ctrlOrShift;
QString completionPrefix = textUnderCursor();
if ( !isShortcut &&
( hasModifier || e->text().isEmpty() || completionPrefix.length() < 3 || eow.contains( e->text().right( 1 ) ) ) )
if ( !isShortcut && ( hasModifier || e->text().isEmpty() || completionPrefix.length() < 3 || eow.contains( e->text().right( 1 ) ) ) )
{
m_completer->popup()->hide();
return;
@@ -118,8 +116,7 @@ void TextEditWithCompletion::keyPressEvent( QKeyEvent* e )
m_completer->popup()->setCurrentIndex( m_completer->completionModel()->index( 0, 0 ) );
}
QRect cr = cursorRect();
cr.setWidth( m_completer->popup()->sizeHintForColumn( 0 ) +
m_completer->popup()->verticalScrollBar()->sizeHint().width() );
cr.setWidth( m_completer->popup()->sizeHintForColumn( 0 ) + m_completer->popup()->verticalScrollBar()->sizeHint().width() );
m_completer->complete( cr ); // popup it up!
}

View File

@@ -63,8 +63,7 @@ void RiuTimeStepChangedHandler::handleTimeStepChanged( Rim3dView* changedView )
{
if ( !RiaGuiApplication::isRunning() ) return;
RiuRelativePermeabilityPlotUpdater* relPermPlotUpdater =
RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
RiuRelativePermeabilityPlotUpdater* relPermPlotUpdater = RiuMainWindow::instance()->relativePermeabilityPlotPanel()->plotUpdater();
relPermPlotUpdater->updateOnTimeStepChanged( changedView );
RiuPvtPlotUpdater* pvtPlotUpdater = RiuMainWindow::instance()->pvtPlotPanel()->plotUpdater();

View File

@@ -47,8 +47,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuTofAccumulatedPhaseFractionsPlot::RiuTofAccumulatedPhaseFractionsPlot( RimTofAccumulatedPhaseFractionsPlot* plotDefinition,
QWidget* parent )
RiuTofAccumulatedPhaseFractionsPlot::RiuTofAccumulatedPhaseFractionsPlot( RimTofAccumulatedPhaseFractionsPlot* plotDefinition, QWidget* parent )
: QwtPlot( parent )
, m_watCurve( nullptr )
, m_oilCurve( nullptr )

View File

@@ -118,13 +118,11 @@ bool RiuTreeViewEventFilter::eventFilter( QObject* obj, QEvent* event )
std::vector<caf::CmdFeature*> matches;
if ( keyEvent->matches( QKeySequence::Copy ) )
{
matches.push_back(
caf::CmdFeatureManager::instance()->getCommandFeature( "RicCopyReferencesToClipboardFeature" ) );
matches.push_back( caf::CmdFeatureManager::instance()->getCommandFeature( "RicCopyReferencesToClipboardFeature" ) );
}
else if ( keyEvent->matches( QKeySequence::Cut ) )
{
matches.push_back(
caf::CmdFeatureManager::instance()->getCommandFeature( "RicCutReferencesToClipboardFeature" ) );
matches.push_back( caf::CmdFeatureManager::instance()->getCommandFeature( "RicCutReferencesToClipboardFeature" ) );
}
else if ( keyEvent->matches( QKeySequence::Paste ) )
{
@@ -135,8 +133,7 @@ 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

@@ -140,8 +140,7 @@ RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
m_versionInfoLabel->setFrameShape( QFrame::NoFrame );
m_versionInfoLabel->setAlignment( Qt::AlignRight );
m_versionInfoLabel->setObjectName( "VersionInfo" );
m_versionInfoLabel->setText(
QString( "%1 v%2" ).arg( RI_APPLICATION_NAME, RiaApplication::getVersionStringApp( false ) ) );
m_versionInfoLabel->setText( QString( "%1 v%2" ).arg( RI_APPLICATION_NAME, RiaApplication::getVersionStringApp( false ) ) );
m_versionInfoLabel->setFont( font );
m_showVersionInfo = true;
@@ -448,8 +447,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 );
@@ -562,14 +560,8 @@ void RiuViewer::paintOverlayItems( QPainter* painter )
// Draw a cross hair marker
int markerHalfLength = 6;
painter->drawLine( centerPos.x(),
centerPos.y() - markerHalfLength,
centerPos.x(),
centerPos.y() + markerHalfLength );
painter->drawLine( centerPos.x() - markerHalfLength,
centerPos.y(),
centerPos.x() + markerHalfLength,
centerPos.y() );
painter->drawLine( centerPos.x(), centerPos.y() - markerHalfLength, centerPos.x(), centerPos.y() + markerHalfLength );
painter->drawLine( centerPos.x() - markerHalfLength, centerPos.y(), centerPos.x() + markerHalfLength, centerPos.y() );
}
}
}
@@ -848,8 +840,7 @@ void RiuViewer::updateLegendLayout()
{
int legendWidth = prefSize.x();
legend->setLayoutFixedPosition( cvf::Vec2i( xPos - legendWidth, yPos ) );
legend->setRenderSize(
cvf::Vec2ui( legendWidth, viewPortHeight - yPosStart - border - edgeAxisBorderHeight ) );
legend->setRenderSize( cvf::Vec2ui( legendWidth, viewPortHeight - yPosStart - border - edgeAxisBorderHeight ) );
xPos -= legendWidth + border;
}
else
@@ -875,8 +866,7 @@ void RiuViewer::updateLegendLayout()
for ( caf::TitledOverlayFrame* columnLegend : columnLegends )
{
columnLegend->setRenderSize( cvf::Vec2ui( maxColumnWidht, columnLegend->renderSize().y() ) );
columnLegend->setLayoutFixedPosition(
cvf::Vec2i( xPos - maxColumnWidht, columnLegend->fixedPosition().y() ) );
columnLegend->setLayoutFixedPosition( cvf::Vec2i( xPos - maxColumnWidht, columnLegend->fixedPosition().y() ) );
}
// Increment to make ready for a new column
@@ -907,8 +897,7 @@ void RiuViewer::updateLegendLayout()
// Set axis cross position at the bottom besides the last column
{
m_axisCross->setLayoutFixedPosition(
cvf::Vec2i( xPos + border - m_axisCross->sizeHint().x(), edgeAxisBorderHeight ) );
m_axisCross->setLayoutFixedPosition( cvf::Vec2i( xPos + border - m_axisCross->sizeHint().x(), edgeAxisBorderHeight ) );
}
}
@@ -1070,9 +1059,7 @@ void RiuViewer::mouseMoveEvent( QMouseEvent* mouseEvent )
int translatedMousePosY = height() - mouseEvent->pos().y();
cvf::Vec3d displayCoord( 0, 0, 0 );
if ( mainCamera()->unproject( cvf::Vec3d( static_cast<double>( translatedMousePosX ),
static_cast<double>( translatedMousePosY ),
0 ),
if ( mainCamera()->unproject( cvf::Vec3d( static_cast<double>( translatedMousePosX ), static_cast<double>( translatedMousePosY ), 0 ),
&displayCoord ) )
{
if ( m_cursorPositionDomainCoords != cvf::Vec3d::UNDEFINED )
@@ -1224,10 +1211,7 @@ cvf::OverlayItem* RiuViewer::pickFixedPositionedLegend( int winPosX, int winPosY
for ( auto overlayItem : m_visibleLegends )
{
if ( overlayItem->layoutScheme() == cvf::OverlayItem::FIXED_POSITION &&
overlayItem->pick( translatedMousePosX,
translatedMousePosY,
overlayItem->fixedPosition(),
overlayItem->renderSize() ) )
overlayItem->pick( translatedMousePosX, translatedMousePosY, overlayItem->fixedPosition(), overlayItem->renderSize() ) )
{
return overlayItem.p();
}
@@ -1236,10 +1220,7 @@ cvf::OverlayItem* RiuViewer::pickFixedPositionedLegend( int winPosX, int winPosY
for ( auto overlayItem : m_visibleComparisonLegends )
{
if ( overlayItem->layoutScheme() == cvf::OverlayItem::FIXED_POSITION &&
overlayItem->pick( translatedMousePosX,
translatedMousePosY,
overlayItem->fixedPosition(),
overlayItem->renderSize() ) )
overlayItem->pick( translatedMousePosX, translatedMousePosY, overlayItem->fixedPosition(), overlayItem->renderSize() ) )
{
return overlayItem.p();
}
@@ -1449,39 +1430,24 @@ void RiuViewer::updateOverlayItemsStyle()
contrastColor = RiaColorTools::toQColor( cvf_contrastColor );
}
m_infoLabel->setStyleSheet( caf::StyleSheetTools::createFrameStyleSheet( "QLabel",
"InfoLabel",
contrastColor,
backgroundColor,
backgroundFrameColor ) );
m_shortInfoLabel->setStyleSheet( caf::StyleSheetTools::createFrameStyleSheet( "QLabel",
"ShortInfoLabel",
contrastColor,
backgroundColor,
backgroundFrameColor ) );
m_shortInfoLabelCompView->setStyleSheet( caf::StyleSheetTools::createFrameStyleSheet( "QLabel",
"ShortInfoLabelCompView",
contrastColor,
backgroundColor,
backgroundFrameColor ) );
m_infoLabel->setStyleSheet(
caf::StyleSheetTools::createFrameStyleSheet( "QLabel", "InfoLabel", contrastColor, backgroundColor, backgroundFrameColor ) );
m_shortInfoLabel->setStyleSheet(
caf::StyleSheetTools::createFrameStyleSheet( "QLabel", "ShortInfoLabel", contrastColor, backgroundColor, backgroundFrameColor ) );
m_shortInfoLabelCompView->setStyleSheet(
caf::StyleSheetTools::createFrameStyleSheet( "QLabel", "ShortInfoLabelCompView", contrastColor, backgroundColor, backgroundFrameColor ) );
m_versionInfoLabel->setStyleSheet(
caf::StyleSheetTools::createFrameStyleSheet( "QLabel", "VersionInfo", contrastColor, backgroundColor, backgroundColor ) );
m_zScaleLabel->setStyleSheet(
caf::StyleSheetTools::createFrameStyleSheet( "QLabel", "ZScaleLabel", contrastColor, backgroundColor, backgroundColor ) );
m_histogramWidget->setStyleSheet( caf::StyleSheetTools::createFrameStyleSheet( "QWidget",
"HistogramWidget",
contrastColor,
backgroundColor,
backgroundFrameColor ) );
m_histogramWidget->setStyleSheet(
caf::StyleSheetTools::createFrameStyleSheet( "QWidget", "HistogramWidget", contrastColor, backgroundColor, backgroundFrameColor ) );
QColor progressColor( Qt::green );
progressColor.setAlphaF( 0.8f );
backgroundColor.setAlphaF( 0.8f );
m_animationProgress->setTextBackgroundAndProgressColor( contrastColor, backgroundColor, backgroundFrameColor, progressColor );
m_animationProgressCompView->setTextBackgroundAndProgressColor( contrastColor,
backgroundColor,
backgroundFrameColor,
progressColor );
m_animationProgressCompView->setTextBackgroundAndProgressColor( contrastColor, backgroundColor, backgroundFrameColor, progressColor );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -207,8 +207,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
}
m_isCurrentPickInComparisonView = m_viewer->isMousePosWithinComparisonView( event->x(), event->y() );
Rim3dView* mainOrComparisonView = m_isCurrentPickInComparisonView ? m_reservoirView->activeComparisonView()
: m_reservoirView.p();
Rim3dView* mainOrComparisonView = m_isCurrentPickInComparisonView ? m_reservoirView->activeComparisonView() : m_reservoirView.p();
// Find the following data
@@ -247,7 +246,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
if ( mainOrComparisonView )
{
cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
m_currentPickPositionInDomainCoords = transForm->transformToDomainCoord( globalIntersectionPoint );
m_currentPickPositionInDomainCoords = transForm->transformToDomainCoord( globalIntersectionPoint );
}
}
@@ -280,8 +279,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo =
dynamic_cast<const RivBoxIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
if ( rivSourceInfo || femSourceInfo || crossSectionSourceInfo || intersectionBoxSourceInfo ||
surfIntersectSourceInfo )
if ( rivSourceInfo || femSourceInfo || crossSectionSourceInfo || intersectionBoxSourceInfo || surfIntersectSourceInfo )
{
if ( rivSourceInfo )
{
@@ -387,15 +385,9 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
menuBuilder.subMenuStart( "Range Filter Slice", QIcon( ":/CellFilter_Range.png" ) );
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature",
"I-slice Range Filter",
iSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature",
"J-slice Range Filter",
jSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature",
"K-slice Range Filter",
kSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "I-slice Range Filter", iSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "J-slice Range Filter", jSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "K-slice Range Filter", kSliceList );
menuBuilder.subMenuEnd();
}
@@ -426,8 +418,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
if ( eclipseView )
{
// fault commands
const RigFault* fault =
eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace( m_currentCellIndex, m_currentFaceIndex );
const RigFault* fault = eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace( m_currentCellIndex, m_currentFaceIndex );
if ( fault )
{
menuBuilder.addSeparator();
@@ -438,9 +429,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
hideFaultList.push_back( currentCellIndex );
hideFaultList.push_back( m_currentFaceIndex );
menuBuilder.addCmdFeatureWithUserData( "RicEclipseHideFaultFeature",
QString( "Hide " ) + faultName,
hideFaultList );
menuBuilder.addCmdFeatureWithUserData( "RicEclipseHideFaultFeature", QString( "Hide " ) + faultName, hideFaultList );
menuBuilder.addCmdFeatureWithUserData( "RicEclipseShowOnlyFaultFeature",
QString( "Show " ) + faultName + QString( " - Others Off" ),
@@ -458,9 +447,8 @@ 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 +457,7 @@ 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() );
@@ -484,13 +471,11 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
cvf::Vec3d pickedPositionInUTM = m_currentPickPositionInDomainCoords;
if ( int2dView ) pickedPositionInUTM = int2dView->transformToUtm( pickedPositionInUTM );
double measuredDepth = wellPathSourceInfo->measuredDepth( firstPartTriangleIndex, pickedPositionInUTM );
double measuredDepth = wellPathSourceInfo->measuredDepth( firstPartTriangleIndex, pickedPositionInUTM );
cvf::Vec3d closestPointOnCenterLine =
wellPathSourceInfo->closestPointOnCenterLine( firstPartTriangleIndex, pickedPositionInUTM );
RiuSelectionItem* selItem = new RiuWellPathSelectionItem( wellPathSourceInfo,
closestPointOnCenterLine,
measuredDepth,
wellPathComponent );
RiuSelectionItem* selItem =
new RiuWellPathSelectionItem( wellPathSourceInfo, closestPointOnCenterLine, measuredDepth, wellPathComponent );
Riu3dSelectionManager::instance()->setSelectedItem( selItem, Riu3dSelectionManager::RUI_TEMPORARY );
}
@@ -549,8 +534,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
menuBuilder << "RicLinkWellPathFeature";
}
const RivSimWellPipeSourceInfo* eclipseWellSourceInfo =
dynamic_cast<const RivSimWellPipeSourceInfo*>( firstHitPart->sourceInfo() );
const RivSimWellPipeSourceInfo* eclipseWellSourceInfo = dynamic_cast<const RivSimWellPipeSourceInfo*>( firstHitPart->sourceInfo() );
if ( eclipseWellSourceInfo )
{
RimSimWellInView* well = eclipseWellSourceInfo->well();
@@ -679,8 +663,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
m_isCurrentPickInComparisonView = m_viewer->isMousePosWithinComparisonView( winPosX, winPosY );
Rim3dView* mainOrComparisonView = m_isCurrentPickInComparisonView ? m_reservoirView->activeComparisonView()
: m_reservoirView.p();
Rim3dView* mainOrComparisonView = m_isCurrentPickInComparisonView ? m_reservoirView->activeComparisonView() : m_reservoirView.p();
// Make pickEventHandlers do their stuff
@@ -751,8 +734,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
{
auto selectedFractureTemplate = dynamic_cast<RimFractureTemplate*>( uiItems[0] );
if ( selectedFractureTemplate != nullptr &&
selectedFractureTemplate == fracture->fractureTemplate() )
if ( selectedFractureTemplate != nullptr && selectedFractureTemplate == fracture->fractureTemplate() )
{
blockSelectionOfFracture = true;
}
@@ -765,8 +747,8 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
}
RimMeshFractureTemplate* stimPlanTempl =
fracture ? dynamic_cast<RimMeshFractureTemplate*>( fracture->fractureTemplate() ) : nullptr;
RimMeshFractureTemplate* stimPlanTempl = fracture ? dynamic_cast<RimMeshFractureTemplate*>( fracture->fractureTemplate() )
: nullptr;
RimEllipseFractureTemplate* ellipseTempl =
fracture ? dynamic_cast<RimEllipseFractureTemplate*>( fracture->fractureTemplate() ) : nullptr;
if ( stimPlanTempl || ellipseTempl )
@@ -774,19 +756,18 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
// Set fracture resultInfo text
QString resultInfoText;
cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->transformToDomainCoord( globalIntersectionPoint );
cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->transformToDomainCoord( globalIntersectionPoint );
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
RivWellFracturePartMgr* partMgr = fracture->fracturePartManager();
if ( eclView ) resultInfoText = partMgr->resultInfoText( *eclView, domainCoord );
// Set intersection point result text
QString intersectionPointText =
QString( "Intersection point : Global [E: %1, N: %2, Depth: %3]" )
.arg( domainCoord.x(), 5, 'f', 2 )
.arg( domainCoord.y(), 5, 'f', 2 )
.arg( -domainCoord.z(), 5, 'f', 2 );
QString intersectionPointText = QString( "Intersection point : Global [E: %1, N: %2, Depth: %3]" )
.arg( domainCoord.x(), 5, 'f', 2 )
.arg( domainCoord.y(), 5, 'f', 2 )
.arg( -domainCoord.z(), 5, 'f', 2 );
resultInfoText.append( intersectionPointText );
// Display result info text
@@ -804,8 +785,8 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
if ( surf )
{
RiuMainWindow::instance()->selectAsCurrentItem( surf, true );
cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->transformToDomainCoord( globalIntersectionPoint );
cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->transformToDomainCoord( globalIntersectionPoint );
// Set surface resultInfo text
QString resultInfoText = "Surface: " + surf->name() + "\n\n";
@@ -835,8 +816,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
{
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) == nullptr;
RiuMainWindow::instance()->selectAsCurrentItem( crossSectionSourceInfo->intersection(),
allowActiveViewChange );
RiuMainWindow::instance()->selectAsCurrentItem( crossSectionSourceInfo->intersection(), allowActiveViewChange );
}
else if ( const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo =
dynamic_cast<const RivBoxIntersectionSourceInfo*>( firstHitPart->sourceInfo() ) )
@@ -854,8 +834,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
{
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 )
@@ -863,19 +842,16 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
RimEclipseCase* eclipseCase = nullptr;
eclipseView->firstAncestorOrThisOfTypeAsserted( eclipseCase );
if ( eclipseCase->eclipseCaseData() &&
eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities() )
if ( eclipseCase->eclipseCaseData() && eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities() )
{
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(),
timeStep );
connectionFactors->multipleCompletionsPerEclipseCell( wellConnectionSourceInfo->wellPath(), timeStep );
auto completionDataIt = multipleCompletions.find( globalCellIndex );
if ( completionDataIt != multipleCompletions.end() )
@@ -893,8 +869,7 @@ 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,
@@ -911,9 +886,8 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
{
for ( const auto& metaData : completionData.metadata() )
{
resultInfoText += QString( "<b>Name</b> %1 <b>Description</b> %2 <br>" )
.arg( metaData.name )
.arg( metaData.comment );
resultInfoText +=
QString( "<b>Name</b> %1 <b>Description</b> %2 <br>" ).arg( metaData.name ).arg( metaData.comment );
}
}
@@ -922,8 +896,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
}
RiuMainWindow::instance()->selectAsCurrentItem( wellConnectionSourceInfo->wellPath(),
allowActiveViewChange );
RiuMainWindow::instance()->selectAsCurrentItem( wellConnectionSourceInfo->wellPath(), allowActiveViewChange );
}
else if ( dynamic_cast<const RivSimWellConnectionSourceInfo*>( firstHitPart->sourceInfo() ) )
{
@@ -932,10 +905,8 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
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 )
@@ -943,15 +914,13 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
RimEclipseCase* eclipseCase = nullptr;
eclipseView->firstAncestorOrThisOfTypeAsserted( eclipseCase );
if ( eclipseCase->eclipseCaseData() &&
eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities() )
if ( eclipseCase->eclipseCaseData() && eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities() )
{
auto connectionFactors = eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities();
size_t timeStep = eclipseView->currentTimeStep();
auto connectionFactors = eclipseCase->eclipseCaseData()->virtualPerforationTransmissibilities();
size_t timeStep = eclipseView->currentTimeStep();
const auto& completionData =
connectionFactors->completionsForSimWell( simWellConnectionSourceInfo->simWellInView()->simWellData(),
timeStep );
connectionFactors->completionsForSimWell( simWellConnectionSourceInfo->simWellInView()->simWellData(), timeStep );
for ( const auto& compData : completionData )
{
@@ -978,8 +947,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
}
}
}
RiuMainWindow::instance()->selectAsCurrentItem( simWellConnectionSourceInfo->simWellInView(),
allowActiveViewChange );
RiuMainWindow::instance()->selectAsCurrentItem( simWellConnectionSourceInfo->simWellInView(), allowActiveViewChange );
}
}
}
@@ -1136,8 +1104,7 @@ void RiuViewerCommands::findFirstItems( Rim3dView* main
{
if ( nncNearFirstItemIndex == cvf::UNDEFINED_SIZE_T && canFindRelvantNNC )
{
cvf::Vec3d distFirstNonNNCToCandidate = firstOrFirstNonNncIntersectionPoint -
pickItemInfos[i].globalPickedPoint();
cvf::Vec3d distFirstNonNNCToCandidate = firstOrFirstNonNncIntersectionPoint - pickItemInfos[i].globalPickedPoint();
// This candidate is an NNC hit
if ( distFirstNonNNCToCandidate.lengthSquared() < pickDepthThresholdSquared )
@@ -1158,8 +1125,7 @@ void RiuViewerCommands::findFirstItems( Rim3dView* main
}
}
if ( firstNonNncHitIndex != cvf::UNDEFINED_SIZE_T &&
( nncNearFirstItemIndex != cvf::UNDEFINED_SIZE_T || !canFindRelvantNNC ) )
if ( firstNonNncHitIndex != cvf::UNDEFINED_SIZE_T && ( nncNearFirstItemIndex != cvf::UNDEFINED_SIZE_T || !canFindRelvantNNC ) )
{
break; // Found what can be found
}
@@ -1172,12 +1138,7 @@ void RiuViewerCommands::findFirstItems( Rim3dView* main
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuViewerCommands::ijkFromCellIndex( Rim3dView* mainOrComparisonView,
size_t gridIdx,
size_t cellIndex,
size_t* i,
size_t* j,
size_t* k )
void RiuViewerCommands::ijkFromCellIndex( Rim3dView* mainOrComparisonView, size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k )
{
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( mainOrComparisonView );
@@ -1216,8 +1177,7 @@ bool RiuViewerCommands::handleOverlayItemPicking( int winPosX, int winPosY )
std::vector<RimLegendConfig*> legendConfigs = m_reservoirView->legendConfigs();
if ( m_reservoirView->activeComparisonView() )
{
std::vector<RimLegendConfig*> compViewLegendConfigs =
m_reservoirView->activeComparisonView()->legendConfigs();
std::vector<RimLegendConfig*> compViewLegendConfigs = m_reservoirView->activeComparisonView()->legendConfigs();
legendConfigs.insert( legendConfigs.end(), compViewLegendConfigs.begin(), compViewLegendConfigs.end() );
}

View File

@@ -86,8 +86,7 @@ RiuWellAllocationPlot::RiuWellAllocationPlot( RimWellAllocationPlot* plotDefinit
new RiuContextMenuLauncher( totalFlowAllocationWidget, menuForSubWidgets );
leftColumnLayout->addWidget( totalFlowAllocationWidget, Qt::AlignTop );
leftColumnLayout->addWidget( m_plotDefinition->tofAccumulatedPhaseFractionsPlot()->createViewWidget( this ),
Qt::AlignTop );
leftColumnLayout->addWidget( m_plotDefinition->tofAccumulatedPhaseFractionsPlot()->createViewWidget( this ), Qt::AlignTop );
leftColumnLayout->addStretch();
QWidget* wellFlowWidget = m_plotDefinition->accumulatedWellFlowPlot()->createPlotWidget();

Some files were not shown because too many files have changed in this diff Show More