diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index bbe7d2934f..7c195331d7 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -32,7 +32,7 @@ set(GAL_SRCS # Common part drawpanel_gal.cpp painter.cpp - worksheet_item.cpp + worksheet_viewitem.cpp gal/graphics_abstraction_layer.cpp gal/stroke_font.cpp gal/color4d.cpp diff --git a/common/worksheet_item.cpp b/common/worksheet_viewitem.cpp similarity index 86% rename from common/worksheet_item.cpp rename to common/worksheet_viewitem.cpp index e46d3e2822..80028a3236 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_viewitem.cpp @@ -23,11 +23,11 @@ */ /** - * @file worksheet_item.cpp + * @file worksheet_viewitem.cpp * @brief Class that handles properties and drawing of worksheet layout. */ -#include +#include #include #include #include @@ -36,28 +36,28 @@ using namespace KiGfx; -WORKSHEET_ITEM::WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, +WORKSHEET_VIEWITEM::WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ) : EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type m_fileName( aFileName ), m_sheetName( aSheetName ), m_titleBlock( aTitleBlock ), m_pageInfo( aPageInfo ), m_sheetNumber( 1 ), m_sheetCount( 1 ) {} -void WORKSHEET_ITEM::SetPageInfo( const PAGE_INFO* aPageInfo ) +void WORKSHEET_VIEWITEM::SetPageInfo( const PAGE_INFO* aPageInfo ) { m_pageInfo = aPageInfo; ViewUpdate( GEOMETRY ); } -void WORKSHEET_ITEM::SetTitleBlock( const TITLE_BLOCK* aTitleBlock ) +void WORKSHEET_VIEWITEM::SetTitleBlock( const TITLE_BLOCK* aTitleBlock ) { m_titleBlock = aTitleBlock; ViewUpdate( GEOMETRY ); } -const BOX2I WORKSHEET_ITEM::ViewBBox() const +const BOX2I WORKSHEET_VIEWITEM::ViewBBox() const { BOX2I bbox; @@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const } -void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const +void WORKSHEET_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const { RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings(); wxString fileName( m_fileName.c_str(), wxConvUTF8 ); @@ -128,14 +128,14 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const } -void WORKSHEET_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const +void WORKSHEET_VIEWITEM::ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 1; aLayers[0] = ITEM_GAL_LAYER( WORKSHEET ); } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const { aGal->SetIsStroke( true ); aGal->SetIsFill( false ); @@ -145,7 +145,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const { aGal->SetIsStroke( true ); aGal->SetIsFill( false ); @@ -155,7 +155,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const { std::deque corners; BOOST_FOREACH( wxPoint point, aItem->m_Corners ) @@ -181,7 +181,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const { VECTOR2D position( aItem->GetTextPosition().x, aItem->GetTextPosition().y ); @@ -192,7 +192,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::drawBorder( GAL* aGal ) const +void WORKSHEET_VIEWITEM::drawBorder( GAL* aGal ) const { VECTOR2D origin = VECTOR2D( 0.0, 0.0 ); VECTOR2D end = VECTOR2D( m_pageInfo->GetWidthMils() * 25400, diff --git a/include/worksheet_item.h b/include/worksheet_viewitem.h similarity index 94% rename from include/worksheet_item.h rename to include/worksheet_viewitem.h index 8b2b7d2165..fd7595f626 100644 --- a/include/worksheet_item.h +++ b/include/worksheet_viewitem.h @@ -23,12 +23,12 @@ */ /** - * @file worksheet_item.h + * @file worksheet_viewitem.h * @brief Class that handles properties and drawing of worksheet layout. */ -#ifndef WORKSHEET_ITEM_H -#define WORKSHEET_ITEM_H +#ifndef WORKSHEET_VIEWITEM_H +#define WORKSHEET_VIEWITEM_H #include @@ -44,10 +44,10 @@ namespace KiGfx { class GAL; -class WORKSHEET_ITEM : public EDA_ITEM +class WORKSHEET_VIEWITEM : public EDA_ITEM { public: - WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, + WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ); /** @@ -159,4 +159,4 @@ protected: }; } -#endif /* WORKSHEET_ITEM_H */ +#endif /* WORKSHEET_VIEWITEM_H */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index c41f2cf618..472992216e 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include @@ -240,7 +240,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const } // Add an entry for the worksheet layout - KiGfx::WORKSHEET_ITEM* worksheet = new KiGfx::WORKSHEET_ITEM( + KiGfx::WORKSHEET_VIEWITEM* worksheet = new KiGfx::WORKSHEET_VIEWITEM( std::string( aBoard->GetFileName().mb_str() ), std::string( GetScreenDesc().mb_str() ), &GetPageSettings(), &GetTitleBlock() );