Skip to content

ACircleProgressBar#

A circle-shaped progress bar.

Header:#include <AUI/View/ACircleProgressBar.h>
CMake:aui_link(my_target PUBLIC aui::views)

Detailed Description#

A progress bar is used to express a long operation (i.e. file copy) with known progress and reassure the user that application is still running.

Unlike AProgressBar, this one is circle shaped; thus occupies less space.

Public Types#

Inner#


class ACircleProgressBar::Inner

Empty structure.

Public Methods#

setValue#


void ACircleProgressBar::setValue(aui::float_within_0_1 value)
Arguments
value
progress value, where `0.0f` = 0%, `1.0f` = 100%

Set progress bar value.

Examples#

examples/app/fractal/src/FractalWindow.cpp

Fractal Example - Fractal viewer application demonstrating usage of custom shaders.

        _new<ALabel>("Iterations:"),
        _new<ANumberPicker>().connect(
            &ANumberPicker::valueChanged, this, [fractal](int v) { fractal->setIterations(v); }) AUI_LET {
                it->setMax(1000);
                it->setValue(350);
            },
      },
    });

    fractal->focus();
examples/app/minesweeper/src/NewGameWindow.cpp

Minesweeper Game - Minesweeper game implementation driven by ass.

        _new<AButton>("Cancel").connect(&AButton::clicked, me::close),
      },
    });

    mWidth->setValue(gWidth);
    mHeight->setValue(gHeight);

    updateMinesMax();

    mMines->setValue(gMines);
examples/7guis/circle_drawer/src/main.cpp

7GUIs Circle Drawer - Undo, redo, dialog control.

                          "", 200_dp, 50_dp, dynamic_cast<AWindow*>(AWindow::current()), WindowStyle::MODAL);
                      radiusPopup->setContents(Vertical {
                        Label { "Adjust diameter of circle at {}."_format(circle->position) },
                        _new<ASlider>() AUI_LET {
                                it->setValue(circle->radius / MAX_RADIUS);
                                connect(
                                    it->valueChanging, [this, circle](aui::float_within_0_1 s) {
                                        circle->radius = s * MAX_RADIUS;
                                        mState->circles.notify();
                                    });