2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
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.
10 #ifndef RENDERTHREAD_H
11 #define RENDERTHREAD_H
13 #include "backgroundpackage.h"
18 #include <QWaitCondition>
20 class RenderThread
: public QThread
25 virtual ~RenderThread();
27 int render(const QString
&file
,
29 Background::ResizeMethod method
,
30 Qt::TransformationMode mode
);
32 void setSize(const QSize
&size
);
33 void setRatio(float ratio
);
39 QMutex m_mutex
; // to protect parameters
40 QWaitCondition m_condition
;
48 Background::ResizeMethod m_method
;
49 Qt::TransformationMode m_mode
;
55 void done(int token
, const QImage
&pixmap
);
58 #endif // RENDERTHREAD_H