Fraxinus  22.04-rc5
An IGT application
cxSelectClippersForDataWidget.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 CXSELECTCLIPPERSFORDATAWIDGET_H
13 #define CXSELECTCLIPPERSFORDATAWIDGET_H
14 
15 #include "cxGuiExport.h"
16 
17 #include "cxBaseWidget.h"
18 #include "cxForwardDeclarations.h"
19 class QTableWidget;
20 
21 namespace cx
22 {
23 
24 typedef boost::shared_ptr<class SelectDataStringPropertyBase> SelectDataStringPropertyBasePtr;
25 
31 class cxGui_EXPORT SelectClippersForDataWidget: public BaseWidget
32 {
33  Q_OBJECT
34  void createDataCheckBox(int row, QString clipperName);
35  QCheckBox *createCheckBox(QString clipperName);
36  void updateCheckBoxesFromClipper(QCheckBox *dataCheckBox, QCheckBox *invertCheckBox, QString clipperName);
37  cx::InteractiveClipperPtr getClipper(QString clipperName);
38 public:
39  SelectClippersForDataWidget(VisServicesPtr services, QWidget *parent);
40  void setActiveDataProperty(SelectDataStringPropertyBasePtr property);
41 protected slots:
42  void clipDataClicked(QCheckBox *checkBox, QString clipperName);
43  void invertClicked(QCheckBox *checkBox, QString clipperName);
44 protected:
45  SelectDataStringPropertyBasePtr mActiveDataProperty;
47  QVBoxLayout* mLayout;
48  QLabel *mHeading;
49  QTableWidget *mClipperTableWidget;
50  void createNewCheckBoxesBasedOnClippers();
51  void initUI();
52  void setupClipperSelectorUI();
53  virtual void prePaintEvent();
54 };
55 
57 
59 {
60  Q_OBJECT
61 public:
62  SelectClippersForImageWidget(VisServicesPtr services, QWidget *parent);
63 };
64 
66 
68 {
69  Q_OBJECT
70 public:
71  SelectClippersForMeshWidget(VisServicesPtr services, QWidget *parent);
72 };
73 
74 }//cx
75 
76 #endif // CXSELECTCLIPPERSFORDATAWIDGET_H
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
Turn clippers on/off for a spesific data structure.
SelectDataStringPropertyBasePtr mActiveDataProperty
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
Namespace for all CustusX production code.