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

GribRequestDialog.h. More...

#include "wx/wx.h"
#include <wx/utils.h>
#include <sstream>
#include "email.h"
#include "XyGribModelDef.h"
#include "pi_gl.h"
#include "GribRequestDialog.h"
#include "GribOverlayFactory.h"
#include <wx/wfstream.h>
#include "grib_pi.h"
#include <unordered_map>

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

Macro Definition Documentation

◆ RESOLUTIONS

#define RESOLUTIONS   4

Definition at line 38 of file GribRequestDialog.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 40 of file GribRequestDialog.cpp.

◆ anonymous enum

anonymous enum

Definition at line 41 of file GribRequestDialog.cpp.

◆ LocalGribDownloadType

enum LocalGribDownloadType

Definition at line 674 of file GribRequestDialog.cpp.

◆ LocalSourceItem

enum LocalSourceItem

Definition at line 672 of file GribRequestDialog.cpp.

Function Documentation

◆ EncodeURL()

const wxString EncodeURL ( const wxString &  uri)

Definition at line 1794 of file GribRequestDialog.cpp.

◆ GetGRIBCanvas()

wxWindow * GetGRIBCanvas ( )

Definition at line 123 of file GribUIDialog.cpp.

◆ LengthSelToHours()

size_t LengthSelToHours ( int  sel)

Definition at line 506 of file GribRequestDialog.cpp.

◆ toMailFormat()

wxString toMailFormat ( int  NEflag,
int  a 
)

Definition at line 43 of file GribRequestDialog.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 67 of file GribUIDialog.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 81 of file GribUIDialog.cpp.