2018-06-21 14:29:00 +03:00
|
|
|
#ifndef LRVERTICALLAYOUT_H
|
|
|
|
#define LRVERTICALLAYOUT_H
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
#include "lrabstractlayout.h"
|
2018-06-21 14:29:00 +03:00
|
|
|
#include "lritemdesignintf.h"
|
|
|
|
#include "lrlayoutmarker.h"
|
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
namespace LimeReport {
|
2018-06-21 14:29:00 +03:00
|
|
|
|
2024-09-04 17:31:16 +03:00
|
|
|
class VerticalLayout: public AbstractLayout {
|
2018-06-21 14:29:00 +03:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
friend class BaseDesignIntf;
|
2024-09-04 17:31:16 +03:00
|
|
|
VerticalLayout(QObject* owner = 0, QGraphicsItem* parent = 0);
|
2018-06-21 14:29:00 +03:00
|
|
|
~VerticalLayout();
|
|
|
|
// BaseDesignIntf interface
|
2024-09-04 17:31:16 +03:00
|
|
|
BaseDesignIntf* createSameTypeItem(QObject* owner, QGraphicsItem* parent);
|
|
|
|
bool isSplittable() const { return true; }
|
|
|
|
|
2018-06-21 14:29:00 +03:00
|
|
|
protected:
|
|
|
|
void updateLayoutSize();
|
|
|
|
void relocateChildren();
|
|
|
|
bool canBeSplitted(int height) const;
|
2024-09-04 17:31:16 +03:00
|
|
|
BaseDesignIntf* cloneUpperPart(int height, QObject* owner = 0, QGraphicsItem* parent = 0);
|
|
|
|
BaseDesignIntf* cloneBottomPart(int height, QObject* owner = 0, QGraphicsItem* parent = 0);
|
|
|
|
|
2018-06-21 14:29:00 +03:00
|
|
|
private:
|
2019-02-02 00:28:30 +03:00
|
|
|
void sortChildren();
|
2018-06-21 14:29:00 +03:00
|
|
|
void divideSpace();
|
|
|
|
void placeItemInLayout(BaseDesignIntf* item);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace LimeReport
|
|
|
|
#endif // LRVERTICALLAYOUT_H
|