KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_fp_edit_pad_table.cpp File Reference
#include "dialog_fp_edit_pad_table.h"
#include <wx/display.h>
#include <wx/dcclient.h>
#include <wx/filedlg.h>
#include <wx/msgdlg.h>
#include <wx/settings.h>
#include <column_formatter.h>
#include <pcb_shape.h>
#include <widgets/wx_grid.h>
#include <widgets/grid_text_helpers.h>
#include <widgets/grid_combobox.h>
#include <widgets/std_bitmap_button.h>
#include <base_units.h>
#include <bitmaps.h>
#include <units_provider.h>
#include <gal/graphics_abstraction_layer.h>
#include <board.h>
#include <footprint.h>
#include <footprint_edit_frame.h>
#include <grid_tricks.h>
#include <kiplatform/ui.h>
#include <pin_numbers.h>
#include <board_commit.h>
#include <reporter.h>
#include <table_io.h>
#include <wildcards_and_files_ext.h>

Go to the source code of this file.

Classes

class  PAD_INFO_FORMATTER
 Class that handles conversion of various pad data fields into strings for display in the UI or serialisation to formats like CSV. More...
 

Typedefs

using COLS = DIALOG_FP_EDIT_PAD_TABLE::COLS
 

Functions

static PAD_SHAPE ShapeFromString (const wxString &shape)
 
static wxString ShapeToString (PAD_SHAPE shape)
 
static wxString GetPadTypeString (const PAD &aPad)
 
static void SetPadTypeFromString (PAD &aPad, const wxString &aType)
 
static bool DrillsAreEditable (const PAD &aPad)
 
static void UpdateDrillCells (WX_GRID &aGrid, UNITS_PROVIDER &aUnitsProvider, int aRowId, const PAD &aPad, bool aPreserveValues)
 Update the drill size cells in the pad table for a given pad.
 
static wxString GetPadTableColLabel (COLS aCol)
 Get the label for a given column in the pin table.
 
static COLS GetColTypeForString (const wxString &aStr)
 

Typedef Documentation

◆ COLS

Function Documentation

◆ DrillsAreEditable()

static bool DrillsAreEditable ( const PAD & aPad)
static

◆ GetColTypeForString()

static COLS GetColTypeForString ( const wxString & aStr)
static

◆ GetPadTableColLabel()

static wxString GetPadTableColLabel ( COLS aCol)
static

Get the label for a given column in the pin table.

This string is NOT translated.

Definition at line 206 of file dialog_fp_edit_pad_table.cpp.

Referenced by GetColTypeForString(), and DIALOG_FP_EDIT_PAD_TABLE::OnExportButtonClick().

◆ GetPadTypeString()

static wxString GetPadTypeString ( const PAD & aPad)
static

◆ SetPadTypeFromString()

◆ ShapeFromString()

static PAD_SHAPE ShapeFromString ( const wxString & shape)
static

◆ ShapeToString()

static wxString ShapeToString ( PAD_SHAPE shape)
static

Definition at line 66 of file dialog_fp_edit_pad_table.cpp.

References _, CHAMFERED_RECT, CIRCLE, CUSTOM, OVAL, RECTANGLE, ROUNDRECT, and TRAPEZOID.

Referenced by PAD_INFO_FORMATTER::Format().

◆ UpdateDrillCells()

static void UpdateDrillCells ( WX_GRID & aGrid,
UNITS_PROVIDER & aUnitsProvider,
int aRowId,
const PAD & aPad,
bool aPreserveValues )
static

Update the drill size cells in the pad table for a given pad.

Parameters
aPreserveValuesif true, do not overwrite the cell values, just update their read-only state and text color.

Definition at line 178 of file dialog_fp_edit_pad_table.cpp.

References DrillsAreEditable(), PAD::GetDrillSize(), UNITS_PROVIDER::StringFromValue(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by DIALOG_FP_EDIT_PAD_TABLE::fillGridRow(), and DIALOG_FP_EDIT_PAD_TABLE::OnCellChanged().