Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkXnatTreeModel.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 QMITKXNATTREEMODEL_H
18 #define QMITKXNATTREEMODEL_H
19 
20 // CTK includes
21 #include <ctkXnatTreeModel.h>
22 
23 // MITK includes
24 #include "MitkXNATExports.h"
25 
26 namespace mitk
27 {
28  class DataNode;
29 }
30 
31 class MITKXNAT_EXPORT QmitkXnatTreeModel : public ctkXnatTreeModel
32 {
33  Q_OBJECT
34 
35 public:
37 
38  virtual QVariant data(const QModelIndex &index, int role) const;
39 
40  virtual bool dropMimeData(
41  const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
42 
43  using QAbstractItemModel::supportedDropActions;
44  virtual Qt::DropActions supportedDropActions();
45 
46  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
47 
48  ctkXnatObject *GetXnatObjectFromUrl(const QString &);
49 
50  void fetchMore(const QModelIndex &index) override;
51 
52  QModelIndexList match(
53  const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const override;
54 
55 signals:
56  void Error(const QModelIndex &idx);
57  void ResourceDropped(const QList<mitk::DataNode *> &, ctkXnatObject *, const QModelIndex &);
58 
59 private:
60  ctkXnatObject *InternalGetXnatObjectFromUrl(const QString &xnatObjectType, const QString &url, ctkXnatObject *parent);
61 };
62 
63 #endif // QMITKXNATTREEMODEL_H
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKXNAT_EXPORT