Skip to content

Commit 540fb7a

Browse files
committed
astyle globe
1 parent 372e805 commit 540fb7a

8 files changed

+576
-566
lines changed

src/plugins/globe/globe_plugin.cpp

+196-195
Large diffs are not rendered by default.

src/plugins/globe/globe_plugin.h

+35-32
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class QgisInterface;
3838

3939
class GlobePlugin : public QObject, public QgisPlugin
4040
{
41-
Q_OBJECT
41+
Q_OBJECT
4242

4343
public:
4444
GlobePlugin( QgisInterface* theQgisInterface );
@@ -76,7 +76,7 @@ class GlobePlugin : public QObject, public QgisPlugin
7676
//! prints the ccordinates in a QMessageBox
7777
void showSelectedCoordinates();
7878
//! emits signal with current mouse coordinates
79-
void showCurrentCoordinates(double lon, double lat);
79+
void showCurrentCoordinates( double lon, double lat );
8080
//! get longitude of user right click
8181
double getSelectedLon();
8282
//! get latitude of user right click
@@ -89,7 +89,7 @@ class GlobePlugin : public QObject, public QgisPlugin
8989
void placeNode( osg::Node* node, double lat, double lon, double alt = 0.0 );
9090

9191
//! Recursive copy folder
92-
static void copyFolder(QString sourceFolder, QString destFolder);
92+
static void copyFolder( QString sourceFolder, QString destFolder );
9393

9494
private:
9595
//! Set HTTP proxy settings
@@ -132,7 +132,7 @@ class GlobePlugin : public QObject, public QgisPlugin
132132
//! coordinates of the right-clicked point on the globe
133133
double mSelectedLat, mSelectedLon, mSelectedElevation;
134134

135-
signals:
135+
signals:
136136
//! emits current mouse position
137137
void xyCoordinates( const QgsPoint & p );
138138
//! emits position of right click on globe
@@ -142,27 +142,27 @@ class GlobePlugin : public QObject, public QgisPlugin
142142
class FlyToExtentHandler : public osgGA::GUIEventHandler
143143
{
144144
public:
145-
FlyToExtentHandler( GlobePlugin* globe ) : mGlobe ( globe ) { }
145+
FlyToExtentHandler( GlobePlugin* globe ) : mGlobe( globe ) { }
146146

147147
bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
148148

149149
private:
150-
GlobePlugin* mGlobe;
150+
GlobePlugin* mGlobe;
151151
};
152152

153153
// An event handler that will print out the coordinates at the clicked point
154154
class QueryCoordinatesHandler : public osgGA::GUIEventHandler
155155
{
156-
public:
156+
public:
157157
QueryCoordinatesHandler( GlobePlugin* globe, osgEarth::Util::ElevationManager* elevMan,
158158
const osgEarth::SpatialReference* mapSRS )
159-
: mGlobe ( globe ), _elevMan(elevMan), _mapSRS( mapSRS ), _mouseDown( false ) { }
159+
: mGlobe( globe ), _elevMan( elevMan ), _mapSRS( mapSRS ), _mouseDown( false ) { }
160160

161-
bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa);
161+
bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
162162

163-
virtual osg::Vec3d getCoords( float x, float y, osgViewer::View* view, bool getElevation = false);
163+
virtual osg::Vec3d getCoords( float x, float y, osgViewer::View* view, bool getElevation = false );
164164

165-
private:
165+
private:
166166
GlobePlugin* mGlobe;
167167
osg::ref_ptr<const SpatialReference> _mapSRS;
168168
osg::ref_ptr<osgEarth::Util::ElevationManager> _elevMan;
@@ -173,7 +173,7 @@ class QueryCoordinatesHandler : public osgGA::GUIEventHandler
173173
class KeyboardControlHandler : public osgGA::GUIEventHandler
174174
{
175175
public:
176-
KeyboardControlHandler( osgEarth::Util::EarthManipulator* manip, QgisInterface *qGisIface ) : _manip(manip), mQGisIface(qGisIface) { }
176+
KeyboardControlHandler( osgEarth::Util::EarthManipulator* manip, QgisInterface *qGisIface ) : _manip( manip ), mQGisIface( qGisIface ) { }
177177

178178
bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
179179

@@ -185,29 +185,32 @@ class KeyboardControlHandler : public osgGA::GUIEventHandler
185185
};
186186

187187

188-
namespace osgEarth { namespace Util
188+
namespace osgEarth
189189
{
190-
namespace Controls
190+
namespace Util
191191
{
192-
class NavigationControlHandler : public ControlEventHandler
192+
namespace Controls
193193
{
194-
public:
195-
virtual void onMouseDown( class Control* control, int mouseButtonMask ) { }
196-
virtual void onClick( class Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa ) { }
197-
};
198-
199-
class NavigationControl : public ImageControl
200-
{
201-
public:
202-
NavigationControl( osg::Image* image = 0L ) : ImageControl( image ), _mouse_down_event( NULL ) {}
203-
204-
protected:
205-
virtual bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, ControlContext& cx );
206-
207-
private:
208-
osg::ref_ptr<const osgGA::GUIEventAdapter> _mouse_down_event;
209-
};
194+
class NavigationControlHandler : public ControlEventHandler
195+
{
196+
public:
197+
virtual void onMouseDown( class Control* control, int mouseButtonMask ) { }
198+
virtual void onClick( class Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa ) { }
199+
};
200+
201+
class NavigationControl : public ImageControl
202+
{
203+
public:
204+
NavigationControl( osg::Image* image = 0L ) : ImageControl( image ), _mouse_down_event( NULL ) {}
205+
206+
protected:
207+
virtual bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, ControlContext& cx );
208+
209+
private:
210+
osg::ref_ptr<const osgGA::GUIEventAdapter> _mouse_down_event;
211+
};
212+
}
210213
}
211-
} }
214+
}
212215

213216
#endif // QGS_GLOBE_PLUGIN_H

0 commit comments

Comments
 (0)