add more spacing
[personal-kdebase.git] / workspace / plasma / applets / system-monitor / temperature.h
blob9930d87041c729dddb1849443481de9eb4dc7cd1
1 /*
2 * Copyright (C) 2007 Petri Damsten <damu@iki.fi>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License version 2 as
6 * published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details
13 * You should have received a copy of the GNU Library General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef TEMPERATURE_HEADER
20 #define TEMPERATURE_HEADER
22 #include <applet.h>
23 #include "ui_temperature-config.h"
24 #include <Plasma/DataEngine>
25 #include <QStandardItemModel>
27 namespace Plasma {
28 class Meter;
30 class Header;
31 class QGraphicsLinearLayout;
33 class Temperature : public SM::Applet
35 Q_OBJECT
36 public:
37 Temperature(QObject *parent, const QVariantList &args);
38 ~Temperature();
40 virtual void init();
42 public slots:
43 void initLater(const QString &name);
44 void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data);
45 void createConfigurationInterface(KConfigDialog *parent);
47 private slots:
48 void configAccepted();
49 void parseSources();
50 void themeChanged();
52 private:
53 bool m_showPlotters;
54 Ui::config ui;
55 QStandardItemModel m_tempModel;
57 QString title(const QString& source);
58 bool addMeter(const QString& source);
59 bool isValidDevice(const QString& uuid, Plasma::DataEngine::Data* data);
62 K_EXPORT_PLASMA_APPLET(sm_temperature, Temperature)
64 #endif