32#include <wx/statbox.h>
33#include <wx/statline.h>
34#include <wx/radiobut.h>
89#define MIN_THICKNESS 10*pcbIUScale.IU_PER_MILS
113 if( aConvertSettings )
115 wxStaticBox* bConvertBox =
new wxStaticBox(
this, wxID_ANY,
_(
"Conversion Settings" ) );
116 wxStaticBoxSizer* bConvertSizer =
new wxStaticBoxSizer( bConvertBox, wxVERTICAL );
118 m_rbCenterline =
new wxRadioButton(
this, wxID_ANY,
_(
"Use centerlines" ) );
121 bConvertSizer->AddSpacer( 2 );
122 m_rbEnvelope =
new wxRadioButton(
this, wxID_ANY,
_(
"Create bounding hull" ) );
123 bConvertSizer->Add(
m_rbEnvelope, 0, wxLEFT|wxRIGHT, 5 );
125 m_gapLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Gap:" ) );
126 m_gapCtrl =
new wxTextCtrl(
this, wxID_ANY );
127 m_gapUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm" ) );
131 wxBoxSizer* hullParamsSizer =
new wxBoxSizer( wxHORIZONTAL );
132 hullParamsSizer->Add(
m_gapLabel, 0, wxALIGN_CENTRE_VERTICAL|wxRIGHT, 5 );
133 hullParamsSizer->Add(
m_gapCtrl, 1, wxALIGN_CENTRE_VERTICAL|wxLEFT|wxRIGHT, 5 );
134 hullParamsSizer->Add(
m_gapUnits, 0, wxALIGN_CENTRE_VERTICAL|wxLEFT, 5 );
135 bConvertSizer->AddSpacer( 2 );
136 bConvertSizer->Add( hullParamsSizer, 0, wxLEFT, 26 );
138 bConvertSizer->AddSpacer( 6 );
140 _(
"Delete source objects after conversion" ) );
143 GetSizer()->Insert( 0, bConvertSizer, 0, wxALL|wxEXPAND, 10 );
145 wxStaticLine* line =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
147 GetSizer()->Insert( 1, line, 0, wxLEFT|wxRIGHT|wxEXPAND, 10 );
149 SetTitle(
_(
"Convert to Non Copper Zone" ) );
253 wxCommandEvent event;
275 if( event.GetColumn() != 0 )
278 int row =
m_layers->ItemToRow( event.GetItem() );
279 bool val =
m_layers->GetToggleValue( row, 0 );
282 m_layers->GetValue( layerID, row, 2 );
333 if( !
m_hatchGap.Validate( minThickness, INT_MAX ) )
348 for(
int ii = 0; ii <
m_layers->GetItemCount(); ++ii )
350 if(
m_layers->GetToggleValue( (
unsigned) ii, 0 ) )
constexpr EDA_IU_SCALE pcbIUScale
wxStaticText * m_smoothValueLabel
wxTextCtrl * m_hatchGapCtrl
wxStaticText * m_cornerRadiusUnits
wxStaticText * m_MinWidthUnits
wxStaticText * m_hatchWidthUnits
wxStaticText * m_MinWidthLabel
wxStaticText * m_cornerRadiusLabel
wxStaticText * m_smoothLevelLabel
wxTextCtrl * m_hatchWidthCtrl
wxTextCtrl * m_MinWidthCtrl
wxStaticText * m_staticTextLayerSelection
wxSpinCtrl * m_spinCtrlSmoothLevel
wxSpinCtrlDouble * m_spinCtrlSmoothValue
wxStaticText * m_hatchGapUnits
wxChoice * m_cornerSmoothingChoice
wxTextCtrl * m_cornerRadiusCtrl
wxChoice * m_OutlineDisplayCtrl
wxDataViewListCtrl * m_layers
wxChoice * m_GridStyleCtrl
wxTextCtrl * m_hatchOrientCtrl
wxStaticText * m_hatchOrientLabel
wxStaticText * m_hatchGapLabel
wxStaticText * m_outlineHatchUnits
wxStaticText * m_stBorderHatchPitchText
wxStaticText * m_hatchOrientUnits
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Non Copper Zone Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN)
wxStaticText * m_hatchWidthLabel
wxTextCtrl * m_outlineHatchPitchCtrl
wxRadioButton * m_rbEnvelope
UNIT_BINDER m_cornerRadius
bool TransferDataFromWindow() override
void OnUpdateUI(wxUpdateUIEvent &) override
UNIT_BINDER m_hatchRotation
wxRadioButton * m_rbCenterline
bool TransferDataToWindow() override
DIALOG_NON_COPPER_ZONES_EDITOR(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
wxStaticText * m_gapUnits
int m_cornerSmoothingType
void OnStyleSelection(wxCommandEvent &event) override
~DIALOG_NON_COPPER_ZONES_EDITOR()
CONVERT_SETTINGS * m_convertSettings
wxCheckBox * m_cbDeleteOriginals
wxStaticText * m_gapLabel
PCB_BASE_FRAME * m_parent
UNIT_BINDER m_outlineHatchPitch
void OnLayerSelection(wxDataViewEvent &event) override
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
ZONE_SETTINGS handles zones parameters.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
int InvokeNonCopperZonesEditor(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeNonCopperZonesEditor invokes up a modal dialog window for non-copper zone editing.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
KICOMMON_API wxFont GetStatusFont(wxWindow *aWindow)
Class ZONE_SETTINGS used to handle zones parameters in dialogs.
#define ZONE_BORDER_HATCH_MINDIST_MM
#define ZONE_BORDER_HATCH_MAXDIST_MM