3
* $Id: brightnesscontrasttool.cpp $
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 "brightnesscontrasttool.h"
15
#if defined(ENABLE_BRIGHTNESSCONTRASTTOOL)
17
#include <api/globals.h>
18
#include <export/contracts/iwidgetscontract.h>
19
#include <api/iwidgetsmanager.h>
20
#include <widgets/wbrightnesscontrast.h>
25
#include <vtk/vtkginkgoimageviewer.h>
27
GNC::BrightnessContrastTool::BrightnessContrastTool() : m_pBuilder(NULL)
32
GNC::BrightnessContrastTool::~BrightnessContrastTool() {
36
//------------------------------------------------------------------------------
37
//region "ITool/IContract realization"
39
GNC::GCS::ITool* GNC::BrightnessContrastTool::NewTool()
41
return new GNC::BrightnessContrastTool();
44
void GNC::BrightnessContrastTool::Connect()
46
if (m_pBuilder != NULL)
52
m_pBuilder = new GNC::GCS::Widgets::WBrightnessContrastBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long) this);
53
WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
54
WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
57
void GNC::BrightnessContrastTool::Disconnect()
59
WidgetsContract->GetManager()->EnableAnotacionDinamica(false);
60
WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
61
WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
62
if (m_pBuilder != NULL)
64
// DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
b'\\ No newline at end of file'