![]() |
ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <src/ckb/animscript.h>
Inheritance diagram for AnimScript:
Collaboration diagram for AnimScript:Data Structures | |
| struct | Param |
Public Types | |
| typedef QMap< QString, QVariant > | PresetValue |
Public Member Functions | |
| const QUuid & | guid () const |
| const QString & | name () const |
| const QString & | version () const |
| QString | copyright () const |
| const QString & | year () const |
| const QString & | author () const |
| const QString & | license () const |
| const QString & | description () const |
| bool | hasKeypress () const |
| const QStringList & | presets () const |
| const PresetValue & | preset (int index) const |
| QListIterator< Param > | paramIterator () const |
| Param | param (const QString &name) const |
| bool | hasParam (const QString &name) const |
| void | init (const KeyMap &map, const QStringList &keys, const QMap< QString, QVariant > ¶mValues) |
| void | parameters (const QMap< QString, QVariant > ¶mValues) |
| void | retrigger (quint64 timestamp, bool allowPreempt=false) |
| void | stop (quint64 timestamp) |
| void | keypress (const QString &key, bool pressed, quint64 timestamp) |
| void | frame (quint64 timestamp) |
| void | end () |
| bool | hasFrame () const |
| const ColorMap & | colors () const |
| ~AnimScript () | |
Static Public Member Functions | |
| static QString | path () |
| static void | scan () |
| static int | count () |
| static QList< const AnimScript * > | list () |
| static AnimScript * | copy (QObject *parent, const QUuid &id) |
Private Slots | |
| void | readProcess () |
Private Member Functions | |
| bool | load () |
| void | setDuration () |
| void | printParams () |
| void | begin (quint64 timestamp) |
| void | advance (quint64 timestamp) |
| AnimScript (QObject *parent, const QString &path) | |
| AnimScript (QObject *parent, const AnimScript &base) | |
Private Attributes | |
| struct { | |
| QUuid | guid |
| QString | name |
| QString | version |
| QString | year |
| QString | author |
| QString | license |
| QString | description |
| QList< Param > | params |
| int | kpMode:3 |
| bool | absoluteTime:1 |
| bool | repeat:1 |
| bool | preempt:1 |
| bool | liveParams:1 |
| } | _info |
| QStringList | _presets |
| QList< PresetValue > | _presetValues |
| QString | _path |
| KeyMap | _map |
| int | minX |
| int | minY |
| QStringList | _keys |
| ColorMap | _colors |
| PresetValue | _paramValues |
| quint64 | lastFrame |
| int | durationMsec |
| int | repeatMsec |
| bool | initialized:1 |
| bool | firstFrame:1 |
| bool | readFrame:1 |
| bool | readAnyFrame:1 |
| bool | stopped:1 |
| bool | inFrame:1 |
| QProcess * | process |
| ColorMap | _colorBuffer |
Static Private Attributes | |
| static const int | KP_NONE = 0 |
| static const int | KP_NAME = 1 |
| static const int | KP_POSITION = 2 |
| static QHash< QUuid, AnimScript * > | scripts |
Definition at line 16 of file animscript.h.
| struct AnimScript::Param |
Definition at line 21 of file animscript.h.
Collaboration diagram for AnimScript::Param:| Data Fields | ||
|---|---|---|
| Type | ||
| Data Fields | ||
|---|---|---|
| QVariant | defaultValue | |
| QVariant | maximum | |
| QVariant | minimum | |
| QString | name | |
| QString | postfix | |
| QString | prefix | |
| Type | type | |
| typedef QMap<QString, QVariant> AnimScript::PresetValue |
Definition at line 58 of file animscript.h.
| AnimScript::~AnimScript | ( | ) |
|
private |
Definition at line 11 of file animscript.cpp.
Referenced by copy(), and scan().
Here is the caller graph for this function:
|
private |
Definition at line 16 of file animscript.cpp.
|
private |
Definition at line 445 of file animscript.cpp.
References _info, durationMsec, lastFrame, and process.
Referenced by frame(), keypress(), retrigger(), and stop().
Here is the caller graph for this function:
|
inline |
Definition at line 64 of file animscript.h.
References _info.
Referenced by AnimSettingDialog::AnimSettingDialog().
Here is the caller graph for this function:
|
private |
Definition at line 287 of file animscript.cpp.
References _keys, _map, _path, end(), firstFrame, inFrame, initialized, KeyMap::key(), lastFrame, minX, minY, printParams(), process, readAnyFrame, readFrame, readProcess(), stopped, Key::x, and Key::y.
Referenced by frame(), keypress(), retrigger(), and stop().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 99 of file animscript.h.
References _colors.
Referenced by KbAnim::blend().
Here is the caller graph for this function:
|
static |
Definition at line 67 of file animscript.cpp.
References AnimScript(), and scripts.
Referenced by KbAnim::KbAnim().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 62 of file animscript.h.
References _info.
Referenced by KbAnimWidget::setCurrent().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 54 of file animscript.h.
References scripts.
Referenced by KbLightWidget::KbLightWidget(), load(), KbLightWidget::on_animButton_clicked(), and ExtraSettingsWidget::on_animScanButton_clicked().
Here is the caller graph for this function:
|
inline |
Definition at line 66 of file animscript.h.
References _info.
Referenced by AnimSettingDialog::AnimSettingDialog().
Here is the caller graph for this function:| void AnimScript::end | ( | ) |
Definition at line 387 of file animscript.cpp.
References _colors, ColorMap::clear(), process, and readProcess().
Referenced by begin(), KbAnim::catchUp(), init(), and KbAnim::stop().
Here is the call graph for this function:
Here is the caller graph for this function:| void AnimScript::frame | ( | quint64 | timestamp | ) |
Definition at line 430 of file animscript.cpp.
References advance(), begin(), firstFrame, initialized, process, readFrame, and stopped.
Referenced by KbAnim::blend(), KbAnim::keypress(), and KbAnim::trigger().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 59 of file animscript.h.
References _info.
Referenced by KbAnim::KbAnim(), list(), and scan().
Here is the caller graph for this function:
|
inline |
Definition at line 96 of file animscript.h.
References initialized, and readAnyFrame.
Referenced by KbAnim::isRunning().
Here is the caller graph for this function:
|
inline |
Definition at line 67 of file animscript.h.
References _info, and KP_NONE.
Referenced by AnimSettingDialog::AnimSettingDialog(), and AnimSettingDialog::updateParam().
Here is the caller graph for this function:
|
inline |
Definition at line 74 of file animscript.h.
Referenced by AnimSettingDialog::AnimSettingDialog(), load(), and KbAnim::parameter().
Here is the call graph for this function:
Here is the caller graph for this function:| void AnimScript::init | ( | const KeyMap & | map, |
| const QStringList & | keys, | ||
| const QMap< QString, QVariant > & | paramValues | ||
| ) |
Definition at line 239 of file animscript.cpp.
References _colorBuffer, _colors, _keys, _map, _paramValues, _path, end(), firstFrame, ColorMap::init(), initialized, setDuration(), and stopped.
Referenced by KbAnim::reInit().
Here is the call graph for this function:
Here is the caller graph for this function:| void AnimScript::keypress | ( | const QString & | key, |
| bool | pressed, | ||
| quint64 | timestamp | ||
| ) |
Definition at line 354 of file animscript.cpp.
References _info, _map, _paramValues, advance(), begin(), initialized, KeyMap::key(), KP_NAME, KP_NONE, KP_POSITION, minX, minY, process, retrigger(), stop(), Key::x, and Key::y.
Referenced by KbAnim::catchUp(), and KbAnim::keypress().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 65 of file animscript.h.
References _info.
Referenced by AnimSettingDialog::AnimSettingDialog().
Here is the caller graph for this function:
|
static |
Definition at line 51 of file animscript.cpp.
References _info, guid(), name(), and scripts.
Referenced by AnimAddDialog::AnimAddDialog().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 77 of file animscript.cpp.
References _info, _path, _presets, _presetValues, AnimScript::Param::AGRADIENT, AnimScript::Param::ANGLE, AnimScript::Param::ARGB, AnimScript::Param::BOOL, count(), AnimScript::Param::defaultValue, AnimScript::Param::DOUBLE, AnimScript::Param::GRADIENT, hasParam(), AnimScript::Param::INVALID, KP_NAME, KP_NONE, KP_POSITION, kprelease, AnimScript::Param::LABEL, AnimScript::Param::LONG, name(), ONE_DAY, param(), preset(), AnimScript::Param::RGB, stop(), AnimScript::Param::STRING, and urlParam().
Referenced by scan().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 60 of file animscript.h.
References _info.
Referenced by AnimAddDialog::AnimAddDialog(), AnimSettingDialog::AnimSettingDialog(), hasParam(), KbAnim::KbAnim(), list(), load(), and KbAnimWidget::setCurrent().
Here is the caller graph for this function:
|
inline |
Definition at line 73 of file animscript.h.
References _info, AnimScript::Param::INVALID, and AnimScript::Param::name.
Referenced by KbAnim::KbAnim(), load(), and AnimSettingDialog::updateParam().
Here is the caller graph for this function:| void AnimScript::parameters | ( | const QMap< QString, QVariant > & | paramValues | ) |
Definition at line 265 of file animscript.cpp.
References _info, _paramValues, initialized, printParams(), process, and setDuration().
Referenced by KbAnim::updateParams().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 72 of file animscript.h.
References _info.
Referenced by AnimSettingDialog::AnimSettingDialog(), and KbAnim::KbAnim().
Here is the caller graph for this function:
|
static |
Definition at line 29 of file animscript.cpp.
Referenced by ExtraSettingsWidget::ExtraSettingsWidget(), and scan().
Here is the caller graph for this function:
|
inline |
Definition at line 69 of file animscript.h.
References _presetValues.
Referenced by load(), and KbLightWidget::on_animButton_clicked().
Here is the caller graph for this function:
|
inline |
Definition at line 68 of file animscript.h.
References _presets.
Referenced by KbLightWidget::on_animButton_clicked().
Here is the caller graph for this function:
|
private |
Definition at line 273 of file animscript.cpp.
References _paramValues, and process.
Referenced by begin(), and parameters().
Here is the caller graph for this function:
|
privateslot |
Definition at line 397 of file animscript.cpp.
References _colorBuffer, _colors, ColorMap::colorForName(), ColorMap::colors(), ColorMap::count(), inFrame, process, readAnyFrame, readFrame, and stopped.
Referenced by begin(), and end().
Here is the call graph for this function:
Here is the caller graph for this function:| void AnimScript::retrigger | ( | quint64 | timestamp, |
| bool | allowPreempt = false |
||
| ) |
Definition at line 331 of file animscript.cpp.
References _info, advance(), begin(), initialized, process, and repeatMsec.
Referenced by KbAnim::catchUp(), keypress(), and KbAnim::trigger().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 37 of file animscript.cpp.
References _info, AnimScript(), guid(), load(), path(), and scripts.
Referenced by ExtraSettingsWidget::on_animScanButton_clicked().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 253 of file animscript.cpp.
References _info, _paramValues, durationMsec, and repeatMsec.
Referenced by init(), and parameters().
Here is the caller graph for this function:| void AnimScript::stop | ( | quint64 | timestamp | ) |
Definition at line 344 of file animscript.cpp.
References advance(), begin(), initialized, and process.
Referenced by KbAnim::keypress(), keypress(), and load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 61 of file animscript.h.
References _info.
Referenced by AnimSettingDialog::AnimSettingDialog(), and KbAnimWidget::setCurrent().
Here is the caller graph for this function:
|
inline |
Definition at line 63 of file animscript.h.
References _info.
Referenced by AnimSettingDialog::AnimSettingDialog().
Here is the caller graph for this function:
|
private |
Definition at line 143 of file animscript.h.
Referenced by init(), and readProcess().
|
private |
Definition at line 135 of file animscript.h.
Referenced by colors(), end(), init(), and readProcess().
| struct { ... } AnimScript::_info |
Referenced by advance(), author(), copyright(), description(), guid(), hasKeypress(), hasParam(), keypress(), license(), list(), load(), name(), param(), parameters(), paramIterator(), retrigger(), scan(), setDuration(), version(), and year().
|
private |
Definition at line 133 of file animscript.h.
|
private |
Definition at line 130 of file animscript.h.
Referenced by begin(), init(), and keypress().
|
private |
Definition at line 136 of file animscript.h.
Referenced by init(), keypress(), parameters(), printParams(), and setDuration().
|
private |
Definition at line 128 of file animscript.h.
|
private |
Definition at line 125 of file animscript.h.
|
private |
Definition at line 126 of file animscript.h.
|
private |
Definition at line 140 of file animscript.h.
Referenced by advance(), and setDuration().
|
private |
Definition at line 141 of file animscript.h.
|
private |
Definition at line 141 of file animscript.h.
Referenced by begin(), and readProcess().
|
private |
Definition at line 141 of file animscript.h.
Referenced by begin(), frame(), hasFrame(), init(), keypress(), parameters(), retrigger(), and stop().
|
staticprivate |
Definition at line 124 of file animscript.h.
Referenced by keypress(), and load().
|
staticprivate |
Definition at line 124 of file animscript.h.
Referenced by hasKeypress(), keypress(), and load().
|
staticprivate |
Definition at line 124 of file animscript.h.
Referenced by keypress(), and load().
|
private |
Definition at line 139 of file animscript.h.
|
private |
Definition at line 131 of file animscript.h.
Referenced by begin(), and keypress().
|
private |
Definition at line 131 of file animscript.h.
Referenced by begin(), and keypress().
|
private |
Definition at line 142 of file animscript.h.
Referenced by advance(), begin(), end(), frame(), keypress(), parameters(), printParams(), readProcess(), retrigger(), stop(), and ~AnimScript().
|
private |
Definition at line 141 of file animscript.h.
Referenced by begin(), hasFrame(), and readProcess().
|
private |
Definition at line 141 of file animscript.h.
Referenced by begin(), frame(), and readProcess().
|
private |
Definition at line 140 of file animscript.h.
Referenced by retrigger(), and setDuration().
|
staticprivate |
|
private |
Definition at line 141 of file animscript.h.
Referenced by begin(), frame(), init(), and readProcess().