开发者

Qt plotting application

Currently I'm trying to develop som开发者_JS百科e 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜