diff --git a/backends/qscreen/qscreenoutput.h b/backends/qscreen/qscreenoutput.h index d3fd9d8..11ef619 100644 --- a/backends/qscreen/qscreenoutput.h +++ b/backends/qscreen/qscreenoutput.h @@ -1,58 +1,57 @@ /************************************************************************************* * Copyright 2014 Sebastian Kügler * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *************************************************************************************/ #ifndef QSCREEN_OUTPUT_H #define QSCREEN_OUTPUT_H #include "qscreenconfig.h" #include "config.h" #include "output.h" #include "edid.h" #include -#include namespace KScreen { class QScreenOutput : public QObject { Q_OBJECT public: explicit QScreenOutput(const QScreen *qscreen, QObject *parent = nullptr); ~QScreenOutput() override; KScreen::OutputPtr toKScreenOutput() const; void updateKScreenOutput(KScreen::OutputPtr &output) const; int id() const; void setId(const int newId); const QScreen *qscreen() const; private: void updateFromQScreen(const QScreen *qscreen); const QScreen *m_qscreen; int m_id; }; } // namespace #endif diff --git a/backends/xrandr/xrandroutput.h b/backends/xrandr/xrandroutput.h index bb58dcb..7b07e88 100644 --- a/backends/xrandr/xrandroutput.h +++ b/backends/xrandr/xrandroutput.h @@ -1,99 +1,98 @@ /************************************************************************************* * Copyright 2012, 2013 Daniel Vrátil * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * *************************************************************************************/ #ifndef XRANDROUTPUT_H #define XRANDROUTPUT_H #include #include #include -#include #include "xrandrmode.h" #include "output.h" #include "../xcbwrapper.h" class XRandRConfig; class XRandRCrtc; namespace KScreen { class Config; class Output; } class XRandROutput : public QObject { Q_OBJECT public: typedef QMap Map; explicit XRandROutput(xcb_randr_output_t id, XRandRConfig *config); ~XRandROutput() override; void disabled(); void disconnected(); void update(); void update(xcb_randr_crtc_t crtc, xcb_randr_mode_t mode, xcb_randr_connection_t conn, bool primary); void setIsPrimary(bool primary); xcb_randr_output_t id() const; bool isEnabled() const; bool isConnected() const; bool isPrimary() const; QPoint position() const; QSize size() const; QString currentModeId() const; XRandRMode::Map modes() const; XRandRMode* currentMode() const; KScreen::Output::Rotation rotation() const; bool isHorizontal() const; QByteArray edid() const; XRandRCrtc* crtc() const; KScreen::OutputPtr toKScreenOutput() const; private: void init(); void updateModes(const XCB::OutputInfo &outputInfo); static KScreen::Output::Type fetchOutputType(xcb_randr_output_t outputId, const QString &name); static QByteArray typeFromProperty(xcb_randr_output_t outputId); XRandRConfig *m_config; xcb_randr_output_t m_id; QString m_name; xcb_randr_connection_t m_connected; KScreen::Output::Type m_type; QString m_icon; XRandRMode::Map m_modes; QStringList m_preferredModes; bool m_primary; QList m_clones; mutable QByteArray m_edid; unsigned int m_widthMm; unsigned int m_heightMm; bool m_hotplugModeUpdate = false; XRandRCrtc *m_crtc; }; Q_DECLARE_METATYPE(XRandROutput::Map) #endif // XRANDROUTPUT_H