KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PROJECT_TREE_TRAVERSER Class Reference

Traverser class to duplicate/copy project or template files with proper renaming. More...

#include <project_tree_traverser.h>

Inheritance diagram for PROJECT_TREE_TRAVERSER:

Public Member Functions

 PROJECT_TREE_TRAVERSER (KICAD_MANAGER_FRAME *aFrame, const wxString &aSrcProjectDirPath, const wxString &aSrcProjectName, const wxString &aNewProjectDirPath, const wxString &aNewProjectName)
 
virtual wxDirTraverseResult OnFile (const wxString &aSrcFilePath) override
 
virtual wxDirTraverseResult OnDir (const wxString &aSrcDirPath) override
 
wxString GetErrors () const
 
wxFileName GetNewProjectFile () const
 

Private Attributes

KICAD_MANAGER_FRAMEm_frame
 
wxString m_projectDirPath
 
wxString m_projectName
 
wxString m_newProjectDirPath
 
wxString m_newProjectName
 
wxFileName m_newProjectFile
 
wxString m_errors
 

Detailed Description

Traverser class to duplicate/copy project or template files with proper renaming.

This class can operate in two modes:

  1. With KICAD_MANAGER_FRAME: Uses KIFACE interfaces for proper file type handling
  2. Without KICAD_MANAGER_FRAME (nullptr): Simple file copying for templates

Definition at line 40 of file project_tree_traverser.h.

Constructor & Destructor Documentation

◆ PROJECT_TREE_TRAVERSER()

PROJECT_TREE_TRAVERSER::PROJECT_TREE_TRAVERSER ( KICAD_MANAGER_FRAME * aFrame,
const wxString & aSrcProjectDirPath,
const wxString & aSrcProjectName,
const wxString & aNewProjectDirPath,
const wxString & aNewProjectName )

Member Function Documentation

◆ GetErrors()

wxString PROJECT_TREE_TRAVERSER::GetErrors ( ) const
inline

◆ GetNewProjectFile()

wxFileName PROJECT_TREE_TRAVERSER::GetNewProjectFile ( ) const
inline

Definition at line 53 of file project_tree_traverser.h.

References m_newProjectFile.

Referenced by KICAD_MANAGER_CONTROL::SaveProjectAs().

◆ OnDir()

wxDirTraverseResult PROJECT_TREE_TRAVERSER::OnDir ( const wxString & aSrcDirPath)
overridevirtual

◆ OnFile()

Member Data Documentation

◆ m_errors

wxString PROJECT_TREE_TRAVERSER::m_errors
private

Definition at line 64 of file project_tree_traverser.h.

Referenced by GetErrors(), OnDir(), and OnFile().

◆ m_frame

KICAD_MANAGER_FRAME* PROJECT_TREE_TRAVERSER::m_frame
private

Definition at line 56 of file project_tree_traverser.h.

Referenced by OnFile(), and PROJECT_TREE_TRAVERSER().

◆ m_newProjectDirPath

wxString PROJECT_TREE_TRAVERSER::m_newProjectDirPath
private

Definition at line 60 of file project_tree_traverser.h.

Referenced by OnDir(), OnFile(), and PROJECT_TREE_TRAVERSER().

◆ m_newProjectFile

wxFileName PROJECT_TREE_TRAVERSER::m_newProjectFile
private

Definition at line 63 of file project_tree_traverser.h.

Referenced by GetNewProjectFile(), and OnFile().

◆ m_newProjectName

wxString PROJECT_TREE_TRAVERSER::m_newProjectName
private

Definition at line 61 of file project_tree_traverser.h.

Referenced by OnDir(), OnFile(), and PROJECT_TREE_TRAVERSER().

◆ m_projectDirPath

wxString PROJECT_TREE_TRAVERSER::m_projectDirPath
private

Definition at line 58 of file project_tree_traverser.h.

Referenced by OnDir(), OnFile(), and PROJECT_TREE_TRAVERSER().

◆ m_projectName

wxString PROJECT_TREE_TRAVERSER::m_projectName
private

Definition at line 59 of file project_tree_traverser.h.

Referenced by OnDir(), OnFile(), and PROJECT_TREE_TRAVERSER().


The documentation for this class was generated from the following files: