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

« back to all changes in this revision

Viewing changes to src/cadxcore/main/gui/history3/synchronizedialog.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: synchronizedialog.h $
 
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
 
 
15
#include "synchronizedialog.h"
 
16
#include <main/controllers/commandcontroller.h>
 
17
#include <commands/synchronizationcommand.h>
 
18
#include <main/controllers/hangingprotocolcontroller.h>
 
19
 
 
20
 
 
21
GNC::GUI::SynchronizeDialog::SynchronizeDialog(wxWindow* parent, const std::list<long>& seriesPk, GNC::GCS::IHistoryTool* pTool): GNC::GUI::SynchronizeDialogBase(parent),
 
22
        m_seriesPk(seriesPk),
 
23
        m_pTool(pTool),
 
24
        m_pCtrlMod(NULL),
 
25
        m_mode(-1),
 
26
        m_pHangingProtocol(NULL),
 
27
        m_isToolMode(true)
 
28
{
 
29
}
 
30
 
 
31
GNC::GUI::SynchronizeDialog::SynchronizeDialog(wxWindow* parent, const std::list<long>& seriesPk, GNC::GCS::IModuleController* pCtrlMod, int mode, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& pHangingProtocol): GNC::GUI::SynchronizeDialogBase(parent),
 
32
        m_seriesPk(seriesPk),
 
33
        m_pTool(NULL),
 
34
        m_pCtrlMod(pCtrlMod),
 
35
        m_mode(mode),
 
36
        m_pHangingProtocol(pHangingProtocol),
 
37
        m_isToolMode(false)
 
38
{
 
39
}
 
40
 
 
41
GNC::GUI::SynchronizeDialog::~SynchronizeDialog()
 
42
{
 
43
}
 
44
 
 
45
void GNC::GUI::SynchronizeDialog::OnSynchronize(wxCommandEvent &/*evt*/)
 
46
{
 
47
        if (m_isToolMode) {
 
48
                GADAPI::SynchronizationCommandParameters* pParams = new GADAPI::SynchronizationCommandParameters(m_seriesPk, m_pTool);
 
49
                GADAPI::SynchronizationCommand* pCmd = new GADAPI::SynchronizationCommand(pParams);
 
50
                GNC::GCS::ICommandController::Instance()->ProcessAsync("syncronizing...", pCmd, NULL);
 
51
        } else {
 
52
                GADAPI::SynchronizationCommandParameters* pParams = new GADAPI::SynchronizationCommandParameters(m_seriesPk, m_pCtrlMod, m_mode, m_pHangingProtocol);
 
53
                GADAPI::SynchronizationCommand* pCmd = new GADAPI::SynchronizationCommand(pParams);
 
54
                GNC::GCS::ICommandController::Instance()->ProcessAsync("syncronizing...", pCmd, NULL);
 
55
        }
 
56
 
 
57
        EndModal(wxOK);
 
58
}
 
 
b'\\ No newline at end of file'