KSysGuard::FaceLoader

Search for usage in LXR

KSysGuard::FaceLoader Class Reference

#include <FaceLoader.h>

Inheritance diagram for KSysGuard::FaceLoader:

Properties

QVariantMap colors
 
KSysGuard::SensorFaceControllercontroller
 
QString faceId
 
QString groupName
 
QVariantMap labels
 
QML_ELEMENTKSysGuard::SensorFaceController * parentController
 
bool readOnly
 
QJsonArray sensors
 
int updateRateLimit
 
- Properties inherited from QObject
 objectName
 

Public Member Functions

 FaceLoader (QObject *parent=nullptr)
 
void classBegin () override
 
QVariantMap colors () const
 
Q_SIGNAL void colorsChanged ()
 
void componentComplete () override
 
SensorFaceControllercontroller () const
 
Q_SIGNAL void controllerChanged ()
 
QString faceId () const
 
Q_SIGNAL void faceIdChanged ()
 
QString groupName () const
 
Q_SIGNAL void groupNameChanged ()
 
QVariantMap labels () const
 
Q_SIGNAL void labelsChanged ()
 
SensorFaceControllerparentController () const
 
Q_SIGNAL void parentControllerChanged ()
 
bool readOnly () const
 
Q_SIGNAL void readOnlyChanged ()
 
Q_INVOKABLE void reload ()
 
QJsonArray sensors () const
 
Q_SIGNAL void sensorsChanged ()
 
void setColors (const QVariantMap &newColors)
 
void setFaceId (const QString &newFaceId)
 
void setGroupName (const QString &newGroupName)
 
void setLabels (const QVariantMap &newLabels)
 
void setParentController (SensorFaceController *newParentController)
 
void setReadOnly (bool newReadOnly)
 
void setSensors (const QJsonArray &newSensors)
 
void setUpdateRateLimit (int limit)
 
int updateRateLimit () const
 
Q_SIGNAL void updateRateLimitChanged ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
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 () const const
 
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 QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
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_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 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
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Public Member Functions inherited from QQmlParserStatus

Additional Inherited Members

- Public Types inherited from QObject
typedef  QObjectList
 
- 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 *context, Functor functor, 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)
 
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, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- 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

A helper class to make it easier to load faces when used inside a face.

This is primarily intended to support use cases where there is a sensor face that wants to load a different face as a child, for example the Grid face uses this to creates individual faces for each grid cell.

This will create a new SensorFaceController that makes use of the parentController's config group for reading settings. The child group name is set by the groupName property. By default, the new controller is read only and does not write to the config group.

Definition at line 31 of file FaceLoader.h.

Property Documentation

◆ colors

QVariantMap KSysGuard::FaceLoader::colors
readwrite

A map of sensor colors to be used by the face.

This forwards to the internal SensorFaceController.

Definition at line 61 of file FaceLoader.h.

◆ controller

KSysGuard::SensorFaceController * KSysGuard::FaceLoader::controller
read

The face controller that provides the loaded face.

Definition at line 88 of file FaceLoader.h.

◆ faceId

QString KSysGuard::FaceLoader::faceId
readwrite

The face to use.

This sets the faceId of the internal SensorFaceController.

Definition at line 55 of file FaceLoader.h.

◆ groupName

QString KSysGuard::FaceLoader::groupName
readwrite

The name of the config group to read configuration from.

Definition at line 43 of file FaceLoader.h.

◆ labels

QVariantMap KSysGuard::FaceLoader::labels
readwrite

A map of sensor labels to be used by the face.

This forwards to the internal SensorFaceController.

Definition at line 67 of file FaceLoader.h.

◆ parentController

QML_ELEMENTKSysGuard::SensorFaceController * KSysGuard::FaceLoader::parentController
readwrite

The parent SensorFaceController that will be used for configuration storage.

Definition at line 39 of file FaceLoader.h.

◆ readOnly

bool KSysGuard::FaceLoader::readOnly
readwrite

Whether to allow modifying the face configuration.

If false (the default), any changes to configuration will be ignored. If true, changes will be written and stored in the config group.

Note
If multiple FaceLoaders share the same configuration, the face will need to be recreated after configuration has changed, as there is currently no way to properly reload the configuration.

Definition at line 84 of file FaceLoader.h.

◆ sensors

QJsonArray KSysGuard::FaceLoader::sensors
readwrite

The sensors to use for this face.

This will set highPrioritySensorIds on the internal SensorFaceController.

Definition at line 49 of file FaceLoader.h.

◆ updateRateLimit

int KSysGuard::FaceLoader::updateRateLimit
readwrite

The minimum time that needs to elapse, in milliseconds, between updates of the face.

This forward to the internal SensorFaceController.

Definition at line 73 of file FaceLoader.h.

Constructor & Destructor Documentation

◆ FaceLoader()

FaceLoader::FaceLoader ( QObject * parent = nullptr)

Definition at line 39 of file FaceLoader.cpp.

Member Function Documentation

◆ classBegin()

void FaceLoader::classBegin ( )
overridevirtual

Implements QQmlParserStatus.

Definition at line 221 of file FaceLoader.cpp.

◆ colors()

QVariantMap FaceLoader::colors ( ) const

Definition at line 130 of file FaceLoader.cpp.

◆ componentComplete()

void FaceLoader::componentComplete ( )
overridevirtual

Implements QQmlParserStatus.

Definition at line 225 of file FaceLoader.cpp.

◆ controller()

SensorFaceController * FaceLoader::controller ( ) const

Definition at line 211 of file FaceLoader.cpp.

◆ faceId()

QString FaceLoader::faceId ( ) const

Definition at line 73 of file FaceLoader.cpp.

◆ groupName()

QString FaceLoader::groupName ( ) const

Definition at line 92 of file FaceLoader.cpp.

◆ labels()

QVariantMap FaceLoader::labels ( ) const

Definition at line 151 of file FaceLoader.cpp.

◆ parentController()

SensorFaceController * FaceLoader::parentController ( ) const

Definition at line 47 of file FaceLoader.cpp.

◆ readOnly()

bool FaceLoader::readOnly ( ) const

Definition at line 193 of file FaceLoader.cpp.

◆ reload()

void FaceLoader::reload ( )

Definition at line 216 of file FaceLoader.cpp.

◆ sensors()

QJsonArray FaceLoader::sensors ( ) const

Definition at line 110 of file FaceLoader.cpp.

◆ setColors()

void FaceLoader::setColors ( const QVariantMap & newColors)

Definition at line 135 of file FaceLoader.cpp.

◆ setFaceId()

void FaceLoader::setFaceId ( const QString & newFaceId)

Definition at line 78 of file FaceLoader.cpp.

◆ setGroupName()

void FaceLoader::setGroupName ( const QString & newGroupName)

Definition at line 97 of file FaceLoader.cpp.

◆ setLabels()

void FaceLoader::setLabels ( const QVariantMap & newLabels)

Definition at line 156 of file FaceLoader.cpp.

◆ setParentController()

void FaceLoader::setParentController ( SensorFaceController * newParentController)

Definition at line 52 of file FaceLoader.cpp.

◆ setReadOnly()

void FaceLoader::setReadOnly ( bool newReadOnly)

Definition at line 198 of file FaceLoader.cpp.

◆ setSensors()

void FaceLoader::setSensors ( const QJsonArray & newSensors)

Definition at line 115 of file FaceLoader.cpp.

◆ setUpdateRateLimit()

void FaceLoader::setUpdateRateLimit ( int limit)

Definition at line 177 of file FaceLoader.cpp.

◆ updateRateLimit()

int FaceLoader::updateRateLimit ( ) const

Definition at line 172 of file FaceLoader.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.