summaryrefslogtreecommitdiffstats
path: root/kicker-applets/ktimemon/confdlg.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
commit84da08d7b7fcda12c85caeb5a10b4903770a6f69 (patch)
tree2a6aea76f2dfffb4cc04bb907c4725af94f70e72 /kicker-applets/ktimemon/confdlg.h
downloadtdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.tar.gz
tdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.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/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker-applets/ktimemon/confdlg.h')
-rw-r--r--kicker-applets/ktimemon/confdlg.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/kicker-applets/ktimemon/confdlg.h b/kicker-applets/ktimemon/confdlg.h
new file mode 100644
index 0000000..d458bf2
--- /dev/null
+++ b/kicker-applets/ktimemon/confdlg.h
@@ -0,0 +1,99 @@
+/* -*- C++ -*- */
+
+/**********************************************************************/
+/* TimeMon (c) 1994 Helmut Maierhofer */
+/* KDE-ified M. Maierhofer 1998 */
+/* */
+/* Ported to KDE 2.0 and other stuff: */
+/* Copyright (c) Dirk A. Mueller <[email protected]> */
+/* */
+/**********************************************************************/
+
+/*
+ * confdlg.h
+ *
+ * Definitions for the timemon configuration dialog.
+ */
+
+#ifndef CONFDLG_H
+#define CONFDLG_H
+
+#include <qcolor.h>
+#include <qcheckbox.h>
+#include <qtabdialog.h>
+
+#include <kcolorbutton.h>
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <knuminput.h>
+#include <kdialogbase.h>
+#include <kurlrequester.h>
+
+#include "timemon.h"
+
+// -- forward declaration ------------------------------------------------
+
+class KTimeMon;
+class QLineEdit;
+class QSlider;
+class KColorButton;
+
+// -- KConfDialog declaration --------------------------------------------
+
+/*
+ * KConfDialog
+ */
+
+class KConfDialog : public KDialogBase
+{
+
+ Q_OBJECT
+
+public:
+ KConfDialog(KTimeMon *timemon);
+ ~KConfDialog() {}
+
+ void update(); // get values from timemon
+
+ unsigned getInterval() const { return intervalEdit->value(); }
+ QColor getKernelColour() const { return kernelCB->color(); }
+ QColor getUserColour() const { return userCB->color(); }
+ QColor getNiceColour() const { return niceCB->color(); }
+ QColor getIOWaitColour() const { return iowaitCB->color(); }
+ QColor getCachedColour() const { return cachedCB->color(); }
+ QColor getUsedColour() const { return usedCB->color(); }
+ QColor getBuffersColour() const { return buffersCB->color(); }
+ QColor getMKernelColour() const { return mkernelCB->color(); }
+ QColor getSwapColour() const { return swapCB->color(); }
+ QColor getBgColour() const { return bgCB->color(); }
+
+ bool getAutoScale() const { return autoScaleBox->isChecked(); }
+ unsigned getPageScale() const { return pageScaleEdit->value(); }
+ unsigned getSwapScale() const { return swapScaleEdit->value(); }
+ unsigned getCtxScale() const { return ctxScaleEdit->value(); }
+
+ unsigned getMouseAction(int i) const;
+ QString getMouseActionCommand(int i) const { return mouseLE[i]->lineEdit()->text(); }
+
+private slots:
+ void updateSampleWidget(const QColor &); // update colours in configuration
+ void toggle(bool state); // enable/disable scales
+ void mouseCommandEnable();
+
+private:
+
+ KTimeMon *timemon;
+ KIntNumInput *intervalEdit, *swapScaleEdit, *pageScaleEdit, *ctxScaleEdit;
+ QLineEdit *procFileEdit;
+ QCheckBox *autoScaleBox;
+ KColorButton *kernelCB, *userCB, *niceCB, *iowaitCB;
+ KColorButton *buffersCB, *usedCB, *cachedCB, *mkernelCB;
+ KColorButton *swapCB, *bgCB;
+ KURLRequester *mouseLE[MAX_MOUSE_ACTIONS];
+ KComboBox *mouseC[MAX_MOUSE_ACTIONS];
+ bool haveWarned;
+
+ friend class KTimeMon;
+};
+
+#endif // CONFDLG_H