2 #include <Process/Drop/ProcessDropHandler.hpp>
4 #include <Library/LibraryInterface.hpp>
5 #include <Library/LibrarySettings.hpp>
6 #include <Library/ProcessesItemModel.hpp>
11 #include <Patternist/Commands/PatternProperties.hpp>
12 #include <Patternist/PatternFactory.hpp>
13 #include <Patternist/PatternModel.hpp>
14 #include <Patternist/PatternParsing.hpp>
22 SCORE_CONCRETE(
"81375b6a-2172-49e5-bbf9-0d2eecc30677")
24 QSet<QString> acceptedFiles()
const noexcept
override {
return {
"pat"}; }
33 QModelIndex node = model.find(key);
34 if(node == QModelIndex{})
37 categories.init(node, ctx);
40 void addPath(std::string_view path)
override
42 QFileInfo file{QString::fromUtf8(path.data(), path.length())};
44 pdata.prettyName = file.completeBaseName();
46 pdata.author =
"Drum Patterns";
47 pdata.customData = file.absoluteFilePath();
48 categories.add(file, std::move(pdata));
54 SCORE_CONCRETE(
"6ba4246f-45cd-49f5-a103-8718ec52576b")
56 QSet<QString> fileExtensions()
const noexcept
override {
return {
"pat"}; }
59 std::vector<ProcessDrop>& vec,
const DroppedFile& data,
62 const auto& [filename, content] = data;
64 auto pat = parsePattern(content);
65 if(pat.lanes.size() > 0)
69 p.creation.prettyName = filename.basename;
70 p.setup = [pat = std::move(pat)](
75 vec.push_back(std::move(p));
Definition: LibraryInterface.hpp:22
Definition: ProcessesItemModel.hpp:45
Definition: PatternLibrary.hpp:53
Definition: PatternLibrary.hpp:21
Definition: PatternModel.hpp:36
Definition: PatternProperties.hpp:16
Definition: ProcessDropHandler.hpp:25
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: ProcessesItemModel.hpp:32
Definition: ProcessesItemModel.hpp:86
Definition: ProcessDropHandler.hpp:36
Definition: ProcessDropHandler.hpp:29
Definition: RuntimeDispatcher.hpp:7
Definition: DocumentContext.hpp:18
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15