#ifndef COMPRESSIONTHREAD_H #define COMPRESSIONTHREAD_H #include class CompressionThread : public QThread { Q_OBJECT public: CompressionThread(QStringList list, QString orig_dir, QString dir, QString format, QString suffix, QStringList quality, bool checked, QList w, QList 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 t_w; QList 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