Skip to content
Permalink
Browse files

fix globe warnings

  • Loading branch information
jef-n committed Oct 3, 2012
1 parent bc1bce1 commit d76e1b80f9dc5197c23c47b5181913a338308bdc
@@ -9,6 +9,7 @@ qgis (1.9.0) UNRELEASED; urgency=low
* add python-unittest2 build dependency for maverick and squeeze
* disable PyQgsRectangle test on lucid (depends on unittest2)
* add python-qscintilla2 dependency to python-qgis
* add support for ubuntu quantal

-- Jürgen E. Fischer <jef@norbit.de> Tue, 18 Sep 2012 22:18:25 +0200

@@ -702,7 +702,9 @@ QgsSymbolV2* QgsSymbolLayerV2Utils::loadSymbol( QDomElement& element )
QgsSymbolV2* subSymbol = loadSymbol( s );
bool res = layer->setSubSymbol( subSymbol );
if ( !res )
{
QgsDebugMsg( "symbol layer refused subsymbol: " + s.attribute( "name" ) );
}
}
layers.append( layer );
}
@@ -27,8 +27,6 @@ SET (globe_plugin_UIS
SET (globe_plugin_MOC_HDRS
globe_plugin.h
globe_plugin_dialog.h
osgEarthQt/Common
osgEarthQt/ViewerWidget
)

SET (globe_plugin_RCCS globe_plugin.qrc)
@@ -158,6 +158,7 @@ void ViewerWidget::reconfigure( osgViewer::View* view )

void ViewerWidget::paintEvent(QPaintEvent* e)
{
Q_UNUSED( e );
if (_viewer->getRunFrameScheme() == osgViewer::ViewerBase::CONTINUOUS ||
_viewer->checkNeedToDoFrame() )
{
@@ -33,6 +33,7 @@
#include <osgText/Text>
#include <vector>
#include <queue>
#include <qglobal.h>

#undef OSGEARTHUTIL_EXPORT
#define OSGEARTHUTIL_EXPORT
@@ -100,25 +101,25 @@ namespace osgEarth { namespace Util { namespace Controls21
{
public:
/** Click event. */
virtual void onClick( class Control* control ) { }
virtual void onClick( class Control* control ) { Q_UNUSED(control); }

/** Click event with mouse button mask (see osgGA::GUIEventAdapter::MouseButtonMask) */
virtual void onClick( class Control* control, int mouseButtonMask ) { onClick(control); }
virtual void onClick( class Control* control, int mouseButtonMask ) { Q_UNUSED( mouseButtonMask ); onClick(control); }

/** Click event with click position (negative values mean you're in the left/top padding) */
virtual void onClick( class Control* control, const osg::Vec2f& pos, int mouseButtonMask ) { onClick(control, mouseButtonMask); }
virtual void onClick( class Control* control, const osg::Vec2f& pos, int mouseButtonMask ) { Q_UNUSED( pos); onClick(control, mouseButtonMask); }

/** Value events */
virtual void onValueChanged( class Control* control, bool value ) { }
virtual void onValueChanged( class Control* control, double value ) { }
virtual void onValueChanged( class Control* control, float value ) { }
virtual void onValueChanged( class Control* control, int value ) { }
virtual void onValueChanged( class Control* control, const osg::Vec3f& value ) { }
virtual void onValueChanged( class Control* control, const osg::Vec2f& value ) { }
virtual void onValueChanged( class Control* control, const osg::Vec3d& value ) { }
virtual void onValueChanged( class Control* control, const osg::Vec2d& value ) { }
virtual void onValueChanged( class Control* control, const std::string& value ) { }
virtual void onValueChanged( class Control* control, void* value ) { }
virtual void onValueChanged( class Control* control, bool value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, double value ) { Q_UNUSED( control ); Q_UNUSED( value );}
virtual void onValueChanged( class Control* control, float value ) { Q_UNUSED( control ); Q_UNUSED( value );}
virtual void onValueChanged( class Control* control, int value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, const osg::Vec3f& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, const osg::Vec2f& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, const osg::Vec3d& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, const osg::Vec2d& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, const std::string& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
virtual void onValueChanged( class Control* control, void* value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
};

typedef std::list< osg::ref_ptr<ControlEventHandler> > ControlEventHandlerList;
@@ -181,10 +182,10 @@ namespace osgEarth { namespace Util { namespace Controls21
bool horizFill() const { return _hfill; }

void setVertFill( bool value, float minHeight =0.0f );
const bool vertFill() const { return _vfill; }
bool vertFill() const { return _vfill; }

void setVisible( bool value );
const bool visible() const { return _visible; }
bool visible() const { return _visible; }

void setForeColor( const osg::Vec4f& value );
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
bool isDirty() const { return _dirty; }

virtual void calcSize( const ControlContext& context, osg::Vec2f& out_size );
virtual void calcFill( const ControlContext& context ) { }
virtual void calcFill( const ControlContext& context ) { Q_UNUSED( context ); }
virtual void calcPos ( const ControlContext& context, const osg::Vec2f& cursor, const osg::Vec2f& parentSize );
virtual void draw ( const ControlContext& context, DrawableList& out_drawables );

@@ -248,15 +249,15 @@ namespace osgEarth { namespace Util { namespace Controls21

private:
osgEarth::optional<float> _x, _y, _width, _height;
bool _hfill, _vfill;
Gutter _margin;
Gutter _padding;
bool _visible;
optional<Alignment> _valign, _halign;
optional<osg::Vec4f> _backColor, _foreColor, _activeColor;
osg::observer_ptr<Control> _parent;
bool _active;
bool _absorbEvents;
bool _hfill, _vfill;
osg::observer_ptr<Control> _parent;
osg::ref_ptr<osg::Geometry> _geom;
};

@@ -561,8 +562,8 @@ namespace osgEarth { namespace Util { namespace Controls21
{
PerViewData();
bool _obscured;
osg::Vec3f _screenPos;
float _visibleTime;
osg::Vec3f _screenPos;
unsigned _visitFrame;
osg::ref_ptr<osg::Uniform> _uniform;
osg::observer_ptr<osg::Camera> _canvas;
@@ -609,9 +610,9 @@ namespace osgEarth { namespace Util { namespace Controls21

osg::ref_ptr<osg::Group> _group;
std::vector<osg::BoundingBox> _taken;
bool _sortingEnabled;
bool _sortByDistance;
bool _fading;
bool _sortingEnabled;

friend class ControlCanvas;
friend class ControlNode;
@@ -43,15 +43,15 @@ namespace
{
// ControlNodeBin shaders.

char* s_controlVertexShader =
const char* s_controlVertexShader =
"void main() \n"
"{ \n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
" gl_TexCoord[0] = gl_MultiTexCoord0; \n"
" gl_FrontColor = gl_Color; \n"
"} \n";

char* s_imageControlFragmentShader =
const char* s_imageControlFragmentShader =
"uniform sampler2D tex0; \n"
"uniform float visibleTime; \n"
"uniform float osg_FrameTime; \n"
@@ -62,7 +62,7 @@ namespace
" gl_FragColor = vec4(texel.rgb, texel.a * opacity); \n"
"} \n";

char* s_labelControlFragmentShader =
const char* s_labelControlFragmentShader =
"uniform sampler2D tex0; \n"
"uniform float visibleTime; \n"
"uniform float osg_FrameTime; \n"
@@ -318,6 +318,7 @@ Control::dirty()
void
Control::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
{
Q_UNUSED( cx );
if ( visible() == true )
{
_renderSize.set(
@@ -337,6 +338,7 @@ Control::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
void
Control::calcPos(const ControlContext& cx, const osg::Vec2f& cursor, const osg::Vec2f& parentSize)
{
Q_UNUSED( cx );
if ( _x.isSet() )
{
_renderPos.x() = cursor.x() + margin().left() + padding().left() + *x();
@@ -426,6 +428,7 @@ Control::draw(const ControlContext& cx, DrawableList& out )
bool
Control::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, ControlContext& cx )
{
Q_UNUSED( aa );
bool handled = false;

if ( _eventHandlers.size() > 0 )
@@ -495,6 +498,7 @@ ImageControl::setFixSizeForRotation( bool value )
void
ImageControl::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
{
Q_UNUSED( cx );
if ( visible() == true )
{
_renderSize.set( 0, 0 );
@@ -862,6 +866,8 @@ Frame::Frame()
void
Frame::calcPos(const ControlContext& context, const osg::Vec2f& cursor, const osg::Vec2f& parentSize)
{
Q_UNUSED( context );
Q_UNUSED( parentSize );
_renderPos = cursor;
}

@@ -1009,6 +1015,7 @@ Container::applyChildAligns()
void
Container::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
{
Q_UNUSED( out_size );
if ( visible() == true )
{
if ( _frame.valid() )
@@ -1412,6 +1419,7 @@ Grid::expandToInclude( int col, int row )
void
Grid::addControl( Control* control, int index )
{
Q_UNUSED( index );
// creates a new row and puts the control in its first column
setControl( 0, _rows.size(), control );
}
@@ -1628,6 +1636,7 @@ namespace osgEarth { namespace Util { namespace Controls21

void operator()( osg::Node* node, osg::NodeVisitor* nv )
{
Q_UNUSED( nv );
osg::Camera* camera = static_cast<osg::Camera*>(node);
osgViewer::View* view2 = dynamic_cast<osgViewer::View*>(camera->getView());
install( view2, _canvas.get() );
@@ -1778,6 +1787,7 @@ void
ControlNodeBin::draw( const ControlContext& context, bool newContext, int bin )
{
const osg::Viewport* vp = context._vp.get();
Q_UNUSED( vp );
osg::Vec2f surfaceSize( context._vp->width(), context._vp->height() );

// we don't really need to keep this list in the object, but that prevents it from having to

0 comments on commit d76e1b8

Please sign in to comment.
You can’t perform that action at this time.