#pragma once

#ifndef CMDEXCUTEAPP_H
#define CMDEXCUTEAPP_H

#include <QtWidgets/QMainWindow>
#include <QProcess>
#include "ui_CMDExcuteApp.h"


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