Version: 0.6.0
propertypages.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: PropertyPages of Catalog.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2010,2012-2014 Dmitry Baryshnikov
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 "wx/intl.h"
24 #include "wx/string.h"
25 #include "wx/stattext.h"
26 #include "wx/statline.h"
27 #include "wx/gdicmn.h"
28 #include "wx/font.h"
29 #include "wx/colour.h"
30 #include "wx/settings.h"
31 #include "wx/textctrl.h"
32 #include "wx/bitmap.h"
33 #include "wx/image.h"
34 #include "wx/icon.h"
35 #include "wx/bmpbuttn.h"
36 #include "wx/button.h"
37 #include "wx/sizer.h"
38 #include "wx/choice.h"
39 #include "wx/panel.h"
40 #include <wx/imaglist.h>
41 #include <wx/propgrid/propgrid.h>
42 
43 #include "wxgis/framework/applicationbase.h"
44 #include "wxgis/core/config.h"
45 
46 
54 class WXDLLIMPEXP_GIS_FRW IPropertyPage : public wxPanel
55 {
56  DECLARE_ABSTRACT_CLASS(IPropertyPage)
57 public:
61  virtual ~IPropertyPage(void) {};
75  virtual bool Create(wxGISApplicationBase* application, wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel")) = 0;
80  virtual wxString GetPageName(void) = 0;
84  virtual void Apply(void) = 0;
85 };
86 
94 class WXDLLIMPEXP_GIS_FRW wxGISMiscPropertyPage : public IPropertyPage
95 {
96  DECLARE_DYNAMIC_CLASS(wxGISMiscPropertyPage)
97 public:
100  virtual bool Create(wxGISApplicationBase* application, wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("Misc_Panel"));
101 // IPropertyPage
102  virtual wxString GetPageName(void){return wxString(_("Miscellaneous"));};
103  virtual void Apply(void);
104  //events
105  void OnOpenLocPath(wxCommandEvent& event);
106  void OnOpenSysPath(wxCommandEvent& event);
107  void OnOpenLogPath(wxCommandEvent& event);
108 protected:
109  virtual void FillLangArray(wxString sPath);
110 protected:
111  enum
112  {
113  ID_LOCPATH = wxID_HIGHEST + 1,
114  ID_OPENLOCPATH,
115  ID_LANGCHOICE,
116  ID_SYSPATH,
117  ID_OPENSYSPATH,
118  ID_LOGPATH,
119  ID_OPENLOGPATH,
120  ID_SSTIMEOUT
121  };
122 
123  wxStaticText* m_staticText1;
124  wxTextCtrl* m_LocalePath;
125  wxBitmapButton* m_bpOpenLocPath;
126  wxStaticText* m_staticText2;
127  wxChoice* m_LangChoice;
128  wxStaticText* m_staticText3;
129  wxTextCtrl* m_SysPath;
130  wxBitmapButton* m_bpOpenSysPath;
131  wxStaticText* m_staticText4;
132  wxTextCtrl* m_LogPath;
133  wxBitmapButton* m_bpOpenLogPath;
134  wxCheckBox* m_checkDebug;
135  wxCheckBox* m_checkShowSS;
136  wxStaticBitmap* m_bitmapwarn;
137  wxStaticText* m_staticTextWarn;
138  wxStaticLine* m_staticline;
139  wxTextCtrl* m_Timeout;
140 
141  wxGISApplicationBase* m_pApp;
142  wxArrayString m_aLangs, m_aLangsDesc;
143  wxImageList m_ImageList;
144 
145  int m_nTimeout;
146 
147  DECLARE_EVENT_TABLE()
148 };
149 
150 
158 class WXDLLIMPEXP_GIS_FRW wxGISGDALConfPropertyPage : public IPropertyPage
159 {
160  DECLARE_DYNAMIC_CLASS(wxGISGDALConfPropertyPage)
161 public:
164  virtual bool Create(wxGISApplicationBase* application, wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("GDAL_conf_Panel"));
165 // IPropertyPage
166  virtual wxString GetPageName(void){return wxString(_("GDAL Configuration"));};
167  virtual void Apply(void);
168 protected:
169  wxPGProperty* AppendProperty(wxPGProperty* pProp);
170  wxPGProperty* AppendProperty(wxPGProperty* pid, wxPGProperty* pProp);
171 protected:
172  enum
173  {
174  ID_PPCTRL = wxID_HIGHEST + 1,
175  };
176 protected:
177  wxGISApplicationBase* m_pApp;
178  wxPropertyGrid* m_pg;
179 };
Definition: applicationbase.h:65
Definition: propertypages.h:94
virtual void Apply(void)=0
Executed when OK is pressed.
virtual ~IPropertyPage(void)
A destructor.
Definition: propertypages.h:61
Definition: propertypages.h:54
Definition: propertypages.h:158
virtual bool Create(wxGISApplicationBase *application, wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))=0
A Create function.
Definition: propertypages.h:61