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

« back to all changes in this revision

Viewing changes to src/visualizator/visualizator/wxvtk/gwaveformview.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:
23
23
 
24
24
#include <visualizator/vistas/waveformview.h>
25
25
#include <visualizator/estudios/visualizatorstudy.h>
26
 
#include <api/controllers/icommandscontroller.h>
 
26
#include <main/controllers/commandcontroller.h>
27
27
#include <api/controllers/ieventscontroller.h>
28
28
#include <api/controllers/icontroladorvistas.h>
29
29
#include <api/iwidgetsrenderer.h>
142
142
                        pToolBar->AddTool(HCore_DetachWindow, (GNC::GCS::IViewContract*) View);
143
143
                        pToolBar->AddTool(HCore_MetricGrid, (GNC::GCS::IWidgetsContract*) Delegate);
144
144
                        pToolBar->AddTool(HCore_Reset, (GNC::GCS::IWidgetsContract*) Delegate);
 
145
 
 
146
                        pToolBar->AddTool(HCore_SecondaryCapture, (GNC::GCS::IWidgetsContract*) Delegate);
145
147
                        //tools
146
148
                        pToolBar->AddTool(HCore_ShowDicomTags, (GNC::GCS::IViewContract*) View);
147
 
                        pToolBar->AddTool(HCore_ShowHistory, (GNC::GCS::IViewContract*) View);
 
149
                        pToolBar->AddTool(HCore_ShowHistory, (GNC::GCS::IViewContract*) View);
 
150
                        pToolBar->AddTool(HCore_PACSUpload, (GNC::GCS::IViewContract*) View);
148
151
                        pToolBar->AddTool(HCore_Deshacer, (GNC::GCS::IViewContract*) View);
149
152
                        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaVisualizacion), 0, wxEXPAND);
150
153
                        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaMedicion), 0, wxEXPAND);
196
199
                {
197
200
                        this->Disconnect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GWaveformView::OnFocus),NULL,this);
198
201
                        if (View != NULL) {
199
 
                                GNC::GCS::IEntorno::Instance()->GetControladorComandos()->AbortarComandosDeOwner(View);
 
202
                                GNC::GCS::IEntorno::Instance()->GetCommandController()->AbortarComandosDeOwner(View);
200
203
                        }                       
201
204
                        View->GetToolController()->FinalizeToolController();
202
205
                        m_pManager->EliminarTodosLosWidgets(false);
235
238
 
236
239
                                
237
240
                                WECG = new GNKVisualizator::Widgets::WECG(GetManager(), 0);
238
 
                                GetManager()->InsertarWidget(WECG, false);
 
241
                                        GetManager()->InsertarWidget(WECG, false);
239
242
                                
240
 
                                WECG->Reload(View->GetECGStudy()->GetListOfChannels());
241
 
                                WECG->AutoCallibrate();
242
 
 
243
 
                                m_pTextDiagnosis->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetDiagnosis().c_str()));
244
 
                                m_pTextMeasurements->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetGlobalMeasurement().c_str()));
245
 
 
246
 
                                //change color to widget anotacionesesquina
247
 
                                for( GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it != m_pManager->GetListaWidgets().end(); ++it) {
248
 
                                        GNC::GCS::Widgets::IWidget* w = *it;
249
 
                                        if (w->GetVID() == -1) {
250
 
                                                GNC::GCS::Widgets::WAnotador* wac = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
251
 
                                                if (wac != NULL) {
252
 
                                                        wac->SetTextColor(GNC::GCS::GLHelper::TColor(ANNOTATOR_TEXT_COLOR));
 
243
                                if (!View->GetECGStudy()->Ok()) {
 
244
                                        wxMessageBox(_("Error loading study with ecg view"), _("Error"), wxOK, NULL);
 
245
                                } else {
 
246
                                        WECG->Reload(View->GetECGStudy()->GetListOfChannels());
 
247
                                        WECG->AutoCallibrate();
 
248
 
 
249
                                        m_pTextDiagnosis->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetDiagnosis().c_str()));
 
250
                                        m_pTextMeasurements->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetGlobalMeasurement().c_str()));
 
251
 
 
252
                                        //change color to widget anotacionesesquina
 
253
                                        for( GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it != m_pManager->GetListaWidgets().end(); ++it) {
 
254
                                                GNC::GCS::Widgets::IWidget* w = *it;
 
255
                                                if (w->GetVID() == -1) {
 
256
                                                        GNC::GCS::Widgets::WAnotador* wac = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
 
257
                                                        if (wac != NULL) {
 
258
                                                                wac->SetTextColor(GNC::GCS::GLHelper::TColor(ANNOTATOR_TEXT_COLOR));
 
259
                                                        }
253
260
                                                }
254
261
                                        }
255
 
                                }
256
 
                        }               
 
262
                                }               
 
263
                        }
257
264
                }
258
265
 
259
266
                
468
475
                        os << "25 mm/s, 10 mm/mV";
469
476
                        return os.str();
470
477
                }
 
478
 
 
479
                std::string GWaveformView::GetPatientPosition(GNC::GCS::Contexto3D* c)
 
480
                {
 
481
                        return "";
 
482
                }
 
483
 
471
484
                std::string GWaveformView::GetAnotacionPosicion(GNC::GCS::Vector* pPosicionRaton)
472
485
                {
473
486
                        return "";
474
487
                }
 
488
 
475
489
                //end ianotador
476
490
 
477
491
                void GWaveformView::OnFocus(wxChildFocusEvent &event)
531
545
                                                                {
532
546
                                                                        ViewImage2D->Modified();
533
547
                                                                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(View,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
534
 
                                                                        WECG->Reload(View->GetECGStudy()->GetListOfChannels());
 
548
                                                                        if (View->GetECGStudy()->Ok()) {
 
549
                                                                                WECG->Reload(View->GetECGStudy()->GetListOfChannels());
 
550
                                                                        }
535
551
                                                                }
536
552
                                                                break;
537
553
                                                case GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada: