splitArea.h 567 Bytes
Newer Older
1 2 3 4 5
#ifndef _SPLITAREA_H_
#define _SPLITAREA_H_

#include <QSplitter>

6 7
class SplitArea : public QSplitter
{
8
	Q_OBJECT
9

10
public:
11 12 13
	SplitArea(QWidget* parent = NULL);

	int getNbRows() { return nbRows; }
14 15 16 17 18 19 20 21 22 23 24

	void addFitElement(QWidget* element);
	void addElementAt(QWidget* element, int x, int y);

	void addElementRightTo(QWidget* element, QWidget* left);

	bool isEmpty();

	void updateSize();

protected:
25 26
	int nbRows;
	int maxNbColumns;
27
	int rowMin;
28
	int nbElements;
29 30 31 32 33 34 35 36 37 38

protected slots:
	void elementRemoved();

private:
	bool sizeUpdated;
	void determineRowMin();
};

#endif