octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qt-based graphics backend - idea.


From: Shai Ayal
Subject: Re: Qt-based graphics backend - idea.
Date: Wed, 2 Jul 2008 20:05:59 +0300

On Wed, Jul 2, 2008 at 7:43 PM, Maciek Gajewski
<address@hidden> wrote:
> Hello again.
>
> Few days ago I've announced my plans for creating Qt-based plotter.
> I've been told about new graphics code in latest octave sources. So I changed
> my approach and decided to follow this path, instead of creating standalone
> plotter.
>
> My current plan is to create Qt-based graphics backend.
>
> Design:
> 1. create new backend (inherit base_graphics_backend), registered in
> some 'init' function.
> 2. during initialization - create new thread for GUI operation, intitialize Qt
> facilities in this thread.
> 3. In response for backend calls (close_figure, redraw_figure, print), send
> appropriate message to GUI thread, also copy object properties (syncing
> threads), so they can be safely accessed by GUI code from GUI thread.
> 4. Draw everything in GUI thread, using data from copied property tree.
> 5. All callback calls triggered by GUI (i.e. ButtonDownFcn) in GUI thread
> should be queued, and called from main thread in function registered
> with 'input_event_hook'.
>
> (step 1, 2 and partially 3 are somehow implemented already)
>
> I'd like to ask You for opinion and ideas - is anyone seeing any major flaw in
> above design?

The major flaw IMHO is also the major strength and this is the
graphics running in a separate thread - it means you have to deal with
sync issues and copy the data between two threads, but it also means
that the figure window will remain responsive at all times.

> Also, I'd like to ask about current status of 'uicontrol' implementation. Is
> there any planed? My entire project comes from need of having decent 2D
> plotting, especially using 'image', and basic uicontrols. So if no one is
> working on uicontrols, I'd like to add at least basic ones. I need pointers
> on when to start.

I don't know of any UI effort going on at the moment.

Shai


reply via email to

[Prev in Thread] Current Thread [Next in Thread]