2010-08-04 14:13:43 +02:00
|
|
|
#ifndef BOUNDFUTUREWATCHER_H
|
|
|
|
#define BOUNDFUTUREWATCHER_H
|
|
|
|
|
|
|
|
#include <QFutureWatcher>
|
|
|
|
|
|
|
|
#include <boost/noncopyable.hpp>
|
|
|
|
|
|
|
|
template <typename T, typename D>
|
|
|
|
class BoundFutureWatcher : public QFutureWatcher<T>, boost::noncopyable {
|
|
|
|
public:
|
2010-08-04 14:37:46 +02:00
|
|
|
BoundFutureWatcher(const D& data, QObject* parent = 0)
|
2010-08-04 14:13:43 +02:00
|
|
|
: QFutureWatcher<T>(parent),
|
|
|
|
data_(data) {
|
|
|
|
}
|
|
|
|
|
|
|
|
~BoundFutureWatcher() {
|
|
|
|
}
|
|
|
|
|
2010-08-04 14:37:46 +02:00
|
|
|
const D& data() const { return data_; }
|
2010-08-04 14:13:43 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
D data_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|