Make Job MEMBER enabled explicit

This commit is contained in:
Zach Pomerantz 2016-01-25 14:40:13 -08:00
parent 14d907206e
commit 46c937325e
6 changed files with 9 additions and 1 deletions

View file

@ -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 {

View file

@ -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);

View file

@ -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 {

View file

@ -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 };

View file

@ -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 };

View file

@ -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
}