4 #ifndef pqHierarchicalGridLayout_h 5 #define pqHierarchicalGridLayout_h 8 #include <QScopedPointer> 41 typedef QLayout Superclass;
51 void addItem(QLayoutItem* item)
override;
52 QLayoutItem* itemAt(
int index)
const override;
53 QLayoutItem* takeAt(
int index)
override;
54 int count()
const override;
61 QSize minimumSize()
const override;
62 void setGeometry(
const QRect& rect)
override;
63 QSize sizeHint()
const override;
70 bool isLocationValid(
int location)
const;
77 void split(
int location, Qt::Orientation
direction,
double splitFraction);
78 void splitAny(
int location,
double splitFraction);
81 this->
split(location, Qt::Vertical, splitFraction);
85 this->
split(location, Qt::Horizontal, splitFraction);
93 void setSplitFraction(
int location,
double splitFraction);
102 void maximize(
int location);
108 Item(Qt::Orientation direction,
double fraction)
109 : Direction(direction)
113 Item(QWidget* widget =
nullptr)
119 QWidget* Widget =
nullptr;
120 Qt::Orientation Direction = Qt::Horizontal;
121 double Fraction = -1.0;
136 QVector<QWidget*>
rearrange(
const QVector<Item>& layout);
142 QScopedPointer<pqInternals> Internals;
void splitVertical(int location, double splitFraction)
Adds a splitter item.
Item(Qt::Orientation direction, double fraction)
QLayout specialization that supports a hierarchical layout.
void split(const std::string &s, const char &delim, std::vector< std::string > &elems)
Item(QWidget *widget=nullptr)
void splitHorizontal(int location, double splitFraction)
Adds a splitter item.
QVector< QWidget * > rearrange(const QVector< Item > &layout)
API to rearrange the widgets in this layout.