2014-11-19 02:23:05 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2012 by Tobias Koening <tokoe@kde.org> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef SNAPSHOTTAKER_H
|
|
|
|
#define SNAPSHOTTAKER_H
|
|
|
|
|
2022-11-28 05:48:24 +02:00
|
|
|
#include <KUrl>
|
|
|
|
#include <KIO/PreviewJob>
|
2014-11-19 02:23:05 +00:00
|
|
|
|
2022-11-28 05:48:24 +02:00
|
|
|
#include <QObject>
|
|
|
|
#include <QPixmap>
|
2014-11-19 02:23:05 +00:00
|
|
|
|
|
|
|
class SnapshotTaker : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-11-28 05:48:24 +02:00
|
|
|
SnapshotTaker( const KUrl &url, QObject *parent, const QSize &size );
|
2014-11-19 02:23:05 +00:00
|
|
|
~SnapshotTaker();
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void finished( const QImage &image );
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
2022-11-28 05:48:24 +02:00
|
|
|
void slotPreview(const KFileItem& item, const QPixmap &preview);
|
|
|
|
void slotFailed(const KFileItem& item);
|
2014-11-19 02:23:05 +00:00
|
|
|
|
|
|
|
private:
|
2022-11-28 05:48:24 +02:00
|
|
|
KIO::PreviewJob *m_job;
|
|
|
|
QStringList m_plugins;
|
2014-11-19 02:23:05 +00:00
|
|
|
};
|
|
|
|
|
2022-11-28 05:48:24 +02:00
|
|
|
#endif // SNAPSHOTTAKER_H
|