Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ImportStructDlgOGR.h
1 //
2 // Name: ImportStructOGRDlg.h
3 //
4 // Copyright (c) 2003-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __ImportStructOGRDlg_H__
9 #define __ImportStructOGRDlg_H__
10 
11 #ifndef WX_PRECOMP
12  #include "wx/wx.h"
13 #endif
14 
15 #include "VTBuilder_UI.h"
16 #include "vtdata/StructArray.h"
17 
18 // WDR: class declarations
19 
20 //----------------------------------------------------------------------------
21 // ImportStructOGRDlg
22 //----------------------------------------------------------------------------
23 
25 {
26 public:
27  ImportStructOGRDlg( wxWindow *parent, wxWindowID id, const wxString &title,
28  const wxPoint& pos = wxDefaultPosition,
29  const wxSize& size = wxDefaultSize,
30  long style = wxDEFAULT_DIALOG_STYLE );
31 
32  // WDR: method declarations for ImportStructOGRDlg
33  wxChoice* GetLayername() { return (wxChoice*) FindWindow( ID_LAYERNAME ); }
34  wxCheckBox* GetUse25d() { return (wxCheckBox*) FindWindow( ID_USE_25D ); }
35  wxCheckBox* GetBuildFoundations() { return (wxCheckBox*) FindWindow( ID_BUILD_FOUNDATIONS ); }
36  wxChoice* GetChoiceHeightType() { return (wxChoice*) FindWindow( ID_CHOICE_HEIGHT_TYPE ); }
37  wxChoice* GetChoiceHeightField() { return (wxChoice*) FindWindow( ID_CHOICE_HEIGHT_FIELD ); }
38  wxChoice* GetChoiceFileField() { return (wxChoice*) FindWindow( ID_CHOICE_FILE_FIELD ); }
39  wxRadioButton* GetTypeInstance() { return (wxRadioButton*) FindWindow( ID_TYPE_INSTANCE ); }
40  wxRadioButton* GetTypeLinear() { return (wxRadioButton*) FindWindow( ID_TYPE_LINEAR ); }
41  wxRadioButton* GetTypeBuilding() { return (wxRadioButton*) FindWindow( ID_TYPE_BUILDING ); }
42  void SetDatasource(OGRDataSource *pDatasource) { m_pDatasource = pDatasource; }
43  void UpdateFieldNames();
44  void UpdateEnables();
45  bool GetRadio(int id);
46 
47  int m_iType;
48 // int m_iHeightType; // 0 = stories, 1 = meters, 2 = feet
49 // int m_iElevationUnits; // 0 = meters, 1 = feet
50 
51  StructImportOptions m_opt;
52 
53 private:
54  // WDR: member variable declarations for ImportStructOGRDlg
55  OGRDataSource *m_pDatasource;
56 
57 private:
58  // WDR: handler declarations for ImportStructOGRDlg
59  void OnChoiceLayerName( wxCommandEvent &event );
60  void OnChoiceFileField( wxCommandEvent &event );
61  void OnChoiceHeightField( wxCommandEvent &event );
62  void OnRadio( wxCommandEvent &event );
63  void OnInitDialog(wxInitDialogEvent& event);
64 
65  DECLARE_EVENT_TABLE()
66 };
67 
68 #endif // __ImportStructOGRDlg_H__
69