22 if(
light != newLight){
26 connect(newLight, SIGNAL(didLoad()),
this, SLOT(
refreshList()));
44 if(newAnimations.count() == 0){
51 QListWidgetItem* item =
new QListWidgetItem(anim->
name(),
ui->
animList);
52 item->setData(Qt::UserRole, anim->
guid());
53 item->setFlags(item->flags() | Qt::ItemIsEditable);
65 QList<KbAnim*> animList;
66 for(
int i = 0; i < count; i++){
69 if(anim && !animList.contains(anim))
70 animList.append(anim);
71 item->setFlags(item->flags() | Qt::ItemIsEditable);
87 QListWidgetItem* item =
new QListWidgetItem(animation->
name(),
ui->
animList);
88 item->setData(Qt::UserRole, animation->
guid());
89 item->setFlags(item->flags() | Qt::ItemIsEditable);
145 if(keys.count() == 0)
162 anim->
name(item->text().trimmed());
170 QListWidgetItem* item =
ui->
animList->itemAt(pos);
176 QAction* rename =
new QAction(
"Rename...",
this);
177 QAction* duplicate =
new QAction(
"Duplicate",
this);
178 QAction* del =
new QAction(
"Delete",
this);
179 menu.addAction(rename);
180 menu.addAction(duplicate);
182 QAction* result = menu.exec(QCursor::pos());
185 else if(result == duplicate)
187 else if(result == del)
249 if(dialog.result() != QDialog::Accepted){
KbAnim * duplicateAnim(KbAnim *oldAnim)
const QStringList & keys()
const AnimList & animList()
KbAnim * addAnim(const AnimScript *base, const QStringList &keys, const QString &name, const QMap< QString, QVariant > &preset)
const QString & name() const
bool contains(const QString &name) const
const QString & scriptName() const
QString copyright() const
const QUuid & guid() const
const QString & name() const
const QString & version() const
const AnimScript * script() const