mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
bandAt added
This commit is contained in:
parent
4c5a6b0183
commit
c4a24b1f3b
@ -482,12 +482,7 @@ QSizeF PageDesignIntf::placeSizeOnGrid(QSizeF size){
|
||||
|
||||
BaseDesignIntf *PageDesignIntf::addReportItem(const QString &itemType, QPointF pos, QSizeF size)
|
||||
{
|
||||
BandDesignIntf *band=0;
|
||||
foreach(QGraphicsItem * item, items(pos)) {
|
||||
band = dynamic_cast<BandDesignIntf *>(item);
|
||||
if (band) break;
|
||||
}
|
||||
|
||||
BandDesignIntf *band = bandAt(pos);
|
||||
if (band) {
|
||||
BaseDesignIntf *reportItem = addReportItem(itemType, band, band);
|
||||
// QPointF insertPos = band->mapFromScene(pos);
|
||||
@ -1733,6 +1728,16 @@ QList<BaseDesignIntf*> PageDesignIntf::reportItemsByName(const QString &name){
|
||||
return result;
|
||||
}
|
||||
|
||||
BandDesignIntf *PageDesignIntf::bandAt(QPointF pos)
|
||||
{
|
||||
BandDesignIntf *band=0;
|
||||
foreach(QGraphicsItem * item, items(pos)) {
|
||||
band = dynamic_cast<BandDesignIntf *>(item);
|
||||
if (band) break;
|
||||
}
|
||||
return band;
|
||||
}
|
||||
|
||||
void CommandIf::addCommand(Ptr command, bool execute)
|
||||
{
|
||||
Q_UNUSED(command)
|
||||
|
@ -140,6 +140,7 @@ namespace LimeReport {
|
||||
BaseDesignIntf::ItemMode itemMode(){return m_itemMode;}
|
||||
BaseDesignIntf* reportItemByName(const QString& name);
|
||||
QList<BaseDesignIntf *> reportItemsByName(const QString &name);
|
||||
BandDesignIntf* bandAt(QPointF pos);
|
||||
BaseDesignIntf* addReportItem(const QString& itemType, QPointF pos, QSizeF size);
|
||||
BaseDesignIntf* addReportItem(const QString& itemType, QObject *owner=0, BaseDesignIntf *parent=0);
|
||||
BaseDesignIntf* createReportItem(const QString& itemType, QObject *owner=0, BaseDesignIntf *parent=0);
|
||||
|
Loading…
Reference in New Issue
Block a user