Main_Dialog_Base.cpp
Go to the documentation of this file.
1 
22 
23 
24 MainDialogBase::MainDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
25 {
26  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
27 
28  wxBoxSizer* bSizer2;
29  bSizer2 = new wxBoxSizer( wxVERTICAL );
30 
31 
32  bSizer2->Add( 0, 10, 0, 0, 5 );
33 
34  wxBoxSizer* bSizer10;
35  bSizer10 = new wxBoxSizer( wxHORIZONTAL );
36 
37 
38  bSizer10->Add( 20, 0, 0, 0, 5 );
39 
40  label_caption = new wxStaticText( this, wxID_ANY, wxT("3D recognition parameters"), wxDefaultPosition, wxDefaultSize, 0 );
41  label_caption->Wrap( -1 );
42  label_caption->SetFont( wxFont( 13, 70, 90, 92, false, wxEmptyString ) );
43 
44  bSizer10->Add( label_caption, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
45 
46  bSizer2->Add( bSizer10, 0, wxEXPAND, 5 );
47 
48 
49  bSizer2->Add( 0, 10, 0, 0, 5 );
50 
51  wxBoxSizer* bSizer3;
52  bSizer3 = new wxBoxSizer( wxHORIZONTAL );
53 
54  label_name = new wxStaticText( this, wxID_ANY, wxT("Name"), wxDefaultPosition, wxDefaultSize, 0 );
55  label_name->Wrap( -1 );
56  bSizer3->Add( label_name, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
57 
58 
59  bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
60 
61  edit_name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 300,-1 ), wxTE_PROCESS_ENTER );
62  bSizer3->Add( edit_name, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
63 
64 
65  bSizer3->Add( 20, 0, 0, wxEXPAND, 5 );
66 
67  bSizer2->Add( bSizer3, 0, wxEXPAND|wxLEFT, 5 );
68 
69  wxBoxSizer* bSizer4;
70  bSizer4 = new wxBoxSizer( wxHORIZONTAL );
71 
72  label_object_model = new wxStaticText( this, wxID_ANY, wxT("Object-Model"), wxDefaultPosition, wxDefaultSize, 0 );
73  label_object_model->Wrap( -1 );
74  bSizer4->Add( label_object_model, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
75 
76 
77  bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
78 
79  wxArrayString choice_object_modelChoices;
80  choice_object_model = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 300,-1 ), choice_object_modelChoices, 0 );
81  choice_object_model->SetSelection( 0 );
82  bSizer4->Add( choice_object_model, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
83 
84 
85  bSizer4->Add( 20, 0, 0, wxEXPAND, 5 );
86 
87  bSizer2->Add( bSizer4, 0, wxEXPAND|wxLEFT, 5 );
88 
89  wxBoxSizer* bSizer41;
90  bSizer41 = new wxBoxSizer( wxHORIZONTAL );
91 
92  label_mesh = new wxStaticText( this, wxID_ANY, wxT("Textured object-model (Visualisation)"), wxDefaultPosition, wxDefaultSize, 0 );
93  label_mesh->Wrap( -1 );
94  bSizer41->Add( label_mesh, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
95 
96 
97  bSizer41->Add( 0, 0, 1, wxEXPAND, 5 );
98 
99  wxArrayString choice_meshChoices;
100  choice_mesh = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 300,-1 ), choice_meshChoices, 0 );
101  choice_mesh->SetSelection( 0 );
102  bSizer41->Add( choice_mesh, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
103 
104 
105  bSizer41->Add( 20, 0, 0, wxEXPAND, 5 );
106 
107  bSizer2->Add( bSizer41, 0, wxEXPAND|wxLEFT, 5 );
108 
109  wxBoxSizer* bSizer411;
110  bSizer411 = new wxBoxSizer( wxHORIZONTAL );
111 
112  label_rotation_type = new wxStaticText( this, wxID_ANY, wxT("Rotation-Model-Type"), wxDefaultPosition, wxDefaultSize, 0 );
113  label_rotation_type->Wrap( -1 );
114  bSizer411->Add( label_rotation_type, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
115 
116 
117  bSizer411->Add( 0, 0, 1, wxEXPAND, 5 );
118 
119  wxString choice_rotation_typeChoices[] = { wxT("No Rotation"), wxT("Cylinder"), wxT("Sphere") };
120  int choice_rotation_typeNChoices = sizeof( choice_rotation_typeChoices ) / sizeof( wxString );
121  choice_rotation_type = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 300,-1 ), choice_rotation_typeNChoices, choice_rotation_typeChoices, 0 );
122  choice_rotation_type->SetSelection( 0 );
123  bSizer411->Add( choice_rotation_type, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
124 
125 
126  bSizer411->Add( 20, 0, 0, wxEXPAND, 5 );
127 
128  bSizer2->Add( bSizer411, 0, wxEXPAND|wxLEFT, 5 );
129 
130  wxBoxSizer* bSizer12;
131  bSizer12 = new wxBoxSizer( wxHORIZONTAL );
132 
133  label_orientation = new wxStaticText( this, wxID_ANY, wxT("Model-Orientation"), wxDefaultPosition, wxDefaultSize, 0 );
134  label_orientation->Wrap( -1 );
135  bSizer12->Add( label_orientation, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
136 
137 
138  bSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
139 
140  label_orientation_x = new wxStaticText( this, wxID_ANY, wxT("x:"), wxDefaultPosition, wxDefaultSize, 0 );
141  label_orientation_x->Wrap( -1 );
142  bSizer12->Add( label_orientation_x, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
143 
144  edit_orientation_x = new wxTextCtrl( this, wxID_ANY, wxT("1.0"), wxDefaultPosition, wxSize( 70,-1 ), wxTE_PROCESS_ENTER );
145  bSizer12->Add( edit_orientation_x, 0, wxALL, 5 );
146 
147  label_orientation_y = new wxStaticText( this, wxID_ANY, wxT("y:"), wxDefaultPosition, wxDefaultSize, 0 );
148  label_orientation_y->Wrap( -1 );
149  bSizer12->Add( label_orientation_y, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
150 
151  edit_orientation_y = new wxTextCtrl( this, wxID_ANY, wxT("0.0"), wxDefaultPosition, wxSize( 70,-1 ), wxTE_PROCESS_ENTER );
152  bSizer12->Add( edit_orientation_y, 0, wxALL, 5 );
153 
154  label_orientation_z = new wxStaticText( this, wxID_ANY, wxT("z:"), wxDefaultPosition, wxDefaultSize, 0 );
155  label_orientation_z->Wrap( -1 );
156  bSizer12->Add( label_orientation_z, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
157 
158  edit_orientation_z = new wxTextCtrl( this, wxID_ANY, wxT("0.0"), wxDefaultPosition, wxSize( 70,-1 ), wxTE_PROCESS_ENTER );
159  bSizer12->Add( edit_orientation_z, 0, wxALL, 5 );
160 
161 
162  bSizer12->Add( 20, 0, 0, wxEXPAND, 5 );
163 
164  bSizer2->Add( bSizer12, 0, wxEXPAND|wxLEFT, 5 );
165 
166  wxBoxSizer* bSizer13;
167  bSizer13 = new wxBoxSizer( wxHORIZONTAL );
168 
169  label_diameter = new wxStaticText( this, wxID_ANY, wxT("Diameter"), wxDefaultPosition, wxDefaultSize, 0 );
170  label_diameter->Wrap( -1 );
171  bSizer13->Add( label_diameter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
172 
173 
174  bSizer13->Add( 0, 0, 1, wxEXPAND, 5 );
175 
176  edit_diameter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_PROCESS_ENTER );
177  bSizer13->Add( edit_diameter, 0, wxALL|wxEXPAND, 5 );
178 
179 
180  bSizer13->Add( 20, 0, 0, wxEXPAND, 5 );
181 
182  bSizer2->Add( bSizer13, 0, wxEXPAND|wxLEFT, 5 );
183 
184  wxBoxSizer* bSizer14;
185  bSizer14 = new wxBoxSizer( wxHORIZONTAL );
186 
187  label_score_3D = new wxStaticText( this, wxID_ANY, wxT("Score 3D"), wxDefaultPosition, wxDefaultSize, 0 );
188  label_score_3D->Wrap( -1 );
189  bSizer14->Add( label_score_3D, 0, wxALL|wxALIGN_BOTTOM, 5 );
190 
191 
192  bSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
193 
194  edit_score_3D = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_PROCESS_ENTER );
195  bSizer14->Add( edit_score_3D, 0, wxALL|wxEXPAND, 5 );
196 
197 
198  bSizer14->Add( 20, 0, 0, wxEXPAND, 5 );
199 
200  bSizer2->Add( bSizer14, 0, wxLEFT|wxEXPAND, 5 );
201 
202 
203  bSizer2->Add( 0, 5, 0, 0, 5 );
204 
205  wxBoxSizer* bSizer15;
206  bSizer15 = new wxBoxSizer( wxHORIZONTAL );
207 
208 
209  bSizer15->Add( 0, 0, 1, wxEXPAND, 5 );
210 
211  button_cancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
212  bSizer15->Add( button_cancel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
213 
214  button_next = new wxButton( this, wxID_ANY, wxT("Next >"), wxDefaultPosition, wxDefaultSize, 0 );
215  bSizer15->Add( button_next, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
216 
217  bSizer2->Add( bSizer15, 1, wxEXPAND, 5 );
218 
219 
220  bSizer2->Add( 0, 10, 0, 0, 5 );
221 
222  this->SetSizer( bSizer2 );
223  this->Layout();
224 
225  this->Centre( wxBOTH );
226 
227  // Connect Events
228  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogBase::onDialogClose ) );
229  edit_name->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusName ), NULL, this );
230  edit_name->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterName ), NULL, this );
231  choice_object_model->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogBase::onObjectModelSelected ), NULL, this );
232  edit_orientation_x->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusOrientationX ), NULL, this );
233  edit_orientation_x->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterOrientationX ), NULL, this );
234  edit_orientation_y->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusOrientationY ), NULL, this );
235  edit_orientation_y->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterOrientationY ), NULL, this );
236  edit_orientation_z->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusOrientationZ ), NULL, this );
237  edit_orientation_z->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterOrientationZ ), NULL, this );
238  edit_diameter->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusDiameter ), NULL, this );
239  edit_diameter->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterDiameter ), NULL, this );
240  edit_score_3D->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusScore3D ), NULL, this );
241  edit_score_3D->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterScore3D ), NULL, this );
242  button_cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::onCancelPressed ), NULL, this );
243  button_next->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::onNextPressed ), NULL, this );
244 }
245 
247 {
248  // Disconnect Events
249  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogBase::onDialogClose ) );
250  edit_name->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusName ), NULL, this );
251  edit_name->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterName ), NULL, this );
252  choice_object_model->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( MainDialogBase::onObjectModelSelected ), NULL, this );
253  edit_orientation_x->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusOrientationX ), NULL, this );
254  edit_orientation_x->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterOrientationX ), NULL, this );
255  edit_orientation_y->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusOrientationY ), NULL, this );
256  edit_orientation_y->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterOrientationY ), NULL, this );
257  edit_orientation_z->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusOrientationZ ), NULL, this );
258  edit_orientation_z->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterOrientationZ ), NULL, this );
259  edit_diameter->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusDiameter ), NULL, this );
260  edit_diameter->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterDiameter ), NULL, this );
261  edit_score_3D->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MainDialogBase::onKillFocusScore3D ), NULL, this );
262  edit_score_3D->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MainDialogBase::onTextEnterScore3D ), NULL, this );
263  button_cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::onCancelPressed ), NULL, this );
264  button_next->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::onNextPressed ), NULL, this );
265 }
wxButton * button_next
#define NULL
virtual void onKillFocusOrientationZ(wxFocusEvent &event)
virtual void onObjectModelSelected(wxCommandEvent &event)
virtual void onTextEnterOrientationZ(wxCommandEvent &event)
virtual void onTextEnterDiameter(wxCommandEvent &event)
virtual void onTextEnterOrientationY(wxCommandEvent &event)
wxStaticText * label_diameter
virtual void onKillFocusName(wxFocusEvent &event)
virtual void onTextEnterScore3D(wxCommandEvent &event)
virtual void onKillFocusDiameter(wxFocusEvent &event)
wxTextCtrl * edit_orientation_x
virtual void onKillFocusScore3D(wxFocusEvent &event)
wxStaticText * label_score_3D
virtual void onTextEnterName(wxCommandEvent &event)
virtual void onCancelPressed(wxCommandEvent &event)
wxTextCtrl * edit_orientation_y
wxTextCtrl * edit_diameter
virtual void onKillFocusOrientationX(wxFocusEvent &event)
wxChoice * choice_rotation_type
wxStaticText * label_orientation_z
virtual void onDialogClose(wxCloseEvent &event)
wxTextCtrl * edit_name
wxTextCtrl * edit_orientation_z
wxButton * button_cancel
wxStaticText * label_object_model
virtual void onTextEnterOrientationX(wxCommandEvent &event)
wxStaticText * label_mesh
MainDialogBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxT("Descriptor Surface Based Trainer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(600, 320), long style=wxDEFAULT_DIALOG_STYLE)
wxStaticText * label_name
wxStaticText * label_orientation_x
wxStaticText * label_rotation_type
wxStaticText * label_orientation_y
wxChoice * choice_object_model
wxStaticText * label_orientation
wxTextCtrl * edit_score_3D
wxStaticText * label_caption
wxChoice * choice_mesh
virtual void onKillFocusOrientationY(wxFocusEvent &event)
virtual void onNextPressed(wxCommandEvent &event)


asr_descriptor_surface_based_recognition
Author(s): Allgeyer Tobias, Hutmacher Robin, Meißner Pascal
autogenerated on Mon Dec 16 2019 03:31:15