mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 07:43:57 +02:00
Make Job MEMBER enabled explicit
This commit is contained in:
parent
14d907206e
commit
46c937325e
6 changed files with 9 additions and 1 deletions
|
@ -20,6 +20,8 @@ class AntiAliasingConfig : public render::Job::Config {
|
|||
Q_OBJECT
|
||||
public:
|
||||
AntiAliasingConfig() : render::Job::Config(false) {}
|
||||
|
||||
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||
};
|
||||
|
||||
class Antialiasing {
|
||||
|
|
|
@ -21,6 +21,7 @@ class DebugDeferredBufferConfig : public render::Job::Config {
|
|||
public:
|
||||
DebugDeferredBufferConfig() : render::Job::Config(false) {}
|
||||
|
||||
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||
Q_PROPERTY(int mode MEMBER mode WRITE setMode NOTIFY dirty)
|
||||
Q_PROPERTY(glm::vec4 size MEMBER size NOTIFY dirty)
|
||||
void setMode(int newMode);
|
||||
|
|
|
@ -15,6 +15,8 @@ class HitEffectConfig : public render::Job::Config {
|
|||
Q_OBJECT
|
||||
public:
|
||||
HitEffectConfig() : render::Job::Config(false) {}
|
||||
|
||||
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||
};
|
||||
|
||||
class HitEffect {
|
||||
|
|
|
@ -45,6 +45,8 @@ class ToneMappingConfig : public render::Job::Config {
|
|||
Q_OBJECT
|
||||
public:
|
||||
ToneMappingConfig() : render::Job::Config(true) {}
|
||||
|
||||
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||
Q_PROPERTY(float exposure MEMBER exposure NOTIFY dirty);
|
||||
Q_PROPERTY(int curve MEMBER curve NOTIFY dirty);
|
||||
float exposure{ 0.0 };
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace render {
|
|||
public:
|
||||
DrawStatusConfig() : Job::Config(false) {}
|
||||
|
||||
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||
Q_PROPERTY(bool showDisplay MEMBER showDisplay NOTIFY dirty)
|
||||
Q_PROPERTY(bool showNetwork MEMBER showDisplay NOTIFY dirty)
|
||||
bool showDisplay{ false };
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
return findChild<typename T::Config*>(name);
|
||||
}
|
||||
|
||||
template <class T> void setJobEnabled(bool enable = true, std::string job = "") const {
|
||||
template <class T> void setJobEnabled(bool enable = true, std::string job = "") {
|
||||
getConfig<T>(job)->enabled = enable;
|
||||
refresh(); // trigger a Job->configure
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue