mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-22 10:04:53 -05:00
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
28 lines
746 B
C
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
|