107 lines
2.4 KiB
C++
107 lines
2.4 KiB
C++
|
||
#pragma warning(push,0)
|
||
#include <cassert>
|
||
#include <QDialog>
|
||
//#include "ConsoleOutputWidget.h"
|
||
#include "ui_InDefTable.h"
|
||
#include "LogIO.h"
|
||
//#include "ObjProject.h"
|
||
//#include "ui_SigelWell.h"
|
||
//#include "ui_MutlWell.h"
|
||
|
||
#pragma warning(pop)
|
||
//namespace Ui{
|
||
// class SigelForm;
|
||
// class MultForm;
|
||
//}
|
||
//struct DEFAULTTABLE
|
||
// {
|
||
// QString TableName;
|
||
// int ZdNum;
|
||
// Slf_TABLE_FIELD *tinfo;
|
||
// };
|
||
//#define DefTabNum 9 //系统缺省表个数
|
||
|
||
//BEGIN_OSGGRAPHICS_NAMESPACE
|
||
/**
|
||
* @brief 表格选择列自定义委托
|
||
*/
|
||
class CInDefTableDlg : public QDialog
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
CInDefTableDlg(int curitemType,QWidget * parent=0, Qt::WindowFlags flags=0);
|
||
~CInDefTableDlg()
|
||
{
|
||
if(m_pUI) delete m_pUI;
|
||
// if (m_sigWell)delete m_sigWell;
|
||
// if (m_mutlWell)delete m_mutlWell;
|
||
MapData.clear();
|
||
}
|
||
Ui_InDefTable *m_pUI;
|
||
bool Init();
|
||
void InitList1();
|
||
bool mIsNumber(QString str);//判断字符串是否为数值
|
||
|
||
void mRefresh();
|
||
|
||
void PreView(bool RefreshW);
|
||
protected:
|
||
void showEvent(QShowEvent *);
|
||
void resizeEvent(QResizeEvent *);
|
||
private slots:
|
||
/**
|
||
*@brief 保存槽函数
|
||
*/
|
||
void slotSave();
|
||
|
||
/**
|
||
*@brief 取消槽函数
|
||
*/
|
||
void slotCancel();
|
||
void slotOpenFile();
|
||
void changeTabletype();//选择缺省表
|
||
void slotVarLineChanged(int);//变量名所在行
|
||
void slotDataLineChanged(int);//数据开始行
|
||
|
||
void slotCheckSpace();
|
||
void slotCheckComma();
|
||
void slotCheckSem();
|
||
void slotCheckTab();
|
||
void slotCheckDubSpace();
|
||
void slotRefreshZd(int,int);
|
||
void slotSelAll();
|
||
void slotNotSelAll();
|
||
void slotReverseSel();
|
||
void slotEnterOk();
|
||
void slotComboxSelectChange(int index);
|
||
//whp add 2020.4.20
|
||
void slotChangeDefValue();
|
||
virtual void accept();
|
||
|
||
public:
|
||
QString FileName;
|
||
int TableType;//系统缺省表序号
|
||
int VarLine;//变量名所在行
|
||
int UnitLine;//单位所在行
|
||
int DataLine;//数据开始行
|
||
QStringList VarNameList,UnitNameList,DataList;
|
||
int TotalLine;//数据文件总行数
|
||
bool IsSpa,IsTab,IsCom,IsSem,DelDubSpa;
|
||
int CurItemType;//当前选中的项类型:当前选择项是“井”(0)、Well(1)、WellRound(2)
|
||
int WellNameCol;//当前选择项是“井”时,井名所在的列号
|
||
QStringList WellNameList;//当前选择项是“井”时,统计所有井名
|
||
QMap<int,QStringList > MapData;
|
||
//////////////////////////////////////////////////////////////////////////
|
||
QString WellFileName;
|
||
int MaxCol;//预览数据最大列数
|
||
int MaxRow;//原始数据行数
|
||
// Ui::SigelForm *m_sigWell;
|
||
// Ui::MultForm *m_mutlWell;
|
||
|
||
|
||
};
|
||
|
||
//END_OSGGRAPHICS_NAMESPACE;
|