Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _QmitkTrackingSourcesCheckBoxPanelWidget_H_INCLUDED
18 #define _QmitkTrackingSourcesCheckBoxPanelWidget_H_INCLUDED
19 
20 #include "ui_QmitkTrackingSourcesCheckBoxPanelWidgetControls.h"
21 #include "MitkIGTUIExports.h"
22 
24 #include <QCheckBox>
25 
26 
27 
28 
35 class MITKIGTUI_EXPORT QmitkTrackingSourcesCheckBoxPanelWidget : public QWidget
36 {
37  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
38 public:
39 
40 
41  typedef std::vector< QCheckBox* > TrackingSourcesCheckboxes;
42 
46  QmitkTrackingSourcesCheckBoxPanelWidget( QWidget* parent );
47 
52 
56  void ShowSourceCheckboxes();
57 
61  void SetNavigationDatas(std::vector<mitk::NavigationData::Pointer>* navDatas);
62 
66  void AddNavigationData(mitk::NavigationData::Pointer nd);
67 
71  void SetInfoText(QString text);
72 
76  void SetActionPerformButtonText(QString text);
77 
81  void SetActionPerformButtonCheckable(bool checkable);
82 
86  void HideActionPerformButton(bool hide);
87 
91  const std::vector<int>* GetSelectedTrackingSourcesIDs();
92 
96  void SelectAll();
97 
101  void DeselectAll();
102 
106  void SelectCheckbox(unsigned int idx);
107 
111  void DeselectCheckbox(unsigned int idx);
112 
116  void EnableCheckboxes(bool enable);
117 
121  void ClearSelectedIDs();
122 
126  bool IsActionButtonChecked();
127 
128 signals:
129  void Selected(int id);
130  void Deselected(int id);
131  void PerformAction();
132  void StopAction();
133  void Action();
134 
135 public slots:
136  void ClearPanel();
137 
138  protected slots:
139  void OnCheckboxClicked(bool checked);
140  void OnPerformActionClicked(bool toggled);
141  void OnPerformActionClicked();
142 
143 protected:
144  void CreateConnections();
145  void CreateQtPartControl( QWidget *parent );
146  Ui::QmitkTrackingSourcesCheckBoxPanelWidgetControls* m_Controls;
147 
148 
149 
150 
151 
152 private:
153  TrackingSourcesCheckboxes* m_SourceCheckboxes;
154  std::vector<mitk::NavigationData::Pointer>* m_NavigationDatas;
155  std::vector<int>* m_SelectedIds;
156 
157 
158 };
159 #endif // _QmitkTrackingSourcesCheckBoxPanelWidget_H_INCLUDED
160 
itk::SmartPointer< Self > Pointer
Ui::QmitkTrackingSourcesCheckBoxPanelWidgetControls * m_Controls
gui widgets