1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/wizard/unshieldthread.hpp

67 lines
1.4 KiB
C++
Raw Normal View History

2013-12-25 17:52:34 +00:00
#ifndef UNSHIELDTHREAD_HPP
#define UNSHIELDTHREAD_HPP
#include <QThread>
#include <libunshield.h>
2013-12-26 17:02:34 +00:00
#include "inisettings.hpp"
class QTextCodec;
2013-12-25 17:52:34 +00:00
namespace Wizard
{
class UnshieldThread : public QThread
{
Q_OBJECT
public:
explicit UnshieldThread(QObject *parent = 0);
void setInstallMorrowind(bool install);
void setInstallTribunal(bool install);
void setInstallBloodmoon(bool install);
void setPath(const QString &path);
2013-12-26 17:02:34 +00:00
void setIniPath(const QString &path);
void setIniCodec(QTextCodec *codec);
2013-12-25 17:52:34 +00:00
private:
2013-12-26 17:02:34 +00:00
bool removeDirectory(const QString &dirName);
bool moveFile(const QString &source, const QString &destination);
bool moveDirectory(const QString &source, const QString &destination);
2013-12-26 17:02:34 +00:00
void setupSettings();
2013-12-25 17:52:34 +00:00
void extract();
2013-12-26 17:02:34 +00:00
void extractCab(const QString &cabFile, const QString &outputDir);
bool extractFile(Unshield *unshield, const QString &outputDir, const QString &prefix, int index, int counter);
2013-12-25 17:52:34 +00:00
bool mInstallMorrowind;
bool mInstallTribunal;
bool mInstallBloodmoon;
QString mPath;
2013-12-26 17:02:34 +00:00
QString mIniPath;
IniSettings mIniSettings;
QTextCodec *mIniCodec;
2013-12-25 17:52:34 +00:00
protected:
virtual void run();
signals:
void textChanged(const QString &text);
2013-12-26 17:02:34 +00:00
void progressChanged(int progress);
2013-12-25 17:52:34 +00:00
};
}
#endif // UNSHIELDTHREAD_HPP