score
Home
Classes
Namespaces
Files
DropHandler.hpp
1
#pragma once
2
#include <Process/Drop/ProcessDropHandler.hpp>
3
4
#include <JS/JSProcessModel.hpp>
5
6
namespace
JS
7
{
8
9
class
DropHandler
final :
public
Process::ProcessDropHandler
10
{
11
SCORE_CONCRETE(
"ad3a575a-f4a8-4a89-bb7e-bfd85f3430fe"
)
12
13
QSet<QString> fileExtensions()
const
noexcept
override
{
return
{
"qml"
}; }
14
15
void
dropData(
16
std::vector<ProcessDrop>& vec,
const
DroppedFile
& data,
17
const
score::DocumentContext
& ctx)
const
noexcept
override
18
{
19
const
auto
& [filename, file] = data;
20
Process::ProcessDropHandler::ProcessDrop
p;
21
p.creation.key =
Metadata<ConcreteKey_k, ProcessModel>::get
();
22
p.creation.prettyName = filename.basename;
23
p.creation.customData = std::move(file);
24
25
vec.push_back(std::move(p));
26
}
27
};
28
29
}
JS::DropHandler
Definition:
DropHandler.hpp:10
Process::ProcessDropHandler
Definition:
ProcessDropHandler.hpp:25
Metadata
Static metadata implementation.
Definition:
lib/score/tools/Metadata.hpp:36
Process::ProcessDropHandler::DroppedFile
Definition:
ProcessDropHandler.hpp:36
Process::ProcessDropHandler::ProcessDrop
Definition:
ProcessDropHandler.hpp:29
score::DocumentContext
Definition:
DocumentContext.hpp:18