Clean up pcb_calculator includes a bit and rename files

This commit is contained in:
Marek Roszko 2020-10-12 21:01:25 -04:00
parent 9641eb792a
commit 2ade8031dc
34 changed files with 134 additions and 133 deletions

View File

@ -23,7 +23,7 @@ set( PCB_CALCULATOR_SRCS
tracks_width_versus_current.cpp
via.cpp
transline_ident.cpp
UnitSelector.cpp
widgets/unit_selector.cpp
transline/transline.cpp
transline/c_microstrip.cpp
transline/microstrip.cpp

View File

@ -27,9 +27,9 @@
*/
#include <wx/wx.h>
#include <pcb_calculator.h>
#include <dialog_helpers.h>
#include "pcb_calculator_frame.h"
extern double DoubleFromString( const wxString& TextValue );

View File

@ -7,10 +7,11 @@
*****************************************************************************/
#include <cmath>
#include <attenuator_classes.h>
#include <i18n_utility.h>
#include <kiface_i.h>
#include <pcb_calculator_settings.h>
#include "attenuator_classes.h"
#include "pcb_calculator_settings.h"
// Bitmaps:
#include <att_bridge.xpm>

View File

@ -21,10 +21,8 @@
#include <wx/app.h>
#include <wx/msgdlg.h>
#include <pcb_calculator_frame_base.h>
#include <pcb_calculator.h>
#include <UnitSelector.h>
#include <units_scales.h>
#include "pcb_calculator_frame.h"
#include "units_scales.h"
// A helper class to handle min values
// Values are in meters.

View File

@ -33,6 +33,8 @@
#include <vector>
#include <wx/arrstr.h>
// Helper class to store parameters for a regulator
class REGULATOR_DATA
{

View File

@ -21,8 +21,7 @@
#include <wx/app.h>
#include <wx/msgdlg.h>
#include <pcb_calculator_frame_base.h>
#include <pcb_calculator.h>
#include "pcb_calculator_frame.h"
void PCB_CALCULATOR_FRAME::OnToleranceSelection( wxCommandEvent& event )
{

View File

@ -23,7 +23,7 @@
* @note lists of constants used in different panels
*/
#include <common_data.h>
#include "common_data.h"
wxArrayString StandardRelativeDielectricConstantList()
{

View File

@ -22,15 +22,15 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <macros.h>
#include <common.h>
#include <kicad_string.h>
#include <pgm_base.h>
#include <pcb_calculator.h>
#include <pcb_calculator_datafile_lexer.h>
#include <class_regulator_data.h>
#include <datafile_read_write.h>
#include <build_version.h>
#include <class_regulator_data.h>
#include <common.h>
#include <datafile_read_write.h>
#include <kicad_string.h>
#include <macros.h>
#include <pcb_calculator_datafile_lexer.h>
#include <pcb_calculator_frame.h>
#include <pgm_base.h>
using namespace PCBCALC_DATA_T;

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "UnitSelector.h"
#include "widgets/unit_selector.h"
#include "pcb_calculator_frame_base.h"

View File

@ -8151,7 +8151,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -8340,7 +8340,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -8529,7 +8529,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -8718,7 +8718,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -8907,7 +8907,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -9096,7 +9096,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -9317,7 +9317,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_FREQUENCY; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_FREQUENCY; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -9767,7 +9767,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -10020,7 +10020,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -10273,7 +10273,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -10820,7 +10820,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_RESISTOR; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -11009,7 +11009,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_RESISTOR; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -11198,7 +11198,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_ANGLE; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_ANGLE; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -12444,7 +12444,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -12635,7 +12635,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -12826,7 +12826,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -13017,7 +13017,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -13208,7 +13208,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h; Not forward_declare</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h; Not forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -13399,7 +13399,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_RESISTOR; UnitSelector.h; Not forward_declare</property>
<property name="subclass">UNIT_SELECTOR_RESISTOR; widgets/unit_selector.h; Not forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -16978,7 +16978,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -17457,7 +17457,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -17648,7 +17648,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_THICKNESS; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_THICKNESS; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -18777,7 +18777,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -18968,7 +18968,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_THICKNESS; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_THICKNESS; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -19916,7 +19916,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -20523,7 +20523,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">UNIT_SELECTOR_LEN; UnitSelector.h</property>
<property name="subclass">UNIT_SELECTOR_LEN; widgets/unit_selector.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>

View File

@ -16,7 +16,7 @@ class UNIT_SELECTOR_LEN;
class UNIT_SELECTOR_RESISTOR;
class UNIT_SELECTOR_THICKNESS;
#include "UnitSelector.h"
#include "widgets/unit_selector.h"
#include "kiway_player.h"
#include <wx/string.h>
#include <wx/menu.h>

View File

@ -24,10 +24,8 @@
#include <wx/app.h>
#include <pcb_calculator_frame_base.h>
#include <pcb_calculator.h>
#include <UnitSelector.h>
#include <units_scales.h>
#include "pcb_calculator_frame.h"
#include "units_scales.h"
extern double DoubleFromString( const wxString& TextValue );

View File

@ -20,7 +20,9 @@
*/
#include <dialog_helpers.h>
#include <pcb_calculator.h>
#include "class_regulator_data.h"
#include "attenuators/attenuator_classes.h"
#include "pcb_calculator_frame.h"
#include <wx/wx.h>
#include <array>

View File

@ -23,9 +23,8 @@
#include <wx/log.h>
#include <wx/msgdlg.h>
#include <pcb_calculator.h>
#include <pcb_calculator_frame_base.h>
#include <transline.h>
#include "pcb_calculator_frame.h"
#include "transline.h"
/*
* Return the value from a string,

View File

@ -22,9 +22,8 @@
#include <kiface_i.h>
#include <settings/settings_manager.h>
#include <pcb_calculator_frame_base.h>
#include <pcb_calculator_settings.h>
#include <pcb_calculator.h>
#include "pcb_calculator_frame.h"
#include "pcb_calculator_settings.h"
// Pcb_calculator data file extension:
const wxString PcbCalcDataFileExt( wxT("pcbcalc") );

View File

@ -19,14 +19,14 @@
*/
#include <wx/wx.h>
#include <pgm_base.h>
#include <pcb_calculator.h>
#include <pcb_calculator_settings.h>
#include <UnitSelector.h>
#include <bitmaps.h>
#include <geometry/shape_poly_set.h>
#include <kiface_i.h>
#include "attenuators/attenuator_classes.h"
#include "class_regulator_data.h"
#include "pcb_calculator_frame.h"
#include "pcb_calculator_settings.h"
// extension of pcb_calculator data filename:
const wxString DataFileNameExt( wxT("pcbcalc") );

View File

@ -24,17 +24,20 @@
#ifndef PCB_CALCULATOR_H
#define PCB_CALCULATOR_H
#include <pcb_calculator_frame_base.h>
#include "transline.h" // Included for SUBST_PRMS_ID definition.
#include "transline_ident.h"
#include "pcb_calculator_frame_base.h"
#include <attenuator_classes.h>
#include <class_regulator_data.h>
#include <transline.h> // Included for SUBST_PRMS_ID definition.
#include <transline_ident.h>
#include "attenuators/attenuator_classes.h"
#include "class_regulator_data.h"
extern const wxString PcbCalcDataFileExt;
class APP_SETTINGS_BASE;
class KIWAY;
class PCB_CALCULATOR_SETTINGS;
/* Class PCB_CALCULATOR_FRAME_BASE
This is the main frame for this application
*/

View File

@ -23,11 +23,11 @@
#include <wx/wx.h>
#include <macros.h>
#include <pcb_calculator.h>
#include <class_regulator_data.h>
#include <dialog_regulator_data_base.h>
#include <pcb_calculator_settings.h>
#include "class_regulator_data.h"
#include "dialog_regulator_data_base.h"
#include "pcb_calculator_frame.h"
#include "pcb_calculator_settings.h"
extern double DoubleFromString( const wxString& TextValue );

View File

@ -30,15 +30,14 @@
#include <kiface_i.h>
#include <dialog_helpers.h>
#include <pcb_calculator_frame_base.h>
#include <pcb_calculator.h>
#include <pcb_calculator_settings.h>
#include <UnitSelector.h>
#include <units_scales.h>
#include "attenuators/attenuator_classes.h"
#include "class_regulator_data.h"
#include "pcb_calculator_frame.h"
#include "pcb_calculator_settings.h"
#include "units_scales.h"
wxString tracks_width_versus_current_formula =
#include <tracks_width_versus_current_formula.h>
#include "tracks_width_versus_current_formula.h"
extern double DoubleFromString( const wxString& TextValue );

View File

@ -31,10 +31,10 @@
#include <cstdlib>
#include <cstring>
#include <c_microstrip.h>
#include <microstrip.h>
#include <transline.h>
#include <units.h>
#include "c_microstrip.h"
#include "microstrip.h"
#include "transline.h"
#include "units.h"
C_MICROSTRIP::C_MICROSTRIP() : TRANSLINE(),
h( 0.0 ), // height of substrate

View File

@ -32,8 +32,8 @@
#include <cstdlib>
#include <cstring>
#include <coax.h>
#include <units.h>
#include "coax.h"
#include "units.h"
COAX::COAX() : TRANSLINE()
{

View File

@ -28,8 +28,8 @@
#include <cstdlib>
#include <cstring>
#include <coplanar.h>
#include <units.h>
#include "coplanar.h"
#include "units.h"
COPLANAR::COPLANAR() : TRANSLINE()
{

View File

@ -34,10 +34,10 @@
#include <cstdlib>
#include <cstring>
#include <microstrip.h>
#include <transline.h>
#include "microstrip.h"
#include "transline.h"
#include <units.h>
#include "units.h"
MICROSTRIP::MICROSTRIP() : TRANSLINE(),
h( 0.0 ), // height of substrate

View File

@ -25,8 +25,8 @@
#include <cstdio>
#include <cstring>
#include <rectwaveguide.h>
#include <units.h>
#include "rectwaveguide.h"
#include "units.h"
RECTWAVEGUIDE::RECTWAVEGUIDE() : TRANSLINE(),
mur( 0.0 ), // magnetic permeability of substrate

View File

@ -27,8 +27,8 @@
#include <cstdlib>
#include <cstring>
#include <stripline.h>
#include <units.h>
#include "stripline.h"
#include "units.h"
STRIPLINE::STRIPLINE() : TRANSLINE()
{

View File

@ -24,9 +24,9 @@
#include <cmath>
#include <limits>
#include <transline.h>
#include <units.h>
#include "transline.h"
#include "units.h"
#ifndef INFINITY
#define INFINITY std::numeric_limits<double>::infinity()

View File

@ -27,8 +27,8 @@
#include <cstdlib>
#include <cstring>
#include <twistedpair.h>
#include <units.h>
#include "twistedpair.h"
#include "units.h"
TWISTEDPAIR::TWISTEDPAIR() : TRANSLINE()
{

View File

@ -26,7 +26,8 @@
#include <config.h>
#include <cmath>
#include <units_scales.h>
#include "units_scales.h"
#ifndef HAVE_CMATH_ASINH
inline double asinh( double x )

View File

@ -21,11 +21,10 @@
#include <wx/settings.h>
#include <wx/wx.h>
#include <pcb_calculator_frame_base.h>
#include <pcb_calculator.h>
#include <UnitSelector.h>
#include <common_data.h>
#include "common_data.h"
#include "pcb_calculator_frame.h"
#include "widgets/unit_selector.h"
extern double DoubleFromString( const wxString& TextValue );

View File

@ -46,9 +46,9 @@
#include <twistedpair.h>
#include <kiface_i.h>
#include <pcb_calculator_settings.h>
#include <UnitSelector.h>
#include <transline_ident.h>
#include "pcb_calculator_settings.h"
#include "widgets/unit_selector.h"
#include "transline_ident.h"
/*

View File

@ -28,7 +28,7 @@
#include <vector>
#include <wx/bitmap.h>
#include <transline.h>
#include "transline.h"
// An enum to handle muwave shapes:
enum TRANSLINE_TYPE_ID {

View File

@ -46,12 +46,13 @@
#include <wx/wx.h>
#include <kiface_i.h>
#include <pcb_calculator.h>
#include <pcb_calculator_settings.h>
#include <UnitSelector.h>
#include <units_scales.h>
#include <common_data.h>
#include "attenuators/attenuator_classes.h"
#include "common_data.h"
#include "class_regulator_data.h"
#include "pcb_calculator_frame.h"
#include "pcb_calculator_settings.h"
#include "units_scales.h"
extern double DoubleFromString( const wxString& TextValue );

View File

@ -23,8 +23,8 @@
* a wxChoiceBox to select units in Pcb_Calculator
*/
#include <UnitSelector.h>
#include <units_scales.h>
#include "unit_selector.h"
#include "units_scales.h"
UNIT_SELECTOR_LEN::UNIT_SELECTOR_LEN( wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,