~ubuntu-branches/ubuntu/trusty/ginkgocadx/trusty

« back to all changes in this revision

Viewing changes to src/cadxcore/main/gui/ginkgocloud/downloadcloudbase.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (7.2.1 sid)
  • Revision ID: package-import@ubuntu.com-20130721115853-44e7n1xujqglu78e
Tags: 3.4.0.928.29+dfsg-1
* New upstream release [July 2013]
  + new B-D: "libjsoncpp-dev".
  + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
    "libjsoncpp-dev".
  + new patch "fix-wx.patch" to avoid FTBFS due to missing
    "-lwx_gtk2u_html-2.8".
* Removed unnecessary versioned Build-Depends.
* Removed obsolete lintian override.
* Reference get-orig-source implementation for orig.tar clean-up and
  DFSG-repackaging.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
///////////////////////////////////////////////////////////////////////////
 
2
// C++ code generated with wxFormBuilder (version Sep  8 2010)
 
3
// http://www.wxformbuilder.org/
 
4
//
 
5
// PLEASE DO "NOT" EDIT THIS FILE!
 
6
///////////////////////////////////////////////////////////////////////////
 
7
 
 
8
#include "wx/ginkgostyle/ginkgostyle.h"
 
9
 
 
10
#include "downloadcloudbase.h"
 
11
 
 
12
///////////////////////////////////////////////////////////////////////////
 
13
using namespace GNC::GUI;
 
14
 
 
15
OpenGinkgoCloudDialogBase::OpenGinkgoCloudDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 
16
{
 
17
        this->SetSizeHints( wxSize( 700,350 ), wxDefaultSize );
 
18
        
 
19
        wxBoxSizer* bSizerPrincipal;
 
20
        bSizerPrincipal = new wxBoxSizer( wxVERTICAL );
 
21
        
 
22
        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
23
        m_pHeader->SetToolTip( _("Ginkgo Cloud") );
 
24
        
 
25
        bSizerPrincipal->Add( m_pHeader, 0, wxEXPAND, 5 );
 
26
        
 
27
        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
28
        wxBoxSizer* bSizer11;
 
29
        bSizer11 = new wxBoxSizer( wxVERTICAL );
 
30
        
 
31
        m_pPanelSuperior = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
32
        m_pPanelSuperior->SetToolTip( _("Open link") );
 
33
        
 
34
        wxBoxSizer* bSizer81;
 
35
        bSizer81 = new wxBoxSizer( wxVERTICAL );
 
36
        
 
37
        m_staticText6 = new wxStaticText( m_pPanelSuperior, wxID_ANY, _("File link:"), wxDefaultPosition, wxDefaultSize, 0 );
 
38
        m_staticText6->Wrap( -1 );
 
39
        bSizer81->Add( m_staticText6, 0, wxALL, 5 );
 
40
        
 
41
        m_pFileLink = new wxTextCtrl( m_pPanelSuperior, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
 
42
        bSizer81->Add( m_pFileLink, 1, wxALL|wxEXPAND, 5 );
 
43
        
 
44
        m_pPanelSuperior->SetSizer( bSizer81 );
 
45
        m_pPanelSuperior->Layout();
 
46
        bSizer81->Fit( m_pPanelSuperior );
 
47
        bSizer11->Add( m_pPanelSuperior, 1, wxEXPAND, 5 );
 
48
        
 
49
        m_pBody->SetSizer( bSizer11 );
 
50
        m_pBody->Layout();
 
51
        bSizer11->Fit( m_pBody );
 
52
        bSizerPrincipal->Add( m_pBody, 1, wxEXPAND, 5 );
 
53
        
 
54
        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
55
        wxBoxSizer* bSizer8;
 
56
        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
 
57
        
 
58
        
 
59
        bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
 
60
        
 
61
        m_buttonAceptar = new wxButton( m_pFooter, wxID_OK, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
 
62
        m_buttonAceptar->SetDefault(); 
 
63
        bSizer8->Add( m_buttonAceptar, 0, wxLEFT, 5 );
 
64
        
 
65
        m_pButtonCancel = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
 
66
        bSizer8->Add( m_pButtonCancel, 0, 0, 5 );
 
67
        
 
68
        m_pFooter->SetSizer( bSizer8 );
 
69
        m_pFooter->Layout();
 
70
        bSizer8->Fit( m_pFooter );
 
71
        bSizerPrincipal->Add( m_pFooter, 0, wxEXPAND, 5 );
 
72
        
 
73
        this->SetSizer( bSizerPrincipal );
 
74
        this->Layout();
 
75
        
 
76
        this->Centre( wxBOTH );
 
77
        
 
78
        // Connect Events
 
79
        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ) );
 
80
        m_pHeader->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
81
        m_pBody->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
82
        m_pPanelSuperior->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
83
        m_staticText6->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
84
        m_pFileLink->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
85
        m_pFooter->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
86
        m_buttonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnAccept ), NULL, this );
 
87
        m_buttonAceptar->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
88
        m_pButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnCancel ), NULL, this );
 
89
        m_pButtonCancel->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
90
}
 
91
 
 
92
OpenGinkgoCloudDialogBase::~OpenGinkgoCloudDialogBase()
 
93
{
 
94
        // Disconnect Events
 
95
        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ) );
 
96
        m_pHeader->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
97
        m_pBody->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
98
        m_pPanelSuperior->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
99
        m_staticText6->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
100
        m_pFileLink->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
101
        m_pFooter->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
102
        m_buttonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnAccept ), NULL, this );
 
103
        m_buttonAceptar->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
104
        m_pButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnCancel ), NULL, this );
 
105
        m_pButtonCancel->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
 
106
        
 
107
}
 
108
 
 
109
GinkgoCloudSearchDialogBase::GinkgoCloudSearchDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 
110
{
 
111
        this->SetSizeHints( wxSize( 520,300 ), wxDefaultSize );
 
112
        
 
113
        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
 
114
        
 
115
        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
 
116
        m_pHeader->SetToolTip( _("Ginkgo Cloud") );
 
117
        
 
118
        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
 
119
        
 
120
        m_pBodyPanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
121
        wxBoxSizer* bSizer18;
 
122
        bSizer18 = new wxBoxSizer( wxVERTICAL );
 
123
        
 
124
        m_pPanelPACS = new TitledPanel( m_pBodyPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
125
        m_pPanelPACS->SetToolTip( _("Search") );
 
126
        
 
127
        wxBoxSizer* m_pSizerCamposBusqueda;
 
128
        m_pSizerCamposBusqueda = new wxBoxSizer( wxVERTICAL );
 
129
        
 
130
        wxBoxSizer* bSizer32;
 
131
        bSizer32 = new wxBoxSizer( wxHORIZONTAL );
 
132
        
 
133
        wxBoxSizer* bSizer33;
 
134
        bSizer33 = new wxBoxSizer( wxHORIZONTAL );
 
135
        
 
136
        m_pPatientLabelStr = new wxStaticText( m_pPanelPACS, wxID_ANY, _("Study"), wxDefaultPosition, wxDefaultSize, 0 );
 
137
        m_pPatientLabelStr->Wrap( -1 );
 
138
        m_pPatientLabelStr->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
 
139
        
 
140
        bSizer33->Add( m_pPatientLabelStr, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
141
        
 
142
        wxBoxSizer* bSizer23;
 
143
        bSizer23 = new wxBoxSizer( wxHORIZONTAL );
 
144
        
 
145
        m_pFieldCombo = new wxComboBox( m_pPanelPACS, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
 
146
        m_pFieldCombo->Append( _("Description") );
 
147
        m_pFieldCombo->Append( _("User name") );
 
148
        m_pFieldCombo->SetMinSize( wxSize( 80,-1 ) );
 
149
        
 
150
        bSizer23->Add( m_pFieldCombo, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
151
        
 
152
        m_pTextControlField = new wxSearchCtrl( m_pPanelPACS, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
 
153
        #ifndef __WXMAC__
 
154
        m_pTextControlField->ShowSearchButton( true );
 
155
        #endif
 
156
        m_pTextControlField->ShowCancelButton( false );
 
157
        bSizer23->Add( m_pTextControlField, 1, wxALL|wxEXPAND, 5 );
 
158
        
 
159
        m_pLabelRestricted = new wxStaticText( m_pPanelPACS, wxID_ANY, _("PACS acquisition is restricted"), wxDefaultPosition, wxDefaultSize, 0 );
 
160
        m_pLabelRestricted->Wrap( -1 );
 
161
        m_pLabelRestricted->Hide();
 
162
        
 
163
        bSizer23->Add( m_pLabelRestricted, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 
164
        
 
165
        wxBoxSizer* bSizer15;
 
166
        bSizer15 = new wxBoxSizer( wxHORIZONTAL );
 
167
        
 
168
        m_pSizerAnimation = new wxBoxSizer( wxHORIZONTAL );
 
169
        
 
170
        bSizer15->Add( m_pSizerAnimation, 0, wxALIGN_CENTER_VERTICAL, 5 );
 
171
        
 
172
        bSizer23->Add( bSizer15, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
 
173
        
 
174
        bSizer33->Add( bSizer23, 1, wxEXPAND, 5 );
 
175
        
 
176
        bSizer32->Add( bSizer33, 1, wxEXPAND, 5 );
 
177
        
 
178
        m_pSizerCamposBusqueda->Add( bSizer32, 0, wxEXPAND, 5 );
 
179
        
 
180
        wxBoxSizer* bSizer27;
 
181
        bSizer27 = new wxBoxSizer( wxHORIZONTAL );
 
182
        
 
183
        wxStaticBoxSizer* sbSizer2;
 
184
        sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelPACS, wxID_ANY, _("Date") ), wxVERTICAL );
 
185
        
 
186
        wxBoxSizer* bSizer17;
 
187
        bSizer17 = new wxBoxSizer( wxHORIZONTAL );
 
188
        
 
189
        wxBoxSizer* bSizer181;
 
190
        bSizer181 = new wxBoxSizer( wxVERTICAL );
 
191
        
 
192
        m_pAnyDate = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Any date"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
 
193
        m_pAnyDate->SetValue( true ); 
 
194
        bSizer181->Add( m_pAnyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
 
195
        
 
196
        m_pToday = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Today"), wxDefaultPosition, wxDefaultSize, 0 );
 
197
        bSizer181->Add( m_pToday, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
 
198
        
 
199
        m_pYesterday = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Yesterday"), wxDefaultPosition, wxDefaultSize, 0 );
 
200
        bSizer181->Add( m_pYesterday, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
 
201
        
 
202
        bSizer17->Add( bSizer181, 1, wxEXPAND, 5 );
 
203
        
 
204
        wxBoxSizer* bSizer29;
 
205
        bSizer29 = new wxBoxSizer( wxVERTICAL );
 
206
        
 
207
        m_pLastWeek = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 7 days"), wxDefaultPosition, wxDefaultSize, 0 );
 
208
        bSizer29->Add( m_pLastWeek, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
 
209
        
 
210
        m_pLastMonth = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 30 days"), wxDefaultPosition, wxDefaultSize, 0 );
 
211
        bSizer29->Add( m_pLastMonth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
 
212
        
 
213
        m_pLastThreeMonths = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 3 months"), wxDefaultPosition, wxDefaultSize, 0 );
 
214
        bSizer29->Add( m_pLastThreeMonths, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
 
215
        
 
216
        bSizer17->Add( bSizer29, 1, wxEXPAND, 5 );
 
217
        
 
218
        wxBoxSizer* bSizer201;
 
219
        bSizer201 = new wxBoxSizer( wxVERTICAL );
 
220
        
 
221
        m_pBetween = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Between:"), wxDefaultPosition, wxDefaultSize, 0 );
 
222
        bSizer201->Add( m_pBetween, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
 
223
        
 
224
        wxBoxSizer* bSizer21;
 
225
        bSizer21 = new wxBoxSizer( wxVERTICAL );
 
226
        
 
227
        m_pTextControlFechaDesde = new wxDatePickerCtrl( m_pPanelPACS, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
 
228
        bSizer21->Add( m_pTextControlFechaDesde, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
 
229
        
 
230
        bSizer201->Add( bSizer21, 0, wxEXPAND|wxLEFT, 5 );
 
231
        
 
232
        wxBoxSizer* bSizer22;
 
233
        bSizer22 = new wxBoxSizer( wxVERTICAL );
 
234
        
 
235
        m_pTextControlFechaHasta = new wxDatePickerCtrl( m_pPanelPACS, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
 
236
        bSizer22->Add( m_pTextControlFechaHasta, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
 
237
        
 
238
        bSizer201->Add( bSizer22, 0, wxEXPAND|wxLEFT, 5 );
 
239
        
 
240
        bSizer17->Add( bSizer201, 0, wxEXPAND, 5 );
 
241
        
 
242
        sbSizer2->Add( bSizer17, 1, wxEXPAND|wxALL, 5 );
 
243
        
 
244
        bSizer27->Add( sbSizer2, 1, wxEXPAND|wxRIGHT, 5 );
 
245
        
 
246
        wxStaticBoxSizer* sbSizer3;
 
247
        sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelPACS, wxID_ANY, _("Modalities") ), wxVERTICAL );
 
248
        
 
249
        m_pModalitySizer = new wxGridSizer( 5, 5, 0, 0 );
 
250
        
 
251
        sbSizer3->Add( m_pModalitySizer, 1, wxEXPAND|wxALL, 5 );
 
252
        
 
253
        bSizer27->Add( sbSizer3, 1, wxEXPAND|wxLEFT, 5 );
 
254
        
 
255
        m_pSizerCamposBusqueda->Add( bSizer27, 0, wxEXPAND|wxBOTTOM, 5 );
 
256
        
 
257
        m_pTreeListResults = new wxTreeListCtrlCloud( m_pPanelPACS, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTR_EDIT_LABELS|wxTR_FULL_ROW_HIGHLIGHT|wxTR_HAS_BUTTONS|wxTR_HAS_VARIABLE_ROW_HEIGHT|wxTR_HIDE_ROOT|wxTR_ROW_LINES|wxTAB_TRAVERSAL );
 
258
        m_pTreeListResults->SetMinSize( wxSize( -1,140 ) );
 
259
        
 
260
        m_pTreeListResults->AddColumn( _("Description"), 370, wxALIGN_LEFT, -1, true, false ); 
 
261
        m_pTreeListResults->AddColumn( _("Modalities"), 70, wxALIGN_CENTRE, -1, true, false ); 
 
262
        m_pTreeListResults->AddColumn( _("Creator"), 128, wxALIGN_LEFT, -1, true, false ); 
 
263
        m_pTreeListResults->AddColumn( _("Last Modificator"), 128, wxALIGN_LEFT, -1, true, false ); 
 
264
        m_pTreeListResults->AddColumn( _("Date Time"), 120, wxALIGN_CENTRE, -1, true, false ); 
 
265
        m_pTreeListResults->AddColumn( _("URL"), 0, wxALIGN_LEFT, -1, true, false ); 
 
266
        m_pTreeListResults->AddColumn( _("BucketId"), 0, wxALIGN_LEFT, -1, true, false ); 
 
267
        
 
268
        m_pSizerCamposBusqueda->Add( m_pTreeListResults, 1, wxEXPAND|wxTOP, 5 );
 
269
        
 
270
        wxBoxSizer* bSizer20;
 
271
        bSizer20 = new wxBoxSizer( wxHORIZONTAL );
 
272
        
 
273
        
 
274
        bSizer20->Add( 0, 0, 1, wxEXPAND, 5 );
 
275
        
 
276
        m_pBDescargar = new wxButton( m_pPanelPACS, wxID_ANY, _("Download"), wxDefaultPosition, wxDefaultSize, 0 );
 
277
        m_pBDescargar->Enable( false );
 
278
        
 
279
        bSizer20->Add( m_pBDescargar, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxTOP|wxLEFT, 5 );
 
280
        
 
281
        m_pSizerCamposBusqueda->Add( bSizer20, 0, wxEXPAND, 5 );
 
282
        
 
283
        m_pPanelPACS->SetSizer( m_pSizerCamposBusqueda );
 
284
        m_pPanelPACS->Layout();
 
285
        m_pSizerCamposBusqueda->Fit( m_pPanelPACS );
 
286
        bSizer18->Add( m_pPanelPACS, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
 
287
        
 
288
        m_pBodyPanel->SetSizer( bSizer18 );
 
289
        m_pBodyPanel->Layout();
 
290
        bSizer18->Fit( m_pBodyPanel );
 
291
        m_pMainSizer->Add( m_pBodyPanel, 1, wxEXPAND, 5 );
 
292
        
 
293
        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
294
        m_pFooter->Hide();
 
295
        
 
296
        wxBoxSizer* m_pSizerBotoneraVentana;
 
297
        m_pSizerBotoneraVentana = new wxBoxSizer( wxHORIZONTAL );
 
298
        
 
299
        
 
300
        m_pSizerBotoneraVentana->Add( 0, 0, 1, wxEXPAND, 5 );
 
301
        
 
302
        m_pBotonClose = new wxButton( m_pFooter, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
 
303
        m_pSizerBotoneraVentana->Add( m_pBotonClose, 0, wxALIGN_CENTER_VERTICAL, 5 );
 
304
        
 
305
        m_pFooter->SetSizer( m_pSizerBotoneraVentana );
 
306
        m_pFooter->Layout();
 
307
        m_pSizerBotoneraVentana->Fit( m_pFooter );
 
308
        m_pMainSizer->Add( m_pFooter, 0, wxEXPAND, 5 );
 
309
        
 
310
        this->SetSizer( m_pMainSizer );
 
311
        this->Layout();
 
312
        
 
313
        this->Centre( wxBOTH );
 
314
        
 
315
        // Connect Events
 
316
        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GinkgoCloudSearchDialogBase::OnClose ) );
 
317
        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ) );
 
318
        m_pFieldCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnComboField ), NULL, this );
 
319
        m_pTextControlField->Connect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCancelClick ), NULL, this );
 
320
        m_pTextControlField->Connect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
 
321
        m_pTextControlField->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
 
322
        m_pAnyDate->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
323
        m_pToday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
324
        m_pYesterday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
325
        m_pLastWeek->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
326
        m_pLastMonth->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
327
        m_pLastThreeMonths->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
328
        m_pBetween->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
329
        m_pTextControlFechaDesde->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaDesdeDateChanged ), NULL, this );
 
330
        m_pTextControlFechaDesde->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
331
        m_pTextControlFechaHasta->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaHastaDateChanged ), NULL, this );
 
332
        m_pTextControlFechaHasta->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
333
        m_pTreeListResults->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
334
        m_pBDescargar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnDescargarClick ), NULL, this );
 
335
        m_pBotonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCloseClick ), NULL, this );
 
336
}
 
337
 
 
338
GinkgoCloudSearchDialogBase::~GinkgoCloudSearchDialogBase()
 
339
{
 
340
        // Disconnect Events
 
341
        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GinkgoCloudSearchDialogBase::OnClose ) );
 
342
        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ) );
 
343
        m_pFieldCombo->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnComboField ), NULL, this );
 
344
        m_pTextControlField->Disconnect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCancelClick ), NULL, this );
 
345
        m_pTextControlField->Disconnect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
 
346
        m_pTextControlField->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
 
347
        m_pAnyDate->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
348
        m_pToday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
349
        m_pYesterday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
350
        m_pLastWeek->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
351
        m_pLastMonth->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
352
        m_pLastThreeMonths->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
353
        m_pBetween->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
354
        m_pTextControlFechaDesde->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaDesdeDateChanged ), NULL, this );
 
355
        m_pTextControlFechaDesde->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
356
        m_pTextControlFechaHasta->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaHastaDateChanged ), NULL, this );
 
357
        m_pTextControlFechaHasta->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
358
        m_pTreeListResults->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
 
359
        m_pBDescargar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnDescargarClick ), NULL, this );
 
360
        m_pBotonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCloseClick ), NULL, this );
 
361
        
 
362
}
 
363
 
 
364
FileLinkDialogBase::FileLinkDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
 
365
{
 
366
        this->SetSizeHints( wxSize( 600,300 ), wxDefaultSize );
 
367
        
 
368
        wxBoxSizer* bSizerPrincipal;
 
369
        bSizerPrincipal = new wxBoxSizer( wxVERTICAL );
 
370
        
 
371
        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
372
        m_pHeader->SetToolTip( _("Ginkgo Cloud") );
 
373
        
 
374
        bSizerPrincipal->Add( m_pHeader, 0, wxEXPAND, 5 );
 
375
        
 
376
        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
377
        wxBoxSizer* bSizer11;
 
378
        bSizer11 = new wxBoxSizer( wxVERTICAL );
 
379
        
 
380
        m_pPanelSuperior = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
381
        m_pPanelSuperior->SetToolTip( _("Ginkgo Cloud link") );
 
382
        
 
383
        wxBoxSizer* bSizer81;
 
384
        bSizer81 = new wxBoxSizer( wxVERTICAL );
 
385
        
 
386
        m_staticText6 = new wxStaticText( m_pPanelSuperior, wxID_ANY, _("File link:"), wxDefaultPosition, wxDefaultSize, 0 );
 
387
        m_staticText6->Wrap( -1 );
 
388
        bSizer81->Add( m_staticText6, 0, wxALL, 5 );
 
389
        
 
390
        m_pFileLink = new wxTextCtrl( m_pPanelSuperior, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
 
391
        bSizer81->Add( m_pFileLink, 1, wxALL|wxEXPAND, 5 );
 
392
        
 
393
        m_staticText7 = new wxStaticText( m_pPanelSuperior, wxID_ANY, _("You can copy and paste link to use it in e-mails and web pages, you have to install Ginkgo CADx to download and visualize it."), wxDefaultPosition, wxDefaultSize, 0 );
 
394
        m_staticText7->Wrap( 490 );
 
395
        m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 90, false, wxEmptyString ) );
 
396
        
 
397
        bSizer81->Add( m_staticText7, 0, wxALL, 5 );
 
398
        
 
399
        m_pPanelSuperior->SetSizer( bSizer81 );
 
400
        m_pPanelSuperior->Layout();
 
401
        bSizer81->Fit( m_pPanelSuperior );
 
402
        bSizer11->Add( m_pPanelSuperior, 1, wxEXPAND, 5 );
 
403
        
 
404
        m_pBody->SetSizer( bSizer11 );
 
405
        m_pBody->Layout();
 
406
        bSizer11->Fit( m_pBody );
 
407
        bSizerPrincipal->Add( m_pBody, 1, wxEXPAND, 5 );
 
408
        
 
409
        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 
410
        wxBoxSizer* bSizer8;
 
411
        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
 
412
        
 
413
        m_button7 = new wxButton( m_pFooter, wxID_ANY, _("Send link by e-mail"), wxDefaultPosition, wxDefaultSize, 0 );
 
414
        bSizer8->Add( m_button7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
 
415
        
 
416
        
 
417
        bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
 
418
        
 
419
        m_pCopyClipboard = new wxButton( m_pFooter, wxID_ANY, _("Copy to clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
 
420
        bSizer8->Add( m_pCopyClipboard, 0, 0, 5 );
 
421
        
 
422
        m_buttonAceptar = new wxButton( m_pFooter, wxID_CLOSE, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
 
423
        m_buttonAceptar->SetDefault(); 
 
424
        bSizer8->Add( m_buttonAceptar, 0, wxLEFT, 5 );
 
425
        
 
426
        m_pFooter->SetSizer( bSizer8 );
 
427
        m_pFooter->Layout();
 
428
        bSizer8->Fit( m_pFooter );
 
429
        bSizerPrincipal->Add( m_pFooter, 0, wxEXPAND, 5 );
 
430
        
 
431
        this->SetSizer( bSizerPrincipal );
 
432
        this->Layout();
 
433
        
 
434
        this->Centre( wxBOTH );
 
435
        
 
436
        // Connect Events
 
437
        m_pBody->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
438
        m_pPanelSuperior->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
439
        m_pFileLink->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
440
        m_pFooter->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
441
        m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnSendMail ), NULL, this );
 
442
        m_pCopyClipboard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnCopyClipboard ), NULL, this );
 
443
        m_pCopyClipboard->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
444
        m_buttonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnAccept ), NULL, this );
 
445
        m_buttonAceptar->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
446
}
 
447
 
 
448
FileLinkDialogBase::~FileLinkDialogBase()
 
449
{
 
450
        // Disconnect Events
 
451
        m_pBody->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
452
        m_pPanelSuperior->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
453
        m_pFileLink->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
454
        m_pFooter->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
455
        m_button7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnSendMail ), NULL, this );
 
456
        m_pCopyClipboard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnCopyClipboard ), NULL, this );
 
457
        m_pCopyClipboard->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
458
        m_buttonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnAccept ), NULL, this );
 
459
        m_buttonAceptar->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
 
460
        
 
461
}