|
33 | 33 | #include <osgText/Text>
|
34 | 34 | #include <vector>
|
35 | 35 | #include <queue>
|
| 36 | +#include <qglobal.h> |
36 | 37 |
|
37 | 38 | #undef OSGEARTHUTIL_EXPORT
|
38 | 39 | #define OSGEARTHUTIL_EXPORT
|
@@ -100,25 +101,25 @@ namespace osgEarth { namespace Util { namespace Controls21
|
100 | 101 | {
|
101 | 102 | public:
|
102 | 103 | /** Click event. */
|
103 |
| - virtual void onClick( class Control* control ) { } |
| 104 | + virtual void onClick( class Control* control ) { Q_UNUSED(control); } |
104 | 105 |
|
105 | 106 | /** Click event with mouse button mask (see osgGA::GUIEventAdapter::MouseButtonMask) */
|
106 |
| - virtual void onClick( class Control* control, int mouseButtonMask ) { onClick(control); } |
| 107 | + virtual void onClick( class Control* control, int mouseButtonMask ) { Q_UNUSED( mouseButtonMask ); onClick(control); } |
107 | 108 |
|
108 | 109 | /** Click event with click position (negative values mean you're in the left/top padding) */
|
109 |
| - virtual void onClick( class Control* control, const osg::Vec2f& pos, int mouseButtonMask ) { onClick(control, mouseButtonMask); } |
| 110 | + virtual void onClick( class Control* control, const osg::Vec2f& pos, int mouseButtonMask ) { Q_UNUSED( pos); onClick(control, mouseButtonMask); } |
110 | 111 |
|
111 | 112 | /** Value events */
|
112 |
| - virtual void onValueChanged( class Control* control, bool value ) { } |
113 |
| - virtual void onValueChanged( class Control* control, double value ) { } |
114 |
| - virtual void onValueChanged( class Control* control, float value ) { } |
115 |
| - virtual void onValueChanged( class Control* control, int value ) { } |
116 |
| - virtual void onValueChanged( class Control* control, const osg::Vec3f& value ) { } |
117 |
| - virtual void onValueChanged( class Control* control, const osg::Vec2f& value ) { } |
118 |
| - virtual void onValueChanged( class Control* control, const osg::Vec3d& value ) { } |
119 |
| - virtual void onValueChanged( class Control* control, const osg::Vec2d& value ) { } |
120 |
| - virtual void onValueChanged( class Control* control, const std::string& value ) { } |
121 |
| - virtual void onValueChanged( class Control* control, void* value ) { } |
| 113 | + virtual void onValueChanged( class Control* control, bool value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 114 | + virtual void onValueChanged( class Control* control, double value ) { Q_UNUSED( control ); Q_UNUSED( value );} |
| 115 | + virtual void onValueChanged( class Control* control, float value ) { Q_UNUSED( control ); Q_UNUSED( value );} |
| 116 | + virtual void onValueChanged( class Control* control, int value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 117 | + virtual void onValueChanged( class Control* control, const osg::Vec3f& value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 118 | + virtual void onValueChanged( class Control* control, const osg::Vec2f& value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 119 | + virtual void onValueChanged( class Control* control, const osg::Vec3d& value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 120 | + virtual void onValueChanged( class Control* control, const osg::Vec2d& value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 121 | + virtual void onValueChanged( class Control* control, const std::string& value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
| 122 | + virtual void onValueChanged( class Control* control, void* value ) { Q_UNUSED( control ); Q_UNUSED( value ); } |
122 | 123 | };
|
123 | 124 |
|
124 | 125 | typedef std::list< osg::ref_ptr<ControlEventHandler> > ControlEventHandlerList;
|
@@ -181,10 +182,10 @@ namespace osgEarth { namespace Util { namespace Controls21
|
181 | 182 | bool horizFill() const { return _hfill; }
|
182 | 183 |
|
183 | 184 | void setVertFill( bool value, float minHeight =0.0f );
|
184 |
| - const bool vertFill() const { return _vfill; } |
| 185 | + bool vertFill() const { return _vfill; } |
185 | 186 |
|
186 | 187 | void setVisible( bool value );
|
187 |
| - const bool visible() const { return _visible; } |
| 188 | + bool visible() const { return _visible; } |
188 | 189 |
|
189 | 190 | void setForeColor( const osg::Vec4f& value );
|
190 | 191 | void setForeColor( float r, float g, float b, float a ) { setForeColor( osg::Vec4f(r,g,b,a) ); }
|
@@ -218,7 +219,7 @@ namespace osgEarth { namespace Util { namespace Controls21
|
218 | 219 | bool isDirty() const { return _dirty; }
|
219 | 220 |
|
220 | 221 | virtual void calcSize( const ControlContext& context, osg::Vec2f& out_size );
|
221 |
| - virtual void calcFill( const ControlContext& context ) { } |
| 222 | + virtual void calcFill( const ControlContext& context ) { Q_UNUSED( context ); } |
222 | 223 | virtual void calcPos ( const ControlContext& context, const osg::Vec2f& cursor, const osg::Vec2f& parentSize );
|
223 | 224 | virtual void draw ( const ControlContext& context, DrawableList& out_drawables );
|
224 | 225 |
|
@@ -248,15 +249,15 @@ namespace osgEarth { namespace Util { namespace Controls21
|
248 | 249 |
|
249 | 250 | private:
|
250 | 251 | osgEarth::optional<float> _x, _y, _width, _height;
|
251 |
| - bool _hfill, _vfill; |
252 | 252 | Gutter _margin;
|
253 | 253 | Gutter _padding;
|
254 | 254 | bool _visible;
|
255 | 255 | optional<Alignment> _valign, _halign;
|
256 | 256 | optional<osg::Vec4f> _backColor, _foreColor, _activeColor;
|
257 |
| - osg::observer_ptr<Control> _parent; |
258 | 257 | bool _active;
|
259 | 258 | bool _absorbEvents;
|
| 259 | + bool _hfill, _vfill; |
| 260 | + osg::observer_ptr<Control> _parent; |
260 | 261 | osg::ref_ptr<osg::Geometry> _geom;
|
261 | 262 | };
|
262 | 263 |
|
@@ -561,8 +562,8 @@ namespace osgEarth { namespace Util { namespace Controls21
|
561 | 562 | {
|
562 | 563 | PerViewData();
|
563 | 564 | bool _obscured;
|
564 |
| - osg::Vec3f _screenPos; |
565 | 565 | float _visibleTime;
|
| 566 | + osg::Vec3f _screenPos; |
566 | 567 | unsigned _visitFrame;
|
567 | 568 | osg::ref_ptr<osg::Uniform> _uniform;
|
568 | 569 | osg::observer_ptr<osg::Camera> _canvas;
|
@@ -609,9 +610,9 @@ namespace osgEarth { namespace Util { namespace Controls21
|
609 | 610 |
|
610 | 611 | osg::ref_ptr<osg::Group> _group;
|
611 | 612 | std::vector<osg::BoundingBox> _taken;
|
| 613 | + bool _sortingEnabled; |
612 | 614 | bool _sortByDistance;
|
613 | 615 | bool _fading;
|
614 |
| - bool _sortingEnabled; |
615 | 616 |
|
616 | 617 | friend class ControlCanvas;
|
617 | 618 | friend class ControlNode;
|
|
0 commit comments