mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 20:11:41 +00:00
Build time optimizations.
This commit is contained in:
parent
16f3237983
commit
16e3692e71
3d-viewer
3d_canvas
3d_rendering
3d_viewer
common
CMakeLists.txtconfirm.cpp
dialog_about
dialog_shim.cppdialogs
dialog_assign_netclass.cppdialog_book_reporter.cppdialog_configure_paths.cppdialog_edit_library_tables.cppdialog_grid_settings.cppdialog_hotkey_list.cppdialog_page_settings.cppdialog_print_generic.cppeda_reorderable_list_dialog.cpp
draw_panel_gal.cppeda_base_frame.cppeda_draw_frame.cppeda_shape.cppkidialog.cppkiway_player.cppgit
hotkey_cycle_popup.hpanel_color_settings.cpppanel_grid_settings.cpppanel_image_editor.cpppanel_setup_netclasses.cpppanel_setup_severities.cppplotters
scintilla_tricks.cppsingle_top.cpptool
validators.cppwidgets
cvpcb
eeschema
dialogs
dialog_bom.cppdialog_edit_symbols_libid.cppdialog_erc.cppdialog_lib_symbol_properties.cppdialog_migrate_buses.cppdialog_schematic_find.hdialog_sheet_properties.cppdialog_sim_command.cppdialog_symbol_fields_table.cppdialog_symbol_remap.cppdialog_update_symbol_fields.hpanel_eeschema_editing_options.cpppanel_sym_lib_table.cpp
files-io.cppnetlist_exporters
project_rescue.cppsch_base_frame.cppsch_connection.hsch_draw_panel.hsch_io
sch_no_connect.cppsch_shape.cppsch_symbol.cppsch_symbol.hsheet.cppsymbol_checker.cppsymbol_editor
tools
sch_drawing_tools.cppsch_edit_tool.cppsch_editor_control.cppsch_line_wire_bus_tool.cppsch_move_tool.cppsymbol_editor_control.cppsymbol_editor_drawing_tools.cppsymbol_editor_edit_tool.cppsymbol_editor_move_tool.cppsymbol_editor_pin_tool.cpp
widgets
gerbview
include
kicad
pagelayout_editor
pcbnew
build_BOM_from_board.cpp
dialogs
dialog_drc.cppdialog_exchange_footprints.cppdialog_export_idf.cppdialog_export_step.cppdialog_export_svg.cppdialog_export_vrml.cppdialog_footprint_associations.cppdialog_footprint_chooser.cppdialog_footprint_properties.cppdialog_gen_footprint_position.cppdialog_gencad_export_options.cppdialog_gencad_export_options.hdialog_import_netlist.cppdialog_move_exact.cppdialog_move_exact.hdialog_non_copper_zones_properties.cppdialog_plot.cppdialog_reference_image_properties.cppdialog_rule_area_properties.cppdialog_swap_layers.cppdialog_table_properties.cppdialog_track_via_properties.cppdialog_update_pcb.cpppanel_fp_editor_defaults.cpppanel_fp_lib_table.cpppanel_setup_layers.cpppanel_setup_text_and_graphics.cpp
edit_zone_helpers.cppfiles.cppfootprint_chooser_frame.cppfootprint_editor_utils.cppfootprint_libraries_utils.cppgenerators
kicad_clipboard.cpppcb_base_frame.cpppcb_dimension.cpppcb_io/kicad_sexpr
pcb_shape.cpppcb_table.cpppcb_table.hrouter
tools
board_editor_control.cppboard_inspection_tool.cppdrawing_stackup_table_tool.cppdrawing_tool.cppedit_tool_move_fct.cppfootprint_editor_control.cpppcb_control.cpppcb_tool_base.cppplacement_tool.cppplacement_tool.hzone_create_helper.cpp
widgets
zone_filler.cppqa/tests/eeschema
@ -34,6 +34,7 @@
|
||||
#include "../3d_rendering/raytracing/shapes2D/round_segment_2d.h"
|
||||
#include "../3d_rendering/raytracing/shapes2D/triangle_2d.h"
|
||||
#include <board_adapter.h>
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <pad.h>
|
||||
#include <pcb_text.h>
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
|
||||
#include "raytracing/shapes2D/triangle_2d.h"
|
||||
#include <board_design_settings.h>
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <pad.h>
|
||||
#include <pcb_text.h>
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "render_3d_opengl.h"
|
||||
#include "opengl_utils.h"
|
||||
#include "common_ogl/ogl_utils.h"
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <3d_math.h>
|
||||
#include <glm/geometric.hpp>
|
||||
|
@ -31,6 +31,7 @@
|
||||
#define _BBOX_3D_H_
|
||||
|
||||
#include <plugins/3dapi/xv3d_types.h> // SFVEC2F
|
||||
#include <glm/mat4x4.hpp>
|
||||
|
||||
struct RAY;
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <3d_viewer/tools/eda_3d_actions.h>
|
||||
#include <3d_viewer/tools/eda_3d_controller.h>
|
||||
#include <3d_viewer/tools/eda_3d_conditions.h>
|
||||
#include <board.h>
|
||||
#include <advanced_config.h>
|
||||
#include <bitmaps.h>
|
||||
#include <board_design_settings.h>
|
||||
|
@ -133,6 +133,7 @@ set( KICOMMON_SRCS
|
||||
exceptions.cpp
|
||||
gestfich.cpp
|
||||
json_conversions.cpp
|
||||
kidialog.cpp
|
||||
kiid.cpp
|
||||
kiway.cpp
|
||||
kiway_express.cpp
|
||||
|
@ -22,134 +22,15 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <confirm.h>
|
||||
|
||||
#include <functional>
|
||||
#include <wx/app.h>
|
||||
#include <wx/stockitem.h>
|
||||
#include <wx/richmsgdlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/choicdlg.h>
|
||||
#include <wx/crt.h>
|
||||
#include <confirm.h>
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
|
||||
// Set of dialogs that have been chosen not to be shown again
|
||||
static std::unordered_map<unsigned long, int> doNotShowAgainDlgs;
|
||||
|
||||
|
||||
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption,
|
||||
long aStyle )
|
||||
: wxRichMessageDialog( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ),
|
||||
m_hash( 0 ),
|
||||
m_cancelMeansCancel( true )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, KD_TYPE aType,
|
||||
const wxString& aCaption )
|
||||
: wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ),
|
||||
m_hash( 0 ),
|
||||
m_cancelMeansCancel( true )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void KIDIALOG::DoNotShowCheckbox( wxString aUniqueId, int line )
|
||||
{
|
||||
ShowCheckBox( _( "Do not show again" ), false );
|
||||
|
||||
m_hash = std::hash<wxString>{}( aUniqueId ) + line;
|
||||
}
|
||||
|
||||
|
||||
bool KIDIALOG::DoNotShowAgain() const
|
||||
{
|
||||
return doNotShowAgainDlgs.count( m_hash ) > 0;
|
||||
}
|
||||
|
||||
|
||||
void KIDIALOG::ForceShowAgain()
|
||||
{
|
||||
doNotShowAgainDlgs.erase( m_hash );
|
||||
}
|
||||
|
||||
|
||||
bool KIDIALOG::Show( bool aShow )
|
||||
{
|
||||
// We should check the do-not-show-again setting only when the dialog is displayed
|
||||
if( aShow )
|
||||
{
|
||||
// Check if this dialog should be shown to the user
|
||||
auto it = doNotShowAgainDlgs.find( m_hash );
|
||||
|
||||
if( it != doNotShowAgainDlgs.end() )
|
||||
return it->second;
|
||||
}
|
||||
|
||||
int ret = wxRichMessageDialog::Show( aShow );
|
||||
|
||||
// Has the user asked not to show the dialog again?
|
||||
// Note that we don't save a Cancel value unless the Cancel button is being used for some
|
||||
// other function (which is actually more common than it being used for Cancel).
|
||||
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
|
||||
doNotShowAgainDlgs[m_hash] = ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int KIDIALOG::ShowModal()
|
||||
{
|
||||
// Check if this dialog should be shown to the user
|
||||
auto it = doNotShowAgainDlgs.find( m_hash );
|
||||
|
||||
if( it != doNotShowAgainDlgs.end() )
|
||||
return it->second;
|
||||
|
||||
int ret = wxRichMessageDialog::ShowModal();
|
||||
|
||||
// Has the user asked not to show the dialog again?
|
||||
// Note that we don't save a Cancel value unless the Cancel button is being used for some
|
||||
// other function (which is actually more common than it being used for Cancel).
|
||||
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
|
||||
doNotShowAgainDlgs[m_hash] = ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
wxString KIDIALOG::getCaption( KD_TYPE aType, const wxString& aCaption )
|
||||
{
|
||||
if( !aCaption.IsEmpty() )
|
||||
return aCaption;
|
||||
|
||||
switch( aType )
|
||||
{
|
||||
case KD_NONE: /* fall through */
|
||||
case KD_INFO: return _( "Message" );
|
||||
case KD_QUESTION: return _( "Question" );
|
||||
case KD_WARNING: return _( "Warning" );
|
||||
case KD_ERROR: return _( "Error" );
|
||||
}
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
||||
long KIDIALOG::getStyle( KD_TYPE aType )
|
||||
{
|
||||
long style = wxOK | wxCENTRE | wxSTAY_ON_TOP;
|
||||
|
||||
switch( aType )
|
||||
{
|
||||
case KD_NONE: break;
|
||||
case KD_INFO: style |= wxICON_INFORMATION; break;
|
||||
case KD_QUESTION: style |= wxICON_QUESTION; break;
|
||||
case KD_WARNING: style |= wxICON_WARNING; break;
|
||||
case KD_ERROR: style |= wxICON_ERROR; break;
|
||||
}
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
|
||||
bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage )
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
|
||||
#include <build_version.h>
|
||||
#include <eda_base_frame.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/hyperlink.h>
|
||||
|
@ -526,7 +526,7 @@ int DIALOG_SHIM::ShowQuasiModal()
|
||||
|
||||
m_qmodal_showing = true;
|
||||
|
||||
WX_EVENT_LOOP event_loop;
|
||||
wxGUIEventLoop event_loop;
|
||||
|
||||
m_qmodal_loop = &event_loop;
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <project.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project/net_settings.h>
|
||||
#include <eda_base_frame.h>
|
||||
|
||||
|
||||
DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS( EDA_BASE_FRAME* aParent, const wxString aNetName,
|
||||
|
@ -23,7 +23,8 @@
|
||||
|
||||
#include <dialogs/dialog_book_reporter.h>
|
||||
#include <widgets/wx_html_report_box.h>
|
||||
#include <wx/wxhtml.h>
|
||||
#include <wx/event.h>
|
||||
#include <kiway_player.h>
|
||||
|
||||
|
||||
wxDEFINE_EVENT( EDA_EVT_CLOSE_DIALOG_BOOK_REPORTER, wxCommandEvent );
|
||||
|
@ -26,8 +26,10 @@
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <kidialog.h>
|
||||
#include <validators.h>
|
||||
#include <dialogs/html_message_box.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <filename_resolver.h>
|
||||
#include <env_vars.h>
|
||||
#include <grid_tricks.h>
|
||||
|
@ -17,8 +17,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
|
||||
#include <dialogs/dialog_edit_library_tables.h>
|
||||
|
||||
|
@ -22,8 +22,7 @@
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <wx/textdlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <dialogs/dialog_grid_settings.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <common.h>
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <dialogs/dialog_hotkey_list.h>
|
||||
#include <kiface_base.h>
|
||||
#include <eda_base_frame.h>
|
||||
#include <panel_hotkeys_editor.h>
|
||||
#include <widgets/ui_common.h>
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <bitmaps.h>
|
||||
#include <base_screen.h>
|
||||
#include <common.h> // ExpandEnvVarSubstitutions
|
||||
#include <confirm.h>
|
||||
#include <core/arraydim.h>
|
||||
#include <dialogs/dialog_page_settings.h>
|
||||
#include <eda_draw_frame.h>
|
||||
@ -43,6 +42,7 @@
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#define MAX_PAGE_EXAMPLE_SIZE 200
|
||||
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
#include <dialogs/dialog_print_generic.h>
|
||||
|
||||
#include <confirm.h>
|
||||
#include <eda_draw_frame.h>
|
||||
#include <printout.h>
|
||||
#include <pgm_base.h>
|
||||
#include <confirm.h>
|
||||
|
||||
#include <wx/print.h>
|
||||
#include <wx/printdlg.h>
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <bitmaps.h>
|
||||
#include <string_utils.h>
|
||||
#include <dialogs/eda_reorderable_list_dialog.h>
|
||||
|
@ -26,9 +26,13 @@
|
||||
|
||||
#include <dialog_shim.h>
|
||||
#include <git2.h>
|
||||
#include <vector>
|
||||
|
||||
class wxCheckBox;
|
||||
class wxTextCtrl;
|
||||
class wxListCtrl;
|
||||
class wxButton;
|
||||
|
||||
class DIALOG_GIT_COMMIT : public DIALOG_SHIM
|
||||
{
|
||||
public:
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
||||
|
@ -26,12 +26,12 @@
|
||||
#define DIALOG_GIT_SWITCH_H
|
||||
|
||||
#include <dialog_shim.h>
|
||||
#include <wx/timer.h>
|
||||
#include <git2.h>
|
||||
|
||||
class wxButton;
|
||||
class wxListView;
|
||||
class wxTextCtrl;
|
||||
class wxTimer;
|
||||
class wxListEvent;
|
||||
|
||||
struct BranchData
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <eda_view_switcher_base.h>
|
||||
|
||||
class EDA_DRAW_FRAME;
|
||||
class wxTimer;
|
||||
|
||||
/**
|
||||
* Similar to EDA_VIEW_SWITCHER, this dialog is a popup that shows feedback when using a hotkey to
|
||||
|
@ -27,10 +27,12 @@
|
||||
#include <settings/common_settings.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <validators.h>
|
||||
#include <widgets/ui_common.h>
|
||||
#include <widgets/color_swatch.h>
|
||||
#include <widgets/wx_panel.h>
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/textdlg.h>
|
||||
|
||||
// Button ID starting point
|
||||
|
@ -22,12 +22,12 @@
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <confirm.h>
|
||||
#include <wx/textdlg.h>
|
||||
#include <dialogs/panel_grid_settings.h>
|
||||
#include <dialogs/dialog_grid_settings.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <common.h>
|
||||
#include <confirm.h>
|
||||
#include <settings/app_settings.h>
|
||||
#include <eda_draw_frame.h>
|
||||
#include <tool/tool_manager.h>
|
||||
|
@ -23,11 +23,12 @@
|
||||
*/
|
||||
|
||||
#include <wx/dcclient.h>
|
||||
#include <confirm.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <bitmap_base.h>
|
||||
#include <pcb_base_edit_frame.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tool/actions.h>
|
||||
#include <confirm.h>
|
||||
|
||||
#include <dialogs/panel_image_editor.h>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user