QcPreviewActivity Namespace
When a character preview draws (decision E-231). More...
| Header: | #include <clientcore/preview/QcPreviewActivity.h> |
Classes
| struct | State |
Types
| enum class | Mode { Off, Still, Animated } |
| enum class | Window { None, Hidden, Minimised, Inactive, Active } |
Functions
| QcPreviewActivity::Mode | mode(QcPreviewActivity::State state) |
| bool | timerRuns(QcPreviewActivity::Mode mode, bool figureDrawn) |
Detailed Description
The item reports what it knows about itself and its window; the rules are GUI-free, so they are testable.
Type Documentation
enum class QcPreviewActivity::Mode
How the preview draws.
| Constant | Value | Description |
|---|---|---|
QcPreviewActivity::Mode::Off | 0 | Nothing is drawn and no timer runs. |
QcPreviewActivity::Mode::Still | 1 | The figure as it is: drawn until a frame shows it, then the picture stays. |
QcPreviewActivity::Mode::Animated | 2 | Animated at the preview's frame rate. |
enum class QcPreviewActivity::Window
The state of the window the preview lies in.
| Constant | Value | Description |
|---|---|---|
QcPreviewActivity::Window::None | 0 | Not in a window yet. |
QcPreviewActivity::Window::Hidden | 1 | The window is hidden. |
QcPreviewActivity::Window::Minimised | 2 | The window is minimised. |
QcPreviewActivity::Window::Inactive | 3 | Shown, but another program has the focus (or a scripted or offscreen run). |
QcPreviewActivity::Window::Active | 4 | Shown and focused. |
Function Documentation
QcPreviewActivity::Mode QcPreviewActivity::mode(QcPreviewActivity::State state)
Returns how a preview in state draws: off unless it is visible with a size and a source in a shown window; still while paused or in an inactive window (unless forceActive); animated otherwise.
bool QcPreviewActivity::timerRuns(QcPreviewActivity::Mode mode, bool figureDrawn)
Returns whether the frame timer runs in mode: always while animated; while still only until a frame showed the figure (figureDrawn) (the content may still be loading).