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: Driss Ghaddab
Subject: Re: Qt-based graphics backend - idea.
Date: Thu, 03 Jul 2008 19:35:08 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080502)

Hello,

Maciek Gajewski 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'.

You may check a module I wrote in the past. It handles the problem of the thread, passing it data, using callbacks.

Check http://driss.ghaddab.free.fr/cmo

The CMO module is beta, but IIRC, I did not plan new features, or did not see other problems to solve.

CMO was designed to fulfill the requirements of a GUI module, which I did not finish, because of time (I was unemployed, then). It also had a new data type which mimics the object of MATLAB (including default properties, factory properties etc).

A demonstration module implemented the "timer" object of Matlab.

You may read the web site (see Documentation, tutorial, doxygen doc).

At that time, I thought about a GUI module which was split in two: one is the high level part, independent from any graphic toolkit, and one back-end which used QT, GTK, or even COCOA.



Cheers,

Driss


reply via email to

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