Редакция 241 | Редакция 243 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 241 | Редакция 242 | ||
---|---|---|---|
Строка 2... | Строка 2... | ||
2 | #define WMITHREAD_H
|
2 | #define WMITHREAD_H
|
3 | 3 | ||
4 | #include <QThread>
|
4 | #include <QThread>
|
5 | #include <QProcess>
|
5 | #include <QProcess>
|
6 | #include <QMutex>
|
6 | #include <QMutex>
|
- | 7 | #include <QDebug>
|
|
7 | 8 | ||
8 | class WmiThread : public QThread |
9 | class WmiThread : public QThread |
9 | {
|
10 | {
|
10 | Q_OBJECT |
11 | Q_OBJECT |
11 | public: |
12 | public: |
Строка 16... | Строка 17... | ||
16 | void setUser(QString new_user){user_name = new_user;} |
17 | void setUser(QString new_user){user_name = new_user;} |
17 | void setPassword(QString new_password){password = new_password;} |
18 | void setPassword(QString new_password){password = new_password;} |
18 | QByteArray buffer(){return p_buffer;} |
19 | QByteArray buffer(){return p_buffer;} |
19 | void clearBuffer(){p_buffer.clear();} |
20 | void clearBuffer(){p_buffer.clear();} |
20 | bool isError(){return error;} |
21 | bool isError(){return error;} |
- | 22 | bool isStopped(){ |
|
- | 23 | mutex.lock(); |
|
- | 24 | return stopped; |
|
- | 25 | mutex.unlock(); |
|
- | 26 | ||
- | 27 | }; |
|
21 | void setWmiString(QString new_wmi_string){wmi_string = new_wmi_string;} |
28 | void setWmiString(QString new_wmi_string){wmi_string = new_wmi_string;} |
22 | private: |
29 | private: |
23 | volatile bool stopped; |
30 | volatile bool stopped; |
24 | volatile bool error; |
31 | volatile bool error; |
25 | QProcess process;
|
32 | QProcess process;
|