ToolMap
Loading...
Searching...
No Matches
aattribbatch_dlg.h
1/***************************************************************************
2 aattribbatch_dlg.h
3 Display dialog for batch advanced attribution
4 -------------------
5 copyright : (C) 2010 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#ifndef _AATTRIB_BATCH_DLG_H_
18#define _AATTRIB_BATCH_DLG_H_
19
20// For compilers that support precompilation, includes "wx/wx.h".
21#include <wx/wxprec.h>
22
23// Include wxWidgets' headers
24#ifndef WX_PRECOMP
25#include <wx/wx.h>
26#endif
27
28#include <wx/statline.h>
29
30#include "../core/tmaattribbatchmanager.h"
31#include "../gis/tmaattribctrls.h"
32
34
35#define ID_DLGAATB_LIST_TYPE 22450
36#define ID_DLGAATB_LIST_FIELDS 22451
37
38/***************************************************************************/
44 private:
45 wxStaticText* m_ControlInfo;
46
47 protected:
48 public:
50
51 tmAAttribInfoPanel(wxWindow* parent, const ProjectDefMemoryFields& fieldinfo, wxWindowID id = wxID_ANY,
52 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
53 long style = wxTAB_TRAVERSAL, const wxString& name = _T("tmAAttribInfoPanel")) {
54 tmAAttribInfoPanel::Create(parent, fieldinfo, id, pos, size, style, name);
55 }
56
57 void Create(wxWindow* parent, const ProjectDefMemoryFields& fieldinfo, wxWindowID id = wxID_ANY,
58 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
59 long style = wxTAB_TRAVERSAL, const wxString& name = _T("tmAAttribInfoPanel")) {
60 wxPanel::Create(parent, id, pos, size, style, name);
61 wxBoxSizer* bSizer24;
62 bSizer24 = new wxBoxSizer(wxHORIZONTAL);
63 m_Label = new wxStaticText(this, wxID_ANY, _("Hint: "), wxDefaultPosition, wxDefaultSize, 0);
64 m_Label->SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
65 bSizer24->Add(m_Label, 0, wxRIGHT | wxTOP | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 5);
66
67 wxBoxSizer* bSizer25 = new wxBoxSizer(wxHORIZONTAL);
68
69 m_ControlInfo = new wxStaticText(
70 this, wxID_ANY, _("Select an object type then a field to be able to set value to selected objects"));
71 m_ControlInfo->SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
72 bSizer25->Add(m_ControlInfo, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 5);
73 bSizer24->Add(bSizer25, 1, wxALL | wxALIGN_CENTER_VERTICAL, 2);
74
75 SetSizer(bSizer24);
76 Layout();
77 bSizer24->Fit(this);
78 }
79
81 ;
82 }
83
84 // control operations
85 virtual void SetControlValue(const wxString& value) {
86 ;
87 }
88
89 virtual wxString GetControlValue() {
90 return wxEmptyString;
91 }
92};
93
97class AAttribBatch_DLG : public wxDialog {
98 DECLARE_EVENT_TABLE()
99 private:
100 wxListBox* m_ListType;
101 wxListBox* m_ListFields;
102 // wxPanel* m_PanelValue;
103 wxStdDialogButtonSizer* m_Btn;
104 wxButton* m_BtnSave;
105 wxButton* m_BtnApply;
106 wxButton* m_BtnCancel;
107 wxBoxSizer* m_CtrlSizer;
108 tmAAttribCtrl* m_ValueCtrl;
109
110 wxArrayLong m_ArrayIds;
111 PrjMemFieldArray m_Fields;
112 tmAAttribBatchManager* m_pBatchManager;
113
114 void _SetControl(tmAAttribCtrl* ctrl);
115
116 void OnTypeChange(wxCommandEvent& event);
117
118 void OnFieldsChange(wxCommandEvent& event);
119
120 void OnApply(wxCommandEvent& event);
121
122 void OnSave(wxCommandEvent& event);
123
124 public:
125 AAttribBatch_DLG(wxWindow* parent, tmAAttribBatchManager* manager, wxWindowID id = wxID_ANY,
126 const wxString& title = _("Object attribute (multiple features)"),
127 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(550, 350),
128 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
129
131
132 virtual bool TransferDataToWindow();
133};
134
135#endif
Class AAttribBatch_DLG.
Definition aattribbatch_dlg.h:97
Storing Fields property in memory.
Definition projectdefmemory.h:198
Definition tmaattribbatchmanager.h:37
Abstract class for tmAAttribTree Items.
Definition tmaattribctrls.h:50
tmAAttribInfo Panel
Definition aattribbatch_dlg.h:43