43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef COMPRESSIONTHREAD_H
|
|
#define COMPRESSIONTHREAD_H
|
|
|
|
#include <QThread>
|
|
|
|
class CompressionThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
CompressionThread(QStringList list, QString orig_dir, QString dir, QString format, QString suffix, QStringList quality, bool checked,
|
|
QList<int> w, QList<int> h, bool fixed, bool keepARatio, bool notEnlarge, bool resize, bool structure,
|
|
QObject *parent);
|
|
void run();
|
|
void noEnlarge();
|
|
void writeToFile(QString orig, QString dest);
|
|
void keepDate(QString, QString);
|
|
void optimizePNG(QString file, int level);
|
|
|
|
private:
|
|
QStringList t_list;
|
|
QString t_dir;
|
|
QString t_format;
|
|
QString t_suffix;
|
|
QStringList t_quality;
|
|
bool t_checked;
|
|
QList<int> t_w;
|
|
QList<int> t_h;
|
|
bool t_fixed;
|
|
bool t_keepARatio;
|
|
bool t_notEnlarge;
|
|
bool t_resize;
|
|
bool t_structure;
|
|
QString t_orig_dir;
|
|
|
|
signals:
|
|
void updateUI(int value, int newSize, QString ratio);
|
|
void processingIcon(int, QString);
|
|
void errorMessageBox();
|
|
};
|
|
|
|
#endif // COMPRESSIONTHREAD_H
|