summaryrefslogtreecommitdiffstats
path: root/src/kcpuload.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-12-13 18:35:41 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-12-13 18:42:05 +0100
commit0557917aa98c792eb316ce176c97849f3e7bdb3e (patch)
tree4ee596079b11ec246e6355a33563aa41d3e0e364 /src/kcpuload.h
parent63cec2ebf40be205347bd97b53ad2a77dbcdcb38 (diff)
downloadkcpuload-0557917aa98c792eb316ce176c97849f3e7bdb3e.tar.gz
kcpuload-0557917aa98c792eb316ce176c97849f3e7bdb3e.zip
Fix structure of directories
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/kcpuload.h')
-rw-r--r--src/kcpuload.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/kcpuload.h b/src/kcpuload.h
new file mode 100644
index 0000000..892d7db
--- /dev/null
+++ b/src/kcpuload.h
@@ -0,0 +1,72 @@
+
+/***************************************************************************
+ * *
+ * KCPULoad is copyright (c) 1999-2000, Markus Gustavsson *
+ * (c) 2002, Ben Burton *
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef __KCPULOAD_H
+#define __KCPULOAD_H
+
+#include "statpopup.h"
+
+class KCPUProc;
+class TDEToggleAction;
+
+/**
+ * The specific pop-up window used by KCPULoad.
+ */
+class KCPULoad : public StatPopup {
+ Q_OBJECT
+
+
+public:
+ /**
+ * Constructor and destructor.
+ */
+ KCPULoad(TQWidget *parent = 0, const char *name = 0);
+ ~KCPULoad();
+
+public slots:
+ /**
+ * Slots for menu items.
+ */
+ void setSMP(bool);
+
+protected:
+ /**
+ * Overrides from StatPopup.
+ */
+ virtual TQString dockName(int which) const;
+ virtual TQColor defaultDockColor(int which) const;
+ virtual void setupCustomActions();
+ virtual void insertCustomItems(TDEPopupMenu* menu);
+ virtual void takeReadingInternal();
+
+private:
+ /**
+ * Changes the number of readings.
+ */
+ void resizeReadings(int n);
+
+ /**
+ * Reading raw CPU information.
+ */
+ KCPUProc* proc;
+ /**< Used to obtain the raw information. */
+ bool supportSMP;
+ /**< Does this system support SMP at all? */
+
+ /**
+ * Actions.
+ */
+ TDEToggleAction* actSMP;
+};
+
+#endif