Fraxinus  18.10
An IGT application
cxClipperWidget.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 CXCLIPPERWIDGET_H
13 #define CXCLIPPERWIDGET_H
14 
15 #include "cxGuiExport.h"
16 
17 #include <QVBoxLayout>
18 #include <QCheckBox>
19 #include "cxBaseWidget.h"
20 #include "cxStringPropertyBase.h"
21 #include "cxForwardDeclarations.h"
22 #include "cxData.h"
23 class QTableWidget;
24 
25 namespace cx
26 {
27 typedef boost::shared_ptr<class StringPropertySelectTool> StringPropertySelectToolPtr;
28 typedef boost::shared_ptr<class StringPropertyClipPlane> StringPropertyClipPlanePtr;
29 
31 
32 class cxGui_EXPORT ClipperWidget : public BaseWidget
33 {
34  Q_OBJECT
35  void updateCheckBoxFromClipper(QCheckBox *checkbox, DataPtr data);
36 public:
37  ClipperWidget(VisServicesPtr services, QWidget *parent);
38  ~ClipperWidget();
39  void setClipper(InteractiveClipperPtr clipper);
40 protected slots:
41  void setupDataSelectorUI();
42  void enable(bool checked);
43  void dataTypeSelectorClicked(bool checked);
44  void selectAllTableData(bool checked);
45  void dataSelectorClicked(QCheckBox *checkBox, DataPtr data);
46  void onToolChanged();
47 protected:
48  void setupUI();
49  virtual void prePaintEvent();
50 
52 // StringPropertyClipPlanePtr mPlaneAdapter;
53 // LabeledComboBoxWidget* planeSelector;
54  QVBoxLayout* mLayout;
55  QCheckBox* mUseClipperCheckBox;
56  QCheckBox *mAttachedToTool;
57  QCheckBox *mSelectAllData;
58  QCheckBox *mInvertPlane;
59 
60  QCheckBox *mShowImages;
61  QCheckBox *mShowMeshes;
62  QCheckBox *mShowMetrics;
63  QCheckBox *mShowTrackedStreams;
64 
66  std::map<QString, DataPtr> mDataToClip;
67  QTableWidget *mDataTableWidget;
68  std::map<QString, DataPtr> getDatas();
70  StringPropertySelectToolPtr mToolSelector;
71  void setupDataStructures();
72  void connectToNewClipper();
73  QGroupBox *dataTableWidget();
74  QLayout *planeLayout();
75  QLayout *toolLayout();
76  QString getDataTypeRegExp();
77  void updateSelectAllCheckbox();
78  void createNewCheckboxesBasedOnData();
79 };
80 
81 }
82 
83 #endif // CXCLIPPERWIDGET_H
QCheckBox * mShowMeshes
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class StringPropertySelectTool > StringPropertySelectToolPtr
QCheckBox * mShowMetrics
Composite widget for string selection.
QCheckBox * mShowTrackedStreams
QCheckBox * mUseClipperCheckBox
boost::shared_ptr< class Data > DataPtr
VisServicesPtr mServices
std::map< QString, DataPtr > mDataToClip
InteractiveClipperPtr mClipper
QCheckBox * mAttachedToTool
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
QTableWidget * mDataTableWidget
QVBoxLayout * mLayout
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
QCheckBox * mInvertPlane
StringPropertySelectToolPtr mToolSelector
boost::shared_ptr< class StringPropertyClipPlane > StringPropertyClipPlanePtr
QCheckBox * mShowImages
Namespace for all CustusX production code.
QCheckBox * mSelectAllData