34#include <NDEVR/BaseValues.h>
35#include <NDEVR/TimeSpan.h>
36#include <NDEVR/RGBColor.h>
37#include <NDEVR/Buffer.h>
38#include <NDEVR/String.h>
39#include <QProgressBar>
The equivelent of std::vector but with a bit more control.
QTimer * m_update_timer
Timer driving the indeterminate animation updates.
fltp08 percent() const
Returns the current progress percent.
virtual void setMessage(const TranslatedString &message)
Sets the translated message text displayed inside the progress bar when progress is indeterminate.
fltp08 indeterminatePercent() const
Returns the current indeterminate animation percent for rendering.
virtual void setPercent(fltp08 percent)
Sets the progress bar to a specific percent complete.
void setFormat(const StringView &format)
Sets the raw format string displayed inside the progress bar when progress is indeterminate.
TimeSpan m_indeterminate_period
Duration for one full indeterminate animation cycle.
virtual void setIndeterminateAnimationTimespan(const TimeSpan &span)
Sets the time span for one full cycle of the indeterminate animation.
void updateProgressColor()
Recalculates the current progress color based on the gradient stops and percent.
void paintEvent(QPaintEvent *event) override
Custom paint event handler that draws the progress bar with gradient and indeterminate animation supp...
QString m_last_text
The last rendered display text.
void addProgressColor(fltp08 percent, RGBColor color)
Adds a color stop at a given percent to form a gradient.
QString customText(fltp04 percent) const
Returns the formatted display text for a given percent value.
QSize minimumSizeHint() const override
Returns the minimum recommended size for the progress bar.
QCustomProgressBar(QWidget *parent=nullptr)
Constructs a progress bar widget.
void setProgressColors(const Buffer< RGBColor > &colors)
Sets multiple progress colors that will be evenly spaced across the progress range.
void updateFromTimer()
Slot called by the timer to update the indeterminate animation.
bool isIndeterminateState() const
Checks whether the progress bar is in an indeterminate (spinning) state.
String m_last_format
The last format string used for display text.
QSize sizeHint() const override
Returns the recommended size for the progress bar.
void setDrawBackground(bool draw_background)
Sets whether to draw the background behind the progress bar.
void setProgressColor(RGBColor color)
Sets a single solid color for the progress bar fill.
bool m_draw_background
Whether to draw the background behind the progress bar.
void clearProgressColors()
Removes all custom progress colors, reverting to the default appearance.
Buffer< std::pair< fltp08, RGBColor > > m_progress_colors
Gradient color stops as percent-color pairs.
virtual void setToIndeterminateState(bool is_indeterminate)
Toggles the indeterminate state, which shows an animation to indicate activity without a known comple...
Represents a color in the RGB space with optional alpha transparency.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
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...
double fltp08
Defines an alias representing an 8 byte floating-point number.