From e928b2d8fd8c084898f0a4698d02bd8150a097b8 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sat, 24 Oct 2020 10:45:37 -0400 Subject: [PATCH] Split EDA_UNITS out from common. --- common/CMakeLists.txt | 1 + common/common.cpp | 31 ----------- common/dialogs/wx_html_report_box.h | 1 + common/eda_draw_frame.cpp | 2 +- common/eda_units.cpp | 54 ++++++++++++++++++ common/footprint_info.cpp | 1 + common/lib_table_base.cpp | 2 + common/netclass.cpp | 1 + common/page_layout/ws_data_model.cpp | 1 + common/page_layout/ws_data_model_io.cpp | 1 + common/page_layout/ws_proxy_view_item.cpp | 1 + common/plotters/GERBER_plotter.cpp | 1 + common/plotters/PDF_plotter.cpp | 1 + common/plotters/PS_plotter.cpp | 1 + common/swig/kicad.i | 2 + common/tool/actions.cpp | 1 + common/tool/common_tools.cpp | 10 ++-- common/widgets/grid_text_button_helpers.cpp | 1 + eeschema/dialogs/dialog_spice_model.cpp | 1 + eeschema/lib_field.cpp | 1 + eeschema/lib_text.cpp | 1 + eeschema/pin_type.cpp | 1 + eeschema/sch_bitmap.cpp | 2 + eeschema/sch_junction.cpp | 2 + eeschema/sch_no_connect.cpp | 1 + .../cadstar/cadstar_sch_archive_loader.h | 25 +++++---- .../cadstar/cadstar_sch_archive_parser.cpp | 1 + gerbview/dialogs/panel_gerbview_settings.cpp | 1 + gerbview/excellon_read_drill_file.cpp | 1 + gerbview/gerber_draw_item.cpp | 1 + gerbview/gerber_file_image.cpp | 1 + gerbview/job_file_reader.cpp | 1 + gerbview/rs274x.cpp | 1 + include/base_units.h | 2 +- include/common.h | 22 -------- include/eda_base_frame.h | 2 + include/eda_units.h | 55 +++++++++++++++++++ include/footprint_info.h | 1 + include/libeval_compiler/libeval_compiler.h | 1 + include/page_layout/ws_draw_item.h | 2 + include/page_layout/ws_proxy_view_item.h | 1 + include/plotter.h | 1 + include/preview_items/preview_utils.h | 2 +- include/property_mgr.h | 2 +- include/reporter.h | 2 +- kicad/tools/kicad_manager_control.cpp | 1 + kicad/tree_project_frame.cpp | 2 + pcbnew/dialogs/dialog_fp_plugin_options.cpp | 1 + pcbnew/drc/drc_engine.h | 1 + pcbnew/drc/drc_rule.h | 1 + .../cadstar/cadstar_pcb_archive_parser.cpp | 1 + pcbnew/toolbars_pcb_editor.cpp | 2 +- 52 files changed, 180 insertions(+), 76 deletions(-) create mode 100644 common/eda_units.cpp create mode 100644 include/eda_units.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 37915adcf9..b249dd200b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -325,6 +325,7 @@ set( COMMON_SRCS eda_pattern_match.cpp eda_rect.cpp eda_size_ctrl.cpp + eda_units.cpp env_paths.cpp env_vars.cpp exceptions.cpp diff --git a/common/common.cpp b/common/common.cpp index 1fb2a9a1e0..b087c17dd2 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -37,37 +37,6 @@ #include -bool IsImperialUnit( EDA_UNITS aUnit ) -{ - switch( aUnit ) - { - case EDA_UNITS::INCHES: - case EDA_UNITS::MILS: - return true; - - default: - return false; - } - - return false; -} - - -bool IsMetricUnit( EDA_UNITS aUnit ) -{ - switch( aUnit ) - { - case EDA_UNITS::MILLIMETRES: - return true; - - default: - return false; - } - - return false; -} - - wxSize GetTextSize( const wxString& aSingleLine, wxWindow* aWindow ) { wxCoord width; diff --git a/common/dialogs/wx_html_report_box.h b/common/dialogs/wx_html_report_box.h index 40efc9193e..996275c5c0 100644 --- a/common/dialogs/wx_html_report_box.h +++ b/common/dialogs/wx_html_report_box.h @@ -24,6 +24,7 @@ #include #include #include +#include /** * WX_HTML_REPORT_BOX diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 4593bef462..cad8ac836f 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -973,7 +973,7 @@ void EDA_DRAW_FRAME::GetUnitPair( EDA_UNITS& aPrimaryUnit, EDA_UNITS& aSecondary aPrimaryUnit = GetUserUnits(); aSecondaryUnits = EDA_UNITS::MILS; - if( IsImperialUnit( aPrimaryUnit ) ) + if( EDA_UNIT_UTILS::IsImperialUnit( aPrimaryUnit ) ) { if( cmnTool ) aSecondaryUnits = cmnTool->GetLastMetricUnits(); diff --git a/common/eda_units.cpp b/common/eda_units.cpp new file mode 100644 index 0000000000..b0cb1042b4 --- /dev/null +++ b/common/eda_units.cpp @@ -0,0 +1,54 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program 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 2 + * of the License, or (at your option) any later version. + * + * This program 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +bool EDA_UNIT_UTILS::IsImperialUnit( EDA_UNITS aUnit ) +{ + switch( aUnit ) + { + case EDA_UNITS::INCHES: + case EDA_UNITS::MILS: + return true; + + default: + return false; + } + + return false; +} + + +bool EDA_UNIT_UTILS::IsMetricUnit( EDA_UNITS aUnit ) +{ + switch( aUnit ) + { + case EDA_UNITS::MILLIMETRES: + return true; + + default: + return false; + } + + return false; +} diff --git a/common/footprint_info.cpp b/common/footprint_info.cpp index 62983c5e68..316d16dcd5 100644 --- a/common/footprint_info.cpp +++ b/common/footprint_info.cpp @@ -40,6 +40,7 @@ #include #include #include +#include FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aLibNickname, diff --git a/common/lib_table_base.cpp b/common/lib_table_base.cpp index 4e71752a01..4b987489b2 100644 --- a/common/lib_table_base.cpp +++ b/common/lib_table_base.cpp @@ -29,9 +29,11 @@ #include +#include #include #include #include +#include #include diff --git a/common/netclass.cpp b/common/netclass.cpp index 6ce1288509..560433b776 100644 --- a/common/netclass.cpp +++ b/common/netclass.cpp @@ -24,6 +24,7 @@ */ #include +#include #include // This will get mapped to "kicad_default" in the specctra_export. diff --git a/common/page_layout/ws_data_model.cpp b/common/page_layout/ws_data_model.cpp index 0a3551c2d2..93298c3697 100644 --- a/common/page_layout/ws_data_model.cpp +++ b/common/page_layout/ws_data_model.cpp @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/common/page_layout/ws_data_model_io.cpp b/common/page_layout/ws_data_model_io.cpp index 4019e65ef1..dab5bc164d 100644 --- a/common/page_layout/ws_data_model_io.cpp +++ b/common/page_layout/ws_data_model_io.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/common/page_layout/ws_proxy_view_item.cpp b/common/page_layout/ws_proxy_view_item.cpp index 601053d2d4..0f64783675 100644 --- a/common/page_layout/ws_proxy_view_item.cpp +++ b/common/page_layout/ws_proxy_view_item.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include using namespace KIGFX; diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 7407904d0a..699a270de8 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include // for KiROUND #include #include diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index ad069b2c84..bba5e6de92 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include // for KiROUND #include diff --git a/common/plotters/PS_plotter.cpp b/common/plotters/PS_plotter.cpp index ba975ea2f1..c2a1b65b63 100644 --- a/common/plotters/PS_plotter.cpp +++ b/common/plotters/PS_plotter.cpp @@ -29,6 +29,7 @@ #include #include +#include #include // for KiROUND #include #include diff --git a/common/swig/kicad.i b/common/swig/kicad.i index 24bb51299a..d4569b35f2 100644 --- a/common/swig/kicad.i +++ b/common/swig/kicad.i @@ -86,6 +86,7 @@ principle should be easily implemented by adapting the current STL containers. #include #include #include + #include #include #include #include @@ -116,6 +117,7 @@ principle should be easily implemented by adapting the current STL containers. %include core/typeinfo.h %include eda_item.h %include eda_rect.h +%include eda_units.h %include common.h %include richio.h %include title_block.h diff --git a/common/tool/actions.cpp b/common/tool/actions.cpp index cf95fb088a..f8c3e8ac88 100644 --- a/common/tool/actions.cpp +++ b/common/tool/actions.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/common/tool/common_tools.cpp b/common/tool/common_tools.cpp index 1e4a1ef047..45b0ed07fb 100644 --- a/common/tool/common_tools.cpp +++ b/common/tool/common_tools.cpp @@ -72,9 +72,9 @@ void COMMON_TOOLS::Reset( RESET_REASON aReason ) void COMMON_TOOLS::SetLastUnits( EDA_UNITS aUnit ) { - if( IsImperialUnit( aUnit ) ) + if( EDA_UNIT_UTILS::IsImperialUnit( aUnit ) ) m_imperialUnit = aUnit; - else if( IsMetricUnit( aUnit ) ) + else if( EDA_UNIT_UTILS::IsMetricUnit( aUnit ) ) m_metricUnit = aUnit; else wxASSERT_MSG( false, "Invalid unit" ); @@ -514,9 +514,9 @@ int COMMON_TOOLS::SwitchUnits( const TOOL_EVENT& aEvent ) { EDA_UNITS newUnit = aEvent.Parameter(); - if( IsMetricUnit( newUnit ) ) + if( EDA_UNIT_UTILS::IsMetricUnit( newUnit ) ) m_metricUnit = newUnit; - else if( IsImperialUnit( newUnit ) ) + else if( EDA_UNIT_UTILS::IsImperialUnit( newUnit ) ) m_imperialUnit = newUnit; else wxASSERT_MSG( false, "Invalid unit for the frame" ); @@ -528,7 +528,7 @@ int COMMON_TOOLS::SwitchUnits( const TOOL_EVENT& aEvent ) int COMMON_TOOLS::ToggleUnits( const TOOL_EVENT& aEvent ) { - m_frame->ChangeUserUnits( IsImperialUnit( m_frame->GetUserUnits() ) ? + m_frame->ChangeUserUnits( EDA_UNIT_UTILS::IsImperialUnit( m_frame->GetUserUnits() ) ? m_metricUnit : m_imperialUnit ); return 0; diff --git a/common/widgets/grid_text_button_helpers.cpp b/common/widgets/grid_text_button_helpers.cpp index a8170fd61b..1a75428b9c 100644 --- a/common/widgets/grid_text_button_helpers.cpp +++ b/common/widgets/grid_text_button_helpers.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/eeschema/dialogs/dialog_spice_model.cpp b/eeschema/dialogs/dialog_spice_model.cpp index dd1bc79119..580e4d52a0 100644 --- a/eeschema/dialogs/dialog_spice_model.cpp +++ b/eeschema/dialogs/dialog_spice_model.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index dfc3b98570..b19f3bad2f 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index 63d59970df..06b9495d4f 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -25,6 +25,7 @@ * @file lib_text.cpp */ +#include #include #include #include diff --git a/eeschema/pin_type.cpp b/eeschema/pin_type.cpp index b1ea7143df..8781884a10 100644 --- a/eeschema/pin_type.cpp +++ b/eeschema/pin_type.cpp @@ -24,6 +24,7 @@ #include #include #include +#include // These are true singletons so it's OK for them to be globals. diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp index 5d62a7b268..3ae79c7926 100644 --- a/eeschema/sch_bitmap.cpp +++ b/eeschema/sch_bitmap.cpp @@ -31,7 +31,9 @@ #include #include #include +#include #include +#include #include #include diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp index 01b8bd4738..5dbf3bf448 100644 --- a/eeschema/sch_junction.cpp +++ b/eeschema/sch_junction.cpp @@ -28,8 +28,10 @@ #include #include +#include #include #include +#include #include #include diff --git a/eeschema/sch_no_connect.cpp b/eeschema/sch_no_connect.cpp index 3b64792613..6631f47b04 100644 --- a/eeschema/sch_no_connect.cpp +++ b/eeschema/sch_no_connect.cpp @@ -34,6 +34,7 @@ #include #include #include // For some default values +#include #include diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.h b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.h index 267493aee3..a04d7e19c2 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.h +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_loader.h @@ -31,6 +31,7 @@ #include // SCH_LAYER_ID #include // PLOT_DASH_TYPE #include +#include class EDA_TEXT; class LABEL_SPIN_STYLE; @@ -65,8 +66,8 @@ public: /** * @brief Loads a CADSTAR PCB Archive file into the KiCad BOARD object given - * @param aSchematic Schematic to add the design onto - * @param aRootSheet Root sheet to add the design onto + * @param aSchematic Schematic to add the design onto + * @param aRootSheet Root sheet to add the design onto */ void Load( ::SCHEMATIC* aSchematic, ::SCH_SHEET* aRootSheet, SCH_PLUGIN::SCH_PLUGIN_RELEASER* aSchPlugin, wxFileName aLibraryFileName ); @@ -200,9 +201,9 @@ private: } /** - * @brief - * @param aCadstarAngle - * @return + * @brief + * @param aCadstarAngle + * @return */ double getAngleTenthDegree( const long long& aCadstarAngle ) { @@ -210,9 +211,9 @@ private: } /** - * @brief - * @param aCadstarAngle - * @return + * @brief + * @param aCadstarAngle + * @return */ double getAngleDegrees( const long long& aCadstarAngle ) { @@ -220,15 +221,15 @@ private: } /** - * @brief - * @param aPoint + * @brief + * @param aPoint * @return Angle in decidegrees of the polar representation of the point, scaled 0..360 */ double getPolarAngle( wxPoint aPoint ); /** - * @brief - * @param aPoint + * @brief + * @param aPoint * @return Radius of polar representation of the point */ double getPolarRadius( wxPoint aPoint ); diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp index 750cf4bbc1..0da72015ca 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_parser.cpp @@ -24,6 +24,7 @@ */ #include // SCH_IU_PER_MM +#include #include diff --git a/gerbview/dialogs/panel_gerbview_settings.cpp b/gerbview/dialogs/panel_gerbview_settings.cpp index 3fd8099aa5..8449f576d2 100644 --- a/gerbview/dialogs/panel_gerbview_settings.cpp +++ b/gerbview/dialogs/panel_gerbview_settings.cpp @@ -21,6 +21,7 @@ #include #include +#include #include "panel_gerbview_settings.h" diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index 98cfdea7b5..699dea26c4 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include diff --git a/gerbview/gerber_draw_item.cpp b/gerbview/gerber_draw_item.cpp index 72a7a914c8..bb2b8ad0fa 100644 --- a/gerbview/gerber_draw_item.cpp +++ b/gerbview/gerber_draw_item.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/gerbview/gerber_file_image.cpp b/gerbview/gerber_file_image.cpp index 119864fdec..ad54518885 100644 --- a/gerbview/gerber_file_image.cpp +++ b/gerbview/gerber_file_image.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/gerbview/job_file_reader.cpp b/gerbview/job_file_reader.cpp index f60093ab5d..c07df321ea 100644 --- a/gerbview/job_file_reader.cpp +++ b/gerbview/job_file_reader.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index da5c2f3aad..a3f7d29831 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/include/base_units.h b/include/base_units.h index 2eaadc3211..c08f01350b 100644 --- a/include/base_units.h +++ b/include/base_units.h @@ -34,7 +34,7 @@ #include -#include +#include #include #include // for KiROUND #include diff --git a/include/common.h b/include/common.h index 1871c62b36..e6e78708f7 100644 --- a/include/common.h +++ b/include/common.h @@ -61,28 +61,6 @@ class REPORTER; #define TEXT_ANGLE_HORIZ 0 #define TEXT_ANGLE_VERT 900 -/** - * The type of unit. - */ -enum class EDA_DATA_TYPE -{ - DISTANCE = 0, - AREA = 1, - VOLUME = 2 -}; - -enum class EDA_UNITS -{ - INCHES = 0, - MILLIMETRES = 1, - UNSCALED = 2, - DEGREES = 3, - PERCENT = 4, - MILS = 5, -}; - -bool IsImperialUnit( EDA_UNITS aUnit ); -bool IsMetricUnit( EDA_UNITS aUnit ); /** * Return the size of @a aSingleLine of text when it is rendered in @a aWindow diff --git a/include/eda_base_frame.h b/include/eda_base_frame.h index 4808f44a42..58eccedf45 100644 --- a/include/eda_base_frame.h +++ b/include/eda_base_frame.h @@ -48,6 +48,7 @@ #include #include #include +#include // Option for main frames #define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS @@ -74,6 +75,7 @@ class DIALOG_EDIT_LIBRARY_TABLES; class PANEL_HOTKEYS_EDITOR; class FILE_HISTORY; class SETTINGS_MANAGER; +class SEARCH_STACK; class APP_SETTINGS_BASE; class WX_INFOBAR; struct WINDOW_SETTINGS; diff --git a/include/eda_units.h b/include/eda_units.h new file mode 100644 index 0000000000..c0422f8b34 --- /dev/null +++ b/include/eda_units.h @@ -0,0 +1,55 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program 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 2 + * of the License, or (at your option) any later version. + * + * This program 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 for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#ifndef EDA_UNITS_H +#define EDA_UNITS_H + +/** + * The type of unit. + */ +enum class EDA_DATA_TYPE +{ + DISTANCE = 0, + AREA = 1, + VOLUME = 2 +}; + +enum class EDA_UNITS +{ + INCHES = 0, + MILLIMETRES = 1, + UNSCALED = 2, + DEGREES = 3, + PERCENT = 4, + MILS = 5, +}; + +namespace EDA_UNIT_UTILS +{ + bool IsImperialUnit( EDA_UNITS aUnit ); + + bool IsMetricUnit( EDA_UNITS aUnit ); +} + +#endif \ No newline at end of file diff --git a/include/footprint_info.h b/include/footprint_info.h index 0f3d26d541..f0240bf5de 100644 --- a/include/footprint_info.h +++ b/include/footprint_info.h @@ -47,6 +47,7 @@ class FOOTPRINT_ASYNC_LOADER; class PROGRESS_REPORTER; class wxTopLevelWindow; class KIWAY; +class wxTextFile; /* diff --git a/include/libeval_compiler/libeval_compiler.h b/include/libeval_compiler/libeval_compiler.h index 5175793aa5..ab6bf07f19 100644 --- a/include/libeval_compiler/libeval_compiler.h +++ b/include/libeval_compiler/libeval_compiler.h @@ -28,6 +28,7 @@ #include #include +#include #if defined(WIN32) // This gets leaked by python headers on MSVC only and will cause chaos diff --git a/include/page_layout/ws_draw_item.h b/include/page_layout/ws_draw_item.h index dd68881590..97737f988a 100644 --- a/include/page_layout/ws_draw_item.h +++ b/include/page_layout/ws_draw_item.h @@ -31,6 +31,7 @@ #include #include "msgpanel.h" #include +#include #include #include @@ -40,6 +41,7 @@ class TITLE_BLOCK; class PAGE_INFO; class EDA_ITEM; class EDA_DRAW_FRAME; +class PROJECT; /** * Helper classes to handle basic graphic items used to draw/plot diff --git a/include/page_layout/ws_proxy_view_item.h b/include/page_layout/ws_proxy_view_item.h index bb58594dc9..378901f2a2 100644 --- a/include/page_layout/ws_proxy_view_item.h +++ b/include/page_layout/ws_proxy_view_item.h @@ -30,6 +30,7 @@ class BOARD; class PAGE_INFO; +class PROJECT; class TITLE_BLOCK; class WS_DRAW_ITEM_LINE; class WS_DRAW_ITEM_RECT; diff --git a/include/plotter.h b/include/plotter.h index e795195a3c..f064238cf7 100644 --- a/include/plotter.h +++ b/include/plotter.h @@ -45,6 +45,7 @@ class COLOR_SETTINGS; class SHAPE_POLY_SET; class SHAPE_LINE_CHAIN; class GBR_NETLIST_METADATA; +class PROJECT; using KIGFX::RENDER_SETTINGS; diff --git a/include/preview_items/preview_utils.h b/include/preview_items/preview_utils.h index e37ec19ec4..d1f0f93211 100644 --- a/include/preview_items/preview_utils.h +++ b/include/preview_items/preview_utils.h @@ -24,7 +24,7 @@ #ifndef PREVIEW_PREVIEW_UTILS__H_ #define PREVIEW_PREVIEW_UTILS__H_ -#include +#include #include #include diff --git a/include/property_mgr.h b/include/property_mgr.h index 665e1317fa..7975e9d85e 100644 --- a/include/property_mgr.h +++ b/include/property_mgr.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include class PROPERTY_BASE; class TYPE_CAST_BASE; diff --git a/include/reporter.h b/include/reporter.h index 050dbfc4aa..aad9139d1d 100644 --- a/include/reporter.h +++ b/include/reporter.h @@ -25,8 +25,8 @@ #ifndef _REPORTER_H_ #define _REPORTER_H_ +#include #include -#include #include /** diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index 2ecc64e297..ca01a35073 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -31,6 +31,7 @@ #include #include #include +#include ///> Helper widget to select whether a new directory should be created for a project class DIR_CHECKBOX : public wxPanel diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 4074c71b35..726a372d8e 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -36,7 +36,9 @@ #include #include +#include #include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_fp_plugin_options.cpp b/pcbnew/dialogs/dialog_fp_plugin_options.cpp index d500527328..818a214456 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options.cpp +++ b/pcbnew/dialogs/dialog_fp_plugin_options.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #define INITIAL_HELP \ diff --git a/pcbnew/drc/drc_engine.h b/pcbnew/drc/drc_engine.h index 565b23ee31..7fd3aaa098 100644 --- a/pcbnew/drc/drc_engine.h +++ b/pcbnew/drc/drc_engine.h @@ -43,6 +43,7 @@ class NETLIST; class NETINFO_ITEM; class PROGRESS_REPORTER; class REPORTER; +class wxFileName; namespace KIGFX { diff --git a/pcbnew/drc/drc_rule.h b/pcbnew/drc/drc_rule.h index 8ed33ed045..bba852a11b 100644 --- a/pcbnew/drc/drc_rule.h +++ b/pcbnew/drc/drc_rule.h @@ -30,6 +30,7 @@ #include #include #include +#include class BOARD_ITEM; class PCB_EXPR_UCODE; diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp index c787464622..02d141f777 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp @@ -25,6 +25,7 @@ #include #include // PCB_IU_PER_MM +#include void CADSTAR_PCB_ARCHIVE_PARSER::Parse() diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index 02ec05e254..6004053952 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -627,7 +627,7 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool a EDA_UNITS primaryUnit = GetUserUnits(); EDA_UNITS secondaryUnit = EDA_UNITS::MILS; - if( IsImperialUnit( primaryUnit ) ) + if( EDA_UNIT_UTILS::IsImperialUnit( primaryUnit ) ) { if( cmnTool ) secondaryUnit = cmnTool->GetLastMetricUnits();