mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 21:33:44 +00:00
ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
This commit is contained in:
parent
2a5bb71fbd
commit
bc108023b3
common
eeschema
dialogs
dialog_sim_format_value_base.cppdialog_sim_format_value_base.fbppanel_eeschema_display_options.cpppanel_eeschema_display_options_base.cpppanel_eeschema_display_options_base.fbppanel_eeschema_display_options_base.hpanel_setup_formatting.cpppanel_setup_formatting_base.cpppanel_setup_formatting_base.fbppanel_setup_formatting_base.h
eeschema_config.cppeeschema_settings.cppeeschema_settings.hlib_pin.cpplib_pin.hmenubar.cppsch_draw_panel.cppsch_edit_frame.cppsch_line.cppsch_line.hsch_painter.cppsch_painter.hsch_pin.cppsch_pin.hsch_symbol.cppsch_view.hschematic.cppschematic_settings.cppschematic_settings.hsim
tools
include
qa/data/eeschema/spice_netlists/potentiometers
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -43,12 +43,24 @@ int GetPenSizeForBold( int aTextSize )
|
||||
}
|
||||
|
||||
|
||||
int GetPenSizeForDemiBold( int aTextSize )
|
||||
{
|
||||
return KiROUND( aTextSize / 6 );
|
||||
}
|
||||
|
||||
|
||||
int GetPenSizeForBold( const wxSize& aTextSize )
|
||||
{
|
||||
return GetPenSizeForBold( std::min( aTextSize.x, aTextSize.y ) );
|
||||
}
|
||||
|
||||
|
||||
int GetPenSizeForDemiBold( const wxSize& aTextSize )
|
||||
{
|
||||
return GetPenSizeForDemiBold( std::min( aTextSize.x, aTextSize.y ) );
|
||||
}
|
||||
|
||||
|
||||
int GetPenSizeForNormal( int aTextSize )
|
||||
{
|
||||
return KiROUND( aTextSize / 8.0 );
|
||||
|
@ -147,6 +147,8 @@ wxString LayerName( int aLayer )
|
||||
case LAYER_SELECTION_SHADOWS: return _( "Selection highlight" );
|
||||
case LAYER_SCHEMATIC_DRAWINGSHEET: return _( "Drawing sheet" );
|
||||
case LAYER_SCHEMATIC_PAGE_LIMITS: return _( "Page limits" );
|
||||
case LAYER_OP_VOLTAGES: return _( "Operating point voltages" );
|
||||
case LAYER_OP_CURRENTS: return _( "Operating point currents" );
|
||||
|
||||
// GAL_LAYER_ID
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
|
||||
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@ -73,6 +73,8 @@ static const std::map<int, COLOR4D> s_defaultTheme =
|
||||
{ LAYER_WIRE, CSS_COLOR( 0, 150, 0, 1 ) },
|
||||
{ LAYER_SCHEMATIC_DRAWINGSHEET, CSS_COLOR( 132, 0, 0, 1 ) },
|
||||
{ LAYER_SCHEMATIC_PAGE_LIMITS, CSS_COLOR( 181, 181, 181, 1 ) },
|
||||
{ LAYER_OP_VOLTAGES, CSS_COLOR( 132, 0, 50, 1 ) },
|
||||
{ LAYER_OP_CURRENTS, CSS_COLOR( 224, 0, 12, 1 ) },
|
||||
|
||||
{ LAYER_GERBVIEW_AXES, CSS_COLOR( 0, 0, 132, 1 ) },
|
||||
{ LAYER_GERBVIEW_BACKGROUND, CSS_COLOR( 0, 0, 0, 1 ) },
|
||||
@ -287,6 +289,8 @@ static const std::map<int, COLOR4D> s_classicTheme =
|
||||
{ LAYER_VALUEPART, COLOR4D( CYAN ) },
|
||||
{ LAYER_WIRE, COLOR4D( GREEN ) },
|
||||
{ LAYER_SCHEMATIC_DRAWINGSHEET, COLOR4D( RED ) },
|
||||
{ LAYER_OP_VOLTAGES, COLOR4D( DARKMAGENTA ) },
|
||||
{ LAYER_OP_CURRENTS, COLOR4D( RED ) },
|
||||
|
||||
{ LAYER_GERBVIEW_AXES, COLOR4D( BLUE ) },
|
||||
{ LAYER_GERBVIEW_BACKGROUND, COLOR4D( BLACK ) },
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
|
||||
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@ -94,6 +94,8 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath )
|
||||
CLR( "schematic.wire", LAYER_WIRE );
|
||||
CLR( "schematic.worksheet", LAYER_SCHEMATIC_DRAWINGSHEET );
|
||||
CLR( "schematic.page_limits", LAYER_SCHEMATIC_PAGE_LIMITS );
|
||||
CLR( "schematic.op_voltages", LAYER_OP_VOLTAGES );
|
||||
CLR( "schematic.op_currents", LAYER_OP_CURRENTS );
|
||||
|
||||
CLR( "gerbview.axes", LAYER_GERBVIEW_AXES );
|
||||
CLR( "gerbview.background", LAYER_GERBVIEW_BACKGROUND );
|
||||
|
@ -33,7 +33,7 @@ DIALOG_SIM_FORMAT_VALUE_BASE::DIALOG_SIM_FORMAT_VALUE_BASE( wxWindow* parent, wx
|
||||
m_rangeLabel->Wrap( -1 );
|
||||
fgSizer->Add( m_rangeLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
wxString m_rangeCtrlChoices[] = { _("auto"), _("f"), _("p"), _("n"), _("u"), _("m"), wxEmptyString, _("K"), _("M"), _("G"), _("T"), _("P") };
|
||||
wxString m_rangeCtrlChoices[] = { _("Auto"), _("f"), _("p"), _("n"), _("u"), _("m"), wxEmptyString, _("K"), _("M"), _("G"), _("T"), _("P") };
|
||||
int m_rangeCtrlNChoices = sizeof( m_rangeCtrlChoices ) / sizeof( wxString );
|
||||
m_rangeCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rangeCtrlNChoices, m_rangeCtrlChoices, 0 );
|
||||
m_rangeCtrl->SetSelection( 0 );
|
||||
|
@ -279,7 +279,7 @@
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"auto" "f" "p" "n" "u" "m" "" "K" "M" "G" "T" "P"</property>
|
||||
<property name="choices">"Auto" "f" "p" "n" "u" "m" "" "K" "M" "G" "T" "P"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -58,6 +58,8 @@ void PANEL_EESCHEMA_DISPLAY_OPTIONS::loadEEschemaSettings( EESCHEMA_SETTINGS* cf
|
||||
m_checkShowERCErrors->SetValue( cfg->m_Appearance.show_erc_errors );
|
||||
m_checkShowERCWarnings->SetValue( cfg->m_Appearance.show_erc_warnings );
|
||||
m_checkShowERCExclusions->SetValue( cfg->m_Appearance.show_erc_exclusions );
|
||||
m_checkShowOPVoltages->SetValue( cfg->m_Appearance.show_op_voltages );
|
||||
m_checkShowOPCurrents->SetValue( cfg->m_Appearance.show_op_currents );
|
||||
m_checkPageLimits->SetValue( cfg->m_Appearance.show_page_limits );
|
||||
|
||||
m_checkSelDrawChildItems->SetValue( cfg->m_Selection.draw_selected_children );
|
||||
@ -98,6 +100,8 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||
cfg->m_Appearance.show_erc_warnings = m_checkShowERCWarnings->GetValue();
|
||||
cfg->m_Appearance.show_erc_errors = m_checkShowERCErrors->GetValue();
|
||||
cfg->m_Appearance.show_erc_exclusions = m_checkShowERCExclusions->GetValue();
|
||||
cfg->m_Appearance.show_op_voltages = m_checkShowOPVoltages->GetValue();
|
||||
cfg->m_Appearance.show_op_currents = m_checkShowOPCurrents->GetValue();
|
||||
cfg->m_Appearance.show_page_limits = m_checkPageLimits->GetValue();
|
||||
|
||||
cfg->m_Selection.draw_selected_children = m_checkSelDrawChildItems->GetValue();
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -65,6 +65,12 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind
|
||||
m_checkShowERCExclusions = new wxCheckBox( this, wxID_ANY, _("Show ERC exclusions"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bAppearanceSizer->Add( m_checkShowERCExclusions, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkShowOPVoltages = new wxCheckBox( this, wxID_ANY, _("Show OP voltages"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bAppearanceSizer->Add( m_checkShowOPVoltages, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkShowOPCurrents = new wxCheckBox( this, wxID_ANY, _("Show OP currents"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bAppearanceSizer->Add( m_checkShowOPCurrents, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkPageLimits = new wxCheckBox( this, wxID_ANY, _("Show page limi&ts"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkPageLimits->SetValue(true);
|
||||
bAppearanceSizer->Add( m_checkPageLimits, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -661,6 +661,134 @@
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show OP voltages</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkShowOPVoltages</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show OP currents</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkShowOPCurrents</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -47,6 +47,8 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL
|
||||
wxCheckBox* m_checkShowERCErrors;
|
||||
wxCheckBox* m_checkShowERCWarnings;
|
||||
wxCheckBox* m_checkShowERCExclusions;
|
||||
wxCheckBox* m_checkShowOPVoltages;
|
||||
wxCheckBox* m_checkShowOPCurrents;
|
||||
wxCheckBox* m_checkPageLimits;
|
||||
wxStaticText* m_selectionLabel;
|
||||
wxStaticLine* m_staticline2;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -116,6 +116,11 @@ bool PANEL_SETUP_FORMATTING::TransferDataToWindow()
|
||||
|
||||
#undef SET_VALUE
|
||||
|
||||
m_vPrecisionCtrl->SetValue( settings.m_OPO_VPrecision );
|
||||
m_vRangeCtrl->SetStringSelection( settings.m_OPO_VRange );
|
||||
m_iPrecisionCtrl->SetValue( settings.m_OPO_IPrecision );
|
||||
m_iRangeCtrl->SetStringSelection( settings.m_OPO_IRange );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -167,6 +172,20 @@ bool PANEL_SETUP_FORMATTING::TransferDataFromWindow()
|
||||
|
||||
#undef GET_VALUE
|
||||
|
||||
settings.m_OPO_VPrecision = m_vPrecisionCtrl->GetValue();
|
||||
|
||||
if( m_vRangeCtrl->GetSelection() == 0 )
|
||||
settings.m_OPO_VRange = wxS( "~V" );
|
||||
else
|
||||
settings.m_OPO_VRange = m_vRangeCtrl->GetStringSelection();
|
||||
|
||||
settings.m_OPO_IPrecision = m_iPrecisionCtrl->GetValue();
|
||||
|
||||
if( m_iRangeCtrl->GetSelection() == 0 )
|
||||
settings.m_OPO_IRange = wxS( "~A" );
|
||||
else
|
||||
settings.m_OPO_IRange = m_iRangeCtrl->GetStringSelection();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -247,7 +247,60 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi
|
||||
sbSizer6->Add( m_dashedLineHelp, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bRightColumn->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
|
||||
bRightColumn->Add( sbSizer6, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizer7;
|
||||
sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Operating-point Overlay") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer;
|
||||
fgSizer = new wxFlexGridSizer( 4, 2, 6, 0 );
|
||||
fgSizer->AddGrowableCol( 1 );
|
||||
fgSizer->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
wxStaticText* vPrecisionLabel;
|
||||
vPrecisionLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Significant digits (voltages):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
vPrecisionLabel->Wrap( -1 );
|
||||
fgSizer->Add( vPrecisionLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_vPrecisionCtrl = new wxSpinCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10, 3 );
|
||||
fgSizer->Add( m_vPrecisionCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* vRangeLabel;
|
||||
vRangeLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Range (voltages):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
vRangeLabel->Wrap( -1 );
|
||||
fgSizer->Add( vRangeLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
wxString m_vRangeCtrlChoices[] = { _("Auto"), _("fV"), _("pV"), _("nV"), _("uV"), _("mV"), _("V"), _("KV"), _("MV"), _("GV"), _("TV"), _("PV") };
|
||||
int m_vRangeCtrlNChoices = sizeof( m_vRangeCtrlChoices ) / sizeof( wxString );
|
||||
m_vRangeCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_vRangeCtrlNChoices, m_vRangeCtrlChoices, 0 );
|
||||
m_vRangeCtrl->SetSelection( 0 );
|
||||
fgSizer->Add( m_vRangeCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxStaticText* iPrecisionLabel;
|
||||
iPrecisionLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Significant digits (currents):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
iPrecisionLabel->Wrap( -1 );
|
||||
fgSizer->Add( iPrecisionLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_iPrecisionCtrl = new wxSpinCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 10, 3 );
|
||||
fgSizer->Add( m_iPrecisionCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticText* iRangeLabel;
|
||||
iRangeLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Range (currents):"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
iRangeLabel->Wrap( -1 );
|
||||
fgSizer->Add( iRangeLabel, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_iRangeCtrlChoices[] = { _("Auto"), _("fA"), _("pA"), _("nA"), _("uA"), _("mA"), _("A"), _("KA"), _("MA"), _("GA"), _("TA"), _("PA") };
|
||||
int m_iRangeCtrlNChoices = sizeof( m_iRangeCtrlChoices ) / sizeof( wxString );
|
||||
m_iRangeCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_iRangeCtrlNChoices, m_iRangeCtrlChoices, 0 );
|
||||
m_iRangeCtrl->SetSelection( 0 );
|
||||
fgSizer->Add( m_iRangeCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
sbSizer7->Add( fgSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bRightColumn->Add( sbSizer7, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bPanelSizer->Add( bRightColumn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -1924,7 +1924,7 @@
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Dashed Lines</property>
|
||||
@ -2264,6 +2264,534 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Operating-point Overlay</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizer7</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFlexGridSizer" expanded="1">
|
||||
<property name="cols">2</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols">1</property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fgSizer</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">4</property>
|
||||
<property name="vgap">6</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Significant digits (voltages):</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">vPrecisionLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">none</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="initial">3</property>
|
||||
<property name="max">10</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">1</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_vPrecisionCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxSP_ARROW_KEYS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Range (voltages):</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">vRangeLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">none</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Auto" "fV" "pV" "nV" "uV" "mV" "V" "KV" "MV" "GV" "TV" "PV"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_vRangeCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Significant digits (currents):</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">iPrecisionLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">none</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSpinCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="initial">3</property>
|
||||
<property name="max">10</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">1</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_iPrecisionCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxSP_ARROW_KEYS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Range (currents):</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">iRangeLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">none</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Auto" "fA" "pA" "nA" "uA" "mA" "A" "KA" "MA" "GA" "TA" "PA"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_iRangeCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -22,6 +22,7 @@
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -71,6 +72,10 @@ class PANEL_SETUP_FORMATTING_BASE : public wxPanel
|
||||
wxStaticText* gapLengthLabel;
|
||||
wxTextCtrl* m_gapLengthCtrl;
|
||||
wxStaticText* m_dashedLineHelp;
|
||||
wxSpinCtrl* m_vPrecisionCtrl;
|
||||
wxChoice* m_vRangeCtrl;
|
||||
wxSpinCtrl* m_iPrecisionCtrl;
|
||||
wxChoice* m_iRangeCtrl;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
virtual void onCheckBoxIref( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
@ -102,6 +102,7 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage )
|
||||
|
||||
GetCanvas()->GetView()->MarkDirty();
|
||||
GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT );
|
||||
RefreshOperatingPointDisplay();
|
||||
GetCanvas()->Refresh();
|
||||
}
|
||||
}
|
||||
|
@ -133,6 +133,12 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
|
||||
m_params.emplace_back( new PARAM<bool>( "appearance.show_erc_exclusions",
|
||||
&m_Appearance.show_erc_exclusions, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "appearance.show_op_voltages",
|
||||
&m_Appearance.show_op_voltages, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "appearance.show_op_currents",
|
||||
&m_Appearance.show_op_currents, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "appearance.show_illegal_symbol_lib_dialog",
|
||||
&m_Appearance.show_illegal_symbol_lib_dialog, true ) );
|
||||
|
||||
|
@ -63,6 +63,8 @@ public:
|
||||
bool show_erc_warnings;
|
||||
bool show_erc_errors;
|
||||
bool show_erc_exclusions;
|
||||
bool show_op_voltages;
|
||||
bool show_op_currents;
|
||||
bool show_illegal_symbol_lib_dialog;
|
||||
bool show_page_limits;
|
||||
bool show_sexpr_file_convert_warning;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -1187,12 +1187,13 @@ const BOX2I LIB_PIN::ViewBBox() const
|
||||
|
||||
void LIB_PIN::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
{
|
||||
aCount = 3;
|
||||
aCount = 4;
|
||||
aLayers[0] = LAYER_DANGLING; // We don't really show dangling vs non-dangling (since there
|
||||
// are no connections in the symbol editor), but it's still
|
||||
// a good visual indication of which end of the pin is which.
|
||||
aLayers[1] = LAYER_DEVICE;
|
||||
aLayers[2] = LAYER_SELECTION_SHADOWS;
|
||||
aLayers[3] = LAYER_OP_CURRENTS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jaen-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -166,6 +166,11 @@ public:
|
||||
|
||||
// Do not create a copy constructor. The one generated by the compiler is adequate.
|
||||
|
||||
// No, LIB_PINs don't really have operating poinst. But we draw SCH_PINs through their LIB_PIN
|
||||
// counterparts, so here we are....
|
||||
const wxString& GetOperatingPoint() const { return m_operatingPoint; }
|
||||
void SetOperatingPoint( const wxString& aText ) { m_operatingPoint = aText; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const override;
|
||||
#endif
|
||||
@ -299,6 +304,10 @@ protected:
|
||||
int m_nameTextSize;
|
||||
|
||||
std::map<wxString, ALT> m_alternates; // Map of alternate name to ALT structure
|
||||
|
||||
wxString m_operatingPoint; // No, LIB_PINs don't really have operating points.
|
||||
// But we draw SCH_PINs through their LIB_PIN
|
||||
// counterparts, so here we are....
|
||||
};
|
||||
|
||||
|
||||
|
@ -207,6 +207,8 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
|
||||
viewMenu->Add( EE_ACTIONS::toggleERCErrors, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( EE_ACTIONS::toggleERCWarnings, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( EE_ACTIONS::toggleERCExclusions, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( EE_ACTIONS::toggleOPVoltages, ACTION_MENU::CHECK );
|
||||
viewMenu->Add( EE_ACTIONS::toggleOPCurrents, ACTION_MENU::CHECK );
|
||||
|
||||
#ifdef __APPLE__
|
||||
viewMenu->AppendSeparator();
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2014-2019 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -168,6 +168,11 @@ void SCH_DRAW_PANEL::setDefaultLayerDeps()
|
||||
m_view->SetLayerTarget( LAYER_DRAWINGSHEET, KIGFX::TARGET_NONCACHED );
|
||||
m_view->SetLayerDisplayOnly( LAYER_DRAWINGSHEET ) ;
|
||||
|
||||
m_view->SetLayerTarget( LAYER_OP_VOLTAGES, KIGFX::TARGET_OVERLAY );
|
||||
m_view->SetLayerDisplayOnly( LAYER_OP_VOLTAGES );
|
||||
m_view->SetLayerTarget( LAYER_OP_CURRENTS, KIGFX::TARGET_OVERLAY );
|
||||
m_view->SetLayerDisplayOnly( LAYER_OP_CURRENTS );
|
||||
|
||||
// m_view->SetLayerTarget( LAYER_SELECTION_SHADOWS, KIGFX::TARGET_NONCACHED );
|
||||
// m_view->SetLayerDisplayOnly( LAYER_SELECTION_SHADOWS ) ;
|
||||
}
|
||||
|
@ -248,6 +248,12 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
|
||||
LoadProjectSettings();
|
||||
|
||||
view->SetLayerVisible( LAYER_ERC_ERR, cfg->m_Appearance.show_erc_errors );
|
||||
view->SetLayerVisible( LAYER_ERC_WARN, cfg->m_Appearance.show_erc_warnings );
|
||||
view->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions );
|
||||
view->SetLayerVisible( LAYER_OP_VOLTAGES, cfg->m_Appearance.show_op_voltages );
|
||||
view->SetLayerVisible( LAYER_OP_CURRENTS, cfg->m_Appearance.show_op_currents );
|
||||
|
||||
initScreenZoom();
|
||||
|
||||
m_hierarchy->Connect( wxEVT_SIZE,
|
||||
@ -496,6 +502,20 @@ void SCH_EDIT_FRAME::setupUIConditions()
|
||||
return cfg && cfg->m_Appearance.show_erc_exclusions;
|
||||
};
|
||||
|
||||
auto showOPVoltagesCond =
|
||||
[this]( const SELECTION& )
|
||||
{
|
||||
EESCHEMA_SETTINGS* cfg = eeconfig();
|
||||
return cfg && cfg->m_Appearance.show_op_voltages;
|
||||
};
|
||||
|
||||
auto showOPCurrentsCond =
|
||||
[this]( const SELECTION& )
|
||||
{
|
||||
EESCHEMA_SETTINGS* cfg = eeconfig();
|
||||
return cfg && cfg->m_Appearance.show_op_currents;
|
||||
};
|
||||
|
||||
auto showAnnotateAutomaticallyCond =
|
||||
[this]( const SELECTION& )
|
||||
{
|
||||
@ -554,6 +574,8 @@ void SCH_EDIT_FRAME::setupUIConditions()
|
||||
mgr->SetConditions( EE_ACTIONS::toggleERCErrors, CHECK( showERCErrorsCond ) );
|
||||
mgr->SetConditions( EE_ACTIONS::toggleERCWarnings, CHECK( showERCWarningsCond ) );
|
||||
mgr->SetConditions( EE_ACTIONS::toggleERCExclusions, CHECK( showERCExclusionsCond ) );
|
||||
mgr->SetConditions( EE_ACTIONS::toggleOPVoltages, CHECK( showOPVoltagesCond ) );
|
||||
mgr->SetConditions( EE_ACTIONS::toggleOPCurrents, CHECK( showOPCurrentsCond ) );
|
||||
mgr->SetConditions( EE_ACTIONS::toggleAnnotateAuto, CHECK( showAnnotateAutomaticallyCond ) );
|
||||
mgr->SetConditions( ACTIONS::toggleBoundingBoxes, CHECK( cond.BoundingBoxes() ) );
|
||||
|
||||
@ -1258,6 +1280,11 @@ void SCH_EDIT_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
|
||||
|
||||
void SCH_EDIT_FRAME::RefreshOperatingPointDisplay()
|
||||
{
|
||||
SCHEMATIC_SETTINGS& settings = m_schematic->Settings();
|
||||
SIM_LIB_MGR simLibMgr( &Prj() );
|
||||
|
||||
// Update items which may have ${OP} text variables
|
||||
//
|
||||
GetCanvas()->GetView()->UpdateAllItemsConditionally(
|
||||
[&]( KIGFX::VIEW_ITEM* aItem ) -> int
|
||||
{
|
||||
@ -1291,6 +1318,89 @@ void SCH_EDIT_FRAME::RefreshOperatingPointDisplay()
|
||||
return flags;
|
||||
} );
|
||||
|
||||
// Update OP overlay items
|
||||
//
|
||||
for( SCH_ITEM* item : GetScreen()->Items() )
|
||||
{
|
||||
if( item->Type() == SCH_LINE_T )
|
||||
{
|
||||
static_cast<SCH_LINE*>( item )->SetOperatingPoint( wxEmptyString );
|
||||
// update value from netlist, below
|
||||
}
|
||||
else if( item->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
wxString ref = symbol->GetRef( &GetCurrentSheet() );
|
||||
std::vector<SCH_PIN*> pins = symbol->GetPins( &GetCurrentSheet() );
|
||||
|
||||
for( SCH_PIN* pin : pins )
|
||||
pin->SetOperatingPoint( wxEmptyString );
|
||||
|
||||
if( pins.size() == 2 )
|
||||
{
|
||||
wxString op = m_schematic->GetOperatingPoint( ref, settings.m_OPO_IPrecision,
|
||||
settings.m_OPO_IRange );
|
||||
|
||||
if( !op.IsEmpty() && op != wxS( "?" ) )
|
||||
pins[0]->SetOperatingPoint( op );
|
||||
}
|
||||
else
|
||||
{
|
||||
SIM_MODEL& model = simLibMgr.CreateModel( &GetCurrentSheet(), *symbol ).model;
|
||||
|
||||
for( const auto& modelPin : model.GetPins() )
|
||||
{
|
||||
SCH_PIN* symbolPin = symbol->GetPin( modelPin.get().symbolPinNumber );
|
||||
wxString signalName = ref + wxS( ":" ) + modelPin.get().name;
|
||||
wxString op = m_schematic->GetOperatingPoint( signalName,
|
||||
settings.m_OPO_IPrecision,
|
||||
settings.m_OPO_IRange );
|
||||
|
||||
if( symbolPin && !op.IsEmpty() && op != wxS( "?" ) )
|
||||
{
|
||||
symbolPin->SetOperatingPoint( op );
|
||||
GetCanvas()->GetView()->Update( symbol );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( const auto& [ key, subgraphList ] : m_schematic->m_connectionGraph->GetNetMap() )
|
||||
{
|
||||
wxString op = m_schematic->GetOperatingPoint( key.Name, settings.m_OPO_VPrecision,
|
||||
settings.m_OPO_VRange );
|
||||
|
||||
if( !op.IsEmpty() )
|
||||
{
|
||||
for( CONNECTION_SUBGRAPH* subgraph : subgraphList )
|
||||
{
|
||||
SCH_LINE* longestWire = nullptr;
|
||||
double length = 0.0;
|
||||
|
||||
for( SCH_ITEM* item : subgraph->m_items )
|
||||
{
|
||||
if( item->IsType( { SCH_ITEM_LOCATE_WIRE_T } ) )
|
||||
{
|
||||
SCH_LINE* wire = static_cast<SCH_LINE*>( item );
|
||||
|
||||
if( wire->GetLength() > length )
|
||||
{
|
||||
longestWire = wire;
|
||||
length = wire->GetLength();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( longestWire )
|
||||
{
|
||||
longestWire->SetOperatingPoint( op );
|
||||
GetCanvas()->GetView()->Update( longestWire );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GetCanvas()->ForceRefresh();
|
||||
}
|
||||
|
||||
@ -1603,6 +1713,10 @@ void SCH_EDIT_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
||||
view->SetLayerVisible( LAYER_ERC_ERR, cfg->m_Appearance.show_erc_errors );
|
||||
view->SetLayerVisible( LAYER_ERC_WARN, cfg->m_Appearance.show_erc_warnings );
|
||||
view->SetLayerVisible( LAYER_ERC_EXCLUSION, cfg->m_Appearance.show_erc_exclusions );
|
||||
view->SetLayerVisible( LAYER_OP_VOLTAGES, cfg->m_Appearance.show_op_voltages );
|
||||
view->SetLayerVisible( LAYER_OP_CURRENTS, cfg->m_Appearance.show_op_currents );
|
||||
|
||||
RefreshOperatingPointDisplay();
|
||||
|
||||
settings.m_TemplateFieldNames.DeleteAllFieldNameTemplates( true /* global */ );
|
||||
|
||||
@ -1871,6 +1985,7 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||
// update the References
|
||||
GetCurrentSheet().UpdateAllScreenReferences();
|
||||
SetSheetNumberAndCount();
|
||||
RefreshOperatingPointDisplay();
|
||||
|
||||
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -85,8 +85,11 @@ SCH_LINE::SCH_LINE( const SCH_LINE& aLine ) :
|
||||
m_lastResolvedLineStyle = aLine.m_lastResolvedLineStyle;
|
||||
m_lastResolvedWidth = aLine.m_lastResolvedWidth;
|
||||
m_lastResolvedColor = aLine.m_lastResolvedColor;
|
||||
|
||||
m_operatingPoint = aLine.m_operatingPoint;
|
||||
}
|
||||
|
||||
|
||||
wxString SCH_LINE::GetNetname( const SCH_SHEET_PATH& aSheet )
|
||||
{
|
||||
std::list<const SCH_LINE *> checkedLines;
|
||||
@ -94,6 +97,7 @@ wxString SCH_LINE::GetNetname( const SCH_SHEET_PATH& aSheet )
|
||||
return FindWireSegmentNetNameRecursive( this, checkedLines, aSheet );
|
||||
}
|
||||
|
||||
|
||||
wxString SCH_LINE::FindWireSegmentNetNameRecursive( SCH_LINE *line,
|
||||
std::list<const SCH_LINE *> &checkedLines,
|
||||
const SCH_SHEET_PATH& aSheet ) const
|
||||
@ -125,6 +129,7 @@ wxString SCH_LINE::FindWireSegmentNetNameRecursive( SCH_LINE *line,
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
EDA_ITEM* SCH_LINE::Clone() const
|
||||
{
|
||||
return new SCH_LINE( *this );
|
||||
@ -181,10 +186,36 @@ void SCH_LINE::Show( int nestLevel, std::ostream& os ) const
|
||||
|
||||
void SCH_LINE::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
{
|
||||
aCount = 3;
|
||||
aCount = 4;
|
||||
aLayers[0] = LAYER_DANGLING;
|
||||
aLayers[1] = m_layer;
|
||||
aLayers[2] = LAYER_SELECTION_SHADOWS;
|
||||
aLayers[3] = LAYER_OP_VOLTAGES;
|
||||
}
|
||||
|
||||
|
||||
double SCH_LINE::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||
{
|
||||
constexpr double HIDE = std::numeric_limits<double>::max();
|
||||
constexpr double SHOW = 0.0;
|
||||
|
||||
if( aLayer == LAYER_OP_VOLTAGES )
|
||||
{
|
||||
if( m_start == m_end )
|
||||
return HIDE;
|
||||
|
||||
int height = std::abs( m_end.y - m_start.y );
|
||||
int width = std::abs( m_end.x - m_start.x );
|
||||
|
||||
// Operating points will be shown only if zoom is appropriate
|
||||
if( height == 0 )
|
||||
return (double) schIUScale.mmToIU( 15 ) / width;
|
||||
else
|
||||
return (double) schIUScale.mmToIU( 5 ) / height;
|
||||
}
|
||||
|
||||
// Other layers are always drawn.
|
||||
return SHOW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -197,6 +197,8 @@ public:
|
||||
|
||||
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||
|
||||
double ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
|
||||
|
||||
const BOX2I GetBoundingBox() const override;
|
||||
|
||||
/**
|
||||
@ -295,6 +297,9 @@ public:
|
||||
|
||||
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
|
||||
|
||||
const wxString& GetOperatingPoint() const { return m_operatingPoint; }
|
||||
void SetOperatingPoint( const wxString& aText ) { m_operatingPoint = aText; }
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const override;
|
||||
#endif
|
||||
@ -347,6 +352,8 @@ private:
|
||||
mutable PLOT_DASH_TYPE m_lastResolvedLineStyle;
|
||||
mutable int m_lastResolvedWidth;
|
||||
mutable COLOR4D m_lastResolvedColor;
|
||||
|
||||
wxString m_operatingPoint;
|
||||
};
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 CERN
|
||||
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
@ -30,6 +30,7 @@
|
||||
#include <symbol_library.h>
|
||||
#include <connection_graph.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <callback_gal.h>
|
||||
#include <geometry/shape_segment.h>
|
||||
#include <geometry/shape_simple.h>
|
||||
#include <gr_text.h>
|
||||
@ -565,6 +566,16 @@ float SCH_PAINTER::getTextThickness( const EDA_ITEM* aItem ) const
|
||||
}
|
||||
|
||||
|
||||
int SCH_PAINTER::getOperatingPointTextSize() const
|
||||
{
|
||||
int docTextSize = schIUScale.MilsToIU( 50 );
|
||||
int screenTextSize = std::abs( (int) m_gal->GetScreenWorldMatrix().GetScale().y * 7 );
|
||||
|
||||
// 66% zoom-relative
|
||||
return KiROUND( ( docTextSize + screenTextSize * 2 ) / 3 );
|
||||
}
|
||||
|
||||
|
||||
static VECTOR2D mapCoords( const VECTOR2D& aCoord )
|
||||
{
|
||||
return VECTOR2D( aCoord.x, -aCoord.y );
|
||||
@ -617,6 +628,52 @@ void SCH_PAINTER::bitmapText( const wxString& aText, const VECTOR2D& aPosition,
|
||||
}
|
||||
|
||||
|
||||
void SCH_PAINTER::knockoutText( const wxString& aText, const VECTOR2D& aPosition,
|
||||
const TEXT_ATTRIBUTES& aAttrs )
|
||||
{
|
||||
TEXT_ATTRIBUTES attrs( aAttrs );
|
||||
KIFONT::FONT* font = aAttrs.m_Font;
|
||||
|
||||
if( !font )
|
||||
{
|
||||
font = KIFONT::FONT::GetFont( eeconfig()->m_Appearance.default_font, attrs.m_Bold,
|
||||
attrs.m_Italic );
|
||||
}
|
||||
|
||||
KIGFX::GAL_DISPLAY_OPTIONS empty_opts;
|
||||
SHAPE_POLY_SET knockouts;
|
||||
|
||||
CALLBACK_GAL callback_gal( empty_opts,
|
||||
// Polygon callback
|
||||
[&]( const SHAPE_LINE_CHAIN& aPoly )
|
||||
{
|
||||
knockouts.AddOutline( aPoly );
|
||||
} );
|
||||
|
||||
callback_gal.SetIsFill( false );
|
||||
callback_gal.SetIsStroke( true );
|
||||
callback_gal.SetLineWidth( (float) attrs.m_StrokeWidth );
|
||||
font->Draw( &callback_gal, aText, aPosition, attrs );
|
||||
|
||||
BOX2I bbox = knockouts.BBox( attrs.m_StrokeWidth * 2 );
|
||||
SHAPE_POLY_SET finalPoly;
|
||||
|
||||
finalPoly.NewOutline();
|
||||
finalPoly.Append( bbox.GetLeft(), bbox.GetTop() );
|
||||
finalPoly.Append( bbox.GetRight(), bbox.GetTop() );
|
||||
finalPoly.Append( bbox.GetRight(), bbox.GetBottom() );
|
||||
finalPoly.Append( bbox.GetLeft(), bbox.GetBottom() );
|
||||
|
||||
finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );
|
||||
finalPoly.Fracture( SHAPE_POLY_SET::PM_FAST );
|
||||
|
||||
m_gal->SetIsStroke( false );
|
||||
m_gal->SetIsFill( true );
|
||||
m_gal->SetFillColor( attrs.m_Color );
|
||||
m_gal->DrawPolygon( finalPoly );
|
||||
}
|
||||
|
||||
|
||||
void SCH_PAINTER::boxText( const wxString& aText, const VECTOR2D& aPosition,
|
||||
const TEXT_ATTRIBUTES& aAttrs )
|
||||
{
|
||||
@ -1232,6 +1289,7 @@ void SCH_PAINTER::draw( const LIB_PIN *aPin, int aLayer, bool aDimmed )
|
||||
|
||||
bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS;
|
||||
bool drawingDangling = aLayer == LAYER_DANGLING;
|
||||
bool drawingOP = aLayer == LAYER_OP_CURRENTS;
|
||||
bool isDangling = m_schSettings.m_IsSymbolEditor || aPin->HasFlag( IS_DANGLING );
|
||||
|
||||
if( drawingShadows && !( aPin->IsBrightened() || aPin->IsSelected() ) )
|
||||
@ -1292,6 +1350,40 @@ void SCH_PAINTER::draw( const LIB_PIN *aPin, int aLayer, bool aDimmed )
|
||||
break;
|
||||
}
|
||||
|
||||
if( drawingOP && !aPin->GetOperatingPoint().IsEmpty() )
|
||||
{
|
||||
int textSize = getOperatingPointTextSize();
|
||||
VECTOR2I mid = ( p0 + pos ) / 2;
|
||||
int textOffset = KiROUND( textSize * 0.22 );
|
||||
TEXT_ATTRIBUTES attrs;
|
||||
|
||||
if( len > KiROUND( textSize * 1.8 ) )
|
||||
{
|
||||
if( dir.x == 0 )
|
||||
{
|
||||
mid.x += KiROUND( textOffset * 1.2 );
|
||||
attrs.m_Angle = ANGLE_HORIZONTAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mid.y -= KiROUND( textOffset * 1.2 );
|
||||
attrs.m_Angle = ANGLE_VERTICAL;
|
||||
}
|
||||
|
||||
attrs.m_Halign = GR_TEXT_H_ALIGN_LEFT;
|
||||
attrs.m_Valign = GR_TEXT_V_ALIGN_CENTER;
|
||||
|
||||
attrs.m_Font = KIFONT::FONT::GetFont(); // always use stroke font for performance
|
||||
attrs.m_Size = VECTOR2I( textSize, textSize );
|
||||
attrs.m_StrokeWidth = GetPenSizeForDemiBold( textSize );
|
||||
attrs.m_Color = m_schSettings.GetLayerColor( LAYER_OP_CURRENTS );
|
||||
|
||||
knockoutText( aPin->GetOperatingPoint(), mid, attrs );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
VECTOR2D pc;
|
||||
|
||||
m_gal->SetIsStroke( true );
|
||||
@ -1706,6 +1798,7 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer )
|
||||
{
|
||||
bool drawingShadows = aLayer == LAYER_SELECTION_SHADOWS;
|
||||
bool drawingDangling = aLayer == LAYER_DANGLING;
|
||||
bool drawingOP = aLayer == LAYER_OP_VOLTAGES;
|
||||
|
||||
if( drawingShadows && !( aLine->IsBrightened() || aLine->IsSelected() ) )
|
||||
return;
|
||||
@ -1747,6 +1840,35 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer )
|
||||
if( drawingDangling )
|
||||
return;
|
||||
|
||||
if( drawingOP && !aLine->GetOperatingPoint().IsEmpty() )
|
||||
{
|
||||
int textSize = getOperatingPointTextSize();
|
||||
VECTOR2I pos = aLine->GetMidPoint();
|
||||
int textOffset = KiROUND( textSize * 0.22 );
|
||||
TEXT_ATTRIBUTES attrs;
|
||||
|
||||
if( aLine->GetStartPoint().y == aLine->GetEndPoint().y )
|
||||
{
|
||||
pos.y -= textOffset;
|
||||
attrs.m_Halign = GR_TEXT_H_ALIGN_CENTER;
|
||||
attrs.m_Valign = GR_TEXT_V_ALIGN_BOTTOM;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos.x += KiROUND( textOffset * 1.2 );
|
||||
attrs.m_Halign = GR_TEXT_H_ALIGN_LEFT;
|
||||
attrs.m_Valign = GR_TEXT_V_ALIGN_CENTER;
|
||||
}
|
||||
|
||||
attrs.m_Font = KIFONT::FONT::GetFont(); // always use stroke font for performance
|
||||
attrs.m_Size = VECTOR2I( textSize, textSize );
|
||||
attrs.m_StrokeWidth = GetPenSizeForDemiBold( textSize );
|
||||
attrs.m_Color = m_schSettings.GetLayerColor( LAYER_OP_VOLTAGES );
|
||||
|
||||
knockoutText( aLine->GetOperatingPoint(), pos, attrs );
|
||||
return;
|
||||
}
|
||||
|
||||
m_gal->SetIsStroke( true );
|
||||
m_gal->SetStrokeColor( color );
|
||||
m_gal->SetLineWidth( width );
|
||||
@ -2300,6 +2422,8 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer )
|
||||
tempPin->SetFlags( IS_DANGLING );
|
||||
else
|
||||
tempPin->ClearFlags( IS_DANGLING );
|
||||
|
||||
tempPin->SetOperatingPoint( symbolPin->GetOperatingPoint() );
|
||||
}
|
||||
|
||||
draw( &tempSymbol, aLayer, false, aSymbol->GetUnit(), aSymbol->GetConvert(), aSymbol->GetDNP() );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user