Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 238 → Rev 239

/trunk/DBViewer/wmithread.h
New file
0,0 → 1,42
#ifndef WMITHREAD_H
#define WMITHREAD_H
 
#include <QThread>
#include <QProcess>
#include <QMutex>
 
class WmiThread : public QThread
{
Q_OBJECT
public:
explicit WmiThread(QObject *parent = 0);
void run();
void stop();
void setHost(QString new_host){host = new_host;}
void setUser(QString new_user){user_name = new_user;}
void setPassword(QString new_password){password = new_password;}
QByteArray buffer(){return p_buffer;}
void clearBuffer(){p_buffer.clear();}
private:
volatile bool stopped;
volatile bool error;
QProcess process;
QString host;
QString user_name;
QString password;
QMutex mutex;
QByteArray p_buffer; //çäåñü áóäåì õðàíèòü äàííûå, ñ÷èòàííûå èç ñòàíäàðòíîãî ïîòîêà äëÿ ÷òåíèÿ (ïðîöåññà)
 
signals:
 
public slots:
 
 
private slots:
 
void readStandartProcessOutput();
void readStandartProcessError();
 
};
 
#endif // WMITHREAD_H