QGISView.h
资源名称:QGIS.rar [点击查看]
上传用户:oybseng
上传日期:2015-04-27
资源大小:7831k
文件大小:6k
源码类别:
GDI/图象编程
开发平台:
Visual C++
- // QGISView.h : interface of the CQGISView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_QGISVIEW_H__00110FB6_1091_477C_ADEE_8C220E4BCED2__INCLUDED_)
- #define AFX_QGISVIEW_H__00110FB6_1091_477C_ADEE_8C220E4BCED2__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "QObjectsincludeQBaseObj.h"
- #include "QObjectsincludeQPointArray.h"
- #include "QObjectsincludeQEllipseObj.h"
- class CQLineObj;
- class CQBaseObj;
- //选择对象枚举类型
- enum enumSelectType
- {
- QGIS_SELECT_UNKNOWN,QGIS_SELECT_POINT,QGIS_SELECT_LINE,QGIS_SELECT_AEAR,QGIS_SELECT_LABEL,QGIS_PT_LINK_LINE
- };
- #include <vector>
- using std::vector;
- class CQGISView : public CView
- {
- protected: // create from serialization only
- CQGISView();
- DECLARE_DYNCREATE(CQGISView)
- // Attributes
- public:
- CQGISDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CQGISView)
- public:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- protected:
- virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
- virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void FindNearestTwoPoints(int & nFirst,CQPoint * pPt,CQLineObj * pLine);
- CQPoint GetWEndPos();
- CQPoint GetWOldPos();
- CQPoint GetwBeginPos();
- CPoint GetEndPos();
- CPoint GetOldPos();
- CPoint GetBeginPos();
- void DrawEllipse(CQEllipseObj & ellipse,CDC * pDC);
- CQEllipseObj * CreateEllipse(CQEllipseObj & Ellipse);
- virtual ~CQGISView();
- CRect DrawAxis(BOOL bDraw,CDC * pDC,long &lWndX,long &lWndY); //绘制坐标轴的代码
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- int m_nLbtDown; // 左键按下次数
- CQPoint m_ptBegin; // 起点 用于绘制橡皮线
- CQPoint m_ptOld; // 旧点
- CQPoint m_ptEnd; // 终点
- CPoint m_ptLBegin;//逻辑坐标的起点
- CPoint m_ptLOld; //逻辑坐标的旧点
- CPoint m_ptLEnd; //逻辑坐标的终点
- CQPoint ptCenter;
- CQPointArray m_ptArray; //点集数组,用于存放临时的点对象
- CQEllipseObj m_Ellipse; //绘制椭圆需要的椭圆临时对象
- BOOL m_bDrawAxis;
- vector<CQBaseObj *> m_vecObj;
- enumSelectType m_nSelectType; //选择类型 默认为0表示全选
- // Generated message map functions
- protected:
- //{{AFX_MSG(CQGISView)
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnCancelMode();
- afx_msg void OnMenuAddLineQgis();
- afx_msg void OnMenuAddPointQgis();
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- afx_msg void OnMenuSetMapAtt();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnMenuPtSelectObjQgis();
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnMenuUselectObjQgis();
- afx_msg void OnMenuLineAttSet();
- afx_msg void OnUpdateMenuLineAttSet(CCmdUI* pCmdUI);
- afx_msg void OnMenuRectSelectObjQgis();
- afx_msg void OnMenuDeleteObjQgis();
- afx_msg void OnMenuAddPolyline();
- afx_msg void OnEditButtonArrow();
- afx_msg void OnMenuMoveObjQgis();
- afx_msg void OnUpdateMenuMoveObjQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuHideObjQgis();
- afx_msg void OnUpdateMenuHideObjQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuShowObjQgis();
- afx_msg void OnMenuRotateObjQgis();
- afx_msg void OnUpdateMenuRotateObjQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuCutLineQgis();
- afx_msg void OnUpdateMenuCutLineQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuDeleteLineQgis();
- afx_msg void OnUpdateMenuDeleteLineQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuMoveLineQgis();
- afx_msg void OnUpdateMenuMoveLineQgis(CCmdUI* pCmdUI);
- afx_msg void OnUpdateMenuRotateLineQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuRotateLineQgis();
- afx_msg void OnMenuLinkLineQgis();
- afx_msg void OnMenuMirrorLineXQgis();
- afx_msg void OnMenuMirrorLineYQgis();
- afx_msg void OnMenuMirrorOQgis();
- afx_msg void OnMenuAddRectQgis();
- afx_msg void OnMenuLayerManagerQgis();
- afx_msg void OnMenuAddCircleQgis();
- afx_msg void OnMenuAddEllipseQgis();
- afx_msg void OnUpdateMenuPointAttsetQgis(CCmdUI* pCmdUI);
- afx_msg void OnMenuPointAttsetQgis();
- afx_msg void OnMenuLinkPointToLineQgis();
- afx_msg void OnMenuAddPolylineStream();
- afx_msg void OnMenuRefreshView();
- afx_msg void OnMenuDrawAllobjInView();
- afx_msg void OnMenuMoveMap();
- afx_msg void OnMenuAxisQgis();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- public:
- afx_msg void OnUpdateMenuInterpretationCurve(CCmdUI *pCmdUI);
- afx_msg void OnUpdateMenuTwiceBcurve(CCmdUI *pCmdUI);
- afx_msg void OnUpdateMenuThirdBcurve(CCmdUI *pCmdUI);
- afx_msg void OnMenuInterpretationCurve();
- afx_msg void OnMenuTwiceBcurve();
- afx_msg void OnMenuThirdBcurve();
- afx_msg void OnMenuSelectPointQgis();
- afx_msg void OnMenuPtLinkToLineQgis();
- afx_msg void OnUpdateMenuPtLinkToLineQgis(CCmdUI *pCmdUI);
- afx_msg void OnMenuAddVervicalLineQgis();
- afx_msg void OnMenuAddHoriLineQgis();
- afx_msg void OnDglspkLineGetptQgis();
- afx_msg void OnUpdateDglspkLineGetptQgis(CCmdUI *pCmdUI);
- afx_msg void OnMenuAddTextQgis();
- afx_msg void OnMenuTextParaSet();
- afx_msg void OnMenuReadExcelQgis();
- };
- #ifndef _DEBUG // debug version in QGISView.cpp
- inline CQGISDoc* CQGISView::GetDocument()
- { return (CQGISDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_QGISVIEW_H__00110FB6_1091_477C_ADEE_8C220E4BCED2__INCLUDED_)