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

« back to all changes in this revision

Viewing changes to src/cadxcore/commands/sendpacscommand.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:
22
22
 
23
23
#include <main/entorno.h>
24
24
#include <main/controllers/controladoreventos.h>
25
 
#include <main/controllers/controladorcomandos.h>
 
25
#include <main/controllers/commandcontroller.h>
26
26
#include <main/controllers/controladorpermisos.h>
27
 
#include <main/controllers/controladorcomandos.h>
 
27
#include <main/controllers/commandcontroller.h>
28
28
#include <main/controllers/pacscontroller.h>
29
29
#include <main/controllers/historycontroller.h>
30
30
#include <main/controllers/controladorlog.h>
100
100
 
101
101
        std::string SendPACSCommand::serialize()
102
102
        {
103
 
                wxXmlDocument documento;
104
 
                wxXmlNode* raiz = NULL;
105
 
                
106
 
                //si el funcionamiento es de n diagnosticos se guardan los widgets que hay
107
 
                raiz = new wxXmlNode(NULL,wxXML_ELEMENT_NODE, wxT("SendPacsCommand"));
108
 
                documento.SetFileEncoding(wxT("UTF-8"));
109
 
                documento.SetRoot(raiz);
110
 
                raiz->AddAttribute(wxT("pacs"),wxString::FromUTF8(m_selectedServer.c_str()));
111
 
                raiz->AddAttribute(wxT("hl7"), wxString::FromUTF8(m_hl7Message.c_str()));
112
 
                wxStringOutputStream out;
 
103
                wxXmlDocument documento;
 
104
                wxXmlNode* raiz = NULL;
 
105
                
 
106
                //si el funcionamiento es de n diagnosticos se guardan los widgets que hay
 
107
                raiz = new wxXmlNode(NULL,wxXML_ELEMENT_NODE, wxT("SendPacsCommand"));
 
108
                documento.SetFileEncoding(wxT("UTF-8"));
 
109
                documento.SetRoot(raiz);
 
110
                raiz->AddAttribute(wxT("pacs"),wxString::FromUTF8(m_selectedServer.c_str()));
 
111
                raiz->AddAttribute(wxT("hl7"), wxString::FromUTF8(m_hl7Message.c_str()));
 
112
                wxStringOutputStream out;
113
113
                documento.Save(out);
114
114
                return std::string(out.GetString().ToUTF8());
115
115
        }
135
135
 
136
136
                if(m_selectedServer == "") {
137
137
                        //usaremos el primer servidor (por defecto)
138
 
                        if(DicomServerList::Instance()->GetFirst() !=NULL) {
 
138
                        if(!DicomServerList::Instance()->Empty()) {
139
139
                                m_selectedServer = DicomServerList::Instance()->GetDefaultServer()->ID;
140
140
                        } else {
141
141
                                throw GIL::DICOM::PACSException(_Std("There is not any Remote PACS configured"));
146
146
                std::map<std::string, std::list<std::string> > mapOfTSyntax;
147
147
 
148
148
                for (std::list<long>::const_iterator it = m_seriesId.begin(); it != m_seriesId.end(); ++it) {
149
 
                        GNC::GCS::HistoryController::FileModelList listOfFiles;
 
149
                        GNC::GCS::HistoryController::LightFileModelList listOfFiles;
150
150
                        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*it), listOfFiles);
151
 
                        for (GNC::GCS::HistoryController::FileModelList::iterator itFiles = listOfFiles.begin(); itFiles != listOfFiles.end(); itFiles++) {
 
151
                        for (GNC::GCS::HistoryController::LightFileModelList::iterator itFiles = listOfFiles.begin(); itFiles != listOfFiles.end(); itFiles++) {
152
152
                                if (mapOfTSyntax.find((*itFiles).tsuid) == mapOfTSyntax.end()) {
153
153
                                        mapOfTSyntax[(*itFiles).tsuid] = std::list<std::string>();
154
154
                                }
214
214
                                        {
215
215
                                                //retry; copy and execute...
216
216
                                                SendPACSCommand* pCmd = new SendPACSCommand(*this);
217
 
                                                GNC::ControladorComandos::Instance()->ProcessAsync("Sending...",pCmd, NULL);
 
217
                                                GNC::CommandController::Instance()->ProcessAsync("Sending...",pCmd, NULL);
218
218
                                        }
219
219
                                        break;
220
220
                                default: