Changeset View
Changeset View
Standalone View
Standalone View
abstract_wayland_output.h
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
55 | class KWIN_EXPORT AbstractWaylandOutput : public AbstractOutput | 55 | class KWIN_EXPORT AbstractWaylandOutput : public AbstractOutput | ||
56 | { | 56 | { | ||
57 | Q_OBJECT | 57 | Q_OBJECT | ||
58 | public: | 58 | public: | ||
59 | explicit AbstractWaylandOutput(QObject *parent = nullptr); | 59 | explicit AbstractWaylandOutput(QObject *parent = nullptr); | ||
60 | ~AbstractWaylandOutput() override; | 60 | ~AbstractWaylandOutput() override; | ||
61 | 61 | | |||
62 | QString name() const override; | 62 | QString name() const override; | ||
63 | QByteArray uuid() const override; | ||||
63 | bool isEnabled() const { | 64 | bool isEnabled() const { | ||
64 | return !m_waylandOutput.isNull(); | 65 | return !m_waylandOutput.isNull(); | ||
65 | } | 66 | } | ||
66 | 67 | | |||
67 | QSize pixelSize() const; | 68 | QSize pixelSize() const; | ||
68 | qreal scale() const override; | 69 | qreal scale() const override; | ||
69 | 70 | | |||
70 | /** | 71 | /** | ||
Show All 12 Lines | |||||
83 | 84 | | |||
84 | bool isInternal() const override { | 85 | bool isInternal() const override { | ||
85 | return m_internal; | 86 | return m_internal; | ||
86 | } | 87 | } | ||
87 | 88 | | |||
88 | void setGlobalPos(const QPoint &pos); | 89 | void setGlobalPos(const QPoint &pos); | ||
89 | void setScale(qreal scale); | 90 | void setScale(qreal scale); | ||
90 | 91 | | |||
91 | /** | 92 | void applyChanges(const KWayland::Server::OutputChangeSet *changeSet) override; | ||
92 | * This sets the changes and tests them against the specific output. | | |||
93 | */ | | |||
94 | void setChanges(KWayland::Server::OutputChangeSet *changeset); | | |||
95 | 93 | | |||
96 | QPointer<KWayland::Server::OutputInterface> waylandOutput() const { | 94 | QPointer<KWayland::Server::OutputInterface> waylandOutput() const { | ||
97 | return m_waylandOutput; | 95 | return m_waylandOutput; | ||
98 | } | 96 | } | ||
99 | 97 | | |||
100 | /** | 98 | /** | ||
101 | * Enable or disable the output. | 99 | * Enable or disable the output. | ||
102 | * | 100 | * | ||
103 | * This differs from updateDpms as it also removes the wl_output. | 101 | * This differs from updateDpms as it also removes the wl_output. | ||
104 | * The default is on. | 102 | * The default is on. | ||
105 | */ | 103 | */ | ||
106 | void setEnabled(bool enable); | 104 | void setEnabled(bool enable) override; | ||
107 | 105 | | |||
108 | Q_SIGNALS: | 106 | Q_SIGNALS: | ||
109 | void modeChanged(); | 107 | void modeChanged(); | ||
110 | 108 | | |||
111 | protected: | 109 | protected: | ||
112 | void initWaylandOutputDevice(const QString &model, | 110 | void initWaylandOutputDevice(const QString &model, | ||
113 | const QString &manufacturer, | 111 | const QString &manufacturer, | ||
114 | const QByteArray &uuid, | 112 | const QByteArray &uuid, | ||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |