33#include <NDEVR/Button.h>
35class QPropertyAnimation;
40 template<
class t_type>
51 Q_PROPERTY(
float offset READ offset WRITE setOffset)
84 QPropertyAnimation* _anim =
nullptr;
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Toggle.h:41
A class that can subscribe to any number of Resources which will get updates when the Resource(s) hav...
Definition ResourceListener.h:62
The core String class for the NDEVR API.
Definition String.h:69
A Button that toggles between on and off. In desktop mode this looks like a checkbox and in touch mod...
Definition Toggle.h:49
Toggle(const TranslatedString &name, const String &icon, Resource< bool > &on_click)
Toggle(const TranslatedString &name, const String &icon, const std::function< void(Button *)> &on_click)
QSize minimumSizeHint() const override
void paintEvent(QPaintEvent *) override
QSize sizeHint() const override
Toggle(QWidget *parent=nullptr)
void onChecked(bool checked)
void setOffset(float o)
Definition Toggle.h:65
float offset() const
Definition Toggle.h:62
Toggle(const TranslatedString &name, const std::function< void(Button *)> &on_click)
void mouseReleaseEvent(QMouseEvent *) override
Toggle(const std::function< void(Button *)> &on_click)
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13