Medical Imaging Interaction Toolkit  2023.12.00
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 
18 #include "ui_QmitkMultiWidgetLayoutSelectionWidget.h"
19 
20 #include <nlohmann/json.hpp>
21 
22 // qt
23 #include "QWidget"
24 
31 {
32  Q_OBJECT
33 
34 public:
35 
36  QmitkMultiWidgetLayoutSelectionWidget(QWidget* parent = nullptr);
37 
38 Q_SIGNALS:
39 
40  void LayoutSet(int row, int column);
41 
42  // needs to be connected via Qt::DirectConnection (usually default), to ensure the stream pointers validity
43  void SaveLayout(std::ostream* outStream);
44 
45  void LoadLayout(const nlohmann::json* jsonData);
46 
47 private Q_SLOTS:
48 
49  void OnTableItemSelectionChanged();
50  void OnSetLayoutButtonClicked();
51  void OnSaveLayoutButtonClicked();
52  void OnLoadLayoutButtonClicked();
53  void OnLayoutPresetSelected(int index);
54 
55 private:
56 
57  void Init();
58 
59 
60  Ui::QmitkMultiWidgetLayoutSelectionWidget ui;
61  std::map<int, nlohmann::json> m_PresetMap;
62 
63 };
64 
65 #endif
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkMultiWidgetLayoutSelectionWidget
Definition: QmitkMultiWidgetLayoutSelectionWidget.h:30
json
nlohmann::json json
Definition: mitkModelTestFixture.h:29
MitkQtWidgetsExports.h