#pragma once #include "lts_multi_monitor_export.h" #include #include class QSplitter; class QHBoxLayout; namespace LtsUtils { class Promise; } namespace LtsMultiMonitor { class LtsScreenContainer; class LTSMULTIMONITOR_EXPORT LtsScreenBase : public QObject { Q_OBJECT public: enum WidgetType { MainWidget, SecondaryWidget, None, }; LtsScreenBase(QRect screenGeo, int screenId, bool debugMargins, const QString &serial); const QRect &screenRect() const { return m_screenRect; } int screenId() const { return m_screenId; } const QString serialNumber() const { return m_serial; } QWidget *screenDialog() const { return m_screenDialog; } virtual int screenType() const = 0; virtual int containerIdOfWidget(QWidget *widget) const noexcept(false) = 0; virtual LtsScreenContainer *putWidget(QWidget *widget, int screenPart = -1 ) noexcept(false) = 0; virtual LtsScreenContainer *containerOfWidget(QWidget *widget) noexcept(false) = 0; virtual bool isEmpty() const = 0; virtual bool isIrreplaceable() const = 0; virtual void check() {} virtual bool hasWidget(QWidget *widget) const = 0; virtual void switchToTemp(WidgetType ) {} virtual void finalizeSwitch() {} virtual void revertSwitch() {} protected: QWidget *m_screenDialog; private: int m_screenId; QString m_serial; QRect m_screenRect; }; }