Medical Imaging Interaction Toolkit  2018.4.99-93926fb8
Medical Imaging Interaction Toolkit
QmitkDataStorageInspectorProviderBase.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 __QMITK_DATA_STORAGE_INSPECTOR_PROVIDER_BASE_H
14 #define __QMITK_DATA_STORAGE_INSPECTOR_PROVIDER_BASE_H
15 
16 #include <memory>
17 
18 // Microservices
19 #include <usGetModuleContext.h>
20 #include <usServiceProperties.h>
21 #include <usServiceRegistration.h>
22 
23 // MITK
25 
26 
33 template <class TInspector>
35 {
36 public:
38 
40 
41  InspectorIDType GetInspectorID() const override;
42  std::string GetInspectorDisplayName() const override;
43  std::string GetInspectorDescription() const override;
44  QIcon GetInspectorIcon() const override;
45 
47  us::ModuleContext *context = us::GetModuleContext());
48 
49  void UnregisterService();
50 
51  QmitkDataStorageInspectorProviderBase(const std::string& id);
52  QmitkDataStorageInspectorProviderBase(const std::string& id, const std::string& displayName, const std::string& desc = "", const std::string& pathToIconSVG = "");
54 
55 protected:
58 
60 
69  void SetRanking(int ranking);
70  int GetRanking() const;
71 
72 private:
73  class Impl;
74  std::unique_ptr<Impl> d;
75 };
76 
77 #ifndef ITK_MANUAL_INSTANTIATION
79 #endif
80 
81 #endif /* __QMITK_DATA_STORAGE_INSPECTOR_PROVIDER_BASE_H */
void SetRanking(int ranking)
Set the service ranking for this file reader.
us::ServiceRegistration< mitk::IDataStorageInspectorProvider > RegisterService(us::ModuleContext *context=us::GetModuleContext())
InspectorIDType GetInspectorID() const override
virtual us::ServiceProperties GetServiceProperties() const
std::string GetInspectorDisplayName() const override
QmitkDataStorageInspectorProviderBase(const std::string &id)
The common interface for all DataStorage inspector providers.
Base class for DataStorage inspector provider.
QmitkAbstractDataStorageInspector * CreateInspector() const override
returns an inspector instance represented by the provider.
std::string GetInspectorDescription() const override
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
QIcon GetInspectorIcon() const override
This abstract class is a convenient base class for easy implementation of widgets that offer a specif...
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
QmitkDataStorageInspectorProviderBase & operator=(const QmitkDataStorageInspectorProviderBase &other)=delete