2023-12-16 17:36:57 +01:00
|
|
|
#pragma once
|
|
|
|
#include "config/WUPSConfig.h"
|
2024-08-04 15:07:30 +02:00
|
|
|
#include "plugin/PluginData.h"
|
2023-12-16 17:36:57 +01:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
struct GeneralConfigInformation {
|
|
|
|
std::string name;
|
|
|
|
std::string author;
|
|
|
|
std::string version;
|
2024-08-04 15:07:30 +02:00
|
|
|
std::shared_ptr<PluginData> pluginData;
|
2023-12-16 17:36:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class ConfigDisplayItem {
|
|
|
|
public:
|
2024-08-04 15:07:30 +02:00
|
|
|
ConfigDisplayItem(GeneralConfigInformation &info, std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config, bool isActive) : mConfig(std::move(config)), mInfo(std::move(info)), mIsActivePlugin(isActive) {
|
2023-12-16 17:36:57 +01:00
|
|
|
assert(mConfig);
|
|
|
|
}
|
|
|
|
[[nodiscard]] const GeneralConfigInformation &getConfigInformation() const {
|
|
|
|
return mInfo;
|
|
|
|
}
|
|
|
|
[[nodiscard]] const WUPSConfigAPIBackend::WUPSConfig &getConfig() const {
|
|
|
|
return *mConfig;
|
|
|
|
}
|
|
|
|
|
2024-08-04 15:07:30 +02:00
|
|
|
[[nodiscard]] bool isActivePlugin () const {
|
|
|
|
return mIsActivePlugin;
|
|
|
|
|
|
|
|
}
|
2023-12-16 17:36:57 +01:00
|
|
|
private:
|
|
|
|
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> mConfig;
|
|
|
|
GeneralConfigInformation mInfo;
|
2024-08-04 15:07:30 +02:00
|
|
|
bool mIsActivePlugin;
|
2023-12-16 17:36:57 +01:00
|
|
|
};
|