Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkMultiWidgetConfigurationToolBar.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 QmitkMultiWidgetConfigurationToolBar_h
14 #define QmitkMultiWidgetConfigurationToolBar_h
15 
16 #include <MitkQtWidgetsExports.h>
17 
19 #include <mitkDataStorage.h>
20 
21 #include <nlohmann/json.hpp>
22 
23 // qt
24 #include <QToolBar>
25 
28 
42 {
43  Q_OBJECT
44 
45 public:
46 
53 
58  void SetDataStorage(mitk::DataStorage::Pointer dataStorage);
59 
60 Q_SIGNALS:
61 
67  void LayoutSet(int row, int column);
68 
73  void SaveLayout(std::ostream* outStream);
74 
79  void LoadLayout(const nlohmann::json* jsonData);
80 
85  void SetDataBasedLayout(const QList<mitk::DataNode::Pointer>& nodes);
86 
91  void Synchronized(bool synchronized);
92 
98 
99 protected Q_SLOTS:
100 
101  void OnSetLayout();
104 
105 private:
106 
107  void InitializeToolBar();;
108  void AddButtons();
109 
110  QmitkAbstractMultiWidget* m_MultiWidget;
111 
112  QAction* m_SynchronizeAction;
113  QAction* m_InteractionSchemeChangeAction;
114 
115  QmitkMultiWidgetLayoutSelectionWidget* m_LayoutSelectionPopup;
116 
117 };
118 
119 #endif
#define MITKQTWIDGETS_EXPORT
Abstract base widget for displaying multiple render windows at once.
Toolbar for configuring a QmitkAbstractMultiWidget layout and interaction scheme.
void LayoutSet(int row, int column)
Emitted when a grid layout is selected.
void Synchronized(bool synchronized)
Emitted when the synchronization state changes.
void LoadLayout(const nlohmann::json *jsonData)
Emitted when the user requests to load a layout from JSON.
void InteractionSchemeChanged(mitk::InteractionSchemeSwitcher::InteractionScheme scheme)
Emitted when the interaction scheme changes.
void SaveLayout(std::ostream *outStream)
Emitted when the user requests to save the current layout.
void SetDataStorage(mitk::DataStorage::Pointer dataStorage)
Sets the data storage for data-based layout operations.
QmitkMultiWidgetConfigurationToolBar(QmitkAbstractMultiWidget *multiWidget)
Constructs the toolbar for the given multi-widget.
void SetDataBasedLayout(const QList< mitk::DataNode::Pointer > &nodes)
Emitted when a data-based layout is requested.
Widget that allows the user to select and apply a layout for a multi widget.
nlohmann::json json