Animation and QT Widget


PhotoPhoto
Camille controlled by QT buttons

This example shows that we can control Camille with QT buttons.


Now Download this example : QTcamille_bouge.tar.gz.

These files have been tested on Mandrake 9.1. You may have to modify the .pro if you are running on an other operating system.

You might encounter problems with a variable called INT32 which is defined at Xmd.h and a file of qt3.
To avoid this problem, we create a flag called -DINT32_ALREADY_EXISTED.
You have to write in one of this two files :
       #ifndef INT32_ALREADY_EXISTED
       #define INT32_ALREADY_EXISTED
            /*Here is the declaration of the variable INT32*/
       #endif



The Method

Details of the archive :
      main.cxx                                      //A classic OpenMask main file
      Camille.h                                     //Camille
      Camille.cxx
      Camille.iv                                    //Camille scene graph
      camille_simtree.OpenMASK3                     //The OpenMask simulation tree
      libOpenMASKInterface.so                       //A library which contains the QT widget
      settings_1Window_1Viewport.3DVis.OpenMASK3
      camille.pro                                   //Generate the Makefile
      Makefile

QTInterface/
      OpenMASKInterface.pro                         //Generate the Makefile
      Makefile
      PsOpenMASKWidget.h                            //This class sends signals to Camille (for the control)
      PsOpenMASKWidget.cxx
      OpenMASKWidget.ui.h                           //This file was constructing by QTdesigner

The Result

Compile and see Camille moving.
You can stop,start or running the animation step by step.

Return to the summary