KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew/files.cpp File Reference
#include <string>
#include <confirm.h>
#include <core/arraydim.h>
#include <core/thread_pool.h>
#include <gestfich.h>
#include <pcb_edit_frame.h>
#include <board_design_settings.h>
#include <3d_viewer/eda_3d_viewer_frame.h>
#include <fp_lib_table.h>
#include <kiface_base.h>
#include <macros.h>
#include <trace_helpers.h>
#include <lockfile.h>
#include <wx/snglinst.h>
#include <netlist_reader/pcb_netlist.h>
#include <pcbnew_id.h>
#include <wildcards_and_files_ext.h>
#include <tool/tool_manager.h>
#include <board.h>
#include <kiplatform/app.h>
#include <widgets/appearance_controls.h>
#include <widgets/wx_infobar.h>
#include <widgets/wx_progress_reporters.h>
#include <settings/settings_manager.h>
#include <string_utf8_map.h>
#include <paths.h>
#include <pgm_base.h>
#include <project/project_file.h>
#include <project_pcb.h>
#include <project/project_local_settings.h>
#include <project/net_settings.h>
#include <io/common/plugin_common_choose_project.h>
#include <pcb_io/pcb_io_mgr.h>
#include <pcb_io/cadstar/pcb_io_cadstar_archive.h>
#include <pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>
#include <dialogs/dialog_export_2581.h>
#include <dialogs/dialog_imported_layers.h>
#include <dialogs/dialog_import_choose_project.h>
#include <tools/pcb_actions.h>
#include "footprint_info_impl.h"
#include <board_commit.h>
#include <zone_filler.h>
#include <wx_filename.h>
#include <kiplatform/io.h>
#include <wx/stdpaths.h>
#include <wx/ffile.h>
#include <wx/filedlg.h>
#include <wx/txtstrm.h>
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
#include "widgets/filedlg_hook_save_project.h"

Go to the source code of this file.

Macros

#define USE_INSTRUMENTATION   0
 

Functions

bool AskLoadBoardFileName (PCB_EDIT_FRAME *aParent, wxString *aFileName, int aCtl=0)
 Show a wxFileDialog asking for a BOARD filename to open.
 
bool AskSaveBoardFileName (PCB_EDIT_FRAME *aParent, wxString *aFileName, bool *aCreateProject)
 Put up a wxFileDialog asking for a BOARD filename to save.
 

Macro Definition Documentation

◆ USE_INSTRUMENTATION

#define USE_INSTRUMENTATION   0

Definition at line 84 of file pcbnew/files.cpp.

Function Documentation

◆ AskLoadBoardFileName()

bool AskLoadBoardFileName ( PCB_EDIT_FRAME aParent,
wxString *  aFileName,
int  aCtl = 0 
)

Show a wxFileDialog asking for a BOARD filename to open.

Parameters
aParentis a wxFrame passed to wxFileDialog.
aCtlis where to put the OpenProjectFiles() control bits.
aFileNameon entry is a probable choice, on return is the chosen filename.
aKicadFilesOnlytrue to list KiCad pcb files plugins only, false to list import plugins.
Returns
true if chosen, else false if user aborted.

Definition at line 96 of file pcbnew/files.cpp.

References _, AddFileExtListToFilter(), formatWildcardExt(), PATHS::GetDefaultUserProjectsPath(), EDA_BASE_FRAME::GetMruPath(), PCB_IO_MGR::PLUGIN_REGISTRY::Instance(), PCB_IO_MGR::KICAD_SEXP, KICTL_KICAD_ONLY, KICTL_NONKICAD_ONLY, PCB_IO_MGR::LEGACY, IO_BASE::IO_FILE_DESC::m_FileExtensions, name, path, and EDA_BASE_FRAME::SetMruPath().

Referenced by PCB_CONTROL::AppendBoardFromFile(), PCB_EDIT_FRAME::Files_io_from_id(), and PCB_EDIT_FRAME::OnFileHistory().

◆ AskSaveBoardFileName()

bool AskSaveBoardFileName ( PCB_EDIT_FRAME aParent,
wxString *  aFileName,
bool *  aCreateProject 
)

Put up a wxFileDialog asking for a BOARD filename to save.

Parameters
aParentis a wxFrame passed to wxFileDialog.
aFileNameon entry is a probable choice, on return is the chosen full filename (includes path).
aCreateProjectwill be filled with the state of the Create Project? checkbox if relevant.
Returns
true if chosen, else false if user aborted.

Definition at line 199 of file pcbnew/files.cpp.

References _, EnsureFileExtension(), FILEDLG_HOOK_SAVE_PROJECT::GetCreateNewProject(), FILEDLG_HOOK_SAVE_PROJECT::IsAttachedToDialog(), PROJECT::IsNullProject(), FILEEXT::KiCadPcbFileExtension, Kiface(), FILEEXT::PcbFileWildcard(), and KIWAY_HOLDER::Prj().

Referenced by PCB_EDIT_FRAME::Files_io_from_id().