2#include "Widgets/Headers/QCustomTabWidget.h"
3#include "Widgets/Headers/ProgressWidget.h"
4#include "Widgets/Headers/GenericOptionsWidgets.h"
5#include "Widgets/Headers/Button.h"
6#include "Widgets/Headers/QTTools.h"
7#include "Base/Headers/Translator.h"
32 GenericOption tick_count(
"tick_count", _t(
"Tick Count"), 10U);
37 GenericOption preview_interval(
"preview_interval", _t(
"Preview Inverval"), 5.0);
64 s_group->layout()->setContentsMargins(5,5,5,5);
74 return options_button;
93 QTimer* timer =
new QTimer();
94 timer->setInterval(50);
95 timer->setSingleShot(
false);
96 QObject::connect(timer, &QTimer::timeout, widget, [widget, options_button, dialog]
110 QSize dialog_size = dialog->size();
111 QSize button_size = preview_button->size();
113 location.setX(dialog_size.width() - button_size.width());
114 location.setY(dialog_size.height() - button_size.height());
115 preview_button->move(location);
116 preview_button->raise();
132 switch (millis / preview_period)
136 if (text.size() == 0)
139 text +=
"Automatically";
153 percent = Constant<fltp04>::Invalid;
157 text =
"Set Ticks\n%p%";
164 if (text.size() == 0)
165 text =
"Thickness\n%p%";
172 if (text.size() == 0)
173 text =
"Custom Icons";
176 else if (percent < 0.4)
177 icon_id =
"Images/compass_arrow_markings.png";
178 else if (percent < 0.6)
179 icon_id =
"cross_hair";
180 else if (percent < 0.8)
Stores a groups of GenericOptions that can be used to group them.
t_type getValue(const TranslatedString &name) const
Retrieves the value of an option converted to the requested type, looked up by translated name.
void addOption(const TranslatedString &name, const t_type &value, bool is_editable=true)
Adds a new option to this group with the given name and typed value.
Creates a clean formatted dialog for any number of GenericOptions within a GenericOptionGroup Each op...
const GenericOptionGroup & group()
Returns the current GenericOptionGroup.
void edited()
Emitted when any option in the group has been edited.
void setFormat(const StringView &format)
Sets the raw format string displayed inside the progress bar when progress is indeterminate.
void setProgressColors(const Buffer< RGBColor > &colors)
Sets multiple progress colors that will be evenly spaced across the progress range.
Represents a color in the RGB space with optional alpha transparency.
The core String class for the NDEVR API.
static Time SystemTime()
Retrieves the current system time which is a combination of std::chrono::steady_clock to ensure smoot...
uint08 getMilliseconds() const
Gets the timestamp in milliseconds since 1970.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
@ thickness
The thickness value applied to geometry rendering.
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Stores a generic option of any type as well as some information about how the user might interact wit...
Bounds< 1, fltp08 > value_bounds
The numeric bounds constraining valid values for this option.
Buffer< std::pair< TranslatedString, StringAllocatingView > > available_options
The set of predefined choices available for this option.
bool allow_custom_option
Whether the user may enter a custom value outside the predefined choices.