On Wed, May 26, 2010 at 11:56 AM, Bert Vermeulen <[email protected]> wrote:

> On 24/05/10 22:34, Emil Brink wrote:
> > Hi again.
> >
> > Here's another patch that adds a sigrok_samplerate_parse() function to
> > the sigrok library, and uses it from mainwindow.cpp in the GUI to set
> > the current sample rate before starting capture.
> >
> > For me, it pops up the capture dialog and renders a bunch of time
> > lines and other interesting-looking stuff in the main window.
>
> Hmm... that duplicates a function in sigrok-cli.c called
> parse_sizestring().
> I'd rather you move that one to the backend, if it's needed in the GUI
> somewhere.
>

Awesome, I didn't find that one.


> libsigrok/output/common.c isn't really the place to put generic backend
> stuff though -- that entire directory is dedicated to output modules (see
> the Output API page on the wiki), and common.c just has stuff that all
> output modules need.
>

I kind of realized that, from the filename alone. :) Where would be the
proper place to put the parsing function, if it's needed in the GUI?


> Having said that, I don't know if the GUI needs this -- Uwe, can you
> comment
> please?
>

My use case is to set the desired capture frequency, from a combo box that
just has the choice as a string available. I didn't look into other
possibilities (such as storing the frequency along side the string in the
combo box; I'm a total Qt newbie).

Thanks for the feedback!

Regards,

/Emil
------------------------------------------------------------------------------

_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to