34#include <system_error>
63#include <wx/filedlg.h>
90 wxString default_filename = aFileName ? *aFileName : wxString();
92 wxString default_dir =
m_frame->GetMruPath();
93 wxFileDialog dlg(
m_frame,
_(
"Create New Project" ), default_dir, default_filename,
95 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
101 dlg.SetCustomizeHook( newProjectHook );
105 if( dlg.ShowModal() == wxID_CANCEL )
108 wxFileName pro( dlg.GetPath() );
113 pro.SetName( pro.GetName() + wxT(
"." ) + pro.GetExt() );
117 if( !pro.IsAbsolute() )
121 bool createNewDir =
false;
126 pro.AppendDir( pro.GetName() );
131 if( !pro.DirExists() )
136 msg.Printf(
_(
"Folder '%s' could not be created.\n\n"
137 "Make sure you have write permissions and try again." ),
145 wxString msg =
_(
"The selected folder is not empty. It is recommended that you "
146 "create projects in their own empty folder.\n\n"
147 "Do you want to continue?" );
167 wxString userTemplatesPath;
168 wxString systemTemplatesPath;
170 auto resolveTemplateDir =
171 [](
const wxString& aValue ) -> wxString
177 if( resolved.Contains( wxT(
"${" ) ) || resolved.Contains( wxT(
"$(" ) ) )
178 return wxEmptyString;
180 wxFileName templatePath;
181 templatePath.AssignDir( resolved );
183 return templatePath.GetFullPath();
188 if( itUser !=
Pgm().GetLocalEnvVariables().
end() && itUser->second.GetValue() != wxEmptyString )
189 userTemplatesPath = resolveTemplateDir( itUser->second.GetValue() );
192 wxT(
"TEMPLATE_DIR" ) );
194 if( v && !v->IsEmpty() )
195 systemTemplatesPath = resolveTemplateDir( *v );
200 wxString defaultTemplatesPath;
202 if( defaultTemplate.IsOk() )
203 defaultTemplatesPath = resolveTemplateDir( defaultTemplate.GetPath() );
209 if( !defaultTemplatesPath.IsEmpty() )
211 wxFileName defaultRootFn = defaultTemplate;
212 defaultRootFn.RemoveLastDir();
213 wxString defaultRoot = resolveTemplateDir( defaultRootFn.GetPath() );
215 if( defaultRoot == userTemplatesPath || defaultRoot == systemTemplatesPath )
216 defaultTemplatesPath = wxEmptyString;
221 if( !defaultTemplate.IsOk() && userTemplatesPath.IsEmpty() && systemTemplatesPath.IsEmpty() )
228 m_frame->CreateNewProject( pro );
238 wxString selectedTemplatePath;
239 wxPoint templateWindowPos;
240 wxSize templateWindowSize;
241 wxString projectToEdit;
242 wxString browsedTemplatesPath;
249 systemTemplatesPath, defaultTemplatesPath,
254 templateWindowPos = ps.GetPosition();
255 templateWindowSize = ps.GetSize();
264 htmlFile.RemoveLastDir();
265 selectedTemplatePath = htmlFile.GetPath();
274 if(
result == wxID_APPLY )
276 if( !projectToEdit.IsEmpty() && wxFileExists( projectToEdit ) )
278 m_frame->LoadProject( wxFileName( projectToEdit ) );
286 if( selectedTemplatePath.IsEmpty() )
288 wxMessageBox(
_(
"No project template was selected. Cannot generate new project." ),
_(
"Error" ),
289 wxOK | wxICON_ERROR,
m_frame );
297 wxString default_dir = wxFileName(
Prj().GetProjectFullName() ).GetPathWithSep();
298 wxString title =
_(
"New Project Folder" );
300 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
305 dlg.SetCustomizeHook( newProjectHook );
309 if( dlg.ShowModal() == wxID_CANCEL )
312 wxFileName fn( dlg.GetPath() );
315 fn.SetName( fn.GetName() + wxT(
"." ) + fn.GetExt() );
319 if( !fn.IsAbsolute() )
322 bool createNewDir =
false;
326 fn.AppendDir( fn.GetName() );
328 if( !fn.DirExists() && !fn.Mkdir() )
331 "Make sure you have write permissions and try again." ),
336 if( !fn.IsDirWritable() )
343 std::vector< wxFileName > destFiles;
347 std::vector<wxFileName> overwrittenFiles;
349 for(
const wxFileName& file : destFiles )
351 if( file.FileExists() )
352 overwrittenFiles.push_back( file );
355 if( !overwrittenFiles.empty() )
357 wxString extendedMsg =
_(
"Overwriting files:" ) +
"\n";
359 for(
const wxFileName& file : overwrittenFiles )
360 extendedMsg +=
"\n" + file.GetFullName();
362 KIDIALOG msgDlg(
m_frame,
_(
"Similar files already exist in the destination folder." ),
363 _(
"Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
364 msgDlg.SetExtendedMessage( extendedMsg );
365 msgDlg.SetOKLabel(
_(
"Overwrite" ) );
382 wxFileName templateDir = selectedTemplate.
GetHtmlFile();
383 templateDir.RemoveLastDir();
384 wxString templatePath = templateDir.GetPath();
390 recentTemplates.erase( std::remove( recentTemplates.begin(), recentTemplates.end(), templatePath ),
391 recentTemplates.end() );
392 recentTemplates.insert( recentTemplates.begin(), templatePath );
394 if( recentTemplates.size() > 5 )
395 recentTemplates.resize( 5 );
397 m_frame->CreateNewProject( fn.GetFullPath() );
407 dlg.SetTitle(
_(
"Clone Project from Git Repository" ) );
422 bool retriedAfterTrust =
false;
427 bool cancelled =
false;
431 std::optional<KIGIT::HOST_KEY_FAILURE> hostKey;
470 retriedAfterTrust =
true;
481 git_repository_free( cloneCommon.
GetRepo() );
482 cloneCommon.
SetRepo(
nullptr );
484 if( projects.empty() )
487 "were cloned to '%s', which can be deleted if they are "
495 wxString dest = pro.GetPath() + wxFileName::GetPathSeparator() + projects.front();
500 struct IDENTITY_RESULT
507 auto identity = std::make_shared<IDENTITY_RESULT>();
514 identity->read =
true;
516 [
this, common, identity]()
518 if( !identity->read || !
m_frame ||
m_frame->IsBeingDeleted() || !common || common->IsShuttingDown()
519 ||
Prj().GetGitCommon() != common || !
Pgm().GetCommonSettings()->m_Git.enableGit
520 ||
Prj().GetLocalSettings().m_GitIntegrationDisabled )
554 wxString default_dir = wxFileName(
Prj().GetProjectFullName() ).GetPathWithSep();
556 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
560 if( dlg.ShowModal() == wxID_CANCEL )
563 wxFileName jobsetFn( dlg.GetPath() );
566 bool fileExists = wxFileExists( jobsetFn.GetFullPath() );
571 if( !wxRemoveFile( jobsetFn.GetFullPath() ) )
577 m_frame->OpenJobsFile( jobsetFn.GetFullPath(),
true );
591 wxFileDialog dlg(
m_frame,
_(
"Open Existing Project" ), aDefaultDir, wxEmptyString, wildcard,
592 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
598 if( dlg.ShowModal() == wxID_CANCEL )
601 wxFileName pro( dlg.GetPath() );
603 if( !pro.IsAbsolute() )
634 wxString default_dir = wxFileName(
Prj().GetProjectFullName() ).GetPathWithSep();
636 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
640 if( dlg.ShowModal() == wxID_CANCEL )
643 wxFileName jobsetFn( dlg.GetPath() );
645 m_frame->OpenJobsFile( jobsetFn.GetFullPath(),
true );
668 wxFileName fileName =
m_frame->GetProjectFileName();
672 wxFileDialog dlg(
m_frame,
_(
"Archive Project Files" ), fileName.GetPath(), fileName.GetFullName(),
677 if( dlg.ShowModal() == wxID_CANCEL )
680 wxFileName zipFile = dlg.GetPath();
682 wxString currdirname = fileName.GetPathWithSep();
683 wxDir dir( currdirname );
685 if( !dir.IsOpened() )
691 archiver.
Archive( currdirname, zipFile.GetFullPath(),
reporter,
true,
true );
705 wxFileName proFn(
Prj().GetProjectFullName() );
706 wxString projectDir = proFn.GetPath();
707 wxString projectName = proFn.GetName();
716 wxMessageBox(
_(
"You have unsaved changes. Save them before exporting?" ),
717 _(
"Export for Older KiCad Version" ), wxYES_NO | wxCANCEL | wxICON_WARNING,
m_frame );
719 if( answer == wxCANCEL )
722 if( answer == wxYES )
731 if( payload !=
"success" )
733 wxMessageBox(
_(
"The schematic was not saved. Nothing was exported." ),
734 _(
"Export for Older KiCad Version" ), wxOK | wxICON_ERROR,
m_frame );
744 if( payload !=
"success" )
746 wxMessageBox(
_(
"The board was not saved. Nothing was exported." ),
747 _(
"Export for Older KiCad Version" ), wxOK | wxICON_ERROR,
m_frame );
761 if( wxMessageBox(
_(
"A library editor has unsaved changes. The export uses the last saved "
762 "library files. Continue?" ),
763 _(
"Export for Older KiCad Version" ), wxYES_NO | wxICON_WARNING,
m_frame )
774 names.Add( target.m_name );
778 const wxString& probeTarget = targets.back().m_name;
781 std::vector<wxString> foundVariants;
786 wxMessageBox( error,
_(
"Export for Older KiCad Version" ), wxOK | wxICON_ERROR,
m_frame );
790 wxArrayString variantNames;
792 for(
const wxString&
name : foundVariants )
805 wxString destDir = setupDlg.
GetPath() + wxFileName::GetPathSeparator() + projectName;
810 if( std::filesystem::exists( destDir.ToStdWstring(), ec )
811 && !std::filesystem::is_empty( destDir.ToStdWstring(), ec ) )
813 wxMessageBox( wxString::Format(
_(
"The folder '%s' is not empty. Choose a location where it "
814 "does not exist yet." ),
816 _(
"Export for Older KiCad Version" ), wxOK | wxICON_ERROR,
m_frame );
821 foundVariants.clear();
824 if( target == probeTarget && !dropInsteadOfApproximate && variant.IsEmpty() )
826 report = probeReport;
827 foundVariants.assign( variantNames.begin(), variantNames.end() );
830 &foundVariants, dropInsteadOfApproximate, variant ) )
832 wxMessageBox( error,
_(
"Export for Older KiCad Version" ), wxOK | wxICON_ERROR,
m_frame );
845 dropInsteadOfApproximate ) )
847 wxMessageBox( error,
_(
"Export for Older KiCad Version" ), wxOK | wxICON_ERROR,
m_frame );
851 wxMessageBox( wxString::Format(
_(
"Exported to '%s'." ), destDir ),
_(
"Export for Older KiCad Version" ),
852 wxOK | wxICON_INFORMATION,
m_frame );
866 m_frame->RestoreLocalHistory();
880 m_frame->ToggleGitCommitPane();
888 wxExecute( *aEvent.
Parameter<wxString*>(), wxEXEC_ASYNC );
899 wxFileName currentProjectFile(
Prj().GetProjectFullName() );
900 wxString currentProjectDirPath = currentProjectFile.GetPath();
903 wxString default_dir =
m_frame->GetMruPath();
908 if( default_dir == currentProjectDirPath
909 || default_dir == currentProjectDirPath + wxFileName::GetPathSeparator() )
912 wxFileName default_dir_fn( default_dir );
913 default_dir_fn.RemoveLastDir();
914 default_dir = default_dir_fn.GetPath();
917 wxFileDialog dlg(
m_frame,
_(
"Save Project To" ), default_dir, wxEmptyString, wxEmptyString, wxFD_SAVE );
923 if( dlg.ShowModal() == wxID_CANCEL )
926 wxFileName newProjectDir( dlg.GetPath(), wxEmptyString );
928 if( !newProjectDir.IsAbsolute() )
929 newProjectDir.MakeAbsolute();
931 if( wxDirExists( newProjectDir.GetFullPath() ) )
933 msg.Printf(
_(
"'%s' already exists." ), newProjectDir.GetFullPath() );
938 if( !wxMkdir( newProjectDir.GetFullPath() ) )
941 "Please make sure you have sufficient permissions." ),
942 newProjectDir.GetPath() ) );
946 if( !newProjectDir.IsDirWritable() )
949 newProjectDir.GetFullPath() ) );
953 const wxString& newProjectDirPath = newProjectDir.GetFullPath();
954 const wxString& newProjectName = newProjectDir.GetDirs().Last();
955 wxDir currentProjectDir( currentProjectDirPath );
958 newProjectDirPath, newProjectName );
960 currentProjectDir.Traverse( traverser );
987 if( conditionalMenu )
988 conditionalMenu->Evaluate( dummySel );
1020 player =
m_frame->Kiway().Player( playerType,
true );
1024 wxLogError(
_(
"Application failed to load:\n" ) + err.
What() );
1030 wxLogError(
_(
"Application cannot start." ) );
1034 if( !player->IsVisible() )
1040 wxFileName kicad_schematic(
m_frame->SchFileName() );
1041 wxFileName legacy_schematic(
m_frame->SchLegacyFileName() );
1043 if( !legacy_schematic.FileExists() || kicad_schematic.FileExists() )
1044 filepath = kicad_schematic.GetFullPath();
1046 filepath = legacy_schematic.GetFullPath();
1050 wxFileName kicad_board(
m_frame->PcbFileName() );
1051 wxFileName legacy_board(
m_frame->PcbLegacyFileName() );
1053 if( !legacy_board.FileExists() || kicad_board.FileExists() )
1054 filepath = kicad_board.GetFullPath();
1056 filepath = legacy_board.GetFullPath();
1059 if( !filepath.IsEmpty() )
1061 std::vector<wxString> file_list{ filepath };
1063 if( !player->OpenProjectFiles( file_list ) )
1071 player->Show(
true );
1075 if( player->IsIconized() )
1076 player->Iconize(
false );
1082 if( wxWindow::FindFocus() != player )
1086 if(
Pgm().GetCommonSettings()->m_Session.remember_open_files
1087 && !player->GetCurrentFileName().IsEmpty()
1088 &&
Prj().GetLocalSettings().ShouldAutoSave() )
1090 wxFileName rfn( player->GetCurrentFileName() );
1091 rfn.MakeRelativeTo(
Prj().GetProjectPath() );
1094 player->SaveWindowSettings( &windowSettings );
1122 wxFAIL_MSG(
"Execute(): unexpected request" );
1124 if( execFile.IsEmpty() )
1130 param =
m_frame->Prj().GetProjectPath();
1133 return commonControl->
Execute( execFile, param );
1161 std::string payload =
"";
1180 std::string payload =
"";
static TOOL_ACTION zoomRedraw
static TOOL_ACTION saveAs
static TOOL_ACTION showGitCommitPane
static TOOL_ACTION updateMenu
Handle actions that are shared between different applications.
int Execute(const TOOL_EVENT &aEvent)
What an export to a given target will keep, approximate, drop, or block.
void Add(DOWNGRADE_BUCKET aBucket, const wxString &aFeature, const wxString &aDetail=wxEmptyString, int aCount=1)
bool IsLossy() const
True if anything is approximated or dropped. This is what triggers the lossy warning.
bool IsBlocked() const
True if some feature makes the target impossible. The user cannot export anyway.
Shows what an export will approximate, drop, or refuse.
bool GetDropInsteadOfApproximate() const
wxString GetTarget() const
wxString GetVariant() const
The variant to flatten, or empty for the base design.
KIGIT_COMMON::GIT_CONN_TYPE GetRepoType() const
wxString GetRepoSSHPath() const
wxString GetRepoURL() const
wxString GetUsername() const
wxString GetRepoName() const
wxString GetPassword() const
Implementing pcm main dialog.
const std::unordered_set< PCM_PACKAGE_TYPE > & GetChangedPackageTypes() const
Returns types of packages that were installed/uninstalled.
wxString GetBrowsedTemplatesPath() const
Last directory chosen via the "Browse..." button so the caller can persist it.
PROJECT_TEMPLATE * GetSelectedTemplate()
wxString GetProjectToEdit() const
virtual bool IsContentModified() const
Get if the contents of the frame have been modified since the last save.
bool GetCreateNewDir() const
Gets the selected state of the create new directory checkbox.
void SetRemote(const wxString &aRemote)
void SetClonePath(const wxString &aPath)
void SetProgressReporter(std::unique_ptr< PROGRESS_REPORTER > aProgressReporter)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
static TOOL_ACTION viewDroppedGerbers
static TOOL_ACTION openDemoProject
static TOOL_ACTION editPCB
static TOOL_ACTION unarchiveProject
static TOOL_ACTION loadProject
static TOOL_ACTION exportForOlderVersion
static TOOL_ACTION editOtherPCB
static TOOL_ACTION restoreLocalHistory
static TOOL_ACTION newProject
static TOOL_ACTION editOtherSch
static TOOL_ACTION showLocalHistory
static TOOL_ACTION editSchematic
static TOOL_ACTION openTextEditor
static TOOL_ACTION archiveProject
static TOOL_ACTION openProject
static TOOL_ACTION closeProject
static TOOL_ACTION editDrawingSheet
static TOOL_ACTION openProjectDirectory
static TOOL_ACTION openJobsetFile
static TOOL_ACTION newJobsetFile
static TOOL_ACTION editFootprints
static TOOL_ACTION showPluginManager
static TOOL_ACTION showCalculator
static TOOL_ACTION viewGerbers
static TOOL_ACTION newFromRepository
static TOOL_ACTION editSymbols
int ExportForOlderVersion(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int OpenProject(const TOOL_EVENT &aEvent)
int NewJobsetFile(const TOOL_EVENT &aEvent)
void setTransitions() override
Set up handlers for various events.
int OpenDemoProject(const TOOL_EVENT &aEvent)
int CloseProject(const TOOL_EVENT &aEvent)
int ToggleLocalHistory(const TOOL_EVENT &aEvent)
int ArchiveProject(const TOOL_EVENT &aEvent)
bool m_inShowPlayer
Re-entrancy guard.
int SaveProjectAs(const TOOL_EVENT &aEvent)
int NewProject(const TOOL_EVENT &aEvent)
int RestoreLocalHistory(const TOOL_EVENT &aEvent)
int UnarchiveProject(const TOOL_EVENT &aEvent)
int ViewDroppedViewers(const TOOL_EVENT &aEvent)
Imports a non kicad project from a sch/pcb dropped file.
int ShowPluginManager(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
int OpenJobsetFile(const TOOL_EVENT &aEvent)
int ToggleGitCommitPane(const TOOL_EVENT &aEvent)
wxFileName newProjectDirectory(wxString *aFileName=nullptr, bool isRepo=false)
int NewFromRepository(const TOOL_EVENT &aEvent)
int LoadProject(const TOOL_EVENT &aEvent)
KICAD_MANAGER_FRAME * m_frame
Pointer to the currently used edit/draw frame.
int ExploreProject(const TOOL_EVENT &aEvent)
int ShowPlayer(const TOOL_EVENT &aEvent)
int Refresh(const TOOL_EVENT &aEvent)
int openProject(const wxString &aDefaultDir)
int Execute(const TOOL_EVENT &aEvent)
KIGIT_QUERY m_identityQuery
Read the identity after cloning. Closing or resetting the tool suppresses its prompt.
std::vector< wxString > m_RecentTemplates
wxSize m_TemplateWindowSize
wxString m_BrowsedTemplatesPath
wxPoint m_TemplateWindowPos
wxString m_LastUsedTemplate
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
void DoNotShowCheckbox(wxString file, int line)
Shows the 'do not show again' checkbox.
The project's git session.
std::vector< wxString > GetProjectDirs()
Return a vector of project files in the repository.
git_repository * GetRepo() const
static REMOTE_URL ParseRemoteURL(const wxString &aURL)
void SetRepo(git_repository *aRepo)
KIGIT_ERROR_MESSAGE PopError()
Take the newest error with its details. Both are empty when none is queued.
void SetPassword(const wxString &aPassword)
Set the password.
std::optional< KIGIT::HOST_KEY_FAILURE > GetHostKeyFailure() const
The host key this operation's transfer refused, for the UI to offer to trust or to report.
void SetUsername(const wxString &aUsername)
Set the username.
bool IsThisOperationCancelled() const
void SetSSHKey(const wxString &aSSHKey)
Set the SSH key.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr, bool aFromOtherThread=false)
Send aPayload to aDestination from aSource.
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
static wxString GetUserTemplatesPath()
Gets the user path for custom templates.
static wxString GetDefaultUserProjectsPath()
Gets the default path we point users to create projects.
static wxString GetStockDemosPath()
Gets the stock (install) demos path.
virtual ENV_VAR_MAP & GetLocalEnvVariables() const
virtual const wxString & GetTextEditor(bool aCanShowFileChooser=true)
Return the path to the preferred text editor application.
virtual SETTINGS_MANAGER & GetSettingsManager() const
static bool Archive(const wxString &aSrcDir, const wxString &aDestFile, REPORTER &aReporter, bool aVerbose=true, bool aIncludeExtraFiles=false)
Create an archive of the project.
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
Calls Store() and then writes the contents of the JSON document to a file.
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
Calls Store() and then writes the contents of the JSON document to a file.
wxString m_GitRepoUsername
void SaveFileState(const wxString &aFileName, const WINDOW_SETTINGS *aWindowCfg, bool aOpen)
A class which provides project template functionality.
size_t GetDestinationFiles(const wxFileName &aNewProjectPath, std::vector< wxFileName > &aDestFiles)
Fetch the list of destination files to be copied when the new project is created.
wxFileName GetHtmlFile()
Get the full Html filename for the project template.
bool CreateProject(wxFileName &aNewProjectPath, wxString *aErrorMsg=nullptr)
Copies and renames all template files to create a new project.
Traverser class to duplicate/copy project or template files with proper renaming.
wxString GetErrors() const
wxFileName GetNewProjectFile() const
virtual std::shared_ptr< KIGIT_COMMON > GetGitCommon() const
This project's Git session, created empty on first use.
virtual const wxString GetProjectName() const
Return the short name of the project.
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
virtual PROJECT_FILE & GetProjectFile() const
void ReloadColorSettings()
Re-scan the color themes directory, reloading any changes it finds.
A wrapper for reporting to a specific text location in a statusbar.
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject, bool aAllowEscapes)
Replace any environment variable & text variable references with their values.
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
const std::vector< DOWNGRADE_TARGET > & GetDowngradeTargets()
Supported downgrade targets, newest first.
Functions related to environment variables, including help functions.
const wxString EESCHEMA_EXE
const wxString GERBVIEW_EXE
const wxString PL_EDITOR_EXE
const wxString PCBNEW_EXE
const wxString PCB_CALCULATOR_EXE
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
@ FRAME_SCH_SYMBOL_EDITOR
static const std::string ProjectFileExtension
static const std::string LegacyProjectFileExtension
static const std::string ArchiveFileExtension
static wxString ProjectFileWildcard()
static wxString JobsetFileWildcard()
static wxString LegacyProjectFileWildcard()
static wxString AllProjectFilesWildcard()
static wxString ZipFileWildcard()
std::map< wxString, ENV_VAR_ITEM >::const_iterator ENV_VAR_MAP_CITER
bool LaunchExternal(const wxString &aPath)
Launches the given file or folder in the host OS.
KICOMMON_API std::optional< wxString > GetVersionedEnvVarValue(const std::map< wxString, ENV_VAR_ITEM > &aMap, const wxString &aBaseName)
Attempt to retrieve the value of a versioned environment variable, such as KICAD8_TEMPLATE_DIR.
GIT_IDENTITY ReadGitIdentity(KIGIT_COMMON &aCommon)
Read on a worker while holding the session's action lock.
bool EnsureGitIdentity(wxWindow *aParent, EDA_BASE_FRAME *aFrame, const std::shared_ptr< KIGIT_COMMON > &aCommon, const GIT_IDENTITY &aIdentity)
Open the same editor when the worker snapshot has no usable Git identity.
bool PromptToTrustHost(wxWindow *aParent, const HOST_KEY_FAILURE &aFailure, bool aRetriedAfterTrust)
Ask whether to trust a server seen for the first time, and remember its key when the user agrees.
PGM_BASE & Pgm()
The global program "get" accessor.
bool ExportProjectForDowngrade(KIWAY &aKiway, const wxString &aProjectDir, const wxString &aProjectName, const wxString &aTargetName, const wxString &aDestDir, wxString &aError, const wxString &aVariant, bool aDropInsteadOfApproximate)
Export a downgraded copy of the project into aDestDir.
bool ClassifyProjectForDowngrade(KIWAY &aKiway, const wxString &aProjectDir, const wxString &aProjectName, const wxString &aTargetName, COMPATIBILITY_REPORT &aReport, wxString &aError, std::vector< wxString > *aFoundVariants, bool aDropInsteadOfApproximate, const wxString &aVariant)
Run the board and schematic classification for a whole project without writing anything.
wxFileName EnsureDefaultProjectTemplate(const wxString &aBaseDir)
Seed the built-in "default" project template under aBaseDir, creating the directory tree and minimal ...
T * GetAppSettings(const char *aFilename)
An older KiCad release we can export a project back to.
Implement a participant in the KIWAY alchemy.
Repository values and whether Git can use them to record a commit.
A summary the user can act on, with the raw text that explains it kept apart for the details.
Store the common settings that are saved and loaded for each window / frame.
IFACE KIFACE_BASE kiface("pcb_test_frame", KIWAY::FACE_PCB)
IbisParser parser & reporter
wxString result
Test unit parsing edge cases and error handling.
Definition of file extensions used in Kicad.
#define FN_NORMALIZE_FLAGS
Default flags to pass to wxFileName::Normalize().