OSDN Git Service

e09564dac8b255bb36d9f09e8fad825c76dccbc6
[kde/kde-extraapps.git] / okular / ui / snapshottaker.h
1 /***************************************************************************
2  *   Copyright (C) 2012 by Tobias Koening <tokoe@kde.org>                  *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  ***************************************************************************/
9
10 #ifndef SNAPSHOTTAKER_H
11 #define SNAPSHOTTAKER_H
12
13 #include <KUrl>
14 #include <KIO/PreviewJob>
15
16 #include <QObject>
17 #include <QPixmap>
18
19 class SnapshotTaker : public QObject
20 {
21     Q_OBJECT
22
23     public:
24         SnapshotTaker( const KUrl &url, QObject *parent, const QSize &size );
25         ~SnapshotTaker();
26
27     Q_SIGNALS:
28         void finished( const QImage &image );
29
30     private Q_SLOTS:
31         void slotPreview(const KFileItem& item, const QPixmap &preview);
32         void slotFailed(const KFileItem& item);
33
34     private:
35         KIO::PreviewJob *m_job;
36         QStringList m_plugins;
37 };
38
39 #endif // SNAPSHOTTAKER_H