24 #include "wxgis/geoprocessing/geoprocessing.h"
25 #include "wxgis/geoprocessing/gpdomain.h"
31 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_GIS_GP, wxGPPARAM_CHANGED,
wxGISGPParamEvent);
32 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_GIS_GP, wxGPPARAM_MSG_SET,
wxGISGPParamEvent);
33 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_GIS_GP, wxGPPARAM_DOMAIN_ADDVAL,
wxGISGPParamEvent);
34 wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_GIS_GP, wxGPPARAM_DOMAIN_CLEAR,
wxGISGPParamEvent);
42 wxGISGPParamEvent(
int nId = wxID_ANY, wxEventType eventType = wxGPPARAM_CHANGED,
const wxVariant &Value = wxNullVariant,
const wxString &sName = wxEmptyString ) : wxEvent(nId, eventType)
50 m_Value =
event.m_Value;
52 m_sName =
event.m_sName.Clone();
55 wxVariant GetParamValue()
const {
return m_Value; }
56 void SetParamValue(
const wxVariant &Value) { m_Value = Value; }
57 wxString GetName()
const {
return m_sName; }
58 void SetName(
const wxString &sName) { m_sName = sName; }
71 #define wxGISGPParamEventHandler(func) \
72 wxEVENT_HANDLER_CAST(wxGISGPParamEventFunction, func)
74 #define EVT_GPPARAM_CHANGED(func) wx__DECLARE_EVT0(wxGPPARAM_CHANGED, wxGISGPParamEventHandler(func))
75 #define EVT_GPPARAM_MSG_SET(func) wx__DECLARE_EVT0(wxGPPARAM_MSG_SET, wxGISGPParamEventHandler(func))
76 #define EVT_GPPARAM_DOMAIN_ADDVAL(func) wx__DECLARE_EVT0(wxGPPARAM_DOMAIN_ADDVAL, wxGISGPParamEventHandler(func))
77 #define EVT_GPPARAM_DOMAIN_CLEAR(func) wx__DECLARE_EVT0(wxGPPARAM_DOMAIN_CLEAR, wxGISGPParamEventHandler(func))
91 wxGISGPParameter(
const wxString &sName,
const wxString &sDisplayName, wxGISEnumGPParameterType eType, wxGISEnumGPParameterDataType eDataType);
93 virtual bool GetAltered(
void)
const;
94 virtual void SetAltered(
bool bAltered);
95 virtual bool GetHasBeenValidated(
void)
const;
96 virtual void SetHasBeenValidated(
bool bHasBeenValidated);
97 virtual bool IsValid(
void)
const;
98 virtual void SetValid(
bool bIsValid);
99 virtual wxString GetName(
void)
const;
100 virtual void SetName(
const wxString &sName);
101 virtual wxString GetDisplayName(
void)
const;
102 virtual void SetDisplayName(
const wxString &sDisplayName);
103 virtual wxGISEnumGPParameterDataType GetDataType(
void)
const;
104 virtual void SetDataType(wxGISEnumGPParameterDataType nType);
105 virtual wxGISEnumGPParameterDirection GetDirection(
void)
const;
106 virtual void SetDirection(wxGISEnumGPParameterDirection nDirection);
107 virtual wxGISEnumGPParameterType GetParameterType(
void)
const;
108 virtual void SetParameterType(wxGISEnumGPParameterType nType);
109 virtual wxVariant GetValue(
void)
const;
110 virtual void SetValue(
const wxVariant &
Val);
113 virtual wxString GetMessage(
void)
const;
114 virtual wxGISEnumGPMessageType GetMessageType(
void)
const;
115 virtual void SetMessage(wxGISEnumGPMessageType nType = wxGISEnumGPMessageUnknown,
const wxString &sMsg = wxEmptyString);
116 virtual void AddDependency(
const wxString &sParamName);
117 virtual wxArrayString GetDependences(
void)
const;
122 virtual wxString GetAsString(
void)
const;
127 virtual bool SetFromString(wxString &sParam);
128 virtual int GetSelDomainValue(
void)
const;
129 virtual void SetSelDomainValue(
int nNewSelection);
131 virtual void OnValueAdded(
const wxVariant &Value,
const wxString &sName);
134 virtual void SetId(
size_t nId);
135 virtual size_t GetId(
void)
const;
138 bool m_bHasBeenValidated;
141 wxString m_sDisplayName;
142 wxGISEnumGPParameterDataType m_DataType;
143 wxGISEnumGPParameterDirection m_Direction;
144 wxGISEnumGPParameterType m_ParameterType;
148 wxGISEnumGPMessageType m_nMsgType;
150 wxArrayString m_saDependencies;
158 WX_DEFINE_USER_EXPORTED_ARRAY(
wxGISGPParameter*, wxGISGPParamArray,
class WXDLLIMPEXP_GIS_GP);
165 wxGISGPParamArray::Add(item, 1);
166 item->SetId(GetCount() - 1);
170 for(
size_t i = 0; i < GetCount(); ++i)
171 if(Item(i)->GetName().IsSameAs(sParamName,
false))
188 wxGISGPMultiParameter(
const wxString &sName,
const wxString &sDisplayName, wxGISEnumGPParameterType eType, wxGISEnumGPParameterDataType eDataType);
190 virtual void AddColumn(
const wxString &sName);
191 virtual void RemoveColumn(
size_t nIndex);
192 virtual size_t GetColumnCount(
void)
const;
193 virtual wxString GetColumnName(
size_t nIndex)
const;
194 virtual size_t GetRowCount(
void)
const;
195 virtual void AddParameter(
size_t nColIndex,
size_t nRowIndex,
wxGISGPParameter* pParam);
196 virtual bool IsValid(
void)
const;
197 virtual void SetValid(
bool bIsValid);
198 virtual void Clear();
200 virtual wxGISEnumGPParameterDataType GetDataType(
void)
const;
206 wxArrayString m_saColumnNames;
A Geoprocessing tools parameter class.
Definition: gpparam.h:82
Definition: gpparam.h:160
Definition: gpdomain.h:36
virtual void OnCleared(void)=0
virtual wxString GetAsString(void) const
Serialize parameter to string.
Definition: gpparam.cpp:286
virtual void OnValueAdded(const wxVariant &Value, const wxString &sName)=0
Definition: gpdomain.h:63
The wxGISProcess class event.
Definition: gpparam.h:39
virtual bool SetFromString(wxString &sParam)
Serialize parameter from string.
Definition: gpparam.cpp:293
A Geoprocessing tools multiparameter class.
Definition: gpparam.h:183