⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wxgpsevent.h

📁 roadnav 内含一个基于wxWindows库的车载导航系统。编译后
💻 H
字号:
/*
 *  Roadnav
 *  wxGPSEvent.h
 *
 *  Copyright (c) 2004 - 2006 Richard L. Lynch <rllynch@users.sourceforge.net>
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of version 2 of the GNU General Public License
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

//////////////////////////////////////////////////////////////////////////////
/// \file
///
/// GPS event class.
///
//////////////////////////////////////////////////////////////////////////////

#ifndef WXGPSEVENT_H
#define WXGPSEVENT_H

#include <wx/wx.h>
#include <vector>
#include "libroadnav/Point.h"

struct SSatelliteInfo
{
	int m_iID;
	double m_fElevation;
	double m_fAzimuth;
	double m_fSNR;
};

class wxGPSEvent : public wxEvent
{
	public:
		wxGPSEvent();
		wxGPSEvent(bool bEnabled, bool bActive, bool bLocked, Point pt, double fSpeed, double fHeading, wxString strLockType, int nSat, std::vector<SSatelliteInfo> vSatellites, wxString strErrorMessage);
		virtual wxEvent * Clone() const;
		wxGPSEvent & operator =(const wxGPSEvent & p);

		bool m_bEnabled;
		bool m_bActive;
		bool m_bLocked;
		Point m_pt;
		double m_fSpeed;
		double m_fHeading;
		wxString m_strLockType;
		int m_nSat;
		std::vector<SSatelliteInfo> m_vSatellites;
		
		wxString m_strErrorMessage;
};

DECLARE_EVENT_TYPE(wxEVT_GPS_ACTION, -1)

typedef void (wxEvtHandler::*wxGPSEventFunction)(wxGPSEvent&);

#define EVT_GPS(fn) \
    DECLARE_EVENT_TABLE_ENTRY( wxEVT_GPS_ACTION, wxID_ANY, wxID_ANY, \
    (wxObjectEventFunction) (wxEventFunction) \
    wxStaticCastEvent( wxGPSEventFunction, & fn ), (wxObject *) NULL ),

#endif // #ifndef WXGPSEVENT_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -