~ubuntu-branches/ubuntu/utopic/ginkgocadx/utopic-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/widgets/wanotacionposicion.cpp

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-01-09 07:37:09 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20140109073709-rpuh5x3p3finvtze
Tags: 3.6.0.1228.33+dfsg-1
New upstream release [December 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
//#define _GINKGO_TRACE
15
15
 
16
16
#include "wanotacionposicion.h"
17
 
#include <api/ianotador.h>
18
17
 
19
18
#include <main/managers/widgetsmanager.h>
20
19
#include <eventos/mensajes.h>
 
20
#include <api/iannotator.h>
21
21
#include <main/entorno.h>
22
22
#include <main/controllers/controladoreventos.h>
23
23
 
24
24
 
25
25
//region "Constructor y destructor"
26
26
 
27
 
GNC::GCS::Widgets::WAnotacionPosicion::WAnotacionPosicion(GNC::GCS::IAnotador* annotator, IWidgetsManager* pManager, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
 
27
GNC::GCS::Widgets::WAnotacionPosicion::WAnotacionPosicion(IWidgetsManager* pManager, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
28
28
{
29
29
        m_Oculto = false;
30
30
        m_TopLevel = true;
31
31
        m_ReservaRecursos = false;
32
 
        m_pAnnotator = annotator;
33
32
        
34
33
        GTRACE("Anotador posicion creado");
35
34
}
55
54
        }
56
55
 
57
56
        if( evento.Moving() || evento.Dragging()) {
58
 
                std::string posstr = m_pAnnotator->GetAnotacionPosicion(evento.wP, evento.c);
59
 
                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,posstr));
 
57
                if (m_pManager->GetAnnotator().IsValid()) {
 
58
                        std::string posstr = m_pManager->GetAnnotator()->GetPositionAnnotation(evento.c, evento.wP);
 
59
                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,posstr));
 
60
                }
60
61
        }
61
62
}
62
63
 
94
95
        }
95
96
}
96
97
 
97
 
//region "Interfaz especifica"
98
 
void GNC::GCS::Widgets::WAnotacionPosicion::SetAnotador(GNC::GCS::IAnotador* anotador)
99
 
{
100
 
        m_pAnnotator = anotador;
101
 
}
102
 
//endregion
 
98
 
103
99