Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/virtual/virtual_output.cpp
Show All 31 Lines | |||||
32 | } | 32 | } | ||
33 | 33 | | |||
34 | VirtualOutput::~VirtualOutput() | 34 | VirtualOutput::~VirtualOutput() | ||
35 | { | 35 | { | ||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | void VirtualOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | 38 | void VirtualOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | ||
39 | { | 39 | { | ||
40 | KWayland::Server::OutputDeviceInterface::Mode mode; | 40 | KWaylandServer::OutputDeviceInterface::Mode mode; | ||
41 | mode.id = 0; | 41 | mode.id = 0; | ||
42 | mode.size = pixelSize; | 42 | mode.size = pixelSize; | ||
43 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | 43 | mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current; | ||
44 | mode.refreshRate = 60000; // TODO | 44 | mode.refreshRate = 60000; // TODO | ||
45 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode }); | 45 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode }); | ||
46 | setGeometry(QRect(logicalPosition, pixelSize)); | 46 | setGeometry(QRect(logicalPosition, pixelSize)); | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | void VirtualOutput::setGeometry(const QRect &geo) | 49 | void VirtualOutput::setGeometry(const QRect &geo) | ||
50 | { | 50 | { | ||
51 | // TODO: set mode to have updated pixelSize | 51 | // TODO: set mode to have updated pixelSize | ||
52 | setGlobalPos(geo.topLeft()); | 52 | setGlobalPos(geo.topLeft()); | ||
53 | } | 53 | } | ||
54 | 54 | | |||
55 | } | 55 | } |