mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4683 clang-format on all files in ApplicationCode
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -30,53 +30,52 @@
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogTrack* destTrack,
|
||||
const std::vector<RimWellLogCurve*>& curves,
|
||||
RimWellLogCurve* curveToInsertAfter)
|
||||
void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack( RimWellLogTrack* destTrack,
|
||||
const std::vector<RimWellLogCurve*>& curves,
|
||||
RimWellLogCurve* curveToInsertAfter )
|
||||
{
|
||||
CVF_ASSERT(destTrack );
|
||||
CVF_ASSERT( destTrack );
|
||||
|
||||
std::set<RimWellLogTrack*> srcTracks;
|
||||
std::set<RimWellLogPlot*> srcPlots;
|
||||
std::set<RimWellLogPlot*> srcPlots;
|
||||
|
||||
for (size_t cIdx = 0; cIdx < curves.size(); cIdx++)
|
||||
for ( size_t cIdx = 0; cIdx < curves.size(); cIdx++ )
|
||||
{
|
||||
RimWellLogCurve* curve = curves[cIdx];
|
||||
|
||||
RimWellLogTrack* wellLogPlotTrack;
|
||||
curve->firstAncestorOrThisOfType(wellLogPlotTrack);
|
||||
if (wellLogPlotTrack)
|
||||
curve->firstAncestorOrThisOfType( wellLogPlotTrack );
|
||||
if ( wellLogPlotTrack )
|
||||
{
|
||||
wellLogPlotTrack->takeOutCurve(curve);
|
||||
wellLogPlotTrack->takeOutCurve( curve );
|
||||
wellLogPlotTrack->updateConnectedEditors();
|
||||
srcTracks.insert(wellLogPlotTrack);
|
||||
srcTracks.insert( wellLogPlotTrack );
|
||||
RimWellLogPlot* plot;
|
||||
wellLogPlotTrack->firstAncestorOrThisOfType(plot);
|
||||
if (plot) srcPlots.insert(plot);
|
||||
wellLogPlotTrack->firstAncestorOrThisOfType( plot );
|
||||
if ( plot ) srcPlots.insert( plot );
|
||||
}
|
||||
}
|
||||
|
||||
size_t insertionStartIndex = 0;
|
||||
if (curveToInsertAfter) insertionStartIndex = destTrack->curveIndex(curveToInsertAfter) + 1;
|
||||
if ( curveToInsertAfter ) insertionStartIndex = destTrack->curveIndex( curveToInsertAfter ) + 1;
|
||||
|
||||
for (size_t cIdx = 0; cIdx < curves.size(); cIdx++)
|
||||
for ( size_t cIdx = 0; cIdx < curves.size(); cIdx++ )
|
||||
{
|
||||
destTrack->insertCurve(curves[cIdx], insertionStartIndex + cIdx);
|
||||
destTrack->insertCurve( curves[cIdx], insertionStartIndex + cIdx );
|
||||
}
|
||||
|
||||
for (std::set<RimWellLogPlot*>::iterator pIt = srcPlots.begin(); pIt != srcPlots.end(); ++pIt)
|
||||
for ( std::set<RimWellLogPlot*>::iterator pIt = srcPlots.begin(); pIt != srcPlots.end(); ++pIt )
|
||||
{
|
||||
(*pIt)->calculateAvailableDepthRange();
|
||||
( *pIt )->calculateAvailableDepthRange();
|
||||
}
|
||||
|
||||
for (std::set<RimWellLogTrack*>::iterator tIt = srcTracks.begin(); tIt != srcTracks.end(); ++tIt)
|
||||
for ( std::set<RimWellLogTrack*>::iterator tIt = srcTracks.begin(); tIt != srcTracks.end(); ++tIt )
|
||||
{
|
||||
(*tIt)->updateParentPlotZoom();
|
||||
(*tIt)->calculateXZoomRangeAndUpdateQwt();
|
||||
( *tIt )->updateParentPlotZoom();
|
||||
( *tIt )->calculateXZoomRangeAndUpdateQwt();
|
||||
}
|
||||
|
||||
destTrack->loadDataAndUpdate();
|
||||
@@ -86,54 +85,52 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogTrac
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* dstWellLogPlot,
|
||||
const std::vector<RimWellLogTrack*>& tracksToMove,
|
||||
RimWellLogTrack* trackToInsertAfter)
|
||||
void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot( RimWellLogPlot* dstWellLogPlot,
|
||||
const std::vector<RimWellLogTrack*>& tracksToMove,
|
||||
RimWellLogTrack* trackToInsertAfter )
|
||||
{
|
||||
CVF_ASSERT(dstWellLogPlot);
|
||||
CVF_ASSERT( dstWellLogPlot );
|
||||
|
||||
RiuPlotMainWindow* plotWindow = RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
|
||||
std::set<RimWellLogPlot*> srcPlots;
|
||||
|
||||
for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++)
|
||||
for ( size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++ )
|
||||
{
|
||||
RimWellLogTrack* track = tracksToMove[tIdx];
|
||||
|
||||
RimWellLogPlot* srcPlot;
|
||||
track->firstAncestorOrThisOfType(srcPlot);
|
||||
if (srcPlot)
|
||||
track->firstAncestorOrThisOfType( srcPlot );
|
||||
if ( srcPlot )
|
||||
{
|
||||
srcPlot->removeTrack(track);
|
||||
srcPlot->removeTrack( track );
|
||||
|
||||
srcPlots.insert(srcPlot);
|
||||
srcPlots.insert( srcPlot );
|
||||
}
|
||||
}
|
||||
|
||||
for (std::set<RimWellLogPlot*>::iterator pIt = srcPlots.begin(); pIt != srcPlots.end(); ++pIt)
|
||||
for ( std::set<RimWellLogPlot*>::iterator pIt = srcPlots.begin(); pIt != srcPlots.end(); ++pIt )
|
||||
{
|
||||
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>((*pIt)->viewWidget());
|
||||
plotWindow->setWidthOfMdiWindow(viewWidget, viewWidget->preferredSize().width());
|
||||
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>( ( *pIt )->viewWidget() );
|
||||
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredSize().width() );
|
||||
|
||||
(*pIt)->calculateAvailableDepthRange();
|
||||
(*pIt)->updateTrackNames();
|
||||
(*pIt)->updateDepthZoom();
|
||||
(*pIt)->updateConnectedEditors();
|
||||
( *pIt )->calculateAvailableDepthRange();
|
||||
( *pIt )->updateTrackNames();
|
||||
( *pIt )->updateDepthZoom();
|
||||
( *pIt )->updateConnectedEditors();
|
||||
}
|
||||
|
||||
|
||||
size_t insertionStartIndex = 0;
|
||||
if (trackToInsertAfter) insertionStartIndex = dstWellLogPlot->trackIndex(trackToInsertAfter) + 1;
|
||||
if ( trackToInsertAfter ) insertionStartIndex = dstWellLogPlot->trackIndex( trackToInsertAfter ) + 1;
|
||||
|
||||
for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++)
|
||||
for ( size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++ )
|
||||
{
|
||||
dstWellLogPlot->insertTrack(tracksToMove[tIdx], insertionStartIndex + tIdx);
|
||||
|
||||
dstWellLogPlot->insertTrack( tracksToMove[tIdx], insertionStartIndex + tIdx );
|
||||
}
|
||||
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>(dstWellLogPlot->viewWidget());
|
||||
plotWindow->setWidthOfMdiWindow(viewWidget, viewWidget->preferredSize().width());
|
||||
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>( dstWellLogPlot->viewWidget() );
|
||||
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredSize().width() );
|
||||
|
||||
dstWellLogPlot->updateTrackNames();
|
||||
dstWellLogPlot->updateTracks();
|
||||
|
||||
Reference in New Issue
Block a user