kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28910
Re: [PATCH] Add footprint select dropdown to component chooser, serious refactoring
Oops, I guess I didn't pay enough attention updating the patch. :\
On Thu, Mar 23, 2017 at 07:02:59PM -0400, Wayne Stambaugh wrote:
> Chris,
>
> I got the following build error with the latest patch on windows
> (msys2/mingw32):
>
> E:/msys64/home/Wayne/src/kicad-lp-clone/eeschema/dialogs/dialog_choose_component.h:104:5:
> error: 'DIALOG_CHOOSE_COMPONENT::~DIALOG_CHOOSE_COMPONENT()' cannot be
> overloaded
> ~DIALOG_CHOOSE_COMPONENT();
> ^
> E:/msys64/home/Wayne/src/kicad-lp-clone/eeschema/dialogs/dialog_choose_component.h:102:5:
> error: with 'DIALOG_CHOOSE_COMPONENT::~DIALOG_CHOOSE_COMPONENT()'
> ~DIALOG_CHOOSE_COMPONENT();
> ^
>
> I checked the header and sure enough, ~DIALOG_CHOOSE_COMPONENT() is
> defined twice. I deleted the duplicate dtor and it compiled. I'll try
> to do some testing tomorrow.
>
> Thanks,
>
> Wayne
>
> On 3/23/2017 3:22 PM, Chris Pavlina wrote:
> > Hi again,
> >
> > Updated patch unless this doesn't apply cleanly anymore after b47a6e4
> >
> >
> > On Wed, Mar 22, 2017 at 09:09:01PM -0400, Chris Pavlina wrote:
> >> Hi,
> >>
> >> Footprint selection in the component chooser is now working - here is a
> >> patch. I'd like to merge this, but it required serious refactoring to
> >> make everything work cleanly, so I'm posting to the list. Wayne, please
> >> have a look when you get a chance.
> >>
> >> There are a couple known issues, but IMO they aren't merge-stoppers. The
> >> sooner I get this merged the sooner I can get actual feedback, and the
> >> smoother integration of any changes that are made can be.
> >>
> >> Here's a summary (yes, the *summary* is big):
> >>
> >> - DIALOG_CHOOSE_COMPONENT changes:
> >> + Add FOOTPRINT_SELECT_WIDGET.
> >> + Add support for DIALOG_CHOOSE_COMPONENT to pass arbitrary field value
> >> overrides to the caller. This is of course to allow setting the footprint;
> >> in the future it could be used to allow more field edits.
> >> + Add an option to hide everything that can edit fields, for use when
> >> that doesn't make sense (libedit, etc).
> >>
> >> - Add FOOTPRINT_SELECT_WIDGET
> >> This is an adapter widget that combines into one FOOTPRINT_CHOICE view:
> >> + Footprint listings from FOOTPRINT_LIST
> >> + Filtering from FOOTPRINT_FILTER
> >> + Loading progress display from FOOTPRINT_ASYNC_LOADER and wxGauge
> >>
> >> It presents as a status progress bar that transforms in-place to a selection
> >> dropdown when the footprints finish loading. The GUI remains fully interactive
> >> as the footprints load; the user can even exit and reopen the dialog and it
> >> will continue to load in the background.
> >>
> >> - Add FOOTPRINT_CHOICE widget
> >> This is a customized wxComboCtrl with some extra features:
> >> + Greying out of library name for readability
> >> + List separators
> >>
> >> - Add FOOTPRINT_FILTER class
> >> Provides a reusable filtered view of a FOOTPRINT_LIST, fully iterable
> >>
> >> + Make cvpcb use FOOTPRINT_FILTER instead of providing its own filter
> >> code.
> >>
> >> - Seriously rework FOOTPRINT_INFO
> >> + Add partially asynchronous loading via the new FP_LIB_TABLE::PrefetchLib.
> >> A FOOTPRINT_ASYNC_LOADER class is added that can spawn loader threads and
> >> provide progress updates to the GUI while they work.
> >> + Completely rewrite footprint loader worker threads. They are now a
> >> queue-driven pool of workers rather than each loading a fixed number
> >> of libs (more efficient, a bit faster) and the main thread does no
> >> work, so it can return.
> >> + Make FOOTPRINT_INFO available to the world, by making them virtual base
> >> classes, putting the real implementation in
> >> pcbnew/footprint_info_impl.h/cpp, and adding a factory function to
> >> create an instance from anywhere via Kiface.
> >>
> >> - Add FP_LIB_TABLE::PrefetchLib
> >> This pulls everything that is async-safe (download from github, but not
> >> parsing due to a threadsafety issue) into a separate loader so the user
> >> can continue interacting as footprints download.
> >>
> >> Parsing itself remains synchronous, but the time it takes is tiny
> >> compared to downloading.
> >>
> >> - Allow access to the global fp_lib_table from anywhere via kiface
> >> (IfaceOrAddress()). Most methods to manipulate the table are still not
> >> compiled in everywhere (they have seriously large dependencies), but the
> >> table can be fetched as an opaque object.
> >>
> >> - Add a SYNC_QUEUE template class providing a std::queue wrapper with locking,
> >> for ease of passing things to and from worker threads.
> >>
> >> - Minor changes:
> >> + Add EDA_PATTERN_MATCH::GetPattern()
> >> + Create a type to represent component history items instead of just storing
> >> a list of strings and a unit. We'll need to track footprints too.
> >> + Make DIALOG_CHOOSE_COMPONENT quasimodal so it can summon the footprint
> >> picker.
> >> + Add kiface_ids.h for storing arbitrary IDs used in kiface. This is used
> >> for KifaceOrAddress(), as I'm the first person to actually use that method
> >> + Remove KICAD_FOOTPRINT_SELECTOR build option, no reason for it to be
> >> optional now.
> >>
> >> ===========
> >> Known issues, planned improvements:
> >>
> >> - History items don't remember their selected footprints.
> >> There are some implementation issues and UI/UX issues I still have to work
> >> out.
> >>
> >> - eeschema and cvpcb/pcbnew have separate footprint caches, so the first time
> >> you open one of the latter, it'll fetch the footprints even if eeschema
> >> already did.
> >>
> >> - FOOTPRINT_ASYNC_LOADER can also be used in cvpcb so cvpcb doesn't freeze
> >> as the footprints load! :)
> >>
> >> - Footprint picker isn't hidden in standalone mode, but it's useless.
> >>
> >> --
> >> Chris
> >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help : https://help.launchpad.net/ListHelp
> >
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
References