OpenCPN Partial API docs
Loading...
Searching...
No Matches
speedometer.cpp
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2010 by Jean-Eudes Onfray *
3 * Copyright (C) 2010 by David S. Register *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
25#include "speedometer.h"
26
27#include <wx/wxprec.h>
28
29#ifndef WX_PRECOMP
30#include <wx/wx.h>
31#endif
32
33// Not much to do here most of the default dial values are fine.
34// Note the default AngleStart = 225 and AngleRange = 270 set here.
35
36DashboardInstrument_Speedometer::DashboardInstrument_Speedometer(
37 wxWindow* parent, wxWindowID id, wxString title,
38 InstrumentProperties* Properties, DASH_CAP cap_flag, int s_value,
39 int e_value)
40 : DashboardInstrument_Dial(parent, id, title, Properties, cap_flag, 225,
41 270, s_value, e_value) {
42 // We want the main value displayed inside the dial as well
43 // as the default arrow
44 SetOptionMainValue("%.1f", DIAL_POSITION_INSIDE);
45}
DASH_CAP
Definition instrument.h:77
Dashboard speed instrument.