PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
QPlusDeviceSetSelectorWidget.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4 See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef DEVICESETSELECTORWIDGET_H
8 #define DEVICESETSELECTORWIDGET_H
9 
10 // Local includes
11 #include "PlusConfigure.h"
12 #include "PlusWidgetsExport.h"
13 #include "ui_QPlusDeviceSetSelectorWidget.h"
14 #include "vtkIGSIOTransformRepository.h"
15 
16 // Qt includes
17 #include <QString>
18 #include <QWidget>
19 
20 class QAction;
21 class QDomDocument;
22 class QDragEnterEvent;
23 class QDropEvent;
24 class QMenu;
25 
26 // VTK includes
27 #include <vtkSmartPointer.h>
28 
29 //-----------------------------------------------------------------------------
30 
35 class PlusWidgetsExport QPlusDeviceSetSelectorWidget : public QWidget
36 {
37  Q_OBJECT
38 
39 public:
45  QPlusDeviceSetSelectorWidget(QWidget* aParent = 0);
46 
51  void SetDeviceSetComboBoxMaximumSizeRatio(double ratio);
52 
57 
63  PlusStatus SetConfigurationDirectory(const QString& aDirectory);
64 
70  PlusStatus SetConfigurationFile(const QString& aFilename);
71 
76  void SetConnectionSuccessful(bool aConnectionSuccessful);
77 
82  bool GetConnectionSuccessful();
83 
87  std::string GetSelectedDeviceSetConfigFilePath();
88 
92  std::string GetSelectedDeviceSetDescription();
93 
97  void ShowResetTrackerButton(bool aValue);
98 
102  void SetConnectButtonText(QString text);
103 
107  void SetDescriptionSuffix(const QString& string);
108 
112  void ClearDescriptionSuffix();
113 
118  void UpdateDescriptionText();
119 
120 signals:
125  void ConfigurationDirectoryChanged(std::string);
126 
131  void DeviceSetSelected(std::string);
132 
137  void ConnectToDevicesByConfigFileInvoked(std::string);
138 
143  void ResetTracker();
144 
145 protected:
151  PlusStatus ParseDirectory(const QString& aDirectory);
152 
153  virtual void resizeEvent(QResizeEvent* event);
154 
155  QString FindCalibrationDetails(const QDomDocument& doc,
156  vtkSmartPointer<vtkIGSIOTransformRepository> tr,
157  const QString& tagName,
158  const QString& outputPrefix,
159  const QString& firstFrame,
160  const QString& secondFrame);
161 
162  void FixComboBoxDropDownListSizeAdjustemnt(QComboBox* cb);
163 
164  virtual void dragEnterEvent(QDragEnterEvent* event);
165  virtual void dropEvent(QDropEvent* event);
166 
167 protected slots:
171  void OpenConfigurationDirectory();
172 
176  void DeviceSetSelected(int);
177 
181  void InvokeConnect();
182 
186  void InvokeDisconnect();
187 
191  void RefreshFolder();
192 
196  void EditConfiguration();
197 
201  void ShowEditContextMenu(QPoint);
202 
206  void SelectEditor();
207 
211  void EditAppConfig();
212 
213  /*
214  * Reset tracker button has been pushed
215  */
216  void ResetTrackerButtonClicked();
217 
218 protected:
221 
225  QMenu* m_EditMenu;
226 
229 
232 
235 
238 
241 
242 protected:
243  Ui::DeviceSetSelectorWidget ui;
244 };
245 
246 #endif
igsioStatus PlusStatus
Definition: PlusCommon.h:40
PhidgetLCD_Font int int const char * text
Definition: phidget22.h:4287