26#include <wx/radiobut.h>
27#include <wx/statbox.h>
102 SetTitle(
_(
"Legacy Teardrop Properties" ) );
104 if( aConvertSettings )
106 wxStaticBox* bConvertBox =
new wxStaticBox(
this, wxID_ANY,
_(
"Conversion Settings" ) );
107 wxStaticBoxSizer* bConvertSizer =
new wxStaticBoxSizer( bConvertBox, wxVERTICAL );
109 m_rbCenterline =
new wxRadioButton(
this, wxID_ANY,
_(
"Use centerlines" ) );
112 bConvertSizer->AddSpacer( 2 );
113 m_rbEnvelope =
new wxRadioButton(
this, wxID_ANY,
_(
"Create bounding hull" ) );
114 bConvertSizer->Add(
m_rbEnvelope, 0, wxLEFT|wxRIGHT, 5 );
116 m_gapLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Gap:" ) );
117 m_gapCtrl =
new wxTextCtrl(
this, wxID_ANY );
118 m_gapUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm" ) );
122 wxBoxSizer* hullParamsSizer =
new wxBoxSizer( wxHORIZONTAL );
123 hullParamsSizer->Add(
m_gapLabel, 0, wxALIGN_CENTRE_VERTICAL|wxRIGHT, 5 );
124 hullParamsSizer->Add(
m_gapCtrl, 1, wxALIGN_CENTRE_VERTICAL|wxLEFT|wxRIGHT, 5 );
125 hullParamsSizer->Add(
m_gapUnits, 0, wxALIGN_CENTRE_VERTICAL|wxLEFT, 5 );
126 bConvertSizer->AddSpacer( 2 );
127 bConvertSizer->Add( hullParamsSizer, 0, wxLEFT, 26 );
129 bConvertSizer->AddSpacer( 6 );
130 m_cbDeleteOriginals =
new wxCheckBox(
this, wxID_ANY,
_(
"Delete source objects after conversion" ) );
133 GetSizer()->Insert( 0, bConvertSizer, 0, wxALL|wxEXPAND, 10 );
134 SetTitle(
_(
"Convert to Copper Zone" ) );
189 for(
int ii = 0; ii <
m_layers->GetItemCount(); ++ii )
191 if(
m_layers->GetToggleValue( (
unsigned) ii, 0 ) )
222 if( event.GetColumn() != 0 )
225 int row =
m_layers->ItemToRow( event.GetItem() );
227 bool checked =
m_layers->GetToggleValue( row, 0 );
230 m_layers->GetValue( layerID, row, 2 );
int GetCopperLayerCount() const
DIALOG_COPPER_ZONE_BASE(wxWindow *parent, wxWindowID id=ID_DIALOG_COPPER_ZONE_BASE, const wxString &title=_("Copper Zone Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxBoxSizer * m_sizerRight
wxDataViewListCtrl * m_layers
bool TransferDataFromWindow() override
ZONE_SETTINGS_BAG m_zoneSettingsBag
DIALOG_COPPER_ZONE(PCB_BASE_FRAME *aParent, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
wxRadioButton * m_rbCenterline
bool TransferDataToWindow() override
void OnLayerSelection(wxDataViewEvent &event) override
CONVERT_SETTINGS * m_convertSettings
wxCheckBox * m_cbDeleteOriginals
PCB_BASE_FRAME * m_Parent
PANEL_ZONE_PROPERTIES * m_panelZoneProperties
void OnUpdateUI(wxUpdateUIEvent &) override
~DIALOG_COPPER_ZONE() override
wxStaticText * m_gapLabel
wxStaticText * m_gapUnits
wxRadioButton * m_rbEnvelope
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 AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
ZONE_SETTINGS handles zones parameters.
TEARDROP_TYPE m_TeardropType
void SetupLayersList(wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, LSET aLayers)
A helper routine for the various zone dialogs (copper, non-copper, keepout).
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 InvokeCopperZonesEditor(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aSettings, CONVERT_SETTINGS *aConvertSettings)
Function InvokeCopperZonesEditor invokes up a modal dialog window for copper zone editing.
PCB_LAYER_ID ToLAYER_ID(int aLayer)