← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] eeschema new tool/feature: Component spreadsheet tool

 

Le 08/11/2016 à 01:29, Dino Ghilardi a écrit :
> Hello everyone,
> 
> Thanks for the comments on this tool and the video.
> 
> Attached there is the first patch for the 'component spreadsheet' tool (probably the temporary name
> for this "table based design entry", as points out Clemens).
> 
> Once the spreadsheet view is visible is possible to:
> -Filter on fields to display only some groups of components using regular expressions or simpler
> buttons/searches (right click a cell and from the popup menu select "Edit Field").
> -Set a column filter to a cell value using a popup menu (right click on a cell) (example: filter all
> the 100nF capacitors at once)
> -Hide a column (right click on a column and select 'hide column')
> -Move a column (click on the column label at the top and drag it)
> -Edit a single field directly in the spreadsheet (i.e. it is possible to manually annotate the
> schematic from that window)
> -Clicking on a row or a cell the cursor in the schematic window goes to the component/sheet of the
> clicked component.
> -Selecting cells means 'select the components' and the right-click-popup menu allows to copy the
> field under cursor to selected components
> -Selecting cells means 'select the components' and the right-click-popup menu allows to delete the
> field under cursor in selected components (this may change in the future since the deleted field is
> now the one under the cursor and the 'delgcc (Debian 4.9.2-10) 4.9.2ete' function does not clear the
> selected cells but the clicked field on the components selected (or not? can have sense not to
> delete the field but just make it empty?).
> -The operations made in the spreadsheet can be undone using the UNDO function in the schematic frame
> window (either icon or menu)
> -If the cells are purple means the field does not exist for that component. To add the field and
> fill it just click on the cell and insert the text.
> 
> 
> The patch is usable, but there are still some points to improve (and some annoyances to get rid of):
> 
> -UNDO: sometimes the 'undo' command in the schematic is grayed-out (it re-appears if the current
> sheet is changed to another sheet), I'm looking for a workaround for this that does not force me to
> add a 'undo' button in the spreadsheet that could confuse the user.
> -Enable CTRL-Z on the spreadsheet window for the UNDO function (and discover if CTRL-Z is portable
> before doing something that works only on my OS)
> -Right click popup menu allows also to delete a field content. Since empty fields are illegal in the
> main edit window, so the code to remove the empty field if it is not one of the default fields is
> still to be written (or empty fields should become legal in other edit windows too).
> -Stabilize the tool and write a little bit of documentation on its use to add to the users manual
> with also some tips on regular expressions.
> -re-read the code and get rid of debug messages on std::cout
> 
> See the file eeschema/compo_spreadsheet/compo_spreadsheet_frame.cpp for the 'TODO' list, known
> bugs-annoyances in this version and for the 'checklist' I used to test the function.
> 
> Also there are some points I will work on in the next days, as the Doxygen comments in the headers
> still do not conform to the coding style: I used the compact form, I'll change (or delete them) in
> the next days.
> At this point most of the work is in the 'compo_spreadsheet_frame.cpp' file (I did not want to
> spread code in too many files at this point), but a part of that will be moved in the future to the
> corresponding class files.
> 
> Anyway I send the patch so that it can be tested/analyzed to understand where to make it better and
> to let Orson look at the code to see if some parts can be reused (but I'm not sure on this since the
> component spreadsheet just edits the SCH_COMPONENT fields and at the moment the code is not very
> 'generic', but who knows...
> 
> The patch has been compiled and tested on Linux (debian 8.6 (jessie), wxWidgets 3.0.2+b1, gcc
> version: gcc (Debian 4.9.2-10) 4.9.2)
> 
> Bye, Dino.
> 

Hi Dino,

Have you a more recent version of your tool, including a few enhancements you have listed?
This tool is very interesting (although there are some issues to fix in code, especially wxFrames
are used instead wxDialogs).

Orson, have you looked into this patch?
Even if you are working on something like a parametric editor, this specialized tool could be an
interesting feature.

-- 
Jean-Pierre CHARRAS


Follow ups

References