mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixes by clang-format
This commit is contained in:
@@ -620,7 +620,7 @@ void RiuGroupedBarChartBuilder::addBarChartToPlot( QwtPlot* plot, Qt::Orientatio
|
||||
barPoints = &( legendToBarPointsPair->second );
|
||||
}
|
||||
|
||||
barPoints->push_back( {currentBarPosition, barDef.m_value} );
|
||||
barPoints->push_back( { currentBarPosition, barDef.m_value } );
|
||||
if ( !barDef.m_barText.isEmpty() )
|
||||
{
|
||||
positionedBarLabels[currentBarPosition] =
|
||||
|
||||
@@ -188,7 +188,7 @@ std::vector<std::pair<QRect, QString>> RiuAbstractLegendFrame::visibleLabels( co
|
||||
|
||||
QString valueString = label( i );
|
||||
lastRect = rect;
|
||||
visibleTickLabels.push_back( {rect, valueString} );
|
||||
visibleTickLabels.push_back( { rect, valueString } );
|
||||
}
|
||||
return visibleTickLabels;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ 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 normMousePos = { mousePos.x() / m_viewer->width(), mousePos.y() / m_viewer->height() };
|
||||
cvf::Rectf orgCompViewWindow = m_viewer->comparisonViewVisibleNormalizedRect();
|
||||
|
||||
float minx = normMousePos.x();
|
||||
|
||||
@@ -87,11 +87,11 @@ void RiuCvfOverlayItemWidget::renderTo( QPainter* painter, const QRect& paintRec
|
||||
// Create a rendering
|
||||
|
||||
cvf::ref<cvf::Rendering> rendering = new cvf::Rendering;
|
||||
m_overlayItem->setLayoutFixedPosition( {0, 0} );
|
||||
m_overlayItem->setLayoutFixedPosition( { 0, 0 } );
|
||||
rendering->addOverlayItem( m_overlayItem.p() );
|
||||
|
||||
rendering->camera()->setViewport( 0, 0, width, height );
|
||||
rendering->camera()->viewport()->setClearColor( {1, 1, 1, 0} );
|
||||
rendering->camera()->viewport()->setClearColor( { 1, 1, 1, 0 } );
|
||||
|
||||
cvf::ref<cvf::RenderSequence> renderingSequence = new cvf::RenderSequence;
|
||||
renderingSequence->addRendering( rendering.p() );
|
||||
|
||||
@@ -39,7 +39,7 @@ RiuDockedQwtPlot::RiuDockedQwtPlot( QWidget* parent /*= nullptr*/ )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuDockedQwtPlot::applyFontSizes( bool replot /*= false*/ )
|
||||
{
|
||||
std::set<QwtPlot::Axis> allAxes = {QwtPlot::xBottom, QwtPlot::yLeft, QwtPlot::xTop, QwtPlot::yRight};
|
||||
std::set<QwtPlot::Axis> allAxes = { QwtPlot::xBottom, QwtPlot::yLeft, QwtPlot::xTop, QwtPlot::yRight };
|
||||
|
||||
caf::FontTools::FontSize fontSize = RiaPreferences::current()->defaultPlotFontSize();
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
#include <QTextEdit>
|
||||
|
||||
const std::map<QString, std::set<QString>> RiuExpressionContextMenuManager::MENU_MAP =
|
||||
{{"Basic Operators", {"+", "-", "*", "/", "x^n"}},
|
||||
{"Assignment Operators", {":="}},
|
||||
{"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)"}}};
|
||||
{ { "Basic Operators", { "+", "-", "*", "/", "x^n" } },
|
||||
{ "Assignment Operators", { ":=" } },
|
||||
{ "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)" } } };
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
@@ -52,306 +52,309 @@ 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*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
{ { 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" ) );
|
||||
|
||||
QRegularExpression lineColorRegExp( "line-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString lineColor = lineColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
QRegularExpression symbolColorRegExp( "symbol-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString symbolColor = symbolColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
if ( !lineColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "curve" ),
|
||||
match.captured( "itemName" ),
|
||||
"line-color",
|
||||
lineColor );
|
||||
}
|
||||
if ( !symbolColor.isEmpty() )
|
||||
{
|
||||
// Symbols get the same color assigned as curves.
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "curve" ),
|
||||
match.captured( "itemName" ),
|
||||
"symbol-color",
|
||||
symbolColor );
|
||||
}
|
||||
if ( lineColor.isEmpty() && symbolColor.isEmpty() ) return;
|
||||
QRegularExpression lineColorRegExp( "line-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString lineColor = lineColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
QRegularExpression symbolColorRegExp( "symbol-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString symbolColor = symbolColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
if ( !lineColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "curve" ),
|
||||
match.captured( "itemName" ),
|
||||
"line-color",
|
||||
lineColor );
|
||||
}
|
||||
if ( !symbolColor.isEmpty() )
|
||||
{
|
||||
// Symbols get the same color assigned as curves.
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "curve" ),
|
||||
match.captured( "itemName" ),
|
||||
"symbol-color",
|
||||
symbolColor );
|
||||
}
|
||||
if ( lineColor.isEmpty() && symbolColor.isEmpty() ) return;
|
||||
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotCurve* curve = dynamic_cast<QwtPlotCurve*>( item ) )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) || match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = curve->pen();
|
||||
pen.setColor( QColor( lineColor ) );
|
||||
curve->setPen( pen );
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotCurve* curve = dynamic_cast<QwtPlotCurve*>( item ) )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
|
||||
match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = curve->pen();
|
||||
pen.setColor( QColor( lineColor ) );
|
||||
curve->setPen( pen );
|
||||
|
||||
if ( curve->symbol() && curve->symbol()->style() != QwtSymbol::NoSymbol )
|
||||
{
|
||||
QPen pen = curve->symbol()->pen();
|
||||
pen.setColor( QColor( symbolColor ) );
|
||||
QwtSymbol* symbol = cloneCurveSymbol( curve );
|
||||
symbol->setPen( pen );
|
||||
curve->setSymbol( symbol );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
}},
|
||||
{QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::grid\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
if ( curve->symbol() && curve->symbol()->style() != QwtSymbol::NoSymbol )
|
||||
{
|
||||
QPen pen = curve->symbol()->pen();
|
||||
pen.setColor( QColor( symbolColor ) );
|
||||
QwtSymbol* symbol = cloneCurveSymbol( curve );
|
||||
symbol->setPen( pen );
|
||||
curve->setSymbol( symbol );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
} },
|
||||
{ QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::grid\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
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" ) == "*" )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotGrid* grid = dynamic_cast<QwtPlotGrid*>( item ) )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) || match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = grid->majorPen();
|
||||
pen.setColor( QColor( color ) );
|
||||
grid->setPen( pen );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
}},
|
||||
{QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::legend\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
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" ) == "*" )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotGrid* grid = dynamic_cast<QwtPlotGrid*>( item ) )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
|
||||
match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = grid->majorPen();
|
||||
pen.setColor( QColor( color ) );
|
||||
grid->setPen( pen );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
} },
|
||||
{ QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::legend\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
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" ) == "*" )
|
||||
{
|
||||
for ( QwtLegendLabel* label : plotWidget->findChildren<QwtLegendLabel*>() )
|
||||
{
|
||||
QwtText text = label->text();
|
||||
text.setColor( QColor( color ) );
|
||||
label->setText( text );
|
||||
label->repaint();
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
}},
|
||||
{QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::lineMarker\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]"
|
||||
"\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((color|text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
QRegularExpression textColorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
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" ) == "*" )
|
||||
{
|
||||
for ( QwtLegendLabel* label : plotWidget->findChildren<QwtLegendLabel*>() )
|
||||
{
|
||||
QwtText text = label->text();
|
||||
text.setColor( QColor( color ) );
|
||||
label->setText( text );
|
||||
label->repaint();
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
} },
|
||||
{ QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::lineMarker\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]"
|
||||
"\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((color|text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
QRegularExpression textColorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "lineMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"color",
|
||||
color );
|
||||
}
|
||||
if ( !textColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "lineMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"text-color",
|
||||
textColor );
|
||||
}
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
|
||||
match.captured( "plotName" ) == "*" )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotMarker* marker = dynamic_cast<QwtPlotMarker*>( item ) )
|
||||
{
|
||||
if ( marker->symbol() == nullptr || marker->symbol()->style() == QwtSymbol::NoSymbol )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
|
||||
match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = marker->linePen();
|
||||
pen.setColor( QColor( color ) );
|
||||
marker->setLinePen( pen );
|
||||
marker->label().setColor( QColor( textColor ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
}},
|
||||
{QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::pointMarker\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]"
|
||||
"\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((color|text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
QRegularExpression textColorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "lineMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"color",
|
||||
color );
|
||||
}
|
||||
if ( !textColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "lineMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"text-color",
|
||||
textColor );
|
||||
}
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
|
||||
match.captured( "plotName" ) == "*" )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotMarker* marker = dynamic_cast<QwtPlotMarker*>( item ) )
|
||||
{
|
||||
if ( marker->symbol() == nullptr || marker->symbol()->style() == QwtSymbol::NoSymbol )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
|
||||
match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = marker->linePen();
|
||||
pen.setColor( QColor( color ) );
|
||||
marker->setLinePen( pen );
|
||||
marker->label().setColor( QColor( textColor ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
} },
|
||||
{ QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::pointMarker\\[\"(?<itemName>[a-zA-Z0-9-_\\*]+)\"\\]"
|
||||
"\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((color|text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression colorRegExp( "color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString color = colorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
QRegularExpression textColorRegExp( "text-color:\\s*([#0-9a-zA-Z]+)" );
|
||||
QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "pointMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"color",
|
||||
color );
|
||||
}
|
||||
if ( !textColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "pointMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"text-color",
|
||||
textColor );
|
||||
}
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
|
||||
match.captured( "plotName" ) == "*" )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotMarker* marker = dynamic_cast<QwtPlotMarker*>( item ) )
|
||||
{
|
||||
if ( marker->symbol() && marker->symbol()->style() != QwtSymbol::NoSymbol )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
|
||||
match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = marker->symbol()->pen();
|
||||
pen.setColor( QColor( color ) );
|
||||
QwtSymbol* symbol = cloneMarkerSymbol( marker );
|
||||
symbol->setPen( pen );
|
||||
marker->setSymbol( symbol );
|
||||
marker->label().setColor( QColor( textColor ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
}},
|
||||
{QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::picker"
|
||||
"\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression textColorRegExp( "text-color:\\s*([#a-zA-Z0-9]+)" );
|
||||
QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
if ( !color.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "pointMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"color",
|
||||
color );
|
||||
}
|
||||
if ( !textColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ),
|
||||
QString( "pointMarker" ),
|
||||
match.captured( "itemName" ),
|
||||
"text-color",
|
||||
textColor );
|
||||
}
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
|
||||
match.captured( "plotName" ) == "*" )
|
||||
{
|
||||
for ( QwtPlotItem* item : plotWidget->itemList() )
|
||||
{
|
||||
if ( QwtPlotMarker* marker = dynamic_cast<QwtPlotMarker*>( item ) )
|
||||
{
|
||||
if ( marker->symbol() && marker->symbol()->style() != QwtSymbol::NoSymbol )
|
||||
{
|
||||
if ( itemNameRegExp.exactMatch( item->title().text() ) ||
|
||||
match.captured( "itemName" ) == "*" )
|
||||
{
|
||||
QPen pen = marker->symbol()->pen();
|
||||
pen.setColor( QColor( color ) );
|
||||
QwtSymbol* symbol = cloneMarkerSymbol( marker );
|
||||
symbol->setPen( pen );
|
||||
marker->setSymbol( symbol );
|
||||
marker->label().setColor( QColor( textColor ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
} },
|
||||
{ QString( "QwtPlot\\[\"(?<plotName>[a-zA-Z0-9-_\\*]+)\"\\]::picker"
|
||||
"\\s*\\{("
|
||||
"?<properties>([\\n\\r]*\\s*((text-color):"
|
||||
"\\s*([a-zA-Z0-9#]+)\\s*;))*)[\\n\\r]*\\s*\\}" ),
|
||||
[]( QRegularExpressionMatch& match ) {
|
||||
QRegExp plotNameRegExp( match.captured( "plotName" ) );
|
||||
QRegExp itemNameRegExp( match.captured( "itemName" ) );
|
||||
QRegularExpression textColorRegExp( "text-color:\\s*([#a-zA-Z0-9]+)" );
|
||||
QString textColor = textColorRegExp.match( match.captured( "properties" ) ).captured( 1 );
|
||||
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
const QWidgetList topLevelWidgets = RiaGuiApplication::instance()->topLevelWidgets();
|
||||
|
||||
if ( !textColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "picker" ), "*", "text-color", textColor );
|
||||
}
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
|
||||
match.captured( "plotName" ) == "*" )
|
||||
{
|
||||
QWidget* canvas = plotWidget->canvas();
|
||||
if ( canvas )
|
||||
{
|
||||
for ( QwtPicker* picker : canvas->findChildren<QwtPicker*>() )
|
||||
{
|
||||
QPen pen = picker->trackerPen();
|
||||
pen.setColor( QColor( textColor ) );
|
||||
picker->setTrackerPen( pen );
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
}}};
|
||||
if ( !textColor.isEmpty() )
|
||||
{
|
||||
storeQwtStyleSheetProperty( match.captured( "plotName" ), QString( "picker" ), "*", "text-color", textColor );
|
||||
}
|
||||
for ( QWidget* widget : topLevelWidgets )
|
||||
{
|
||||
for ( QwtPlot* plotWidget : widget->findChildren<QwtPlot*>() )
|
||||
{
|
||||
if ( plotNameRegExp.exactMatch( plotWidget->property( "qss-class" ).toString() ) ||
|
||||
match.captured( "plotName" ) == "*" )
|
||||
{
|
||||
QWidget* canvas = plotWidget->canvas();
|
||||
if ( canvas )
|
||||
{
|
||||
for ( QwtPicker* picker : canvas->findChildren<QwtPicker*>() )
|
||||
{
|
||||
QPen pen = picker->trackerPen();
|
||||
pen.setColor( QColor( textColor ) );
|
||||
picker->setTrackerPen( pen );
|
||||
}
|
||||
}
|
||||
}
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
} } };
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
@@ -597,9 +597,9 @@ void RiuPlotMainWindow::updateMultiPlotToolBar()
|
||||
RimMultiPlot* plotWindow = dynamic_cast<RimMultiPlot*>( m_activePlotViewWindow.p() );
|
||||
if ( plotWindow )
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields = {plotWindow->pagePreviewField(),
|
||||
plotWindow->columnCountField(),
|
||||
plotWindow->rowsPerPageField()};
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields = { plotWindow->pagePreviewField(),
|
||||
plotWindow->columnCountField(),
|
||||
plotWindow->rowsPerPageField() };
|
||||
m_multiPlotToolBarEditor->setFields( toolBarFields );
|
||||
m_multiPlotToolBarEditor->updateUi();
|
||||
m_multiPlotToolBarEditor->show();
|
||||
|
||||
@@ -70,7 +70,7 @@ void RiuQwtPlotTools::setCommonPlotBehaviour( QwtPlot* plot )
|
||||
plot->setAxisFont( QwtPlot::yRight, axisFont );
|
||||
|
||||
// Axis title font
|
||||
std::vector<QwtPlot::Axis> axes = {QwtPlot::xBottom, QwtPlot::xTop, QwtPlot::yLeft, QwtPlot::yRight};
|
||||
std::vector<QwtPlot::Axis> axes = { QwtPlot::xBottom, QwtPlot::xTop, QwtPlot::yLeft, QwtPlot::yRight };
|
||||
|
||||
for ( QwtPlot::Axis axis : axes )
|
||||
{
|
||||
@@ -134,14 +134,14 @@ 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 )
|
||||
{
|
||||
|
||||
@@ -1050,7 +1050,7 @@ void RiuQwtPlotWidget::highlightPlotItem( const QwtPlotItem* closestItem )
|
||||
symbol->setPen( blendedSymbolLineColor, symbol->pen().width(), symbol->pen().style() );
|
||||
}
|
||||
}
|
||||
CurveColors curveColors = {curveColor, symbolColor, symbolLineColor};
|
||||
CurveColors curveColors = { curveColor, symbolColor, symbolLineColor };
|
||||
m_originalCurveColors.insert( std::make_pair( plotCurve, curveColors ) );
|
||||
m_originalCurveColors.insert( std::make_pair( plotCurve, curveColors ) );
|
||||
m_originalZValues.insert( std::make_pair( plotCurve, zValue ) );
|
||||
|
||||
@@ -197,11 +197,11 @@ void RiuQwtSymbol::setLabelPosition( LabelPosition labelPosition )
|
||||
RiuQwtSymbol::PointSymbolEnum RiuQwtSymbol::cycledSymbolStyle( int indexLevel1, int indexLevel2 )
|
||||
{
|
||||
std::vector<std::vector<PointSymbolEnum>> categorisedStyles = {
|
||||
{SYMBOL_ELLIPSE, SYMBOL_RECT, SYMBOL_DIAMOND},
|
||||
{SYMBOL_DOWN_TRIANGLE, SYMBOL_UP_TRIANGLE},
|
||||
{SYMBOL_LEFT_TRIANGLE, SYMBOL_RIGHT_TRIANGLE},
|
||||
{SYMBOL_CROSS, SYMBOL_XCROSS},
|
||||
{SYMBOL_STAR1, SYMBOL_STAR2},
|
||||
{ SYMBOL_ELLIPSE, SYMBOL_RECT, SYMBOL_DIAMOND },
|
||||
{ SYMBOL_DOWN_TRIANGLE, SYMBOL_UP_TRIANGLE },
|
||||
{ SYMBOL_LEFT_TRIANGLE, SYMBOL_RIGHT_TRIANGLE },
|
||||
{ SYMBOL_CROSS, SYMBOL_XCROSS },
|
||||
{ SYMBOL_STAR1, SYMBOL_STAR2 },
|
||||
};
|
||||
|
||||
int level1Category = indexLevel1 % int( categorisedStyles.size() );
|
||||
@@ -215,16 +215,16 @@ RiuQwtSymbol::PointSymbolEnum RiuQwtSymbol::cycledSymbolStyle( int indexLevel1,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuQwtSymbol::PointSymbolEnum RiuQwtSymbol::cycledSymbolStyle( int indexLevel )
|
||||
{
|
||||
std::vector<PointSymbolEnum> contrastingSymbols = {SYMBOL_ELLIPSE,
|
||||
SYMBOL_CROSS,
|
||||
SYMBOL_RECT,
|
||||
SYMBOL_DOWN_TRIANGLE,
|
||||
SYMBOL_UP_TRIANGLE,
|
||||
SYMBOL_LEFT_TRIANGLE,
|
||||
SYMBOL_RIGHT_TRIANGLE,
|
||||
SYMBOL_STAR2,
|
||||
SYMBOL_DIAMOND,
|
||||
SYMBOL_STAR1};
|
||||
std::vector<PointSymbolEnum> contrastingSymbols = { SYMBOL_ELLIPSE,
|
||||
SYMBOL_CROSS,
|
||||
SYMBOL_RECT,
|
||||
SYMBOL_DOWN_TRIANGLE,
|
||||
SYMBOL_UP_TRIANGLE,
|
||||
SYMBOL_LEFT_TRIANGLE,
|
||||
SYMBOL_RIGHT_TRIANGLE,
|
||||
SYMBOL_STAR2,
|
||||
SYMBOL_DIAMOND,
|
||||
SYMBOL_STAR1 };
|
||||
|
||||
return contrastingSymbols[indexLevel % (int)contrastingSymbols.size()];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -84,55 +84,55 @@ private:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuSummaryVectorSelectionUi::RiuSummaryVectorSelectionUi()
|
||||
: m_identifierFieldsMap( {
|
||||
{RifEclipseSummaryAddress::SUMMARY_FIELD,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_AQUIFER,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_NETWORK,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_MISC,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_REGION,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_NUMBER )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_2_REGION )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_WELL_GROUP,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_GROUP_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_WELL,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_WELL_LGR,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_BLOCK,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK )},
|
||||
{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_CALCULATED,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{RifEclipseSummaryAddress::SUMMARY_IMPORTED,
|
||||
{{new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME )}}},
|
||||
{ RifEclipseSummaryAddress::SUMMARY_FIELD,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_AQUIFER,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_NETWORK,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_MISC,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_REGION,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_NUMBER ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_REGION_2_REGION ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_GROUP,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_GROUP_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_LGR,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_WELL_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_BLOCK,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_LGR_NAME ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_CELL_IJK ) },
|
||||
{ new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_CALCULATED,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
{ RifEclipseSummaryAddress::SUMMARY_IMPORTED,
|
||||
{ { new SummaryIdentifierAndField( RifEclipseSummaryAddress::INPUT_VECTOR_NAME ) } } },
|
||||
} )
|
||||
, m_showIndividualEnsembleCases( false )
|
||||
{
|
||||
|
||||
@@ -920,7 +920,7 @@ void RiuViewer::updateLegendLayout()
|
||||
const int xPos = width() - (int)scaleLegendSize.x() - margin - edgeAxisBorderWidth;
|
||||
const int yPos = margin + edgeAxisBorderHeight + margin + otherItemsHeight;
|
||||
|
||||
m_scaleLegend->setLayoutFixedPosition( {xPos, yPos} );
|
||||
m_scaleLegend->setLayoutFixedPosition( { xPos, yPos } );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1299,9 +1299,9 @@ void RiuViewer::showScaleLegend( bool show )
|
||||
if ( show )
|
||||
{
|
||||
if ( m_scaleLegend->orientation() == caf::OverlayScaleLegend::HORIZONTAL )
|
||||
m_scaleLegend->setRenderSize( {280, 45} );
|
||||
m_scaleLegend->setRenderSize( { 280, 45 } );
|
||||
else
|
||||
m_scaleLegend->setRenderSize( {50, 280} );
|
||||
m_scaleLegend->setRenderSize( { 50, 280 } );
|
||||
|
||||
overlayItemsRendering()->addOverlayItem( m_scaleLegend.p() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user