216e1a9f71
Commit the original Caesium 1.7.0 codebase with some adjustment. You can also get the original source at: https://sourceforge.net/projects/caesium/files/1.7.0/ Since the file names listed in the Qt resource file have encoding issue which can cause compile failure, these files get removed. Adjustments: + .gitignore M icons.qrc - *.pro.user(.*) - icons/language/*.png
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef COMPRESSIONTHREAD_H
|
|
#define COMPRESSIONTHREAD_H
|
|
|
|
#include <QtGui>
|
|
|
|
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
|