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

« back to all changes in this revision

Viewing changes to src/cadxcore/api/iwidgets.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2012-01-29 12:02:54 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120129120254-nu7giync5p156icb
Tags: 2.8.0.4602-1
New upstream version (adapted patch, removed patch applied upstream)
Closes: #657827

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  
3
 
 *  $Id: iwidgets.cpp 3830 2011-05-06 13:30:18Z carlos $
 
3
 *  $Id: iwidgets.cpp 4478 2011-12-13 11:55:00Z carlos $
4
4
 *  Ginkgo CADx Project
5
5
 *
6
6
 *  Copyright 2008-10 MetaEmotion S.L. All rights reserved.
58
58
 
59
59
//endregion
60
60
 
61
 
GNC::GCS::Widgets::IWidgetBuilder::IWidgetBuilder(GNC::GCS::IWidgetsManager* pManager, long gid, bool activar)
 
61
GNC::GCS::Widgets::IWidgetBuilder::IWidgetBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, bool activar)
62
62
{
 
63
        m_ButtonMask = buttonMask;
63
64
        m_GID = gid;
64
65
        m_pManager = pManager;
65
66
        if(activar) {
69
70
 
70
71
GNC::GCS::Widgets::IWidgetBuilder::~IWidgetBuilder()
71
72
{
72
 
        if (m_pManager->GetBuilder() == this) {
73
 
                m_pManager->SetBuilder(NULL);
74
 
        }
 
73
        m_pManager->UnRegisterBuilder(this);
75
74
}
76
75
 
77
76
/* Obtiene el id de grupo de los widget construidos (tipo) */
82
81
 
83
82
void GNC::GCS::Widgets::IWidgetBuilder::Activar()
84
83
{
85
 
        m_pManager->SetBuilder(this);
 
84
        m_pManager->RegisterBuilder(this);
86
85
}
87
86
 
88
87
void GNC::GCS::Widgets::IWidgetBuilder::Desactivar()
89
88
{
90
 
        m_pManager->SetBuilder(NULL);
 
89
        m_pManager->UnRegisterBuilder(this);
91
90
}
92
91
 
93
92
void GNC::GCS::Widgets::IWidgetBuilder::LanzarEventoCreacion(IWidget* w)