|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iDlgBase.h"
|
|
|
|
|
|
|
|
|
|
#include "mGuiPlot_global.h"
|
|
|
|
|
|
|
|
|
|
class ZxTableView;
|
|
|
|
|
class ZxTableModel;
|
|
|
|
|
class ZxObjCurveBase;
|
|
|
|
|
class ZxDataGaugeBase;
|
|
|
|
|
class ZxObjBase;
|
|
|
|
|
class M_GUI_PLOT_EXPORT iWxTablePF : public iDlgBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit iWxTablePF(const QString& sTitle,
|
|
|
|
|
bool bPressure,
|
|
|
|
|
QWidget *parent = 0);
|
|
|
|
|
~iWxTablePF();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
|
|
|
|
|
// 是否显示toolbar
|
|
|
|
|
void setToolBarVisible(bool b);
|
|
|
|
|
void setToolBarCmdType(QString s);
|
|
|
|
|
|
|
|
|
|
// 数据
|
|
|
|
|
void changedTitle(bool bPressure);
|
|
|
|
|
void clearDataPF();
|
|
|
|
|
void setDataPF(VVecFloat &vvec);
|
|
|
|
|
VVecFloat getDataPF();
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
void freshTableByObj(ZxObjBase* p, bool bPtsOnly);
|
|
|
|
|
virtual void freshBrotherByTable();
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
// 数据格式转换
|
|
|
|
|
VVecFloat convertVVec(VVecVariant vvec);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
ZxTableView* m_pTableView; //视图
|
|
|
|
|
ZxObjBase* m_pObj; //关联的井点对象
|
|
|
|
|
bool m_bPressure; //压力or流量
|
|
|
|
|
bool m_bShowToolBar; //是否显示toolbar
|
|
|
|
|
|
|
|
|
|
QString m_sCmdType;
|
|
|
|
|
|
|
|
|
|
};
|