CGAL 6.0 - CGAL Basic Viewer
Loading...
Searching...
No Matches
CGAL::Qt::QApplication_and_basic_viewer Class Reference

#include <CGAL/Qt/Basic_viewer.h>

Definition

The class QApplication_and_basic_viewer regroups a Basic_viewer and Qt QApplication.

The QApplication is created in the constructor, but started by the run() method. This allows for example users to modify the on_key_pressed method of the Basic_viewer to define their own behavior.

This class requires CGAL_Qt6, and is only available if the macro CGAL_USE_BASIC_VIEWER is defined. Linking with the cmake target CGAL::CGAL_Basic_viewer will link with CGAL_Qt6 and add the definition CGAL_USE_BASIC_VIEWER.

Examples
Basic_viewer/draw_surface_mesh_small_faces.cpp.

Public Member Functions

 QApplication_and_basic_viewer (const CGAL::Graphics_scene &gs, const char *title="CGAL Basic Viewer")
 Constructor given a Graphics_scene and possibly a title.
 
void run ()
 runs the QApplication, i.e., open the Qt window. A call to this method is blocking, that is the program continues as soon as the user closes the window.
 
Basic_viewerbasic_viewer ()
 returns a reference to the Basic_viewer associated with this.