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/mGuiPlot/iWxTablePF.h

91 lines
2.1 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 "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(VVecDouble &vvec);
VVecDouble 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(VVecDouble&);
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; //关联的井点对象
bool m_bPressure; //压力or流量
bool m_bShowToolBar; //是否显示toolbar
QString m_sCmdType;
};