Commit Graph

25 Commits

Author SHA1 Message Date
Jeff Young 74acb76e7f Switch UNIT_BINDER and DIALOG_SHIM to local units.
The general idea is to support user-units inheritance.  The
UNIT_BINDER allows wrapped controls to inherit units from their
parent dialog, while KEYWAY_HOLDER and DIALOG_SHIM allow child
KEYWAY_HOLDERs or DIALOG_SHIMs to inherit units from their
parent.

The GetUserUnits() method signature has to move to KEYWAY_HOLDER
rather than KEYWAY_PLAYER (where it makes more sense) as it’s the
only common ancestor of KEYWAY_PLAYER and DIALOG_SHIM.

As long as we'll be using the UNIT_BINDER more widely, it also
makes sense to move evaluation and validation into it.

This commit also provides eeschema’s DIALOG_LABEL_EDITOR and
pcbnew’s DIALOG_TRACK_VIA_PROPERTIES and DIALOG_SET_GRID as
models of how to use the new user-units inheritance, eval, and
validation.

Fixes: lp:593795
* https://bugs.launchpad.net/kicad/+bug/593795

(cherry picked from commit c8bc53e)
2018-07-17 15:09:53 +01:00
Jeff Young a1ef5401f4 More platform-standard presentation of DRC dialog.
Also makes better use of space to significantly increase number
of markers shown.

Fixes: lp:1748676
* https://bugs.launchpad.net/kicad/+bug/1748676

(cherry picked from commit a1d8097)
2018-07-17 15:09:46 +01:00
Jeff Young 3e190cee4b Implement selection brightening for DRC.
The old item pointers (which aren't safe to keep around) were
removed in favour of opaque references (void*) which are then
compared against existing items when needed.

Also improves brightening by brightening the whole footprint
(ie: its pads, drawings, reference and value) rather than just
its target cross.

(cherry picked from commit 30e90b0)
2018-07-17 15:09:40 +01:00
Jeff Young e9d877914d Dialog consistency and beautification.
Small icons for dialog browse, refresh, and row operations.
Icons in B&W so they don't over-emphasize with respect to other
controls in the dialog.

Layout cleanup for consistency.  Removal of the blank space to
left of the fields list in the Global Fields Editor, and addition
of column-sizing-to-list-width.

More even spacing for buttons in html report panel.

Honor platform conventions for action button order and layout.

Move netlist importer to update-pcb-from-schematic algorithm
(display messages and then update instead of "dry run" checkbox)

(cherry picked from commit b21e19d)
2018-07-17 15:09:01 +01:00
jean-pierre charras 5d72aebd22 Fix code after renaming files 2018-01-29 16:40:22 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras 4b010ca129 Fix useless trailing and leading spaces in a few messages. Fix also capitalization in a few menus. 2017-10-02 09:25:48 +02:00
jean-pierre charras cf5bae7fbf Fix a few doxygen warnings 2017-06-17 10:40:38 +02:00
jean-pierre charras b365f17e9f First draft of courtyard overlap detection. 2017-03-19 20:27:44 +01:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Dick Hollenbeck 2adfb09d0e Pcbnew: display unconnected net count in DRC dialog. 2016-09-08 14:17:37 -04:00
jean-pierre charras 62bf20271b Pcbnew, dialog plot: add a button (Run DRC) to run the DRC from the plot dialog. 2016-07-27 14:53:45 +02:00
jean-pierre charras 3f2b15711c Fix bug: DRC report to File crashes Pcbnew, if the file cannot be created (for instance if the CWD is not writable, or if the path does not exist)
Fix also an other issue: if the file path is not entered, the file is now created in the current project directory.
2016-06-15 19:00:30 +02:00
jean-pierre charras bcd345c29f Fix issues in dialog drc: because it is not modal, DRC parameters and unit selection can be modified outside the dialog, still opened. Now, the new parameters are taken in account.
Fixa also a corner case which crashes Pcbnew: if the dialog is opened, and the board was  changed (reloaded, cleared),  pcbnew crashed because many pointers stored in dialog  become invalid. Now the dialog is just closed.
2016-04-15 20:15:22 +02:00
unknown c3e3ff3682 Minot fixes: Minor coding style issues fix (tab -> spaces). Add missing GetClass to all classes derived from EDA_ITEM. Make debug method Show() only compiled in debug mode. 2015-03-06 09:58:32 +01:00
jean-pierre charras 335f5a57e5 Pcbnew: fix an issue with very old .brd files. 2014-06-06 12:30:07 +02:00
jean-pierre charras 1886082fce Eeschema: Erc dialog: enhancement. Now not modal.
Pcbnew: Drc dialog: fix a old very minor bug.
Added: single click on an item in marker list moves the board  graphic cursor on the corresponding marker location on the board
Double clicking is not modified.
2012-12-10 20:08:09 +01:00
jean-pierre charras 7c0af1bf9d More dialogs derived from DIALO_SHIM 2012-10-04 08:57:15 +02:00
jean-pierre charras bae892dfe5 Pcbnew: make all dialogs derived from DIALOG_SHIM. 2012-10-03 13:25:30 +02:00
jean-pierre charras 7fd24c7f03 Very minor fixes. 2012-08-03 17:43:15 +02: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
Dick Hollenbeck b26580d5df ++PCBNew
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes
    having a BOARD being edited by more than one editor, it was a bad design.
    And this meant removing m_PcbFrame from BOARD.
  * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame
  * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp
  * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance
  * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed,
    such as dialog_mask_clearance, dialog_drc, etc.
  * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it
    with build_version.h's #define BOARD_FILE_VERSION, although there may be a
    better place for this constant.
  * Made the public functions in PARAM_CFG_ARRAY be type const.
    void SaveParam(..) const and void ReadParam(..) const
  * PARAM_CFG_BASE now has virtual destructor since we have various way of
    destroying the derived class and boost::ptr_vector must be told about this.
  * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use
    an automatic PARAM_CFG_ARRAY which is on the stack.\
  * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array,
    since it has to access the current BOARD and the BOARD can change.
    Remember BOARD_DESIGN_SETTINGS are now in the BOARD.
  * Made the m_BoundingBox member private, this was a brutally hard task,
    and indicative of the lack of commitment to accessors and object oriented
    design on the part of KiCad developers.  We must do better.
    Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox().
  * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
2011-12-05 00:15:33 -06:00
Wayne Stambaugh edd35b4e90 PCB common library header rationalization.
* All header files used to create the PCB common library now compile as
  stand alone code.  This prevents the need to define them in a specific
  order to make source code compile properly.  It should also now be
  possible to relocate the source code to build the common PCB library
  to a separate folder.
2011-09-23 09:57:12 -04:00
Wayne Stambaugh 1010601a78 PCBNew control update bug fixes, fixes lp:725963.
* Fix grid select box update bug on context menu.
* Fix via size and track width select box update bugs.
* Fix layer pair indicator button update bug.
* Fix auto track width tool bar control enable bug.
* Fix via size and track width select status bug in context menu.
* Fix layer select box and layer control widget select bug when current
  layer is removed.
* Add virtual function to notify objects derived from EDA_DRAW_FRAME that
  the units setting has changed.
* Coding policy class naming fixes.
2011-03-01 14:26:17 -05:00
jean-pierre charras cdd9e8cabe Pcbnew: code cleanup 2010-11-26 18:47:35 +01:00
Renamed from pcbnew/dialog_drc.h (Browse further)