94 wxStaticText *m_staticText1;
95 wxStaticText *m_staticText5;
96 wxStaticText *m_staticText2;
97 wxStaticText *m_staticText6;
98 wxStaticText *m_staticText3;
99 wxStaticText *m_staticText4;
100 wxStaticLine *m_staticline1;
101 wxStaticLine *m_staticline2;
102 wxStaticText *m_staticText7;
103 wxStaticText *m_staticText9;
104 wxStaticText *m_staticText10;
105 wxStdDialogButtonSizer *m_sdbSizer3;
106 wxButton *m_sdbSizer3OK;
107 wxButton *m_sdbSizer3Cancel;
110 virtual void OnSetdefault(wxCommandEvent &event);
113 wxFontPickerCtrl *m_fontPicker2;
114 wxColourPickerCtrl *m_colourPicker1;
115 wxFontPickerCtrl *m_fontPicker4;
116 wxColourPickerCtrl *m_colourPicker2;
117 wxFontPickerCtrl *m_fontPicker5;
118 wxFontPickerCtrl *m_fontPicker6;
119 wxColourPickerCtrl *m_colourPicker3;
120 wxColourPickerCtrl *m_colourPicker4;
124 wxWindowID
id = wxID_ANY,
125 const wxString &title =
"Edit Instrument",
126 const wxPoint &pos = wxDefaultPosition,
127 const wxSize &size = wxSize(-1, -1),
128 long style = wxDEFAULT_DIALOG_STYLE);
136 wxString caption, wxString orientation,
138 wxArrayOfInstrumentProperties inProberty) {
139 m_pDashboardWindow = dashboard_window;
141 m_sCaption = caption;
142 m_sOrientation = orientation;
143 m_aInstrumentList = inst;
144 m_aInstrumentPropertyList = inProberty;
145 m_bIsVisible =
false;
146 m_bIsDeleted =
false;
150 for (
unsigned int i = 0; i < m_aInstrumentPropertyList.GetCount(); i++) {
162 wxString m_sOrientation;
163 wxArrayInt m_aInstrumentList;
164 wxArrayOfInstrumentProperties m_aInstrumentPropertyList;
166 wxSize m_conf_best_size;
167 wxSize m_persist_size;
207 void Notify()
override;
226 void OnPaneClose(wxAuiManagerEvent &event);
229 void PopulateContextMenu(wxMenu *menu);
230 void ShowDashboard(
size_t id,
bool visible);
231 [[nodiscard]]
int GetToolbarItemId()
const {
return m_toolbar_item_id; }
232 int GetDashboardWindowShownCount();
233 void SetPluginMessage(wxString &message_id, wxString &message_body)
override;
234 void UpdateSumLog(
bool);
238 void LoadFont(wxFont **target,
const wxString &native_info);
241 void SendSentenceToAllInstruments(
DASH_CAP st,
double value,
242 const wxString &
unit);
243 void SendSatInfoToAllInstruments(
int cnt,
int seq,
const wxString &talk,
245 void SendUtcTimeToAllInstruments(wxDateTime value);
247 void CalculateAndUpdateTWDS(
double awsKnots,
double awaDegrees);
249 void ParseSignalK(wxString &msg);
251 void updateSKItem(
wxJSONValue &item, wxString &talker, wxString &sfixtime);
264 std::shared_ptr<ObservableListener> listener_127245;
265 std::shared_ptr<ObservableListener> listener_127257;
266 std::shared_ptr<ObservableListener> listener_128259;
267 std::shared_ptr<ObservableListener> listener_128267;
268 std::shared_ptr<ObservableListener> listener_128275;
269 std::shared_ptr<ObservableListener> listener_128777;
270 std::shared_ptr<ObservableListener> listener_129029;
271 std::shared_ptr<ObservableListener> listener_129540;
272 std::shared_ptr<ObservableListener> listener_130306;
273 std::shared_ptr<ObservableListener> listener_130310;
274 std::shared_ptr<ObservableListener> listener_130313;
276 std::string prio127245;
277 std::string prio127257;
278 std::string prio128259;
279 std::string prio128267;
280 std::string prio129029;
281 std::string prioN2kPGNsat;
282 std::string prio130306;
286 wxFileConfig *m_pconfig;
287 wxAuiManager *m_pauimgr;
288 int m_toolbar_item_id;
290 wxArrayOfDashboard m_ArrayOfDashboardWindow;
295 short m_pri_position, m_pri_cogsog, m_pri_heading_m, m_pri_heading_t;
296 short m_pri_var, m_pri_date_time, m_pri_awa, m_pri_twa, m_pri_depth;
297 short m_pri_stw, m_pri_wtp, m_pri_atmp, m_pri_wdn, m_pri_sat_status;
298 short m_pri_mda, m_pri_hum;
301 short m_pri_sat_used, m_pri_alt, m_pri_rsa, m_pri_pitch_roll;
322 wxDateTime m_utc_date_time;
323 int m_config_version;
324 wxString m_vdo_accumulator;
327 int m_sats_used_wdog;
328 int m_sat_status_wdog;
329 int m_pri_n2_k_talker;
333 int m_dpt_dbt_watchdog;
343 int m_pitch_watchdog;
347 int m_tr_log_watchdog;
363 wxArrayOfDashboard config);
366 void OnCloseDialog(wxCloseEvent &event);
367 void OnDashboardSelected(wxListEvent &event);
368 void OnDashboardAdd(wxCommandEvent &event);
369 void OnDashboardDelete(wxCommandEvent &event);
370 void OnInstrumentSelected(wxListEvent &event);
371 void OnInstrumentAdd(wxCommandEvent &event);
372 void OnInstrumentEdit(wxCommandEvent &event);
373 void OnInstrumentDelete(wxCommandEvent &event);
374 void OnInstrumentUp(wxCommandEvent &event);
375 void OnInstrumentDown(wxCommandEvent &event);
376 void OnDashboarddefaultFont(wxCommandEvent &event);
377 void OnDistanceUnitSelect(wxCommandEvent &event);
378 void SaveDashboardConfig();
379 void RecalculateSize();
381 wxArrayOfDashboard m_config;
382 wxFontPickerCtrl *m_font_picker_title;
383 wxFontPickerCtrl *m_font_picker_data;
384 wxFontPickerCtrl *m_font_picker_label;
385 wxFontPickerCtrl *m_font_picker_small;
386 wxSpinCtrl *m_spin_speed_max;
387 wxSpinCtrl *m_spin_cog_damp;
388 wxSpinCtrl *m_spin_sog_damp;
389 wxSpinCtrl *m_spin_aws_damp;
390 wxSpinCtrl *m_spin_awa_damp;
391 wxChoice *m_choice_utc_offset;
392 wxChoice *m_choice_speed_unit;
393 wxChoice *m_choice_depth_unit;
394 wxSpinCtrlDouble *m_spin_dbt_offset;
395 wxChoice *m_choice_distance_unit;
396 wxChoice *m_choice_wind_speed_unit;
397 wxCheckBox *m_use_intern_sum_log;
398 wxStaticText *m_sum_log_unit;
399 wxTextCtrl *m_sum_log_value;
400 wxCheckBox *m_use_true_winddata;
401 wxChoice *m_choice_temp_unit;
404 void UpdateDashboardButtonsState();
405 void UpdateButtonsState();
407 wxListCtrl *m_pListCtrlDashboards;
408 wxBitmapButton *m_pButtonAddDashboard;
409 wxBitmapButton *m_pButtonDeleteDashboard;
410 wxPanel *m_pPanelDashboard;
411 wxTextCtrl *m_pTextCtrlCaption;
412 wxCheckBox *m_pCheckBoxIsVisible;
413 wxChoice *m_pChoiceOrientation;
414 wxListCtrl *m_pListCtrlInstruments;
415 wxButton *m_pButtonAdd;
416 wxButton *m_pButtonEdit;
417 wxButton *m_pButtonDelete;
418 wxButton *m_pButtonUp;
419 wxButton *m_pButtonDown;
420 wxButton *m_pButtondefaultFont;
446 DashboardWindow(wxWindow *pparent, wxWindowID
id, wxAuiManager *auimgr,
452 void SetSizerOrientation(
int orient);
453 int GetSizerOrientation();
454 void OnSize(wxSizeEvent &evt);
455 void OnContextMenu(wxContextMenuEvent &evt);
456 void OnContextMenuSelect(wxCommandEvent &evt);
458 void OnMouseEvent(wxMouseEvent &event);
461 void OnEvtPinchGesture(wxQT_PinchGestureEvent &event);
462 void OnEvtPanGesture(wxQT_PanGestureEvent &event);
465 bool isInstrumentListEqual(
const wxArrayInt &list);
466 void SetInstrumentList(wxArrayInt list,
467 wxArrayOfInstrumentProperties *InstrumentPropertyList);
468 void SendSentenceToAllInstruments(
DASH_CAP st,
double value, wxString
unit);
469 void SendSatInfoToAllInstruments(
int cnt,
int seq, wxString talk,
471 void SendUtcTimeToAllInstruments(wxDateTime value);
474 void ChangePaneOrientation(
int orient,
bool updateAUImgr,
int fpx = 100,
483 wxPoint m_resizeStartPoint;
484 wxSize m_resizeStartSize;
489 wxAuiManager *m_pauimgr;
493 wxBoxSizer *itemBoxSizer;
494 wxArrayOfInstrument m_ArrayOfInstrument;
509 OCPNFontButton(wxWindow *parent, wxWindowID
id,
const wxFontData &initial,
510 const wxPoint &pos = wxDefaultPosition,
511 const wxSize &size = wxDefaultSize,
512 long style = wxFONTBTN_DEFAULT_STYLE,
513 const wxValidator &validator = wxDefaultValidator,
514 const wxString &name = wxFontPickerWidgetNameStr) {
515 Create(parent,
id, initial, pos, size, style, validator, name);
518 [[nodiscard]]
virtual wxColour GetSelectedColour()
const {
519 return m_data.GetColour();
521 virtual void SetSelectedFont(
const wxFont &font) {
522 m_data.SetChosenFont(font);
523 m_selectedFont = m_data.GetChosenFont();
526 virtual void SetSelectedColour(
const wxColour &colour) {
527 m_data.SetColour(colour);
538 wxFontData *GetFontData() {
return &m_data; }
541 [[nodiscard]] wxFont GetSelectedFont()
const {
return m_selectedFont; }
544 bool Create(wxWindow *parent, wxWindowID
id,
const wxFontData &initial,
545 const wxPoint &pos = wxDefaultPosition,
546 const wxSize &size = wxDefaultSize,
547 long style = wxFONTBTN_DEFAULT_STYLE,
548 const wxValidator &validator = wxDefaultValidator,
549 const wxString &name = wxFontPickerWidgetNameStr);
551 void OnButtonClick(wxCommandEvent &);
558 wxFont m_selectedFont;
Dashboard wind history instrument.