ToolMap
Loading...
Searching...
No Matches
project_def_dlg.h
Go to the documentation of this file.
1/***************************************************************************
2 project_def.h
3 Project definition dialog
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17/***************************************************************************/
29#ifndef PROJECT_DEF_DLG_H
30#define PROJECT_DEF_DLG_H
31
32// For compilers that support precompilation, includes "wx/wx.h".
33#include <wx/wxprec.h>
34
35// Include wxWidgets' headers
36#ifndef WX_PRECOMP
37#include <wx/wx.h>
38#endif
39
40#include <wx/listctrl.h>
41
42#include "listgenreport.h"
43#include "project_def_layers_dlg.h"
44#include "wxflatbutton.h"
45// #include <wx/dirdlg.h> // for directory selection dialog
46#include "../core/wxdirpickerctrlbest.h" // directory picker (best version)
47#include "listgenreport_status.h" // list with status
48
54class ProjectDefList;
55
56class wxToggleButton;
58
62#define ID_DLGPD 10000
63#define ID_DLGPD_NOTEBOOK 10262
64#define ID_DLGPD_PANEL_PROJ 10263
65#define ID_DLGPD_PROJ_PATH 10267
66#define ID_DLGPD_PROJ_NAME 10268
67#define ID_DLGPD_PROJ_UNIT 10269
68#define ID_DLGPD_PROJ_PROJECTION 10270
69#define ID_DLGPD_PROJ_AUTHOR 10219
70#define ID_DLGPD_PROJ_COMMENT 10273
71#define ID_DLGPD_PANEL_SPAT 10119
72#define ID_DLGPD_SPAT_MODEL_LIST 10156
73#define ID_DLGPD_SPAT_MDL_ADD 10271
74#define ID_DLGPD_SPAT_MDL_DEL 10272
75#define SYMBOL_PROJECTDEFDLG_STYLE wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
76#define SYMBOL_PROJECTDEFDLG_TITLE _("Project Definition")
77#define SYMBOL_PROJECTDEFDLG_IDNAME ID_DLGPD
78#define SYMBOL_PROJECTDEFDLG_SIZE wxSize(400, 300)
79#define SYMBOL_PROJECTDEFDLG_POSITION wxDefaultPosition
80
81/***************************************************************************/
90class ProjectDefDLG : public wxDialog {
91 private:
92 // Project memory class
93 PrjDefMemManage* m_pPrjDefinition;
94
95 void OnAddLayer(wxCommandEvent& event);
96
97 void OnRemoveLayer(wxCommandEvent& event);
98
99 void OnIdleWait(wxIdleEvent& event);
100
101 bool CheckIdleRules();
102
103 DECLARE_DYNAMIC_CLASS(ProjectDefDLG);
104 DECLARE_EVENT_TABLE();
105
106 bool m_bIsModeEditing;
107
108 void DisableControlsForEdition();
109
110 public:
113
114 ProjectDefDLG(wxWindow* parent, PrjDefMemManage* myPrjDefinition, bool isEditingMode = FALSE,
115 wxWindowID id = SYMBOL_PROJECTDEFDLG_IDNAME, const wxString& caption = SYMBOL_PROJECTDEFDLG_TITLE,
116 const wxPoint& pos = SYMBOL_PROJECTDEFDLG_POSITION, const wxSize& size = SYMBOL_PROJECTDEFDLG_SIZE,
117 long style = SYMBOL_PROJECTDEFDLG_STYLE);
118
120 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_PROJECTDEFDLG_IDNAME,
121 const wxString& caption = SYMBOL_PROJECTDEFDLG_TITLE,
122 const wxPoint& pos = SYMBOL_PROJECTDEFDLG_POSITION, const wxSize& size = SYMBOL_PROJECTDEFDLG_SIZE,
123 long style = SYMBOL_PROJECTDEFDLG_STYLE);
124
127
129 void Init();
130
132 void CreateControls();
133
134 void SetNotebook(int notebooknumber);
135
136 // void RemoveObjFromArray();
137 virtual bool TransferDataFromWindow();
138
139 virtual bool TransferDataToWindow();
140
141 bool IsEditMode() {
142 return m_bIsModeEditing;
143 }
144
145 wxPanel* m_DlgPd_Panel_Proj;
146 // wxDirPickerCtrlBest* m_DlgPD_Proj_Path;
147 // wxTextCtrl* m_DlgPd_Proj_Name;
148 wxChoice* m_DlgPd_Proj_Unit;
149 wxChoice* m_DlgPd_Proj_Projection;
150 wxTextCtrl* m_DlgPd_Proj_Author;
151 wxTextCtrl* m_DlgPd_Proj_Comment;
152 wxPanel* m_DlgPd_Panel_Spatial;
153 ProjectDefList* m_DlgPd_Stat_Model_List;
154 wxFlatButton* m_DlgPd_Spat_Mdl_Add;
155 wxFlatButton* m_DljPd_Spat_Mdl_Del;
156 wxButton* m_DlgPd_Button_Ok;
157 wxStatusBar* m_DlgPd_Status;
158};
159
160/***************************************************************************/
168 private:
169 bool m_bIsModeEditing;
170 // void OnMySelectionChange (wxListEvent & event);
171
172 wxChoice* m_ChoiceToChange;
173 PrjMemLayersArray* m_LayersArray;
174 // create object for storing layers data
175
176 ProjectDefLayersDlg* m_LayersDialog;
177
178 PrjDefMemManage* m_pPrjDefinition;
179 ProjectDefMemoryLayers* m_LayersObj;
180
181 virtual void BeforeAdding();
182
183 virtual void AfterAdding(bool bRealyAddItem);
184
185 virtual void BeforeDeleting();
186
187 virtual void BeforeEditing();
188
189 virtual void AfterEditing(bool bRealyEdited);
190
191 bool m_bAscending[2];
192
193 virtual void OnSortColumns(wxListEvent& event);
194
195 public:
196 static const int ID_PARAMLIST;
197
198 ProjectDefList(wxWindow* parent, wxWindowID id, wxSize size, ProjectDefDLG* myParentDlg);
199
201
202 void PassPrjDefToList(PrjDefMemManage* myPrjMemManage) {
203 m_pPrjDefinition = myPrjMemManage;
204 }
205
206 // int GetParamType (wxString myTextParam);
207 //
208 // wxString GetParamType (int imyType);
209 //
210 // void AddItemToParamList(wxString myValue, wxString myComment, ACOMMENTPOSITION type);
211 // void SetChoiceList (wxChoice * myChoiceList);
212 // DECLARE_EVENT_TABLE();
213};
214
215#endif
Enhance the ListGenReportWithDialog for supporting status bar.
Definition listgenreport_status.h:50
Definition prjdefmemmanage.h:54
Definition of the Project definition dialog.
Definition project_def_dlg.h:90
void Init()
Initialises member variables.
Definition project_def_dlg.cpp:85
~ProjectDefDLG()
Destructor.
Definition project_def_dlg.cpp:83
ProjectDefDLG()
Constructors.
Definition project_def_dlg.cpp:52
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_PROJECTDEFDLG_IDNAME, const wxString &caption=SYMBOL_PROJECTDEFDLG_TITLE, const wxPoint &pos=SYMBOL_PROJECTDEFDLG_POSITION, const wxSize &size=SYMBOL_PROJECTDEFDLG_SIZE, long style=SYMBOL_PROJECTDEFDLG_STYLE)
Creation.
Definition project_def_dlg.cpp:69
void CreateControls()
Creates the controls and sizers.
Definition project_def_dlg.cpp:108
Definition project_def_layers_dlg.h:233
List of the Project Definition Dialog.
Definition project_def_dlg.h:167
Storing layers properties in memory.
Definition projectdefmemory.h:246
Definition wxflatbutton.h:61