Commit Graph

23 Commits

Author SHA1 Message Date
Dick Hollenbeck e24990146d Pcbnew: major swig fix.
* Switched hashtables.h over to std::undordered_map from boost version.

* Added new macros DECL_VEC_FOR_SWIG() and DECL_MAP_FOR_SWIG() in macros.h.
  These along with future DECL_HASH_FOR_SWIG() unify the declaration to swig
  and C++ so that the resultant type name is common in both languages, and
  the types AGREE.

* Fixed swigging of NETINFO_ITEM and NETINFO_LIST via magic.

* Newly exposed (python wrapped) are: D_PADS, TRACKS (was TRACK_PTRS),
  NETNAME_MAP, NETCODE_MAP, wxString (without constructor purposely, read
  comment in wx.i), MARKERS, ZONE_CONTAINERS, NETCLASSPTR, KICAD_T types.

* std::vector<SOMETHING*> tends to end up named SOMETHINGS in C++ and python.
  Having the name consistent between like types is helpful, and between
  languages.  std::map<> ends up as SOMETHING_MAP.

* NETINFO_LIST::m_netNames and NETINFO_LIST::m_netCodes are now std::map
  instead of hashtables, because swig does not yet support std::unordered_map.

* You can now get to any netclass or net info.   NETNAMES_MAP and NETCODES_MAP
  are traversable basically the same as a python dictionary using a python
  string (not wsString) as the key!  The wxString typemap converts python
  string to wxString before the lookup happens.  Iteration also works.
2016-07-18 13:23:09 -04:00
Dick Hollenbeck c2b8a4ee43 Move from class INSPECTOR as the EDA_ITEM::Visit() callback interface to a std::function
callback.  This improves conciseness and encourages use of Visit() due to the lower cost
of entry in C++.
2016-07-12 15:05:54 -04:00
jean-pierre charras f743b98844 Try to fix Bug #1431391 (Unable to edit pins in Schematic library editor). It happens on XFCE, but also on Unity. This fix works on Unity. (it is due to the fact the dialog is not raised, for an unknown reason, and this bug depend on the way Eeschema and Libedit are run).
Add Ctrl+E hotkey in eeschema to edit a component with Libedit (similar to pcbnew Ctrl+E hotkey)
As usual, fix a few minor coverity warnings
2015-03-14 12:50:39 +01:00
Maciej Suminski 4fb9bce354 Code formatting. 2015-02-18 17:53:46 +01:00
Tomasz Włostowski da8e9e9bee added Remove() and CountTypes() methods in COLLECTOR class 2015-02-18 00:36:27 +01:00
Dick Hollenbeck 7e483f69bd Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
     get disassociated from their true PROJECT.
  *) Allow loading eeschema library editor from kicad.exe
  *) Allow loading pcbnew library editor from kicad.exe
  *) Rename LIB_COMPONENT to LIB_PART.
  *) Add class PART_LIBS, and PART_LIB.
  *) Make PART_LIBS non-global, i.e. PROJECT specific.
  *) Implement "data on demand" for PART_LIBS
  *) Implement "data on demand" for schematic SEARCH_STACK.
  *) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
  *) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
     a weak pointer.
  *) Remove all chdir() calls so projects don't need to be CWD.
  *) Romove APPEND support from OpenProjectFiles().
  *) Make OpenProjectFiles() robust, even for creating new projects.
  *) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
     and save them in the .eeschema config file, not in the project file.
  *) Fix bug with wxDir() while accessing protected dirs in kicad.exe
  *) Consolidate template copying into PROJECT class, not in kicad.exe source.
  *) Generally untangle eeschema, making its libraries not global but rather
     held in the PROJECT.
2014-08-13 15:28:54 -05:00
Lorenzo Marcantonio 925774760c Rationalize numeric time stamps to type time_t. 2012-05-24 21:52:04 -04: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
jean-pierre charras bcbde5d813 All: fix a collision name between accessor function GetTimeStamp and GetTimeStamp in common.cpp.
In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
2011-12-07 16:49:32 +01:00
Wayne Stambaugh d9e0ab0241 Improve Eeschema find code and add initial replace plumbing.
* Replace Eeschema find code with a collector based implementation.
* Fixed a search bug when all subsequent searches of an item would ignore
  the remaining valid child items when an item had more than one child
  item that matched the search criteria.
* Add SCH_FIND_COLLECTOR class to find all items that meet the specified
  search criteria.
* Add SCH_FIND_COLLECT0R_DATA to keep track of information for all matching
  items.
* Use collector to iterate over the list of items that match the search
  criteria rather than trying to start at the last matched item.
* Remove unused searching methods from sheet path and sheet path list
  objects.
* Add replace and replace all functionality to Eeschema find dialog.
* Push matching methods down to EDA_ITEM class so they can be used by
  other derived objects.
* Add method to EDA_ITEM to test if item supports replacing.
* Add flag to find/replace data to support replace feature.
* Disable wild card matching check box when dialog is in replace mode as
  wild card replacement is not supported at this time.
* The usual Doxygen comment and coding policy fixes.
2011-12-01 11:49:28 -05:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* Correct all user strings and comments for the correct capitalization of
  application names according to JP.  They are KiCad, Pcbnew, CvPcb,
  Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
2011-09-30 14:15:37 -04:00
Wayne Stambaugh 67f70fe079 Coding style and Doxygen comment fixes.
* Rename EDA_Rect class to EDA_RECT.
* Rename EDA_TextStruct class to EDA_TEXT.
* Remove duplicate Doxygen comments from sch_sheet_path.cpp.
2011-03-29 15:33:07 -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 c79077c9a2 Minor fixes and lots of coding policy changes. 2010-12-08 15:12:46 -05:00
stambaughw d2eac37ddf Comment translation complete, Yeah!!!! 2009-11-23 20:18:47 +00:00
dickelbeck 48dc3d0695 COLLECTOR::BasePtr() 2008-01-25 15:13:57 +00:00
dickelbeck 324fd9ac64 copyright change 2008-01-22 20:34:32 +00:00
dickelbeck b707a8336f OnLeftClick() test case 2007-09-26 20:10:12 +00:00
dickelbeck 64f12ffe5d gerberview & pcbnew fixes 2007-09-25 15:10:01 +00:00
CHARRAS 5e448ec475 pcbnew: locate zones added (forgotten in new PcbGeneralLocateAndDisplay() ); Add class_board_item.cpp 2007-09-25 08:23:53 +00:00
dickelbeck 726a8ab4df collector work 2007-08-30 22:20:52 +00:00
dickelbeck 2e13ccf048 see change_log.txt's 2007-Aug-23 UPDATE 2007-08-24 03:40:04 +00:00
dickelbeck cc62305777 see change_log.txt for 2007-Aug-22 2007-08-23 04:28:46 +00:00