summaryrefslogtreecommitdiffstats
path: root/ksim/monitors/i8k/ksimi8k.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /ksim/monitors/i8k/ksimi8k.h
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/monitors/i8k/ksimi8k.h')
-rw-r--r--ksim/monitors/i8k/ksimi8k.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/ksim/monitors/i8k/ksimi8k.h b/ksim/monitors/i8k/ksimi8k.h
new file mode 100644
index 0000000..4357508
--- /dev/null
+++ b/ksim/monitors/i8k/ksimi8k.h
@@ -0,0 +1,102 @@
+/* Dell i8K Hardware Monitor Plug-in for KSim
+ *
+ * Copyright (C) 2003 Nadeem Hasan <nhasan@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KSIMI8K_H
+#define KSIMI8K_H
+
+#include <stdio.h>
+
+#include <pluginmodule.h>
+
+class QTimer;
+class QTextIStream;
+class QRegExp;
+class QCheckBox;
+class KIntNumInput;
+
+namespace KSim
+{
+ class Label;
+}
+
+class I8KPlugin : public KSim::PluginObject
+{
+ public:
+ I8KPlugin(const char *name);
+ ~I8KPlugin();
+
+ virtual KSim::PluginView *createView(const char *);
+ virtual KSim::PluginPage *createConfigPage(const char *);
+
+ virtual void showAbout();
+};
+
+class I8KView : public KSim::PluginView
+{
+ Q_OBJECT
+ public:
+ I8KView(KSim::PluginObject *parent, const char *name);
+ ~I8KView();
+
+ virtual void reparseConfig();
+
+ protected:
+
+ void initGUI();
+ void closeStream();
+
+ protected slots:
+
+ void openStream();
+ void updateView();
+
+ private:
+
+ QString m_unit;
+ int m_interval;
+
+ KSim::Label *m_fan1Label, *m_fan2Label, *m_tempLabel;
+ QTimer *m_timer;
+ FILE *m_procFile;
+ QTextIStream *m_procStream;
+ QRegExp *m_reData;
+};
+
+class I8KConfig : public KSim::PluginPage
+{
+ Q_OBJECT
+ public:
+ I8KConfig(KSim::PluginObject *parent, const char *name);
+ ~I8KConfig();
+
+ virtual void saveConfig();
+ virtual void readConfig();
+
+ private slots:
+
+ private:
+
+ QCheckBox *m_unit;
+ KIntNumInput *m_interval;
+};
+
+#endif // KSIMI8K_H
+
+/* vim: et sw=2 ts=2
+*/