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.
nmWTAI-Platform/Include/iBase/iPlugin/ZxTableViewUnit.h

52 lines
1.2 KiB
C

#pragma once
#include "Defines.h"
#include "ZxTableView.h"
class ZxTableHeaderViewUnit;
// 本类主要实现表头进行单位下拉切换的表格
class I_PLUGIN_EXPORT ZxTableViewUnit : public ZxTableView
{
Q_OBJECT
public:
explicit ZxTableViewUnit(QWidget* parent = 0, \
QAbstractItemModel* model = nullptr, \
bool bUnitTitleIfNeeded = true);
virtual ~ZxTableViewUnit();
virtual void setModel(QAbstractItemModel* model);
public:
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
virtual void copyFrom(ZxTableView* p1); //为了兼容旧版本此处用ZxTableView
public slots:
// 更新标题
virtual void slotAdjustHeaderView(const QStringList& listTitles, \
const QStringList& listUnits, \
bool bUnitNeeded, \
bool& bConsidered);
protected:
void makesureHeaderView(ZxTableModel* pModel);
signals:
protected:
ZxTableHeaderViewUnit* m_pHeaderView; //不涉及序列化
bool m_bUnitTitleIfNeeded;
bool m_bUnableSP;
};