KWayland::Client::OutputDevice

KWayland::Client::OutputDevice Class Reference

#include <outputdevice.h>

Inheritance diagram for KWayland::Client::OutputDevice:

Public Types

enum  Enablement { Disabled = 0, Enabled = 1 }
 
enum  SubPixel {
  Unknown, None, HorizontalRGB, HorizontalBGR,
  VerticalRGB, VerticalBGR
}
 
enum  Transform {
  Normal, Rotated90, Rotated180, Rotated270,
  Flipped, Flipped90, Flipped180, Flipped270
}
 

Signals

void changed ()
 
void colorCurvesChanged ()
 
void done ()
 
void enabledChanged (OutputDevice::Enablement enabled)
 
void modeAdded (const KWayland::Client::OutputDevice::Mode &mode)
 
void modeChanged (const KWayland::Client::OutputDevice::Mode &mode)
 
void removed ()
 
void uuidChanged (const QByteArray &uuid)
 

Public Member Functions

 OutputDevice (QObject *parent=nullptr)
 
ColorCurves colorCurves () const
 
KWayland::Client::OutputDevice::Mode currentMode () const
 
void destroy ()
 
QByteArray edid () const
 
QString eisaId () const
 
OutputDevice::Enablement enabled () const
 
EventQueueeventQueue () const
 
QRect geometry () const
 
QPoint globalPosition () const
 
bool isValid () const
 
QString manufacturer () const
 
QString model () const
 
QList< Mode > modes () const
 
 operator org_kde_kwin_outputdevice * ()
 
 operator org_kde_kwin_outputdevice * () const
 
org_kde_kwin_outputdevice * output ()
 
QSize physicalSize () const
 
QSize pixelSize () const
 
int refreshRate () const
 
int scale () const
 
qreal scaleF () const
 
QString serialNumber () const
 
void setEventQueue (EventQueue *queue)
 
void setup (org_kde_kwin_outputdevice *output)
 
SubPixel subPixel () const
 
Transform transform () const
 
QByteArray uuid () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Wrapper for the org_kde_kwin_outputdevice interface.

This class provides a convenient wrapper for the org_kde_kwin_outputdevice interface. Its main purpose is to hold the information about one OutputDevice.

To use this class one needs to interact with the Registry. There are two possible ways to create an OutputDevice interface:

OutputDevice *c = registry->createOutputDevice(name, version);

This creates the OutputDevice and sets it up directly. As an alternative this can also be done in a more low level way:

OutputDevice *c = new OutputDevice;
c->setup(registry->bindOutputDevice(name, version));

The OutputDevice can be used as a drop-in replacement for any org_kde_kwin_outputdevice pointer as it provides matching cast operators.

Please note that all properties of OutputDevice are not valid until the changed signal has been emitted. The wayland server is pushing the information in an async way to the OutputDevice instance. By emitting changed the OutputDevice indicates that all relevant information is available.

See also
Registry
Since
5.5

Definition at line 58 of file outputdevice.h.

Member Function Documentation

void KWayland::Client::OutputDevice::changed ( )
signal

Emitted whenever at least one of the data changed.

OutputDevice::ColorCurves KWayland::Client::OutputDevice::colorCurves ( ) const

Color curves.

Since
5.50

Definition at line 529 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::colorCurvesChanged ( )
signal

Emitted whenever the color curves changed.

Since
5.TODO
void KWayland::Client::OutputDevice::destroy ( )

Destroys the data hold by this OutputDevice.

This method is supposed to be used when the connection to the Wayland server goes away. If the connection is not valid any more, it's not possible to call release any more as that calls into the Wayland connection and the call would fail.

This method is automatically invoked when the Registry which created this Output gets destroyed.

Definition at line 534 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::done ( )
signal

Emitted when the output is fully initialized.

QByteArray KWayland::Client::OutputDevice::edid ( ) const
Returns
The EDID information for this output.

Definition at line 514 of file outputdevice.cpp.

QString KWayland::Client::OutputDevice::eisaId ( ) const

Textual representation of EISA identifier.

Definition at line 444 of file outputdevice.cpp.

OutputDevice::Enablement KWayland::Client::OutputDevice::enabled ( ) const
Returns
Whether this output is enabled or not.

Definition at line 519 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::enabledChanged ( OutputDevice::Enablement  enabled)
signal

Emitted whenever the enabled property changes.

EventQueue * KWayland::Client::OutputDevice::eventQueue ( ) const
Returns
The event queue to use for bound proxies.

Definition at line 361 of file outputdevice.cpp.

QRect KWayland::Client::OutputDevice::geometry ( ) const

The geometry of this OutputDevice in pixels.

Convenient for QRect(globalPosition(), pixelSize()).

See also
globalPosition
pixelSize

Definition at line 406 of file outputdevice.cpp.

QPoint KWayland::Client::OutputDevice::globalPosition ( ) const

Position within the global compositor space.

Definition at line 424 of file outputdevice.cpp.

bool KWayland::Client::OutputDevice::isValid ( ) const
Returns
true if managing a org_kde_kwin_outputdevice.

Definition at line 486 of file outputdevice.cpp.

QString KWayland::Client::OutputDevice::manufacturer ( ) const

Textual description of the manufacturer.

Definition at line 429 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::modeAdded ( const KWayland::Client::OutputDevice::Mode &  mode)
signal

Emitted whenever a new Mode is added.

This normally only happens during the initial promoting of modes. Afterwards only modeChanged should be emitted.

Parameters
modeThe newly added Mode.
See also
modeChanged
void KWayland::Client::OutputDevice::modeChanged ( const KWayland::Client::OutputDevice::Mode &  mode)
signal

Emitted whenever a Mode changes.

This normally means that the Mode::Flag::Current is added or removed.

Parameters
modeThe changed Mode
QString KWayland::Client::OutputDevice::model ( ) const

Textual description of the model.

Definition at line 434 of file outputdevice.cpp.

QList< OutputDevice::Mode > KWayland::Client::OutputDevice::modes ( ) const
Returns
The Modes of this OutputDevice.

Definition at line 501 of file outputdevice.cpp.

QSize KWayland::Client::OutputDevice::physicalSize ( ) const

Size in millimeters.

Definition at line 454 of file outputdevice.cpp.

QSize KWayland::Client::OutputDevice::pixelSize ( ) const

Size in the current mode.

Definition at line 459 of file outputdevice.cpp.

int KWayland::Client::OutputDevice::refreshRate ( ) const

Refresh rate in mHz of the current mode.

Definition at line 467 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::removed ( )
signal

The corresponding global for this interface on the Registry got removed.

This signal gets only emitted if the OutputDevice got created by Registry::createOutputDevice

Since
5.5
int KWayland::Client::OutputDevice::scale ( ) const

Scaling factor of this output.

A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering. This is used for very high resolution displays where applications rendering at the native resolution would be too small to be legible.

Deprecated:
Since 5.50, use scaleF()

Definition at line 475 of file outputdevice.cpp.

qreal KWayland::Client::OutputDevice::scaleF ( ) const

Scaling factor of this output.

A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering. This is used for very high resolution displays where applications rendering at the native resolution would be too small to be legible.

Since
5.50

Definition at line 480 of file outputdevice.cpp.

QString KWayland::Client::OutputDevice::serialNumber ( ) const

Textual representation of serial number.

Definition at line 439 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::setEventQueue ( EventQueue queue)

Sets the queue to use for bound proxies.

Definition at line 366 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::setup ( org_kde_kwin_outputdevice *  output)

Setup this Compositor to manage the output.

When using Registry::createOutputDevice there is no need to call this method.

Definition at line 356 of file outputdevice.cpp.

OutputDevice::SubPixel KWayland::Client::OutputDevice::subPixel ( ) const

Subpixel orientation of this OutputDevice.

Definition at line 491 of file outputdevice.cpp.

OutputDevice::Transform KWayland::Client::OutputDevice::transform ( ) const

Transform that maps framebuffer to OutputDevice.

The purpose is mainly to allow clients render accordingly and tell the compositor, so that for fullscreen surfaces, the compositor will still be able to scan out directly from client surfaces.

Definition at line 496 of file outputdevice.cpp.

QByteArray KWayland::Client::OutputDevice::uuid ( ) const
Returns
A unique identifier for this outputdevice, determined by the server.

Definition at line 524 of file outputdevice.cpp.

void KWayland::Client::OutputDevice::uuidChanged ( const QByteArray uuid)
signal

Emitted whenever the id property changes.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue May 26 2020 23:07:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.