You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wheeldetect/tpvs17/tpMain/QModelMgrDlg.h

79 lines
2.2 KiB
C++

#ifndef _H_QMODELMGRDLG_H_
#define _H_QMODELMGRDLG_H_
#include <QWidget>
#include "ui_QModelMgrDlg.h"
#include "IWheelCtrl.h"
#include "qmythread.h"
#include <QMessageBox>
#include "ModelManager.h"
#include "ModelTableView.h"
class QModelMgrDlg : public QWidget
{
Q_OBJECT
public:
QModelMgrDlg(IWheelCtrl *ptr,QWidget *parent = Q_NULLPTR);
~QModelMgrDlg();
void onSetCtrl(IWheelCtrl* ptr);
Q_SLOT void onAddPic2Model();
Q_SLOT void onModifyModel();
Q_SLOT void onDelModel();
Q_SLOT void onAddModel();
Q_SLOT void onTrainModel();
Q_SLOT void onTrainAllModels();
Q_SLOT void onItemDoubleClicked(QListWidgetItem * item);
Q_SLOT void onPrograssShow(QString title, QString strValue, int size, int model);
Q_SLOT void setValue(int value);
Q_SLOT void onDelAllModels();
Q_SLOT void onChangeModelName();
Q_SLOT void onProgassCancel();
Q_SLOT void onTableWidget(int nIndex);
Q_SLOT void onTextChanged(const QString& str);
Q_SLOT void onShowModelInfo(QString str);
Q_SLOT void onShowModelPic(QString str);
void onClearShow();
void TrainAllTskFunc();
void TrainOneTskFunc();
void onUserLevel(int level);
signals:
void sgPrograssShow(QString title, QString strValue, int size, int model);
void sgTrainShowInfo(QString str);
void sgShowMsg(QString);
void sgGenalData(QVariant nType, QVariant nData);
private:
void updateWidget(QString str);
bool appImage2Widget(QString strPath, QString strModel);
void TestAddModel();
Q_SLOT void onShowMessage(QString str);
Q_SLOT void onDeleteShow(QWidget* p);
bool copyDirectoryFiles(const QString &fromDir, const QString &toDir, bool coverFileIfExist);
bool onMessageBox(QMessageBox::Icon ntype, QString strTitle, QString strAtl, int onlyOK);
protected:
Q_SLOT void onButtonClicked();
virtual void showEvent(QShowEvent *event);
private:
Ui::QModelMgrDlg ui;
class IWheelCtrl* m_pCtrl{ nullptr };
class QMyThread *m_trainAllTsk{ nullptr };
class QMyThread *m_trainOneTsk{ nullptr };
class ModelManager *m_pModelMgr{ nullptr };
class ModelsView *m_pModelLists{ nullptr };
QListWidget *m_pShowImgList{ nullptr };
int nGlobalMinImgs{5};
QString m_strTrainModel;
QString m_strAddPicPath;
class ProgressView *m_pProgressView{ nullptr };
};
#endif