|
|
@ -26,6 +26,7 @@ |
|
|
|
#include "tab/mini_servo_tab.hpp"
|
|
|
|
#include "tab/module_opera_tab.hpp"
|
|
|
|
#include "tab/step_motor_ctrl_tab.hpp"
|
|
|
|
#include "version.h"
|
|
|
|
|
|
|
|
using namespace std; |
|
|
|
using namespace iflytop; |
|
|
@ -202,11 +203,23 @@ void MainWindow::constructBaseUI() { |
|
|
|
|
|
|
|
void MainWindow::displayInfo(bool suc, QString info) {} |
|
|
|
|
|
|
|
static const char *fmt(const char *fmt, ...) { |
|
|
|
va_list args; |
|
|
|
va_start(args, fmt); |
|
|
|
static char buf[1024] = {0}; |
|
|
|
vsnprintf(buf, sizeof(buf), fmt, args); |
|
|
|
va_end(args); |
|
|
|
return buf; |
|
|
|
} |
|
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { |
|
|
|
/**
|
|
|
|
* @brief QT初始化 |
|
|
|
*/ |
|
|
|
|
|
|
|
// VERSION
|
|
|
|
|
|
|
|
|
|
|
|
main_ui = ui; |
|
|
|
|
|
|
|
ui->setupUi(this); |
|
|
@ -223,6 +236,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi |
|
|
|
ZQUI::ins()->setrawshow([this](QString text) { rawshow(text); }); |
|
|
|
ZQUI::ins()->setInstructionPreviewClear([this]() { instructionPreviewClear(); }); |
|
|
|
|
|
|
|
ui->menu_version->setTitle(QApplication::translate("MainWindow", VERSION, nullptr)); |
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief 页面逻辑初始化 |
|
|
|
*/ |
|
|
|