KiCad PCB EDA Suite
|
Handle one item (a file or a directory name) for the tree file. More...
#include <project_tree_item.h>
Public Member Functions | |
PROJECT_TREE_ITEM (TREE_FILE_TYPE type, const wxString &data, wxTreeCtrl *parent) | |
Class PROJECT_TREE_ITEM is a derived class from wxTreeItemData and store info about a file or directory shown in the KiCad tree project files. | |
PROJECT_TREE_ITEM () | |
PROJECT_TREE_ITEM (const PROJECT_TREE_ITEM &src) | |
TREE_FILE_TYPE | GetType () const |
void | SetType (TREE_FILE_TYPE aType) |
const wxString & | GetFileName () const |
void | SetFileName (const wxString &name) |
bool | IsRootFile () const |
void | SetRootFile (bool aValue) |
bool | IsPopulated () const |
void | SetPopulated (bool aValue) |
const wxString | GetDir () const |
bool | Rename (const wxString &name, bool check=true) |
void | Delete () |
void | Print () |
void | Activate (PROJECT_TREE_PANE *aTreePrjFrame) |
void | SetState (int state) |
bool | CanDelete () const |
Determine if a file can be deleted via the project tree pane. | |
bool | CanRename () const |
Private Attributes | |
TREE_FILE_TYPE | m_type |
wxString | m_file_name |
bool | m_isRootFile |
bool | m_isPopulated |
wxTreeCtrl * | m_parent |
int | m_state |
Handle one item (a file or a directory name) for the tree file.
Definition at line 39 of file project_tree_item.h.
PROJECT_TREE_ITEM::PROJECT_TREE_ITEM | ( | TREE_FILE_TYPE | type, |
const wxString & | data, | ||
wxTreeCtrl * | parent | ||
) |
Class PROJECT_TREE_ITEM is a derived class from wxTreeItemData and store info about a file or directory shown in the KiCad tree project files.
Definition at line 49 of file project_tree_item.cpp.
References m_parent, m_state, SetFileName(), SetPopulated(), SetRootFile(), and SetType().
|
inline |
Definition at line 45 of file project_tree_item.h.
|
inline |
Definition at line 49 of file project_tree_item.h.
References m_isPopulated, m_state, and SetState().
void PROJECT_TREE_ITEM::Activate | ( | PROJECT_TREE_PANE * | aTreePrjFrame | ) |
Definition at line 176 of file project_tree_item.cpp.
References KICAD_MANAGER_ACTIONS::editDrawingSheet, KICAD_MANAGER_ACTIONS::editFootprints, KICAD_MANAGER_ACTIONS::editOtherPCB, KICAD_MANAGER_ACTIONS::editOtherSch, KICAD_MANAGER_ACTIONS::editPCB, KICAD_MANAGER_ACTIONS::editSchematic, KICAD_MANAGER_ACTIONS::editSymbols, KIWAY::ExpressMail(), FRAME_FOOTPRINT_EDITOR, FRAME_SCH_SYMBOL_EDITOR, GetFileName(), TOOLS_HOLDER::GetToolManager(), GetType(), KIWAY_HOLDER::Kiway(), KICAD_MANAGER_FRAME::LoadProject(), m_parent, PROJECT_TREE_PANE::m_Parent, PROJECT_TREE_PANE::m_TreeProject, MAIL_FP_EDIT, MAIL_LIB_EDIT, OpenFile(), KICAD_MANAGER_FRAME::OpenJobsFile(), OpenPDF(), KICAD_MANAGER_ACTIONS::openTextEditor, KICAD_MANAGER_FRAME::PcbFileName(), KICAD_MANAGER_FRAME::PcbLegacyFileName(), TOOL_MANAGER::RunAction(), KICAD_MANAGER_FRAME::SchFileName(), KICAD_MANAGER_FRAME::SchLegacyFileName(), and KICAD_MANAGER_ACTIONS::viewGerbers.
Referenced by PROJECT_TREE_PANE::onIdle().
bool PROJECT_TREE_ITEM::CanDelete | ( | ) | const |
Determine if a file can be deleted via the project tree pane.
Definition at line 76 of file project_tree_item.cpp.
References m_type.
Referenced by CanRename(), and Delete().
|
inline |
void PROJECT_TREE_ITEM::Delete | ( | ) |
Definition at line 151 of file project_tree_item.cpp.
References _, CanDelete(), DisplayErrorMessage(), GetFileName(), m_parent, and KIPLATFORM::ENV::MoveToTrash().
const wxString PROJECT_TREE_ITEM::GetDir | ( | ) | const |
Definition at line 96 of file project_tree_item.cpp.
References GetFileName(), and m_type.
Referenced by PROJECT_TREE_PANE::addItemToProjectTree(), PROJECT_TREE_PANE::onGitInitializeProject(), and Rename().
|
inline |
Definition at line 61 of file project_tree_item.h.
References m_file_name.
Referenced by Activate(), PROJECT_TREE_PANE::addItemToProjectTree(), Delete(), PROJECT_TREE_PANE::findSubdirTreeItem(), GetDir(), PROJECT_TREE::OnCompareItems(), PROJECT_TREE_PANE::onExpand(), PROJECT_TREE_PANE::onFileSystemEvent(), Rename(), and PROJECT_TREE_PANE::updateGitStatusIcons().
|
inline |
Definition at line 58 of file project_tree_item.h.
References m_type.
Referenced by Activate(), PROJECT_TREE_PANE::addItemToProjectTree(), PROJECT_TREE_PANE::findSubdirTreeItem(), PROJECT_TREE::OnCompareItems(), PROJECT_TREE_PANE::onExpand(), and Rename().
|
inline |
Definition at line 67 of file project_tree_item.h.
References m_isPopulated.
Referenced by PROJECT_TREE_PANE::findSubdirTreeItem(), and PROJECT_TREE_PANE::onExpand().
|
inline |
Definition at line 64 of file project_tree_item.h.
References m_isRootFile.
Referenced by PROJECT_TREE::OnCompareItems().
void PROJECT_TREE_ITEM::Print | ( | ) |
bool PROJECT_TREE_ITEM::Rename | ( | const wxString & | name, |
bool | check = true |
||
) |
Definition at line 105 of file project_tree_item.cpp.
References _, CanRename(), GetDir(), PROJECT_TREE_PANE::GetFileExt(), GetFileName(), GetType(), m_parent, and name.
|
inline |
Definition at line 62 of file project_tree_item.h.
References m_file_name, and name.
Referenced by PROJECT_TREE_ITEM().
|
inline |
Definition at line 68 of file project_tree_item.h.
References m_isPopulated.
Referenced by PROJECT_TREE_PANE::addItemToProjectTree(), PROJECT_TREE_PANE::onExpand(), and PROJECT_TREE_ITEM().
|
inline |
Definition at line 65 of file project_tree_item.h.
References m_isRootFile.
Referenced by PROJECT_TREE_PANE::addItemToProjectTree(), and PROJECT_TREE_ITEM().
void PROJECT_TREE_ITEM::SetState | ( | int | state | ) |
Definition at line 62 of file project_tree_item.cpp.
References m_parent, m_state, and m_type.
Referenced by PROJECT_TREE_PANE::addItemToProjectTree(), and PROJECT_TREE_ITEM().
|
inline |
Definition at line 59 of file project_tree_item.h.
References m_type.
Referenced by PROJECT_TREE_ITEM().
|
private |
Definition at line 96 of file project_tree_item.h.
Referenced by GetFileName(), and SetFileName().
|
private |
Definition at line 98 of file project_tree_item.h.
Referenced by IsPopulated(), PROJECT_TREE_ITEM(), and SetPopulated().
|
private |
Definition at line 97 of file project_tree_item.h.
Referenced by IsRootFile(), and SetRootFile().
|
private |
Definition at line 99 of file project_tree_item.h.
Referenced by Activate(), Delete(), PROJECT_TREE_ITEM(), Rename(), and SetState().
|
private |
Definition at line 100 of file project_tree_item.h.
Referenced by PROJECT_TREE_ITEM(), and SetState().
|
private |
Definition at line 95 of file project_tree_item.h.
Referenced by CanDelete(), GetDir(), GetType(), SetState(), and SetType().