From 630baa37241845eb9929189686e9820e1fc5327e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 20 Nov 2018 15:30:18 +0100 Subject: [PATCH] Code formatting --- eeschema/sch_view.cpp | 33 ++++++++++++++++----------------- eeschema/sch_view.h | 8 ++++---- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/eeschema/sch_view.cpp b/eeschema/sch_view.cpp index 29d947ff4d..43eca69390 100644 --- a/eeschema/sch_view.cpp +++ b/eeschema/sch_view.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013-2017 CERN + * Copyright (C) 2013-2018 CERN * @author Tomasz Wlostowski * @author Maciej Suminski * @@ -66,7 +66,7 @@ SCH_VIEW::~SCH_VIEW() } -void SCH_VIEW::ResizeSheetWorkingArea( SCH_SCREEN *aScreen ) +void SCH_VIEW::ResizeSheetWorkingArea( SCH_SCREEN* aScreen ) { const PAGE_INFO& page_info = aScreen->GetPageSettings(); // A full size = 3 * page size allows a wide margin around the worksheet. @@ -96,8 +96,8 @@ void SCH_VIEW::DisplaySheet( SCH_SCREEN *aScreen ) ResizeSheetWorkingArea( aScreen ); - m_selectionArea.reset( new KIGFX::PREVIEW::SELECTION_AREA( ) ); - m_preview.reset( new KIGFX::VIEW_GROUP () ); + m_selectionArea.reset( new KIGFX::PREVIEW::SELECTION_AREA() ); + m_preview.reset( new KIGFX::VIEW_GROUP() ); Add( m_worksheet.get() ); Add( m_selectionArea.get() ); @@ -105,24 +105,24 @@ void SCH_VIEW::DisplaySheet( SCH_SCREEN *aScreen ) } -void SCH_VIEW::DisplaySheet( SCH_SHEET *aSheet ) +void SCH_VIEW::DisplaySheet( SCH_SHEET* aSheet ) { DisplaySheet( aSheet->GetScreen() ); } -void SCH_VIEW::DisplayComponent( LIB_PART *aPart ) +void SCH_VIEW::DisplayComponent( LIB_PART* aPart ) { Clear(); if( !aPart ) return; - for ( auto &item : aPart->GetDrawItems() ) + for( auto& item : aPart->GetDrawItems() ) Add( &item ); - m_selectionArea.reset( new KIGFX::PREVIEW::SELECTION_AREA( ) ); - m_preview.reset( new KIGFX::VIEW_GROUP () ); + m_selectionArea.reset( new KIGFX::PREVIEW::SELECTION_AREA() ); + m_preview.reset( new KIGFX::VIEW_GROUP() ); Add( m_selectionArea.get() ); Add( m_preview.get() ); } @@ -140,12 +140,12 @@ void SCH_VIEW::ClearPreview() } -void SCH_VIEW::AddToPreview( EDA_ITEM *aItem, bool takeOwnership ) +void SCH_VIEW::AddToPreview( EDA_ITEM* aItem, bool aTakeOwnership ) { Hide( aItem, false ); m_preview->Add( aItem ); - if( takeOwnership ) + if( aTakeOwnership ) m_ownedItems.push_back( aItem ); SetVisible( m_preview.get(), true ); @@ -154,7 +154,7 @@ void SCH_VIEW::AddToPreview( EDA_ITEM *aItem, bool takeOwnership ) } -void SCH_VIEW::ShowSelectionArea( bool aShow ) +void SCH_VIEW::ShowSelectionArea( bool aShow ) { if( aShow ) { @@ -168,7 +168,7 @@ void SCH_VIEW::ShowSelectionArea( bool aShow ) } -void SCH_VIEW::ShowPreview( bool aShow ) +void SCH_VIEW::ShowPreview( bool aShow ) { SetVisible( m_preview.get(), aShow ); } @@ -177,15 +177,14 @@ void SCH_VIEW::ShowPreview( bool aShow ) void SCH_VIEW::ClearHiddenFlags() { for( auto item : *m_allItems ) - Hide ( item, false ); + Hide( item, false ); } void SCH_VIEW::HideWorksheet() { -// SetVisible( m_worksheet.get(), false ); + // SetVisible( m_worksheet.get(), false ); } -}; - +}; // namespace KIGFX diff --git a/eeschema/sch_view.h b/eeschema/sch_view.h index 2a2154bd5b..bdabb2455e 100644 --- a/eeschema/sch_view.h +++ b/eeschema/sch_view.h @@ -74,9 +74,9 @@ public: SCH_VIEW( bool aIsDynamic, SCH_BASE_FRAME* aFrame ); ~SCH_VIEW(); - void DisplaySheet( SCH_SHEET *aSheet ); - void DisplaySheet( SCH_SCREEN *aScreen ); - void DisplayComponent( LIB_PART *aPart ); + void DisplaySheet( SCH_SHEET* aSheet ); + void DisplaySheet( SCH_SCREEN* aScreen ); + void DisplayComponent( LIB_PART* aPart ); // Call it to set new draw area limits (max working and draw area size) void ResizeSheetWorkingArea( SCH_SCREEN *aScreen ); @@ -86,7 +86,7 @@ public: KIGFX::VIEW_GROUP* GetPreview() const { return m_preview.get(); } void ClearPreview(); - void AddToPreview( EDA_ITEM *aItem, bool takeOwnership = true ); + void AddToPreview( EDA_ITEM* aItem, bool aTakeOwnership = true ); void ShowSelectionArea( bool aShow = true ); void ShowPreview( bool aShow = true );