| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2022 Milan Cermak <[email protected]> |
| 3 | |
| 4 | #include "../sensorgraphitem.h" |
| 5 | #include "core/qmlcomponentregistry.h" |
| 6 | #include "cpuusage.h" |
| 7 | #include <QtGlobal> |
| 8 | #include <units.h> |
| 9 | |
| 10 | namespace CPUUsage { |
| 11 | |
| 12 | bool const registered_ = QMLComponentRegistry::addQuickItemProvider( |
| 13 | CPUUsage::ItemID, []() { |
| 14 | return new SensorGraphItem<units::dimensionless::scalar_t, unsigned int>( |
| 15 | CPUUsage::ItemID, "%"); |
| 16 | }); |
| 17 | |
| 18 | char const *const trStrings[] = { |
| 19 | QT_TRANSLATE_NOOP("SensorGraph", "CPU_USAGE"), |
| 20 | }; |
| 21 | |
| 22 | } // namespace CPUUsage |