kde-playground/kimagesorter/image_loader.h
2016-03-05 00:01:16 +02:00

55 lines
1.3 KiB
C++

/*
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
---
Copyright (C) 2011, Dmitry Chernov diman4ik.chernov@gmail.com
*/
#ifndef IMAGE_LOADER
#define IMAGE_LOADER
#include <QThread>
#include <QImage>
#include <QString>
class ImageLoaderThread : public QThread
{
Q_OBJECT
public:
explicit ImageLoaderThread( QObject* parent = 0 );
~ImageLoaderThread();
void run();
private:
QObject* m_parent;
};
class ImageLoader : public QObject
{
Q_OBJECT
public:
explicit ImageLoader( QObject* parent = 0 );
public slots:
void load( const QString& name );
signals:
void imageLoaded( QImage );
};
#endif