From 4b38bada76f978b499b90f84412a8c6857abb40c Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Mon, 16 Nov 2020 07:13:08 -0500 Subject: [PATCH] Move the gerbview widgets to their own folder --- gerbview/CMakeLists.txt | 12 ++++++++---- gerbview/clear_gbr_drawlayers.cpp | 2 +- gerbview/events_called_functions.cpp | 4 ++-- gerbview/files.cpp | 2 +- gerbview/gerbview_frame.cpp | 7 ++++--- gerbview/toolbars_gerber.cpp | 4 ++-- .../dcode_selection_box.cpp} | 2 +- .../dcode_selection_box.h} | 0 gerbview/{ => widgets}/gbr_layer_box_selector.cpp | 2 +- gerbview/{ => widgets}/gbr_layer_box_selector.h | 0 gerbview/{ => widgets}/gerbview_layer_widget.cpp | 6 +++--- gerbview/{ => widgets}/gerbview_layer_widget.h | 2 +- gerbview/{ => widgets}/layer_widget.cpp | 2 +- gerbview/{ => widgets}/layer_widget.h | 0 14 files changed, 25 insertions(+), 20 deletions(-) rename gerbview/{DCodeSelectionbox.cpp => widgets/dcode_selection_box.cpp} (98%) rename gerbview/{DCodeSelectionbox.h => widgets/dcode_selection_box.h} (100%) rename gerbview/{ => widgets}/gbr_layer_box_selector.cpp (98%) rename gerbview/{ => widgets}/gbr_layer_box_selector.h (100%) rename gerbview/{ => widgets}/gerbview_layer_widget.cpp (99%) rename gerbview/{ => widgets}/gerbview_layer_widget.h (99%) rename gerbview/{ => widgets}/layer_widget.cpp (99%) rename gerbview/{ => widgets}/layer_widget.h (100%) diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 35675f34ca..72529eb4ac 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -26,17 +26,21 @@ set( DIALOGS_SRCS dialogs/dialog_select_one_pcb_layer.cpp ) +set( WIDGET_SRCS + widgets/dcode_selection_box.cpp + widgets/gbr_layer_box_selector.cpp + widgets/gerbview_layer_widget.cpp + widgets/layer_widget.cpp + ) + set( GERBVIEW_SRCS am_param.cpp am_primitive.cpp - DCodeSelectionbox.cpp gbr_layout.cpp gerber_file_image.cpp gerber_file_image_list.cpp gerber_draw_item.cpp - gerbview_layer_widget.cpp gerbview_printout.cpp - gbr_layer_box_selector.cpp X2_gerber_attributes.cpp clear_gbr_drawlayers.cpp dcode.cpp @@ -48,7 +52,6 @@ set( GERBVIEW_SRCS gerbview_settings.cpp gerbview_frame.cpp job_file_reader.cpp - layer_widget.cpp menubar.cpp readgerb.cpp rs274_read_XY_and_IJ_coordinates.cpp @@ -125,6 +128,7 @@ add_library( gerbview_kiface_objects OBJECT gerbview.cpp ${GERBVIEW_SRCS} ${DIALOGS_SRCS} + ${WIDGET_SRCS} ${GERBVIEW_EXTRA_SRCS} ) diff --git a/gerbview/clear_gbr_drawlayers.cpp b/gerbview/clear_gbr_drawlayers.cpp index 2ec0e45428..1dd7dcc1be 100644 --- a/gerbview/clear_gbr_drawlayers.cpp +++ b/gerbview/clear_gbr_drawlayers.cpp @@ -31,9 +31,9 @@ #include #include #include -#include #include #include +#include "widgets/gerbview_layer_widget.h" #include diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index a8892f7241..d6d4f3265d 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -29,14 +29,14 @@ #include #include #include -#include -#include #include #include #include #include #include #include +#include "widgets/gerbview_layer_widget.h" +#include "widgets/dcode_selection_box.h" // Event table: diff --git a/gerbview/files.cpp b/gerbview/files.cpp index 4ef24907e4..5c52f74776 100644 --- a/gerbview/files.cpp +++ b/gerbview/files.cpp @@ -31,9 +31,9 @@ #include #include #include -#include #include #include +#include "widgets/gerbview_layer_widget.h" // HTML Messages used more than one time: #define MSG_NO_MORE_LAYER _( "No more available layers in Gerbview to load files" ) diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index cc73230b3e..c4c367ffbe 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -30,8 +29,6 @@ #include #include #include -#include -#include #include #include #include @@ -61,6 +58,10 @@ #include #include +#include "widgets/gbr_layer_box_selector.h" +#include "widgets/gerbview_layer_widget.h" +#include "widgets/dcode_selection_box.h" + GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ) : EDA_DRAW_FRAME( aKiway, aParent, FRAME_GERBER, wxT( "GerbView" ), wxDefaultPosition, diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp index c94c07b5c5..cf0e873a50 100644 --- a/gerbview/toolbars_gerber.cpp +++ b/gerbview/toolbars_gerber.cpp @@ -25,14 +25,14 @@ #include #include #include -#include -#include #include #include #include #include #include #include +#include "widgets/gbr_layer_box_selector.h" +#include "widgets/dcode_selection_box.h" void GERBVIEW_FRAME::ReCreateHToolbar() { diff --git a/gerbview/DCodeSelectionbox.cpp b/gerbview/widgets/dcode_selection_box.cpp similarity index 98% rename from gerbview/DCodeSelectionbox.cpp rename to gerbview/widgets/dcode_selection_box.cpp index 7d9a422326..6dceb7ae2a 100644 --- a/gerbview/DCodeSelectionbox.cpp +++ b/gerbview/widgets/dcode_selection_box.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include "dcode_selection_box.h" /*******************************************/ /* Helper class for displaying DCodes list */ diff --git a/gerbview/DCodeSelectionbox.h b/gerbview/widgets/dcode_selection_box.h similarity index 100% rename from gerbview/DCodeSelectionbox.h rename to gerbview/widgets/dcode_selection_box.h diff --git a/gerbview/gbr_layer_box_selector.cpp b/gerbview/widgets/gbr_layer_box_selector.cpp similarity index 98% rename from gerbview/gbr_layer_box_selector.cpp rename to gerbview/widgets/gbr_layer_box_selector.cpp index fb72b683be..1bb45c9b68 100644 --- a/gerbview/gbr_layer_box_selector.cpp +++ b/gerbview/widgets/gbr_layer_box_selector.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include "gbr_layer_box_selector.h" void GBR_LAYER_BOX_SELECTOR::Resync() { diff --git a/gerbview/gbr_layer_box_selector.h b/gerbview/widgets/gbr_layer_box_selector.h similarity index 100% rename from gerbview/gbr_layer_box_selector.h rename to gerbview/widgets/gbr_layer_box_selector.h diff --git a/gerbview/gerbview_layer_widget.cpp b/gerbview/widgets/gerbview_layer_widget.cpp similarity index 99% rename from gerbview/gerbview_layer_widget.cpp rename to gerbview/widgets/gerbview_layer_widget.cpp index 2d82a4151f..14de535547 100644 --- a/gerbview/gerbview_layer_widget.cpp +++ b/gerbview/widgets/gerbview_layer_widget.cpp @@ -23,18 +23,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include #include #include #include #include -#include -#include #include #include #include #include +#include "layer_widget.h" +#include "gbr_layer_box_selector.h" +#include "gerbview_layer_widget.h" /* * GERBER_LAYER_WIDGET diff --git a/gerbview/gerbview_layer_widget.h b/gerbview/widgets/gerbview_layer_widget.h similarity index 99% rename from gerbview/gerbview_layer_widget.h rename to gerbview/widgets/gerbview_layer_widget.h index 9e88b455d7..d3c241c0ad 100644 --- a/gerbview/gerbview_layer_widget.h +++ b/gerbview/widgets/gerbview_layer_widget.h @@ -31,7 +31,7 @@ #ifndef GERBER_LAYER_WIDGET_H #define GERBER_LAYER_WIDGET_H -#include +#include "layer_widget.h" /** * GERBER_LAYER_WIDGET diff --git a/gerbview/layer_widget.cpp b/gerbview/widgets/layer_widget.cpp similarity index 99% rename from gerbview/layer_widget.cpp rename to gerbview/widgets/layer_widget.cpp index 6f9fc644f4..643909879d 100644 --- a/gerbview/layer_widget.cpp +++ b/gerbview/widgets/layer_widget.cpp @@ -33,7 +33,7 @@ //#define STAND_ALONE 1 // define to enable test program for LAYER_WIDGET -#include +#include "layer_widget.h" #include #include diff --git a/gerbview/layer_widget.h b/gerbview/widgets/layer_widget.h similarity index 100% rename from gerbview/layer_widget.h rename to gerbview/widgets/layer_widget.h