76 lines
2.3 KiB
C
76 lines
2.3 KiB
C
|
#ifndef CCSTABLEGROUP_H
|
|||
|
#define CCSTABLEGROUP_H
|
|||
|
#include "ccstableinterface.h"
|
|||
|
#include "ccsreport_global.h"
|
|||
|
|
|||
|
namespace CCS_Report {
|
|||
|
class CCSTableInterface;
|
|||
|
|
|||
|
class CCSTable;
|
|||
|
class CCSTableGroupPrivate;
|
|||
|
class ReportFunPara;
|
|||
|
class CCS_COMPASSREPORT_EXPORT CCSTableGroup:public CCSTableInterface
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
Q_PROPERTY(bool groupflag READ groupflag WRITE SetGroupFlag)
|
|||
|
Q_PROPERTY(bool recordpage READ recordpage WRITE SetRecordPage)
|
|||
|
Q_PROPERTY(QStringList tablenames READ tablenames WRITE SetTablenames )
|
|||
|
Q_PROPERTY(QStringList fieldkeys READ fieldkeys WRITE SetFieldKeys )
|
|||
|
|
|||
|
|
|||
|
public:
|
|||
|
CCSTableGroup(QObject * parent = 0);
|
|||
|
~CCSTableGroup();
|
|||
|
|
|||
|
virtual CCSBaseItemInterface * createInstance(QObject * parent) const;
|
|||
|
virtual CCSBaseItemInterface * clone(bool withChildren = true, bool init = true) const;
|
|||
|
virtual void SetValue(const QString &text,int iPos=0){}
|
|||
|
virtual void exeFunction(ReportFunPara& arg){}
|
|||
|
|
|||
|
bool groupflag() const;
|
|||
|
void SetGroupFlag(const bool &bFlag);
|
|||
|
|
|||
|
bool recordpage() const;
|
|||
|
void SetRecordPage(const bool &bFlag);
|
|||
|
|
|||
|
QStringList tablenames () const;
|
|||
|
void SetTablenames (const QStringList &names);
|
|||
|
QStringList fieldkeys () const;
|
|||
|
void SetFieldKeys (const QStringList &keys);
|
|||
|
|
|||
|
int Parse(QList<QPair<CCSTableInterface*, int>>& tablesinfo, CCSGroup& groupkey);
|
|||
|
protected:
|
|||
|
Q_DECLARE_PRIVATE(CCSTableGroup)
|
|||
|
CCSTableGroup(CCSTableGroupPrivate *dd, QObject * parent);
|
|||
|
virtual CCSBaseItemInterface * itemClone() const;
|
|||
|
private:
|
|||
|
|
|||
|
};
|
|||
|
class CCSTableGroupPrivate:public CCSTableInterfacePrivate
|
|||
|
{
|
|||
|
public:
|
|||
|
CCSTableGroupPrivate()
|
|||
|
:CCSTableInterfacePrivate(),
|
|||
|
m_bGroupFlag(false),
|
|||
|
m_bRecordPage(true)
|
|||
|
{
|
|||
|
m_strTable.clear();
|
|||
|
m_strKeys.clear();
|
|||
|
}
|
|||
|
CCSTableGroupPrivate(const CCSTableGroupPrivate& p)
|
|||
|
:CCSTableInterfacePrivate(p),
|
|||
|
m_bGroupFlag(p.m_bGroupFlag),
|
|||
|
m_strTable(p.m_strTable),
|
|||
|
m_strKeys(p.m_strKeys),
|
|||
|
m_bRecordPage(p.m_bRecordPage)
|
|||
|
{}
|
|||
|
virtual ~CCSTableGroupPrivate(){}
|
|||
|
|
|||
|
bool m_bGroupFlag; //
|
|||
|
QStringList m_strTable; //表名,多个表名时用逗号隔开
|
|||
|
QStringList m_strKeys; //备用,用于多表联合查询时
|
|||
|
bool m_bRecordPage; //是否一个GroupTable重新换一页 缺省true
|
|||
|
};
|
|||
|
}
|
|||
|
#endif // CCSTABLEGROUP_H
|