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