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

« back to all changes in this revision

Viewing changes to src/cadxcore/main/gui/mainwindow/ventanaprincipal.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-07-21 11:58:53 UTC
  • mfrom: (1.2.1) (7.1.6 experimental)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20130721115853-0aii5ee76hxm8z1f
* 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
1
/*
2
2
 *  
3
 
 *  $Id: ventanaprincipal.h 4571 2012-01-19 09:08:09Z tovar $
 
3
 *  $Id: ventanaprincipal.h $
4
4
 *  Ginkgo CADx Project
5
5
 *
6
 
 *  Copyright 2008-10 MetaEmotion S.L. All rights reserved.
 
6
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
7
7
 *  http://ginkgo-cadx.com
8
8
 *
9
9
 *  This file is licensed under LGPL v3 license.
13
13
 */
14
14
#pragma once
15
15
 
 
16
#include <api/internal.h>
 
17
#include "ventanaprincipalbase.h"
 
18
 
16
19
#include <wx/event.h>
17
20
#include <wx/aui/aui.h>
18
 
#include "ventanaprincipalbase.h"
 
21
#include <wx/statbmp.h>
 
22
#include <wx/bmpbuttn.h>
19
23
 
20
24
#include <api/globals.h>
21
 
#include <api/api.h>
22
 
#include <api/icontroladormodulo.h>
23
 
#include <api/iherramienta.h>
24
 
#include <api/icontroladoreventos.h>
25
 
#include <main/controllers/controladorvistas.h>
26
 
#include <main/controllers/controladorextensiones.h>
 
25
 
 
26
#include <api/toolsystem/itool.h>
 
27
#include <api/observers/ieventsobserver.h>
 
28
#include <api/observers/iviewsobserver.h>
 
29
#include <api/observers/iextensionsobserver.h>
27
30
 
28
31
namespace GNC {
29
32
        namespace GUI {
30
33
                class PanelGrid;
31
 
                class PanelHistorial2;
32
 
        }
33
 
        class Entorno;
 
34
        }
 
35
        namespace GCS {
 
36
                class IEntorno;
 
37
        }
34
38
}
35
 
class wxHtmlEasyPrinting;
36
39
class wxWindowDisabler;
37
40
class wxScrolledWindow;
38
 
class wxPrintData;
 
41
class wxStaticBitmap;
 
42
class wxBitmapButton;
39
43
 
40
44
const wxEventType wxEVT_PROGRESO = wxNewEventType();
41
45
 
94
98
    wx__DECLARE_EVT0(wxEVT_PROGRESO, EventoProgresoFunctionHandler(func))
95
99
 
96
100
 
97
 
class EXTAPI VentanaPrincipal : public VentanaPrincipalBase, public GNC::GCS::IObservadorExtensiones, public GNC::GCS::IObservadorVistas, public GNC::GCS::IObservador {
 
101
class EXTAPI VentanaPrincipal : public VentanaPrincipalBase, public GNC::GCS::IExtensionsObserver, public GNC::GCS::IObservadorVistas, public GNC::GCS::IEventsObserver {
98
102
public:
99
103
 
100
104
        /* Constructor */
138
142
        /* Evento de salir de la aplicacion */
139
143
        virtual void OnSalir(wxCommandEvent& event);
140
144
 
141
 
        virtual void OnDropDownAcquire(wxAuiToolBarEvent& event);
142
 
        virtual void OnDropDownPacs(wxAuiToolBarEvent& event);
143
 
 
144
145
        /* Evento de lanzamiento de ventana "Acerca De" */
145
146
        virtual void OnAcercaDe(wxCommandEvent& event);
146
147
 
149
150
 
150
151
        /* Evento de lanzamiento de ventana "Online support" */
151
152
        virtual void OnOnlineSupport(wxCommandEvent& event);
 
153
 
 
154
        /* Open test card */
 
155
        virtual void OnOpenTestCard(wxCommandEvent& event);
152
156
        
153
 
        /* Launch event window "Extensions Support" */
154
 
        virtual void OnExtensionsSupport(wxCommandEvent& event);
155
 
 
156
157
        /* Evento de lanzamiento de la comprobacion de actualizaciones */
157
158
        virtual void OnCheckForUpdates(wxCommandEvent& event);
158
159
 
159
 
        /*startup page*/
160
 
        void OnShowStartupPage(wxCommandEvent& event);
161
 
        void ShowStartupPage();
162
 
 
163
 
        /* Evento de apertura de estudio */
164
 
        virtual void OnPACSAcquisition(wxCommandEvent& event);
165
 
 
166
 
        /*Evento de apertura de fichero*/
167
 
        virtual void OnAbrirFichero(wxCommandEvent& event);
168
 
 
169
 
        /*Evento de open disc*/
170
 
        virtual void OnOpenRemovableUnit(wxCommandEvent& event);
171
 
 
172
 
 
173
 
        /*Evento de apertura de directorio*/
174
 
        virtual void OnAbrirDirectorio(wxCommandEvent& event);
175
 
 
176
160
        #ifdef __WXMAC__
177
161
        void MacOpenFile(const wxString &fileName);
178
162
        #endif
179
163
 
180
 
        /* Evento de importacion de estudio */
181
 
        virtual void OnImportar(wxCommandEvent& event);
182
 
 
183
 
        /* Evento de guardado de un estudio */
184
 
        virtual void OnGuardar(wxCommandEvent& event);
185
 
 
186
 
        /* Evento de exportado de un estudio */
187
 
        virtual void OnExportar(wxCommandEvent& event);
188
 
 
189
 
        virtual void OnDicomDirExport(wxCommandEvent& event);
190
 
 
191
 
        /* Evento de exportado de un subir al pacs */
192
 
        virtual void OnSubirPACS(wxCommandEvent& event);
193
 
 
194
 
        /* Evento de actualizacion de elemento de menu de guardar */
195
 
        virtual void OnUpdateGuardar(wxUpdateUIEvent& event);
196
 
 
197
 
        /* Evento de actualizacion de elemento de menu de subir al pacs */
198
 
        virtual void OnUpdateExportar(wxUpdateUIEvent& event);
199
 
 
200
 
        /* Evento de actualizacion de elemento de menu de exportar */
201
 
        virtual void OnUpdateSubirPACS(wxUpdateUIEvent& event);
202
 
 
203
164
        /* Evento de configuracion */
204
165
        virtual void OnConfiguracion(wxCommandEvent& event);
205
166
 
212
173
        /* Evento de aplicacion de herramientas*/
213
174
        virtual void OnAplicarHerramienta(wxCommandEvent& event);
214
175
        virtual void OnUpdateUIHerramienta(wxUpdateUIEvent& event);
215
 
        virtual int InsertToolsFromFamily(wxMenu* pParent, GNC::GCS::IHerramienta::TFamiliasHerramientas family);
 
176
        virtual void InsertToolsFromFamily(wxMenu* pParent, GNC::GCS::ITool::TToolFamily family);
216
177
 
217
178
        /* Eventos de teclado */
218
179
        virtual void OnKeyDown(wxKeyEvent& event);
236
197
 
237
198
        void OnMenuPrimerPlanoPestaniaActiva(wxCommandEvent& event);
238
199
 
239
 
        /*Eventos de impresion*/
240
 
        void OnMenuImprimir(wxCommandEvent& event);
241
 
        void OnMenuImprimirUpdateUI(wxUpdateUIEvent& event);
242
 
 
243
200
        /*Eventos de vista*/
244
201
        void OnPantallaCompleta(wxCommandEvent& event);
245
202
 
 
203
        wxWindow* GetRootWindow();
 
204
 
246
205
        /*reorganizacion de pestañas*/
247
206
 
248
207
        //toggle entre enc
 
208
        void ShowStartUp(bool show);
249
209
        void EncajarDesencajar(GNC::GCS::IVista* pVista);
250
210
        void OnMosaicoHorizontal(wxCommandEvent& event);
251
211
        void OnMosaicoVertical(wxCommandEvent& event);
252
212
        void OnMosaicoRestaurar(wxCommandEvent& event);
253
 
        void OnMosaicoGrid2Col(wxCommandEvent& event);
254
 
        void OnMosaicoGrid3Col(wxCommandEvent& event);
255
 
        //helper
256
 
        void AddToGrid(int numColumnas);
257
213
        void ReplegarPestanias();
258
214
 
259
215
//endregion
270
226
        {
271
227
                event.Skip(false);
272
228
        }
273
 
        virtual void OnBarraHerramientasEraseBackground( wxEraseEvent& event )
274
 
        {
275
 
                event.Skip(false);
276
 
        }
277
 
        virtual void OnPanelHerramientasEraseBackground( wxEraseEvent& event )
278
 
        {
279
 
                event.Skip(false);
280
 
        }
281
 
        virtual void OnPanelHerramientasOpcionesEraseBackground( wxEraseEvent& event )
282
 
        {
283
 
                event.Skip(false);
284
 
        }
 
229
 
285
230
        virtual void OnPanelActualizacionEraseBackground( wxEraseEvent& event )
286
231
        {
287
232
                event.Skip(false);
309
254
public:
310
255
        bool CerrarVista(GNC::GCS::IVista* pVista);
311
256
        bool CerrarVista(wxWindow* window);
312
 
        void DestruirPanelGrid(GNC::GUI::PanelGrid* pPanelGrid);
313
257
        void PasarAPrimerPlano(wxWindow* window);
314
258
protected:
315
259
        void OnNotebookPageChanging(wxAuiNotebookEvent& event);
330
274
 
331
275
//region "eventos ginkgo"
332
276
protected:
333
 
        void ProcesarEvento(GNC::GCS::Eventos::IEvento *evt);
 
277
        void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
334
278
//endregion
335
279
 
336
280
//endregion
357
301
 
358
302
public:
359
303
        AUI_NAMESPACE wxAuiNotebook* GetAUINoteBook();
360
 
        GNC::GUI::PanelHistorial2* GetPanelHistorial();
361
304
 
362
305
public:
363
306
 
364
 
//region "Realización de la interfaz IObservadorExtensiones"
365
 
 
366
 
        virtual void OnModuloCargado(GNC::GCS::IControladorModulo*     pCM);
367
 
        virtual void OnModuloDescargado(GNC::GCS::IControladorModulo*  pCM);
368
 
        virtual void OnModuloActivado(GNC::GCS::IControladorModulo*    pCM);
369
 
        virtual void OnModuloDesactivado(GNC::GCS::IControladorModulo* pCM);
 
307
//------------------------------------------------------------------------------
 
308
//region "IExtensionsObserver realization"
 
309
 
 
310
        /** The module is loaded **/
 
311
        virtual void OnModuleLoaded(GNC::GCS::IModuleController* pMC);
 
312
        /** The module is unloaded **/
 
313
        virtual void OnModuleUnloaded(GNC::GCS::IModuleController* pMC);
 
314
 
 
315
        /** The module is activated **/
 
316
        virtual void OnModuleActivated(GNC::GCS::IModuleController* pMC);
 
317
        /** The module is deactivated **/
 
318
        virtual void OnModuleDeactivated(GNC::GCS::IModuleController* pMC);
370
319
 
371
320
//endregion
372
321
 
378
327
 
379
328
        wxAuiManager          m_mgr;
380
329
        wxAuiNotebook*        m_pNoteBook;
381
 
        wxPanel*              m_pMosaicPanel;
382
 
        //javi prueba del grid
383
 
        wxScrolledWindow*     m_pGridPanel;
 
330
        GNC::GCS::IVista*     StartupView;
384
331
 
385
332
 
386
333
//region "helpers"
404
351
//endregion
405
352
 
406
353
protected:
407
 
        GNC::GUI::PanelHistorial2*  m_pHistorial;
408
 
 
409
354
        wxMenu*                     m_pMenuModulo;
410
 
        AUI_NAMESPACE wxAuiToolBar* m_pBarraComun;
411
 
 
412
 
        /*
413
 
        ssize_t                     m_NumBackgroundRunning;
414
 
        ssize_t                     m_NumBackgroundCount;
415
 
        bool                        m_Canceled;
416
 
        wxCriticalSection           m_BackgroundCriticalSection;
417
 
 
418
 
        ssize_t                     m_NumComandosRunning;
419
 
        ssize_t                     m_NumComandosCount;
420
 
        wxCriticalSection           m_ComandosCriticalSection;
421
 
        */
422
355
 
423
356
        // Variable que controla la coherencia de confirmación entre cerrado de la aplicacion y cerrado de tabs para
424
357
        // no informar varias veces de lo mismo.
425
358
        bool                  m_TratandoDeCerrar;
426
359
 
427
360
        wxMenuBar*            m_pMenuBar;
428
 
        wxPrintData*           m_pPrintData;
429
361
 
430
362
        DECLARE_EVENT_TABLE()
431
 
        friend class GNC::GCS::ControladorVistas;
 
363
        //friend class GNC::GCS::ControladorVistas;
432
364
        bool                  m_Iniciada;
433
365
};
434
366