-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMeasureTool.h
45 lines (33 loc) · 1.08 KB
/
MeasureTool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef CMEASURETOOL_H
#define CMEASURETOOL_H
#include <osgEarthUtil/MeasureTool>
#include <osgEarthQt/ViewerWidget>
#include <QWidget>
#include <QStringList>
namespace Ui {
class CMeasureTool;
}
class CMeasureTool : public QWidget
{
Q_OBJECT
public:
explicit CMeasureTool(QWidget *parent = 0);
explicit CMeasureTool(osgViewer::Viewer* viewer,
osg::Group* root,
osgEarth::MapNode* map,
QWidget *parent = 0);
virtual ~CMeasureTool();
virtual void onDistanceChanged(osgEarth::Util::MeasureToolHandler* sender,
double distance);
private slots:
void on_cbPath_clicked();
void on_cbGreatCircle_clicked();
void on_cbUnit_currentIndexChanged(int index);
private:
Ui::CMeasureTool *ui;
osgViewer::Viewer* m_pViewer;
osg::ref_ptr<osgEarth::MapNode> m_MapNode;
osg::ref_ptr<osgEarth::Util::MeasureToolHandler> m_MeasureTool;
QStringList m_Units;
};
#endif // CMEASURETOOL_H