Hello,
first thank you for making this nice package, i use it for internal data acquisition software.
Sadly, i did not know of the flownode part, so i did program my own node-framework: qtdataflow.
https://github.com/Tillsten/qt-dataflow
It differs slightly in its design: it is probably more flexible, but has less features. It is also
quite untested and the documentation is lacking. But the examples (including one using
a pyqtgraph directly) are quite self explaining. Maybe somebody has some use for it, i'll
try to answer any questions.
btw:
I also used pyqtgraphs qt.py file, how should i attribute/cite this?
Interesting! Can you describe what you think is more flexible about your design? I'm always looking for ways to improve and I'm sure pyqtgraph's flowcharts have a lot of room to grow. I might try to integrate some of your code / design.
You can just mention pyqtgraph in a comment at the top, that'd be good enough.
Am Montag, 25. Februar 2013 00:59:04 UTC+1 schrieb Luke Campagnola:Interesting! Can you describe what you think is more flexible about your design? I'm always looking for ways to improve and I'm sure pyqtgraph's flowcharts have a lot of room to grow. I might try to integrate some of your code / design.
After having a deeper look into pg-flowchart i have to say the design is eerily similar. Some
points which would make it maybe a little bit more flexible:
* hardcoded processing
* Node is QObject and by that it is unpickable
* I don't think the bypass-stuff should be in a general Node class, because it does not sense for
a lot of node-classes. Same for set_color.
* It is not clear where the node chooses it graphicsitem.
* Can i chose another view for a item?
* It is missing examples how to make your own nodes (this is the most important point).
Some nice minor additions would be:
* nicer connections lines
* a toolbar from which one can drag and drop nodes.
* allowing for different types of connections.
On Wed, Feb 27, 2013 at 11:12 AM, Till Stensitzki <mail...@gmx.de> wrote:Not sure what you mean here.. have you seen the EvalNode ?
Maybe you meant unpicklable? Each Node has a save/restore function, so in principle this could be used to define pickling behavior.
It's true that bypass does not make sense for all node types, but it is a common enough feature that I think inclusion in Node is reasonable. One might envision a BypassableNode subclass, but if we start breaking features out like that, then it becomes necessary to use multiple inheritance, which I usually try to avoid when working with Qt.
You mean place the GraphicsItem in another view? Change its appearance? Move its control widget elsewhere?
See examples/FlowchartCustomNode.py (and please ask if you want to see more features demonstrated there)
Definitely agree there. The tricky part is making curved lines selectable in a user-friendly way.
* a toolbar from which one can drag and drop nodes.This would be nice. There's a context menu; I guess it wouldn't be too difficult to generate a toolbar or other kinds of structures. Perhaps a TreeWidget would be easier at first since all node types have names, but not icons (but this would be a good feature to add as well).
* allowing for different types of connections.
Am Mittwoch, 27. Februar 2013 18:08:30 UTC+1 schrieb Luke Campagnola:On Wed, Feb 27, 2013 at 11:12 AM, Till Stensitzki <mail...@gmx.de> wrote:
Not sure what you mean here.. have you seen the EvalNode ?
I'll have a look it. Atm i just not sure why there is a processing method
in flowchart.
You mean place the GraphicsItem in another view? Change its appearance? Move its control widget elsewhere?
The second, for example lets say you have your normal chart and an zoomed out overview for it. It would
be nice to replace some nodes just by symbols.
Definitely agree there. The tricky part is making curved lines selectable in a user-friendly way.
Just subclass form QGraphicsPathItem, it gives a nice bounding box. See
https://github.com/Tillsten/qt-dataflow/blob/master/qtdataflow/view.py#L103
for a cubic line.
* allowing for different types of connections.
Lets imagine someone want to make a Labview-clone (god beware!): some nodes return int, some others string.
Giving them different appearance and behavior in the gui would be nice. String-out nodes are only allowed to
connect to String nodes, different colors, highlighting, etc...
Bounding boxes don't really work when the flowchart becomes more complex--too many overlapping boxes. The approach I had in mind is to use QPainterPathStroker to generate a conforming shape that extends a few pixels around the path.