ToolMap
Loading...
Searching...
No Matches
tmsymboldlgpoint.h
1/***************************************************************************
2 tmsymboldlgpoint.h
3 Display Point Symbology 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// comment doxygen
18
19#ifndef _TM_SYMBOLDLGPOINT_H_
20#define _TM_SYMBOLDLGPOINT_H_
21
22// For compilers that support precompilation, includes "wx/wx.h".
23#include <wx/wxprec.h>
24
25// Include wxWidgets' headers
26#ifndef WX_PRECOMP
27#include <wx/wx.h>
28#endif
29
30#include <wx/imaglist.h>
31#include <wx/listctrl.h>
32#include <wx/notebook.h>
33#include <wx/spinctrl.h>
34#include <wx/wupdlock.h>
35
36#include "tmsymboldlg.h" // tmSymbolDlg declaration
37#include "tmsymbolrule.h"
38
39const int ID_SYMDLGP_PANEL = 10216;
40const int ID_SYMDLGP_NOTEBOOK = 10080;
41const int ID_SYMDLGP_PANEL2 = 10081;
42const int ID_SYMDLGP_COLOR = 10082;
43const int ID_SYMDLGP_WIDTH = 10084;
44const int ID_SYMDLGP_PANEL3 = 10085;
45const int ID_SYMDLGP_PANEL4 = 10088;
46const int ID_SYMDLGP_TRANSPARENCY = 10086;
47
48const int ID_BTN_CLASSIFY_POINT = 10330;
49const int ID_BTN_ADD_POINT = 10331;
50const int ID_BTN_REMOVE_POINT = 10332;
51const int ID_BTN_REMOVEALL_POINT = 10333;
52const int ID_LIST_SYMBOL_POINT = 10334;
53
54const int ID_CONTEXT_MENU_EDIT_POINT = 10350;
55const int ID_CONTEXT_MENU_ENABLE_POINT = 10351;
56const int ID_CONTEXT_MENU_DISABLE_POINT = 10352;
57const int ID_CONTEXT_MENU_POINT_COLOR = 10353;
58const int ID_CONTEXT_MENU_POINT_RADIUS = 10354;
59const int ID_CONTEXT_MENU_TRANSPARENCY_POINT = 10355;
60
62
64
66
68 public:
69 wxColour m_Colour;
70 int m_Radius;
71 int m_GlobalTransparency;
72 int m_PanelNo;
73
75 m_PanelNo = 0;
76 m_Colour = *wxBLACK;
77 m_Radius = 5;
78 m_GlobalTransparency = 0;
79 }
80};
81
83 private:
84 wxColourPickerCtrl* m_PointColourCtrl;
85 wxSpinCtrl* m_PointWidthCtrl;
86 tmSliderWithText* m_TransparencySlider;
87
89
90 void _Init();
91
92 void CreateControlsPoint();
93
94 virtual bool TransferDataToWindow();
95
96 virtual bool TransferDataFromWindow();
97
98 DECLARE_DYNAMIC_CLASS(tmSymbolDLGPoint)
99
100 DECLARE_EVENT_TABLE()
101
102 public:
105
107
108 tmSymbolDLGPoint(wxWindow* parent, wxWindowID id = SYMBOL_TMSYMBOLDLG_IDNAME,
109 const wxString& caption = SYMBOL_TMSYMBOLDLG_TITLE,
110 const wxPoint& pos = SYMBOL_TMSYMBOLDLG_POSITION, const wxSize& size = SYMBOL_TMSYMBOLDLG_SIZE,
111 long style = SYMBOL_TMSYMBOLDLG_STYLE);
112
113 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_TMSYMBOLDLG_IDNAME,
114 const wxString& caption = SYMBOL_TMSYMBOLDLG_TITLE, const wxPoint& pos = SYMBOL_TMSYMBOLDLG_POSITION,
115 const wxSize& size = SYMBOL_TMSYMBOLDLG_SIZE, long style = SYMBOL_TMSYMBOLDLG_STYLE);
116
117 void SetDialogData(const tmSymbolDataPointUnique& data) {
118 m_DlgData = data;
119 }
120
121 tmSymbolDataPointUnique GetDialogData() {
122 return m_DlgData;
123 }
124};
125
126/*************************************************************************************/
132 private:
133 wxNotebook* m_SymbologyTypeCtrl;
134 wxChoice* m_CategoryColumnCtrl;
135 DataListReportCtrl* m_SymbolListCtrl;
136 wxButton* m_ClassifyBtn;
137 wxButton* m_AddBtn;
138 wxButton* m_RemoveBtn;
139 wxButton* m_RemoveAllBtn;
140 wxImageList* m_ImgList;
141
142 // unique
143 wxColourPickerCtrl* m_PointColourCtrl;
144 wxSpinCtrl* m_PointWidthCtrl;
145 tmSliderWithText* m_TransparencySlider;
146
147 tmSymbolRuleArray m_Rules;
148 tmLayerProperties* m_LayerProperties;
149
150 tmGISDataVectorSHP* m_GISData;
151 wxString m_SelectedField;
152 tmSymbolDataPointUnique m_PointUniqueStyle;
153
154 void _CreateControls();
155
156 void _LoadTableData();
157
158 wxBitmap _CreateColorBitmap(const wxBrush& brush, const wxPen& pen);
159
160 void OnBtnClassify(wxCommandEvent& event);
161
162 void OnBtnAdd(wxCommandEvent& event);
163
164 void OnBtnRemove(wxCommandEvent& event);
165
166 void OnBtnRemoveAll(wxCommandEvent& event);
167
168 void OnDoubleClick(wxListEvent& event);
169
170 void OnRightClick(wxListEvent & event);
171
172 void OnMenuEdit(wxCommandEvent& event);
173
174 void OnMenuDisable(wxCommandEvent& event);
175
176 void OnMenuEnable(wxCommandEvent& event);
177
178 void _EnableItems(bool enable);
179
180 void OnMenuPointColor(wxCommandEvent& event);
181
182 void OnMenuPointRadius(wxCommandEvent& event);
183
184 void OnMenuTransparency(wxCommandEvent& event);
185
186 void OnUpdateUIBtnRemove(wxUpdateUIEvent& event);
187
188 void OnUpdateUIBtnRemoveAll(wxUpdateUIEvent& event);
189
190 virtual bool TransferDataToWindow();
191
192 virtual bool TransferDataFromWindow();
193
194 DECLARE_EVENT_TABLE();
195
196 public:
197 tmSymbolDLGPointRule(wxWindow* parent, tmLayerProperties* layerproperties = nullptr,
198 wxWindowID id = SYMBOL_TMSYMBOLDLG_IDNAME, const wxString& caption = SYMBOL_TMSYMBOLDLG_TITLE,
199 const wxPoint& pos = SYMBOL_TMSYMBOLDLG_POSITION, const wxSize& size = SYMBOL_TMSYMBOLDLG_SIZE,
200 long style = SYMBOL_TMSYMBOLDLG_STYLE);
201
202 virtual ~tmSymbolDLGPointRule();
203
204 bool Create(wxWindow* parent, wxWindowID id = SYMBOL_TMSYMBOLDLG_IDNAME,
205 const wxString& caption = SYMBOL_TMSYMBOLDLG_TITLE, const wxPoint& pos = SYMBOL_TMSYMBOLDLG_POSITION,
206 const wxSize& size = SYMBOL_TMSYMBOLDLG_SIZE, long style = SYMBOL_TMSYMBOLDLG_STYLE);
207
208 inline tmSymbolRuleArray* GetRulesRef() {
209 return &m_Rules;
210 };
211
212 int GetSelectedPanel();
213
214 inline const wxString GetSelectedField() const;
215
216 inline tmSymbolDataPointUnique GetPointUniqueStyle();
217
218 void SetPointUniqueStyle(tmSymbolDataPointUnique value);
219
220 void SetSelectedField(wxString value);
221
222 void SetSelectedPanel(int panelindex);
223};
224
225inline const wxString tmSymbolDLGPointRule::GetSelectedField() const {
226 return m_SelectedField;
227}
228
229inline tmSymbolDataPointUnique tmSymbolDLGPointRule::GetPointUniqueStyle() {
230 return m_PointUniqueStyle;
231}
232
233#endif
Definition datalistreportctrl.h:30
Definition tmgisdatavectorshp.h:36
Storing object of layer type.
Definition tmlayerproperties.h:47
Definition tmsliderwithtxt.h:47
Symbology dialog for points supporting rules.
Definition tmsymboldlgpoint.h:131
Definition tmsymboldlgpoint.h:82
tmSymbolDLGPoint()
Constructors.
Definition tmsymboldlgpoint.cpp:31
Definition tmsymboldlg.h:55
Definition tmsymboldlgpoint.h:67