-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrapperfunctions.h
52 lines (44 loc) · 1.41 KB
/
wrapperfunctions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef WRAPPERFUNCTIONS_H
#define WRAPPERFUNCTIONS_H
#include <QObject>
#include <string>
#include <iostream>
#include <stdlib.h>
#include <thread>
#include <QUrl>
using namespace std;
class WrapperFunctions : public QObject
{
Q_OBJECT
Q_PROPERTY(QString path READ getPath WRITE setPath)
Q_PROPERTY(QString consoleText READ getConsoleText)
Q_PROPERTY(QString fileName READ getFileName)
public:
explicit WrapperFunctions(QObject *parent = nullptr);
Q_INVOKABLE QString getPath();
Q_INVOKABLE QString getConsoleText();
Q_INVOKABLE void setPath(QString Path);
Q_INVOKABLE void separateFileExtension(const QString path);
Q_INVOKABLE void separateFileDirectory(const QString path);
Q_INVOKABLE void executeMakeFile();
Q_INVOKABLE void getparameters(const QList<QString> &arr , QString fileName);
Q_INVOKABLE void getParametersData(const QString &arr , QString fileName);
Q_INVOKABLE QString getFileName();
Q_INVOKABLE void executionHandlerThread(string cmd);
Q_INVOKABLE void stopProcessing();
Q_INVOKABLE QString getDirectory();
Q_INVOKABLE void setDirectory(QString dir);
private:
QString m_path;
QString parameters;
QString fileName;
QString consoleText;
char temp[1000];
std::thread t_execute;
std::string command;
QUrl urlG;
QString Dir;
signals:
void consoleTextChanged(QString text);
};
#endif // WRAPPERFUNCTIONS_H