63 lines
1.8 KiB
C
63 lines
1.8 KiB
C
|
#ifndef CCSSUBTABLE_H
|
|||
|
#define CCSSUBTABLE_H
|
|||
|
/*
|
|||
|
subtable 子表标识类
|
|||
|
*/
|
|||
|
#include "ccstableinterface.h"
|
|||
|
#include "ccsreport_global.h"
|
|||
|
namespace CCS_Report {
|
|||
|
|
|||
|
class CCSTableInterface;
|
|||
|
class CCSSubTablePrivate;
|
|||
|
class CCS_COMPASSREPORT_EXPORT CCSSubTable:public CCSTableInterface
|
|||
|
{
|
|||
|
Q_OBJECT
|
|||
|
Q_PROPERTY(QStringList fieldkeys READ fieldkeys WRITE SetFieldKeys )
|
|||
|
|
|||
|
public:
|
|||
|
CCSSubTable(QObject * parent = 0);
|
|||
|
~CCSSubTable();
|
|||
|
|
|||
|
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) {}
|
|||
|
virtual int Parse(QList<QPair<CCSTableInterface*, int>>& tablesinfo, QList<QPair<QString, QString>>& groupkey);
|
|||
|
|
|||
|
QStringList fieldkeys () const;
|
|||
|
void SetFieldKeys (const QStringList &keys);
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 删除模板中定义的多余的表(目前只允许一个子表下包含一个动态表)
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
bool deleteTable(int count);
|
|||
|
void ParseTables(QList<QObject*>& listTableData, QList<QPair<QString, QString>>& groupkey);
|
|||
|
protected:
|
|||
|
Q_DECLARE_PRIVATE(CCSSubTable)
|
|||
|
CCSSubTable(CCSSubTablePrivate *dd, QObject * parent);
|
|||
|
virtual CCSBaseItemInterface * itemClone() const;
|
|||
|
private:
|
|||
|
};
|
|||
|
|
|||
|
class CCSSubTablePrivate:public CCSTableInterfacePrivate
|
|||
|
{
|
|||
|
public:
|
|||
|
CCSSubTablePrivate()
|
|||
|
:CCSTableInterfacePrivate()
|
|||
|
{
|
|||
|
m_strKeyField.clear();
|
|||
|
}
|
|||
|
CCSSubTablePrivate(const CCSSubTablePrivate& p)
|
|||
|
:CCSTableInterfacePrivate(p),
|
|||
|
m_strKeyField(p.m_strKeyField)
|
|||
|
{}
|
|||
|
virtual ~CCSSubTablePrivate(){}
|
|||
|
|
|||
|
QStringList m_strKeyField; //对于父表查询关键字
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#endif // CCSSUBTABLE_H
|