Displays the progress, either horizontally as a bar or as a round spin dial.
More...
|
| | ProgressWidget (QWidget *parent=nullptr) |
| | Constructs a ProgressWidget.
|
| virtual void | addMessage (uint04 id, const LogMessage &) override |
| | Receives a log message and displays it in the progress widget.
|
|
void | clearIcon () |
| | Removes any icon from the progress widget.
|
|
void | clearTextRectCache () |
| | Clears the cached text layout rectangles, forcing recalculation on next paint.
|
| virtual bool | event (QEvent *event) override |
| | Handles general events, including style changes and timer events.
|
| bool | hasHeightForWidth () const override |
| | Indicates that this widget has a preferred height-for-width relationship.
|
| int | heightForWidth (int w) const override |
| | Returns the appropriate height for a given width to maintain aspect ratio.
|
| bool | isHorizontal () const |
| | Checks whether the widget is in horizontal bar mode.
|
| QSize | minimumSizeHint () const override |
| | Returns the minimum size hint for the widget.
|
| void | paintEvent (QPaintEvent *event) override |
| | Paints the progress widget, rendering either the bar or dial.
|
| fltp04 | progressEpsilon () const |
| | Returns the minimum change in progress needed to trigger a visual update.
|
| void | resizeEvent (QResizeEvent *event) override |
| | Handles resize events, recalculating the layout and cached geometry.
|
| virtual void | setAnimatedPercent (fltp08 percent) |
| | Sets the progress percentage with a smooth animation transition.
|
| void | setFontSizeMultiplier (fltp04 size_multiplier) |
| | Sets a multiplier for the font size used in the progress label.
|
| void | setHorizontal (bool is_horizontal) |
| | Sets whether the progress is displayed as a horizontal bar or a circular dial.
|
| void | setIconID (const String &image_id, bool foreground=true) |
| | Sets the icon displayed within the progress widget.
|
| virtual void | setIndeterminateAnimationTimespan (const TimeSpan &span) override |
| | Sets the time span for one full cycle of the indeterminate animation.
|
| virtual void | setPercent (fltp08 percent) override |
| | Sets the progress percentage directly without animation.
|
| void | setProgressThickness (fltp04 thickness) |
| | Sets the thickness of the progress arc or bar relative to the widget size.
|
| void | setShowLogMessage (bool show_log_message) |
| | Sets whether to display log messages inside the progress widget.
|
| void | setSizeMultiplier (fltp04 size_multiplier) |
| | Sets a multiplier for the overall widget size.
|
| void | setState (bool is_warning, bool is_error) |
| | Sets the visual state to reflect warning or error conditions.
|
| void | setTickCount (uint04 tick_count) |
| | Sets the number of tick marks drawn around the circular dial.
|
| QSize | sizeHint () const override |
| | Returns the preferred size for the widget.
|
| | QCustomProgressBar (QWidget *parent=nullptr) |
| | Constructs a progress bar widget.
|
| void | addProgressColor (fltp08 percent, RGBColor color) |
| | Adds a color stop at a given percent to form a gradient.
|
|
void | clearProgressColors () |
| | Removes all custom progress colors, reverting to the default appearance.
|
| bool | isIndeterminateState () const |
| | Checks whether the progress bar is in an indeterminate (spinning) state.
|
| fltp08 | percent () const |
| | Returns the current progress percent.
|
| void | setDrawBackground (bool draw_background) |
| | Sets whether to draw the background behind the progress bar.
|
| void | setFormat (const StringView &format) |
| | Sets the raw format string displayed inside the progress bar when progress is indeterminate.
|
| virtual void | setMessage (const TranslatedString &message) |
| | Sets the translated message text displayed inside the progress bar when progress is indeterminate.
|
| void | setProgressColor (RGBColor color) |
| | Sets a single solid color for the progress bar fill.
|
| void | setProgressColors (const Buffer< RGBColor > &colors) |
| | Sets multiple progress colors that will be evenly spaced across the progress range.
|
| virtual void | setToIndeterminateState (bool is_indeterminate) |
| | Toggles the indeterminate state, which shows an animation to indicate activity without a known completion percent.
|
| virtual | ~LogStream () |
| | Destructor.
|
| virtual void | addMessages (uint04 id, const Buffer< LogMessage > &messages) |
| | Adds multiple log messages to this stream at once.
|
| virtual void | addProgressSource (const TranslatedString &name, uint04 idx, fltp04 progress) |
| | Registers a new progress source to be tracked by this stream.
|
| virtual void | allowCancel (bool) |
| | Sets whether this stream allows the user to cancel an in-progress operation.
|
| virtual void | allowInput (bool) |
| | Sets whether this stream allows user input during an operation.
|
| virtual void | attach (InfoPipe *stream) |
| | Attaches this LogStream to the given InfoPipe so it receives log updates.
|
|
void | clearLinks () |
| | Detaches this LogStream from all linked InfoPipe objects and clears the link list.
|
| virtual void | detach (InfoPipe *stream) |
| | Detaches this LogStream from the given InfoPipe, stopping further updates from it.
|
| bool | ignoringMessages () const |
| | Returns whether this stream is currently ignoring messages.
|
| virtual void | removeProgressSource (uint04 idx) |
| | Removes a previously registered progress source from this stream.
|
| void | setIgnoreMessages (bool ignore) |
| | Sets whether this stream should ignore incoming messages.
|
|
|
QVariantAnimation * | m_animation = nullptr |
| | The animation object for smooth percent transitions.
|
|
QIcon | m_background_icon |
| | The cached icon rendered in the background or foreground.
|
|
fltp04 | m_current_percent = Constant<fltp04>::Invalid |
| | The current displayed progress percentage.
|
|
QRegion | m_dirty_blade_region |
| | The region of dirty blade segments needing repaint.
|
|
Buffer< bool > | m_dirty_blades |
| | Tracks which dial blade segments need repainting.
|
|
fltp04 | m_font_size_multiplier = 2.0f |
| | Font size multiplier for the progress label.
|
|
bool | m_icon_foreground = false |
| | Whether the icon is drawn in the foreground.
|
|
String | m_icon_id |
| | The resource identifier for the displayed icon.
|
|
bool | m_ignore_animation = false |
| | Whether to skip animation and set progress immediately.
|
|
bool | m_is_analog |
| | Whether the widget uses analog-style rendering.
|
|
bool | m_is_horizontal |
| | Whether the widget is in horizontal bar mode.
|
|
bool | m_is_updating_percent |
| | Guard flag to prevent recursive percent updates.
|
|
fltp04 | m_last_animation_percent = Constant<fltp04>::Invalid |
| | The last animation frame percentage.
|
|
QFont | m_last_font_a |
| | Cached font for the primary text.
|
|
QFont | m_last_font_b |
| | Cached font for the secondary text.
|
|
fltp04 | m_last_percent |
| | The last rendered progress percentage.
|
|
QString | m_last_text |
| | The last rendered text string.
|
|
fltp04 | m_last_text_radius_a |
| | Cached inner text radius for circular mode.
|
|
fltp04 | m_last_text_radius_b |
| | Cached outer text radius for circular mode.
|
|
Time | m_last_update_time = Constant<Time>::Invalid |
| | The timestamp of the last visual update.
|
|
fltp04 | m_next_percent = Constant<fltp04>::Invalid |
| | The target percentage for animation.
|
|
bool | m_show_log_messages = false |
| | Whether to display log messages in the widget.
|
|
fltp04 | m_size_multiplier = 1.0f |
| | Overall widget size multiplier.
|
|
fltp04 | m_thickness = 0.1f |
| | Thickness of the progress arc or bar as a fraction.
|
|
uint04 | m_tick_count = 20 |
| | Number of tick marks around the circular dial.
|
|
bool | m_draw_background |
| | Whether to draw the background behind the progress bar.
|
|
TimeSpan | m_indeterminate_period = TimeSpan(1.0) |
| | Duration for one full indeterminate animation cycle.
|
|
String | m_last_format = String("0%") |
| | The last format string used for display text.
|
|
QString | m_last_text |
| | The last rendered display text.
|
|
Buffer< std::pair< fltp08, RGBColor > > | m_progress_colors |
| | Gradient color stops as percent-color pairs.
|
|
QTimer * | m_update_timer |
| | Timer driving the indeterminate animation updates.
|
|
bool | m_ignore_message = false |
| | Whether this stream should ignore incoming messages.
|
|
Buffer< InfoPipe * > | m_linked_logs |
| | Collection of InfoPipe objects this stream is listening to.
|
|
Dictionary< uint04, ProgressSource > | m_progress_sources |
| | Maps progress source indices to their ProgressSource data.
|
Displays the progress, either horizontally as a bar or as a round spin dial.
Contains various options for display and can be added as a LogStream to a Log.
Definition at line 48 of file ProgressWidget.h.