File indexing completed on 2024-04-28 16:49:42

0001 /*
0002  *  SPDX-FileCopyrightText: 2012, 2013 Daniel Vrátil <dvratil@redhat.com>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.1-or-later
0005  */
0006 #pragma once
0007 
0008 #include "types.h"
0009 
0010 #include <QObject>
0011 #include <QSize>
0012 
0013 class XRandRConfig;
0014 namespace KScreen
0015 {
0016 class Screen;
0017 class Config;
0018 }
0019 
0020 class XRandRScreen : public QObject
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit XRandRScreen(XRandRConfig *config = nullptr);
0026     ~XRandRScreen() override;
0027 
0028     KScreen::ScreenPtr toKScreenScreen() const;
0029     void updateKScreenScreen(KScreen::ScreenPtr &screen) const;
0030 
0031     void update();
0032     void update(const QSize &size);
0033     QSize currentSize();
0034 
0035 private:
0036     int m_id;
0037     QSize m_minSize;
0038     QSize m_maxSize;
0039     QSize m_currentSize;
0040 };