Added ToggleBoolAction
This commit is contained in:
@ -20,6 +20,7 @@ set(headers
|
|||||||
src/actions/dummyaction.h
|
src/actions/dummyaction.h
|
||||||
src/actions/setvalueaction.h
|
src/actions/setvalueaction.h
|
||||||
src/actions/switchscreenaction.h
|
src/actions/switchscreenaction.h
|
||||||
|
src/actions/toggleboolaction.h
|
||||||
src/icons/back.h
|
src/icons/back.h
|
||||||
src/icons/checked.h
|
src/icons/checked.h
|
||||||
src/icons/unchecked.h
|
src/icons/unchecked.h
|
||||||
|
18
src/actions/toggleboolaction.h
Normal file
18
src/actions/toggleboolaction.h
Normal 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
|
Reference in New Issue
Block a user