Browse Source

Gerbview: code cleanup. Remove many include, now useless.

pull/16/head
jean-pierre charras 5 years ago
parent
commit
04aa5519d0
  1. 1
      gerbview/DCodeSelectionbox.cpp
  2. 7
      gerbview/am_primitive.cpp
  3. 2
      gerbview/clear_gbr_drawlayers.cpp
  4. 2
      gerbview/dcode.cpp
  5. 21
      gerbview/dialogs/panel_gerbview_settings.cpp
  6. 1
      gerbview/events_called_functions.cpp
  7. 2
      gerbview/export_to_pcbnew.cpp
  8. 2
      gerbview/files.cpp
  9. 1
      gerbview/gbr_layer_box_selector.cpp
  10. 3
      gerbview/gbr_layout.cpp
  11. 2
      gerbview/gbr_layout.h
  12. 3
      gerbview/gerber_draw_item.cpp
  13. 3
      gerbview/gerber_file_image.cpp
  14. 2
      gerbview/gerber_file_image_list.cpp
  15. 12
      gerbview/gerbview.cpp
  16. 7
      gerbview/gerbview.h
  17. 2
      gerbview/gerbview_frame.cpp
  18. 3
      gerbview/gerbview_layer_widget.cpp
  19. 2
      gerbview/gerbview_printout.cpp
  20. 1
      gerbview/job_file_reader.cpp
  21. 3
      gerbview/readgerb.cpp
  22. 2
      gerbview/rs274_read_XY_and_IJ_coordinates.cpp
  23. 3
      gerbview/rs274d.cpp
  24. 3
      gerbview/rs274x.cpp
  25. 3
      gerbview/toolbars_gerber.cpp

1
gerbview/DCodeSelectionbox.cpp

@ -22,7 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <wx/aui/aui.h>
#include <pgm_base.h>
#include <dcode.h>

7
gerbview/am_primitive.cpp

@ -7,7 +7,7 @@
*
* Copyright (C) 1992-2017 Jean-Pierre Charras <jp.charras at wanadoo.fr>
* Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
* 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
@ -27,18 +27,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <trigo.h>
#include <convert_to_biu.h>
#include <convert_basic_shapes_to_polygon.h>
#include <gr_basic.h>
#include <math/util.h> // for KiROUND
#include <gerbview.h>
#include <gerber_file_image.h>
#include <gr_basic.h>
/**

2
gerbview/clear_gbr_drawlayers.cpp

@ -27,7 +27,7 @@
* @brief erase a given or all draw layers, an free memory relative to the cleared layer(s)
*/
#include <fctsys.h>
//#include <fctsys.h>
#include <confirm.h>
#include <gerbview_frame.h>
#include <gerber_file_image.h>

2
gerbview/dcode.cpp

@ -28,8 +28,6 @@
* @brief D_CODE class implementation
*/
#include <fctsys.h>
#include <common.h>
#include <trigo.h>
#include <gerbview_frame.h>
#include <gerber_file_image.h>

21
gerbview/dialogs/panel_gerbview_settings.cpp

@ -19,14 +19,25 @@
*/
#include <fctsys.h>
#include <common.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include "panel_gerbview_settings.h"
/// List of page sizes
static const wxChar* gerberPageSizeList[] =
{
wxT( "GERBER" ), // index 0: full size page selection
wxT( "A4" ),
wxT( "A3" ),
wxT( "A2" ),
wxT( "A" ),
wxT( "B" ),
wxT( "C" ),
};
PANEL_GERBVIEW_SETTINGS::PANEL_GERBVIEW_SETTINGS( GERBVIEW_FRAME *aFrame, wxWindow* aWindow ) :
PANEL_GERBVIEW_SETTINGS_BASE( aWindow, wxID_ANY ),
m_Parent( aFrame )
@ -40,9 +51,9 @@ bool PANEL_GERBVIEW_SETTINGS::TransferDataToWindow( )
m_BoxUnits->SetSelection( ( m_Parent->GetUserUnits() == EDA_UNITS::MILLIMETRES ) ? 1 : 0 );
m_ShowPageLimitsOpt->SetValue( m_Parent->GetDisplayOptions().m_DisplayPageLimits );
for( unsigned i = 0; i < arrayDim( g_GerberPageSizeList ); ++i )
for( unsigned i = 0; i < arrayDim( gerberPageSizeList ); ++i )
{
if( g_GerberPageSizeList[i] == m_Parent->GetPageSettings().GetType() )
if( gerberPageSizeList[i] == m_Parent->GetPageSettings().GetType() )
{
m_PageSize->SetSelection( i );
break;
@ -62,7 +73,7 @@ bool PANEL_GERBVIEW_SETTINGS::TransferDataFromWindow()
auto opts = m_Parent->GetDisplayOptions();
opts.m_DisplayPageLimits = m_ShowPageLimitsOpt->GetValue();
PAGE_INFO pageInfo( g_GerberPageSizeList[ m_PageSize->GetSelection() ] );
PAGE_INFO pageInfo( gerberPageSizeList[ m_PageSize->GetSelection() ] );
m_Parent->SetPageSettings( pageInfo );
m_Parent->UpdateDisplayOptions( opts );

1
gerbview/events_called_functions.cpp

@ -22,7 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <gestfich.h>
#include <gerbview.h>

2
gerbview/export_to_pcbnew.cpp

@ -29,8 +29,6 @@
#include <vector>
#include <fctsys.h>
#include <common.h>
#include <confirm.h>
#include <macros.h>
#include <trigo.h>

2
gerbview/files.cpp

@ -22,10 +22,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
#include <common.h>
#include <reporter.h>
#include <html_messagebox.h>
#include <gerbview_frame.h>

1
gerbview/gbr_layer_box_selector.cpp

@ -29,7 +29,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <common.h>
#include <gerbview_frame.h>
#include <gerber_file_image_list.h>

3
gerbview/gbr_layout.cpp

@ -22,9 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <gr_basic.h>
#include <gr_text.h>
#include <gerbview_frame.h>
#include <gbr_layout.h>
#include <gerber_file_image.h>

2
gerbview/gbr_layout.h

@ -32,7 +32,7 @@
#define GBR_LAYOUT_H
#include <common.h> // PAGE_INFO
//#include <common.h> // PAGE_INFO
#include <gerbview.h> // GERBER_DRAWLAYERS_COUNT
#include <title_block.h>
#include <gerber_draw_item.h>

3
gerbview/gerber_draw_item.cpp

@ -22,9 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <gr_basic.h>
#include <common.h>
#include <trigo.h>
#include <bitmaps.h>
#include <msgpanel.h>

3
gerbview/gerber_file_image.cpp

@ -27,9 +27,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <convert_to_biu.h>
#include <gerbview.h>
#include <gerbview_frame.h>

2
gerbview/gerber_file_image_list.cpp

@ -27,8 +27,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <gerber_file_image.h>

12
gerbview/gerbview.cpp

@ -26,7 +26,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <gerbview_settings.h>
@ -39,17 +38,6 @@
using json = nlohmann::json;
const wxChar* g_GerberPageSizeList[] =
{
wxT( "GERBER" ), // index 0: full size page selection
wxT( "A4" ),
wxT( "A3" ),
wxT( "A2" ),
wxT( "A" ),
wxT( "B" ),
wxT( "C" ),
};
namespace GERBV {

7
gerbview/gerbview.h

@ -29,13 +29,6 @@
#include <set>
#define CURSEUR_ON_GRILLE 0
#define CURSEUR_OFF_GRILLE 1
/// List of page sizes
extern const wxChar* g_GerberPageSizeList[7];
// Interpolation type
enum Gerb_Interpolation
{

2
gerbview/gerbview_frame.cpp

@ -18,11 +18,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fctsys.h>
#include <kiface_i.h>
#include <pgm_base.h>
#include <eda_base_frame.h>
#include <trigo.h>
#include <base_units.h>
#include <gbr_layer_box_selector.h>
#include <msgpanel.h>

3
gerbview/gerbview_layer_widget.cpp

@ -23,9 +23,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <gbr_layer_box_selector.h>
#include <menus_helpers.h>
#include <gerbview.h>

2
gerbview/gerbview_printout.cpp

@ -22,8 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <gr_basic.h>
#include <base_units.h>
#include <base_screen.h>
#include <gerbview_frame.h>

1
gerbview/job_file_reader.cpp

@ -26,7 +26,6 @@
* @file job_file_reader.cpp
*/
#include <fctsys.h>
#include <nlohmann/json.hpp>
#include <wx/filename.h>

3
gerbview/readgerb.cpp

@ -22,9 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <confirm.h>
#include <kicad_string.h>
#include <gerbview.h>
#include <gerbview_frame.h>

2
gerbview/rs274_read_XY_and_IJ_coordinates.cpp

@ -22,8 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <math/util.h> // for KiROUND
#include <gerber_file_image.h>

3
gerbview/rs274d.cpp

@ -26,9 +26,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <common.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <trigo.h>

3
gerbview/rs274x.cpp

@ -26,9 +26,6 @@
* @file rs274x.cpp
*/
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <base_units.h>
#include <math/util.h> // for KiROUND

3
gerbview/toolbars_gerber.cpp

@ -19,9 +19,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fctsys.h>
#include <common.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <bitmaps.h>

Loading…
Cancel
Save