Reduce compile times by extracting headers

Break the most expensive header include chains that contaminate the
largest number of translation units

New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
This commit is contained in:
Seth Hillbrand
2026-02-13 14:25:54 -08:00
parent 11593b66bc
commit c52ab91c84
189 changed files with 718 additions and 283 deletions
+1
View File
@@ -37,6 +37,7 @@
#include <geometry/geometry_utils.h>
#include <lset.h>
#include <pgm_base.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <wx/log.h>
#include <pcbnew_settings.h>
+2
View File
@@ -34,10 +34,12 @@
#include <3d_viewer_id.h>
#include <advanced_config.h>
#include <build_version.h>
#include <settings/color_settings.h>
#include <board.h>
#include <pad.h>
#include <pcb_field.h>
#include <reporter.h>
#include <widgets/wx_infobar.h>
#include <gal/opengl/gl_context_mgr.h>
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <bitmaps.h>
@@ -21,6 +21,7 @@
#include <dialogs/appearance_controls_3D.h>
#include <bitmaps.h>
#include <settings/color_settings.h>
#include <confirm.h>
#include <pgm_base.h>
#include <dpi_scaling_common.h>
@@ -35,6 +36,7 @@
#include <tools/eda_3d_actions.h>
#include <widgets/bitmap_toggle.h>
#include <widgets/color_swatch.h>
#include <widgets/wx_infobar.h>
#include <widgets/grid_bitmap_toggle.h>
#include <dialogs/eda_view_switcher.h>
#include <wx/bmpbuttn.h>
+1
View File
@@ -24,6 +24,7 @@
#include <bitmap2cmp_frame.h>
#include <bitmap2component.h>
#include <reporter.h>
#include <bitmap2cmp_panel.h>
#include <bitmap2cmp_settings.h>
#include <bitmap_io.h>
+1
View File
@@ -18,6 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <ranges>
#include <tuple>
#include <api/api_handler_common.h>
+3 -2
View File
@@ -23,6 +23,7 @@
*/
#include <common.h>
#include <json_common.h>
#include <i18n_utility.h>
#include <kiplatform/io.h>
#include <wx/dir.h>
@@ -329,10 +330,10 @@ DESIGN_BLOCK* DESIGN_BLOCK_IO::DesignBlockLoad( const wxString& aLibraryPath,
dbMetadataFile >> dbMetadata;
if( dbMetadata.contains( "description" ) )
newDB->SetLibDescription( dbMetadata["description"] );
newDB->SetLibDescription( dbMetadata["description"].get<std::string>() );
if( dbMetadata.contains( "keywords" ) )
newDB->SetKeywords( dbMetadata["keywords"] );
newDB->SetKeywords( dbMetadata["keywords"].get<std::string>() );
// Read the "fields" object from the JSON
if( dbMetadata.contains( "fields" ) )
+9 -7
View File
@@ -25,6 +25,8 @@
#include <app_monitor.h>
#include <dialog_shim.h>
#include <settings/common_settings.h>
#include <settings/common_settings_internals.h>
#include <core/ignore.h>
#include <kiway_player.h>
#include <kiway.h>
@@ -350,9 +352,9 @@ bool DIALOG_SHIM::Show( bool show )
if( COMMON_SETTINGS* settings = Pgm().GetCommonSettings() )
{
auto dlgIt = settings->m_dialogControlValues.find( key );
auto dlgIt = settings->CsInternals().m_dialogControlValues.find( key );
if( dlgIt != settings->m_dialogControlValues.end() )
if( dlgIt != settings->CsInternals().m_dialogControlValues.end() )
{
auto geoIt = dlgIt->second.find( "__geometry" );
@@ -439,9 +441,9 @@ void DIALOG_SHIM::resetSize()
{
std::string key = m_hash_key.empty() ? getDialogKeyFromTitle( GetTitle() ) : m_hash_key;
auto dlgIt = settings->m_dialogControlValues.find( key );
auto dlgIt = settings->CsInternals().m_dialogControlValues.find( key );
if( dlgIt == settings->m_dialogControlValues.end() )
if( dlgIt == settings->CsInternals().m_dialogControlValues.end() )
return;
dlgIt->second.erase( "__geometry" );
@@ -545,7 +547,7 @@ void DIALOG_SHIM::SaveControlState()
return;
std::string dialogKey = m_hash_key.empty() ? getDialogKeyFromTitle( GetTitle() ) : m_hash_key;
std::map<std::string, nlohmann::json>& dlgMap = settings->m_dialogControlValues[ dialogKey ];
std::map<std::string, nlohmann::json>& dlgMap = settings->CsInternals().m_dialogControlValues[ dialogKey ];
wxRect rect( GetPosition(), GetSize() );
nlohmann::json geom;
@@ -655,9 +657,9 @@ void DIALOG_SHIM::LoadControlState()
return;
std::string dialogKey = m_hash_key.empty() ? getDialogKeyFromTitle( GetTitle() ) : m_hash_key;
auto dlgIt = settings->m_dialogControlValues.find( dialogKey );
auto dlgIt = settings->CsInternals().m_dialogControlValues.find( dialogKey );
if( dlgIt == settings->m_dialogControlValues.end() )
if( dlgIt == settings->CsInternals().m_dialogControlValues.end() )
return;
const std::map<std::string, nlohmann::json>& dlgMap = dlgIt->second;
@@ -28,6 +28,7 @@
#include <core/type_helpers.h>
#include <string_utils.h>
#include <wx/button.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/gbsizer.h>
#include <wx/stattext.h>
+3 -1
View File
@@ -24,12 +24,14 @@
#include <dialogs/panel_maintenance.h>
#include <kidialog.h>
#include <settings/common_settings_internals.h>
#include <pgm_base.h>
#include <kiway.h>
#include <eda_base_frame.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <widgets/paged_dialog.h>
#include <widgets/wx_infobar.h>
PANEL_MAINTENANCE::PANEL_MAINTENANCE( wxWindow* aParent, EDA_BASE_FRAME* aFrame ) :
@@ -118,7 +120,7 @@ void PANEL_MAINTENANCE::doClearDialogState()
if( COMMON_SETTINGS* settings = Pgm().GetSettingsManager().GetCommonSettings() )
{
settings->m_dialogControlValues = {};
settings->CsInternals().m_dialogControlValues = {};
settings->SaveToFile( Pgm().GetSettingsManager().GetPathForSettingsFile( settings ) );
}
}
+21 -4
View File
@@ -27,6 +27,7 @@
#include "dialogs/panel_maintenance.h"
#include "kicad_manager_frame.h"
#include <eda_base_frame.h>
#include <nlohmann/json.hpp>
#include <advanced_config.h>
#include <bitmaps.h>
@@ -577,6 +578,22 @@ void EDA_BASE_FRAME::configureToolbars()
}
void EDA_BASE_FRAME::SelectToolbarAction( const TOOL_ACTION& aAction )
{
if( m_tbLeft )
m_tbLeft->SelectAction( aAction );
if( m_tbTopMain )
m_tbTopMain->SelectAction( aAction );
if( m_tbTopAux )
m_tbTopAux->SelectAction( aAction );
if( m_tbRight )
m_tbRight->SelectAction( aAction );
}
void EDA_BASE_FRAME::RecreateToolbars()
{
wxWindowUpdateLocker dummy( this );
@@ -1001,7 +1018,7 @@ void EDA_BASE_FRAME::LoadWindowSettings( const WINDOW_SETTINGS* aCfg )
LoadWindowState( aCfg->state );
m_perspective = aCfg->perspective;
m_auiLayoutState = aCfg->aui_state;
m_auiLayoutState = std::make_unique<nlohmann::json>( aCfg->aui_state );
m_mruPath = aCfg->mru_path;
TOOLS_HOLDER::CommonSettingsChanged();
@@ -1171,11 +1188,11 @@ void EDA_BASE_FRAME::RestoreAuiLayout()
#if wxCHECK_VERSION( 3, 3, 0 )
bool restored = false;
if( !m_auiLayoutState.is_null() && !m_auiLayoutState.empty() )
if( m_auiLayoutState && !m_auiLayoutState->is_null() && !m_auiLayoutState->empty() )
{
WX_AUI_JSON_SERIALIZER serializer( m_auimgr );
if( serializer.Deserialize( m_auiLayoutState ) )
if( serializer.Deserialize( *m_auiLayoutState ) )
restored = true;
}
@@ -1202,7 +1219,7 @@ void EDA_BASE_FRAME::RestoreAuiLayout()
void EDA_BASE_FRAME::ShowInfoBarError( const wxString& aErrorMsg, bool aShowCloseButton,
WX_INFOBAR::MESSAGE_TYPE aType )
INFOBAR_MESSAGE_TYPE aType )
{
m_infoBar->RemoveAllButtons();
+7
View File
@@ -32,6 +32,7 @@
#include <dialog_shim.h>
#include <dialogs/hotkey_cycle_popup.h>
#include <eda_draw_frame.h>
#include <eda_search_data.h>
#include <file_history.h>
#include <gal/graphics_abstraction_layer.h>
#include <id.h>
@@ -192,6 +193,12 @@ EDA_DRAW_FRAME::~EDA_DRAW_FRAME()
}
EDA_SEARCH_DATA& EDA_DRAW_FRAME::GetFindReplaceData()
{
return *m_findReplaceData;
}
void EDA_DRAW_FRAME::configureToolbars()
{
EDA_BASE_FRAME::configureToolbars();
+27
View File
@@ -36,8 +36,35 @@
#include <kiid.h>
#include <mmh3_hash.h>
#include <paths.h>
#include <picosha2.h>
#include <wildcards_and_files_ext.h>
bool EMBEDDED_FILES::EMBEDDED_FILE::Validate()
{
MMH3_HASH hash( EMBEDDED_FILES::Seed() );
hash.add( decompressedData );
is_valid = ( hash.digest().ToString() == data_hash );
return is_valid;
}
bool EMBEDDED_FILES::EMBEDDED_FILE::Validate_SHA256()
{
std::string new_sha;
picosha2::hash256_hex_string( decompressedData, new_sha );
is_valid = ( new_sha == data_hash );
return is_valid;
}
wxString EMBEDDED_FILES::EMBEDDED_FILE::GetLink() const
{
return wxString::Format( "%s://%s", FILEEXT::KiCadUriPrefix, name );
}
EMBEDDED_FILES::EMBEDDED_FILE* EMBEDDED_FILES::AddFile( const wxFileName& aName, bool aOverwrite )
{
+1
View File
@@ -22,6 +22,7 @@
#include <wx/string.h>
#include <json_common.h>
#include <kicommon.h>
#include <map>
#include <settings/json_settings.h>
+6
View File
@@ -165,6 +165,12 @@ LIB_TREE_MODEL_ADAPTER::~LIB_TREE_MODEL_ADAPTER()
{}
TOOL_DISPATCHER* LIB_TREE_MODEL_ADAPTER::GetToolDispatcher() const
{
return m_parent->GetToolDispatcher();
}
void LIB_TREE_MODEL_ADAPTER::loadColumnConfig()
{
for( const std::pair<const wxString, int>& pair : m_cfg.column_widths )
+1
View File
@@ -24,6 +24,7 @@
#include <list>
#include <magic_enum.hpp>
#include <thread_pool.h>
#include <ranges>
#include <unordered_set>
#include <paths.h>
+6
View File
@@ -143,6 +143,12 @@ LANGUAGE_DESCR LanguagesList[] =
#define _(s) wxGetTranslation((s))
BS::priority_thread_pool& PGM_BASE::GetThreadPool()
{
return *m_singleton.m_ThreadPool;
}
PGM_BASE::PGM_BASE()
{
m_locale = nullptr;
@@ -22,6 +22,7 @@
#include <lset.h>
#include <lseq.h>
#include <project/board_project_settings.h>
#include <project/board_project_settings_params.h>
#include <settings/layer_settings_utils.h>
using namespace std::placeholders;
+1
View File
@@ -25,6 +25,7 @@
#include <json_common.h>
#include <project/net_settings.h>
#include <settings/json_settings_internals.h>
#include <settings/parameters.h>
#include <settings/settings_manager.h>
#include <string_utils.h>
+1
View File
@@ -25,6 +25,7 @@
#include <project/tuning_profiles.h>
#include <settings/json_settings_internals.h>
#include <project/project_file.h>
#include <project/board_project_settings_params.h>
#include <settings/common_settings.h>
#include <settings/parameters.h>
#include <wildcards_and_files_ext.h>
+1
View File
@@ -18,6 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <advanced_config.h>
#include <class_draw_panel_gal.h>
#include <common.h>
#include <eda_units.h>
+9 -4
View File
@@ -28,7 +28,9 @@
#include <search_stack.h>
#include <settings/settings_manager.h>
#include <settings/common_settings.h>
#include <settings/common_settings_internals.h>
#include <settings/json_settings.h>
#include <settings/json_settings_internals.h>
#include <settings/parameters.h>
#include <systemdirsappend.h>
#include <trace_helpers.h>
@@ -44,6 +46,8 @@ const wxRegEx versionedEnvVarRegex( wxS( "KICAD[0-9]+_[A-Z0-9_]+(_DIR)?" ) );
///! Update the schema version whenever a migration is required
const int commonSchemaVersion = 4;
COMMON_SETTINGS::~COMMON_SETTINGS() = default;
COMMON_SETTINGS::COMMON_SETTINGS() :
JSON_SETTINGS( "kicad_common", SETTINGS_LOC::USER, commonSchemaVersion ),
m_Appearance(),
@@ -56,7 +60,8 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
m_System(),
m_DoNotShowAgain(),
m_PackageManager(),
m_Api()
m_Api(),
m_csInternals( std::make_unique<COMMON_SETTINGS_INTERNALS>() )
{
/*
* Automatic dark mode detection works fine on Mac.
@@ -449,14 +454,14 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
{
nlohmann::json ret = nlohmann::json::object();
for( const auto& dlg : m_dialogControlValues )
for( const auto& dlg : m_csInternals->m_dialogControlValues )
ret[ dlg.first ] = dlg.second;
return ret;
},
[&]( const nlohmann::json& aVal )
{
m_dialogControlValues.clear();
m_csInternals->m_dialogControlValues.clear();
if( !aVal.is_object() )
return;
@@ -467,7 +472,7 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
continue;
for( auto& [ctrlKey, ctrlVal] : dlgVal.items() )
m_dialogControlValues[ dlgKey ][ ctrlKey ] = ctrlVal;
m_csInternals->m_dialogControlValues[ dlgKey ][ ctrlKey ] = ctrlVal;
}
},
nlohmann::json::object() ) );
+14
View File
@@ -286,6 +286,20 @@ COLOR_SETTINGS* SETTINGS_MANAGER::GetColorSettings( const wxString& aName )
}
std::vector<COLOR_SETTINGS*> SETTINGS_MANAGER::GetColorSettingsList()
{
std::vector<COLOR_SETTINGS*> ret;
for( const std::pair<const wxString, COLOR_SETTINGS*>& entry : m_color_settings )
ret.push_back( entry.second );
std::sort( ret.begin(), ret.end(), []( COLOR_SETTINGS* a, COLOR_SETTINGS* b )
{ return a->GetName() < b->GetName(); } );
return ret;
}
COLOR_SETTINGS* SETTINGS_MANAGER::loadColorSettingsByName( const wxString& aName )
{
wxLogTrace( traceSettings, wxT( "Attempting to load color theme %s" ), aName );
+1
View File
@@ -18,6 +18,7 @@
*/
#include <singleton.h>
#include <advanced_config.h>
#include <bs_thread_pool.hpp>
#include <gal/opengl/gl_context_mgr.h>
#include <thread_pool.h>
+1
View File
@@ -29,6 +29,7 @@
#include <tool/tool_interactive.h>
class DESIGN_BLOCK_PANE;
class LIB_TREE_NODE;
/**
* Handle schematic design block actions in the schematic editor.
+1
View File
@@ -49,6 +49,7 @@
#include <cvpcb_association.h>
#include <cvpcb_id.h>
#include <cvpcb_mainframe.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <settings/cvpcb_settings.h>
#include <display_footprints_frame.h>
+1
View File
@@ -42,6 +42,7 @@
#include <pgm_base.h>
#include <reporter.h>
#include <settings/settings_manager.h>
#include <widgets/wx_infobar.h>
#include <tool/action_toolbar.h>
#include <tool/common_tools.h>
#include <tool/tool_dispatcher.h>
+1
View File
@@ -24,6 +24,7 @@
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <bitmaps.h>
#include <dialog_annotate_base.h>
#include <eeschema_settings.h>
+1
View File
@@ -28,6 +28,7 @@
#include <gestfich.h>
#include <sch_screen.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <project.h>
#include <kiface_base.h>
#include <reporter.h>
@@ -20,6 +20,7 @@
#include <sch_junction.h>
#include <dialog_junction_props.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <sch_edit_frame.h>
#include <widgets/color_swatch.h>
@@ -23,6 +23,7 @@
*/
#include "dialog_lib_new_symbol.h"
#include <widgets/wx_infobar.h>
#include <default_values.h>
#include <eda_draw_frame.h>
@@ -25,6 +25,7 @@
#include <sch_line.h>
#include <dialog_line_properties.h>
#include <dialogs/dialog_color_picker.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <sch_edit_frame.h>
#include <stroke_params.h>
@@ -23,6 +23,7 @@
*/
#include <bitmaps.h>
#include <widgets/wx_infobar.h>
#include <sch_painter.h>
#include <symbol_edit_frame.h>
#include <sch_pin.h>
@@ -37,6 +37,7 @@
#include <plotters/plotters_pslike.h>
#include <reporter.h>
#include <trace_helpers.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <wx_filename.h>
#include <pgm_base.h>
@@ -36,6 +36,7 @@
#include <project/net_settings.h>
#include <sch_io/sch_io.h>
#include <settings/settings_manager.h>
#include <widgets/wx_infobar.h>
#include <widgets/wx_progress_reporters.h>
#include "dialog_schematic_setup.h"
#include "panel_template_fieldnames.h"
@@ -29,6 +29,7 @@
#include <sch_rule_area.h>
#include <dialog_shape_properties.h>
#include <settings/color_settings.h>
#include <widgets/wx_infobar.h>
#include <symbol_editor_settings.h>
#include <sch_commit.h>
#include <string_utils.h>
@@ -44,6 +44,7 @@
#include <bitmaps.h>
#include <eeschema_settings.h>
#include <settings/color_settings.h>
#include <widgets/wx_infobar.h>
#include <trace_helpers.h>
#include "panel_eeschema_color_settings.h"
#include "wx/dcclient.h"
+1
View File
@@ -42,6 +42,7 @@
#include <wx/filedlg.h>
#include <fmt/format.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <sim/sim_model_l_mutual.h>
#include <sim/spice_circuit_model.h>
#include <widgets/filedlg_hook_embed_file.h>
@@ -35,6 +35,7 @@
#include <string_utils.h>
#include <kiface_base.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <sch_reference_list.h>
#include <tools/sch_editor_control.h>
#include <kiplatform/ui.h>
@@ -29,6 +29,7 @@
#include <widgets/grid_text_helpers.h>
#include <grid_tricks.h>
#include <settings/color_settings.h>
#include <widgets/wx_infobar.h>
#include <sch_table.h>
#include <sch_commit.h>
#include <tool/tool_manager.h>
@@ -27,6 +27,7 @@
#include <widgets/color_swatch.h>
#include <widgets/font_choice.h>
#include <settings/color_settings.h>
#include <widgets/wx_infobar.h>
#include <sch_table.h>
#include <sch_text.h>
#include <sch_commit.h>
@@ -30,6 +30,7 @@
#include <widgets/color_swatch.h>
#include <widgets/wx_combobox.h>
#include <settings/color_settings.h>
#include <widgets/wx_infobar.h>
#include <sch_textbox.h>
#include <confirm.h>
#include <schematic.h>
@@ -27,6 +27,7 @@
#include <sch_junction.h>
#include <dialog_wire_bus_properties.h>
#include <dialogs/dialog_color_picker.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <sch_edit_frame.h>
#include <stroke_params.h>
@@ -22,6 +22,7 @@
*/
#include <pgm_base.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <symbol_editor_settings.h>
#include "panel_sym_color_settings.h"
+1
View File
@@ -31,6 +31,7 @@
#include <project/project_local_settings.h>
#include <project/net_settings.h>
#include <sch_edit_frame.h>
#include <settings/color_settings.h>
#include <sch_painter.h>
#include <schematic.h>
#include <widgets/hierarchy_pane.h>
+1
View File
@@ -33,6 +33,7 @@
#include <settings/common_settings.h>
#include <settings/json_settings_internals.h>
#include <settings/parameters.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <settings/aui_settings.h>
#include <wx/config.h>
+2
View File
@@ -41,7 +41,9 @@
#include <sch_view.h>
#include <sch_painter.h>
#include <sch_shape.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <widgets/wx_infobar.h>
#include <confirm.h>
#include <preview_items/selection_area.h>
#include <project_sch.h>
+1
View File
@@ -24,6 +24,7 @@
#include <pgm_base.h>
#include <kiface_base.h>
#include <advanced_config.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <eeschema_settings.h>
#include <default_values.h>
+1 -1
View File
@@ -24,7 +24,7 @@
#include <settings/nested_settings.h>
#include <settings/bom_settings.h>
#include <template_fieldnames.h>
#include <font/font.h>
#include <font/font_metrics.h>
class NGSPICE_SETTINGS;
class REFDES_TRACKER;
+1
View File
@@ -33,6 +33,7 @@
#include <project/project_file.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <kiway.h>
#include <confirm.h>
#include <bitmaps.h>
@@ -44,6 +44,7 @@
#include <project_sch.h>
#include <sch_painter.h>
#include <sch_view.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <toolbars_symbol_editor.h>
#include <tool/action_manager.h>
@@ -76,6 +77,7 @@
#include <widgets/wx_progress_reporters.h>
#include <widgets/panel_sch_selection_filter.h>
#include <widgets/sch_properties_panel.h>
#include <widgets/lib_tree.h>
#include <widgets/symbol_tree_pane.h>
#include <widgets/wx_aui_utils.h>
#include <widgets/filedlg_hook_new_library.h>
+1
View File
@@ -26,6 +26,7 @@
#include <wx/window.h>
#include <core/kicad_algo.h>
#include <pgm_base.h>
#include <settings/common_settings.h>
#include <project/project_file.h>
#include <widgets/wx_progress_reporters.h>
#include <dialogs/html_message_box.h>
+1
View File
@@ -29,6 +29,7 @@
#include <dialogs/html_message_box.h>
#include <eeschema_id.h>
#include <eeschema_settings.h>
#include <settings/color_settings.h>
#include <gal/graphics_abstraction_layer.h>
#include <kiface_base.h>
#include <kiway.h>
+2
View File
@@ -35,8 +35,10 @@
#include <python_scripting.h>
#include <tool/action_menu.h>
#include <tool/tool_manager.h>
#include <settings/common_settings.h>
#include <tool/action_toolbar.h>
#include <tool/ui/toolbar_context_menu_registry.h>
#include <widgets/wx_infobar.h>
#include <tools/sch_actions.h>
#include <tools/sch_selection_tool.h>
#include <widgets/hierarchy_pane.h>
+1
View File
@@ -38,6 +38,7 @@
#include <sch_actions.h>
#include <sch_tool_utils.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <pgm_base.h>
#include <design_block.h>
#include <widgets/sch_design_block_pane.h>
+1
View File
@@ -82,6 +82,7 @@
#include <drawing_sheet/ds_proxy_undo_item.h>
#include <drawing_sheet/ds_proxy_view_item.h>
#include <view/view_controls.h>
#include <widgets/wx_infobar.h>
#include <wildcards_and_files_ext.h>
#include <wx_filename.h>
#include <wx/filedlg.h>
@@ -50,6 +50,7 @@
#include <sch_bus_entry.h>
#include <sch_connection.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <sch_junction.h>
#include <sch_line.h>
#include <sch_screen.h>
+1
View File
@@ -50,6 +50,7 @@
#include <sch_junction.h>
#include <junction_helpers.h>
#include <sch_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <eeschema_id.h>
#include <pgm_base.h>
#include <view/view_controls.h>
@@ -25,6 +25,7 @@
#include <sch_actions.h>
#include <optional>
#include <symbol_edit_frame.h>
#include <widgets/wx_infobar.h>
#include <sch_commit.h>
#include <gal/graphics_abstraction_layer.h>
#include <tools/symbol_editor_drawing_tools.h>
@@ -25,6 +25,7 @@
#include "panel_symbol_chooser.h"
#include <pgm_base.h>
#include <settings/common_settings.h>
#include <kiface_base.h>
#include <sch_base_frame.h>
#include <project_sch.h>
@@ -18,6 +18,7 @@
*/
#include <pgm_base.h>
#include <settings/color_settings.h>
#include <layer_ids.h>
#include <panel_gerbview_color_settings.h>
#include <settings/settings_manager.h>
+1
View File
@@ -19,6 +19,7 @@
*/
#include <kiface_base.h>
#include <settings/color_settings.h>
#include <base_units.h>
#include <pgm_base.h>
#include <bitmaps.h>
+1
View File
@@ -22,6 +22,7 @@
*/
#include <gerbview_settings.h>
#include <settings/color_settings.h>
#include <layer_ids.h>
#include <pgm_base.h>
#include <settings/common_settings.h>
@@ -25,6 +25,7 @@
#include <wx/checkbox.h>
#include <wx/filedlg.h>
#include <settings/color_settings.h>
#include <bitmaps.h>
#include <gerbview.h>
#include "gerbview_draw_panel_gal.h"
+4 -3
View File
@@ -26,10 +26,7 @@
#include <memory>
#include <netclass.h>
#include <project/net_settings.h>
#include <board_stackup_manager/board_stackup.h>
#include <drc/drc_engine.h>
#include <lset.h>
#include <settings/nested_settings.h>
#include <widgets/ui_common.h>
@@ -100,6 +97,10 @@
#define MINIMUM_ERROR_SIZE_MM 0.001 // For arc approximation
#define MAXIMUM_ERROR_SIZE_MM 0.1 // For arc approximation
class DRC_ENGINE;
class NET_SETTINGS;
class NETCLASS;
#define MAXIMUM_CLEARANCE pcbIUScale.mmToIU( 500 ) // to prevent int-overflows
// Min/max values used in dialogs to validate settings
+12 -18
View File
@@ -33,10 +33,13 @@
#define EDA_BASE_FRAME_H_
#include <functional>
#include <map>
#include <optional>
#include <string>
#include <vector>
#include <memory>
#include <nlohmann/json_fwd.hpp>
#include <wx/aui/aui.h>
@@ -44,10 +47,9 @@
#include <frame_type.h>
#include <hotkeys_basic.h>
#include <kiway_holder.h>
#include <tool/action_toolbar.h>
#include <tool/tools_holder.h>
#include <widgets/ui_common.h>
#include <widgets/wx_infobar.h>
#include <widgets/wx_infobar_message_type.h>
#include <undo_redo_container.h>
#include <units_provider.h>
#include <origin_transforms.h>
@@ -89,8 +91,13 @@ class APPEARANCE_CONTROLS_3D;
struct WINDOW_SETTINGS;
struct WINDOW_STATE;
class ACTION_MENU;
class ACTION_TOOLBAR;
class ACTION_TOOLBAR_CONTROL;
class TOOL_INTERACTIVE;
class TOOLBAR_SETTINGS;
class WX_INFOBAR;
using ACTION_TOOLBAR_CONTROL_FACTORY = std::function<void( ACTION_TOOLBAR* )>;
#define DEFAULT_MAX_UNDO_ITEMS 0
#define ABS_MAX_UNDO_ITEMS (INT_MAX / 2)
@@ -204,20 +211,7 @@ public:
* Select the given action in the toolbar group which contains it, if any.
* This updates the displayed icon/tooltip and UI conditions for that group.
*/
void SelectToolbarAction( const TOOL_ACTION& aAction )
{
if( m_tbLeft )
m_tbLeft->SelectAction( aAction );
if( m_tbTopMain )
m_tbTopMain->SelectAction( aAction );
if( m_tbTopAux )
m_tbTopAux->SelectAction( aAction );
if( m_tbRight )
m_tbRight->SelectAction( aAction );
}
void SelectToolbarAction( const TOOL_ACTION& aAction );
void OnMaximize( wxMaximizeEvent& aEvent );
@@ -268,7 +262,7 @@ public:
* @param aShowCloseButton true to show a close button on the right of the #WX_INFOBAR.
*/
void ShowInfoBarError( const wxString& aErrorMsg, bool aShowCloseButton = false,
WX_INFOBAR::MESSAGE_TYPE aType = WX_INFOBAR::MESSAGE_TYPE::GENERIC );
INFOBAR_MESSAGE_TYPE aType = INFOBAR_MESSAGE_TYPE::GENERIC );
/**
* Show the #WX_INFOBAR displayed on the top of the canvas with a message and an error
@@ -806,7 +800,7 @@ private:
wxAuiManager m_auimgr;
wxString m_perspective; // wxAuiManager perspective.
nlohmann::json m_auiLayoutState;
std::unique_ptr<nlohmann::json> m_auiLayoutState;
WX_INFOBAR* m_infoBar; // Infobar for the frame
APPEARANCE_CONTROLS_3D* m_appearancePanel;
wxString m_configName; // Prefix used to identify some params (frame
+4 -3
View File
@@ -28,7 +28,6 @@
#include <api/api_plugin.h>
#include <eda_base_frame.h>
#include <eda_search_data.h>
#include <kiway_player.h>
#include <gal/gal_display_options.h>
#include <gal_display_options_common.h>
@@ -36,8 +35,10 @@
#include <class_draw_panel_gal.h>
#include <kiid.h>
#include <hotkeys_basic.h>
#include <widgets/lib_tree.h>
#include <lib_id.h>
struct EDA_SEARCH_DATA;
class LIB_TREE;
class EDA_ITEM;
class wxSingleInstanceChecker;
class ACTION_TOOLBAR;
@@ -115,7 +116,7 @@ public:
*/
bool IsScriptingConsoleVisible();
EDA_SEARCH_DATA& GetFindReplaceData() { return *m_findReplaceData; }
EDA_SEARCH_DATA& GetFindReplaceData();
wxArrayString& GetFindHistoryList() { return m_findStringHistoryList; }
virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) = 0;
+2 -1
View File
@@ -29,7 +29,6 @@
#include <deque>
#include <geometry/shape_line_chain.h>
#include <api/serializable.h>
#include <core/typeinfo.h>
#include <eda_item_flags.h>
@@ -37,6 +36,8 @@
#include <view/view_item.h>
#include <kiid.h>
class SHAPE_LINE_CHAIN;
enum class BITMAPS : unsigned int;
+4 -22
View File
@@ -19,14 +19,13 @@
#pragma once
#include <cstdint>
#include <map>
#include <set>
#include <wx/string.h>
#include <wx/filename.h>
#include <mmh3_hash.h>
#include <picosha2.h>
#include <wildcards_and_files_ext.h>
#include <functional>
#include <kicommon.h>
@@ -57,30 +56,13 @@ public:
is_valid( false )
{}
bool Validate()
{
MMH3_HASH hash( EMBEDDED_FILES::Seed() );
hash.add( decompressedData );
is_valid = ( hash.digest().ToString() == data_hash );
return is_valid;
}
bool Validate();
// This is the old way of validating the file. It is deprecated and retained only
// to validate files that were previously embedded.
bool Validate_SHA256()
{
std::string new_sha;
picosha2::hash256_hex_string( decompressedData, new_sha );
bool Validate_SHA256();
is_valid = ( new_sha == data_hash );
return is_valid;
}
wxString GetLink() const
{
return wxString::Format( "%s://%s", FILEEXT::KiCadUriPrefix, name );
}
wxString GetLink() const;
wxString name;
FILE_TYPE type;
+1 -34
View File
@@ -32,6 +32,7 @@
#include <map>
#include <algorithm>
#include <wx/string.h>
#include <font/font_metrics.h>
#include <font/glyph.h>
#include <font/text_attributes.h>
@@ -90,40 +91,6 @@ inline bool IsSubscript( TEXT_STYLE_FLAGS aFlags )
namespace KIFONT
{
class GAL_API METRICS
{
public:
/**
* Compute the vertical position of an overbar. This is the distance between the text
* baseline and the overbar.
*/
double GetOverbarVerticalPosition( double aGlyphHeight ) const
{
return aGlyphHeight * m_OverbarHeight;
}
/**
* Compute the vertical position of an underline. This is the distance between the text
* baseline and the underline.
*/
double GetUnderlineVerticalPosition( double aGlyphHeight ) const
{
return aGlyphHeight * m_UnderlineOffset;
}
double GetInterline( double aFontHeight ) const
{
return aFontHeight * m_InterlinePitch;
}
static const METRICS& Default();
public:
double m_InterlinePitch = 1.68;
double m_OverbarHeight = 1.23;
double m_UnderlineOffset = -0.16;
};
/**
* FONT is an abstract base class for both outline and stroke fonts
*/
+69
View File
@@ -0,0 +1,69 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2021 Ola Rinta-Koski
* Copyright The 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 FONT_METRICS_H_
#define FONT_METRICS_H_
#include <gal/gal.h>
namespace KIFONT
{
class GAL_API METRICS
{
public:
/**
* Compute the vertical position of an overbar. This is the distance between the text
* baseline and the overbar.
*/
double GetOverbarVerticalPosition( double aGlyphHeight ) const
{
return aGlyphHeight * m_OverbarHeight;
}
/**
* Compute the vertical position of an underline. This is the distance between the text
* baseline and the underline.
*/
double GetUnderlineVerticalPosition( double aGlyphHeight ) const
{
return aGlyphHeight * m_UnderlineOffset;
}
double GetInterline( double aFontHeight ) const
{
return aFontHeight * m_InterlinePitch;
}
static const METRICS& Default();
public:
double m_InterlinePitch = 1.68;
double m_OverbarHeight = 1.23;
double m_UnderlineOffset = -0.16;
};
} // namespace KIFONT
#endif // FONT_METRICS_H_
+2 -2
View File
@@ -23,7 +23,6 @@
#ifndef LIB_TREE_MODEL_ADAPTER_H
#define LIB_TREE_MODEL_ADAPTER_H
#include <eda_base_frame.h>
#include <lib_id.h>
#include <lib_tree_model.h>
#include <settings/app_settings.h>
@@ -96,6 +95,7 @@
#include <project.h>
;
class TOOL_DISPATCHER;
class TOOL_INTERACTIVE;
class EDA_BASE_FRAME;
@@ -279,7 +279,7 @@ public:
virtual void ShowPreview( wxWindow* aParent, const wxDataViewItem& aItem ) {}
virtual void ShutdownPreview( wxWindow* aParent ) {}
TOOL_DISPATCHER* GetToolDispatcher() const { return m_parent->GetToolDispatcher(); }
TOOL_DISPATCHER* GetToolDispatcher() const;
/**
* Return the number of symbols loaded in the tree.
+34
View File
@@ -0,0 +1,34 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright The 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef MOUSE_DRAG_ACTION_H
#define MOUSE_DRAG_ACTION_H
enum class MOUSE_DRAG_ACTION
{
// WARNING: these are encoded as integers in the file, so don't change their values.
DRAG_ANY = -2,
DRAG_SELECTED,
SELECT,
ZOOM,
PAN,
NONE
};
#endif // MOUSE_DRAG_ACTION_H
+3 -3
View File
@@ -233,7 +233,7 @@ public:
virtual void ShowChangedLanguage() override;
virtual void UpdateStatusBar() override;
PCB_SCREEN* GetScreen() const override { return (PCB_SCREEN*) EDA_DRAW_FRAME::GetScreen(); }
PCB_SCREEN* GetScreen() const override;
/**
* Show the 3D view frame.
@@ -347,8 +347,8 @@ public:
*/
virtual void SwitchLayer( PCB_LAYER_ID aLayer );
virtual void SetActiveLayer( PCB_LAYER_ID aLayer ) { GetScreen()->m_Active_Layer = aLayer; }
virtual PCB_LAYER_ID GetActiveLayer() const { return GetScreen()->m_Active_Layer; }
virtual void SetActiveLayer( PCB_LAYER_ID aLayer );
virtual PCB_LAYER_ID GetActiveLayer() const;
SEVERITY GetSeverity( int aErrorCode ) const override;
+1 -2
View File
@@ -31,7 +31,6 @@
#ifndef PGM_BASE_H_
#define PGM_BASE_H_
#include <bs_thread_pool.hpp>
#include <kicommon.h>
#include <singleton.h>
#include <exception>
@@ -117,7 +116,7 @@ public:
*/
void BuildArgvUtf8();
BS::priority_thread_pool& GetThreadPool() { return *m_singleton.m_ThreadPool; }
BS::priority_thread_pool& GetThreadPool();
GL_CONTEXT_MANAGER* GetGLContextManager() { return m_singleton.m_GLContextManager; }
-64
View File
@@ -23,10 +23,6 @@
#include <layer_ids.h>
#include <lset.h>
#include <settings/parameters.h>
// Can be removed by refactoring PARAM_LAYER_PRESET
#include <json_common.h>
#include <math/box2.h>
#include <glm/glm.hpp>
@@ -203,24 +199,6 @@ struct KICOMMON_API LAYER_PRESET
};
class KICOMMON_API PARAM_LAYER_PRESET : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_LAYER_PRESET( const std::string& aPath, std::vector<LAYER_PRESET>* aPresetList );
static void MigrateToV9Layers( nlohmann::json& aJson );
static void MigrateToNamedRenderLayers( nlohmann::json& aJson );
private:
nlohmann::json presetsToJson();
void jsonToPresets( const nlohmann::json& aJson );
std::vector<LAYER_PRESET>* m_presets;
};
struct KICOMMON_API VIEWPORT
{
VIEWPORT( const wxString& aName = wxEmptyString ) :
@@ -237,20 +215,6 @@ struct KICOMMON_API VIEWPORT
};
class KICOMMON_API PARAM_VIEWPORT : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_VIEWPORT( const std::string& aPath, std::vector<VIEWPORT>* aViewportList );
private:
nlohmann::json viewportsToJson();
void jsonToViewports( const nlohmann::json& aJson );
std::vector<VIEWPORT>* m_viewports;
};
struct KICOMMON_API VIEWPORT3D
{
VIEWPORT3D( const wxString& aName = wxEmptyString ) :
@@ -267,20 +231,6 @@ struct KICOMMON_API VIEWPORT3D
};
class KICOMMON_API PARAM_VIEWPORT3D : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_VIEWPORT3D( const std::string& aPath, std::vector<VIEWPORT3D>* aViewportList );
private:
nlohmann::json viewportsToJson();
void jsonToViewports( const nlohmann::json & aJson );
std::vector<VIEWPORT3D>* m_viewports;
};
class KICOMMON_API LAYER_PAIR
{
public:
@@ -343,20 +293,6 @@ private:
};
class KICOMMON_API PARAM_LAYER_PAIRS : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_LAYER_PAIRS( const std::string& aPath, std::vector<LAYER_PAIR_INFO>& m_layerPairInfos );
private:
nlohmann::json layerPairsToJson();
void jsonToLayerPairs( const nlohmann::json& aJson );
std::vector<LAYER_PAIR_INFO>& m_layerPairInfos;
};
/**
* Persisted state for the net inspector panel
*/
@@ -0,0 +1,88 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright The 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef KICAD_BOARD_PROJECT_SETTINGS_PARAMS_H
#define KICAD_BOARD_PROJECT_SETTINGS_PARAMS_H
#include <project/board_project_settings.h>
#include <settings/parameters.h>
class KICOMMON_API PARAM_LAYER_PRESET : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_LAYER_PRESET( const std::string& aPath, std::vector<LAYER_PRESET>* aPresetList );
static void MigrateToV9Layers( nlohmann::json& aJson );
static void MigrateToNamedRenderLayers( nlohmann::json& aJson );
private:
nlohmann::json presetsToJson();
void jsonToPresets( const nlohmann::json& aJson );
std::vector<LAYER_PRESET>* m_presets;
};
class KICOMMON_API PARAM_VIEWPORT : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_VIEWPORT( const std::string& aPath, std::vector<VIEWPORT>* aViewportList );
private:
nlohmann::json viewportsToJson();
void jsonToViewports( const nlohmann::json& aJson );
std::vector<VIEWPORT>* m_viewports;
};
class KICOMMON_API PARAM_VIEWPORT3D : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_VIEWPORT3D( const std::string& aPath, std::vector<VIEWPORT3D>* aViewportList );
private:
nlohmann::json viewportsToJson();
void jsonToViewports( const nlohmann::json & aJson );
std::vector<VIEWPORT3D>* m_viewports;
};
class KICOMMON_API PARAM_LAYER_PAIRS : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_LAYER_PAIRS( const std::string& aPath, std::vector<LAYER_PAIR_INFO>& m_layerPairInfos );
private:
nlohmann::json layerPairsToJson();
void jsonToLayerPairs( const nlohmann::json& aJson );
std::vector<LAYER_PAIR_INFO>& m_layerPairInfos;
};
#endif // KICAD_BOARD_PROJECT_SETTINGS_PARAMS_H
+1 -1
View File
@@ -22,7 +22,7 @@
#define _APP_SETTINGS_H
#include <gal/color4d.h>
#include <nlohmann/json_fwd.hpp>
#include <json_common.h>
#include <settings/json_settings.h>
#include <settings/grid_settings.h>
+8 -14
View File
@@ -20,20 +20,12 @@
#pragma once
#include <memory>
#include <mouse_drag_action.h>
#include <settings/environment.h>
#include <settings/json_settings.h>
enum class MOUSE_DRAG_ACTION
{
// WARNING: these are encoded as integers in the file, so don't change their values.
DRAG_ANY = -2,
DRAG_SELECTED,
SELECT,
ZOOM,
PAN,
NONE
};
struct COMMON_SETTINGS_INTERNALS;
enum class ICON_THEME
{
@@ -188,7 +180,10 @@ public:
COMMON_SETTINGS();
virtual ~COMMON_SETTINGS() {}
virtual ~COMMON_SETTINGS();
COMMON_SETTINGS_INTERNALS& CsInternals() { return *m_csInternals; }
const COMMON_SETTINGS_INTERNALS& CsInternals() const { return *m_csInternals; }
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
@@ -230,6 +225,5 @@ public:
GIT m_Git;
API m_Api;
/// Persistent dialog control values
std::map<std::string, std::map<std::string, nlohmann::json>> m_dialogControlValues;
std::unique_ptr<COMMON_SETTINGS_INTERNALS> m_csInternals;
};
@@ -0,0 +1,32 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright The 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef KICAD_COMMON_SETTINGS_INTERNALS_H
#define KICAD_COMMON_SETTINGS_INTERNALS_H
#include <json_common.h>
#include <map>
#include <string>
struct COMMON_SETTINGS_INTERNALS
{
std::map<std::string, std::map<std::string, nlohmann::json>> m_dialogControlValues;
};
#endif // KICAD_COMMON_SETTINGS_INTERNALS_H
+2 -2
View File
@@ -22,14 +22,13 @@
#define _JSON_SETTINGS_H
#include <core/wx_stl_compat.h>
#include <gal/gal_display_options.h>
#include <utility>
#include <wx/string.h>
#include <functional>
#include <optional>
#include <settings/json_settings_internals.h>
#include <nlohmann/json_fwd.hpp>
#include <json_conversions.h>
#include <kicommon.h>
@@ -48,6 +47,7 @@ struct GRID;
namespace KIGFX
{
class COLOR4D;
enum class CROSS_HAIR_MODE : int;
};
#define traceSettings wxT( "KICAD_SETTINGS" )
+1
View File
@@ -27,6 +27,7 @@
#include <math/util.h>
#include <optional>
#include <json_common.h>
#include <gal/color4d.h>
#include <settings/json_settings.h>
#include <settings/grid_settings.h>
+2 -15
View File
@@ -25,7 +25,7 @@
#include <mutex>
#include <typeinfo>
#include <core/wx_stl_compat.h> // for wxString hash
#include <settings/color_settings.h>
#include <settings/json_settings.h>
#include <pgm_base.h>
class COLOR_SETTINGS;
@@ -219,20 +219,7 @@ public:
*/
COLOR_SETTINGS* GetColorSettings( const wxString& aName );
std::vector<COLOR_SETTINGS*> GetColorSettingsList()
{
std::vector<COLOR_SETTINGS*> ret;
for( const std::pair<const wxString, COLOR_SETTINGS*>& entry : m_color_settings )
ret.push_back( entry.second );
std::sort( ret.begin(), ret.end(), []( COLOR_SETTINGS* a, COLOR_SETTINGS* b )
{
return a->GetName() < b->GetName();
} );
return ret;
}
std::vector<COLOR_SETTINGS*> GetColorSettingsList();
/**
* Safely save a #COLOR_SETTINGS to disk, preserving any changes outside the given namespace.
-1
View File
@@ -21,7 +21,6 @@
#define KICAD_SINGLETON_H
#include <cstdint>
#include <advanced_config.h>
class GL_CONTEXT_MANAGER;
namespace BS
+1 -1
View File
@@ -26,7 +26,7 @@
#include <vector>
#include <tool/selection.h>
#include <settings/common_settings.h>
#include <mouse_drag_action.h>
struct ACTION_CONDITIONS;
+2
View File
@@ -26,6 +26,7 @@
#define LIB_TREE_H
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/timer.h>
#include <lib_tree_model_adapter.h>
#include <widgets/html_window.h>
@@ -37,6 +38,7 @@ class wxSearchCtrl;
class wxTimer;
class wxTimerEvent;
class wxPopupWindow;
class BITMAP_BUTTON;
class STD_BITMAP_BUTTON;
class ACTION_MENU;
class LIB_ID;
+2 -10
View File
@@ -29,6 +29,7 @@
#include <wx/panel.h>
#include <wx/sizer.h>
#include <reporter.h>
#include <widgets/wx_infobar_message_type.h>
class wxAuiManager;
@@ -87,16 +88,7 @@ public:
~WX_INFOBAR();
/**
* Sets the type of message for special handling if needed
*/
enum class MESSAGE_TYPE
{
GENERIC, /**< GENERIC Are messages that do not have special handling */
OUTDATED_SAVE, /**< OUTDATED_SAVE Messages that should be cleared on save */
DRC_RULES_ERROR,
DRC_VIOLATION
};
using MESSAGE_TYPE = INFOBAR_MESSAGE_TYPE;
MESSAGE_TYPE GetMessageType() const { return m_type; }
+35
View File
@@ -0,0 +1,35 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Ian McInerney <ian.s.mcinerney@ieee.org>
* Copyright The 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef WX_INFOBAR_MESSAGE_TYPE_H
#define WX_INFOBAR_MESSAGE_TYPE_H
/**
* Sets the type of message for special handling if needed
*/
enum class INFOBAR_MESSAGE_TYPE
{
GENERIC, ///< GENERIC Are messages that do not have special handling
OUTDATED_SAVE, ///< OUTDATED_SAVE Messages that should be cleared on save
DRC_RULES_ERROR,
DRC_VIOLATION
};
#endif // WX_INFOBAR_MESSAGE_TYPE_H
+1
View File
@@ -59,6 +59,7 @@
#include <reporter.h>
#include <project/project_local_settings.h>
#include <sch_file_versions.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <tool/action_manager.h>
#include <tool/action_toolbar.h>
+1
View File
@@ -24,6 +24,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <settings/common_settings.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <file_history.h>
+1
View File
@@ -35,6 +35,7 @@
#include <wx/wupdlock.h>
#include <wx/log.h>
#include <settings/common_settings.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <bitmap_store.h>
+1
View File
@@ -33,6 +33,7 @@
#include <kidialog.h>
#include <project/project_file.h>
#include <project/project_local_settings.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <settings/kicad_settings.h>
#include <tool/selection.h>
@@ -18,6 +18,7 @@
*/
#include <pgm_base.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <pl_editor_settings.h>
#include "panel_pl_editor_color_settings.h"
+1
View File
@@ -26,6 +26,7 @@
#include <wx/msgdlg.h>
#include <fmt/format.h>
#include <widgets/wx_infobar.h>
#include <tool/tool_manager.h>
#include <tool/picker_tool.h>
#include <drawing_sheet/ds_data_item.h>
+1
View File
@@ -20,6 +20,7 @@
#include <magic_enum.hpp>
#include <common.h>
#include <api/api_handler_pcb.h>
#include <api/api_pcb_utils.h>
#include <api/api_enums.h>
+1
View File
@@ -25,6 +25,7 @@
#include <board_commit.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <widgets/wx_infobar.h>
#include <widgets/wx_progress_reporters.h>
#include "ar_autoplacer.h"
+1 -1
View File
@@ -29,7 +29,6 @@
#include <board_stackup_manager/board_stackup.h>
#include <component_classes/component_class_manager.h>
#include <embedded_files.h>
#include <common.h> // Needed for stl hash extensions
#include <convert_shape_list_to_polygon.h> // for OUTLINE_ERROR_HANDLER
#include <geometry/shape_poly_set.h>
#include <hash.h>
@@ -40,6 +39,7 @@
#include <pcb_plot_params.h>
#include <title_block.h>
#include <tools/pcb_selection.h>
#include <zone_settings.h>
#include <shared_mutex>
#include <project.h>
#include <list>
+1
View File
@@ -26,6 +26,7 @@
#include <board.h>
#include <board_connected_item.h>
#include <board_design_settings.h>
#include <project/net_settings.h>
#include <drc/drc_engine.h>
#include <connectivity/connectivity_data.h>
#include <lset.h>
+1
View File
@@ -28,6 +28,7 @@
#include <kiface_base.h>
#include <pad.h>
#include <board_design_settings.h>
#include <project/net_settings.h>
#include <drc/drc_item.h>
#include <drc/drc_engine.h>
#include <settings/json_settings_internals.h>
-1
View File
@@ -28,7 +28,6 @@
#define BOARD_ITEM_CONTAINER_H
#include <board_item.h>
#include <zone_settings.h>
enum class ADD_MODE
{
+1
View File
@@ -22,6 +22,7 @@
#include <board.h>
#include <board_design_settings.h>
#include <project/net_settings.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_track.h>

Some files were not shown because too many files have changed in this diff Show More