![]() |
KiCad PCB EDA Suite
|
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded and can be displayed there are 32 images max which can be loaded. More...
#include <gerber_file_image_list.h>
Public Member Functions | |
GERBER_FILE_IMAGE_LIST () | |
~GERBER_FILE_IMAGE_LIST () | |
GERBER_FILE_IMAGE * | GetGbrImage (int aIdx) |
unsigned | ImagesMaxCount () |
int | AddGbrImage (GERBER_FILE_IMAGE *aGbrImage, int aIdx) |
Add a GERBER_FILE_IMAGE* at index aIdx or at the first free location if aIdx < 0. More... | |
void | DeleteAllImages () |
Remove all loaded data in list, and delete all images, freeing the memory. More... | |
void | DeleteImage (int aIdx) |
Delete the loaded data of image aIdx, freeing the memory. More... | |
const wxString | GetDisplayName (int aIdx, bool aNameOnly=false, bool aFullName=false) |
Get the display name for the layer at aIdx. More... | |
std::unordered_map< int, int > | SortImagesByZOrder () |
Sort loaded images by Z order priority, if they have the X2 FileFormat info (SortImagesByZOrder updates the graphic layer of these items) More... | |
Static Public Member Functions | |
static GERBER_FILE_IMAGE_LIST & | GetImagesList () |
Private Attributes | |
std::vector< GERBER_FILE_IMAGE * > | m_GERBER_List |
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded and can be displayed there are 32 images max which can be loaded.
Definition at line 63 of file gerber_file_image_list.h.
GERBER_FILE_IMAGE_LIST::GERBER_FILE_IMAGE_LIST | ( | ) |
Definition at line 44 of file gerber_file_image_list.cpp.
References GERBER_DRAWLAYERS_COUNT, and m_GERBER_List.
GERBER_FILE_IMAGE_LIST::~GERBER_FILE_IMAGE_LIST | ( | ) |
Definition at line 53 of file gerber_file_image_list.cpp.
References DeleteAllImages().
int GERBER_FILE_IMAGE_LIST::AddGbrImage | ( | GERBER_FILE_IMAGE * | aGbrImage, |
int | aIdx | ||
) |
Add a GERBER_FILE_IMAGE* at index aIdx or at the first free location if aIdx < 0.
aGbrImage | = the image to add |
aIdx | = the location to use ( 0 ... GERBER_DRAWLAYERS_COUNT-1 ) |
Definition at line 78 of file gerber_file_image_list.cpp.
References m_GERBER_List, and NULL.
Referenced by GERBVIEW_FRAME::Read_EXCELLON_File(), and GERBVIEW_FRAME::Read_GERBER_File().
void GERBER_FILE_IMAGE_LIST::DeleteAllImages | ( | ) |
Remove all loaded data in list, and delete all images, freeing the memory.
Definition at line 100 of file gerber_file_image_list.cpp.
References DeleteImage(), and m_GERBER_List.
Referenced by GERBVIEW_FRAME::Clear_DrawLayers(), ~GERBER_FILE_IMAGE_LIST(), and GERBVIEW_FRAME::~GERBVIEW_FRAME().
void GERBER_FILE_IMAGE_LIST::DeleteImage | ( | int | aIdx | ) |
Delete the loaded data of image aIdx, freeing the memory.
aIdx | = the index ( 0 ... GERBER_DRAWLAYERS_COUNT-1 ) |
Definition at line 107 of file gerber_file_image_list.cpp.
References GetGbrImage(), and m_GERBER_List.
Referenced by DeleteAllImages(), and GERBVIEW_FRAME::Erase_Current_DrawLayer().
const wxString GERBER_FILE_IMAGE_LIST::GetDisplayName | ( | int | aIdx, |
bool | aNameOnly = false , |
||
bool | aFullName = false |
||
) |
Get the display name for the layer at aIdx.
aIdx | = the index ( 0 ... GERBER_DRAWLAYERS_COUNT-1 ) |
aNameOnly | = false (default) to add the layer number (for layers manager) or true to return only the name without layer name (status bar) |
aFullName | = false (default) to ellipsize the name, true to return the full name. |
Definition at line 121 of file gerber_file_image_list.cpp.
References _, X2_ATTRIBUTE_FILEFUNCTION::GetBrdLayerId(), X2_ATTRIBUTE_FILEFUNCTION::GetBrdLayerSide(), X2_ATTRIBUTE_FILEFUNCTION::GetDrillLayerPair(), X2_ATTRIBUTE_FILEFUNCTION::GetFileType(), X2_ATTRIBUTE_FILEFUNCTION::GetLPType(), X2_ATTRIBUTE_FILEFUNCTION::GetRouteType(), X2_ATTRIBUTE_FILEFUNCTION::IsCopper(), X2_ATTRIBUTE_FILEFUNCTION::IsDrillFile(), GERBER_FILE_IMAGE::m_FileFunction, GERBER_FILE_IMAGE::m_FileName, m_GERBER_List, name, and NULL.
Referenced by GERBVIEW_FRAME::GERBVIEW_FRAME(), GBR_LAYER_BOX_SELECTOR::getLayerName(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), GERBER_DRAW_ITEM::GetSelectMenuText(), and GERBER_LAYER_WIDGET::ReFill().
GERBER_FILE_IMAGE * GERBER_FILE_IMAGE_LIST::GetGbrImage | ( | int | aIdx | ) |
Definition at line 65 of file gerber_file_image_list.cpp.
References m_GERBER_List, and NULL.
Referenced by GBR_LAYOUT::ComputeBoundingBox(), DeleteImage(), GBR_TO_PCB_EXPORTER::ExportPcb(), GERBVIEW_CONTROL::ExportToPcbnew(), LAYERS_MAP_DIALOG::findNumAltiumGerbersLoaded(), LAYERS_MAP_DIALOG::findNumKiCadGerbersLoaded(), LAYERS_MAP_DIALOG::findNumX2GerbersLoaded(), GERBVIEW_FRAME::GetGbrImage(), LAYERS_MAP_DIALOG::initDialog(), GERBVIEW_PRINTOUT::OnPrintPage(), LAYERS_MAP_DIALOG::OnSelectLayer(), GERBVIEW_FRAME::Read_EXCELLON_File(), GERBVIEW_CONTROL::ReloadAllLayers(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), DIALOG_PRINT_GERBVIEW::TransferDataToWindow(), GERBVIEW_FRAME::updateAperAttributesSelectBox(), GERBVIEW_FRAME::updateComponentListSelectBox(), GERBVIEW_FRAME::updateNetnameListSelectBox(), GERBER_LAYER_WIDGET::useAlternateBitmap(), and GBR_LAYOUT::Visit().
|
static |
Definition at line 59 of file gerber_file_image_list.cpp.
References s_GERBER_List.
Referenced by GBR_LAYOUT::GetImagesList(), GERBER_LAYER_WIDGET::GetImagesList(), GBR_LAYER_BOX_SELECTOR::getLayerName(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), GERBER_DRAW_ITEM::GetSelectMenuText(), GERBVIEW_PRINTOUT::OnPrintPage(), and GBR_LAYER_BOX_SELECTOR::Resync().
|
inline |
Definition at line 76 of file gerber_file_image_list.h.
References m_GERBER_List.
Referenced by GBR_LAYOUT::ComputeBoundingBox(), GBR_TO_PCB_EXPORTER::ExportPcb(), GERBVIEW_CONTROL::ExportToPcbnew(), GERBVIEW_FRAME::ImagesMaxCount(), GERBVIEW_CONTROL::ReloadAllLayers(), GBR_LAYER_BOX_SELECTOR::Resync(), DIALOG_PRINT_GERBVIEW::TransferDataToWindow(), GERBVIEW_FRAME::updateAperAttributesSelectBox(), GERBVIEW_FRAME::updateComponentListSelectBox(), GERBVIEW_FRAME::updateNetnameListSelectBox(), and GBR_LAYOUT::Visit().
std::unordered_map< int, int > GERBER_FILE_IMAGE_LIST::SortImagesByZOrder | ( | ) |
Sort loaded images by Z order priority, if they have the X2 FileFormat info (SortImagesByZOrder updates the graphic layer of these items)
Definition at line 225 of file gerber_file_image_list.cpp.
References m_GERBER_List, GERBER_FILE_IMAGE::m_GraphicLayer, and sortZorder().
Referenced by GERBVIEW_FRAME::SortLayersByX2Attributes().
|
private |
Definition at line 66 of file gerber_file_image_list.h.
Referenced by AddGbrImage(), DeleteAllImages(), DeleteImage(), GERBER_FILE_IMAGE_LIST(), GetDisplayName(), GetGbrImage(), ImagesMaxCount(), and SortImagesByZOrder().