KSysGuard::FaceLoader
#include <FaceLoader.h>
Properties | |
QVariantMap | colors |
KSysGuard::SensorFaceController * | controller |
QString | faceId |
QString | groupName |
QVariantMap | labels |
QML_ELEMENTKSysGuard::SensorFaceController * | parentController |
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 |
SensorFaceController * | controller () 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 () |
SensorFaceController * | parentController () 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< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | 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 QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () 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 | |
T | qobject_cast (const QObject *object) |
T | 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) |
QThread * | thread () 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 |
QObject * | sender () 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
|
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
|
read |
The face controller that provides the loaded face.
Definition at line 82 of file FaceLoader.h.
◆ faceId
|
readwrite |
The face to use.
This sets the faceId of the internal SensorFaceController.
Definition at line 55 of file FaceLoader.h.
◆ groupName
|
readwrite |
The name of the config group to read configuration from.
Definition at line 43 of file FaceLoader.h.
◆ 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
|
readwrite |
The parent SensorFaceController that will be used for configuration storage.
Definition at line 39 of file FaceLoader.h.
◆ 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 78 of file FaceLoader.h.
◆ 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.
Constructor & Destructor Documentation
◆ FaceLoader()
FaceLoader::FaceLoader | ( | QObject * | parent = nullptr | ) |
Definition at line 38 of file FaceLoader.cpp.
Member Function Documentation
◆ classBegin()
|
overridevirtual |
Implements QQmlParserStatus.
Definition at line 193 of file FaceLoader.cpp.
◆ colors()
QVariantMap FaceLoader::colors | ( | ) | const |
Definition at line 129 of file FaceLoader.cpp.
◆ componentComplete()
|
overridevirtual |
Implements QQmlParserStatus.
Definition at line 197 of file FaceLoader.cpp.
◆ controller()
SensorFaceController * FaceLoader::controller | ( | ) | const |
Definition at line 183 of file FaceLoader.cpp.
◆ faceId()
QString FaceLoader::faceId | ( | ) | const |
Definition at line 72 of file FaceLoader.cpp.
◆ groupName()
QString FaceLoader::groupName | ( | ) | const |
Definition at line 91 of file FaceLoader.cpp.
◆ labels()
QVariantMap FaceLoader::labels | ( | ) | const |
Definition at line 147 of file FaceLoader.cpp.
◆ parentController()
SensorFaceController * FaceLoader::parentController | ( | ) | const |
Definition at line 46 of file FaceLoader.cpp.
◆ readOnly()
bool FaceLoader::readOnly | ( | ) | const |
Definition at line 165 of file FaceLoader.cpp.
◆ reload()
void FaceLoader::reload | ( | ) |
Definition at line 188 of file FaceLoader.cpp.
◆ sensors()
QJsonArray FaceLoader::sensors | ( | ) | const |
Definition at line 109 of file FaceLoader.cpp.
◆ setColors()
void FaceLoader::setColors | ( | const QVariantMap & | newColors | ) |
Definition at line 134 of file FaceLoader.cpp.
◆ setFaceId()
void FaceLoader::setFaceId | ( | const QString & | newFaceId | ) |
Definition at line 77 of file FaceLoader.cpp.
◆ setGroupName()
void FaceLoader::setGroupName | ( | const QString & | newGroupName | ) |
Definition at line 96 of file FaceLoader.cpp.
◆ setLabels()
void FaceLoader::setLabels | ( | const QVariantMap & | newLabels | ) |
Definition at line 152 of file FaceLoader.cpp.
◆ setParentController()
void FaceLoader::setParentController | ( | SensorFaceController * | newParentController | ) |
Definition at line 51 of file FaceLoader.cpp.
◆ setReadOnly()
void FaceLoader::setReadOnly | ( | bool | newReadOnly | ) |
Definition at line 170 of file FaceLoader.cpp.
◆ setSensors()
void FaceLoader::setSensors | ( | const QJsonArray & | newSensors | ) |
Definition at line 114 of file FaceLoader.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:17:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.