Files
envi-code/SourceCode/Code2026/tg_shs/shs_annotate/RoadGradeDlg.h
T
2026-09-28 15:28:50 +08:00

75 lines
2.7 KiB
C++

#pragma once
#include "resource.h"
#include "afxwin.h"
#include <list>
#include <aced.h>
//道路坡度标注对话框
class CRoadGradeDlg : public CModelessDialog
{
public:
DECLARE_DYNAMIC(CRoadGradeDlg)
CRoadGradeDlg(CWnd* pParent = NULL); // 标准构造函数
virtual ~CRoadGradeDlg();
enum { IDD = IDD_DLG_ROADGRADE };
void Dlg2Obj(TDbSymbArrow *pSymbArrow); //设置箭头标注属性
BOOL SetDisFormatData(TDbSymbArrow *pSymbArrow, double dDis, double dGrade);
int GetArrowLineLength();//获取箭头线长度
int GetAccuracyLength(){ return m_iAccuracyLength;}//获取距离精度
int GetAccuracyGrade() { return m_iAccuracyGrade;} //获取坡度精度
double GetArrowSize();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
virtual BOOL OnInitDialog();
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedCancel();
afx_msg void OnBnClickedChkGrade();
afx_msg void OnBnClickedChkLength();
afx_msg void OnBnClickedBtnTextheight();
afx_msg void OnCbnSelchangeCmbTextheight();
afx_msg void OnCbnEditchangeCmbArrowsize();
/*afx_msg void OnCbnSelchangeCmbUnits();*/
afx_msg void OnCbnEditchangeCmbTextheight();
afx_msg void OnCbnSelchangeCmbArrowstyle();
afx_msg void OnBnClickedChkEqnstyle();
afx_msg void OnBnClickedChkGradePercent();
afx_msg void OnCbnSelchangeCmbArrowsize();
afx_msg void OnCbnSelchangeCmbGrade();
afx_msg void OnCbnSelchangeCmbLength();
afx_msg void OnCbnSelchangeCmbTextstyle();
afx_msg void OnBnClickedBtnConfirm();
DECLARE_MESSAGE_MAP()
private:
CComboBox m_CmbTextStyle; //控件文字样式
int m_iAccuracyLength; //commbox选择保存 距离 精度
int m_iAccuracyGrade; //commbox选择保存 坡度 精度
int m_iArrowStyle; //箭头样式
CString m_strTextHigh; //字高
CString m_strArrowSize; //箭头大小
CString m_strTextStyle; //文字样式
std::list<int> m_cmbStatus; //checkbox至少选一个状态存储
BOOL m_bGrade; //坡度
BOOL m_bDis; //距离
BOOL m_bPercent; // % 表示
BOOL m_bEqu; //等式表示
private:
void LoadAccuracyStyle(int); //加载控件初始化
void LoadSize(int); //大小comobox控件初始化
BOOL LoadTextStyle(); //文字样式
CString Double2StrByFormat(double dNums, BOOL bDis = TRUE); //格式化为指定精度
void OnButtonTextHeight(); //点击字高相关
void GetTextHeight(); //点击字高相关
void SetDefalutTextStyleAndTextHight();//设置的默认文字样式和文字字高
private:
void SetDefaultRoadGradeData(); //写入数据到注册表中
void LoadDefaultRoadGradeData(); //读取注册表数据
};