CEETRON ENVISION with Qt
Qt (https://qt.io or https://qt-project.org) is the primary toolkit used at Ceetron for creating applications. CEETRON Analyzer and CEETRON Envision Demo Viewer uses Qt. This page describes how to integrate CEETRON Envision with Qt and how to get your application up and running with Qt. The description applies to Qt4, Qt5 and Qt6.
Creating a viewer
All CEETRON Envision apps need one (or more) viewers in order to visualize the 3D data. We have example implementations that you can find in the PlatformIntegration/Qt folder of the distribution. We provide both QGLWidget and QOpenGLWidget based viewers. The legacy QtOpenGL module (classes prefixed with QGL) provides QGLWidget. QOpenGLWidget is intended to be a modern replacement for it. Therefore, especially in new applications, the general recommendation is to use QOpenGLWidget. All examples also derive from cee::vis::ViewerUIFramework.
This is a bare bone example with the minimum requirements for showing CEETRON Envision in Qt. There is no support for navigation/picking etc., just the minimum. To create your own Viewer, you should derive from this class.
This is a demo application oriented implementation which adds Ceetron style navigation in addition to what is in ViewerGLWidget. This is the one used in the QtMinimal and QtMultiView examples which you can find in the Examples/Qt folder of the distribution. This is a good starting point for adding CEETRON Envision to your app. The class derives from ViewerGLWidget and might be a good starting point for a Viewer in your application. We recommend copying the source code of this Viewer and modifying it to suit your needs in your application.
Please make sure that the cee::vis::OpenGLContextGroup instance outlives the life of any viewers, i.e. all viewers must be deleted before the context group is deleted.
The PlatformIntegration/Qt folder also contains some support classes to help developers in integrating Qt with CEETRON Envision.
The static classes in ceeqtUtilsCore.h and ceeqtUtilsGui.h contain methods for converting Qt types to and from cee types (e.g. QString <-> cee::Str). There are also conversion functions to translate from Qt mouse events to cee::vis::MouseEvent, cee::vis::MouseButton and cee::vis::WheelEvent.
To compile and run the example programs, use the .pro file in the example folder. If you are using Qt Creator you can just open this file. If you are using Visual Studio, you need to generate a .vcxproj file using qmake:
qmake -tp vc
On Linux, just do: