Commit Graph

232 Commits

Author SHA1 Message Date
Jeff Young 64fa400b19 Ease translation a bit.
Also improves the SNR and consistency of the menu item text.  For
instance, a position is rarely useful, while relative sizes can be.

Also removes some unnecessary repitition, such as "Graphic Rectangle"
when "Rectangle" communicates the necessary information.
2020-09-19 18:49:06 +01:00
Jeff Young f347118ce3 Add a min pin width advanced config for plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/5546
2020-09-08 20:19:54 +01:00
Seth Hillbrand 02a5d47de9 Avoid passing references in EESchema
This returns the connection list by value.  This allows easier Python
use

Also renames m_End() to GetEnd()
2020-09-08 06:29:27 -07:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00
Jon Evans 38a4e4ad5a Remove the last bits of the old netlist system 2020-08-30 16:30:04 -04:00
Jeff Young 15c136ead2 Make a bunch of help dialogs modeless.
Fixes https://gitlab.com/kicad/code/kicad/issues/5334
2020-08-24 23:17:33 +01:00
Jeff Young 0804f487ec Add text var cross-reference processing to SCH_FIELDs. 2020-07-30 14:27:42 +01:00
Jeff Young 55784afbfe Allow text variables to reference parent sheet's fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2466
2020-07-28 13:35:37 +01:00
Jeff Young e66523586b Add Assign Netclass... to context menu.
ADDED Assign Netclass feature to EEschema.

Netclass assignments also now shown in status bar.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-07 14:23:39 +01:00
Jeff Young e7603ddcb9 Add tilde escape syntax to syntax help. 2020-05-29 22:06:48 +01:00
Jeff Young 8b084c373e Autocomplete for text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-27 23:29:51 +01:00
Jeff Young f3e4e61fa7 Push some more editing code out to the tool framework. 2020-05-27 23:29:51 +01:00
Jon Evans 7c7b7f41da Move SCH_SCREEN project access to SCHEMATIC
SCH_SCREEN no longer needs to be a KIWAY_HOLDER
2020-05-20 22:27:48 -04:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Jeff Young 1cfcfc3ca7 Fix some formatting issues in syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/4233
2020-05-10 22:34:40 +01:00
Jeff Young cbe4b79107 Add syntax help for bus definitions (and upgrade parser to handle them).
Fixes https://gitlab.com/kicad/code/kicad/issues/4233
2020-05-10 18:40:06 +01:00
Jeff Young cc1ebca242 Add syntax help to pin dialogs. 2020-05-10 18:40:06 +01:00
Jeff Young df37887b1f Factor line width into global label shape.
Fixes https://gitlab.com/kicad/code/kicad/issues/4323
2020-05-05 20:26:51 +01:00
jean-pierre charras 687c2f3e82 eeschema: fix a readability issue for small texts.
Texts were drawn with a minimal line thickness = GetDefaultPenWidth().
The default pen width can be to large for small texts.
So the actual text thickness is now always clamped.
2020-04-30 09:38:23 +02:00
jean-pierre charras d10c8cd75b Sheet pins: fix incorrect size and plot thickness of the graphic symbol.
Unlike the global labels, the hierarchical label is not inside the graphic symbol.
So the graphic symbol size depends only of the text size, not of the text offset.
2020-04-29 17:46:36 +02:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Jeff Young 2fb2eac4d5 Performance enhancements. 2020-04-24 22:17:45 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young a286cb5a8f Keep labels on dragged wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/2107
2020-04-19 18:24:39 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young 0dfdc37ae7 Clean up label spacing to be more predictable.
Don't try to use complex algorithms taking into account default
margins, line-widths and pen-widths (especially when they differed
between label types).  We now use the (user-controlled) text
offset ratio to determine the margins (from the center-point of
the attached line).
2020-04-17 14:47:57 +01:00
Jeff Young 37023da56f Tidy some compiler warnings. 2020-04-16 17:34:46 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
jean-pierre charras 952e7a5fb4 Eeschema: move some default values to default_values.h.
These default values are used in many files, and some files were using
magic numbers.
2020-04-14 20:15:18 +02:00
jean-pierre charras 6148461484 Eeschema plot: fix (temporary) line 0 thickness.
Plotting lines having 0 thickness is not acceptable and create issues.
2020-04-14 12:43:51 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 505d8bf56e Allow ':'s in field name references in text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young aba0fa7bf8 Allow cross-referencing text substitutions. 2020-04-07 17:29:58 +01:00
Jeff Young cc9ac37a0e Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
Jeff Young 591428b0d9 Remove some problematic global variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4121
2020-04-05 16:17:04 +01:00
jean-pierre charras b1b8a32078 fix a few Coverity warnings and compil minor warnings. 2020-04-03 09:54:47 +02:00
Jeff Young b59da3e4dc Overridden versions of GetShownText() still need to call EDA_TEXT version.
Fixes https://gitlab.com/kicad/code/kicad/issues/4151
2020-04-02 18:27:54 +01:00
Jeff Young 41b5872f12 Add ERC & DRC checks for unresolved variables. 2020-03-30 14:15:59 +01:00
Jeff Young 40b2eabfc1 Add a user-defined ratio for text offset from wire/bus.
Fixes https://gitlab.com/kicad/code/kicad/issues/2392
2020-03-17 12:50:31 +00:00
Jon Evans 643c97a2f4 ADDED: Schematic plotting can use a dedicated color theme
ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
2020-03-06 00:01:02 -05:00
Jonathan Warner 469c1c14ef Eeschema: adjusted component sorting to work better 2020-02-06 06:02:51 -07:00
Jon Evans ac875e26a8 Fix handling of SCH_PINs on multi-unit parts
Fixes https://gitlab.com/kicad/code/kicad/issues/3770
2020-02-04 11:51:29 +00:00
Seth Hillbrand 55eb687184 Eeschema: Force output ordering
The RTree does not have a deterministic iterator, so extracting items
may be in arbitrary order, causing issues as the schematic appears to
change when comparing to previous revisions.

This uses the SCH_ITEM comparison operator to for ordering by type, then
by custom sorting within type.

For the netlist, we choose the first available unit in the sheet for
each component.

Fixes #3811 | https://gitlab.com/kicad/code/kicad/issues/3811
2020-01-28 13:31:52 -08:00
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
Jeff Young 7bb9551801 Handle boost exceptions. (From Coverity scan.) 2020-01-11 00:04:01 +00:00
Jeff Young 33da81cd27 Repair Coverity scan defects. 2020-01-10 23:17:54 +00:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
jean-pierre charras c17c9960d8 Eeschema: fix a colliding name between sch_text.h and a Windows/msys2 header.
"INPUT" declaration in sch_text.h generate *a lot of* compil warnings.
So it is replaced by PS_INPUT.
For consistency, others member of enum class PINSHEETLABEL_SHAPE are also renamed.
2020-01-09 08:52:30 +01:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Wayne Stambaugh aeb3281e27 Convert Schematic Internal Units to 100nm 2019-12-30 18:28:00 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young 35c8d64f98 Add super- and subscript support to Eeschema.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting.  (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)

Note also that this is more about engineering nomenclature than
visual formatting.  In that respect it's more similar to overbar
than italic or bold.
2019-11-05 17:22:51 +00:00
Seth Hillbrand c3226653cc eeschema: Handle broken spin style value
The spin style is stored as a numeric and can be corrupted.  We handle
this by triggering assertions for debugging the bad value while
resetting to default if we have non-valid spin values that are outside
the array.

Fixes: lp:1843091
* https://bugs.launchpad.net/kicad/+bug/1843091
2019-09-06 13:17:12 -07:00
Jeff Young 5503727d3d Fix some placement bugs with selection haloes on text.
Fixes: lp:1838841
* https://bugs.launchpad.net/kicad/+bug/1838841
2019-08-03 17:20:54 -06:00
Jeff Young 937e3c2d48 Make m_Text private so we don't keep getting bugs where m_shown_text fails to get updated.
Fixes: lp:1838655
* https://bugs.launchpad.net/kicad/+bug/1838655
2019-08-01 20:36:59 -06:00
Jeff Young daac54b5d2 Update shown text cache in undo/redo.
Fixes: lp:1837772
* https://bugs.launchpad.net/kicad/+bug/1837772
2019-07-26 23:59:05 -06:00
Jeff Young e1a22333c1 Fix bug with escaped '~' still getting extra height for overbar. 2019-07-10 11:59:09 +01:00
Jeff Young ad26ece8d4 Add Global Edit Text and Graphics Properties to Eeschema.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-01 22:15:25 +01:00
Seth Hillbrand 39c2745f55 eeschema: Allow spaces in label names for multilabeling
This adds the functionality to add multiple labels to your schematic at
once by using spaces in the original label name.

Fixes: lp:1095113
* https://bugs.launchpad.net/kicad/+bug/1095113
2019-06-20 16:21:49 -07:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Jeff Young 053c26c96e Refresh shown_text cache when incrementing label name.
Fixes: lp:1828874
* https://bugs.launchpad.net/kicad/+bug/1828874
2019-05-15 17:50:52 +01:00
Jeff Young 32765ebffd Do some refactoring in prep for sharing some sch tools with libedit. 2019-05-05 17:14:30 +01:00
Jeff Young f81007f74b Some clean-up and moving message panel update to selection event. 2019-05-05 17:12:59 +01:00
Jeff Young 460909ea9a Move click-to-place tools to modern toolset. 2019-04-16 16:20:52 +01:00
Jon Evans 078fdb9077 Fix rotation of global and hierarchical labels
Fixes: lp:1824432
* https://bugs.launchpad.net/kicad/+bug/1824432

(cherry picked from commit 593a5181d7)
2019-04-13 17:03:27 -04:00
jean-pierre charras 2529346940 Some fixes for I18N. Mainly do not translate debug messages or strings giving only a print format (like "%d"). 2019-04-13 10:12:24 +02:00
Wayne Stambaugh 3d33cba574 Eeschema: fix schematic text object plotting issue.
Save and restore text thickness in SCH_TEXT::Plot() function to prevent
the plotting default thickness value from stepping on the original text
thickness and causing all of the text objects to magically change to bold.

Fixes lp:1823165

https://bugs.launchpad.net/kicad/+bug/1823165
2019-04-09 10:14:32 -04:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jeff Young 95635804bf Replace pin mark/sweep with method that doesn't invalidate iterators.
Also removes some no-longer-used drawing code (the Draw() routines
are only used for printing with the modern eeschema canvas in place).
2019-04-04 12:08:33 +01:00
Jeff Young 81d4a45e73 Ignore BRIGHTENED state when printing.
Fixes: lp:1788480
* https://bugs.launchpad.net/kicad/+bug/1788480
2019-04-01 13:23:37 +01:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
Seth Hillbrand 8d777dd5c3 eeschema: Take stroke thickness into account
Spacing text for plotters uses the thickness of text for two separate
classes.  This sets the thickness in the EDA_TEXT class as well to allow
the multiple line positions to be correctly set

Fixes: lp:1799605
* https://bugs.launchpad.net/kicad/+bug/1799605
2019-01-25 14:22:19 -08:00
Jeff Young e715835c29 Copy dangling flag when cloning.
Fixes: lp:1804005
* https://bugs.launchpad.net/kicad/+bug/1804005
2018-11-19 19:07:40 +00:00
Jeff Young 4030eec939 Implement proper dangling end handling for block moves.
(Most of this is actually fixing the IsDanglingStateChanged() to
correctly indicate that it *updates* the dangling state, not just
tests it.)
2018-10-30 11:33:49 +00:00
Jeff Young 1baa904034 Dangling symbol fixes.
No dangling symbol for text items with a NO-CONNECT.
DanglingStateChanged doesn't work with dangling flag aggregators
(which return true if any child is dangling).
Then again, we don't actually use any of the aggregators anyway
so I removed them.

Fixes: lp:1799589
* https://bugs.launchpad.net/kicad/+bug/1799589
2018-10-24 23:51:18 +01:00
Jeff Young 0af31e1bf0 Fix CLangTidy warnings and improve SNR. 2018-10-09 11:08:56 +01:00
Jeff Young a67d8c60df Fix text size measurement.
5.0 doesn't set the GAL's line width.  It gets away with this since
it's using the same GAL to measure as to set up the drawing, so
the width happens to be set correctly for other reasons.  5.1 uses
a separate GAL and so isn't so lucky.
2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young b99ea159c8 Rationalize select menu texts.
Be consistent with order, formatting, etc.
Remove debug stuff such as zone timestamp and net code.
Clean up misleading pad messages.

(cherry picked from commit 2132109)
2018-07-17 15:09:48 +01:00
Jeff Young 3be876c388 Cleanup of trace logs from Simon Richter. 2018-04-17 17:27:18 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 795a36c9fe Fix code after renaming files, and a bit of code cleanup (remove useless includes and multiple includes of the same files) 2018-01-30 09:57:25 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
Maciej Suminski 2ed19668cd Eeschema: removed protos.h
Contained duplicated function declarations with invalid comments.
2017-11-21 23:18:55 +01:00
Wayne Stambaugh a0473614b5 Remove all schematic object load and save code.
All of the schematic object load and save code is implemented in the
legacy schematic plugin so it is no longer required.

Remove unused file with old schematic file loader.

Doxygen comment cleaning.
2017-11-18 08:53:13 -05:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Dick Hollenbeck d0c46a81d9 SCH_TEXT::SwapData() was not swapping m_shape, causing abandoned drag to distort pinsheet.
Fixes: lp:1659683
* https://bugs.launchpad.net/kicad/+bug/1659683
2017-01-27 16:44:24 -05:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
Nox_firegalaxy 44b8533d4d Add connection highlight to eeschema, step 1. 2016-11-16 11:07:02 +01:00
Maciej Suminski 9748b65a6d str[n]icmp -> str[n]casecmp 2016-08-11 14:41:06 +02:00
unknown 698197ec8d Eeschema: better position of texts (pin texts and labels), taking in account the line thickness. 2016-04-16 09:49:17 +02:00
jean-pierre charras 92ce9c1193 Rework on class EDA_TEXT and related classes and draw text functions. More work: remove useless or duplicate code (from legacy graphic text plot functions). Move basic_gal code to separate files. 2016-03-25 09:26:11 +01:00