![]() |
ckb-next
beta-v0.2.8 at branch testing
ckb-next driver for corsair devices
|
#include <src/ckb/kbanim.h>
Inheritance diagram for KbAnim:
Collaboration diagram for KbAnim:Public Types | |
| enum | Mode { Normal, Add, Subtract, Multiply, Divide } |
Public Member Functions | |
| KbAnim (QObject *parent, const KeyMap &map, const QUuid id, CkbSettings &settings) | |
| void | save (CkbSettings &settings) |
| bool | needsSave () const |
| KbAnim (QObject *parent, const KeyMap &map, const QString &name, const QStringList &keys, const AnimScript *script) | |
| KbAnim (QObject *parent, const KeyMap &map, const KbAnim &other) | |
| const KeyMap & | map () |
| void | map (const KeyMap &newMap) |
| const QStringList & | keys () |
| void | keys (const QStringList &newKeys) |
| bool | hasParameter (const QString &name) const |
| QVariant | parameter (const QString &name) const |
| void | parameter (const QString &name, const QVariant &value) |
| void | commitParams () |
| void | resetParams () |
| void | reInit () |
| void | trigger (quint64 timestamp, bool ignoreParameter=false) |
| void | keypress (const QString &key, bool pressed, quint64 timestamp) |
| void | stop () |
| bool | isActive () const |
| bool | isRunning () const |
| void | blend (ColorMap &animMap, quint64 timestamp) |
| const QUuid & | guid () const |
| void | newId () |
| const QString & | name () const |
| void | name (const QString &newName) |
| float | opacity () const |
| void | opacity (float newOpacity) |
| Mode | mode () const |
| void | mode (Mode newMode) |
| const AnimScript * | script () const |
| const QString & | scriptName () const |
Private Member Functions | |
| QMap< QString, QVariant > | effectiveParams () |
| void | updateParams () |
| void | catchUp (quint64 timestamp) |
Private Attributes | |
| AnimScript * | _script |
| QUuid | _scriptGuid |
| QString | _scriptName |
| KeyMap | _map |
| QStringList | _keys |
| QMap< QString, QVariant > | _parameters |
| QMap< QString, QVariant > | _tempParameters |
| QString | repeatKey |
| quint64 | repeatTime |
| quint64 | kpRepeatTime |
| quint64 | stopTime |
| quint64 | kpStopTime |
| int | repeatMsec |
| int | kpRepeatMsec |
| QUuid | _guid |
| QString | _name |
| float | _opacity |
| Mode | _mode |
| bool | _isActive |
| bool | _isActiveKp |
| bool | _needsSave |
| enum KbAnim::Mode |
| Enumerator | |
|---|---|
| Normal | |
| Add | |
| Subtract | |
| Multiply | |
| Divide | |
Definition at line 17 of file kbanim.h.
| KbAnim::KbAnim | ( | QObject * | parent, |
| const KeyMap & | map, | ||
| const QUuid | id, | ||
| CkbSettings & | settings | ||
| ) |
Definition at line 8 of file kbanim.cpp.
References _guid, _keys, _map, _mode, _name, _opacity, _parameters, _script, _scriptGuid, _scriptName, CkbSettings::childKeys(), AnimScript::copy(), AnimScript::Param::defaultValue, KeyMap::fromStorage(), AnimScript::Param::INVALID, AnimScript::Param::LABEL, AnimScript::Param::name, AnimScript::name(), name(), Normal, AnimScript::param(), AnimScript::paramIterator(), reInit(), AnimScript::Param::type, and CkbSettings::value().
Here is the call graph for this function:| KbAnim::KbAnim | ( | QObject * | parent, |
| const KeyMap & | map, | ||
| const QString & | name, | ||
| const QStringList & | keys, | ||
| const AnimScript * | script | ||
| ) |
Definition at line 84 of file kbanim.cpp.
References _parameters, _script, _scriptGuid, _scriptName, AnimScript::Param::defaultValue, AnimScript::guid(), AnimScript::Param::LABEL, AnimScript::Param::name, AnimScript::name(), AnimScript::paramIterator(), reInit(), and AnimScript::Param::type.
Here is the call graph for this function:Definition at line 104 of file kbanim.cpp.
References reInit().
Here is the call graph for this function:| void KbAnim::blend | ( | ColorMap & | animMap, |
| quint64 | timestamp | ||
| ) |
Definition at line 365 of file kbanim.cpp.
References _mode, _opacity, _script, catchUp(), ColorMap::colors(), AnimScript::colors(), ColorMap::count(), AnimScript::frame(), and functions.
Referenced by KbLight::frameUpdate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 166 of file kbanim.cpp.
References _isActive, _isActiveKp, _script, effectiveParams(), AnimScript::end(), AnimScript::keypress(), kpRepeatMsec, kpRepeatTime, kpStopTime, repeatKey, repeatMsec, repeatTime, AnimScript::retrigger(), and stopTime.
Referenced by blend(), keypress(), and trigger().
Here is the call graph for this function:
Here is the caller graph for this function:| void KbAnim::commitParams | ( | ) |
Definition at line 121 of file kbanim.cpp.
References _needsSave, _parameters, _tempParameters, and effectiveParams().
Referenced by KbLight::addAnim(), KbAnimWidget::on_propertyButton_clicked(), and KbLight::previewAnim().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 138 of file kbanim.cpp.
References _parameters, and _tempParameters.
Referenced by catchUp(), commitParams(), keypress(), reInit(), trigger(), and updateParams().
Here is the caller graph for this function:
|
inline |
Definition at line 71 of file kbanim.h.
References _guid.
Referenced by KbAnimWidget::addAnim(), RebindWidget::applyChanges(), KbLight::findAnim(), KbAnimWidget::on_deleteButton_clicked(), KbAnimWidget::refreshList(), and KbLight::save().
Here is the caller graph for this function:
|
inline |
Definition at line 44 of file kbanim.h.
References _parameters.
Referenced by AnimSettingDialog::AnimSettingDialog().
Here is the caller graph for this function:
|
inline |
Definition at line 63 of file kbanim.h.
References _isActive, and _isActiveKp.
Referenced by KeyAction::keyEvent(), and keypress().
Here is the caller graph for this function:| bool KbAnim::isRunning | ( | ) | const |
Definition at line 325 of file kbanim.cpp.
References _script, and AnimScript::hasFrame().
Referenced by KbLight::isStarted().
Here is the call graph for this function:
Here is the caller graph for this function:| void KbAnim::keypress | ( | const QString & | key, |
| bool | pressed, | ||
| quint64 | timestamp | ||
| ) |
Definition at line 250 of file kbanim.cpp.
References _isActive, _isActiveKp, _script, catchUp(), effectiveParams(), AnimScript::frame(), isActive(), AnimScript::keypress(), kpRepeatMsec, kpRepeatTime, kpStopTime, repeatKey, repeatMsec, repeatTime, stop(), AnimScript::stop(), and stopTime.
Referenced by KbLight::animKeypress().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 40 of file kbanim.h.
References _keys.
Referenced by KbLight::animKeypress(), KbLightWidget::changeAnim(), KbAnimWidget::on_keyButton_clicked(), and KbAnimWidget::setCurrent().
Here is the caller graph for this function:| void KbAnim::keys | ( | const QStringList & | newKeys | ) |
Definition at line 161 of file kbanim.cpp.
References _keys, and reInit().
Here is the call graph for this function:
|
inline |
Definition at line 37 of file kbanim.h.
References _map.
Referenced by KbLight::map().
Here is the caller graph for this function:| void KbAnim::map | ( | const KeyMap & | newMap | ) |
Definition at line 156 of file kbanim.cpp.
References _map, and reInit().
Here is the call graph for this function:
|
inline |
Definition at line 77 of file kbanim.h.
References _mode.
Referenced by KbAnimWidget::on_blendBox_activated(), and KbAnimWidget::setCurrent().
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 73 of file kbanim.h.
References _name.
Referenced by KbAnimWidget::addAnim(), AnimSettingDialog::AnimSettingDialog(), KbAnim(), KbAnimWidget::on_animList_itemChanged(), KbAnimWidget::on_nameBox_textEdited(), parameter(), KbAnimWidget::refreshList(), KbAnimWidget::setCurrent(), and RebindWidget::setSelection().
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 29 of file kbanim.h.
References _needsSave.
Referenced by KbLight::needsSave().
Here is the caller graph for this function:
|
inline |
Definition at line 72 of file kbanim.h.
References _guid, and _needsSave.
Referenced by KbLight::duplicateAnim(), and KbMode::newId().
Here is the caller graph for this function:
|
inline |
Definition at line 75 of file kbanim.h.
References _opacity.
Referenced by KbAnimWidget::on_opacityBox_valueChanged(), and KbAnimWidget::setCurrent().
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 45 of file kbanim.h.
References _parameters.
Referenced by KbLight::addAnim(), AnimSettingDialog::AnimSettingDialog(), KbLight::previewAnim(), and AnimSettingDialog::updateParam().
Here is the caller graph for this function:| void KbAnim::parameter | ( | const QString & | name, |
| const QVariant & | value | ||
| ) |
Definition at line 114 of file kbanim.cpp.
References _script, _tempParameters, AnimScript::hasParam(), name(), and updateParams().
Here is the call graph for this function:| void KbAnim::reInit | ( | ) |
Definition at line 149 of file kbanim.cpp.
References _isActive, _isActiveKp, _keys, _map, _script, effectiveParams(), AnimScript::init(), and repeatKey.
Referenced by KbAnim(), keys(), map(), KbAnimWidget::on_propertyButton_clicked(), and KbLight::previewAnim().
Here is the call graph for this function:
Here is the caller graph for this function:| void KbAnim::resetParams | ( | ) |
Definition at line 127 of file kbanim.cpp.
References _tempParameters, and updateParams().
Referenced by KbAnimWidget::on_propertyButton_clicked().
Here is the call graph for this function:
Here is the caller graph for this function:| void KbAnim::save | ( | CkbSettings & | settings | ) |
Definition at line 64 of file kbanim.cpp.
References _guid, _keys, _mode, _name, _needsSave, _opacity, _parameters, _scriptGuid, _scriptName, CkbSettings::beginGroup(), CkbSettings::endGroup(), and CkbSettings::setValue().
Referenced by KbLight::save().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 81 of file kbanim.h.
References _script.
Referenced by AnimSettingDialog::AnimSettingDialog(), KbAnimWidget::setCurrent(), and AnimSettingDialog::updateParam().
Here is the caller graph for this function:
|
inline |
Definition at line 82 of file kbanim.h.
References _scriptName.
Referenced by AnimSettingDialog::AnimSettingDialog(), and KbAnimWidget::setCurrent().
Here is the caller graph for this function:| void KbAnim::stop | ( | ) |
Definition at line 312 of file kbanim.cpp.
References _isActive, _isActiveKp, _script, AnimScript::end(), kpRepeatMsec, kpRepeatTime, kpStopTime, repeatKey, repeatMsec, repeatTime, and stopTime.
Referenced by KbLight::addAnim(), KbLight::close(), KbLight::duplicateAnim(), KeyAction::keyEvent(), keypress(), KbLight::restartAnimation(), and trigger().
Here is the call graph for this function:
Here is the caller graph for this function:| void KbAnim::trigger | ( | quint64 | timestamp, |
| bool | ignoreParameter = false |
||
| ) |
Definition at line 209 of file kbanim.cpp.
References _isActive, _script, catchUp(), effectiveParams(), AnimScript::frame(), repeatMsec, repeatTime, AnimScript::retrigger(), stop(), and stopTime.
Referenced by KbLight::addAnim(), KbLight::duplicateAnim(), KeyAction::keyEvent(), KbLight::open(), KbLight::previewAnim(), and KbLight::restartAnimation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 132 of file kbanim.cpp.
References _script, effectiveParams(), AnimScript::parameters(), and repeatKey.
Referenced by parameter(), and resetParams().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
private |
Definition at line 114 of file kbanim.h.
Referenced by catchUp(), isActive(), keypress(), reInit(), stop(), and trigger().
|
private |
Definition at line 114 of file kbanim.h.
Referenced by catchUp(), isActive(), keypress(), reInit(), and stop().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 115 of file kbanim.h.
Referenced by commitParams(), mode(), name(), needsSave(), newId(), opacity(), and save().
|
private |
|
private |
Definition at line 94 of file kbanim.h.
Referenced by commitParams(), effectiveParams(), hasParameter(), KbAnim(), parameter(), and save().
|
private |
Definition at line 86 of file kbanim.h.
Referenced by blend(), catchUp(), isRunning(), KbAnim(), keypress(), parameter(), reInit(), script(), stop(), trigger(), and updateParams().
|
private |
|
private |
Definition at line 89 of file kbanim.h.
Referenced by KbAnim(), save(), and scriptName().
|
private |
Definition at line 96 of file kbanim.h.
Referenced by commitParams(), effectiveParams(), parameter(), and resetParams().
|
private |
Definition at line 106 of file kbanim.h.
Referenced by catchUp(), keypress(), and stop().
|
private |
Definition at line 105 of file kbanim.h.
Referenced by catchUp(), keypress(), and stop().
|
private |
Definition at line 105 of file kbanim.h.
Referenced by catchUp(), keypress(), and stop().
|
private |
Definition at line 104 of file kbanim.h.
Referenced by catchUp(), keypress(), reInit(), stop(), and updateParams().
|
private |
|
private |
|
private |