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:
committed by
Magne Sjaastad
parent
64a719b1f4
commit
6b5f4dddc9
@@ -507,10 +507,10 @@ 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] = { QwtScaleDiv::MinorTick, barDef.m_barText };
|
||||
positionedBarLabels[currentBarPosition] = {QwtScaleDiv::MinorTick, barDef.m_barText};
|
||||
}
|
||||
|
||||
// Increment the bar position for the next bar
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ void RiuFemResultTextBuilder::appendTextFromResultColors( RigGeoMechCaseData*
|
||||
{
|
||||
RigFemPart* femPart = geomData->femParts()->part( gridIndex );
|
||||
RigElementType elmType = femPart->elementType( cellIndex );
|
||||
const int* elementConn = femPart->connectivities( cellIndex );
|
||||
const int* elementConn = femPart->connectivities( cellIndex );
|
||||
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||
const int* lElmNodeToIpMap = RigFemTypes::localElmNodeToIntegrationPointMapping( elmType );
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ class RiuPlotAnnotationTool
|
||||
public:
|
||||
enum class RegionAnnotationType
|
||||
{
|
||||
NO_ANNOTATIONS = 0,
|
||||
FORMATION_ANNOTATIONS = 1,
|
||||
NO_ANNOTATIONS = 0,
|
||||
FORMATION_ANNOTATIONS = 1,
|
||||
// Used to have Wbs-parameter coding as 2
|
||||
RESULT_PROPERTY_ANNOTATIONS = 3
|
||||
};
|
||||
|
||||
@@ -68,7 +68,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 )
|
||||
{
|
||||
@@ -132,14 +132,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 )
|
||||
{
|
||||
|
||||
@@ -148,7 +148,7 @@ void RiuSummaryVectorSelectionDialog::enableMultiSelect( bool enable )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryVectorSelectionDialog::enableIndividualEnsembleCaseSelection( bool enable )
|
||||
{
|
||||
|
||||
@@ -209,7 +209,7 @@ RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
|
||||
m_comparisonWindowMover = new RiuComparisonViewMover( this );
|
||||
this->setComparisonViewToFollowAnimation( false );
|
||||
|
||||
m_fontPointSize = caf::FontTools::absolutePointSize(RiaPreferences::current()->defaultSceneFontSize());
|
||||
m_fontPointSize = caf::FontTools::absolutePointSize( RiaPreferences::current()->defaultSceneFontSize() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -719,7 +719,7 @@ void RiuViewer::addColorLegendToBottomLeftCorner( caf::TitledOverlayFrame* added
|
||||
addedLegend->enableBackground( preferences->showLegendBackground() );
|
||||
addedLegend->setBackgroundColor( backgroundColor );
|
||||
addedLegend->setBackgroundFrameColor( frameColor );
|
||||
addedLegend->setFont( app->sceneFont(m_fontPointSize) );
|
||||
addedLegend->setFont( app->sceneFont( m_fontPointSize ) );
|
||||
|
||||
overlayRendering->addOverlayItem( addedLegend );
|
||||
|
||||
@@ -912,7 +912,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} );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1115,17 +1115,17 @@ void RiuViewer::leaveEvent( QEvent* )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::updateGridBoxData( double scaleZ,
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
void RiuViewer::updateGridBoxData( double scaleZ,
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
const cvf::BoundingBox& domainCoordBoundingBox,
|
||||
int fontPointSize )
|
||||
int fontPointSize )
|
||||
{
|
||||
m_gridBoxGenerator->setScaleZ( scaleZ );
|
||||
m_gridBoxGenerator->setDisplayModelOffset( displayModelOffset );
|
||||
m_gridBoxGenerator->updateFromBackgroundColor( backgroundColor );
|
||||
m_gridBoxGenerator->setGridBoxDomainCoordBoundingBox( domainCoordBoundingBox );
|
||||
m_gridBoxGenerator->setGridLabelFontSize(fontPointSize);
|
||||
m_gridBoxGenerator->setGridLabelFontSize( fontPointSize );
|
||||
|
||||
m_gridBoxGenerator->createGridBoxParts();
|
||||
|
||||
@@ -1291,9 +1291,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() );
|
||||
}
|
||||
@@ -1322,22 +1322,22 @@ void RiuViewer::clearHoverCursor()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::updateFonts(int fontPointSize)
|
||||
void RiuViewer::updateFonts( int fontPointSize )
|
||||
{
|
||||
m_fontPointSize = fontPointSize;
|
||||
|
||||
auto defaultFontSize = RiaApplication::instance()->preferences()->defaultSceneFontSize();
|
||||
cvf::Font* axisFont = RiaGuiApplication::instance()->defaultSceneFont();
|
||||
QFont font = QApplication::font();
|
||||
font.setPixelSize( caf::FontTools::pointSizeToPixelSize(m_fontPointSize ));
|
||||
font.setPixelSize( caf::FontTools::pointSizeToPixelSize( m_fontPointSize ) );
|
||||
|
||||
if ( caf::FontTools::absolutePointSize(defaultFontSize) != m_fontPointSize )
|
||||
if ( caf::FontTools::absolutePointSize( defaultFontSize ) != m_fontPointSize )
|
||||
{
|
||||
axisFont = RiaFontCache::getFont( m_fontPointSize ).p();
|
||||
}
|
||||
|
||||
overlayItemsRendering()->removeOverlayItem( m_axisCross.p() );
|
||||
|
||||
|
||||
m_axisCross = new cvf::OverlayAxisCross( m_mainCamera.p(), axisFont );
|
||||
m_axisCross->setAxisLabels( "X", "Y", "Z" );
|
||||
m_axisCross->setLayout( cvf::OverlayItem::VERTICAL, cvf::OverlayItem::BOTTOM_RIGHT );
|
||||
@@ -1352,7 +1352,7 @@ void RiuViewer::updateFonts(int fontPointSize)
|
||||
m_animationProgressCompView->setFont( font );
|
||||
m_versionInfoLabel->setFont( font );
|
||||
|
||||
m_gridBoxGenerator->setGridLabelFontSize(m_fontPointSize);
|
||||
m_gridBoxGenerator->setGridLabelFontSize( m_fontPointSize );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -99,11 +99,11 @@ public:
|
||||
void setHistogramPercentiles( double pmin, double pmax, double mean );
|
||||
|
||||
void showGridBox( bool enable );
|
||||
void updateGridBoxData( double scaleZ,
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
void updateGridBoxData( double scaleZ,
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
const cvf::BoundingBox& domainCoordBoundingBox,
|
||||
int fontPointSize );
|
||||
int fontPointSize );
|
||||
void showEdgeTickMarksXY( bool enable, bool showAxisLines = false );
|
||||
void showEdgeTickMarksXZ( bool enable, bool showAxisLines = false );
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
static void setHoverCursor( const QCursor& cursor );
|
||||
static void clearHoverCursor();
|
||||
|
||||
void updateFonts(int fontPointSize);
|
||||
void updateFonts( int fontPointSize );
|
||||
|
||||
public slots:
|
||||
void slotSetCurrentFrame( int frameIndex ) override;
|
||||
|
||||
Reference in New Issue
Block a user