20#include <QAbstractListModel>
23class DisplayCutoutsModel:
public QAbstractListModel
26 Q_PROPERTY(
bool expanded WRITE setExpanded)
27 Q_PROPERTY(Qt::ScreenOrientation orientation WRITE setOrientation)
28 Q_PROPERTY(
bool enabled WRITE setEnabled)
29 Q_PROPERTY(
bool lightMode WRITE setLightMode)
32 DisplayCutoutsModel(QObject *parent =
nullptr);
33 ~DisplayCutoutsModel() =
default;
35 void setExpanded(
bool value);
36 void setOrientation(Qt::ScreenOrientation value);
37 void setEnabled(
bool value);
38 void setLightMode(
bool lightMode);
40 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
41 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
47 bool m_expanded{
false};
49 bool m_lightMode{
false};
50 QList<QRect> m_expandedCutouts;
51 QList<QRect> m_collapsedCutouts;
52 QList<QRect> m_collapsedLightCutouts;
53 Qt::ScreenOrientation m_orientation;