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/mGui/mGuiDataLoad/iWxDataAccessLoad.h

78 lines
2.0 KiB
C++

#pragma once
#include "iDlgBase.h"
#include "mGuiDataLoad_global.h"
#include "ZxDataOtherItem.h"
class ZxDataObject;
class iWxDataShow;
namespace Ui {
class iWxDataAccessLoad;
}
/// @brief 该类是为了兼容试井之星mdb文件而做的数据加载界面
class M_GUI_DATA_LOAD_EXPORT iWxDataAccessLoad : public iDlgBase
{
Q_OBJECT
public:
explicit iWxDataAccessLoad(QWidget *parent = 0);
~iWxDataAccessLoad();
public:
// 读取后台配置文件
static bool loadAccessConfig(vecAccessItem& vecItems, QString sFile = "");
private:
//布局
virtual void initUI();
//新建一组表
bool initNewTable(QMap<QString, ZxDataObject*>& mapDataObj,QMap<QString, VecVariant>& mapDataVec);
//得到井号
bool saveWell(QMap<QString, ZxDataObject*> mapDataObj, QMap<QString, VecVariant> mapDataVec);
//大字段特殊处理
bool dealBytPressData();
//流量大字段处理
bool dealBytFlowData();
// 处理井号+井名
bool dealWellNames();
//根据字段名得到字段的位置id号
bool getNdexByField(QString s, int& ndex);
//配置文件加载
bool getWellTypeCn(QMap<QString, QStringList>& mapWellTp);
bool findWellType(QMap<QString, QStringList> mapWellTp, QString s, QString& sType);
//填充对话框
bool fillUI();
bool fillShowWx();
// 判断是否已有同样的数据
bool existSameRec(QString sTableName, QString sWellCode, VecVariant& vec);
bool isSameField(QString sTableName, int nIndex, QVariant o1, QVariant o2);
//根据字段得到配置文件的显示
zxDataOtherItem* getConfigItemByField(QString sField);
private slots:
void on_listWidget_currentRowChanged(int currentRow);
void on_tbxFile_textChanged(const QString &arg1);
void on_btnFile_clicked();
void on_btnRun_clicked();
void on_btnSave_clicked();
void on_btnClose_clicked();
private:
Ui::iWxDataAccessLoad *ui;
QStringList m_listField;
QMap<QString, VecVariant> m_mapData;
vecAccessItem m_vecAccessItem;
//设置选择的数据显示框
iWxDataShow* m_pWxShow;
};