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

This commit is contained in:
jean-pierre charras 2020-09-30 11:24:02 +02:00
parent 673b52b5c4
commit 04aa5519d0
25 changed files with 20 additions and 73 deletions

View File

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

View File

@ -7,7 +7,7 @@
* *
* Copyright (C) 1992-2017 Jean-Pierre Charras <jp.charras at wanadoo.fr> * Copyright (C) 1992-2017 Jean-Pierre Charras <jp.charras at wanadoo.fr>
* Copyright (C) 2010 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> * 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * 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 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <trigo.h> #include <trigo.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>
#include <convert_basic_shapes_to_polygon.h> #include <convert_basic_shapes_to_polygon.h>
#include <gr_basic.h>
#include <math/util.h> // for KiROUND #include <math/util.h> // for KiROUND
#include <gerbview.h> #include <gerbview.h>
#include <gerber_file_image.h> #include <gerber_file_image.h>
#include <gr_basic.h>
/** /**

View File

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

View File

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

View File

@ -19,14 +19,25 @@
*/ */
#include <fctsys.h>
#include <common.h>
#include <gerbview.h> #include <gerbview.h>
#include <gerbview_frame.h> #include <gerbview_frame.h>
#include "panel_gerbview_settings.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::PANEL_GERBVIEW_SETTINGS( GERBVIEW_FRAME *aFrame, wxWindow* aWindow ) :
PANEL_GERBVIEW_SETTINGS_BASE( aWindow, wxID_ANY ), PANEL_GERBVIEW_SETTINGS_BASE( aWindow, wxID_ANY ),
m_Parent( aFrame ) m_Parent( aFrame )
@ -40,9 +51,9 @@ bool PANEL_GERBVIEW_SETTINGS::TransferDataToWindow( )
m_BoxUnits->SetSelection( ( m_Parent->GetUserUnits() == EDA_UNITS::MILLIMETRES ) ? 1 : 0 ); m_BoxUnits->SetSelection( ( m_Parent->GetUserUnits() == EDA_UNITS::MILLIMETRES ) ? 1 : 0 );
m_ShowPageLimitsOpt->SetValue( m_Parent->GetDisplayOptions().m_DisplayPageLimits ); 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 ); m_PageSize->SetSelection( i );
break; break;
@ -62,7 +73,7 @@ bool PANEL_GERBVIEW_SETTINGS::TransferDataFromWindow()
auto opts = m_Parent->GetDisplayOptions(); auto opts = m_Parent->GetDisplayOptions();
opts.m_DisplayPageLimits = m_ShowPageLimitsOpt->GetValue(); 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->SetPageSettings( pageInfo );
m_Parent->UpdateDisplayOptions( opts ); m_Parent->UpdateDisplayOptions( opts );

View File

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

View File

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

View File

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

View File

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

View File

@ -22,9 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 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 <gerbview_frame.h>
#include <gbr_layout.h> #include <gbr_layout.h>
#include <gerber_file_image.h> #include <gerber_file_image.h>

View File

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

View File

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

View File

@ -27,9 +27,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 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 <convert_to_biu.h>
#include <gerbview.h> #include <gerbview.h>
#include <gerbview_frame.h> #include <gerbview_frame.h>

View File

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

View File

@ -26,7 +26,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <fctsys.h>
#include <gerbview.h> #include <gerbview.h>
#include <gerbview_frame.h> #include <gerbview_frame.h>
#include <gerbview_settings.h> #include <gerbview_settings.h>
@ -39,17 +38,6 @@
using json = nlohmann::json; 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 { namespace GERBV {

View File

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

View File

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

View File

@ -23,9 +23,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 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 <gbr_layer_box_selector.h>
#include <menus_helpers.h> #include <menus_helpers.h>
#include <gerbview.h> #include <gerbview.h>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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