47 lines
786 B
C++
47 lines
786 B
C++
#pragma once
|
|
|
|
#ifndef CMDEXCUTEAPP_H
|
|
#define CMDEXCUTEAPP_H
|
|
#include "WBFZExchangePluginAPI.h"
|
|
#include <QObject>
|
|
#include <QtWidgets/QMainWindow>
|
|
#include <QProcess>
|
|
class QObject;
|
|
class QMainWindow;
|
|
|
|
class MOCCMDEXCUTEAPP:public QObject{
|
|
Q_OBJECT
|
|
public:
|
|
MOCCMDEXCUTEAPP()=default;
|
|
~MOCCMDEXCUTEAPP()=default;
|
|
};
|
|
|
|
|
|
|
|
namespace Ui{
|
|
class cmdExcuteWindows;
|
|
}
|
|
class CMDExcuteApp : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
CMDExcuteApp(QWidget* parent = nullptr);
|
|
~CMDExcuteApp();
|
|
int excuteCmd(QString cmdText);
|
|
int excuteCmd(QString exePath,QString params);
|
|
int waitExcutedFinish();
|
|
private:
|
|
Ui::cmdExcuteWindows* ui;
|
|
QProcess* cmd;
|
|
|
|
signals:
|
|
void callbackExcuteResult();
|
|
|
|
private slots:
|
|
int on_readoutput();
|
|
int on_readerror();
|
|
};
|
|
|
|
|
|
#endif |