63 lines
990 B
C++
63 lines
990 B
C++
|
|
#ifndef RULEDIALOG_H
|
||
|
|
#define RULEDIALOG_H
|
||
|
|
|
||
|
|
#include <QDialog>
|
||
|
|
#include <QtMath>
|
||
|
|
#include "QCloseEvent"
|
||
|
|
|
||
|
|
namespace Ui {
|
||
|
|
class RuleDialog;
|
||
|
|
}
|
||
|
|
|
||
|
|
class RuleDialog : public QDialog
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
qreal lat = 0;
|
||
|
|
qreal lng = 0;
|
||
|
|
}point_t;
|
||
|
|
|
||
|
|
explicit RuleDialog(QWidget *parent = 0);
|
||
|
|
~RuleDialog();
|
||
|
|
|
||
|
|
signals:
|
||
|
|
void isWindowClose(char);
|
||
|
|
|
||
|
|
void exitRuler();
|
||
|
|
|
||
|
|
|
||
|
|
void valuechanged(int num,qreal value);
|
||
|
|
|
||
|
|
public slots:
|
||
|
|
double GetDiatance(qreal lat1,qreal lng1,qreal lat2 ,qreal lng2);
|
||
|
|
double GetHeading(qreal lat1,qreal lng1,qreal lat2 ,qreal lng2);
|
||
|
|
|
||
|
|
void RulePoint(int num, qreal lat, qreal lng);
|
||
|
|
void ShowMousePos(qreal lat,qreal lng);
|
||
|
|
|
||
|
|
void Lineinfo(qreal dis,qreal bearing);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
|
||
|
|
void closeEvent(QCloseEvent *event);
|
||
|
|
|
||
|
|
private slots:
|
||
|
|
|
||
|
|
void on_ConformButton_clicked();
|
||
|
|
|
||
|
|
|
||
|
|
private:
|
||
|
|
Ui::RuleDialog *ui;
|
||
|
|
point_t Point1;
|
||
|
|
point_t Point2;
|
||
|
|
|
||
|
|
|
||
|
|
quint8 CurrentPoint;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // RULEDIALOG_H
|