0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 11:31:10 +03:00

Vertical Layout has been added

This commit is contained in:
Arin Alexander
2018-06-21 14:29:00 +03:00
parent 1a189054f7
commit 5b818a4a15
22 changed files with 1029 additions and 467 deletions

View File

@@ -0,0 +1,37 @@
#ifndef LRVERTICALLAYOUT_H
#define LRVERTICALLAYOUT_H
#include "lritemdesignintf.h"
#include "lrlayoutmarker.h"
#include "lrabstractlayout.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 divideSpace();
void placeItemInLayout(BaseDesignIntf* item);
void insertItemInLayout(BaseDesignIntf* item);
BaseDesignIntf *findNext(BaseDesignIntf *item);
BaseDesignIntf *findPrior(BaseDesignIntf* item);
private:
};
} // namespace LimeReport
#endif // LRVERTICALLAYOUT_H