mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:06:02 +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
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
AntiAliasingConfig() : render::Job::Config(false) {}
|
AntiAliasingConfig() : render::Job::Config(false) {}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||||
};
|
};
|
||||||
|
|
||||||
class Antialiasing {
|
class Antialiasing {
|
||||||
|
|
|
@ -21,6 +21,7 @@ class DebugDeferredBufferConfig : public render::Job::Config {
|
||||||
public:
|
public:
|
||||||
DebugDeferredBufferConfig() : render::Job::Config(false) {}
|
DebugDeferredBufferConfig() : render::Job::Config(false) {}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||||
Q_PROPERTY(int mode MEMBER mode WRITE setMode NOTIFY dirty)
|
Q_PROPERTY(int mode MEMBER mode WRITE setMode NOTIFY dirty)
|
||||||
Q_PROPERTY(glm::vec4 size MEMBER size NOTIFY dirty)
|
Q_PROPERTY(glm::vec4 size MEMBER size NOTIFY dirty)
|
||||||
void setMode(int newMode);
|
void setMode(int newMode);
|
||||||
|
|
|
@ -15,6 +15,8 @@ class HitEffectConfig : public render::Job::Config {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
HitEffectConfig() : render::Job::Config(false) {}
|
HitEffectConfig() : render::Job::Config(false) {}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitEffect {
|
class HitEffect {
|
||||||
|
|
|
@ -45,6 +45,8 @@ class ToneMappingConfig : public render::Job::Config {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ToneMappingConfig() : render::Job::Config(true) {}
|
ToneMappingConfig() : render::Job::Config(true) {}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||||
Q_PROPERTY(float exposure MEMBER exposure NOTIFY dirty);
|
Q_PROPERTY(float exposure MEMBER exposure NOTIFY dirty);
|
||||||
Q_PROPERTY(int curve MEMBER curve NOTIFY dirty);
|
Q_PROPERTY(int curve MEMBER curve NOTIFY dirty);
|
||||||
float exposure{ 0.0 };
|
float exposure{ 0.0 };
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace render {
|
||||||
public:
|
public:
|
||||||
DrawStatusConfig() : Job::Config(false) {}
|
DrawStatusConfig() : Job::Config(false) {}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool enabled MEMBER enabled)
|
||||||
Q_PROPERTY(bool showDisplay MEMBER showDisplay NOTIFY dirty)
|
Q_PROPERTY(bool showDisplay MEMBER showDisplay NOTIFY dirty)
|
||||||
Q_PROPERTY(bool showNetwork MEMBER showDisplay NOTIFY dirty)
|
Q_PROPERTY(bool showNetwork MEMBER showDisplay NOTIFY dirty)
|
||||||
bool showDisplay{ false };
|
bool showDisplay{ false };
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
return findChild<typename T::Config*>(name);
|
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;
|
getConfig<T>(job)->enabled = enable;
|
||||||
refresh(); // trigger a Job->configure
|
refresh(); // trigger a Job->configure
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue