Commit Graph

83 Commits

Author SHA1 Message Date
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
jean-pierre charras bc699c8d8f Rework on class EDA_TEXT and related classes and draw functions. More work. Eechema: in rotate texts: redraw the full screen to avoid garbage on screen. 2016-03-23 13:16:27 +01:00
jean-pierre charras 8522b0deb7 Rename enum TypeSheetLabel to PINSHEETLABEL_SHAPE (Better name, and in accordance with our coding style policy) 2016-02-28 19:16:59 +01:00
unknown 4b103baa3a Enum refactoring and shiny icons in dialog_lib_edit_pin_table 2016-02-28 18:33:29 +01:00
jean-pierre charras 94479d87c1 eeschema: fix minor Bug #1446779 (repeat parameters not initialized until a project config is read)
Now these parameters are stored in user config, not project config ( they are not really related to a given project, they are just a setup during an edition),
and the schematic editor and the component editor have now separate parameters, because they are separate editors with different constraints.
component editor: repeat pin enhancement (from and idea of Edward Johns)
2015-04-22 13:39:00 +02:00
jean-pierre charras 4bab8dde65 Fix some minor coverity warnings. Fix a bug in pcad2kicad plugin. Scripting: map BASE_SET. Rename some python bom scripts with better names. Fix erroneous comments and add comments 2015-03-02 09:28:49 +01:00
jean-pierre charras 00f8994ee1 Eeschema: Fix a (minor but annoying) bug detected by coverity which prevent Eeschema to draw components in "fast mode" (i;e. without pin texts) when they are moved, due to a draw parameter which was incorrectly used.
Move items rework: enhancements: for some items (sheets, components, bus entries) the mouse cursor is no more wrapped to the anchor. For large symbols, this is better: they are more easy to place.
There is also a change when starting a move item command: the full screen is redraw, and therefore there is no artifact due to the XOR draw mode.
Some other minor coverity fixes (uninitialized members).
2015-02-28 17:56:09 +01:00
jean-pierre charras c6f4f15926 Eeschema: Minor code reorganization:
* move not shared files (sch_item_struct.*, sch_base_frame.h) to eeschema;
* move wxEeschemaStruct.h to eeschema and rename it schframe.h to be consistent with the other corresponding file name schframe.cpp;
* remove few not needed  #include
2015-02-21 10:46:44 +01:00
Lorenzo Marcantonio 260ca0e79f Added support for decoupling stored text from shown text in EDA_TEXT
Factored out text ellipsing support to max 15 character (for generating menu items)
2014-09-13 20:15:45 +02:00
Lorenzo Marcantonio 6d17ad712c Made the project default text size apply to all text things in eeschema, instead of the hardcoded value 2014-05-16 15:57:53 +02:00
jean-pierre charras f905b4697e Code cleanup: Pcbnew: move files relative to exort functions to the new folder exporters
all: remove include <protos.h>  from a lot of  files which do not need it.
2014-01-08 15:18:51 +01:00
jean-pierre charras cf7dbf6f94 Fix some minor issues 2013-11-18 18:52:18 +01:00
Dick Hollenbeck c0832a0342 BUG FIX: eeschema as segfaulting on the 'Insert' key because the m_itemToRepeat
was simply a pointer to an object on the display list.  At times this object
would disappear from the display list, in the test case because of a concatonation
of two wires, and if you then tried to clone the non-existent object you'd get a 
crash.  This was not merely a bug, but a naive design choice. IMO.
Now the item to repeat is cloned, so will never also be on the display list.
2013-08-05 16:02:41 -05:00
Dick Hollenbeck efb34166ea *) retain grid origin in the BOARD and save it in legacy and kicad board files.
*) add hotkey for setting the grid origin as 'S', in board editor, module editor.
*) re-position the function interface for cursor movement from BASE_SCREEN into
   class EDA_DRAW_FRAME.  This is a prelude to getting rid of BASE_SCREEN or
   splitting it up.
2013-08-03 00:15:23 -05:00
Lorenzo Marcantonio 3b1ddd952f Removed the SAFE_DELETE macro.
In most case the assignment to null was not necessary since it was easily provable that the (local) variable wouldn't have referenced after that anyway.
2013-04-28 16:28:13 +02:00
Wayne Stambaugh 7d0ec1a138 More encapsulation work.
* Complete encapsulation of the MODULE class.
* Complete encapsulation of the EDA_TEXT class.
* Encapsulate most of the ZONE_CONTAINER class.
* Add pcbcommon library as a dependency for reSWIGging the scripting
  support.  This should cover most dependency cases.
2013-03-18 15:36:07 -04:00
jean-pierre charras 5d5a50dde9 Eeschema: fix a bug which crashes Eeschema (when a label is being created, and its type is changed by popup menu, for instance to a text, before it was put on schematic)
remove unused file and minor coding style fix
2013-01-25 18:29:54 +01:00
jean-pierre charras 143af26952 Eeschema: code cleanup, remove dead code and some global and useless variables 2012-09-28 19:47:41 +02:00
jean-pierre charras 3b56ea6732 Eeschema: fix crash when changing a label type to a global label during creation.
Pcbnew: code cleaning in polygons
2012-08-02 15:23:53 +02:00
Wayne Stambaugh aaa1cc3e02 Eeschema object list and other minor improvements.
* Convert Eeschema from manually linked list to DLIST for storing
  SCH_ITEM objects.
* Add helper functions to SCH_SCREEN for appending list of SCH_ITEM
  objects.
* Fix bug in wire editing code for accurate undo/redo behavior.
* Add member to DLIST to append another DLIST.
* Other minor code cleaning.
2012-02-26 13:39:39 -05:00
jean-pierre charras 08ef741770 Undo redo change and code cleanup. 2012-02-05 14:02:46 +01:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
Wayne Stambaugh 1047e60e35 Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00
Wayne Stambaugh 6a4e8aa909 Eeschema schematic item move code unification.
* Add get and set position methods to all schematic items.
* Encapsulate schematic item position members.
* Add swap data method to schematic items that lacked one.
* Remove global swap data function used by undo and redo functions.
* Unify as many schematic move methods as possible.
* Remove unnecessary place schematic item methods.
* All schematic items are now moved in the same event handler.
* Fixed bug in hierarchical sheet get menu item string method.
* Make no connect and junction items movable, fixes lp:804048
2011-10-19 16:32:21 -04:00
Wayne Stambaugh d4fb921b43 Eeschema ERC improvements and other minor fixes.
* Move the hierarchical label connected test into the NETLIST_OBJECT class.
* ERC pin type strings can now be translated.
* Remove unused EDA_DRAW_PANEL attribute from all ERC test functions.
* Add get marker count method to SCH_SCREENS object.
* Redundant header removal.
* Lots of coding style policy fixes.
2011-10-07 10:41:30 -04:00
jean-pierre charras f0f2a4cf9b Eeschema: fix bug when aborting a move label or text. 2011-09-08 08:39:14 +02:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
jean-pierre charras 2b216bcc39 * Add Fabrizio Tappero <fabrizio-dot-tappero[at]gmail-dot-com> in contribuotors list.
Eeschema:
 *   Graphic texts ans labels: fix fully broken undo/redo code relative to the way undo/redo command
 *   handles changes (maintly move) for labels
 *   Fix minor bug for undo command relative to block rotate
 *   Remove dead code.
 *   Add new class BITMAP_BASE, and (for Eeschema) SCH_BITMAP to handle bitmap images in schematic.
      Remember plot Bitmaps in not possble with all plotters.
2011-09-01 18:31:16 +02:00
jean-pierre charras 4402c97c7a Eeschema: Fix a subtle bug in undo command when editing texts and labels.
Add a new schematic item: SCH_BITMAP. One can insert now images in a schematic.
Add Fabrizio Tappero as contributor  in Kicad About dialog
2011-08-31 16:59:20 +02:00
jean-pierre charras d76cd0cf2c Very minor fixes. 2011-07-03 20:51:07 +02:00
jean-pierre charras 3ea0c1065c Eeschema: fix a bug I created in commit 3018 2011-06-16 21:52:12 +02:00
jean-pierre charras 94372b81e5 Eeschema: fix bug 783535. Minor code cleaning.
Pcbnew: fix very minor issue.
2011-05-16 21:32:57 +02:00
Wayne Stambaugh df8f7d1ee0 EESchema remove global variable and fix text object change type undo/redo.
* Move undo item copy global variable into schematic editor frame object
  member variable.
* Add helper methods for accessing the undo item copy member variable.
* Fix undetected bug when changing a text type.
* Added an exchange command to the undo/redo base class for handling undoing
  a changed item type which cannot be undone by swapping out the variables.
* Revert change to common/hotkeys_basic.cpp that broke hot key behavior.
* Lots of coding policy changes while making the changes above.
2011-04-05 10:46:51 -04:00
Wayne Stambaugh 175fab48f8 EESchema multiple item hit testing and other minor improvements.
* Add item clarification context menu to EESchema when multiple unresolved
  items are found at the current cross hair position.
* Add collector class SCH_COLLECTOR for supporting multiple item hit testing.
* Removed bit wise masked filtering from schematic item hit testing.
* Removed all old hit testing functions and methods scattered about the
  EESchema source code.
* Move terminal point test function into SCH_SCREEN object.
* Fixed bug in terminal point test when terminating a bus to a label.
* Define the < operator for sorting schematic items.
* Add area calculation method to EDA_Rect item.
* Add method for returning an item's bitmap for menu display purposes.
* Add method for returning an item's menu text for menu display purposes.
* Changed EDA_ITEMS container from boost::ptr_vector to std::vector.
* Factor coordinate string conversion code from EDA_DRAW_FRAME to function
  CoordinateToString().
2011-03-25 15:16:05 -04:00
Wayne Stambaugh c07b677a20 Schematic editor locate item changes and other minor fixes.
* Move locate function code into schematic screen object.
* Move test for junction needed into schematic screen object.
* Move test for marking connected items into schematic screen object.
* Move delete item function code into schematic screen object.
* Move delete all markers code into schematic screen object.
* Add method for locating multiple items in schematic screen object.
* Fix minor bug in schematic field object hit test declaration.
* Initial encapsulation work on item picker object.
* Remove duplicate doxygen comments from item picker object source file.
2011-03-10 14:36:30 -05:00
Wayne Stambaugh 9e0e43e4c1 EESchema and other minor code improvements.
* Change EDA_ITEM set flag function to set flag bits using logical or
  instead of assignment.
* Add clear flag function to EDA_ITEM to clear flag bit using inverted
  logical and.
* Factor change schematic text type code out of switch statement into
  a single function call.
* Schematic text orientation function renaming improvements.
* Lots of small coding policy changes to updated files.
2011-03-02 20:58:12 -05:00
Wayne Stambaugh bdca3c5efb All control state handling is now performed in wxUpdateUIEvent handlers.
* Old control state handling code completely removed in all applications.
* Factor common control state handlers into EDA_DRAW_FRAME.
* Replaced EDA_ITEM test for newness with IsNew() method.
* Factor vertical right toolbar command handlers out of giant edit command
  switch statement in EESchema and PCBNew.
2011-02-21 08:54:29 -05:00
Wayne Stambaugh 7b8b51b240 Draw panel object refactoring and other minor code cleaning.
* Rename all member variables and methods that reference the cross hair
  code in draw panel object from cursor to cross hair to eliminate confusion
  between the two concepts.
* Rename cursor capture call backs in draw panel object to improve code
  readability.
* Create helper class for turning off the cross hair while drawing.
* Remove redundant block clear code.
* Remove redundant mouse capture call back reset code when end capture
  call back is called.
* Remove unused function definitions in base draw frame object.
* Lots of minor coding policy and doxygen comment fixes.
2011-02-11 15:48:13 -05:00
Wayne Stambaugh 50f063da07 Changes to use cursor position as parameter and snap to grid settings.
* Changed managed cursor callback definition to include the current
  cursor drawing position.
* Modified all managed cursor callbacks to match new definition.
* Added snap to grid option to base drawing frame object.
* Changed add no connect managed cursor callback to use new position
  parameter instead of the stored one.
* Lots of coding policy fixes.
2011-02-03 14:27:28 -05:00
jean-pierre charras 4f3708c13f Eeschema: bug 706677 fixed (delete connection, junction persist).
This was due to a duplicate constants ( with sligtly different values)  used to select items in some seach functions that broke filtering. Old definitions removed.
2011-01-25 15:06:17 +01:00
Wayne Stambaugh 73e38ce98c EESchema code refactoring and coding policy naming fixes.
* Move schematic wire and bus break code into schematic screen object.
* Move schematic test for dangling ends into schematic screen object.
* Remove left over debugging output in schematic screen object.
* Remove unused file eeschema/cleanup.cpp.
* Fix bug in schematic line object hit test algorithm.
* Fix a string concatenation compile error added in r2752.
* Rename class WinEDA_BasicFrame to EDA_BASE_FRAME.
* Rename class WinEDA_DrawFrame to EDA_DRAW_FRAME.
* Rename class WinEDA_DrawPanel to EDA_DRAW_PANEL.
2011-01-21 14:30:59 -05:00
Wayne Stambaugh f9af593ee3 Minor EESchema improvements.
* Rename sch_item files to sch_junction.
* Make global variable g_ItemToRepeat a private member of SCH_EDIT_FRAME
  object.
* Encapsulate SCH_SCREEN reference count member.
2011-01-12 16:47:54 -05:00
Wayne Stambaugh a3a73ef5dd EESchema block code cleaning and other minor fixes.
* Move update block pick list code to SCH_SCREEN object.
* Remove redundant drawing function RedrawOneStruct().
* Change context menu text "Noconn" to "No Connect".
* Change context menu text "GLabel" to "Global Label".
2011-01-10 11:50:40 -05:00
Wayne Stambaugh b98538ec35 Add copy constructors and cloning to schematic objects and other minor fixes. 2010-12-21 10:13:09 -05:00
Wayne Stambaugh adb4ad1a7b Schematic object improvements and other minor fixes. 2010-12-10 14:47:44 -05:00
Wayne Stambaugh c79077c9a2 Minor fixes and lots of coding policy changes. 2010-12-08 15:12:46 -05:00
jean-pierre charras 8e0937e6a2 Pcbnew: code cleaning, dialogs converted from Dialogblocks to wxFormBuilder, file housekeeping. Add patch from Manveru. 2010-11-27 14:09:18 +01:00
jean-pierre charras 6963001a00 Fix very minor bugs. Boost update. Pcbnew: files housekeeping and code cleanup. 2010-11-26 12:55:34 +01:00
Wayne Stambaugh 37ad67dfb1 EESchema file name and location house keeping. 2010-11-11 16:10:27 -05:00