OpenCPN Partial API docs
Loading...
Searching...
No Matches
grib_request_dlg.cpp File Reference

GribRequestDialog.h. More...

#include "wx/wx.h"
#include <wx/utils.h>
#include <sstream>
#include "email.h"
#include "xy_grib_model_def.h"
#include "pi_gl.h"
#include "grib_request_dlg.h"
#include "grib_overlay_factory.h"
#include <wx/wfstream.h>
#include "grib_pi.h"
#include <unordered_map>
#include <regex>
#include <string>

Go to the source code of this file.

Classes

struct  GribCatalogInfo
 

Macros

#define RESOLUTIONS   4
 

Enumerations

enum  { SAILDOCS , ZYGRIB }
 
enum  {
  GFS , COAMPS , RTOFS , HRRR ,
  ICON , ECMWF
}
 
enum  LocalSourceItem { SOURCE , AREA , GRIB }
 
enum  LocalGribDownloadType { DIRECT , MANIFEST , WEBPAGE }
 

Functions

wxString toMailFormat (int NEflag, int a)
 
wxWindow * GetGRIBCanvas ()
 
size_t LengthSelToHours (int sel)
 
const wxString EncodeURL (const wxString &uri)
 

Variables

int m_SavedZoneSelMode
 Persisted version of the GRIB area selection mode.
 
int m_ZoneSelMode
 Tracks the current state of GRIB area selection for zone coordinates.
 

Detailed Description

GribRequestDialog.h.

Definition in file grib_request_dlg.cpp.

Macro Definition Documentation

◆ RESOLUTIONS

#define RESOLUTIONS   4

Definition at line 45 of file grib_request_dlg.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 47 of file grib_request_dlg.cpp.

◆ anonymous enum

anonymous enum

Definition at line 48 of file grib_request_dlg.cpp.

◆ LocalGribDownloadType

enum LocalGribDownloadType

Definition at line 677 of file grib_request_dlg.cpp.

◆ LocalSourceItem

enum LocalSourceItem

Definition at line 675 of file grib_request_dlg.cpp.

Function Documentation

◆ EncodeURL()

const wxString EncodeURL ( const wxString &  uri)

Definition at line 1793 of file grib_request_dlg.cpp.

◆ GetGRIBCanvas()

wxWindow * GetGRIBCanvas ( )

Definition at line 126 of file grib_ui_dlg.cpp.

◆ LengthSelToHours()

size_t LengthSelToHours ( int  sel)

Definition at line 508 of file grib_request_dlg.cpp.

◆ toMailFormat()

wxString toMailFormat ( int  NEflag,
int  a 
)

Definition at line 50 of file grib_request_dlg.cpp.

Variable Documentation

◆ m_SavedZoneSelMode

int m_SavedZoneSelMode
extern

Persisted version of the GRIB area selection mode.

This value is saved to and loaded from the OpenCPN config file, allowing the user's preferred selection mode to persist between sessions. The value is used to:

  • Restore the last used selection mode on startup.
  • Keep track of the mode when dialog is closed/reopened.
  • Revert to previous mode if changes are cancelled.

Definition at line 70 of file grib_ui_dlg.cpp.

◆ m_ZoneSelMode

int m_ZoneSelMode
extern

Tracks the current state of GRIB area selection for zone coordinates.

This state controls:

  • Whether coordinates come from viewport or mouse area selection.
  • When to display the selection overlay during drawing.
  • When to update the lat/lon input fields.

A typical mouse area selection flow:

  1. START_SELECTION when manual mode chosen.
  2. DRAW_SELECTION when user starts Shift+drag.
  3. COMPLETE_SELECTION when user releases mouse button.

Definition at line 84 of file grib_ui_dlg.cpp.