Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
QmitkMultiWidgetLayoutSelectionWidget.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 QmitkMultiWidgetLayoutSelectionWidget_h
14 #define QmitkMultiWidgetLayoutSelectionWidget_h
15 
16 #include "MitkQtWidgetsExports.h"
17 
19 
20 #include <nlohmann/json.hpp>
21 
22 // qt
23 #include "QWidget"
24 
25 namespace Ui
26 {
28 }
29 
36 {
37  Q_OBJECT
38 
39 public:
40 
41  QmitkMultiWidgetLayoutSelectionWidget(QWidget* parent = nullptr);
42  void SetDataStorage(mitk::DataStorage::Pointer dataStorage);
43 
44 Q_SIGNALS:
45 
46  void LayoutSet(int row, int column);
47  void SetDataBasedLayout(const QList<mitk::DataNode::Pointer>& nodes);
48 
49  // needs to be connected via Qt::DirectConnection (usually default), to ensure the stream pointers validity
50  void SaveLayout(std::ostream* outStream);
51 
52  void LoadLayout(const nlohmann::json* jsonData);
53 
54 private Q_SLOTS:
55 
56  void OnTableItemSelectionChanged();
57  void OnSetLayoutButtonClicked();
58  void OnDataBasedLayoutButtonClicked();
59  void OnSaveLayoutButtonClicked();
60  void OnLoadLayoutButtonClicked();
61  void OnLayoutPresetSelected(int index);
62 
63 private:
64 
65  void Init();
66 
67 
68  Ui::QmitkMultiWidgetLayoutSelectionWidget* ui;
69  std::map<int, nlohmann::json> m_PresetMap;
70  QmitkAutomatedLayoutWidget* m_AutomatedDataLayoutWidget;
71 
72 };
73 
74 #endif
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkMultiWidgetLayoutSelectionWidget
Definition: QmitkMultiWidgetLayoutSelectionWidget.h:35
itk::SmartPointer< Self >
Ui
Definition: BlueBerryExampleLauncherDialog.h:21
json
nlohmann::json json
Definition: mitkModelTestFixture.h:29
MitkQtWidgetsExports.h
QmitkAutomatedLayoutWidget.h
QmitkAutomatedLayoutWidget
Definition: QmitkAutomatedLayoutWidget.h:27