You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.0 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef SAVEROUTEDIALOG_H
#define SAVEROUTEDIALOG_H
#include <QDialog>
#include <QString>
#include <QMap>
#include <QAbstractSpinBox>
#include <QSet>
namespace Ui {
class saveRouteDialog;
}
class saveRouteDialog : public QDialog
{
Q_OBJECT
public:
explicit saveRouteDialog(QWidget *parent = nullptr);
~saveRouteDialog();
public:
bool isCloseRoute(); //是否自动闭合曲线
QMap<int,double> getRouteHeight();
QMap<int,int> getRouteNumber();
QMap<int,int> getRouteType(); //获取航线类型
QMap<int,int> getRouteClosedState();
QString getRouteText();
void setMaxValue(int max);
void setDrawMode(int i);
void setMapType(int i);
void setHeightVisible(bool b);
//重写窗口关闭事件
void closeEvent(QCloseEvent *event);
//重写stepEnabled()
// QAbstractSpinBox::StepEnabled stepEnabled(int value);
public:
bool isClickedCloseBtn = false;
signals:
void importRoute(int routeID,int routeType,int routeNumber,double routeHeight,int routeClosedState);
void highLightGeometry(int currentGeometryID,int lastGeometryID);
public slots:
void getAddRouteState(int addState); //接收航线添加状态的信号
private slots:
void on_cancelRoute_clicked();
void on_isCloseRouteCheckBox_stateChanged(int arg1);
void on_importBtn_clicked();
void on_currentSpinBox_valueChanged(int arg1);
private:
void addRouteTypeItem(); //添加航线类型
void resetState(); // 表格状态重置
void historyState(int arg1); //恢复历史状态
// void saveCurrentRouteInfo();//保存当前航线属性信息
private:
Ui::saveRouteDialog *ui;
int addRouteState;
int lastRoute;
QSet<int> saveRouteID;
QMap<int,double> routeHeight;
QMap<int,int> routeType;
QMap<int,int> routeNumber;
QMap<int,int> routeClosedState;
QMap<int,int>routeSaveState;
int drawMode = 0;//仅用于兼容绘制航线保存模式
int mapType = 0; //地图模式默认为0表示2D1表示3D
};
#endif // SAVEROUTEDIALOG_H