CustusX  18.04
An IGT application
cxOpenIGTLinkGuiExtenderService.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
14 #include "qIGTLIOClientWidget.h"
15 #include "qIGTLIOLogicController.h"
16 #include "cxPlusConnectWidget.h"
17 #include "cxVisServices.h"
18 
19 namespace cx
20 {
21 OpenIGTLink3GuiExtenderService::OpenIGTLink3GuiExtenderService(ctkPluginContext *context, igtlio::LogicPointer logic)
22 {
23  mContext = context;
24  mLogic = logic;
25 
26 }
27 
29 {
30 }
31 
32 std::vector<GUIExtenderService::CategorizedWidget> OpenIGTLink3GuiExtenderService::createWidgets() const
33 {
34  qIGTLIOLogicController* logicController = new qIGTLIOLogicController();
35  logicController->setLogic(mLogic);
36 
37  qIGTLIOClientWidget* widget = new qIGTLIOClientWidget();
38  widget->setWindowTitle("OpenIGTLink3");
39  widget->setObjectName("Object_OpenIGTLink_3");
40  widget->setLogic(mLogic);
41 
42  std::vector<CategorizedWidget> retval;
43  retval.push_back(GUIExtenderService::CategorizedWidget( widget, "OpenIGTLink"));
44 
45 
46  VisServicesPtr services = VisServices::create(mContext);
47 
48  PlusConnectWidget* plusconnectWidget = new PlusConnectWidget(services, NULL);
49  retval.push_back(GUIExtenderService::CategorizedWidget(plusconnectWidget, "OpenIGTLink"));
50 
51  return retval;
52 }
53 }//namespace cx
std::vector< CategorizedWidget > createWidgets() const
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
static VisServicesPtr create(ctkPluginContext *context)
OpenIGTLink3GuiExtenderService(ctkPluginContext *context, igtlio::LogicPointer logic)
Namespace for all CustusX production code.