6
* Copyright 2008-14 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
14
#include "camerarotationtool.h"
17
#include <export/contracts/iwidgetscontract.h>
19
#include <api/globals.h>
20
#include <api/iwidgetsmanager.h>
21
#include <resources/ginkgoresourcesmanager.h>
22
#include <widgets/wcamerarotation.h>
28
#include <vtk/vtkginkgoimageviewer.h>
29
#include <vtkRenderWindowInteractor.h>
30
#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
33
GNC::CameraRotationTool::CameraRotationTool() {
37
GNC::CameraRotationTool::~CameraRotationTool()
39
if (m_pBuilder != NULL) {
45
GNC::GCS::ITool* GNC::CameraRotationTool::NewTool()
47
return new GNC::CameraRotationTool();
50
void GNC::CameraRotationTool::Connect()
52
if (m_pBuilder != NULL) {
56
m_pBuilder = new TBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
57
WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
58
WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
61
void GNC::CameraRotationTool::Disconnect()
63
WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
64
WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
65
// DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
66
if (m_pBuilder != NULL) {