0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00
LimeReport/limereport/items/lrverticallayout.h
Андрей Лухнов 0fca7169d3 Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
2024-09-19 21:09:38 +03:00

35 lines
987 B
C++

#ifndef LRVERTICALLAYOUT_H
#define LRVERTICALLAYOUT_H
#include "lrabstractlayout.h"
#include "lritemdesignintf.h"
#include "lrlayoutmarker.h"
namespace LimeReport {
class VerticalLayout: public AbstractLayout {
Q_OBJECT
public:
friend class BaseDesignIntf;
VerticalLayout(QObject* owner = 0, QGraphicsItem* parent = 0);
~VerticalLayout();
// BaseDesignIntf interface
BaseDesignIntf* createSameTypeItem(QObject* owner, QGraphicsItem* parent);
bool isSplittable() const { return true; }
protected:
void updateLayoutSize();
void relocateChildren();
bool canBeSplitted(int height) const;
BaseDesignIntf* cloneUpperPart(int height, QObject* owner = 0, QGraphicsItem* parent = 0);
BaseDesignIntf* cloneBottomPart(int height, QObject* owner = 0, QGraphicsItem* parent = 0);
private:
void sortChildren();
void divideSpace();
void placeItemInLayout(BaseDesignIntf* item);
};
} // namespace LimeReport
#endif // LRVERTICALLAYOUT_H