I'm very much trying to do what was asked here:
http://www.qtcentre.org/threads/45028-Designing-a-Node-Editor-(Hint-Blender-Node-Editor)
Which is basically a blender style node editor using Qt. Creating rects with circles which can be drag/dropped is fairly simple to figure out (see the image below).
The issue I have is how the algorithm for connecting the circles between nodes would work. Also I don't know how this could be drawn efficiently using QGraphicsItem API's? I have seen QPainter::cubicTo() which looks like it may be the way to go?
I assume it somehow manages to find a none overlapping path? But it must also handle the case where it has to overlap?
And what about the user being able to move these lines around in case the algorithm has done a bad job? I don't think this would be simple to implement using QPainter::cubicTo() as you could only move the curves control points?
I don't think you'll get anyone posting the code for doing the whole lot here.
Well, I volunteer -- just in case someone still needs such a library.
It is a Qt-based node editor implemented on top of QGraphicsView.
A library consumer defines data models, the rest is done by the node editor.
Some features:
Model-view approach.
Models describe data types, number of input and outputs and optional embedded QWidget.
The Scene could be saved to file.
The rest similar projects were either not finished, not supported anymore or lacking some features.
https://github.com/paceholder/nodeeditor
I would suggest that you implement it without taking into consideration overlap but with the possibility of overriding how the connecting line is drawn.
It looks like there were some good replies on the Qt forum. I don't think you'll get anyone posting the code for doing the whole lot here.
Perhaps take a look at the Qt demos Graphics View/Elastic Nodes - There is code for the demo that you can use as a starting point, but it is a lot of work to get from there to something like the Blender node editor.
Another node editor to take a look at is SynthEdit or Synth Maker (has a nice one).
Related
I am using the latest swiftui and would like to know if it is possible to create drag & drop boundaries based on color?
I already created a drag & drop with rotation, pinching, etc. But would like to be able to create regions where you can drop into.
Thanks
Yes it is! It's a great idea, and I think you should pursue it.
As it stands there's a hundred different ways to go about things. Spend some time thinking about how you would want it to work, then just take baby steps. You've already covered a lot of the ground work by implementing rotation and pinching.
Write some code (in a playground so you get instant feedback) that does some simple drag and drop work. Add in a line of code that turns the background a different color or changes its opacity when you let go/lift your finger.
Those types of incremental changes are well documented and you will be able to google them quickly. I think it's a great sign that you haven't found ready made examples. It means you are thinking outside the box.
This is an opportunity for you to think like a developer and a designer. If you post your results somewhere or release a project on GitHub at some point, others will be able to find your work using the same search criteria you used when you didn't find any results.
If you get stuck, post the code the code that has you baffled, and I'm sure you get help on this site. Best of luck 🍀
I need make graph in graphic framework Qt. I use QGraphicView and QGraphicScene and make my graph by hand (add Recangles, late add line to display hierarchy of single elements). For you to get an idea, picture, what I think:
And my supervisor tell me, that it is inefective. Somebody had to do something similar before me. So I must look for some library or framework in Qt, which support graph like mine (see above) and support mouse tracking, because after click I need do some operation.
So I searched on Google for few days and only thing I find is QTreeView. It is what I need, but it's for directory structure and that's not what I imagined.
Please, know somebody something like QTreeView, but in graphical adaptation? Thanks for any help.
I am looking for any open source implementations that allow for a creation of rendered objects like World of Warcrafts addon system. I am interested in recreating something similar in my own projects that make use of Direct3D8 and Direct3D9 but have not seen any similar projects to what WoW's addon system can handle.
I have a home-brewed method that can do partially what WoW does but nothing anywhere close to as advanced as their system(s).
Attempting to Google anything WoW related with programming gives nothing useful but addon websites for the game itself and nothing towards open source things for use in other projects.
The current method I am doing is by using primitive objects rendered via vertices and allowing sprites to override the primitive and be rendered instead. As-is, I can create UI elements like this:
This is made up of 6 different 'objects' that parent to one another.
Another example would be:
This one is made up of 3 objects, with two being overridden with a sprite.
I'm interested in seeing similar projects to compare and learn from to extend my system or start a new one from the ground up with better implementation ideas in mind.
I was looking at MeVisLab and I wondered if anyone knows a good framework for making a user interface similar to the one they use. I like the designing flow with boxes and arrows thing.
What I would really like is to able to integrate with C++ using Qt, and perhaps export the graph to xml of something like that.
There is another example of the interface here:
I hope someone knows something
Qt's Graphics View is a "framework" which does a good bit of the handling for the kind of scenario you describe. It doesn't take much code to get off the ground and within striking range of what you're looking for:
http://doc.qt.nokia.com/latest/graphicsview-diagramscene.html
http://doc.qt.nokia.com/latest/graphicsview-elasticnodes.html
I'm not aware of any open-source Qt-based programs that offer exactly what you want already written. Just noticed IBM did open source "DataExplorer", which is interesting to me...I might go take a look at that myself:
http://www.research.ibm.com/dx/
Let's say I'm a Qt newbie.
I want a good Qt library for displaying simple graphs. I've found the quanava library. But there is a problem. When I compiled a basic example it looks like graph edges are not painted properly when moving nodes. I don't have any idea where is a bug but this code seems to be rather simple. I think this is a problem with paint method in NodeItem class. Maybe someone has already solved this problem because this library is quite popular.
I usually go for Qwt for my graphing needs - a bit technical for "office graphs", but still, it works.
+1 for Qwt. It gets the job done, and is pretty configurable. The documentation is weak, but the number of examples are extensive enough to make up for it.
Ok, first of all saying graph i mean mathematical concept G=(V,E).
I improved quanava library, which is a very good starting point for graph visualization.