MEPP2 Project
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FEVV::SimpleAdapterVisu Class Reference

SimpleAdapterVisu is a specialization of QWidget. This class is the widget added to a QMainWindow, who host an OSG Viewer. More...

#include <SimpleAdapterVisu.h>

Inheritance diagram for FEVV::SimpleAdapterVisu:
Inheritance graph
Collaboration diagram for FEVV::SimpleAdapterVisu:
Collaboration graph

Public Member Functions

 SimpleAdapterVisu (QWidget *_parent=0, Qt::WindowFlags _f=Qt::Widget)
 
 ~SimpleAdapterVisu ()
 
void init () override
 
void init (const bool _useMdiWindows)
 
bool isInit () const override
 
bool isValid () const override
 
void apply (Plugin *myPlugin) override
 
- Public Member Functions inherited from FEVV::BaseAdapterVisuQt
 BaseAdapterVisuQt (QWidget *_parent=0, Qt::WindowFlags _f=Qt::Widget)
 
virtual ~BaseAdapterVisuQt ()
 
void attach (Viewer *_viewer) override
 
virtual void attach (ViewerOSG *_viewer)
 
virtual bool isSelected () const
 
virtual void setSelected (const bool _isSelected)
 
- Public Member Functions inherited from FEVV::BaseAdapterVisu
 BaseAdapterVisu ()
 
virtual ~BaseAdapterVisu ()
 
virtual bool isSelected () const
 
virtual void setSelected (const bool _isSelected)
 
virtual ViewergetViewer ()
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *) override
 
bool eventFilter (QObject *obj, QEvent *event) override
 
virtual bool event (QEvent *event) override
 
void addViewWidget (osg::ref_ptr< osgQt::GraphicsWindowQt > _gw, osg::ref_ptr< osg::Node > _scene)
 
osg::ref_ptr< osgQt::GraphicsWindowQt > createGraphicsWindow (int _x, int _y, int _w, int _h, const std::string &_name="", bool _windowDecoration=false) const
 

Protected Attributes

osgQt::GraphicsWindowQt * myGraphicsWindow = nullptr
 
QTimer timerUpdate
 
- Protected Attributes inherited from FEVV::BaseAdapterVisuQt
QGridLayout * layout
 
- Protected Attributes inherited from FEVV::BaseAdapterVisu
ViewermyViewer = nullptr
 
bool bIsInit = false
 

Additional Inherited Members

- Public Types inherited from FEVV::BaseAdapterVisuQt
using ViewerOSG = BaseViewerOSG
 
- Public Types inherited from FEVV::BaseAdapterVisu
using Viewer = BaseViewer
 
using Plugin = BasePlugin
 

Detailed Description

SimpleAdapterVisu is a specialization of QWidget. This class is the widget added to a QMainWindow, who host an OSG Viewer.

See also
testViewer.cpp

Definition at line 50 of file SimpleAdapterVisu.h.

Constructor & Destructor Documentation

◆ SimpleAdapterVisu()

FEVV::SimpleAdapterVisu::SimpleAdapterVisu ( QWidget *  _parent = 0,
Qt::WindowFlags  _f = Qt::Widget 
)
inline

Constructor.

Note
The OpenSceneGraph viewer will be create and initialize if not set (see other constructors).
Parameters
[in]_parentPointer to the QWidget parent of this QWidget (used by Qt) (Default value = 0).
[in]_fWindows flags (used by Qt) (Default value = Qt::Widget).

Definition at line 33 of file SimpleAdapterVisu.inl.

◆ ~SimpleAdapterVisu()

FEVV::SimpleAdapterVisu::~SimpleAdapterVisu ( )
inline

Definition at line 66 of file SimpleAdapterVisu.h.

Member Function Documentation

◆ addViewWidget()

void FEVV::SimpleAdapterVisu::addViewWidget ( osg::ref_ptr< osgQt::GraphicsWindowQt >  _gw,
osg::ref_ptr< osg::Node >  _scene 
)
inlineprotected

Definition at line 199 of file SimpleAdapterVisu.inl.

Here is the call graph for this function:

◆ apply()

void FEVV::SimpleAdapterVisu::apply ( Plugin myPlugin)
inlineoverridevirtual

Get the window.

Returns
the window.

Implements FEVV::BaseAdapterVisu.

Definition at line 477 of file SimpleAdapterVisu.inl.

Here is the call graph for this function:

◆ createGraphicsWindow()

osg::ref_ptr< osgQt::GraphicsWindowQt > FEVV::SimpleAdapterVisu::createGraphicsWindow ( int  _x,
int  _y,
int  _w,
int  _h,
const std::string &  _name = "",
bool  _windowDecoration = false 
) const
inlineprotected

Definition at line 261 of file SimpleAdapterVisu.inl.

◆ event()

bool FEVV::SimpleAdapterVisu::event ( QEvent *  event)
inlineoverrideprotectedvirtual

Definition at line 389 of file SimpleAdapterVisu.inl.

◆ eventFilter()

bool FEVV::SimpleAdapterVisu::eventFilter ( QObject *  obj,
QEvent *  event 
)
inlineoverrideprotected

Needed to disable event listener on subwidget. See http://falsinsoft.blogspot.fr/2014/04/qt-get-child-controls-events.html Without this, we can't capture keyPress event.

Definition at line 423 of file SimpleAdapterVisu.inl.

◆ init() [1/2]

void FEVV::SimpleAdapterVisu::init ( )
inlineoverridevirtual

attach a Window to the current Widget.

Note
Must be called by window.init() initialize the widget.
Must attach himself to the viewer.

Implements FEVV::BaseAdapterVisu.

Definition at line 49 of file SimpleAdapterVisu.inl.

◆ init() [2/2]

void FEVV::SimpleAdapterVisu::init ( const bool  _useMdiWindows)
inline

Definition at line 57 of file SimpleAdapterVisu.inl.

Here is the call graph for this function:

◆ isInit()

bool FEVV::SimpleAdapterVisu::isInit ( ) const
inlineoverridevirtual

Implements FEVV::BaseAdapterVisu.

Definition at line 180 of file SimpleAdapterVisu.inl.

◆ isValid()

bool FEVV::SimpleAdapterVisu::isValid ( ) const
inlineoverridevirtual

Implements FEVV::BaseAdapterVisu.

Definition at line 188 of file SimpleAdapterVisu.inl.

◆ paintEvent()

virtual void FEVV::SimpleAdapterVisu::paintEvent ( QPaintEvent *  )
inlineoverrideprotectedvirtual

Definition at line 100 of file SimpleAdapterVisu.h.

Member Data Documentation

◆ myGraphicsWindow

osgQt::GraphicsWindowQt* FEVV::SimpleAdapterVisu::myGraphicsWindow = nullptr
protected

Definition at line 143 of file SimpleAdapterVisu.h.

◆ timerUpdate

QTimer FEVV::SimpleAdapterVisu::timerUpdate
protected

Definition at line 146 of file SimpleAdapterVisu.h.


The documentation for this class was generated from the following files: