34#include <NDEVR/TranslatedString.h>
35#include <NDEVR/RGBColor.h>
36#include <NDEVR/TimeSpan.h>
41#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
47class QStyleOptionToolButton;
52 class QTResourceListener;
54 template<
class t_type>
56 template<
class t_type>
67 friend class HoverButtonIconWatch;
85 Button(
const std::function<
void(
Button*)>& on_click, QWidget* parent =
nullptr);
161 QString autoWrapText(
const QFontMetrics& metrics);
162 void updateTooltip();
164 bool ignorePress()
const;
166 void _setIcon(
const String & icon,
bool force =
false);
168 void _defaultRender(QStylePainter* p, QStyleOptionToolButton* tool_button, QIcon::State state, QIcon::Mode mode,
bool draw_backgound,
bool is_default);
170 std::function<void(
Button*)> m_on_click =
nullptr;
171 std::function<void(
Button*,
bool hovering)> m_on_hover =
nullptr;
172 std::function<void(
Button*,
bool pressing)> m_on_press =
nullptr;
175 QPointer<QWidget> m_menu_dialog =
nullptr;
192 bool m_ignore_clicks =
false;
193 bool m_fixed_state_requested =
false;
194 bool m_has_custom_background_color =
false;
195 bool m_focus_on_press =
true;
199 QPushButton* m_push_button =
nullptr;
200 bool m_is_default_button =
false;
201 bool m_is_auto_default_button =
false;
203 bool m_is_bold =
false;
The default object to store data of any type that should persist through sessions of the application.
Definition Button.h:57
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Toggle.h:41
The core String class for the NDEVR API.
Definition String.h:69
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
TooltipType
Enums for program-generated tooltips.
Definition TooltipTextManager.h:44
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
Stores a generic option of any type as well as some information about how the user might interact wit...
Definition GenericOptions.h:57