2014-03-01 12:19:33 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef _ANIMATIONLISTWIDGET_HPP_
|
|
|
|
#define _ANIMATIONLISTWIDGET_HPP_
|
|
|
|
#include <QDockWidget>
|
|
|
|
#include <QLineEdit>
|
2016-09-09 22:13:21 +02:00
|
|
|
#include <QListView>
|
2014-03-01 12:19:33 +01:00
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
#include "AnimationListModel.hpp"
|
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
class AnimationListWidget : public QDockWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QSortFilterProxyModel* filter;
|
|
|
|
AnimationListModel* model;
|
|
|
|
QListView* table;
|
|
|
|
QLineEdit* searchbox;
|
2014-03-01 12:19:33 +01:00
|
|
|
|
|
|
|
public:
|
2016-09-09 22:13:21 +02:00
|
|
|
AnimationListWidget(QWidget* parent = 0, Qt::WindowFlags flags = 0);
|
2014-03-01 12:19:33 +01:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
void setAnimations(const AnimationList& anims);
|
2014-03-01 12:19:33 +01:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
void selectedAnimationChanged(Animation* anim);
|
2014-03-01 12:19:33 +01:00
|
|
|
|
|
|
|
public slots:
|
2016-09-09 22:13:21 +02:00
|
|
|
void selectedIndexChanged(const QModelIndex& current);
|
2014-03-01 12:19:33 +01:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
void setFilter(const QString& f);
|
2014-03-01 12:19:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|