FemaLocalSoftware/sensorlayout.h

28 lines
640 B
C
Raw Normal View History

2024-11-28 08:02:59 +00:00
#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