FemaLocalSoftware/sensorlayout.h
2024-11-28 11:02:59 +03:00

28 lines
640 B
C++

#ifndef SENSORLAYOUT_H
#define SENSORLAYOUT_H
#include <QLayout>
#include <QRect>
#include <QWidgetItem>
class SensorLayout : public QLayout
{
public:
SensorLayout(QWidget *parent = nullptr);
~SensorLayout();
void addItem(QLayoutItem *item) override;
QSize sizeHint() const override;
QSize minimumSize() const override;
int count() const override;
QLayoutItem* itemAt(int index) const override;
QLayoutItem* takeAt(int index) override;
void setGeometry(const QRect &rect) override;
private:
QList<QLayoutItem*> items;
int spacing = 20;
};
#endif // SENSORLAYOUT_H