KiCad PCB EDA Suite
|
#include <panel_pcbnew_color_settings.h>
Public Member Functions | |
PANEL_PCBNEW_COLOR_SETTINGS (wxWindow *aParent, BOARD *aBoard) | |
~PANEL_PCBNEW_COLOR_SETTINGS () override | |
void | ResetPanel () override |
Reset the contents of this panel. | |
virtual wxString | GetResetTooltip () const override |
Get the tooltip the reset button should display when showing this panel. | |
bool | Show (bool show) override |
wxString | GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. | |
EDA_UNITS | GetUserUnits () const |
void | SetUserUnits (EDA_UNITS aUnits) |
virtual void | GetUnitPair (EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits) |
const EDA_IU_SCALE & | GetIuScale () const |
virtual ORIGIN_TRANSFORMS & | GetOriginTransforms () |
wxString | StringFromValue (double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts aValue in internal units into a united string. | |
wxString | StringFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=false) const |
wxString | StringFromOptionalValue (std::optional< int > aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts an optional aValue in internal units into a united string. | |
wxString | MessageTextFromValue (double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
A lower-precision version of StringFromValue(). | |
wxString | MessageTextFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=true) const |
wxString | MessageTextFromMinOptMax (const MINOPTMAX< int > &aValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
int | ValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts aTextValue in aUnits to internal units used by the frame. | |
std::optional< int > | OptionalValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const |
Converts aTextValue in aUnits to internal units used by the frame. | |
EDA_ANGLE | AngleValueFromString (const wxString &aTextValue) const |
EDA_UNITS | GetUnitsFromType (EDA_DATA_TYPE aType) const |
Gets the units to use in the conversion based on the underlying user units. | |
Static Public Member Functions | |
static EDA_DATA_TYPE | GetTypeFromUnits (const EDA_UNITS aUnits) |
Gets the inferred type from the given units. | |
Public Attributes | |
wxCheckBox * | m_optOverrideColors |
Static Public Attributes | |
static const wxString | NullUiString = "" |
The string that is used in the UI to represent a null value. | |
Protected Types | |
enum | COLOR_CONTEXT_ID { ID_COPY = wxID_HIGHEST + 1 , ID_PASTE , ID_REVERT } |
Protected Member Functions | |
bool | TransferDataFromWindow () override |
bool | TransferDataToWindow () override |
void | OnSize (wxSizeEvent &aEvent) override |
void | onNewThemeSelected () override |
Event fired when a new theme is selected that can be overridden in children. | |
void | onColorChanged () override |
Event fired when the user changes any color. | |
void | createSwatches () override |
void | OnBtnOpenThemeFolderClicked (wxCommandEvent &event) override |
void | OnLeftDownTheme (wxMouseEvent &event) override |
void | OnThemeChanged (wxCommandEvent &aEvent) override |
void | ShowColorContextMenu (wxMouseEvent &aEvent, int aLayer) |
void | OnColorChanged (wxCommandEvent &aEvent) |
void | updateSwatches () |
void | createThemeList (const wxString &aCurrent) |
Builds the theme listbox and sets the selection to the current theme. | |
void | createSwatch (int aLayer, const wxString &aName) |
void | updateColor (int aLayer, const KIGFX::COLOR4D &aColor) |
virtual bool | saveCurrentTheme (bool aValidate) |
virtual bool | validateSave (bool aQuiet=false) |
Performs a pre-save validation of the current color theme. | |
wxString | GetSettingsDropdownName (COLOR_SETTINGS *aSettings) |
Retrieves the drop down name to be displayed for a color setting. | |
virtual void | OnOverrideItemColorsClicked (wxCommandEvent &event) |
Protected Attributes | |
COLOR_SETTINGS * | m_currentSettings |
std::map< int, wxStaticText * > | m_labels |
std::map< int, COLOR_SWATCH * > | m_swatches |
KIGFX::COLOR4D | m_copied |
std::vector< int > | m_validLayers |
A list of layer IDs that are valid for the current color settings dialog. | |
int | m_backgroundLayer |
std::string | m_colorNamespace |
A namespace that will be passed to SETTINGS_MANAGER::SaveColorSettings. | |
wxBoxSizer * | m_mainSizer |
wxStaticText * | m_staticText9 |
wxChoice * | m_cbTheme |
wxButton * | m_btnOpenFolder |
WX_PANEL * | m_panel1 |
wxBoxSizer * | m_colorsMainSizer |
wxScrolledWindow * | m_colorsListWindow |
wxFlexGridSizer * | m_colorsGridSizer |
wxBoxSizer * | m_previewPanelSizer |
Private Member Functions | |
void | createPreviewItems () |
void | updatePreview () |
void | zoomFitPreview () |
Private Attributes | |
FOOTPRINT_PREVIEW_PANEL * | m_preview |
PAGE_INFO * | m_page |
TITLE_BLOCK * | m_titleBlock |
BOARD * | m_board |
const EDA_IU_SCALE & | m_iuScale |
EDA_UNITS | m_userUnits |
Definition at line 32 of file panel_pcbnew_color_settings.h.
|
protected |
Enumerator | |
---|---|
ID_COPY | |
ID_PASTE | |
ID_REVERT |
Definition at line 52 of file panel_pcbnew_color_settings.h.
PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS | ( | wxWindow * | aParent, |
BOARD * | aBoard ) |
Definition at line 681 of file panel_pcbnew_color_settings.cpp.
References PANEL_COLOR_SETTINGS::createThemeList(), DEFAULT_THEME, g_excludedLayers, GAL_LAYER_ID_BITMASK_END, GAL_LAYER_ID_START, GetAppSettings(), GetColorSettings(), JSON_SETTINGS::GetFilename(), LAYER_BOARD_OUTLINE_AREA, LAYER_CONFLICTS_SHADOW, LAYER_DRC_EXCLUSION, LAYER_DRC_WARNING, LAYER_LOCKED_ITEM_SHADOW, LAYER_PAD_NETNAMES, LAYER_PAGE_LIMITS, LAYER_PCB_BACKGROUND, PANEL_COLOR_SETTINGS::m_backgroundLayer, m_board, PANEL_COLOR_SETTINGS::m_colorNamespace, APP_SETTINGS_BASE::m_ColorTheme, PANEL_COLOR_SETTINGS::m_currentSettings, PANEL_COLOR_SETTINGS_BASE::m_optOverrideColors, m_page, m_preview, m_titleBlock, PANEL_COLOR_SETTINGS::m_validLayers, MM, NETNAMES_LAYER_ID_START, PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), pcbIUScale, and UNITS_PROVIDER::UNITS_PROVIDER().
|
override |
Definition at line 729 of file panel_pcbnew_color_settings.cpp.
References PANEL_COLOR_SETTINGS::m_currentSettings, m_page, and m_titleBlock.
|
inlineinherited |
Definition at line 188 of file units_provider.h.
References DEGREES, DEGREES_T, EDA_UNIT_UTILS::UI::DoubleValueFromString(), and GetIuScale().
|
private |
Definition at line 798 of file panel_pcbnew_color_settings.cpp.
References _, PCB_IO_KICAD_SEXPR::DoLoad(), g_previewBoard, LAYER_DRAWINGSHEET, LAYER_PAGE_LIMITS, m_page, m_preview, m_titleBlock, NORMAL, pcbIUScale, DS_PROXY_VIEW_ITEM::SetColorLayer(), DS_PROXY_VIEW_ITEM::SetIsFirstPage(), DS_PROXY_VIEW_ITEM::SetPageBorderColorLayer(), User, and zoomFitPreview().
Referenced by createSwatches().
|
protectedinherited |
Definition at line 244 of file panel_color_settings.cpp.
References color, FIRST_BUTTON_ID, COLOR_SETTINGS::GetDefaultColor(), m_backgroundLayer, PANEL_COLOR_SETTINGS_BASE::m_cbTheme, PANEL_COLOR_SETTINGS_BASE::m_colorsGridSizer, PANEL_COLOR_SETTINGS_BASE::m_colorsListWindow, m_currentSettings, m_labels, m_swatches, OnColorChanged(), onNewThemeSelected(), ShowColorContextMenu(), and SWATCH_MEDIUM.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), PANEL_GERBVIEW_COLOR_SETTINGS::createSwatches(), and PANEL_PCBNEW_COLOR_SETTINGS::createSwatches().
|
overrideprotectedvirtual |
Implements PANEL_COLOR_SETTINGS.
Definition at line 753 of file panel_pcbnew_color_settings.cpp.
References LSET::AllNonCuMask(), B_Cu, createPreviewItems(), PANEL_COLOR_SETTINGS::createSwatch(), F_Cu, LayerName(), m_board, PANEL_COLOR_SETTINGS_BASE::m_panel1, m_preview, PANEL_COLOR_SETTINGS_BASE::m_previewPanelSizer, PANEL_COLOR_SETTINGS::m_validLayers, MAX_CU_LAYERS, name, FOOTPRINT_PREVIEW_PANEL::New(), PCB_LAYER_ID_COUNT, PCBNEW_LAYER_ID_START, updatePreview(), and zoomFitPreview().
|
protectedinherited |
Builds the theme listbox and sets the selection to the current theme.
aCurrent | is the filename of the current color theme (no extension) |
Definition at line 214 of file panel_color_settings.cpp.
References _, GetSettingsDropdownName(), GetSettingsManager(), PANEL_COLOR_SETTINGS_BASE::m_cbTheme, name, and Pgm().
Referenced by OnLeftDownTheme(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), and PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS().
|
inlineoverrideinherited |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.
Definition at line 72 of file resettable_panel.h.
References GetResetTooltip().
|
inlineinherited |
Definition at line 55 of file units_provider.h.
References m_iuScale.
Referenced by AngleValueFromString(), GRID_MENU::BuildChoiceList(), RC_ITEM::GetJsonViolation(), DRC_ENGINE::loadImplicitRules(), MessageTextFromMinOptMax(), MessageTextFromValue(), UNIT_BINDER::onUnitsChanged(), OptionalValueFromString(), StringFromOptionalValue(), StringFromValue(), GRID::UserUnitsMessageText(), and ValueFromString().
|
inlinevirtualinherited |
Reimplemented in EDA_BASE_FRAME, and PCB_BASE_FRAME.
Definition at line 58 of file units_provider.h.
|
inlineoverridevirtualinherited |
Get the tooltip the reset button should display when showing this panel.
Reimplemented from RESETTABLE_PANEL.
Definition at line 48 of file panel_color_settings.h.
References _.
|
protectedinherited |
Retrieves the drop down name to be displayed for a color setting.
Definition at line 392 of file panel_color_settings.cpp.
References _, COLOR_SETTINGS::GetName(), JSON_SETTINGS::IsReadOnly(), and name.
Referenced by createThemeList(), and OnThemeChanged().
|
inlinestaticinherited |
Gets the inferred type from the given units.
Note: will always return the most simple type (e.g. a DISTANCE rather than AREA or VOLUME for a measurement unit).
Definition at line 221 of file units_provider.h.
References CM, DEGREES, DISTANCE, FS, INCH, LENGTH_DELAY, MILS, MM, PERCENT, PS, PS_PER_CM, PS_PER_INCH, PS_PER_MM, TIME, UM, UNITLESS, and UNSCALED.
Referenced by DRC_RULES_PARSER::parseConstraint(), and WX_GRID::SetAutoEvalColUnits().
|
inlinevirtualinherited |
Reimplemented in EDA_DRAW_FRAME.
Definition at line 48 of file units_provider.h.
References GetUserUnits(), EDA_UNIT_UTILS::IsImperialUnit(), MILS, and MM.
|
inlineinherited |
Gets the units to use in the conversion based on the underlying user units.
Definition at line 199 of file units_provider.h.
References GetUserUnits(), EDA_UNIT_UTILS::IsMetricUnit(), LENGTH_DELAY, PS, PS_PER_CM, PS_PER_INCH, and TIME.
Referenced by MessageTextFromMinOptMax(), MessageTextFromValue(), OptionalValueFromString(), StringFromOptionalValue(), StringFromValue(), and ValueFromString().
|
inlineinherited |
Definition at line 45 of file units_provider.h.
References m_userUnits.
Referenced by PCB::IFACE::CreateKiWindow(), DIALOG_SHIM::DIALOG_SHIM(), PL_EDITOR_FRAME::DisplayGridMsg(), EDA_DRAW_FRAME::DisplayUnitsMsg(), EVT_GRID_CMD_CELL_CHANGED(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), WX_GRID::getColumnUnits(), RC_ITEM::GetJsonViolation(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), EDA_DRAW_FRAME::GetUnitPair(), GetUnitPair(), GetUnitsFromType(), IfaceOrAddress(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), PANEL_PREVIEW_3D_MODEL::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), POSITION_RELATIVE_TOOL::PositionRelative(), SaveFileAs(), EDA_DRAW_FRAME::SaveSettings(), PCB_BASE_FRAME::SetBoard(), WX_GRID::SetUnitsProvider(), EDA_DRAW_FRAME::ToggleUserUnits(), PCB_BASE_FRAME::unitsChangeRefresh(), EDITOR_CONDITIONS::unitsFunc(), GERBVIEW_FRAME::updateDCodeSelectBox(), PL_EDITOR_FRAME::UpdateStatusBar(), and GRID::UserUnitsMessageText().
|
inlineinherited |
Definition at line 141 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::MessageTextFromMinOptMax().
Referenced by PCB_TRACK::GetMsgPanelInfo(), and PCB_TUNING_PATTERN::GetMsgPanelInfo().
|
inlineinherited |
Definition at line 134 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), DEGREES, DISTANCE, EDA_UNIT_UTILS::UI::MessageTextFromValue(), and unityScale.
|
inlineinherited |
A lower-precision version of StringFromValue().
Should ONLY be used for status text and messages. Not suitable for dialogs, files, etc. where the loss of precision matters.
Definition at line 127 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::MessageTextFromValue().
Referenced by CheckDuplicatePins(), CheckLibSymbol(), CheckLibSymbolGraphics(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkews(), GERBVIEW_FRAME::DisplayGridMsg(), GERBER_FILE_IMAGE::DisplayImageInfo(), DRC_ENGINE::EvalRules(), FormatBoardStatisticsJson(), FormatBoardStatisticsReport(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), DS_DRAW_ITEM_LINE::GetItemDescription(), DS_DRAW_ITEM_RECT::GetItemDescription(), PCB_TRACK::GetItemDescription(), SCH_LINE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PAD::GetMsgPanelInfo(), PCB_BARCODE::GetMsgPanelInfo(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_POINT::GetMsgPanelInfo(), PCB_REFERENCE_IMAGE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TARGET::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), PCB_VIA::GetMsgPanelInfo(), SCH_BITMAP::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_JUNCTION::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_PIN::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), STROKE_PARAMS::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), GetNetNavigatorItemText(), PCB_BASE_FRAME::MessageTextFromCoord(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), EDA_SHAPE::ShapeGetMsgPanelInfo(), showCoord(), DRC_TEST_PROVIDER_MISC::testOutline(), VIA_SIZE_MENU::update(), PL_EDITOR_FRAME::UpdateMsgPanelInfo(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_BASE_FRAME::UpdateStatusBar(), and SCH_BASE_FRAME::UpdateStatusBar().
|
overrideprotectedvirtualinherited |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 65 of file panel_color_settings.cpp.
References SETTINGS_MANAGER::GetColorSettingsPath(), and LaunchExternal().
|
protectedinherited |
Definition at line 338 of file panel_color_settings.cpp.
References FIRST_BUTTON_ID, COLOR_SWATCH::GetSwatchColor(), and updateColor().
Referenced by createSwatch().
|
overrideprotectedvirtual |
Event fired when the user changes any color.
Reimplemented from PANEL_COLOR_SETTINGS.
Definition at line 836 of file panel_pcbnew_color_settings.cpp.
References updatePreview().
|
overrideprotectedvirtualinherited |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 113 of file panel_color_settings.cpp.
References createThemeList(), and m_currentSettings.
|
overrideprotectedvirtual |
Event fired when a new theme is selected that can be overridden in children.
Reimplemented from PANEL_COLOR_SETTINGS.
Definition at line 792 of file panel_pcbnew_color_settings.cpp.
References updatePreview().
|
inlineprotectedvirtualinherited |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS.
Definition at line 56 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE(), and ~PANEL_COLOR_SETTINGS_BASE().
|
overrideprotectedvirtual |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 891 of file panel_pcbnew_color_settings.cpp.
References zoomFitPreview().
|
overrideprotectedvirtualinherited |
Reimplemented from PANEL_COLOR_SETTINGS_BASE.
Definition at line 122 of file panel_color_settings.cpp.
References _, SETTINGS_MANAGER::AddNewColorSettings(), SETTINGS_MANAGER::GetColorSettingsPath(), JSON_SETTINGS::GetFilename(), COLOR_SETTINGS::GetOverrideSchItemColors(), SETTINGS_MANAGER::GetPathForSettingsFile(), GetSettingsDropdownName(), PGM_BASE::GetSettingsManager(), JSON_SETTINGS::IsReadOnly(), PANEL_COLOR_SETTINGS_BASE::m_cbTheme, m_currentSettings, PANEL_COLOR_SETTINGS_BASE::m_optOverrideColors, m_validLayers, onNewThemeSelected(), Pgm(), saveCurrentTheme(), JSON_SETTINGS::SaveToFile(), COLOR_SETTINGS::SetColor(), COLOR_SETTINGS::SetName(), JSON_SETTINGS::SetReadOnly(), and updateSwatches().
|
inlineinherited |
Converts aTextValue in aUnits to internal units used by the frame.
Allows the return of an empty optional if the string represents a null value (currently empty string)
aType | is the type of this value, and controls the way the string is converted to a value |
aTextValue | A reference to a wxString object containing the string to convert. |
Definition at line 175 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::DoubleValueFromString(), GetIuScale(), GetUnitsFromType(), KiROUND(), and NullUiString.
Referenced by WX_GRID::GetOptionalUnitValue(), and WX_GRID::onCellEditorHidden().
|
overridevirtual |
Reset the contents of this panel.
Reimplemented from PANEL_COLOR_SETTINGS.
Definition at line 842 of file panel_pcbnew_color_settings.cpp.
References PANEL_COLOR_SETTINGS::ResetPanel(), and updatePreview().
|
protectedvirtualinherited |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS.
Definition at line 371 of file panel_color_settings.cpp.
References GetColorSettings(), PGM_BASE::GetSettingsManager(), m_colorNamespace, m_currentSettings, PANEL_COLOR_SETTINGS_BASE::m_optOverrideColors, m_validLayers, Pgm(), SETTINGS_MANAGER::SaveColorSettings(), COLOR_SETTINGS::SetColor(), COLOR_SETTINGS::SetOverrideSchItemColors(), and validateSave().
Referenced by OnThemeChanged(), PANEL_EESCHEMA_COLOR_SETTINGS::saveCurrentTheme(), and updateColor().
|
inlineinherited |
Definition at line 46 of file units_provider.h.
References m_userUnits.
Referenced by EDA_BASE_FRAME::ChangeUserUnits(), PCB::IFACE::CreateKiWindow(), EDA_DRAW_FRAME::EDA_DRAW_FRAME(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), IfaceOrAddress(), EDA_DRAW_FRAME::LoadSettings(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), DRC_ENGINE::RunTests(), DRC_TEST_PROVIDER::RunTests(), SaveFileAs(), and EDA_DRAW_FRAME::ToggleUserUnits().
|
overrideinherited |
Definition at line 90 of file panel_color_settings.cpp.
References PANEL_COLOR_SETTINGS_BASE::m_cbTheme, m_currentSettings, onNewThemeSelected(), and updateSwatches().
|
protectedinherited |
Definition at line 287 of file panel_color_settings.cpp.
References _, KIUI::AddMenuItem(), copy, COLOR_SETTINGS::GetColor(), ID_COPY, ID_PASTE, ID_REVERT, KiBitmap(), PANEL_COLOR_SETTINGS_BASE::m_cbTheme, m_copied, m_currentSettings, paste, undo, COLOR4D::UNSPECIFIED, and updateColor().
Referenced by createSwatch().
|
inlineinherited |
Converts an optional aValue in internal units into a united string.
For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.
aValue | = optional value in internal units |
aAddUnitLabel | = true to add symbol unit to the string value |
aType | is the type of this value, and controls the way the value is converted to a string, and the suitable unit |
Definition at line 100 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), NullUiString, and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by WX_GRID::onCellEditorHidden().
|
inlineinherited |
Definition at line 114 of file units_provider.h.
References EDA_ANGLE::AsDegrees(), DEGREES, DISTANCE, EDA_UNIT_UTILS::UI::StringFromValue(), and unityScale.
|
inlineinherited |
Converts aValue in internal units into a united string.
For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.
aValue | = value in internal units |
aAddUnitLabel | = true to add symbol unit to the string value |
aType | is the type of this value, and controls the way the value is converted to a string, and the suitable unit |
Definition at line 79 of file units_provider.h.
References DISTANCE, GetIuScale(), GetUnitsFromType(), and EDA_UNIT_UTILS::UI::StringFromValue().
Referenced by MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), PAD::doCheckPad(), VALIDATION_ERROR_TOO_LARGE< T >::Format(), VALIDATION_ERROR_TOO_SMALL< T >::Format(), formatBBox(), DRC_TEST_PROVIDER::formatMsg(), DRC_TEST_PROVIDER::formatMsg(), WX_GRID::onCellEditorHidden(), reportMax(), reportMin(), reportOpt(), and PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow().
|
overrideprotected |
Definition at line 737 of file panel_pcbnew_color_settings.cpp.
References GetAppSettings(), and PANEL_COLOR_SETTINGS::m_currentSettings.
|
overrideprotected |
Definition at line 746 of file panel_pcbnew_color_settings.cpp.
References zoomFitPreview().
|
protectedinherited |
Definition at line 348 of file panel_color_settings.cpp.
References m_backgroundLayer, m_currentSettings, m_swatches, onColorChanged(), and saveCurrentTheme().
Referenced by OnColorChanged(), and ShowColorContextMenu().
|
private |
Definition at line 849 of file panel_pcbnew_color_settings.cpp.
References KIGFX::COLOR, KIGFX::VIEW::GetPainter(), KIGFX::PCB_RENDER_SETTINGS::LoadColors(), PANEL_COLOR_SETTINGS::m_currentSettings, m_preview, and KIGFX::VIEW::UpdateAllItems().
Referenced by createSwatches(), onColorChanged(), onNewThemeSelected(), and ResetPanel().
|
protectedinherited |
Definition at line 197 of file panel_color_settings.cpp.
References createSwatches(), m_backgroundLayer, m_currentSettings, and m_swatches.
Referenced by OnThemeChanged(), and Show().
|
inlineprotectedvirtualinherited |
Performs a pre-save validation of the current color theme.
aQuiet | will suppress any warning output (prompt dialogs) |
Reimplemented in PANEL_EESCHEMA_COLOR_SETTINGS.
Definition at line 85 of file panel_color_settings.h.
Referenced by saveCurrentTheme().
|
inlineinherited |
Converts aTextValue in aUnits to internal units used by the frame.
aType | is the type of this value, and controls the way the string is converted to a value |
aTextValue | A reference to a wxString object containing the string to convert. |
Definition at line 156 of file units_provider.h.
References DISTANCE, EDA_UNIT_UTILS::UI::DoubleValueFromString(), GetIuScale(), GetUnitsFromType(), and KiROUND().
Referenced by PIN_TABLE_DATA_MODEL::compare(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), WX_GRID::GetUnitValue(), and WX_GRID::onCellEditorHidden().
|
private |
Definition at line 866 of file panel_pcbnew_color_settings.cpp.
References BOX2< Vec >::Centre(), BOX2< Vec >::GetHeight(), KIGFX::VIEW::GetScale(), BOX2< Vec >::GetSize(), BOX2< Vec >::GetWidth(), m_preview, scale, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), ToVECTOR2D(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by createPreviewItems(), createSwatches(), OnSize(), and TransferDataToWindow().
|
protectedinherited |
Definition at line 121 of file panel_color_settings.h.
Referenced by createSwatch(), PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), updateColor(), and updateSwatches().
|
private |
Definition at line 68 of file panel_pcbnew_color_settings.h.
Referenced by createSwatches(), and PANEL_PCBNEW_COLOR_SETTINGS().
|
protectedinherited |
Definition at line 45 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), PANEL_COLOR_SETTINGS_BASE(), and ~PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 44 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS::createSwatch(), PANEL_COLOR_SETTINGS::createThemeList(), PANEL_COLOR_SETTINGS::OnThemeChanged(), PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), PANEL_COLOR_SETTINGS_BASE(), PANEL_COLOR_SETTINGS::Show(), PANEL_COLOR_SETTINGS::ShowColorContextMenu(), and ~PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
A namespace that will be passed to SETTINGS_MANAGER::SaveColorSettings.
This should be set to the appropriate namespace in the application-specific constructor
Definition at line 128 of file panel_color_settings.h.
Referenced by PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), and saveCurrentTheme().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 47 of file panel_color_settings_base.h.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), and PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 110 of file panel_color_settings.h.
Referenced by PANEL_COLOR_SETTINGS(), and ShowColorContextMenu().
|
protectedinherited |
Definition at line 105 of file panel_color_settings.h.
Referenced by createSwatch(), PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), OnLeftDownTheme(), PANEL_EESCHEMA_COLOR_SETTINGS::OnOverrideItemColorsClicked(), OnThemeChanged(), PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), ResetPanel(), saveCurrentTheme(), PANEL_EESCHEMA_COLOR_SETTINGS::saveCurrentTheme(), Show(), ShowColorContextMenu(), PANEL_EESCHEMA_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_FP_EDITOR_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_GERBVIEW_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_PCBNEW_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_EESCHEMA_COLOR_SETTINGS::updateAllowedSwatches(), updateColor(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), updateSwatches(), PANEL_EESCHEMA_COLOR_SETTINGS::validateSave(), PANEL_EESCHEMA_COLOR_SETTINGS::~PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::~PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::~PANEL_GERBVIEW_COLOR_SETTINGS(), and PANEL_PCBNEW_COLOR_SETTINGS::~PANEL_PCBNEW_COLOR_SETTINGS().
|
privateinherited |
Definition at line 253 of file units_provider.h.
Referenced by GetIuScale(), and UNITS_PROVIDER().
|
protectedinherited |
Definition at line 107 of file panel_color_settings.h.
Referenced by createSwatch(), and PANEL_EESCHEMA_COLOR_SETTINGS::updateAllowedSwatches().
|
protectedinherited |
Definition at line 42 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE().
|
inherited |
Definition at line 61 of file panel_color_settings_base.h.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::OnOverrideItemColorsClicked(), PANEL_COLOR_SETTINGS::OnThemeChanged(), PANEL_COLOR_SETTINGS_BASE(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), PANEL_COLOR_SETTINGS::saveCurrentTheme(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), PANEL_EESCHEMA_COLOR_SETTINGS::TransferDataFromWindow(), and ~PANEL_COLOR_SETTINGS_BASE().
|
private |
Definition at line 66 of file panel_pcbnew_color_settings.h.
Referenced by createPreviewItems(), PANEL_PCBNEW_COLOR_SETTINGS(), and ~PANEL_PCBNEW_COLOR_SETTINGS().
|
protectedinherited |
Definition at line 46 of file panel_color_settings_base.h.
Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), PANEL_COLOR_SETTINGS::PANEL_COLOR_SETTINGS(), and PANEL_COLOR_SETTINGS_BASE().
|
private |
Definition at line 65 of file panel_pcbnew_color_settings.h.
Referenced by createPreviewItems(), createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS(), updatePreview(), and zoomFitPreview().
|
protectedinherited |
Definition at line 50 of file panel_color_settings_base.h.
Referenced by PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), and PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 43 of file panel_color_settings_base.h.
Referenced by PANEL_COLOR_SETTINGS_BASE().
|
protectedinherited |
Definition at line 108 of file panel_color_settings.h.
Referenced by createSwatch(), PANEL_COLOR_SETTINGS(), ResetPanel(), PANEL_EESCHEMA_COLOR_SETTINGS::updateAllowedSwatches(), updateColor(), and updateSwatches().
|
private |
Definition at line 67 of file panel_pcbnew_color_settings.h.
Referenced by createPreviewItems(), PANEL_PCBNEW_COLOR_SETTINGS(), and ~PANEL_PCBNEW_COLOR_SETTINGS().
|
privateinherited |
Definition at line 254 of file units_provider.h.
Referenced by GetUserUnits(), SetUserUnits(), and UNITS_PROVIDER().
|
protectedinherited |
A list of layer IDs that are valid for the current color settings dialog.
Valid colors will be shown for editing and are the set of colors that actions like resetting to defaults will apply to.
This list must be filled in the application-specific color settings panel constructors.
Definition at line 120 of file panel_color_settings.h.
Referenced by PANEL_FP_EDITOR_COLOR_SETTINGS::createSwatches(), PANEL_GERBVIEW_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), OnThemeChanged(), PANEL_COLOR_SETTINGS(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), PANEL_FP_EDITOR_COLOR_SETTINGS::PANEL_FP_EDITOR_COLOR_SETTINGS(), PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS(), PANEL_PCBNEW_COLOR_SETTINGS::PANEL_PCBNEW_COLOR_SETTINGS(), saveCurrentTheme(), and PANEL_EESCHEMA_COLOR_SETTINGS::saveCurrentTheme().
|
inlinestaticinherited |
The string that is used in the UI to represent a null value.
Definition at line 250 of file units_provider.h.
Referenced by WX_GRID::GetOptionalUnitValue(), WX_GRID::onCellEditorHidden(), OptionalValueFromString(), and StringFromOptionalValue().