Gui工具包,我应该使用? [英] Gui toolkits, which should I use?

查看:173
本文介绍了Gui工具包,我应该使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个相当庞大和复杂的数据分析程序,我已经达到了我认为这是为该程序构建GUI的时间点。所以我的问题是:



我应该使用哪个GUI工具包?



GUI,并将欣赏任何可以提供的指导。它不必是世界上最简单的工具包,我学得相当快。但是,它需要能够做以下事情(一些如果不是所有这些可能是令人难以置信的基本任何给定的工具包,但我认为这将是很好的把所有这里,以防万一)。



它必须允许我直接绘制到屏幕,这样我可以把图表(光谱真的),图表和类似的东西供用户看到。我需要能够收集关于他们点击上述光谱的位置信息。我需要能够显示文本并从用户接收文本输入。它需要能够生成菜单(你知道文件,编辑等)。如果它是有一些内置的小部件生成表将是方便(虽然我可以克服缺乏,如果我可以直接绘制到屏幕)。它需要能够弹出警告,对话框,保存和打开框等。这是很多,看起来很基本,当我写出来,但我不想得到GUI部分编码,然后意识到II需要用不同的工具包重写它。



应该注意的是,我用C ++编写了这个程序,我不想要在GUI中编写GUI部分或其他工具,所以工具包需要支持C ++。



此外,跨平台工具包比单个平台工具包更可取。但是如果它必须是一个单一的平台工具包,那么我宁愿它是Linux。



最后,我会喜欢一个开源工具包。 / p>

除此之外,我不能想到要添加任何东西。预先感谢您的时间和答案。



根据答案,我会看看Qt和wxWidgets,看看我对我更多的吸引力。我与我可以接受多个答案接受,但我不能,因为我看着两件事情是不公平的,只接受一个答案,也许在一两个星期,那么我看看工具包和想象

$ p

解决方案

对于C ++,在我看来,Qt是最令人沮丧和最全面的工具包。它也完全横跨平台。注意,Qt将在2009年3月有一段时间的LGPL许可,当版本4.5变得可用时。目前,它只提供了GPL和商业许可版本。



Qt的GUI设计师是好的。它有很多实用功能(场景图形库,翻译支持,内置的Javascript引擎,内置的WebKit库)。通过MOC(一个特殊的预编译器),它也带来了几个运行时绑定功能和内省C ++。



对于您的技术应用程序,您可能会发现Qwt( http://qwt.sourceforge。 net / )提供您所需要的。它建立在Qt上。



如果你想要它的实用程序支持(如网络等)没有GUI,Qt甚至可以使用无头。



另一个跨平台C ++选项是wxWidgets,它是可用的,但不能真正与Qt相比。它是一个更低级别的工具包,并不是那么容易使用或完全四舍五入。 Gtkmm是另一个选择,在GTK +的精神。


I am writing a fairly large and complex data analysis program and I have reached the point where I think it is about time to build a GUI for the program. So my question is:

Which GUI toolkit should I use?

I am completely new to coding and building GUIs and would appreciate any guidance that can be offered. It doesn't have to be the simplest tool kit in the world, I learn rather fast. However, it does need to be able to do the following things (some if not all of these are probably incredibly basic for any given toolkit but I thought that it would be good to throw all this out there just in case).

It has to allow me to draw directly to the screen so that I can put graphs (spectra really), plots and things like them up for the user to see. I need to be able to collect position information on where they clicked on aforementioned spectra. I need to be able to display text and take text input from the user. It needs to be able to generate menus (you know File, Edit, etc). If it were to have some built in widget for generating tables that would be handy (though I can surmount a lack of that if I can draw directly to the screen). It needs to be able to pop up warnings, dialogue boxes, save and open boxes, etc. That is pretty much it, most of these seem pretty basic when I write them out but I don't want to get the GUI partly coded and then realize that I I need to rewrite it with a different toolkit.

It should be noted that I have written this program in C++ and that I don't want to have to write the GUI part in C or something else so the toolkit needs to support C++.

Additionally a cross platform toolkit would be preferable over a single platform toolkit. However if it must be a single platform toolkit then I would prefer it be for Linux.

Finally, I would DRAMATICALLY prefer an open source toolkit to a closed source toolkit.

Beyond that I cannot think of anything to add. Thank you in advance for your time and answers.

Hmmm based on the answers I shall look at both Qt and wxWidgets and see which appeals to me more. I with I could accept multiple answers as accepted but I can't, and since I am looking at two things it would be unfair to only accept one of the answers, perhaps in a week or two then I have looked at the toolkits and figured out which I want to use.

解决方案

For C++, in my opinion, Qt is the least frustrating and most fully featured toolkit. Its also fully cross platform. Note that Qt will be LGPL licensed some time in March 2009, when version 4.5 becomes available. Currently, its only offered in a GPL and commercial license version.

Qt's GUI designer is good. It has lots of utility functions (scene graph library, translation support, built-in Javascript engine, built-in WebKit library). Via the MOC (a special pre-compiler) it also brings a few run-time binding capabilities and introspection to C++.

For your technical application, you might find that Qwt (http://qwt.sourceforge.net/) provides what you need. It is built upon Qt.

Qt can even be used "headless" if you want its utility support (such as networking, etc) without a GUI.

The other cross platform C++ option is wxWidgets, which is usable but not really comparable to Qt. Its a much lower level toolkit, and isn't as easy to use or fully rounded. Gtkmm is another option, in the spirit of GTK+.

这篇关于Gui工具包,我应该使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆