Added ToggleBoolAction

This commit is contained in:
2021-08-20 14:07:03 +02:00
parent 80bcc7ef07
commit 3a843d9202
2 changed files with 19 additions and 0 deletions

View File

@ -20,6 +20,7 @@ set(headers
src/actions/dummyaction.h
src/actions/setvalueaction.h
src/actions/switchscreenaction.h
src/actions/toggleboolaction.h
src/icons/back.h
src/icons/checked.h
src/icons/unchecked.h

View File

@ -0,0 +1,18 @@
#pragma once
// local includes
#include "actioninterface.h"
#include "accessorinterface.h"
namespace espgui {
class ToggleBoolAction :
public virtual ActionInterface,
public virtual AccessorInterface<bool>
{
public:
void triggered() override
{
setValue(!getValue());
}
};
} // namespace espgui