Libksysguard
SensorFaceController.h
31 * The SensorFaceController links sensor faces and applications in which these faces are shown. It
65 Q_PROPERTY(QJsonArray totalSensors READ totalSensors WRITE setTotalSensors NOTIFY totalSensorsChanged)
70 Q_PROPERTY(QJsonArray highPrioritySensorIds READ highPrioritySensorIds WRITE setHighPrioritySensorIds NOTIFY highPrioritySensorIdsChanged)
75 Q_PROPERTY(QVariantMap sensorColors READ sensorColors WRITE setSensorColors NOTIFY sensorColorsChanged)
78 * Maps sensorIds to user configurable labels than should be displayed instead of the name of the sensor.
80 Q_PROPERTY(QVariantMap sensorLabels READ sensorLabels WRITE setSensorLabels NOTIFY sensorLabelsChanged)
86 Q_PROPERTY(QJsonArray lowPrioritySensorIds READ lowPrioritySensorIds WRITE setLowPrioritySensorIds NOTIFY lowPrioritySensorIdsChanged)
107 Q_PROPERTY(bool supportsLowPrioritySensors READ supportsLowPrioritySensors NOTIFY faceIdChanged)
117 Q_PROPERTY(KConfigPropertyMap *faceConfiguration READ faceConfiguration NOTIFY faceConfigurationChanged)
125 * The compact representation of the current face. Typically only includes the main visualization
131 * Emits `configurationChanged` if a config value changed. To apply the changes call `saveConfig`
139 * Emits `configurationChanged` if a config value changed. To apply the changes call `saveConfig`
145 * Emits `configurationChanged` if a config value changed. To apply the changes call `saveConfig`
151 * A list of all available faces. The name is available as the display role and the id as `pluginId`
155 * A list of available face presets. The name is available as the display role, the id as `pluginId`.
162 Q_PROPERTY(int updateRateLimit READ updateRateLimit WRITE setUpdateRateLimit NOTIFY updateRateLimitChanged)
int updateRateLimit
The minimum time that needs to elapse, in milliseconds, between updates of the face.
Definition SensorFaceController.h:162
KConfigPropertyMap * faceConfiguration
A map of config options and values that are specific to the current face as defined by the main....
Definition SensorFaceController.h:117
QAbstractItemModel * availablePresetsModel
A list of available face presets.
Definition SensorFaceController.h:158
QVariantMap sensorLabels
Maps sensorIds to user configurable labels than should be displayed instead of the name of the sensor...
Definition SensorFaceController.h:80
QJsonArray totalSensors
Sensors that are typically used to display a total in some way or form.
Definition SensorFaceController.h:65
Q_INVOKABLE void replaceSensors(const QString &from, const QString &to)
Replace one sensor with another.
Definition SensorFaceController.cpp:1096
bool shouldSync() const
Whether the controller should sync configuration changes.
Definition SensorFaceController.cpp:1054
QJsonArray missingSensors
Contains the paths of missing sensors, if there are any.
Definition SensorFaceController.h:166
QJsonArray highPrioritySensorIds
Sensors that should always be shown in the face.
Definition SensorFaceController.h:70
QQuickItem * sensorsConfigUi
A user interface for configuring which sensors are displayed in a face Emits configurationChanged if ...
Definition SensorFaceController.h:148
Q_INVOKABLE void loadPreset(const QString &preset)
Loads a specific preset.
Definition SensorFaceController.cpp:885
void setShouldSync(bool sync)
Specifies if the controller should automatically sync configuration changes.
Definition SensorFaceController.cpp:1059
QQuickItem * faceConfigUi
A user interface that is suited for configuring the face specific options.
Definition SensorFaceController.h:135
Q_INVOKABLE void savePreset()
Save the current configuration as a preset.
Definition SensorFaceController.cpp:942
KConfigGroup configGroup() const
Retrieve the KConfigGroup this controller is using to store configuration.
Definition SensorFaceController.cpp:438
QQuickItem * appearanceConfigUi
A user interface for configuring the general appearance of a face like the title and the used face.
Definition SensorFaceController.h:142
SensorFaceController(KConfigGroup &config, QQmlEngine *engine, QQmlEngine *configEngine)
Creates a new SensorFaceController.
Definition SensorFaceController.cpp:372
QQuickItem * compactRepresentation
The compact representation of the current face.
Definition SensorFaceController.h:128
int maxTotalSensors
The amount of total sensors the current face supports.
Definition SensorFaceController.h:111
bool showTitle
Whether the title should be displayed or if it should be hidden instead.
Definition SensorFaceController.h:56
bool supportsLowPrioritySensors
Whether the current face can display low priority sensors.
Definition SensorFaceController.h:107
bool supportsTotalSensors
Whether the current face can display total sensors.
Definition SensorFaceController.h:103
Q_INVOKABLE void uninstallPreset(const QString &pluginId)
Uninstall a specific preset.
Definition SensorFaceController.cpp:1037
QAbstractItemModel * availableFacesModel
A list of all available faces.
Definition SensorFaceController.h:153
QQuickItem * fullRepresentation
The full representation of the current face.
Definition SensorFaceController.h:123
bool supportsSensorsColors
Whether the current face supports sensor colors.
Definition SensorFaceController.h:99
Q_INVOKABLE void reloadFaceConfiguration()
Reload only the face configuration.
Definition SensorFaceController.cpp:1067
QVariantMap sensorColors
Maps sensorIds to colors that can be used when a color for something relating to a specific sensor is...
Definition SensorFaceController.h:75
QObject(QObject *parent)
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 11:59:47 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 11:59:47 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.