KWayland

outputdevice_interface.cpp
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #include "outputdevice_interface.h"
7 #include "display.h"
8 #include "global_p.h"
9 #include "logging.h"
10 
11 #include "wayland-org_kde_kwin_outputdevice-server-protocol.h"
12 #include <QDebug>
13 #include <wayland-server.h>
14 
15 namespace KWayland
16 {
17 namespace Server
18 {
19 class OutputDeviceInterface::Private : public Global::Private
20 {
21 public:
22  struct ResourceData {
23  wl_resource *resource;
24  uint32_t version;
25  };
26  Private(OutputDeviceInterface *q, Display *d);
27  ~Private() override;
28 
29  void updateGeometry();
30  void updateUuid();
31  void updateEdid();
32  void updateEnabled();
33  void updateScale();
34  void updateColorCurves();
35  void updateEisaId();
36  void updateSerialNumber();
37 
38  void sendGeometry(wl_resource *resource);
39  void sendMode(wl_resource *resource, const Mode &mode);
40  void sendDone(const ResourceData &data);
41  void sendUuid(const ResourceData &data);
42  void sendEdid(const ResourceData &data);
43  void sendEnabled(const ResourceData &data);
44  void sendScale(const ResourceData &data);
45  void sendColorCurves(const ResourceData &data);
46  void sendEisaId(const ResourceData &data);
47  void sendSerialNumber(const ResourceData &data);
48 
49  QSize physicalSize;
50  QPoint globalPosition;
51  QString manufacturer = QStringLiteral("org.kde.kwin");
52  QString model = QStringLiteral("none");
53  qreal scale = 1.0;
54  QString serialNumber;
55  QString eisaId;
56  SubPixel subPixel = SubPixel::Unknown;
57  Transform transform = Transform::Normal;
58  ColorCurves colorCurves;
59  QList<Mode> modes;
60  Mode currentMode;
61  QList<ResourceData> resources;
62 
63  QByteArray edid;
64  Enablement enabled = Enablement::Enabled;
65  QByteArray uuid;
66 
67  static OutputDeviceInterface *get(wl_resource *native);
68 
69 private:
70  static Private *cast(wl_resource *native);
71  static void unbind(wl_resource *resource);
72  void bind(wl_client *client, uint32_t version, uint32_t id) override;
73  int32_t toTransform() const;
74  int32_t toSubPixel() const;
75 
76  static const quint32 s_version;
77  OutputDeviceInterface *q;
78  static QVector<Private *> s_privates;
79 };
80 
81 const quint32 OutputDeviceInterface::Private::s_version = 2;
82 
83 QVector<OutputDeviceInterface::Private *> OutputDeviceInterface::Private::s_privates;
84 
85 OutputDeviceInterface::Private::Private(OutputDeviceInterface *q, Display *d)
86  : Global::Private(d, &org_kde_kwin_outputdevice_interface, s_version)
87  , q(q)
88 {
89  s_privates << this;
90 }
91 
92 OutputDeviceInterface::Private::~Private()
93 {
94  s_privates.removeAll(this);
95 }
96 
97 OutputDeviceInterface *OutputDeviceInterface::Private::get(wl_resource *native)
98 {
99  if (Private *p = cast(native)) {
100  return p->q;
101  }
102  return nullptr;
103 }
104 
105 OutputDeviceInterface::Private *OutputDeviceInterface::Private::cast(wl_resource *native)
106 {
107  for (auto it = s_privates.constBegin(); it != s_privates.constEnd(); ++it) {
108  const auto &resources = (*it)->resources;
109  auto rit = std::find_if(resources.begin(), resources.end(), [native](const ResourceData &data) {
110  return data.resource == native;
111  });
112  if (rit != resources.end()) {
113  return (*it);
114  }
115  }
116  return nullptr;
117 }
118 
119 OutputDeviceInterface::OutputDeviceInterface(Display *display, QObject *parent)
120  : Global(new Private(this, display), parent)
121 {
122  Q_D();
123  connect(this, &OutputDeviceInterface::currentModeChanged, this, [d] {
124  Q_ASSERT(d->currentMode.id >= 0);
125  for (auto it = d->resources.constBegin(); it != d->resources.constEnd(); ++it) {
126  d->sendMode((*it).resource, d->currentMode);
127  d->sendDone(*it);
128  }
129  wl_display_flush_clients(*(d->display));
130  });
131  connect(this, &OutputDeviceInterface::subPixelChanged, this, [d] {
132  d->updateGeometry();
133  });
134  connect(this, &OutputDeviceInterface::transformChanged, this, [d] {
135  d->updateGeometry();
136  });
137  connect(this, &OutputDeviceInterface::globalPositionChanged, this, [d] {
138  d->updateGeometry();
139  });
140  connect(this, &OutputDeviceInterface::modelChanged, this, [d] {
141  d->updateGeometry();
142  });
143  connect(this, &OutputDeviceInterface::manufacturerChanged, this, [d] {
144  d->updateGeometry();
145  });
146  connect(this, &OutputDeviceInterface::scaleFChanged, this, [d] {
147  d->updateScale();
148  });
149  connect(this, &OutputDeviceInterface::scaleChanged, this, [d] {
150  d->updateScale();
151  });
152  connect(this, &OutputDeviceInterface::colorCurvesChanged, this, [d] {
153  d->updateColorCurves();
154  });
155 }
156 
157 OutputDeviceInterface::~OutputDeviceInterface() = default;
158 
159 QSize OutputDeviceInterface::pixelSize() const
160 {
161  Q_D();
162 
163  if (d->currentMode.id == -1) {
164  return QSize();
165  }
166  return d->currentMode.size;
167 }
168 
169 OutputDeviceInterface *OutputDeviceInterface::get(wl_resource *native)
170 {
171  return Private::get(native);
172 }
173 
174 int OutputDeviceInterface::refreshRate() const
175 {
176  Q_D();
177 
178  if (d->currentMode.id == -1) {
179  return 60000;
180  }
181  return d->currentMode.refreshRate;
182 }
183 
184 void OutputDeviceInterface::addMode(Mode &mode)
185 {
186  Q_ASSERT(!isValid());
187  Q_ASSERT(mode.id >= 0);
188  Q_ASSERT(mode.size.isValid());
189  Q_D();
190 
191  auto currentModeIt = std::find_if(d->modes.begin(), d->modes.end(), [](const Mode &mode) {
192  return mode.flags.testFlag(ModeFlag::Current);
193  });
194  if (currentModeIt == d->modes.end() && !mode.flags.testFlag(ModeFlag::Current)) {
195  // no mode with current flag - enforce
196  mode.flags |= ModeFlag::Current;
197  }
198  if (currentModeIt != d->modes.end() && mode.flags.testFlag(ModeFlag::Current)) {
199  // another mode has the current flag - remove
200  (*currentModeIt).flags &= ~uint(ModeFlag::Current);
201  }
202 
203  if (mode.flags.testFlag(ModeFlag::Preferred)) {
204  // remove from existing Preferred mode
205  auto preferredIt = std::find_if(d->modes.begin(), d->modes.end(), [](const Mode &mode) {
206  return mode.flags.testFlag(ModeFlag::Preferred);
207  });
208  if (preferredIt != d->modes.end()) {
209  (*preferredIt).flags &= ~uint(ModeFlag::Preferred);
210  }
211  }
212 
213  auto existingModeIt = std::find_if(d->modes.begin(), d->modes.end(), [mode](const Mode &mode_it) {
214  return mode.size == mode_it.size && mode.refreshRate == mode_it.refreshRate && mode.id == mode_it.id;
215  });
216  auto emitChanges = [this, d, mode] {
217  Q_EMIT modesChanged();
218  if (mode.flags.testFlag(ModeFlag::Current)) {
219  d->currentMode = mode;
220  Q_EMIT refreshRateChanged(mode.refreshRate);
221  Q_EMIT pixelSizeChanged(mode.size);
222  Q_EMIT currentModeChanged();
223  }
224  };
225  if (existingModeIt != d->modes.end()) {
226  if ((*existingModeIt).flags == mode.flags) {
227  // nothing to do
228  return;
229  }
230  (*existingModeIt).flags = mode.flags;
231  emitChanges();
232  return;
233  } else {
234  auto idIt = std::find_if(d->modes.constBegin(), d->modes.constEnd(), [mode](const Mode &mode_it) {
235  return mode.id == mode_it.id;
236  });
237  if (idIt != d->modes.constEnd()) {
238  qCWarning(KWAYLAND_SERVER) << "Duplicate Mode id" << mode.id << ": not adding mode" << mode.size << mode.refreshRate;
239  return;
240  }
241  }
242  d->modes << mode;
243  emitChanges();
244 }
245 
246 void OutputDeviceInterface::setCurrentMode(const int modeId)
247 {
248  Q_D();
249  auto currentModeIt = std::find_if(d->modes.begin(), d->modes.end(), [](const Mode &mode) {
250  return mode.flags.testFlag(ModeFlag::Current);
251  });
252  if (currentModeIt != d->modes.end()) {
253  // another mode has the current flag - remove
254  (*currentModeIt).flags &= ~uint(ModeFlag::Current);
255  }
256 
257  auto existingModeIt = std::find_if(d->modes.begin(), d->modes.end(), [modeId](const Mode &mode) {
258  return mode.id == modeId;
259  });
260 
261  Q_ASSERT(existingModeIt != d->modes.end());
262  (*existingModeIt).flags |= ModeFlag::Current;
263  d->currentMode = *existingModeIt;
264  Q_EMIT modesChanged();
265  Q_EMIT refreshRateChanged((*existingModeIt).refreshRate);
266  Q_EMIT pixelSizeChanged((*existingModeIt).size);
267  Q_EMIT currentModeChanged();
268 }
269 
270 int32_t OutputDeviceInterface::Private::toTransform() const
271 {
272  switch (transform) {
273  case Transform::Normal:
274  return WL_OUTPUT_TRANSFORM_NORMAL;
275  case Transform::Rotated90:
276  return WL_OUTPUT_TRANSFORM_90;
277  case Transform::Rotated180:
278  return WL_OUTPUT_TRANSFORM_180;
279  case Transform::Rotated270:
280  return WL_OUTPUT_TRANSFORM_270;
281  case Transform::Flipped:
282  return WL_OUTPUT_TRANSFORM_FLIPPED;
283  case Transform::Flipped90:
284  return WL_OUTPUT_TRANSFORM_FLIPPED_90;
285  case Transform::Flipped180:
286  return WL_OUTPUT_TRANSFORM_FLIPPED_180;
287  case Transform::Flipped270:
288  return WL_OUTPUT_TRANSFORM_FLIPPED_270;
289  }
290  abort();
291 }
292 
293 int32_t OutputDeviceInterface::Private::toSubPixel() const
294 {
295  switch (subPixel) {
296  case SubPixel::Unknown:
297  return WL_OUTPUT_SUBPIXEL_UNKNOWN;
298  case SubPixel::None:
299  return WL_OUTPUT_SUBPIXEL_NONE;
300  case SubPixel::HorizontalRGB:
301  return WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB;
302  case SubPixel::HorizontalBGR:
303  return WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR;
304  case SubPixel::VerticalRGB:
305  return WL_OUTPUT_SUBPIXEL_VERTICAL_RGB;
306  case SubPixel::VerticalBGR:
307  return WL_OUTPUT_SUBPIXEL_VERTICAL_BGR;
308  }
309  abort();
310 }
311 
312 void OutputDeviceInterface::Private::bind(wl_client *client, uint32_t version, uint32_t id)
313 {
314  auto c = display->getConnection(client);
315  wl_resource *resource = c->createResource(&org_kde_kwin_outputdevice_interface, qMin(version, s_version), id);
316  if (!resource) {
317  wl_client_post_no_memory(client);
318  return;
319  }
320  wl_resource_set_user_data(resource, this);
321  wl_resource_set_destructor(resource, unbind);
322  ResourceData r;
323  r.resource = resource;
324  r.version = version;
325  resources << r;
326 
327  sendGeometry(resource);
328  sendScale(r);
329  sendColorCurves(r);
330  sendEisaId(r);
331  sendSerialNumber(r);
332 
333  auto currentModeIt = modes.constEnd();
334  for (auto it = modes.constBegin(); it != modes.constEnd(); ++it) {
335  const Mode &mode = *it;
336  if (mode.flags.testFlag(ModeFlag::Current)) {
337  // needs to be sent as last mode
338  currentModeIt = it;
339  continue;
340  }
341  sendMode(resource, mode);
342  }
343 
344  if (currentModeIt != modes.constEnd()) {
345  sendMode(resource, *currentModeIt);
346  }
347 
348  sendUuid(r);
349  sendEdid(r);
350  sendEnabled(r);
351 
352  sendDone(r);
353  c->flush();
354 }
355 
356 void OutputDeviceInterface::Private::unbind(wl_resource *resource)
357 {
358  Private *o = cast(resource);
359  if (!o) {
360  return;
361  }
362  auto it = std::find_if(o->resources.begin(), o->resources.end(), [resource](const ResourceData &r) {
363  return r.resource == resource;
364  });
365  if (it != o->resources.end()) {
366  o->resources.erase(it);
367  }
368 }
369 
370 void OutputDeviceInterface::Private::sendMode(wl_resource *resource, const Mode &mode)
371 {
372  int32_t flags = 0;
373  if (mode.flags.testFlag(ModeFlag::Current)) {
374  flags |= WL_OUTPUT_MODE_CURRENT;
375  }
376  if (mode.flags.testFlag(ModeFlag::Preferred)) {
377  flags |= WL_OUTPUT_MODE_PREFERRED;
378  }
379  org_kde_kwin_outputdevice_send_mode(resource, flags, mode.size.width(), mode.size.height(), mode.refreshRate, mode.id);
380 }
381 
382 void OutputDeviceInterface::Private::sendGeometry(wl_resource *resource)
383 {
384  org_kde_kwin_outputdevice_send_geometry(resource,
385  globalPosition.x(),
386  globalPosition.y(),
387  physicalSize.width(),
388  physicalSize.height(),
389  toSubPixel(),
390  qPrintable(manufacturer),
391  qPrintable(model),
392  toTransform());
393 }
394 
395 void OutputDeviceInterface::Private::sendScale(const ResourceData &data)
396 {
397  if (wl_resource_get_version(data.resource) < ORG_KDE_KWIN_OUTPUTDEVICE_SCALEF_SINCE_VERSION) {
398  org_kde_kwin_outputdevice_send_scale(data.resource, qRound(scale));
399  } else {
400  org_kde_kwin_outputdevice_send_scalef(data.resource, wl_fixed_from_double(scale));
401  }
402 }
403 
404 void OutputDeviceInterface::Private::sendColorCurves(const ResourceData &data)
405 {
406  if (data.version < ORG_KDE_KWIN_OUTPUTDEVICE_COLORCURVES_SINCE_VERSION) {
407  return;
408  }
409 
410  wl_array wlRed;
411  wl_array wlGreen;
412  wl_array wlBlue;
413 
414  auto fillArray = [](const QVector<quint16> &origin, wl_array *dest) {
415  wl_array_init(dest);
416  const size_t memLength = sizeof(uint16_t) * origin.size();
417  void *s = wl_array_add(dest, memLength);
418  memcpy(s, origin.data(), memLength);
419  };
420  fillArray(colorCurves.red, &wlRed);
421  fillArray(colorCurves.green, &wlGreen);
422  fillArray(colorCurves.blue, &wlBlue);
423 
424  org_kde_kwin_outputdevice_send_colorcurves(data.resource, &wlRed, &wlGreen, &wlBlue);
425 
426  wl_array_release(&wlRed);
427  wl_array_release(&wlGreen);
428  wl_array_release(&wlBlue);
429 }
430 
431 void KWayland::Server::OutputDeviceInterface::Private::sendSerialNumber(const ResourceData &data)
432 {
433  if (wl_resource_get_version(data.resource) >= ORG_KDE_KWIN_OUTPUTDEVICE_SERIAL_NUMBER_SINCE_VERSION) {
434  org_kde_kwin_outputdevice_send_serial_number(data.resource, qPrintable(serialNumber));
435  }
436 }
437 
438 void KWayland::Server::OutputDeviceInterface::Private::sendEisaId(const ResourceData &data)
439 {
440  if (wl_resource_get_version(data.resource) >= ORG_KDE_KWIN_OUTPUTDEVICE_EISA_ID_SINCE_VERSION) {
441  org_kde_kwin_outputdevice_send_eisa_id(data.resource, qPrintable(eisaId));
442  }
443 }
444 
445 void OutputDeviceInterface::Private::sendDone(const ResourceData &data)
446 {
447  org_kde_kwin_outputdevice_send_done(data.resource);
448 }
449 
450 void OutputDeviceInterface::Private::updateGeometry()
451 {
452  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
453  sendGeometry((*it).resource);
454  sendDone(*it);
455  }
456 }
457 
458 void OutputDeviceInterface::Private::updateScale()
459 {
460  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
461  sendScale(*it);
462  sendDone(*it);
463  }
464 }
465 
466 void OutputDeviceInterface::Private::updateColorCurves()
467 {
468  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
469  sendColorCurves(*it);
470  sendDone(*it);
471  }
472 }
473 
474 bool OutputDeviceInterface::ColorCurves::operator==(const ColorCurves &cc) const
475 {
476  return red == cc.red && green == cc.green && blue == cc.blue;
477 }
478 bool OutputDeviceInterface::ColorCurves::operator!=(const ColorCurves &cc) const
479 {
480  return !operator==(cc);
481 }
482 
483 // clang-format off
484 #define SETTER(setterName, type, argumentName) \
485  void OutputDeviceInterface::setterName(type arg) \
486  { \
487  Q_D(); \
488  if (d->argumentName == arg) { \
489  return; \
490  } \
491  d->argumentName = arg; \
492  Q_EMIT argumentName##Changed(d->argumentName); \
493  }
494 // clang-format on
495 
496 SETTER(setPhysicalSize, const QSize &, physicalSize)
497 SETTER(setGlobalPosition, const QPoint &, globalPosition)
498 SETTER(setManufacturer, const QString &, manufacturer)
499 SETTER(setModel, const QString &, model)
500 SETTER(setSerialNumber, const QString &, serialNumber)
501 SETTER(setEisaId, const QString &, eisaId)
502 SETTER(setSubPixel, SubPixel, subPixel)
503 SETTER(setTransform, Transform, transform)
504 
505 #undef SETTER
506 
507 void OutputDeviceInterface::setScale(int scale)
508 {
509  Q_D();
510  if (d->scale == scale) {
511  return;
512  }
513  d->scale = scale;
514  Q_EMIT scaleChanged(d->scale);
515  Q_EMIT scaleFChanged(d->scale);
516 }
517 
518 void OutputDeviceInterface::setScaleF(qreal scale)
519 {
520  Q_D();
521  if (qFuzzyCompare(d->scale, scale)) {
522  return;
523  }
524  d->scale = scale;
525  Q_EMIT scaleChanged(qRound(d->scale));
526  Q_EMIT scaleFChanged(d->scale);
527 }
528 
529 QSize OutputDeviceInterface::physicalSize() const
530 {
531  Q_D();
532  return d->physicalSize;
533 }
534 
535 QPoint OutputDeviceInterface::globalPosition() const
536 {
537  Q_D();
538  return d->globalPosition;
539 }
540 
541 QString OutputDeviceInterface::manufacturer() const
542 {
543  Q_D();
544  return d->manufacturer;
545 }
546 
547 QString OutputDeviceInterface::model() const
548 {
549  Q_D();
550  return d->model;
551 }
552 
553 QString OutputDeviceInterface::serialNumber() const
554 {
555  Q_D();
556  return d->serialNumber;
557 }
558 
559 QString OutputDeviceInterface::eisaId() const
560 {
561  Q_D();
562  return d->eisaId;
563 }
564 
565 int OutputDeviceInterface::scale() const
566 {
567  Q_D();
568  return qRound(d->scale);
569 }
570 
571 qreal OutputDeviceInterface::scaleF() const
572 {
573  Q_D();
574  return d->scale;
575 }
576 
577 OutputDeviceInterface::SubPixel OutputDeviceInterface::subPixel() const
578 {
579  Q_D();
580  return d->subPixel;
581 }
582 
583 OutputDeviceInterface::Transform OutputDeviceInterface::transform() const
584 {
585  Q_D();
586  return d->transform;
587 }
588 
589 OutputDeviceInterface::ColorCurves OutputDeviceInterface::colorCurves() const
590 {
591  Q_D();
592  return d->colorCurves;
593 }
594 
595 QList<OutputDeviceInterface::Mode> OutputDeviceInterface::modes() const
596 {
597  Q_D();
598  return d->modes;
599 }
600 
601 int OutputDeviceInterface::currentModeId() const
602 {
603  Q_D();
604  for (const Mode &m : d->modes) {
605  if (m.flags.testFlag(OutputDeviceInterface::ModeFlag::Current)) {
606  return m.id;
607  }
608  }
609  return -1;
610 }
611 
612 OutputDeviceInterface::Private *OutputDeviceInterface::d_func() const
613 {
614  return reinterpret_cast<Private *>(d.data());
615 }
616 
617 void OutputDeviceInterface::setColorCurves(const ColorCurves &colorCurves)
618 {
619  Q_D();
620 
621  if (d->colorCurves == colorCurves) {
622  return;
623  }
624  d->colorCurves = colorCurves;
625  Q_EMIT colorCurvesChanged(d->colorCurves);
626 }
627 
628 void OutputDeviceInterface::setEdid(const QByteArray &edid)
629 {
630  Q_D();
631  d->edid = edid;
632  d->updateEdid();
633  Q_EMIT edidChanged();
634 }
635 
636 QByteArray OutputDeviceInterface::edid() const
637 {
638  Q_D();
639  return d->edid;
640 }
641 
642 void OutputDeviceInterface::setEnabled(OutputDeviceInterface::Enablement enabled)
643 {
644  Q_D();
645  if (d->enabled != enabled) {
646  d->enabled = enabled;
647  d->updateEnabled();
648  Q_EMIT enabledChanged();
649  }
650 }
651 
652 OutputDeviceInterface::Enablement OutputDeviceInterface::enabled() const
653 {
654  Q_D();
655  return d->enabled;
656 }
657 
658 void OutputDeviceInterface::setUuid(const QByteArray &uuid)
659 {
660  Q_D();
661  if (d->uuid != uuid) {
662  d->uuid = uuid;
663  d->updateUuid();
664  Q_EMIT uuidChanged();
665  }
666 }
667 
668 QByteArray OutputDeviceInterface::uuid() const
669 {
670  Q_D();
671  return d->uuid;
672 }
673 
674 void KWayland::Server::OutputDeviceInterface::Private::sendEdid(const ResourceData &data)
675 {
676  org_kde_kwin_outputdevice_send_edid(data.resource, edid.toBase64().constData());
677 }
678 
679 void KWayland::Server::OutputDeviceInterface::Private::sendEnabled(const ResourceData &data)
680 {
681  int _enabled = 0;
682  if (enabled == OutputDeviceInterface::Enablement::Enabled) {
683  _enabled = 1;
684  }
685  org_kde_kwin_outputdevice_send_enabled(data.resource, _enabled);
686 }
687 
688 void OutputDeviceInterface::Private::sendUuid(const ResourceData &data)
689 {
690  org_kde_kwin_outputdevice_send_uuid(data.resource, uuid.constData());
691 }
692 
693 void KWayland::Server::OutputDeviceInterface::Private::updateEnabled()
694 {
695  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
696  sendEnabled(*it);
697  }
698 }
699 
700 void KWayland::Server::OutputDeviceInterface::Private::updateEdid()
701 {
702  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
703  sendEdid(*it);
704  }
705 }
706 
707 void KWayland::Server::OutputDeviceInterface::Private::updateUuid()
708 {
709  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
710  sendUuid(*it);
711  }
712 }
713 
714 void KWayland::Server::OutputDeviceInterface::Private::updateEisaId()
715 {
716  for (auto it = resources.constBegin(); it != resources.constEnd(); ++it) {
717  sendEisaId(*it);
718  }
719 }
720 
721 }
722 }
KDOCTOOLS_EXPORT QString transform(const QString &file, const QString &stylesheet, const QVector< const char * > &params=QVector< const char * >())
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
QByteArray toBase64(QByteArray::Base64Options options) const const
T * data()
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
const char * constData() const const
unsigned int version()
Q_SCRIPTABLE Q_NOREPLY void abort()
int size() const const
Q_D(Todo)
virtual QVariant get(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Jan 30 2023 03:56:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.