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

« back to all changes in this revision

Viewing changes to src/cadxcore/main/tools/sendpacstool.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:
19
19
 
20
20
#include <api/internationalization/internationalization.h>
21
21
#include <api/controllers/icontroladorpermisos.h>
22
 
#include <api/controllers/icommandscontroller.h>
 
22
#include <main/controllers/commandcontroller.h>
23
23
#include <resources/ginkgoresourcesmanager.h>
24
24
#include <main/controllers/historytoolscontroller.h>
25
25
#include <main/gui/selectpacsserver/selectpacsserver.h>
 
26
#include <main/gui/history3/synchronizedialog.h>
26
27
#include <main/controllers/historycontroller.h>
27
28
#include <commands/sendpacscommand.h>
28
29
 
48
49
        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
49
50
        std::list<long> listOfPks;
50
51
        pHistory->GetSelectedSeriesPk(listOfPks);
 
52
        Execute(listOfPks);
 
53
}
51
54
 
 
55
void GNC::SendPACSTool::Execute(const std::list<long>& listOfPks)
 
56
{
 
57
        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
52
58
        if (listOfPks.empty()) {
53
59
                wxMessageBox(_("Select at least one series"), _("Info"), wxICON_INFORMATION, pHistory->GetWxWindow());
54
60
                return;
55
61
        }
56
62
 
57
 
        GNC::GUI::SelectPacsServer dlg(pHistory->GetWxWindow());
58
 
        if (dlg.ShowModal() == wxID_OK) {
59
 
                GADAPI::SendPACSCommand* pCmd = new GADAPI::SendPACSCommand(dlg.GetSelectedServer(), "", listOfPks);
60
 
                GNC::GCS::IControladorComandos::Instance()->ProcessAsync(_Std("Uploading to the PACS ..."),pCmd, NULL);
 
63
        if (!AreSeriesFullyDownloaded(listOfPks)) {
 
64
                GNC::GUI::SynchronizeDialog dlg(pHistory->GetWxWindow(), listOfPks, this);
 
65
                dlg.ShowModal();
 
66
        } else {
 
67
                GNC::GUI::SelectPacsServer dlg(pHistory->GetWxWindow());
 
68
                if (dlg.ShowModal() == wxID_OK) {
 
69
                        GADAPI::SendPACSCommand* pCmd = new GADAPI::SendPACSCommand(dlg.GetSelectedServer(), "", listOfPks);
 
70
                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Sending to PACS..."),pCmd, NULL);
 
71
                }
61
72
        }
62
73
}
63
74