summaryrefslogtreecommitdiffstats
path: root/kalzium/src/somwidget_impl.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
commitce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch)
treed3bb9f5d25a2dc09ca81adecf39621d871534297 /kalzium/src/somwidget_impl.h
downloadtdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz
tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.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/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalzium/src/somwidget_impl.h')
-rw-r--r--kalzium/src/somwidget_impl.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/kalzium/src/somwidget_impl.h b/kalzium/src/somwidget_impl.h
new file mode 100644
index 00000000..0c61c355
--- /dev/null
+++ b/kalzium/src/somwidget_impl.h
@@ -0,0 +1,63 @@
+#ifndef SOMWIDGET_IMPL_H
+#define SOMWIDGET_IMPL_H
+/***************************************************************************
+ copyright : (C) 2005 by Carsten Niehaus
+ email : cniehaus@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. *
+ * *
+ ***************************************************************************/
+
+#include "somwidget.h"
+
+class Element;
+
+/**
+ * @class SOMWidgetIMPL
+ * @author Carsten Niehaus
+ * @author Pino Toscano
+ *
+ * The SOMWidgetIMPL provides a QSlider. When this slider is moved,
+ * this widget will display which elements have a boiling or melting
+ * point near the temperature the user entered using the slider.
+ */
+class SOMWidgetIMPL : public SOMWidget
+{
+ Q_OBJECT
+
+ public:
+ /**
+ * @param parent The parent of this widget
+ * @param name The name of this widget
+ */
+ SOMWidgetIMPL( QWidget *parent = 0, const char* name = 0 );
+
+ public slots:
+ /**
+ * Reload the current unit from the preferences
+ */
+ void reloadUnits();
+
+ private:
+ QValueList<Element*> m_list;
+ QString m_htmlBegin;
+ QString m_htmlEnd;
+ int m_prevUnit;
+
+ private slots:
+ void sliderValueChanged( int temp );
+ void spinValueChanged( double temp );
+
+ /**
+ * in this slot the elements will be compared with
+ * the temperature @p newtemp. The content of the HTML
+ * will be generated
+ */
+ void setNewTemp( double newtemp );
+};
+#endif // SOMWIDGET_IMPL_H