41 m_unitsProvider( aProvider ), m_grid( aGrid ),
42 m_gridSizeX( aProvider, aEventSource, m_staticTextX, m_textX, m_staticTextXUnits, true ),
43 m_gridSizeY( aProvider, aEventSource, m_staticTextY, m_textY, m_staticTextYUnits, true )
82 wxMessageBox(
_(
"Grid size X out of range." ),
_(
"Error" ), wxOK | wxICON_ERROR );
89 wxMessageBox(
_(
"Grid size Y out of range." ),
_(
"Error" ), wxOK | wxICON_ERROR );
98 EDA_UNITS::MILLIMETRES, gridX );
100 EDA_UNITS::MILLIMETRES, gridY );
Class DIALOG_GRID_SETTINGS_BASE.
wxCheckBox * m_checkLinked
UNITS_PROVIDER * m_unitsProvider
void OnLinkedChecked(wxCommandEvent &event) override
DIALOG_GRID_SETTINGS(wxWindow *aParent, wxWindow *aEventSource, UNITS_PROVIDER *aProvider, GRID &aGrid)
bool TransferDataFromWindow() override
bool TransferDataToWindow() 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...
const EDA_IU_SCALE & GetIuScale() const
virtual double GetDoubleValue()
Return the current value in Internal Units.
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.
KICOMMON_API wxString StringFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Returns the string from aValue according to aUnits (inch, mm ...) for display.
Common grid settings, available to every frame.
VECTOR2D ToDouble(EDA_IU_SCALE aScale) const