|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iDlgBase.h"
|
|
|
|
|
|
|
|
|
|
#include "mGuiPlot_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxTableView;
|
|
|
|
|
class ZxTableModel;
|
|
|
|
|
class ZxObjCurveBase;
|
|
|
|
|
class ZxDataGaugeBase;
|
|
|
|
|
class ZxObjBase;
|
|
|
|
|
|
|
|
|
|
// 小型压裂应用表格
|
|
|
|
|
class M_GUI_PLOT_EXPORT iWxTableMF : public iDlgBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit iWxTableMF(const QString& sTitle, \
|
|
|
|
|
QWidget* parent = 0);
|
|
|
|
|
~iWxTableMF();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
|
|
|
|
|
// 是否显示toolbar
|
|
|
|
|
void setToolBarVisible(bool b);
|
|
|
|
|
void setToolBarCmdType(QString s);
|
|
|
|
|
|
|
|
|
|
// 数据
|
|
|
|
|
void changeTitle(QStringList& list);
|
|
|
|
|
QStringList getTitle();
|
|
|
|
|
|
|
|
|
|
void setDataPs(VVecVariant& vvec, QStringList listTitles);
|
|
|
|
|
void setDataPs(VVecDouble& vvec, QStringList listTitles);
|
|
|
|
|
VVecVariant getDataPsV();
|
|
|
|
|
VVecDouble getDataPsD();
|
|
|
|
|
ZxTableView* getTableView();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
// Toolbar按钮消息响应
|
|
|
|
|
virtual void slotBtnTriggered();
|
|
|
|
|
virtual void slotSaveDatabase();
|
|
|
|
|
|
|
|
|
|
// 表格改变
|
|
|
|
|
void slotTableCellChanged(const QModelIndex&, const QModelIndex&);
|
|
|
|
|
void slotTableRowChanged(QModelIndexList listOlds, QModelIndexList listNews, QModelIndex index);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
// 初始化对工具栏进行调整
|
|
|
|
|
void sigAdjustToolBar(QToolBar*&);
|
|
|
|
|
|
|
|
|
|
// 在保存时,通过该信号获取对应的DataObj
|
|
|
|
|
void sigGetDataObjOfView(ZxTableView* pView, ZxDataGaugeBase*& p);
|
|
|
|
|
|
|
|
|
|
// 数据发生了改变
|
|
|
|
|
void sigTableDataChanged(VVecFloat&);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual QHBoxLayout* initToolBars();
|
|
|
|
|
virtual ZxTableView* initTableView();
|
|
|
|
|
|
|
|
|
|
// 默认值
|
|
|
|
|
QStringList getDefaultTitles();
|
|
|
|
|
VVecVariant getDefaultData(int nCol);
|
|
|
|
|
|
|
|
|
|
// 相关按钮的响应
|
|
|
|
|
void loadDatabase(ZxTableModel* pModel);
|
|
|
|
|
void loadFromExcel(ZxTableModel* pModel);
|
|
|
|
|
|
|
|
|
|
// 数据格式转换
|
|
|
|
|
VVecDouble convertVVec(VVecVariant vvec);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
ZxTableView* m_pTableView; //视图
|
|
|
|
|
ZxObjBase* m_pObj; //关联的井点对象
|
|
|
|
|
QStringList m_listTitles;
|
|
|
|
|
bool m_bShowToolBar; //是否显示toolbar
|
|
|
|
|
QString m_sCmdType;
|
|
|
|
|
|
|
|
|
|
};
|