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

« back to all changes in this revision

Viewing changes to src/cadxcore/main/tools/startdicomizationtool.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:
 
1
/*
 
2
 *  
 
3
 *  $Id: startdicomizationtool.cpp $
 
4
 *  Ginkgo CADx Project
 
5
 *
 
6
 *  Copyright 2008-12 MetaEmotion S.L. All rights reserved.
 
7
 *  http://ginkgo-cadx.com
 
8
 *
 
9
 *  This file is licensed under LGPL v3 license.
 
10
 *  See License.txt for details
 
11
 *
 
12
 *
 
13
 */
 
14
#include "startdicomizationtool.h"
 
15
#include <export/contracts/iviewcontract.h>
 
16
#include <api/ivista.h>
 
17
#include <api/controllers/icontroladorlog.h>
 
18
#include <main/gui/toolsystem/wxmenuitemtool.h>
 
19
#include <main/entorno.h>
 
20
#include <main/gui/mainwindow/ventanaprincipal.h>
 
21
#include <main/gui/history3/historypanel3.h>
 
22
 
 
23
#include <resources/ginkgoresourcesmanager.h>
 
24
#include <main/controllers/historytoolscontroller.h>
 
25
#include <main/gui/import/wxwizardimportacionginkgo.h>
 
26
#include <api/internationalization/internationalization.h>
 
27
 
 
28
//----------------------------------------------------------------------
 
29
 
 
30
GNC::GCS::ITool* GNC::StartDicomizationTool::NewTool()
 
31
{
 
32
        return new GNC::StartDicomizationTool();
 
33
}
 
34
 
 
35
GNC::StartDicomizationTool::StartDicomizationTool()
 
36
{
 
37
}
 
38
GNC::StartDicomizationTool::~StartDicomizationTool()
 
39
{
 
40
}
 
41
                
 
42
bool GNC::StartDicomizationTool::ExecuteAction()
 
43
{       
 
44
        try{
 
45
                GNC::GUI::wxWizardImportacionGinkgo ib(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow(),NULL);
 
46
 
 
47
                ib.ShowModal();
 
48
        }
 
49
        catch(GIL::DICOM::I2DException& i){
 
50
                LOG_ERROR("DicomizeTool", "Error in dicomization: " << i.GetCause())
 
51
        }
 
52
        
 
53
        return true;
 
54
}
 
55
 
 
56
void GNC::StartDicomizationTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
 
57
{
 
58
        if (AppendsInMenu()) {
 
59
                GNC::GUI::wxDefaultEvtHandlerTool* evtHandler = new GNC::GUI::wxDefaultEvtHandlerTool(pParent, this);
 
60
                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
 
61
        }
 
62
}
 
63
 
 
64
bool GNC::StartDicomizationTool::IsShown()
 
65
{
 
66
        return GNC::GUI::HistoryPanel3::Instance()->IsShown();
 
67
}