Changeset View
Changeset View
Standalone View
Standalone View
mime/thumbnail-creator.cpp
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | 15 | | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #include <KIO/ThumbCreator> | 20 | #include <KIO/ThumbCreator> | ||
21 | #include <kdemacros.h> | | |||
22 | #include <QImage> | 21 | #include <QImage> | ||
23 | #include <QTemporaryDir> | 22 | #include <QTemporaryDir> | ||
24 | #include <KTar> | 23 | #include <KTar> | ||
25 | 24 | | |||
26 | namespace Palapeli | 25 | namespace Palapeli | ||
27 | { | 26 | { | ||
28 | class ThumbCreator : public ::ThumbCreator | 27 | class ThumbCreator : public ::ThumbCreator | ||
29 | { | 28 | { | ||
30 | public: | 29 | public: | ||
31 | bool create(const QString& path, int width, int height, QImage& image) Q_DECL_OVERRIDE; | 30 | bool create(const QString& path, int width, int height, QImage& image) Q_DECL_OVERRIDE; | ||
32 | }; | 31 | }; | ||
33 | } | 32 | } | ||
34 | 33 | | |||
35 | extern "C" | 34 | extern "C" | ||
36 | { | 35 | { | ||
37 | KDE_EXPORT ThumbCreator* new_creator() | 36 | Q_DECL_EXPORT ThumbCreator* new_creator() | ||
38 | { | 37 | { | ||
39 | return new Palapeli::ThumbCreator; | 38 | return new Palapeli::ThumbCreator; | ||
40 | } | 39 | } | ||
41 | } | 40 | } | ||
42 | 41 | | |||
43 | bool Palapeli::ThumbCreator::create(const QString& path, int width, int height, QImage& image) | 42 | bool Palapeli::ThumbCreator::create(const QString& path, int width, int height, QImage& image) | ||
44 | { | 43 | { | ||
45 | Q_UNUSED(width) Q_UNUSED(height) //NOTE: The ThumbCreator APIDOX says that these params should be ignored for images read from the disk. | 44 | Q_UNUSED(width) Q_UNUSED(height) //NOTE: The ThumbCreator APIDOX says that these params should be ignored for images read from the disk. | ||
Show All 12 Lines |