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
 
KSysGuard::SensorFaceControllerparentController
 
bool readOnly
 
QJsonArray sensors
 
- 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)
 
- 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
 

Additional Inherited Members

- 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)
 
- 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

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 60 of file FaceLoader.h.

◆ controller

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

The face controller that provides the loaded face.

Definition at line 81 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 54 of file FaceLoader.h.

◆ groupName

QString KSysGuard::FaceLoader::groupName
readwrite

The name of the config group to read configuration from.

Definition at line 42 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 66 of file FaceLoader.h.

◆ parentController

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

The parent SensorFaceController that will be used for configuration storage.

Definition at line 38 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 77 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 48 of file FaceLoader.h.

Constructor & Destructor Documentation

◆ FaceLoader()

FaceLoader::FaceLoader ( QObject * parent = nullptr)

Definition at line 37 of file FaceLoader.cpp.

Member Function Documentation

◆ classBegin()

void FaceLoader::classBegin ( )
overridevirtual

Implements QQmlParserStatus.

Definition at line 192 of file FaceLoader.cpp.

◆ colors()

QVariantMap FaceLoader::colors ( ) const

Definition at line 128 of file FaceLoader.cpp.

◆ componentComplete()

void FaceLoader::componentComplete ( )
overridevirtual

Implements QQmlParserStatus.

Definition at line 196 of file FaceLoader.cpp.

◆ controller()

SensorFaceController * FaceLoader::controller ( ) const

Definition at line 182 of file FaceLoader.cpp.

◆ faceId()

QString FaceLoader::faceId ( ) const

Definition at line 71 of file FaceLoader.cpp.

◆ groupName()

QString FaceLoader::groupName ( ) const

Definition at line 90 of file FaceLoader.cpp.

◆ labels()

QVariantMap FaceLoader::labels ( ) const

Definition at line 146 of file FaceLoader.cpp.

◆ parentController()

SensorFaceController * FaceLoader::parentController ( ) const

Definition at line 45 of file FaceLoader.cpp.

◆ readOnly()

bool FaceLoader::readOnly ( ) const

Definition at line 164 of file FaceLoader.cpp.

◆ reload()

void FaceLoader::reload ( )

Definition at line 187 of file FaceLoader.cpp.

◆ sensors()

QJsonArray FaceLoader::sensors ( ) const

Definition at line 108 of file FaceLoader.cpp.

◆ setColors()

void FaceLoader::setColors ( const QVariantMap & newColors)

Definition at line 133 of file FaceLoader.cpp.

◆ setFaceId()

void FaceLoader::setFaceId ( const QString & newFaceId)

Definition at line 76 of file FaceLoader.cpp.

◆ setGroupName()

void FaceLoader::setGroupName ( const QString & newGroupName)

Definition at line 95 of file FaceLoader.cpp.

◆ setLabels()

void FaceLoader::setLabels ( const QVariantMap & newLabels)

Definition at line 151 of file FaceLoader.cpp.

◆ setParentController()

void FaceLoader::setParentController ( SensorFaceController * newParentController)

Definition at line 50 of file FaceLoader.cpp.

◆ setReadOnly()

void FaceLoader::setReadOnly ( bool newReadOnly)

Definition at line 169 of file FaceLoader.cpp.

◆ setSensors()

void FaceLoader::setSensors ( const QJsonArray & newSensors)

Definition at line 113 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 Tue Mar 26 2024 11:21:23 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.