NorMIT-nav  22.09
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();
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
cx::LabeledComboBoxWidget
Composite widget for string selection.
Definition: cxLabeledComboBoxWidget.h:36
cx::ClipperWidget::mInitializedWithClipper
bool mInitializedWithClipper
Definition: cxClipperWidget.h:69
cx::ClipperWidget
Definition: cxClipperWidget.h:32
cx::ClipperWidget::mUseClipperCheckBox
QCheckBox * mUseClipperCheckBox
Definition: cxClipperWidget.h:55
cx::ClipperWidget::mToolSelector
StringPropertySelectToolPtr mToolSelector
Definition: cxClipperWidget.h:70
cx::ClipperWidget::mShowMetrics
QCheckBox * mShowMetrics
Definition: cxClipperWidget.h:62
cxBaseWidget.h
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
cxForwardDeclarations.h
cx::ClipperWidget::mShowMeshes
QCheckBox * mShowMeshes
Definition: cxClipperWidget.h:61
cx::ClipperWidget::mDataTableWidget
QTableWidget * mDataTableWidget
Definition: cxClipperWidget.h:67
cx::ClipperWidget::mLayout
QVBoxLayout * mLayout
Definition: cxClipperWidget.h:54
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
cx::ClipperWidget::mClipper
InteractiveClipperPtr mClipper
Definition: cxClipperWidget.h:51
cx::ClipperWidget::mDataToClip
std::map< QString, DataPtr > mDataToClip
Definition: cxClipperWidget.h:66
cxData.h
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::ClipperWidget::mServices
VisServicesPtr mServices
Definition: cxClipperWidget.h:65
cx::StringPropertyClipPlanePtr
boost::shared_ptr< class StringPropertyClipPlane > StringPropertyClipPlanePtr
Definition: cxClipperWidget.h:28
cx::ClipperWidget::mInvertPlane
QCheckBox * mInvertPlane
Definition: cxClipperWidget.h:58
cx::ClipperWidget::mShowImages
QCheckBox * mShowImages
Definition: cxClipperWidget.h:60
cx::ClipperWidget::mShowTrackedStreams
QCheckBox * mShowTrackedStreams
Definition: cxClipperWidget.h:63
cx::InteractiveClipperPtr
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
Definition: cxForwardDeclarations.h:155
cxStringPropertyBase.h
cx::ClipperWidget::mSelectAllData
QCheckBox * mSelectAllData
Definition: cxClipperWidget.h:57
cx::ClipperWidget::mAttachedToTool
QCheckBox * mAttachedToTool
Definition: cxClipperWidget.h:56
cx::StringPropertySelectToolPtr
boost::shared_ptr< class StringPropertySelectTool > StringPropertySelectToolPtr
Definition: cxClipperWidget.h:27