Plasma5Support

hddtemp.h
1/*
2 SPDX-FileCopyrightText: 2007 Petri Damsten <damu@iki.fi>
3 SPDX-FileCopyrightText: 2007 Christopher Blauvelt <cblauvelt@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#pragma once
9
10#include <QMap>
11#include <QObject>
12#include <QString>
13#include <QStringList>
14#include <QTimer>
15#include <QVariant>
16
17class HddTemp : public QObject
18{
20
21public:
22 enum DataType {
23 Temperature = 0,
24 Unit,
25 };
26
27 explicit HddTemp(QObject *parent = nullptr);
28 ~HddTemp() override;
29 QStringList sources();
30 QVariant data(const QString source, const DataType type) const;
31
32protected:
33 void timerEvent(QTimerEvent *event) override;
34
35private:
36 int m_failCount = 0;
37 bool m_cacheValid = false;
39 bool updateData();
40};
Q_OBJECTQ_OBJECT
virtual bool event(QEvent *e)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.