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.

ViewerGLWidget/ViewerOpenGLWidget: ceeqtViewer(Open)GLWidget.h/.cpp
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.

ViewerGLWidgetDemo/ViewerOpenGLWidgetDemo: ceeqtViewer(Open)GLWidgetDemo.h/.cpp
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.

Utilities

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.

Example Programs

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:

qmake
make

QtMinimal

img_min

Location: Examples/Qt/QtMinimal
A very small example showing the basic requirements for a Qt application.

QtMultiView

img_multi

Location: Examples/Qt/QtMultiView
A small example showing how to do multiple views/windows with
CEETRON Envision in Qt.

QtSendToCloud

img_cloud

Location: Examples/Qt/QtSendToCloud
An example showing how to send a VTFx file to Ceetron Cloud (using Qt).

QtReport

img_report

Location: Examples/Qt/QtReport
An example showing how to create simple reports from the current model.

QtRepositoryManager

img_repman

Location: Examples/Qt/QtRepositoryManager
An example which is a simple manager for a repository file. This allows you
to open a repository file and view the actual snapshot content.

QtDemoApp

img_demo

Location: Examples/Qt/QtDemoApp
A small Post Processor written in Qt to showcase some of the features in the
UnstructGrid component.