Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, August 2007
Dynamic drawing?


Message 1 in thread

Hi,

I've written a C++ application that reads in a set of documents and creates
a conceptual non-cyclic graph for each document. I'd like to be able to see
each document's graph... and ultimately overlap graphs for visual
comparison. The graphs are essentially FSMs, and the rendering I seek to
create would be follow typical FSM modeling conventions (circular states,
double circular accepting states attached by arcs). The FSMs contain
thousands of states and are by no means trivial.

I'm new to Qt and a little overwhelmed by all of the classes. Is there a Qt
class best suited for dynamic drawing? Or can you think of a good text book
or example that I could examine? I've got these books: C++ GUI Programming
with Qt 4 and An Introduction to Design Patterns in C++ w/ Qt 4.

Thanks in advance,

Kim Adams
Austin, TX





--
 [ signature omitted ] 

Message 2 in thread

Hi,

define "dynamic drawing". Basically in Qt all drawing is performed
upon a QPaintDevice (or any of its children), and you draw upon it
using a QPainter.

This happens in a QWidget's paintEvent().

Hope this helps your finding out about what you want to do.

Regards,
Thomas

2007/8/12, Kim Adams <binary6is110@xxxxxxxxx>:
> Hi,
>
> I've written a C++ application that reads in a set of documents and creates
> a conceptual non-cyclic graph for each document. I'd like to be able to see
> each document's graph... and ultimately overlap graphs for visual
> comparison. The graphs are essentially FSMs, and the rendering I seek to
> create would be follow typical FSM modeling conventions (circular states,
> double circular accepting states attached by arcs). The FSMs contain
> thousands of states and are by no means trivial.
>
> I'm new to Qt and a little overwhelmed by all of the classes. Is there a Qt
> class best suited for dynamic drawing? Or can you think of a good text book
> or example that I could examine? I've got these books: C++ GUI Programming
> with Qt 4 and An Introduction to Design Patterns in C++ w/ Qt 4.
>
> Thanks in advance,
>
> Kim Adams
> Austin, TX
>
>
>
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

--
 [ signature omitted ] 

Message 3 in thread

Hi,

first of all: please reply to the list, not to a member of the list in
private - don't worry, a common mistake that happens even to myself
(naughty "reply" function :-))

Secondly I'd guess it would depend upon what you want.
QGraphicsScene/View are is what I would recommend if you need to
interact with the state-chart's elements.
If you only want to draw the state-chart you are probably better of
painting the graph onto a QPixmap and then, in a widgets paintEvent,
draw the pixmap onto the widget itself.

Also it is worthwhile to note that I never tried the
QGraphicsView-Framework for non-interacting images.

Regards,
- Thomas

2007/8/12, Kim Adams <binary6is110@xxxxxxxxx>:
> By 'dynamic' I mean that each FSM is generated (and drawn) after a
> document's data is processed- so each FSM is distinct based on the contents
> of the document and it's not possible to draw it in advance.
>
> By 'drawing' I mean that I want to graphically represent each generated FSM.
> (This problem is identical to graphically representing a dynamically
> generated tree structure with nodes.)
>
> Thank you for your suggestion, I'll delve deeper into QPainter/QPaintDevice-
> it's appeared in a number of tutorials and examples-
>
> I noticed a couple of classes devoted to abstract data modeling like
> QAbsractItemModel and it looks like QGraphicsScene may be good for
> organizing FSMs with thousands of connected states.
>
> Are these better suited for creating visualizations of tree-like data
> structures? Or is working with QPainter/QPaintDevice the best way to go?
>
> Kim
>
>
> On 8/12/07 9:20 AM, "Thomas Dähling" <t.daehling@xxxxxxxxxxxxxx> wrote:
>
> > Hi,
> >
> > define "dynamic drawing". Basically in Qt all drawing is performed
> > upon a QPaintDevice (or any of its children), and you draw upon it
> > using a QPainter.
> >
> > This happens in a QWidget's paintEvent().
> >
> > Hope this helps your finding out about what you want to do.
> >
> > Regards,
> > Thomas
> >
> > 2007/8/12, Kim Adams <binary6is110@xxxxxxxxx>:
> >> Hi,
> >>
> >> I've written a C++ application that reads in a set of documents and creates
> >> a conceptual non-cyclic graph for each document. I'd like to be able to see
> >> each document's graph... and ultimately overlap graphs for visual
> >> comparison. The graphs are essentially FSMs, and the rendering I seek to
> >> create would be follow typical FSM modeling conventions (circular states,
> >> double circular accepting states attached by arcs). The FSMs contain
> >> thousands of states and are by no means trivial.
> >>
> >> I'm new to Qt and a little overwhelmed by all of the classes. Is there a Qt
> >> class best suited for dynamic drawing? Or can you think of a good text book
> >> or example that I could examine? I've got these books: C++ GUI Programming
> >> with Qt 4 and An Introduction to Design Patterns in C++ w/ Qt 4.
> >>
> >> Thanks in advance,
> >>
> >> Kim Adams
> >> Austin, TX
> >>
> >>
> >>
> >>
> >>
> >> --
> >> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> >> "unsubscribe" in the subject or the body.
> >> List archive and information: http://lists.trolltech.com/qt-interest/
> >>
> >>
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> >
>
>
>

--
 [ signature omitted ] 

Message 4 in thread

Sorry about that.

Thanks for your advice, I appreciate the help.
 

On 8/12/07 10:28 AM, "Thomas Dähling" <t.daehling@xxxxxxxxxxxxxx> wrote:

> Hi,
> 
> first of all: please reply to the list, not to a member of the list in
> private - don't worry, a common mistake that happens even to myself
> (naughty "reply" function :-))
> 
> Secondly I'd guess it would depend upon what you want.
> QGraphicsScene/View are is what I would recommend if you need to
> interact with the state-chart's elements.
> If you only want to draw the state-chart you are probably better of
> painting the graph onto a QPixmap and then, in a widgets paintEvent,
> draw the pixmap onto the widget itself.
> 
> Also it is worthwhile to note that I never tried the
> QGraphicsView-Framework for non-interacting images.
> 
> Regards,
> - Thomas
> 
> 2007/8/12, Kim Adams <binary6is110@xxxxxxxxx>:
>> By 'dynamic' I mean that each FSM is generated (and drawn) after a
>> document's data is processed- so each FSM is distinct based on the contents
>> of the document and it's not possible to draw it in advance.
>> 
>> By 'drawing' I mean that I want to graphically represent each generated FSM.
>> (This problem is identical to graphically representing a dynamically
>> generated tree structure with nodes.)
>> 
>> Thank you for your suggestion, I'll delve deeper into QPainter/QPaintDevice-
>> it's appeared in a number of tutorials and examples-
>> 
>> I noticed a couple of classes devoted to abstract data modeling like
>> QAbsractItemModel and it looks like QGraphicsScene may be good for
>> organizing FSMs with thousands of connected states.
>> 
>> Are these better suited for creating visualizations of tree-like data
>> structures? Or is working with QPainter/QPaintDevice the best way to go?
>> 
>> Kim
>> 
>> 
>> On 8/12/07 9:20 AM, "Thomas Dähling" <t.daehling@xxxxxxxxxxxxxx> wrote:
>> 
>>> Hi,
>>> 
>>> define "dynamic drawing". Basically in Qt all drawing is performed
>>> upon a QPaintDevice (or any of its children), and you draw upon it
>>> using a QPainter.
>>> 
>>> This happens in a QWidget's paintEvent().
>>> 
>>> Hope this helps your finding out about what you want to do.
>>> 
>>> Regards,
>>> Thomas
>>> 
>>> 2007/8/12, Kim Adams <binary6is110@xxxxxxxxx>:
>>>> Hi,
>>>> 
>>>> I've written a C++ application that reads in a set of documents and creates
>>>> a conceptual non-cyclic graph for each document. I'd like to be able to see
>>>> each document's graph... and ultimately overlap graphs for visual
>>>> comparison. The graphs are essentially FSMs, and the rendering I seek to
>>>> create would be follow typical FSM modeling conventions (circular states,
>>>> double circular accepting states attached by arcs). The FSMs contain
>>>> thousands of states and are by no means trivial.
>>>> 
>>>> I'm new to Qt and a little overwhelmed by all of the classes. Is there a Qt
>>>> class best suited for dynamic drawing? Or can you think of a good text book
>>>> or example that I could examine? I've got these books: C++ GUI Programming
>>>> with Qt 4 and An Introduction to Design Patterns in C++ w/ Qt 4.
>>>> 
>>>> Thanks in advance,
>>>> 
>>>> Kim Adams
>>>> Austin, TX
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>>>> "unsubscribe" in the subject or the body.
>>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>>> 
>>>> 
>>> 
>>> --
>>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>>> "unsubscribe" in the subject or the body.
>>> List archive and information: http://lists.trolltech.com/qt-interest/
>>> 
>> 
>> 
>> 
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
> 


--
 [ signature omitted ]