ExplorerModelProvider.hpp
1 #pragma once
2 #include <Device/Widgets/DeviceModelProvider.hpp>
3 
4 #include <Explorer/DocumentPlugin/DeviceDocumentPlugin.hpp>
5 
6 #include <score/document/DocumentContext.hpp>
7 
8 namespace Explorer
9 {
11 {
12  SCORE_CONCRETE("a06e7c4e-a817-411c-8412-1d3f4ddce5e7")
13 public:
14  ~ModelProvider() override = default;
15 
17  getNodeModel(const score::DocumentContext& ctx) const noexcept override
18  {
19  auto plug = ctx.findPlugin<DeviceDocumentPlugin>();
20  if(plug)
21  {
22  return &plug->explorer();
23  }
24  return nullptr;
25  }
26 };
27 }
Definition: DeviceModelProvider.hpp:15
Definition: NodeBasedItemModel.hpp:18
Definition: ExplorerModelProvider.hpp:11
Definition: DocumentContext.hpp:18