NorMIT-nav  22.09
An IGT application
cxPlusConnectWidget.h
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 #ifndef CXPLUSCONNECTWIDGET_H
13 #define CXPLUSCONNECTWIDGET_H
14 
15 #include <QProcess>
16 #include "cxTabbedWidget.h"
17 
18 class QPushButton;
19 class QDomElement;
20 class QComboBox;
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
25 typedef boost::shared_ptr<class OpenIGTLinkStreamerService> OpenIGTLinkStreamerServicePtr;
26 typedef boost::shared_ptr<class StreamerService> StreamerServicePtr;
27 typedef boost::shared_ptr<class ProcessWrapper> ProcessWrapperPtr;
28 typedef boost::shared_ptr<class FilePathProperty> FilePathPropertyPtr;
29 typedef boost::shared_ptr<class BoolProperty> BoolPropertyPtr;
30 class FileSelectWidget;
31 class FilePreviewWidget;
32 
34 {
35 public:
36  PlusConnectWidget(VisServicesPtr services, QWidget *parent);
37 
38 private slots:
39  void connectButtonClickedSlot();
40  void browsePlusPathSlot();
41  void plusAppStateChanged();
42 
43 // void browsePlusConfigFileSlot();
44  void configFileFileSelected(QString filename);
45  void processReadyRead();
46 private:
47  VisServicesPtr mServices;
48  QPushButton* mConnectButton;
49  bool mPlusRunning;
50  ProcessWrapperPtr mExternalProcess;
51 
52  QString mPlusPath;
53  QString mPlusConfigFile;
54  FileSelectWidget* mPlusConfigFileWidget;
55  FilePreviewWidget* mFilePreviewWidget;
56  QComboBox* mPlusPathComboBox;
57  BoolPropertyPtr mShowPlusOutput;
58 
59  StreamerServicePtr getStreamerService();
60  bool startPlus();
61  bool stopPlus();
62  QDomElement getXmlVideoElement();
63  bool startExternalPlusServer();
64  void searchForPlus();
65  void searchForPlusConfigFile();
66  QStringList getPlusConfigFilePaths();
67  bool configFileIsValid();
68  void startOpenIGTLink3VideoStreaming();
69  void changeOpenIGTLinkStreamerParameter(StreamerServicePtr streamerService, QString parameterName, QVariant value);
70 };
71 
72 }//namespace cx
73 #endif // CXPLUSCONNECTWIDGET_H
cx::FileSelectWidget
Widget for displaying and selecting a single file.
Definition: cxFileSelectWidget.h:45
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::BaseWidget
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
cx::BoolPropertyPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Definition: cxPlusConnectWidget.h:29
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
cx::FilePathPropertyPtr
boost::shared_ptr< class FilePathProperty > FilePathPropertyPtr
Definition: cxPlusConnectWidget.h:28
cx::StreamerServicePtr
boost::shared_ptr< class StreamerService > StreamerServicePtr
Definition: cxPlusConnectWidget.h:26
cx::ProcessWrapperPtr
boost::shared_ptr< class ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:41
cxTabbedWidget.h
cx::FilePreviewWidget
View a xml document.
Definition: cxFilePreviewWidget.h:37
cx::OpenIGTLinkStreamerServicePtr
boost::shared_ptr< class OpenIGTLinkStreamerService > OpenIGTLinkStreamerServicePtr
Definition: cxPlusConnectWidget.h:25
cx::PlusConnectWidget
Definition: cxPlusConnectWidget.h:33
cx::PlusConnectWidget::PlusConnectWidget
PlusConnectWidget(VisServicesPtr services, QWidget *parent)
Definition: cxPlusConnectWidget.cpp:40