21 #ifndef _OF_QWIDGETPANEL_ 22 #define _OF_QWIDGETPANEL_ 28 #include <osg/Geometry> 29 #include <osgViewer/ViewerEventHandlers> 33 QT_FORWARD_DECLARE_CLASS(QWidget);
55 QWidgetPanel(
const std::string &name,
const osg::Vec3 &color );
56 QWidgetPanel(
const std::string &name,
const osg::Vec4 &color );
57 QWidgetPanel(
const std::string &name ,
float r,
float g,
float b,
float a = 1.0 );
61 virtual void showContents(
bool showContents);
62 virtual bool getContentsShown()
const;
65 void setSize(
const double &width,
const double &height);
66 void getSize(
double &width,
double &height);
69 bool setWidget( QWidget *widget );
72 void setIgnoreWidget( QWidget *widget,
bool ignore );
76 osg::Image*
getImage() {
return (osg::Image*)_image.get(); }
79 void setImageHandler(osgViewer::InteractiveImageHandler *handler);
80 osgViewer::InteractiveImageHandler* getImageHandler()
const;
85 virtual void setColor(
const osg::Vec4 &color );
86 using ReferenceFrame::setColor;
89 virtual const osg::BoundingSphere& getBound()
const;
94 osg::ref_ptr<osg::Geode> _geode;
95 osg::ref_ptr<osg::Geometry> _panel;
96 osg::ref_ptr<osg::Geometry> _panelBack;
97 osg::ref_ptr<QWidgetImage> _image;
100 static const double DEFAULT_LENGTH;
101 static const double DEFAULT_PIXELS_PER_UNIT;
103 std::vector<QWidget *> _ignoredWidgets;
106 void _rescaleWidget();
Definition: CoordinateAxes.hpp:29
Definition: ReferenceFrame.hpp:54