15 SCORE_CONCRETE(
"6e72e377-efdd-4e3c-9900-922b618e7d70")
20 QSet<QString> acceptedFiles()
const noexcept override {
return {
"mjs"}; }
22 bool add(
const QString& path)
25 if(!f.open(QIODevice::ReadOnly))
31 panel->importModule(path);
35 void addPath(std::string_view path)
override
37 if(path.find(
"companion-bundled-modules") != std::string_view::npos)
39 if(path.find(
"node_modules") != std::string_view::npos)
42 add(QString::fromUtf8(path.data(), path.length()));
83 SCORE_CONCRETE(
"5231ea8b-da66-4c6f-9e34-d9a79cbc494a")
85 QSet<QString> acceptedFiles()
const noexcept override {
return {
"qml"}; }
87 static inline const QRegularExpression scoreImport{
"import Score"};
96 QModelIndex node = model.find(key);
97 if(node == QModelIndex{})
104 void addPath(std::string_view path)
override
106 if(path.ends_with(
".ui.qml"))
109 QFileInfo fileinfo{QString::fromUtf8(path.data(), path.length())};
110 QFile file{fileinfo.absoluteFilePath()};
111 if(!file.open(QIODevice::ReadOnly))
114 auto data = file.readAll().trimmed();
115 auto matches = scoreImport.match(data);
120 pdata.prettyName = fileinfo.completeBaseName();
122 pdata.customData = fileinfo.absoluteFilePath();
123 categories.add(fileinfo, std::move(pdata));
Definition DocumentContext.hpp:18
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15
T & panel() const
Access to a specific PanelDelegate.
Definition GUIApplicationContext.hpp:36