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.
nmWATI/Include/iGui/iGuiConfig/iWxConfigUnit.h

64 lines
1.4 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "iUnitGroup.h"
#include "iWxConfigBase.h"
#include "iGuiConfig_global.h"
class ZxTableModel;
class ZxTableView;
class X_GUI_CONFIG_EXPORT iWxConfigUnit : public iWxConfigBase
{
Q_OBJECT
public:
explicit iWxConfigUnit(QWidget *parent = 0);
~iWxConfigUnit();
// 初始化
virtual void initUI();
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
// 单个保存
virtual void saveCurrentByAction(QString s);
// 执行
virtual bool runActionBy(QString sName);
private slots:
// 来源切换
void slotUnitSourcesChanged(QString s);
// 把
virtual void slotLoad();
virtual void slotSave();
virtual void slotLoadFromExcel();
virtual void slotCheckCurXml();
private:
// 初始化
QWidget* initUI_Table();
void fillUnitSources();
// void refreshTable();
void fillTable(VVecVariant& vvec);
// 数据转换
void convertData2VVec(vecUnitGroupPtr& vvecGroupX,
VVecVariant& vvecData);
void convertDataFromVVec(vecUnitGroupPtr& vvecGroupX,
VVecVariant& vvecData);
// 加载的Excel处理前面两行的内容去掉或不去掉
void dealwithFirstRows(VVecVariant &vvec);
private:
ZxTableView* m_pTableView;
ZxTableModel* m_pTableModel;
QComboBox* m_pCbxUnitSources;
};