Clementine-audio-player-Mac.../src/core/modelfuturewatcher.h

26 lines
486 B
C
Raw Normal View History

#ifndef MODELFUTUREWATCHER_H
#define MODELFUTUREWATCHER_H
#include <QFutureWatcher>
2010-08-02 16:07:34 +02:00
#include <QPersistentModelIndex>
template <typename T>
class ModelFutureWatcher : public QFutureWatcher<T> {
public:
ModelFutureWatcher(const QModelIndex& index, QObject* parent = 0)
: QFutureWatcher<T>(parent),
index_(index) {
}
~ModelFutureWatcher() {
}
2010-08-02 16:07:34 +02:00
const QPersistentModelIndex& index() const { return index_; }
private:
2010-08-02 16:07:34 +02:00
QPersistentModelIndex index_;
};
#endif