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.
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 "Defines.h"
# include "ZxTableView.h"
class ZxTableHeaderView ;
// 本类主要实现表头可以筛选的表格
class I_PLUGIN_EXPORT ZxTableViewEx : public ZxTableView
{
Q_OBJECT
public :
explicit ZxTableViewEx ( bool bMultiSel = true , \
QWidget * parent = 0 , \
QAbstractItemModel * model = NULL ) ;
virtual ~ ZxTableViewEx ( ) ;
//private:
void initHeaderView ( QStringList list , \
ZxTableModel * pModel = NULL ) ;
/// @brief 取得某列不重复的数据,并且转换为QString
/// @param nCol 列索引
/// @param bOnlyCurShow 是否仅仅获取表格当前显示内容(考虑筛选后)
QStringList getColDistinct ( int nCol , bool bOnlyCurShow = true ) ;
VVecVariant getCurFilterData ( int nIndex ) ;
public slots :
// 表头的响应
void slotOnGetColumnItems ( int index ) ;
void slotSelChanged ( const int index , const QStringList list ) ;
void slotRawDataChanged ( ) ;
signals :
void sigGetFilterData ( VVecVariant & vvec , \
const int index , \
const QStringList list ) ;
protected :
bool m_bMultiSel ; //true:多选, CheckBox
VVecVariant m_vvecDataAll ; //这是当前表格的所有数据,只有当最顶层的筛选条件改变时才会更新
QMap < int , QStringList > m_mapAllFields ;
QMap < int , QStringList > m_mapFilterFields ;
ZxTableHeaderView * m_pHeaderView ; //false:单选, Radio
bool m_bEnableSP ;
} ;