I want to put some good looking objects on my application like plots, dials and other objects. QCustomPlot is available and I think that will be okay for plots but objects available in QWT are very old looking, I want some objects which adds some stars to my application. If any then please suggest.
In terms of "good looking" there is no difference between Qwt or QCustomPlot. When using the same brushes and pens they look the same.
For the dials, sliders, knobs etc. most more modern looking versions are usually done with Qt/Quick nowadays. But IMHO this technology has failed for the desktop ( Qt/Quick Controls 1 has officially been given up ) and I'm not aware of many activities in the widgets area.
So I'm afraid your best choice is to use Qwt and to overload the methods used for rendering so that they look like expected.
You might also want to try style sheets. At least Qwt supports them to some degree.
Related
This is not a joke. and I want a tutorial.
I want to make a 3D (node editor / programming language / graph editor) like this picture:
How can I do that?
These are just some thoughts on the matter, I think some planning will be required.
I'm unaware of any tutorials explaining how to build node editors, but since so many node editors exist, perhaps your best source for inspiration can be other people's codebases.
I think you can look at prior art:
https://architecture.mit.edu/computation/project/visual-programming-three-dimensions-visual-representations-computational-mental
Also, I think you can plan it like this:
figure out what it will look like (maybe you can make a mockup on blender first)
think about what kind of interactions will be allowed, how will the mouse work?
Consider using an existing 3d framework like openframeworks or unity
design a command palette or list of keyboard shortcuts of things that will be required
study existing 2d note editors, consider evaluating the work of John Paul Morrison (Flow Based Programming) and things like NoFlo or PyFlow among many others, you can study the ones that have actual users like the Unreal Node Editor, or more recently I think Unity also has one.
design an execution engine (how will the code actually run, input ports, output ports, etc).
consider the format that you'll use for saving/loading the networks, is it sqlite? json? will you need to store the coordinates and perhaps the dimensions of the nodes, and the connections between the nodes?
if a new node is to be located, where will it be put? do you need to indicate an arbitrary point in 3d space, or is it better to have the new node positions to be relative to existing objects?
component property editors may be important, each node will probably have it's own set of properties, will each node be custom, with a custom ui for editing? or will there be a general property editor for all the nodes? these decisions should be made.
custom node properties can be used to make the ui easier for the user, however
the global property editor will allow you to create many components relatively inexpensively.
what operations need to be supported? do you need auto-layouting algorithms, like graphviz's dot?
will the runtime allow for step by step execution? node statistics? real time visualization?
consider who is your target market for this tool, and why this tool will be useful outside the existing tools, is it music artists using the next vvvvv ? or is it graphic artists making the next shader? will be useful for web development? or for a specific niche?
I hope you'll find these thoughts and ideas useful in your process, and I look forward to the things you will build.
I'm looking for a graph and diagramming library that can create workflow diagrams like the images below. The most important feature i'm looking for is the ability to create blocks/containers with ports (inputs/outputs) and the ability to create connections between them.
Ideally a library for OS X / Linux, but JS, SVG and Windows libs may also be applicable.
If you are familiar with the TeX/LaTeX environment, then try the package tikz.
TikZ and PGF are TeX packages for creating graphics programmatically. TikZ is build on top of PGF and allows you to create sophisticated graphics in a rather intuitive and easy manner.
For support and examples look around at the sister site TeX.SE.
There are many different diagramming libraries out there for all kinds of platforms and languages (see the related section next to your question on the right).
If you are looking for more complex/technical visualizations many of the simpler ones are not flexible or powerful enough, though. IMHO for this kind of diagram you will probably need to look for a commercial library, especially if you want a diagram like the above one to be laid out automatically from your data and not just arranged manually by the user.
The yFiles diagramming product family should be able to support your use-case. It offers:
Built in support for ports - edges connect to ports which are owned by nodes (and edges optionally)
Automatic arrangement of nodes and routing of edges for diagrams like in your example (hierarchic/sugiyama style layout)
You can customize the look and the feel of the application and the items according to your exact requirements
Available for java (Swing and JavaFX), .net (Windows Forms and WPF), and HTML5 (SVG and Canvas) and more
Disclaimer: The yFiles diagramming libraries are a commercial offering with paid updates and support options, created by yWorks, the company that I work for. I don't represent my employer on SO, though. This post is my own and represents my own opinion.
I am required to do some 3-D application and planning to chose some library for the same. I have previous experience with Qt-qml.
I read about OpenGl and found that it must be used basically when you one has very low level drawing requirements.
I also found that there is something called QtOpenGl.
Q1. Is QtOpenGl any less powerfull that OpenGl because it just just provide a wrapper over some OpenGl functionality? or it as good as using OpenGl with an advantage of working at higher level of abstraction ?
Q2. I also found there is something called Qt-3D and Qt-Quick3D. I ran some sample examples and found it easy to use because of my previous experience with qml.
Can someone share experience how powerful it is compared to OpenGl itself?
My basic question is how low the drawing requirements should be that I should use OpenGl rather than some higher abstraction like QtOpenGl ?
Q1: The Qt OpenGL module is not exactly a wrapper aroung OpenGL. It is a wrapper around GLX, WGL, or AGL. You can anyway render with QPainter using the Qt OpenGL engine. Look to the documentation to see if it is sufficiently low for you. Only 2D anyway.
Q2: Qt3D will be part of Qt5 as far as I know. It depends on what you want to do. If you want to implement 3D games it is probably quite risky. Only you know if it is sufficient for your needs.
hi guys
i am in trouble with add picking object in a JOGL project.
i know that this could be done with pick buffer.. but i can't find examples
anyone?
In general, as you are probably aware, JOGL code translates directly from any other OpenGL examples you might see on the web.
GL_SELECT based picking seems to be very much out of favour these days; deprecated in the spec and poorly implemented by drivers.
Alternatives you can use are:
Rendering each object with a unique color (and all lighting / fog etc disabled) so you can determine which object the mouse is over via glReadPixels. (Clearing buffers after the picking stage so that you can then render your normal graphics). This approach is explained by the top rated answer in OpenGL GL_SELECT or manual collision detection? for example.
Ray-casting into your geometry (see the selection FAQ link below). This also means that you don't have to have an active gl context in the thread you call the code from, fwiw.
I've used both of these methods in the same application, currently having good results with the latter, but since most of the objects in that application are spheres it is a lot cheaper than it might be with arbitrary models.
http://www.opengl.org/resources/faq/technical/selection.htm
Currently I'm trying to develop some simple plot prototype and I'm struggling with some kind of white/empty sheet syndrome.
I'm back to Qt after 2 years, so I feel quite retarded.
My application should:
plot and manage custom layers of data
plot on custom canvas background
manage markers on plot
My plan is to use following design:
QGraphicsScene /View/Item as a sprite like management widgets for background, markers, pointers and other "bitmap" objects etc.
QPainter/ Qpixmap or QPicture for actual data layers - and if possible set them as QGraphicItem to simplify management of dynamic graphics
I don't want to use Qwt or similar library, unless I can plot with it on custom background (I don't like the look of the qwt's graphic style).
Is my plan proper in scope of qt class usage and composition?
I'd like to have at least clear overview of the classes which should be involved for this kind of prototype.
Thanks in advance.
P.
I think you have the basic idea with QGraphicsView. Here are a few resources which might help:
Graphics View
Diagram Scene
If you want to use the new animation and state set classes:
Stickman
Also, take a look at gunnar's labs blog. He recently did a series on graphics performance.
All of these are strictly Qt (animation and state set are in 4.6). They are in C++ but hopefully you can translate what you need to python.
You don't say much about your project for me to propose a more helpful answer, but have a look at the Qt demos involving the graphics view, especially diagram scene and 40000 chips. I think you will find them inspiring for what you want to do.
May be MathGL is appropriate for you. It have Qt widget or you can use RGBA image directly to combine it with any background in your widget.
I recommend you to use QCustomPlot which is a Qt C++ library. It focuses on making good looking, publication quality 2D plots, graphs and charts and also has high performance for realtime visualization applications. You get it here: http://www.qcustomplot.com/
You may want to take a look at the Core Plot framework. Core Plot is OS X specific, but it is built on the the OS X Core Animation system which has a lot of conceptual similarity to the Qt Graphics View Framework. You'll have to learn to visually parse the Objective-C (a less-than-two day process for any competent C++ developer), but you should be able to see the general architecture relatively easily. The Core Plot wiki has some nice high-level documentation that might set you on your way without even needing to look at the code.