Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkSynchronizedWidgetConnector.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 QmitkSynchronizedWidgetConnector_h
14 #define QmitkSynchronizedWidgetConnector_h
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 // mitk core
19 #include <mitkDataNode.h>
20 
21 // mitk qt widgets
23 
24 // qt
25 #include <QList>
26 
60 {
61  Q_OBJECT
62 
63 public:
64 
66 
68 
85  void ConnectWidget(const QmitkSynchronizedNodeSelectionWidget* nodeSelectionWidget);
93  void DisconnectWidget(const QmitkSynchronizedNodeSelectionWidget* nodeSelectionWidget);
102  void SynchronizeWidget(QmitkSynchronizedNodeSelectionWidget* nodeSelectionWidget) const;
109 
115  bool GetSelectionMode() const;
116 
117 Q_SIGNALS:
138  void SelectionModeChanged(bool selectAll);
139 
140  void NodeVisibilityChanged(mitk::DataNode::Pointer node, const bool visibility);
141  void NodesLayerMoved(QSet<mitk::DataNode*> movedNodes, const int targetLayer);
142 
143 public Q_SLOTS:
154 
165  void ChangeSelectionMode(bool selectAll);
166 
174  void OnNodeVisibilityChanged(mitk::DataNode::Pointer node, bool visibility);
175 
185 
186 protected:
187 
217  void SeedFromMember(const NodeList& seedSelection, const mitk::BaseRenderer* seedRenderer);
218 
219 private:
220 
221  friend class QmitkMxNMultiWidget;
222 
223  NodeList m_InternalSelection;
224  std::set<mitk::DataNode*> m_InternalInvisibles;
225  bool m_SelectAll;
226  unsigned int m_ConnectionCounter;
227 
228 };
229 
230 #endif
#define MITKQTWIDGETS_EXPORT
The 'QmitkMxNMultiWidget' is a 'QmitkAbstractMultiWidget' that is used to display multiple render win...
Node selection widget with renderer-specific functionality and synchronization support.
QmitkAbstractNodeSelectionWidget::NodeList NodeList
This class connects different 'QmitkSynchronizedNodeSelectionWidget', such that they can synchronize ...
void SynchronizeWidget(QmitkSynchronizedNodeSelectionWidget *nodeSelectionWidget) const
This function sets the current selection and the selection mode of the given node selection widget to...
void SelectionModeChanged(bool selectAll)
A signal that will be emitted by the 'ChangeSelectionMode'-slot. This happens if the selection mode i...
bool GetSelectionMode() const
Get the current internal selection mode.
NodeList GetNodeSelection() const
Get the current internal node selection.
void ChangeSelectionMode(bool selectAll)
Set a new selection mode and send this new selection mode to connected QmitkSynchronizedNodeSelection...
void OnNodeVisibilityChanged(mitk::DataNode::Pointer node, bool visibility)
When the visibility of a node is changed in a connected widget, update the internal set of invisible ...
void NodesLayerMoved(QSet< mitk::DataNode * > movedNodes, const int targetLayer)
void DeregisterWidget()
Decrease the internal counter of connections to keep track of how many QmitkSynchronizedNodeSelection...
void NodeSelectionChanged(NodeList nodes)
A signal that will be emitted by the 'ChangeSelection'-slot. This happens if a new selection / list o...
void SeedFromMember(const NodeList &seedSelection, const mitk::BaseRenderer *seedRenderer)
Seed this connector's runtime selection from a designated member cell.
QmitkSynchronizedNodeSelectionWidget::NodeList NodeList
void ChangeSelection(NodeList nodes)
Set a new internal selection and send this new selection to connected QmitkSynchronizedNodeSelectionW...
void ConnectWidget(const QmitkSynchronizedNodeSelectionWidget *nodeSelectionWidget)
This function connects the different signals and slots of this instance and the given given node sele...
void NodeVisibilityChanged(mitk::DataNode::Pointer node, const bool visibility)
void DisconnectWidget(const QmitkSynchronizedNodeSelectionWidget *nodeSelectionWidget)
This function disconnects the different signals and slot of this instance and the given given node se...
Organizes the rendering process.