0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-25 00:18:06 +03:00

Define code style and format all source file using clang-format-14

except those placed in 3rdparty directories.
This commit is contained in:
Андрей Лухнов
2024-09-04 17:31:16 +03:00
parent c5b9ac265d
commit 0fca7169d3
285 changed files with 19120 additions and 17875 deletions

View File

@@ -3,55 +3,66 @@
#include "lrbasedesignintf.h"
namespace LimeReport{
namespace LimeReport {
class LIMEREPORT_EXPORT Segment{
class LIMEREPORT_EXPORT Segment {
public:
Segment(qreal segmentStart,qreal segmentEnd):m_begin(segmentStart),m_end(segmentEnd){}
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 LIMEREPORT_EXPORT VSegment : public Segment{
class LIMEREPORT_EXPORT VSegment: public Segment {
public:
VSegment(QRectF rect):Segment(rect.top(),rect.bottom()){}
VSegment(QRectF rect): Segment(rect.top(), rect.bottom()) { }
};
struct LIMEREPORT_EXPORT HSegment :public Segment{
struct LIMEREPORT_EXPORT HSegment: public Segment {
public:
HSegment(QRectF rect):Segment(rect.left(),rect.right()){}
HSegment(QRectF rect): Segment(rect.left(), rect.right()) { }
};
struct LIMEREPORT_EXPORT ItemSortContainer {
QRectF m_rect;
BaseDesignIntf * m_item;
ItemSortContainer(BaseDesignIntf *item){
m_item=item;
m_rect=item->geometry();
BaseDesignIntf* m_item;
ItemSortContainer(BaseDesignIntf* item)
{
m_item = item;
m_rect = item->geometry();
}
};
typedef QSharedPointer< ItemSortContainer > PItemSortContainer;
bool LIMEREPORT_EXPORT itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2);
typedef QSharedPointer<ItemSortContainer> PItemSortContainer;
bool LIMEREPORT_EXPORT itemSortContainerLessThen(const PItemSortContainer c1,
const PItemSortContainer c2);
class LIMEREPORT_EXPORT ItemsContainerDesignInft : public BookmarkContainerDesignIntf{
class LIMEREPORT_EXPORT ItemsContainerDesignInft: public BookmarkContainerDesignIntf {
Q_OBJECT
public:
ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0):
BookmarkContainerDesignIntf(xmlTypeName, owner, parent){}
enum SnapshotType{Full, IgnoreBands};
protected:
void snapshotItemsLayout(SnapshotType type = Full);
void arrangeSubItems(RenderPass pass, DataSourceManager *dataManager, ArrangeType type = AsNeeded);
qreal findMaxBottom() const;
qreal findMaxHeight() const;
qreal findMinTop() const;
private:
QVector<PItemSortContainer> m_containerItems;
ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0,
QGraphicsItem* parent = 0):
BookmarkContainerDesignIntf(xmlTypeName, owner, parent)
{
}
enum SnapshotType {
Full,
IgnoreBands
};
protected:
void snapshotItemsLayout(SnapshotType type = Full);
void arrangeSubItems(RenderPass pass, DataSourceManager* dataManager,
ArrangeType type = AsNeeded);
qreal findMaxBottom() const;
qreal findMaxHeight() const;
qreal findMinTop() const;
private:
QVector<PItemSortContainer> m_containerItems;
};
} // namespace LimeReport