porymap/include/api/pluginsettings.h
GriffinR ce090b27ef
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
Custom Scripts -> Plugins
2026-03-06 16:39:54 -05:00

28 lines
746 B
C

#pragma once
#ifndef PLUGINSETTINGS_H
#define PLUGINSETTINGS_H
#include <QString>
#include <QList>
// Holds the basic user-provided information about a plugin.
struct PluginSettings {
QString path;
bool enabled = true;
// Plugins can either be specific to the project, or specific to the user.
// This allows projects to send plugin scripts downstream to their users,
// while still allowing them to use their own personal plugins.
bool userOnly = true;
static QStringList filter(const QList<PluginSettings>& plugins) {
QStringList paths;
for (auto& plugin : plugins) {
if (plugin.enabled) paths.append(plugin.path);
}
return paths;
}
};
#endif // PLUGINSETTINGS_H