ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kbanimwidget.h
Go to the documentation of this file.
1 #ifndef KBANIMWIDGET_H
2 #define KBANIMWIDGET_H
3 
4 #include <QListWidgetItem>
5 #include <QTimer>
6 #include <QWidget>
7 #include "animscript.h"
8 #include "kbanim.h"
9 #include "kblight.h"
10 
11 namespace Ui {
12 class KbAnimWidget;
13 }
14 
15 class KbAnimWidget : public QWidget
16 {
17  Q_OBJECT
18 
19 public:
20  explicit KbAnimWidget(QWidget *parent = 0);
21  ~KbAnimWidget();
22 
23  void setLight(KbLight* newLight);
24  void addAnim(const AnimScript* base, const QStringList& keyList, const QString& name, const QMap<QString, QVariant>& preset);
25  void duplicateAnim(KbAnim* old);
26 
27  void clearSelection();
28 
29  void setSelectedKeys(const QStringList& keys);
30 
31 signals:
32  void animChanged(KbAnim* selection);
33  void didUpdateSelection(QStringList keys);
34 
35 private slots:
36  void on_animList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
37  void on_animList_itemChanged(QListWidgetItem *item);
38  void on_animList_customContextMenuRequested(const QPoint &pos);
39  void on_nameBox_textEdited(const QString &arg1);
40  void on_opacityBox_valueChanged(double arg1);
41  void on_blendBox_activated(int index);
42  void on_keyButton_clicked();
44 
45  void refreshList();
46  void reorderAnims();
47 
48 
50 
51 private:
53  QHash<QUuid, KbAnim*> animations;
54 
56  void setCurrent(KbAnim* newCurrent);
57  QStringList selectedKeys;
58  bool noReorder;
59 
61 };
62 
63 #endif // KBANIMWIDGET_H
void on_propertyButton_clicked()
KbAnimWidget(QWidget *parent=0)
Definition: kbanimwidget.cpp:7
void setCurrent(KbAnim *newCurrent)
void on_nameBox_textEdited(const QString &arg1)
void on_deleteButton_clicked()
KbLight * light
Definition: kbanimwidget.h:52
void setLight(KbLight *newLight)
void reorderAnims()
void on_animList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
void on_blendBox_activated(int index)
QStringList selectedKeys
Definition: kbanimwidget.h:57
KbAnim * current
Definition: kbanimwidget.h:55
void refreshList()
void duplicateAnim(KbAnim *old)
void addAnim(const AnimScript *base, const QStringList &keyList, const QString &name, const QMap< QString, QVariant > &preset)
Definition: kbanim.h:11
void on_animList_itemChanged(QListWidgetItem *item)
void animChanged(KbAnim *selection)
void setSelectedKeys(const QStringList &keys)
void on_opacityBox_valueChanged(double arg1)
QHash< QUuid, KbAnim * > animations
Definition: kbanimwidget.h:53
void clearSelection()
void on_keyButton_clicked()
void didUpdateSelection(QStringList keys)
void on_animList_customContextMenuRequested(const QPoint &pos)
Ui::KbAnimWidget * ui
Definition: kbanimwidget.h:60