@@ -38,7 +38,7 @@ class QgisInterface;
38
38
39
39
class GlobePlugin : public QObject , public QgisPlugin
40
40
{
41
- Q_OBJECT
41
+ Q_OBJECT
42
42
43
43
public:
44
44
GlobePlugin ( QgisInterface* theQgisInterface );
@@ -76,7 +76,7 @@ class GlobePlugin : public QObject, public QgisPlugin
76
76
// ! prints the ccordinates in a QMessageBox
77
77
void showSelectedCoordinates ();
78
78
// ! emits signal with current mouse coordinates
79
- void showCurrentCoordinates (double lon, double lat);
79
+ void showCurrentCoordinates ( double lon, double lat );
80
80
// ! get longitude of user right click
81
81
double getSelectedLon ();
82
82
// ! get latitude of user right click
@@ -89,7 +89,7 @@ class GlobePlugin : public QObject, public QgisPlugin
89
89
void placeNode ( osg::Node* node, double lat, double lon, double alt = 0.0 );
90
90
91
91
// ! Recursive copy folder
92
- static void copyFolder (QString sourceFolder, QString destFolder);
92
+ static void copyFolder ( QString sourceFolder, QString destFolder );
93
93
94
94
private:
95
95
// ! Set HTTP proxy settings
@@ -132,7 +132,7 @@ class GlobePlugin : public QObject, public QgisPlugin
132
132
// ! coordinates of the right-clicked point on the globe
133
133
double mSelectedLat , mSelectedLon , mSelectedElevation ;
134
134
135
- signals:
135
+ signals:
136
136
// ! emits current mouse position
137
137
void xyCoordinates ( const QgsPoint & p );
138
138
// ! emits position of right click on globe
@@ -142,27 +142,27 @@ class GlobePlugin : public QObject, public QgisPlugin
142
142
class FlyToExtentHandler : public osgGA ::GUIEventHandler
143
143
{
144
144
public:
145
- FlyToExtentHandler ( GlobePlugin* globe ) : mGlobe ( globe ) { }
145
+ FlyToExtentHandler ( GlobePlugin* globe ) : mGlobe ( globe ) { }
146
146
147
147
bool handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
148
148
149
149
private:
150
- GlobePlugin* mGlobe ;
150
+ GlobePlugin* mGlobe ;
151
151
};
152
152
153
153
// An event handler that will print out the coordinates at the clicked point
154
154
class QueryCoordinatesHandler : public osgGA ::GUIEventHandler
155
155
{
156
- public:
156
+ public:
157
157
QueryCoordinatesHandler ( GlobePlugin* globe, osgEarth::Util::ElevationManager* elevMan,
158
158
const osgEarth::SpatialReference* mapSRS )
159
- : mGlobe ( globe ), _elevMan(elevMan), _mapSRS( mapSRS ), _mouseDown( false ) { }
159
+ : mGlobe ( globe ), _elevMan( elevMan ), _mapSRS( mapSRS ), _mouseDown( false ) { }
160
160
161
- bool handle (const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa);
161
+ bool handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
162
162
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 );
164
164
165
- private:
165
+ private:
166
166
GlobePlugin* mGlobe ;
167
167
osg::ref_ptr<const SpatialReference> _mapSRS;
168
168
osg::ref_ptr<osgEarth::Util::ElevationManager> _elevMan;
@@ -173,7 +173,7 @@ class QueryCoordinatesHandler : public osgGA::GUIEventHandler
173
173
class KeyboardControlHandler : public osgGA ::GUIEventHandler
174
174
{
175
175
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 ) { }
177
177
178
178
bool handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa );
179
179
@@ -185,29 +185,32 @@ class KeyboardControlHandler : public osgGA::GUIEventHandler
185
185
};
186
186
187
187
188
- namespace osgEarth { namespace Util
188
+ namespace osgEarth
189
189
{
190
- namespace Controls
190
+ namespace Util
191
191
{
192
- class NavigationControlHandler : public ControlEventHandler
192
+ namespace Controls
193
193
{
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
+ }
210
213
}
211
- } }
214
+ }
212
215
213
216
#endif // QGS_GLOBE_PLUGIN_H
0 commit comments