Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkTrackingSourcesCheckBoxPanelWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkTrackingSourcesCheckBoxPanelWidget_h
14 #define QmitkTrackingSourcesCheckBoxPanelWidget_h
15 
16 #include "ui_QmitkTrackingSourcesCheckBoxPanelWidgetControls.h"
17 #include "MitkIGTUIExports.h"
18 
20 #include <QCheckBox>
21 
22 
23 
24 
31 class MITKIGTUI_EXPORT QmitkTrackingSourcesCheckBoxPanelWidget : public QWidget
32 {
33  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
34 public:
35 
36 
37  typedef std::vector< QCheckBox* > TrackingSourcesCheckboxes;
38 
42  QmitkTrackingSourcesCheckBoxPanelWidget( QWidget* parent );
43 
48 
52  void ShowSourceCheckboxes();
53 
57  void SetNavigationDatas(std::vector<mitk::NavigationData::Pointer>* navDatas);
58 
62  void AddNavigationData(mitk::NavigationData::Pointer nd);
63 
67  void SetInfoText(QString text);
68 
72  void SetActionPerformButtonText(QString text);
73 
77  void SetActionPerformButtonCheckable(bool checkable);
78 
82  void HideActionPerformButton(bool hide);
83 
87  const std::vector<int>* GetSelectedTrackingSourcesIDs();
88 
92  void SelectAll();
93 
97  void DeselectAll();
98 
102  void SelectCheckbox(unsigned int idx);
103 
107  void DeselectCheckbox(unsigned int idx);
108 
112  void EnableCheckboxes(bool enable);
113 
117  void ClearSelectedIDs();
118 
122  bool IsActionButtonChecked();
123 
124 signals:
125  void Selected(int id);
126  void Deselected(int id);
127  void PerformAction();
128  void StopAction();
129  void Action();
130 
131 public slots:
132  void ClearPanel();
133 
134  protected slots:
135  void OnCheckboxClicked(bool checked);
136  void OnPerformActionClicked(bool toggled);
137  void OnPerformActionClicked();
138 
139 protected:
140  void CreateConnections();
141  void CreateQtPartControl( QWidget *parent );
142  Ui::QmitkTrackingSourcesCheckBoxPanelWidgetControls* m_Controls;
143 
144 
145 
146 
147 
148 private:
149  TrackingSourcesCheckboxes* m_SourceCheckboxes;
150  std::vector<mitk::NavigationData::Pointer>* m_NavigationDatas;
151  std::vector<int>* m_SelectedIds;
152 
153 
154 };
155 #endif
mitkNavigationDataSource.h
QmitkTrackingSourcesCheckBoxPanelWidget
QmitkTrackingSourcesCheckBoxPanelWidget.
Definition: QmitkTrackingSourcesCheckBoxPanelWidget.h:31
QmitkTrackingSourcesCheckBoxPanelWidget::TrackingSourcesCheckboxes
std::vector< QCheckBox * > TrackingSourcesCheckboxes
Definition: QmitkTrackingSourcesCheckBoxPanelWidget.h:37
QmitkTrackingSourcesCheckBoxPanelWidget::m_Controls
Ui::QmitkTrackingSourcesCheckBoxPanelWidgetControls * m_Controls
gui widgets
Definition: QmitkTrackingSourcesCheckBoxPanelWidget.h:142