Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmlMitkDatamanager.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 QmlMitkDatamanger_h
18 #define QmlMitkDatamanger_h
19 
20 #include "MitkQmlItemsExports.h"
21 
22 #include <mitkDataStorage.h>
24 
25 #include <QQuickItem>
26 
27 class MITKQMLITEMS_EXPORT QmlMitkDatamanager : public QQuickItem
28 {
29  Q_OBJECT
30  Q_PROPERTY(int index READ getIndex WRITE setIndex NOTIFY indexChanged);
31 
32 private:
33  int m_index;
34  static QmitkDataStorageListModel* model;
35  static mitk::DataStorage::Pointer storage;
36 
37 public:
39 
40  int getIndex();
41  void setIndex(int index);
42 
45 
46  static void create(QQmlEngine &engine, mitk::DataStorage::Pointer storage);
47 
48 public slots:
49  void toggleVisibility(bool checked);
50  void reinitNode();
51  void globalReinit();
52  void deleteNode();
53 
54 signals:
55  void indexChanged();
56 };
57 
58 #endif
#define MITKQMLITEMS_EXPORT
static QmlMitkDatamanager * instance