29#include <wx/radiobut.h>
47 m_ZoneContainer( aZoneContainer ),
48 m_PCB_Frame( aPCB_FRAME ),
50 m_outlineHatchPitch( aPCB_FRAME, m_stBorderHatchPitchText, m_outlineHatchPitchCtrl,
51 m_outlineHatchUnits ),
52 m_cornerRadius( aPCB_FRAME, m_cornerRadiusLabel, m_cornerRadiusCtrl, m_cornerRadiusUnits ),
53 m_clearance( aPCB_FRAME, m_clearanceLabel, m_clearanceCtrl, m_clearanceUnits ),
54 m_minThickness( aPCB_FRAME, m_minWidthLabel, m_minWidthCtrl, m_minWidthUnits ),
55 m_antipadClearance( aPCB_FRAME, m_antipadLabel, m_antipadCtrl, m_antipadUnits ),
56 m_spokeWidth( aPCB_FRAME, m_spokeWidthLabel, m_spokeWidthCtrl, m_spokeWidthUnits ),
57 m_gridStyleRotation( aPCB_FRAME, m_staticTextGrindOrient, m_tcGridStyleOrientation,
58 m_staticTextRotUnits ),
59 m_gridStyleThickness( aPCB_FRAME, m_staticTextStyleThickness, m_tcGridStyleThickness,
60 m_GridStyleThicknessUnits ),
61 m_gridStyleGap( aPCB_FRAME, m_staticTextGridGap, m_tcGridStyleGap, m_GridStyleGapUnits ),
62 m_islandThreshold( aPCB_FRAME, m_islandThresholdLabel, m_tcIslandThreshold,
63 m_islandThresholdUnits ),
67 [&]( wxCommandEvent& )
109 switch(
m_settings->m_ZoneBorderDisplayStyle )
114 case ZONE_BORDER_DISPLAY_STYLE::INVISIBLE_BORDER:
break;
125 case ZONE_CONNECTION::THERMAL:
m_PadInZoneOpt->SetSelection( 1 );
break;
126 case ZONE_CONNECTION::THT_THERMAL:
m_PadInZoneOpt->SetSelection( 2 );
break;
127 case ZONE_CONNECTION::NONE:
m_PadInZoneOpt->SetSelection( 3 );
break;
128 case ZONE_CONNECTION::FULL:
m_PadInZoneOpt->SetSelection( 0 );
break;
169 wxCommandEvent aEvent;
200 wxCommandEvent* evt =
new wxCommandEvent( EVT_ZONE_NAME_UPDATE );
202 wxQueueEvent( m_parent, evt );
212 m_settings->m_FillMode = ZONE_FILL_MODE::HATCH_PATTERN;
214 m_settings->m_FillMode = ZONE_FILL_MODE::POLYGONS;
245 if(
m_settings->m_FillMode == ZONE_FILL_MODE::HATCH_PATTERN )
258 case 3:
m_settings->SetPadConnection( ZONE_CONNECTION::NONE );
break;
259 case 2:
m_settings->SetPadConnection( ZONE_CONNECTION::THT_THERMAL );
break;
260 case 1:
m_settings->SetPadConnection( ZONE_CONNECTION::THERMAL );
break;
261 case 0:
m_settings->SetPadConnection( ZONE_CONNECTION::FULL );
break;
266 case 0:
m_settings->m_ZoneBorderDisplayStyle = ZONE_BORDER_DISPLAY_STYLE::NO_HATCH;
break;
267 case 1:
m_settings->m_ZoneBorderDisplayStyle = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_EDGE;
break;
268 case 2:
m_settings->m_ZoneBorderDisplayStyle = ZONE_BORDER_DISPLAY_STYLE::DIAGONAL_FULL;
break;
294 DisplayError(
this,
_(
"Thermal spoke width cannot be smaller than the minimum width." ) );
302 if( aUseExportableSetupOnly )
constexpr EDA_IU_SCALE pcbIUScale
Class PANEL_ZONE_PROPERTIES_BASE.
wxTextCtrl * m_tcGridStyleGap
wxTextCtrl * m_cornerRadiusCtrl
wxChoice * m_cornerSmoothingChoice
wxSpinCtrl * m_spinCtrlSmoothLevel
wxChoice * m_GridStyleCtrl
wxStaticText * m_cornerRadiusLabel
wxChoice * m_cbRemoveIslands
wxTextCtrl * m_tcGridStyleThickness
wxSpinCtrlDouble * m_spinCtrlSmoothValue
wxChoice * m_PadInZoneOpt
wxTextCtrl * m_tcZoneName
wxTextCtrl * m_tcGridStyleOrientation
wxChoice * m_OutlineDisplayCtrl
UNIT_BINDER m_gridStyleGap
PANEL_ZONE_PROPERTIES(wxWindow *aParent, PCB_BASE_FRAME *aPcb, ZONES_CONTAINER &aZoneContainer)
bool TransferZoneSettingsToWindow()
ZONES_CONTAINER & m_ZoneContainer
void ActivateSelectedZone(ZONE *new_zone) override
UNIT_BINDER m_antipadClearance
bool TransferZoneSettingsFromWindow()
void OnUserConfirmChange() override
UNIT_BINDER m_outlineHatchPitch
void OnZoneNameChanged(wxCommandEvent &event) override
void OnStyleSelection(wxCommandEvent &event) override
UNIT_BINDER m_cornerRadius
bool AcceptOptions(bool aUseExportableSetupOnly=false)
UNIT_BINDER m_gridStyleThickness
void OnUpdateUI(wxUpdateUIEvent &) override
UNIT_BINDER m_islandThreshold
void OnRemoveIslandsSelection(wxCommandEvent &event) override
UNIT_BINDER m_gridStyleRotation
int m_cornerSmoothingType
std::shared_ptr< ZONE_SETTINGS > m_settings
UNIT_BINDER m_minThickness
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual long long int GetValue()
Return the current value in Internal Units.
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
virtual void SetUnits(EDA_UNITS aUnits)
Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DE...
virtual EDA_ANGLE GetAngleValue()
void SetDataType(EDA_DATA_TYPE aDataType)
Used to override the datatype of the displayed property (default is DISTANCE)
virtual void SetAngleValue(const EDA_ANGLE &aValue)
virtual void SetDoubleValue(double aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
Validate the control against the given range, informing the user of any errors found.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
std::shared_ptr< ZONE_SETTINGS > GetZoneSettings(ZONE *zone)
ZONE_SETTINGS handles zones parameters.
Handle a list of polygons defining a copper zone.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
This file is part of the common library.
wxDEFINE_EVENT(EVT_ZONE_NAME_UPDATE, wxCommandEvent)
constexpr int mmToIU(double mm) const
T NormalizeAngle180(T Angle)
Normalize angle to be in the -180.0 .
ISLAND_REMOVAL_MODE
Whether or not to remove isolated islands from a zone.
#define ZONE_CLEARANCE_MAX_VALUE_MM
#define ZONE_BORDER_HATCH_MINDIST_MM
#define ZONE_THICKNESS_MIN_VALUE_MM
#define ZONE_BORDER_HATCH_MAXDIST_MM