Hyelicht 2.0
Controller application for the Hyelicht shelf. Paint on the shelf with colors, turn on the fireplace mode, and more.
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Attributes | Properties | List of all members
AbstractAnimation Class Referenceabstract

Abstract base class for LED strip animations operating on LedStrip. More...

#include <abstractanimation.h>

Inheritance diagram for AbstractAnimation:
Inheritance graph
[legend]
Collaboration diagram for AbstractAnimation:
Collaboration graph
[legend]

Signals

void ledStripChanged () const
 The LedStrip this animation operates on has changed.
 
void frameComplete () const
 Subclasses must emit this signal after they have finished painting a frame.
 

Public Member Functions

 AbstractAnimation (QObject *parent=nullptr)
 Create an animation.
 
virtual QString name () const =0
 The name of this animation.
 
LedStripledStrip () const
 The LedStrip this animation operates on.
 
void setLedStrip (LedStrip *ledStrip)
 Set the LedStrip this animation operates on.
 

Protected Attributes

QPointer< LedStripm_ledStrip
 LedStrip instance to operate on.
 

Properties

QString name
 Name of this animation.
 
LedStripledStrip
 LedStrip this animation operates on.
 

Detailed Description

Abstract base class for LED strip animations operating on LedStrip.

Extends QTimeLine with useful defaults and member-based access to a LedStrip instance.

AbstractAnimations are set on a ShelfModel instance by calling its ShelfModel::setAnimation method.

Attention
AbstractAnimations must provide a name and emit the frameComplete signal.

AbstractAnimations loop forever by default.

See also
ShelfModel
QTimeLine

Constructor & Destructor Documentation

◆ AbstractAnimation()

AbstractAnimation::AbstractAnimation ( QObject *  parent = nullptr)
explicit

Create an animation.

Parameters
parentParent object

Member Function Documentation

◆ frameComplete

void AbstractAnimation::frameComplete ( ) const
signal

Subclasses must emit this signal after they have finished painting a frame.

A subclass will commonly perform painting operations on its ledStrip in response to a QTimeLine::valueChanged signal. After painting is concluded for a frame it must emit this signal.

◆ ledStrip()

LedStrip * AbstractAnimation::ledStrip ( ) const

The LedStrip this animation operates on.

Defaults to nullptr.

Returns
A LedStrip.
See also
ledStrip (property)
setLedStrip
ledStripChanged

◆ ledStripChanged

void AbstractAnimation::ledStripChanged ( ) const
signal

The LedStrip this animation operates on has changed.

See also
ledStrip
setLedStrip

◆ name()

virtual QString AbstractAnimation::name ( ) const
pure virtual

The name of this animation.

Returns
Animation name.
See also
name (property)

Implemented in FireAnimation.

◆ setLedStrip()

void AbstractAnimation::setLedStrip ( LedStrip ledStrip)

Set the LedStrip this animation operates on.

Parameters
ledStripA LedStrip.
See also
ledStrip
ledStripChanged

Property Documentation

◆ ledStrip

LedStrip* AbstractAnimation::ledStrip
readwrite

LedStrip this animation operates on.

See also
setLedStrip
ledStripChanged

◆ name

QString AbstractAnimation::name
read

Name of this animation.

Subclasses must implement this to provide an animation name.


The documentation for this class was generated from the following files: