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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#pragma once
/*
 *  
 *  $Id: ivista.h $
 *  Ginkgo CADx Project
 *
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 *  http://ginkgo-cadx.com
 *
 *  This file is licensed under LGPL v3 license.
 *  See License.txt for details
 *
 */
#ifndef IVIEW_H
#define IVIEW_H

#include <api/api.h>
#include <api/globals.h>
#include <api/ilock.h>
#include <string>
#include <vector>
#include <api/autoptr.h>

//----------------------------------------------------------------------------------------------------
//region Forward Declarations

class wxWindow;
class vtkAlgorithmOutput;
class vtkImageData;

namespace GNC{
	namespace GCS {
		class IModuleController;
		class IStudyContext;
		class ITool;
		class IComando;
		class IToolController;
	}
}

namespace GIL {
	class IModeloIntegracion;
}
//endregion


namespace GNC {
	namespace GCS {

//----------------------------------------------------------------------------------------------------
//region Excepcion de tipo vista
		class EXTAPI VistaException : public GNC::GCS::IException {
		public:
			VistaException(const std::string& msg, const std::string& component="Modelo", bool fatal = true) throw();
		};
//endregion

//----------------------------------------------------------------------------------------------------
//region Interfaz de vistas

		class EXTAPI IVista : public GNC::GCS::ILockable {
		public:

			/* Constructor */
			IVista(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& estudio);

			/* Destructor */
			virtual ~IVista();

			virtual std::string& GetTitulo();

			virtual wxWindow* GetWindow() = 0;

			virtual bool SoportaHerramienta(GNC::GCS::ITool* pHerramienta);

			virtual bool SoportaGuardar() = 0;

			virtual bool SoportaExportar() = 0;

			/* Notificacion de cambio en la configuracion */
			virtual void OnConfiguracionCambiada();

			virtual void Activar();

			virtual void Desactivar();

			/* Obtiene el identificador unico del modulo al que pertenece */
			virtual const std::string& GetUIDModulo();

			/* Obtiene el modulo al que pertenece */
			virtual GNC::GCS::IModuleController* GetModulo();

			GNC::GCS::Ptr<GNC::GCS::IStudyContext>& GetEstudio();

			virtual bool EstaCargada();

			virtual bool EstaModificada();

			virtual void SetCargada(bool cargada = true);

			virtual bool Guardar();

			virtual const std::list<std::string> GetImagePaths() const;

			virtual void ActivarRuta(long file_pk) = 0;

			/**Gets dicom is currently shown**/
			virtual std::string GetCurrentDICOM();

			//----------------------------------------------------------------------------------------------------
			//region Interfaz de Carga

			// Comienzo de carga. Metodo sincrono con la interfaz.
			virtual void OnCargaIniciada() = 0;

			// Paso 1: Cargar el estudio. Metodo NO sincrono con la interfaz.
			virtual void CargarEstudio(GNC::GCS::IComando* pCmdInvocador) = 0;

			// Finalizacion de la carga. Metodo sincrono con la interfaz.
			virtual void OnCargaFinalizada() = 0;

			// Paso 2: Inicializacion del pipeline. Metodo sincrono con la interfaz.
			virtual void IniciarPipeline() = 0;

			// Parada del pipeline. Metodo sincrono con la interfaz Se invoca en el caso de que ocurra un error de carga.
			virtual void DetenerPipeline() = 0;

			virtual GNC::GCS::IToolController* GetToolController();

			//endregion

			virtual void OnFocus();

		private:
			// Estudio is a pointer to GNC::GCS::Ptr to avoid circular dependencies.
			GNC::GCS::Ptr<GNC::GCS::IStudyContext>* Estudio;

		protected:
			std::string                        m_Titulo;
			GNC::GCS::IToolController*         m_toolController;

			bool                               m_Activada;
			bool                               m_Cargada;
			bool                               m_Guardada;

		};
	}
}
#endif