22 SCORE_CONCRETE(
"e274ee7b-9142-43a0-9d77-9286a63af4d9")
26 QSet<QString> acceptedFiles()
const noexcept override {
return {
"dsp"}; }
35 QModelIndex node = model.find(key);
36 if(node == QModelIndex{})
39 categories.init(node, ctx);
42 void addPath(std::string_view path)
override
45 if(file.fileName !=
"layout.dsp")
46 registerDSP(std::string(path));
49 void registerDSP(std::string path)
51 pool.post([
this, path = std::move(path)] {
54 pdata.prettyName = QString::fromUtf8(
55 file.completeBaseName.data(), file.completeBaseName.size());
57 pdata.customData = QString::fromUtf8(
58 file.absoluteFilePath.data(), file.absoluteFilePath.size());
59 pdata.author =
"Faust standard library";
61 auto desc = initDescriptor(pdata.customData);
62 if(!desc.prettyName.isEmpty())
63 pdata.prettyName = desc.prettyName;
65 if(!desc.author.isEmpty())
66 pdata.author = desc.author;
67 else if(!desc.copyright.isEmpty())
68 pdata.author = desc.copyright;
70 if(!desc.description.isEmpty())
71 pdata.description = desc.description;
72 if(!desc.version.isEmpty())
74 pdata.description +=
"\n";
75 pdata.description += desc.version;
77 if(!desc.license.isEmpty())
79 pdata.description +=
"\n";
80 pdata.description += desc.license;
83 QMetaObject::invokeMethod(
84 qApp, [
this, path = std::move(path), pdata = std::move(pdata)]()
mutable {
86 categories.add(file, std::move(pdata));
87 }, Qt::QueuedConnection);
Definition DocumentContext.hpp:18
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15