|
|
|
|
@ -50,17 +50,17 @@ QModelMgrDlg::QModelMgrDlg(IWheelCtrl *ptr, QWidget *parent)
|
|
|
|
|
|
|
|
|
|
m_trainAllTsk = new QMyThread();
|
|
|
|
|
m_trainAllTsk->setUser(true);
|
|
|
|
|
m_trainAllTsk->loadfunc(this, &QModelMgrDlg::TrainAllTskFunc);
|
|
|
|
|
TaskFunc trainAllFunc = std::bind(&QModelMgrDlg::TrainAllTskFunc, this);
|
|
|
|
|
m_trainAllTsk->loadfunc(trainAllFunc);
|
|
|
|
|
|
|
|
|
|
m_trainOneTsk = new QMyThread();
|
|
|
|
|
m_trainOneTsk->setUser(true);
|
|
|
|
|
m_trainOneTsk->loadfunc(this, &QModelMgrDlg::TrainOneTskFunc);
|
|
|
|
|
TaskFunc trainOneFunc = std::bind(&QModelMgrDlg::TrainOneTskFunc, this);
|
|
|
|
|
m_trainOneTsk->loadfunc(trainOneFunc);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//m_pProgressView->finish();
|
|
|
|
|
connect(this, SIGNAL(sgPrograssShow(QString, QString, int, int)), this, SLOT(onPrograssShow(QString, QString, int, int)));
|
|
|
|
|
connect(this, SIGNAL(sgShowMsg(QString)), this, SLOT(onShowMessage(QString)));
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
m_pModelLists = new ModelsView(ui.ModelMgr_Models_tableView, m_pModelMgr->getAllModelMapPtr());
|
|
|
|
|
m_pModelLists->setHideItems(QStringList() << "NG");
|
|
|
|
|
@ -249,7 +249,11 @@ Q_SLOT void QModelMgrDlg::onAddModel()
|
|
|
|
|
QString str = m_pCtrl->getUserName() + ":" + tr("按下了添加模板按钮");
|
|
|
|
|
m_pCtrl->addLog(str, emTypeUseState);
|
|
|
|
|
|
|
|
|
|
QAddModel m_AddModel;
|
|
|
|
|
QAddModel m_AddModel(this);
|
|
|
|
|
m_AddModel.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
|
|
|
|
|
m_AddModel.setWindowIcon(QIcon(":/resource/logo-8.png"));
|
|
|
|
|
m_AddModel.setWindowModality(Qt::ApplicationModal);
|
|
|
|
|
m_AddModel.setAttribute(Qt::WA_ShowModal, true);
|
|
|
|
|
m_AddModel.SetClearData();
|
|
|
|
|
m_AddModel.setWindowIcon(QIcon(MODEL_UI_ICON_LEAPER));
|
|
|
|
|
m_AddModel.setWindowTitle(tr("产品信息设置"));
|
|
|
|
|
@ -427,7 +431,11 @@ Q_SLOT void QModelMgrDlg::onChangeModelName()
|
|
|
|
|
onMessageBox(QMessageBox::Information, tr("提示"), tr("请选择一个您要修改的型号!"), 0);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
QModNamedlg dlg;
|
|
|
|
|
QModNamedlg dlg(this);
|
|
|
|
|
dlg.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
|
|
|
|
|
dlg.setWindowIcon(QIcon(":/resource/logo-8.png"));
|
|
|
|
|
dlg.setWindowModality(Qt::ApplicationModal);
|
|
|
|
|
dlg.setAttribute(Qt::WA_ShowModal, true);
|
|
|
|
|
QString m_newName;
|
|
|
|
|
IWheelModel *pModel = m_pModelMgr->getModel(strModel);
|
|
|
|
|
QString strPath = m_pCtrl->appRoot() + pModel->getPicPath();
|
|
|
|
|
@ -971,7 +979,7 @@ bool QModelMgrDlg::onMessageBox(QMessageBox::Icon ntype, QString strTitle, QStri
|
|
|
|
|
|
|
|
|
|
if (onlyOK == 1)
|
|
|
|
|
button = QMessageBox::Cancel;
|
|
|
|
|
QMessageBox infobox(ntype, strTitle, strAtl, QMessageBox::Ok | button, NULL);
|
|
|
|
|
QMessageBox infobox(ntype, strTitle, strAtl, QMessageBox::Ok | button, this);
|
|
|
|
|
infobox.setWindowIcon(QIcon(":/image/leaper"));
|
|
|
|
|
infobox.setButtonText(QMessageBox::Ok, tr("确认"));
|
|
|
|
|
infobox.setButtonText(QMessageBox::Cancel, tr("取消"));
|
|
|
|
|
|