2024-11-27 20:44:36 +01:00
|
|
|
#include "ConfigDisplayItem.h"
|
|
|
|
#include "config/WUPSConfig.h"
|
|
|
|
|
2024-08-04 15:07:30 +02:00
|
|
|
ConfigDisplayItem::ConfigDisplayItem(GeneralConfigInformation &info,
|
|
|
|
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config,
|
|
|
|
const bool isActive) : mConfig(std::move(config)),
|
|
|
|
mInfo(std::move(info)),
|
|
|
|
mIsActivePlugin(isActive) {
|
2024-11-27 20:44:36 +01:00
|
|
|
assert(mConfig);
|
|
|
|
}
|
2024-08-04 15:07:30 +02:00
|
|
|
|
2024-11-27 20:44:36 +01:00
|
|
|
const GeneralConfigInformation &ConfigDisplayItem::getConfigInformation() const {
|
|
|
|
return mInfo;
|
|
|
|
}
|
2024-08-04 15:07:30 +02:00
|
|
|
|
2024-11-27 20:44:36 +01:00
|
|
|
const WUPSConfigAPIBackend::WUPSConfig &ConfigDisplayItem::getConfig() const {
|
|
|
|
return *mConfig;
|
2024-08-04 15:07:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ConfigDisplayItem::isActivePlugin() const {
|
|
|
|
return mIsActivePlugin;
|
2024-08-04 16:42:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ConfigDisplayItem::toggleIsActivePlugin() {
|
|
|
|
mIsActivePlugin = !mIsActivePlugin;
|
2024-11-27 20:44:36 +01:00
|
|
|
}
|