diff --git a/common/tool/tool_base.cpp b/common/tool/tool_base.cpp index 22d59eeb56..51177c164f 100644 --- a/common/tool/tool_base.cpp +++ b/common/tool/tool_base.cpp @@ -45,13 +45,13 @@ KIGFX::VIEW_CONTROLS* TOOL_BASE::getViewControls() const } -TOOLS_HOLDER* TOOL_BASE::getToolHolderInt() const +TOOLS_HOLDER* TOOL_BASE::getToolHolderInternal() const { return m_toolMgr->GetToolHolder(); } -EDA_ITEM* TOOL_BASE::getModelInt() const +EDA_ITEM* TOOL_BASE::getModelInternal() const { return m_toolMgr->GetModel(); } diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index 0e4884e371..3a27d79688 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -24,8 +24,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __TOOL_BASE_H -#define __TOOL_BASE_H +#ifndef TOOL_BASE_H +#define TOOL_BASE_H #include #include @@ -153,7 +153,6 @@ public: protected: friend class TOOL_MANAGER; - friend class TOOL_SETTINGS; /** * Set the #TOOL_MANAGER the tool will belong to. @@ -186,9 +185,9 @@ protected: T* getEditFrame() const { #if !defined( QA_TEST ) // Dynamic casts give the linker a seizure in the test framework - wxASSERT( dynamic_cast( getToolHolderInt() ) ); + wxASSERT( dynamic_cast( getToolHolderInternal() ) ); #endif - return static_cast( getToolHolderInt() ); + return static_cast( getToolHolderInternal() ); } /** @@ -197,30 +196,25 @@ protected: template T* getModel() const { - EDA_ITEM* m = getModelInt(); + EDA_ITEM* m = getModelInternal(); #if !defined( QA_TEST ) // Dynamic casts give the linker a seizure in the test framework wxASSERT( dynamic_cast( m ) ); #endif return static_cast( m ); } - ///< Store the type of the tool. - TOOL_TYPE m_type; - - ///< Unique identifier for the tool, assigned by a TOOL_MANAGER instance. - TOOL_ID m_toolId; - - ///< Name of the tool. Names are expected to obey the format application.ToolName - ///< (eg. pcbnew.InteractiveSelection). - std::string m_toolName; - TOOL_MANAGER* m_toolMgr; - //TOOL_SETTINGS m_toolSettings; - private: - // hide the implementation to avoid spreading half of - // kicad and wxWidgets headers to the tools that may not need them at all! - EDA_ITEM* getModelInt() const; - TOOLS_HOLDER* getToolHolderInt() const; + // hide the implementation to avoid spreading half of kicad and wxWidgets headers to the tools + // that may not need them at all! + EDA_ITEM* getModelInternal() const; + TOOLS_HOLDER* getToolHolderInternal() const; + +protected: + TOOL_TYPE m_type; + TOOL_ID m_toolId; ///< Unique id, assigned by a TOOL_MANAGER instance. + std::string m_toolName; ///< Names are expected to obey the format application.ToolName + ///< (eg. pcbnew.InteractiveSelection). + TOOL_MANAGER* m_toolMgr; }; -#endif +#endif // TOOL_BASE_H