mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-09-23 16:49:07 +03:00
Fix #61 AutoHeight overlapping
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#define LRBANDDESIGNINTF_H
|
||||
#include "lrbasedesignintf.h"
|
||||
#include "lrdatasourcemanager.h"
|
||||
#include "lritemscontainerdesignitf.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace LimeReport {
|
||||
@@ -81,10 +82,7 @@ private:
|
||||
BandDesignIntf* m_band;
|
||||
};
|
||||
|
||||
struct ItemSortContainer;
|
||||
typedef QSharedPointer< ItemSortContainer > PItemSortContainer;
|
||||
|
||||
class BandDesignIntf : public BaseDesignIntf
|
||||
class BandDesignIntf : public ItemsContainerDesignInft
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight )
|
||||
@@ -223,10 +221,6 @@ public:
|
||||
signals:
|
||||
void bandRendered(BandDesignIntf* band);
|
||||
protected:
|
||||
void snapshotItemsLayout();
|
||||
void arrangeSubItems(RenderPass pass, DataSourceManager *dataManager, ArrangeType type = AsNeeded);
|
||||
qreal findMaxBottom();
|
||||
qreal findMaxHeight();
|
||||
void trimToMaxHeight(int maxHeight);
|
||||
void setBandTypeText(const QString& value);
|
||||
QString bandTypeText(){return m_bandTypeText;}
|
||||
@@ -286,37 +280,7 @@ public:
|
||||
DataBandDesignIntf(BandsType bandType, QString xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0);
|
||||
};
|
||||
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
||||
bool itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2);
|
||||
bool bandIndexLessThen(const BandDesignIntf* b1, const BandDesignIntf* b2);
|
||||
|
||||
}
|
||||
} // namespace LimeReport
|
||||
#endif // LRBANDDESIGNINTF_H
|
||||
|
Reference in New Issue
Block a user