OpenCPN Partial API docs
Loading...
Searching...
No Matches
speedometer.cpp
1
/******************************************************************************
2
* $Id: speedometer.cpp, v1.0 2010/08/05 SethDart Exp $
3
*
4
* Project: OpenCPN
5
* Purpose: Dashboard Plugin
6
* Author: Jean-Eudes Onfray
7
*
8
***************************************************************************
9
* Copyright (C) 2010 by David S. Register *
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
* This program is distributed in the hope that it will be useful, *
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19
* GNU General Public License for more details. *
20
* *
21
* You should have received a copy of the GNU General Public License *
22
* along with this program; if not, write to the *
23
* Free Software Foundation, Inc., *
24
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
25
***************************************************************************
26
*/
27
28
#include "speedometer.h"
29
30
// For compilers that support precompilation, includes "wx/wx.h".
31
#include <wx/wxprec.h>
32
33
#ifdef __BORLANDC__
34
#pragma hdrstop
35
#endif
36
37
// for all others, include the necessary headers (this file is usually all you
38
// need because it includes almost all "standard" wxWidgets headers)
39
#ifndef WX_PRECOMP
40
#include <wx/wx.h>
41
#endif
42
43
// Not much to do here most of the default dial values are fine.
44
// Note the default AngleStart = 225 and AngleRange = 270 set here.
45
46
DashboardInstrument_Speedometer::DashboardInstrument_Speedometer(
47
wxWindow* parent, wxWindowID
id
, wxString title,
48
InstrumentProperties
* Properties, DASH_CAP cap_flag,
int
s_value,
49
int
e_value)
50
:
DashboardInstrument_Dial
(parent, id, title, Properties, cap_flag, 225,
51
270, s_value, e_value) {
52
// We want the main value displayed inside the dial as well
53
// as the default arrow
54
SetOptionMainValue(_T(
"%.1f"
), DIAL_POSITION_INSIDE);
55
}
DashboardInstrument_Dial
Definition
dial.h:84
InstrumentProperties
Definition
instrument.h:129
plugins
dashboard_pi
src
speedometer.cpp
Generated on Sat Mar 1 2025 02:28:51 for OpenCPN Partial API docs by
1.9.8