19#ifndef PROJECT_DEF_LAYERS_DLG_H
20#define PROJECT_DEF_LAYERS_DLG_H
30#include <wx/filedlg.h>
31#include <wx/notebook.h>
32#include <wx/statline.h>
34#include "../core/prjdefmemmanage.h"
35#include "../core/textparser.h"
36#include "listgenreport.h"
37#include "project_def_fields_dlg.h"
38#include "wxflatbutton.h"
46#define ID_DLGPDL 10007
47#define ID_DLGPDL_LAYER_TYPE 10000
48#define ID_DLGPDL_LAYER_NAME 10001
49#define ID_NOTEBOOK 10002
50#define ID_DLGPDL_PANEL_OBJ 10003
51#define ID_DLGPDL_OBJ_LIST 10009
52#define ID_DLGPDL_OBJECT_ADD 10010
53#define ID_DLGPDL_OBJECT_REMOVE 10225
54#define ID_DLGPDL_OBJECT_IMPORT 10251
55#define ID_DLGPDL_PANEL_FIELDS 10008
56#define ID_DLGPDL_FIELDS_LIST 10220
57#define ID_DLGPDL_FIELD_ADD 10005
58#define ID_DLGPDL_FIELD_REMOVE 10006
59#define ID_DLGPDL_CHK_ORIENTATION 10290
60#define SYMBOL_PROJECTDEFLAYERSDLG_STYLE wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
61#define SYMBOL_PROJECTDEFLAYERSDLG_TITLE _("Thematic layer definition")
62#define SYMBOL_PROJECTDEFLAYERSDLG_IDNAME ID_DLGPDL
63#define SYMBOL_PROJECTDEFLAYERSDLG_SIZE wxSize(400, 300)
64#define SYMBOL_PROJECTDEFLAYERSDLG_POSITION wxDefaultPosition
69 wxChoice* m_ChoiceToChange;
75 virtual void AfterAdding(
bool bRealyAddItem);
77 virtual void AfterEditing(
bool bRealyEdited);
79 virtual void BeforeAdding();
81 virtual void BeforeDeleting();
83 virtual void BeforeEditing();
85 virtual void AddingValueToArray(wxArrayString& myImportedValues);
88 static const int ID_PARAMLIST;
94 PrjMemObjectsArray* m_ObjectsArray;
96 void SetSpatialType(
int spatialtype) {
97 m_SpatialType = spatialtype;
101 m_pPrjDefinition = myPrjMemManage;
107 bool m_bIsModeEditing;
111 wxCheckBox* m_ChkOrientation;
113 virtual void AfterAdding(
bool bRealyAddItem);
115 virtual void AfterEditing(
bool bRealyEdited);
117 virtual void BeforeAdding();
119 virtual void BeforeDeleting();
121 virtual void BeforeEditing();
127 wxChoice* m_ChoiceToChange;
130 void OnItemSelectChange(wxListEvent& event);
132 DECLARE_EVENT_TABLE();
135 static const int ID_PARAMLIST;
142 m_pPrjDefinition = myPrjMemManage;
145 void SetListCtrls(wxCheckBox* pChkOrientation =
nullptr) {
146 m_ChkOrientation = pChkOrientation;
162#define ID_PROJECTDEFLAYERSEDITOBJECTDLG 10117
163#define ID_DLGEO_CODE 10259
164#define ID_DLGEO_VALUE 10260
165#define ID_STATICLINE2 10261
166#define SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_STYLE wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
167#define SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_TITLE _("Edit Object Kind")
168#define SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_IDNAME ID_PROJECTDEFLAYERSEDITOBJECTDLG
169#define SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_SIZE wxSize(400, 300)
170#define SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_POSITION wxDefaultPosition
175 void OnTextChange(wxCommandEvent& event);
184 void _SetValidator();
187 DECLARE_EVENT_TABLE();
194 const wxString& caption = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_TITLE,
195 const wxPoint& pos = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_POSITION,
196 const wxSize& size = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_SIZE,
197 long style = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_STYLE);
200 bool Create(wxWindow* parent, wxWindowID
id = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_IDNAME,
201 const wxString& caption = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_TITLE,
202 const wxPoint& pos = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_POSITION,
203 const wxSize& size = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_SIZE,
204 long style = SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_STYLE);
218 virtual bool TransferDataFromWindow();
221 m_ObjectObj = myObjectObj;
225 m_CodedValObj = myCodedValObj;
228 wxTextCtrl* m_DlgEO_Code;
229 wxTextCtrl* m_DlgEO_Value;
230 wxButton* m_DlgEO_OK_Btn;
235 wxString m_DlgPDL_Contour_Prefix;
242 void OnAddField(wxCommandEvent& event);
244 void OnRemoveField(wxCommandEvent& event);
246 void OnAddObject(wxCommandEvent& event);
248 void OnRemoveObject(wxCommandEvent& event);
250 void OnImportObject(wxCommandEvent& event);
252 void OnChangeOrientation(wxCommandEvent& event);
254 void OnSelectLayerType(wxCommandEvent& event);
256 void OnLayerNameChange(wxCommandEvent& event);
258 void UpdateDefaultPolygonBorderName(
const wxString& name);
260 bool m_bIsModeEditing;
261 bool m_bIsModeAddingEditing;
263 void DisableControlsForEdition();
265 void ActivateOrientation();
268 DECLARE_EVENT_TABLE();
275 bool isAddingMode = FALSE, wxWindowID
id = SYMBOL_PROJECTDEFLAYERSDLG_IDNAME,
276 const wxString& caption = SYMBOL_PROJECTDEFLAYERSDLG_TITLE,
277 const wxPoint& pos = SYMBOL_PROJECTDEFLAYERSDLG_POSITION,
278 const wxSize& size = SYMBOL_PROJECTDEFLAYERSDLG_SIZE,
279 long style = SYMBOL_PROJECTDEFLAYERSDLG_STYLE);
282 bool Create(wxWindow* parent, wxWindowID
id = SYMBOL_PROJECTDEFLAYERSDLG_IDNAME,
283 const wxString& caption = SYMBOL_PROJECTDEFLAYERSDLG_TITLE,
284 const wxPoint& pos = SYMBOL_PROJECTDEFLAYERSDLG_POSITION,
285 const wxSize& size = SYMBOL_PROJECTDEFLAYERSDLG_SIZE,
long style = SYMBOL_PROJECTDEFLAYERSDLG_STYLE);
291 PrjMemFieldArray m_FieldArray;
297 return m_bIsModeEditing;
306 m_LayersObj = myLayersObj;
313 virtual bool TransferDataToWindow();
317 wxTextCtrl* m_DlgPDL_Layer_Name;
318 wxPanel* m_DlgPDL_Panel_Obj;
320 wxPanel* m_DlgPDL_Panel_Fields;
322 wxCheckBox* m_DlgPDL_Orientation_FLD;
325 wxStaticBoxSizer* m_DlgPDL_Contour_Static;
326 wxTextCtrl* m_DlgPDL_Contour_Name;
Definition listgenreport.h:319
Definition prjdefmemmanage.h:54
Definition project_def_fields_dlg.h:101
Definition project_def_layers_dlg.h:233
virtual bool TransferDataFromWindow()
Definition project_def_layers_dlg.cpp:657
void CreateControls()
Creates the controls and sizers.
Definition project_def_layers_dlg.cpp:797
~ProjectDefLayersDlg()
Destructor.
Definition project_def_layers_dlg.cpp:766
ProjectDefLayersDlg()
Constructors.
Definition project_def_layers_dlg.cpp:729
wxChoice * m_DlgPDL_Layer_Type
controls variables
Definition project_def_layers_dlg.h:316
void Init()
Initialises member variables.
Definition project_def_layers_dlg.cpp:772
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_PROJECTDEFLAYERSDLG_IDNAME, const wxString &caption=SYMBOL_PROJECTDEFLAYERSDLG_TITLE, const wxPoint &pos=SYMBOL_PROJECTDEFLAYERSDLG_POSITION, const wxSize &size=SYMBOL_PROJECTDEFLAYERSDLG_SIZE, long style=SYMBOL_PROJECTDEFLAYERSDLG_STYLE)
Creation.
Definition project_def_layers_dlg.cpp:753
Definition project_def_layers_dlg.h:173
~ProjectDefLayersEditObjectDlg()
Destructor.
Definition project_def_layers_dlg.cpp:408
ProjectDefLayersEditObjectDlg()
Constructors.
Definition project_def_layers_dlg.cpp:385
void Init()
Initialises member variables.
Definition project_def_layers_dlg.cpp:410
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_IDNAME, const wxString &caption=SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_TITLE, const wxPoint &pos=SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_POSITION, const wxSize &size=SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_SIZE, long style=SYMBOL_PROJECTDEFLAYERSEDITOBJECTDLG_STYLE)
Creation.
Definition project_def_layers_dlg.cpp:395
virtual bool TransferDataToWindow()
Data transfert process, function called automatically.
Definition project_def_layers_dlg.cpp:494
void CreateDlgControls()
Creates the controls and sizers.
Definition project_def_layers_dlg.cpp:419
Definition project_def_layers_dlg.h:105
void SetOrientation(int orientation, const int &index)
Set orientation for field.
Definition project_def_layers_dlg.cpp:328
bool IsOrientationAllowed(int index)
Check if a field may be used for orientation.
Definition project_def_layers_dlg.cpp:361
Definition project_def_layers_dlg.h:66
Storing coded val linked to a field in memory.
Definition projectdefmemory.h:137
Storing Fields property in memory.
Definition projectdefmemory.h:198
Storing layers properties in memory.
Definition projectdefmemory.h:246
Storing object properties in memory.
Definition projectdefmemory.h:168