Warning, file /plasma/libkscreen/backends/kwayland/waylandoutputdevicemode.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 #ifndef WAYLANDOUTPUTDEVICEMODE_H 0007 #define WAYLANDOUTPUTDEVICEMODE_H 0008 0009 #include "qwayland-kde-output-device-v2.h" 0010 0011 #include <QObject> 0012 #include <QSize> 0013 0014 namespace KScreen 0015 { 0016 class WaylandOutputDeviceMode : public QObject, public QtWayland::kde_output_device_mode_v2 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 WaylandOutputDeviceMode(struct ::kde_output_device_mode_v2 *object); 0022 0023 ~WaylandOutputDeviceMode() override; 0024 0025 int refreshRate() const; 0026 QSize size() const; 0027 bool preferred() const; 0028 0029 bool operator==(const WaylandOutputDeviceMode &other); 0030 0031 static WaylandOutputDeviceMode *get(struct ::kde_output_device_mode_v2 *object); 0032 0033 Q_SIGNALS: 0034 void removed(); 0035 0036 protected: 0037 void kde_output_device_mode_v2_size(int32_t width, int32_t height) override; 0038 void kde_output_device_mode_v2_refresh(int32_t refresh) override; 0039 void kde_output_device_mode_v2_preferred() override; 0040 void kde_output_device_mode_v2_removed() override; 0041 0042 private: 0043 int m_refreshRate = 60000; 0044 QSize m_size; 0045 bool m_preferred = false; 0046 }; 0047 0048 } 0049 0050 #endif // WAYLANDOUTPUTDEVICEMODE_H