提交原始齿轮泵代码
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include <QProcess>
|
||||
#include <QFileDialog>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
|
||||
class UpdateFPGA : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UpdateFPGA(const QString & pythonScriptPath, QWidget *parent = nullptr);
|
||||
~UpdateFPGA();
|
||||
void init();
|
||||
|
||||
private slots:
|
||||
void startUpdate();
|
||||
void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void processError(QProcess::ProcessError error);
|
||||
void closeUI();
|
||||
|
||||
private:
|
||||
QString m_PythonScriptPath;
|
||||
QLabel* m_Title;
|
||||
QPushButton* m_CloseBtn;
|
||||
QPushButton* m_UpdateButton;
|
||||
QLabel* logLabel;
|
||||
QTextEdit* logTextEdit;
|
||||
QProcess* conversionProcess;
|
||||
bool showChinese;
|
||||
|
||||
QString getErrorDescription(int errorCode);
|
||||
QString findValidPythonInterpreter();
|
||||
bool isValidPythonWithSerial(const QString& pythonPath);
|
||||
|
||||
signals:
|
||||
void upgradeFPGAFinished(bool);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user