I'm currently developing on a tool with some existing large C++ code. I'm currently thinking about using a model-view-controller (MVC) design. The model should contain all the C++ code. The view is what the user sees and the controller is basically the glue between the model and the view.
The features that I'm looking for are:
Now I found 3 solutions:
I have some experience with Java Swing and nearly no experience with QT and GTKmm.
So what is the best solution for making a GUI when I already have an existing C++ code as an inexperienced UI developer?
Of your 3 options, I would definitely go with Qt.
Basically for Qt to be a functional GUI, you need to start QApplication
, show()
some sort of widget and then start the event loop for the application (QApplication::exec()
).
http://qt-project.org/doc/qt-4.8/qapplication.html
http://qt-project.org/doc/qt-4.8/qapplication.html#exec
Qt is extremely flexible and well thought out, and has a strong following. And it has incredible documentation.
To interact with your existing C++ data structures, just construct them as a member variable as one of the main widgets that you have for your GUI. Then when you want to access and display information on it, it is a piece of cake.
http://qt-project.org/doc/qt-4.8/qwidget.html
http://qt-project.org/doc/qt-4.8/qmainwindow.html
Most of the GUI elements in Qt only act as the view, and there isn't any definitive Model and Controller setup. That is left to the developer. If you are displaying a database or a tree or a grid of items there is a model/view flow, but I don't think it applies to your application.
Understanding and using SIGNALS and SLOTS is essential to making an interactive GUI in Qt, and is very painless.
http://qt-project.org/doc/qt-4.8/signalsandslots.html
http://qt-project.org/doc/qt-4.8/qobject.html#details
Reading up on all the different kinds of QWidgets out there, you should be able to find each of the elements you listed in your question.
Here are some you should look at:
http://qt-project.org/doc/qt-4.8/qtextstream.html
http://qt-project.org/doc/qt-4.8/qtextedit.html
http://qt-project.org/doc/qt-4.8/qlineedit.html
http://qt-project.org/doc/qt-4.8/qlabel.html
And of course look through the tutorials and examples that come with Qt.
How to use GNUPlot with Qt
http://lists.trolltech.com/qt-interest/2002-12/thread00068-0.html
Also, as a developer that has used both Qt Creator and Eclipse, I prefer Qt Creator, and porting a project to work in Qt Creator is very straight forward. If you want to change the build chain of Eclipse to use the Qt libraries and QMake, it is possible too.
http://qt-project.org/doc/qt-4.8/qmake-project-files.html
http://qt-project.org/doc/qt-4.8/qmake-project-files.html#declaring-other-libraries
http://therning.org/magnus/archives/1023
I hope that is helpful. Good luck.