Version: 0.6.0
gxngwconnui.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: Remote Connection UI classes.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2014 NextGIS
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgis/catalogui/catalogui.h"
24 #include "wxgis/catalog/gxngwconn.h"
25 #include "wxgis/catalogui/gxview.h"
26 
27 
28 #ifdef wxGIS_USE_CURL
29 
37 class WXDLLIMPEXP_GIS_CLU wxGxNGWServiceUI :
38  public wxGxNGWService,
39  public IGxObjectUI,
40  public IGxObjectEditUI,
41  public IGxObjectWizard
42 {
43  DECLARE_CLASS(wxGxNGWServiceUI)
44 public:
45  wxGxNGWServiceUI(wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "", const wxIcon &icLargeIcon = wxNullIcon, const wxIcon &icSmallIcon = wxNullIcon, const wxIcon &icLargeIconDsbl = wxNullIcon, const wxIcon &icSmallIconDsbl = wxNullIcon);
46  virtual ~wxGxNGWServiceUI(void);
47  //IGxObjectUI
48  virtual wxIcon GetLargeImage(void);
49  virtual wxIcon GetSmallImage(void);
50  virtual wxString ContextMenu(void) const {return wxString(wxT("wxGxNGWService.ContextMenu"));};
51  virtual wxString NewMenu(void) const { return wxString(wxT("wxGxNGWService.NewtMenu")); };
52  //IGxObjectEditUI
53  virtual void EditProperties(wxWindow *parent);
54  //IGxObjectWizard
55  virtual bool Invoke(wxWindow* pParentWnd);
56 protected:
57  virtual void LoadChildren(void);
58 protected:
59  wxIcon m_icLargeIcon, m_icSmallIcon;
60  wxIcon m_icLargeIconDsbl, m_icSmallIconDsbl;
61 };
62 
70 class WXDLLIMPEXP_GIS_CLU wxGxNGWResourceGroupUI :
71  public wxGxNGWResourceGroup,
72  public IGxObjectUI,
73  public wxGxAutoRenamer,
74  public IGxDropTarget,
75  public IGxObjectEditUI
76 {
77  DECLARE_CLASS(wxGxNGWResourceGroupUI)
78 public:
79  wxGxNGWResourceGroupUI(wxGxNGWService *pService, const wxJSONValue &Data, wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "", const wxIcon &icLargeIcon = wxNullIcon, const wxIcon &icSmallIcon = wxNullIcon);
80  virtual ~wxGxNGWResourceGroupUI(void);
81  //IGxObjectUI
82  virtual wxIcon GetLargeImage(void);
83  virtual wxIcon GetSmallImage(void);
84  virtual wxString ContextMenu(void) const { return wxString(wxT("wxGxNGWResourceGroup.ContextMenu")); };
85  virtual wxString NewMenu(void) const { return wxString(wxT("wxGxNGWResourceGroup.NewMenu")); };
86  //IGxDropTarget
87  virtual bool Drop(const wxArrayString& saGxObjectPaths, bool bMove);
88  //IGxObjectEditUI
89  virtual void EditProperties(wxWindow *parent);
90 protected:
91  virtual wxGxObject* AddResource(const wxJSONValue &Data);
92 protected:
93  wxIcon m_icLargeIcon, m_icSmallIcon;
94  wxIcon m_icFolderLargeIcon, m_icFolderSmallIcon;
95  wxIcon m_icPGLayerLargeIcon, m_icPGLayerSmallIcon;
96  wxIcon m_icPGConnLargeIcon, m_icPGConnSmallIcon;
97  wxIcon m_icNGWLayerLargeIcon, m_icNGWLayerSmallIcon;
98 };
99 
100 
108 class WXDLLIMPEXP_GIS_CLU wxGxNGWRootResourceUI :
109  public wxGxNGWResourceGroupUI
110 {
111  DECLARE_CLASS(wxGxNGWRootResourceUI)
112 public:
113  wxGxNGWRootResourceUI(wxGxNGWService *pService, wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "", const wxIcon &icLargeIcon = wxNullIcon, const wxIcon &icSmallIcon = wxNullIcon);
114  virtual ~wxGxNGWRootResourceUI(void);
115  //IGxObjectUI
116  virtual wxIcon GetLargeImage(void);
117  virtual wxIcon GetSmallImage(void);
118  virtual wxString ContextMenu(void) const { return wxString(wxT("wxGxNGWResourceGroup.ContextMenu")); };
119  virtual wxString NewMenu(void) const { return wxString(wxT("wxGxNGWResourceGroup.NewMenu")); };
120 };
121 
129 class WXDLLIMPEXP_GIS_CLU wxGxNGWLayerUI :
130  public wxGxNGWLayer,
131  public IGxObjectUI,
132  public IGxObjectEditUI
133 {
134  DECLARE_CLASS(wxGxNGWLayerUI)
135 public:
136  wxGxNGWLayerUI(wxGxNGWService *pService, wxGISEnumNGWResourcesType eType, const wxJSONValue &Data, wxGxObject *oParent, const wxString &soName = wxEmptyString, const CPLString &soPath = "", const wxIcon &icLargeIcon = wxNullIcon, const wxIcon &icSmallIcon = wxNullIcon);
137  virtual ~wxGxNGWLayerUI(void);
138  //IGxObjectUI
139  virtual wxIcon GetLargeImage(void);
140  virtual wxIcon GetSmallImage(void);
141  virtual wxString ContextMenu(void) const { return wxString(wxT("wxGxNGWLayer.ContextMenu")); };
142  virtual wxString NewMenu(void) const { return wxString(wxT("wxGxNGWLayer.NewtMenu")); };
143  //IGxObjectEditUI
144  virtual void EditProperties(wxWindow *parent);
145 protected:
146  wxIcon m_icLargeIcon, m_icSmallIcon;
147 };
148 #endif // wxGIS_USE_CURL
The JSON value class implementation.
Definition: jsonval.h:91
Definition: catalogui.h:73
Definition: catalogui.h:60
Definition: catalogui.h:90
Definition: catalogui.h:128
Definition: gxobject.h:37
Definition: gxview.h:65