QtProAddFileHelper/engine.h

56 lines
1.1 KiB
C++

/**
* @author Rick Chan (cy187lion@sina.com)
* @date 2014-01-23
*/
#ifndef ENGINE_H
#define ENGINE_H
#include <QThread>
#include <QFile>
#include <QString>
#include <QTextStream>
class FILE_TYPES
{
public:
FILE_TYPES(void)
{
Source = 0;
Header = 0;
Other = 0;
}
unsigned char Source;
unsigned char Header;
unsigned char Other;
};
class Engine : public QThread
{
Q_OBJECT
public:
explicit Engine(QString proDir, QString schdir, QString fileName, FILE_TYPES selectedFile, QObject *parent = 0);
~Engine();
protected:
void run(void);
private:
void FindAndAddEngine(QString schdir, FILE_TYPES ftypes, QString *incPath, QString *socFile, QString *hedFile, QString *disFile);
void FindAndAddEngine(QString proDir, QString schdir, FILE_TYPES ftypes, QString *incPath, QString *socFile, QString *hedFile, QString *disFile);
QString ProDir;
QString SearchDir;
QString ProFileName;
FILE_TYPES FileTypes;
signals:
void EngineProcessing(bool done, int processedCount);
public slots:
};
#endif // ENGINE_H