class interface
{
virtual void doSomething()=0;
void setExecSlot(bool exec) {execSlot = exec;}
private:
bool m_execSlot;
}
class B: public interface
{
void doSomething() {if (!m_execSlot){return;} /*other stuff...*/}
}
//...
ptrToB->setExecSlot(false);
//...
ptrToB->setExecSlot(true);
class interface
{
virtual void doSomething()=0;
void setExecSlot(bool exec) {execSlot = exec;}
private:
bool m_execSlot;
}
class B: public interface
{
void doSomething() {if (!m_execSlot){return;} /*other stuff...*/}
}
//...
ptrToB->setExecSlot(false);
//...
ptrToB->setExecSlot(true);
To copy to clipboard, switch view to plain text mode
There you have your "blockSignals(receievers, bool); api."
or
send a signal with an parameter which indicates which classes should "respect" the signal.
Bookmarks