CustusX  18.04-rc5
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
boost::shared_ptr< class OpenIGTLinkStreamerService > OpenIGTLinkStreamerServicePtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
View a xml document.
PlusConnectWidget(VisServicesPtr services, QWidget *parent)
boost::shared_ptr< class ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:41
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
boost::shared_ptr< class FilePathProperty > FilePathPropertyPtr
boost::shared_ptr< class StreamerService > StreamerServicePtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Widget for displaying and selecting a single file.
Namespace for all CustusX production code.