1 /************************************************************************* 2 Copyright © 2014-2015 Sebastian Kügler <sebas@kde.org> 3 Copyright © 2019-2020 Roman Gilg <subdiff@gmail.com> 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 **************************************************************************/ 19 #pragma once 20 21 #include <output.h> 22 23 #include "disman_wayland_export.h" 24 25 #include <QString> 26 27 namespace Disman 28 { 29 class WaylandInterface; 30 31 class DISMAN_WAYLAND_EXPORT WaylandOutput : public QObject 32 { 33 Q_OBJECT 34 35 public: 36 explicit WaylandOutput(quint32 id, QObject* parent = nullptr); 37 ~WaylandOutput() override = default; 38 39 Disman::OutputPtr toDismanOutput(); 40 virtual void updateDismanOutput(Disman::OutputPtr& output) = 0; 41 42 virtual quint32 id() const; 43 virtual bool enabled() const = 0; 44 virtual QRectF geometry() const = 0; 45 46 Disman::Output::Type guessType(const QString& type, const QString& name) const; 47 48 Q_SIGNALS: 49 void dataReceived(); 50 void changed(); 51 void removed(); 52 53 private: 54 quint32 m_id; 55 }; 56 57 } 58