0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-28 10:28:10 +03:00
LimeReport/limereport/lritemscontainerdesignitf.h

60 lines
1.6 KiB
C
Raw Normal View History

2017-09-27 13:04:56 +03:00
#ifndef LRITEMSCONTAINERDESIGNITF_H
#define LRITEMSCONTAINERDESIGNITF_H
2017-04-05 00:58:04 +03:00
#include "lrbasedesignintf.h"
namespace LimeReport{
class Segment{
public:
Segment(qreal segmentStart,qreal segmentEnd):m_begin(segmentStart),m_end(segmentEnd){}
bool intersect(Segment value);
qreal intersectValue(Segment value);
private:
qreal m_begin;
qreal m_end;
};
class VSegment : public Segment{
public:
VSegment(QRectF rect):Segment(rect.top(),rect.bottom()){}
};
struct HSegment :public Segment{
public:
HSegment(QRectF rect):Segment(rect.left(),rect.right()){}
};
struct ItemSortContainer {
QRectF m_rect;
BaseDesignIntf * m_item;
ItemSortContainer(BaseDesignIntf *item){
m_item=item;
m_rect=item->geometry();
}
};
typedef QSharedPointer< ItemSortContainer > PItemSortContainer;
bool itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2);
2019-02-12 22:45:35 +03:00
class ItemsContainerDesignInft : public BookmarkContainerDesignIntf{
Q_OBJECT
2017-04-05 00:58:04 +03:00
public:
ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0):
2019-02-12 22:45:35 +03:00
BookmarkContainerDesignIntf(xmlTypeName, owner, parent){}
2020-06-20 10:10:53 +03:00
enum SnapshotType{Full, IgnoreBands};
2017-04-05 00:58:04 +03:00
protected:
2020-06-20 10:10:53 +03:00
void snapshotItemsLayout(SnapshotType type = Full);
2017-04-05 00:58:04 +03:00
void arrangeSubItems(RenderPass pass, DataSourceManager *dataManager, ArrangeType type = AsNeeded);
2017-08-14 22:39:38 +03:00
qreal findMaxBottom() const;
qreal findMaxHeight() const;
2017-12-18 20:28:26 +03:00
qreal findMinTop() const;
2017-04-05 00:58:04 +03:00
private:
QVector<PItemSortContainer> m_containerItems;
};
} // namespace LimeReport
#endif // ITEMSCONTAINERDESIGNITF_H