Janitor : Apply clang-format fixes on codebase in ApplicationCode

This commit is contained in:
Magne Sjaastad
2019-11-04 11:34:34 +01:00
parent c5e3bc6898
commit 96a26662fc
77 changed files with 2339 additions and 2402 deletions

View File

@@ -44,9 +44,9 @@ void RicCompareTo3dViewFeature::onActionTriggered( bool isChecked )
RimGridView* activeView = RiaApplication::instance()->activeGridView();
QVariant userData = this->userData();
auto view = static_cast<Rim3dView*>(userData.value<void*>());
auto view = static_cast<Rim3dView*>( userData.value<void*>() );
if (view && activeView)
if ( view && activeView )
{
activeView->setComparisonView( view );
activeView->scheduleCreateDisplayModelAndRedraw();
@@ -60,15 +60,13 @@ void RicCompareTo3dViewFeature::setupActionLook( QAction* actionToSetup )
{
QVariant userData = actionToSetup->data();
auto view = static_cast<Rim3dView*>(userData.value<void*>());
auto view = static_cast<Rim3dView*>( userData.value<void*>() );
if ( view )
{
actionToSetup->setIcon(view->uiIconProvider().icon() );
actionToSetup->setIcon( view->uiIconProvider().icon() );
}
else
{
actionToSetup->setIcon(QIcon(":/ComparisonView16x16.png"));
actionToSetup->setIcon( QIcon( ":/ComparisonView16x16.png" ) );
}
}

View File

@@ -33,5 +33,3 @@ protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};

View File

@@ -103,7 +103,10 @@ public:
RicLinkVisibleViewsFeature::linkViews( m_viewsToLink );
}
const std::vector<RimGridView*>& viewsToLink() { return m_viewsToLink;}
const std::vector<RimGridView*>& viewsToLink()
{
return m_viewsToLink;
}
private:
std::vector<RimGridView*> m_viewsToLink;
@@ -138,7 +141,6 @@ void RicLinkViewFeature::setupActionLook( QAction* actionToSetup )
RicLinkViewFeatureImpl cmdImpl;
cmdImpl.prepareToExecute();
if ( cmdImpl.viewsToLink().size() >= 2u )
{
actionToSetup->setText( "Link Selected Views" );
@@ -147,13 +149,13 @@ void RicLinkViewFeature::setupActionLook( QAction* actionToSetup )
else
{
actionToSetup->setText( "Link View" );
if (RiaApplication::instance()->project()->viewLinkerCollection()->viewLinker())
if ( RiaApplication::instance()->project()->viewLinkerCollection()->viewLinker() )
{
actionToSetup->setIcon(QIcon(":/ControlledView16x16.png"));
actionToSetup->setIcon( QIcon( ":/ControlledView16x16.png" ) );
}
else
{
actionToSetup->setIcon(QIcon(":/MasterView16x16.png"));
actionToSetup->setIcon( QIcon( ":/MasterView16x16.png" ) );
}
}
}

View File

@@ -85,5 +85,3 @@ void RicRemoveComparison3dViewFeature::setupActionLook( QAction* actionToSetup )
actionToSetup->setText( "Remove Comparison" );
actionToSetup->setIcon( QIcon( ":/RemoveComparisonView16x16.png" ) );
}

View File

@@ -33,5 +33,3 @@ protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};

View File

@@ -30,8 +30,8 @@
#include "cafCmdFeatureManager.h"
#include "cafSelectionManager.h"
#include <QAction>
#include "RimViewLinkerCollection.h"
#include <QAction>
CAF_CMD_SOURCE_INIT( RicUnLinkViewFeature, "RicUnLinkViewFeature" );
@@ -68,7 +68,8 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
{
viewController->applyRangeFilterCollectionByUserChoice();
delete viewController;
viewLinker->removeViewController( nullptr ); // Remove the slots in the vector that was set to nullptr by the destructor
viewLinker->removeViewController(
nullptr ); // Remove the slots in the vector that was set to nullptr by the destructor
}
else if ( viewLinker )
{
@@ -78,7 +79,7 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
if ( firstControlledView )
{
viewLinker->setMasterView(firstControlledView);
viewLinker->setMasterView( firstControlledView );
viewLinker->updateDependentViews();
}
@@ -86,7 +87,7 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
{
// Remove the view linker object from the view linker collection
// viewLinkerCollection->viewLinker is a PdmChildField containing one RimViewLinker child object
RiaApplication::instance()->project()->viewLinkerCollection->viewLinker.removeChildObject(viewLinker);
RiaApplication::instance()->project()->viewLinkerCollection->viewLinker.removeChildObject( viewLinker );
delete viewLinker;
}