Test change - can I push OK?
[kdeedu-porting.git] / kalzium / src / somwidget_impl.h
blobec456c60890a713cabcae987dfe080872ab47aea
1 #ifndef SOMWIDGET_IMPL_H
2 #define SOMWIDGET_IMPL_H
3 /***************************************************************************
4 copyright : (C) 2005, 2006 by Carsten Niehaus
5 email : cniehaus@kde.org
6 ***************************************************************************/
7 /***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
16 #include <QWidget>
17 #include "ui_somwidget.h"
19 class Element;
21 /**
22 * @class SOMWidgetIMPL
23 * @author Carsten Niehaus
24 * @author Pino Toscano
26 * The SOMWidgetIMPL provides a QSlider. When this slider is moved,
27 * this widget will display which elements have a boiling or melting
28 * point near the temperature the user entered using the slider.
30 class SOMWidgetIMPL : public QWidget, private Ui_SOMWidget
32 Q_OBJECT
34 public:
35 /**
36 * @param parent The parent of this widget
38 SOMWidgetIMPL( QWidget *parent = 0 );
40 int temperature() const;
42 public slots:
43 /**
44 * Reload the current unit from the preferences
46 void reloadUnits();
48 private:
49 QList<Element*> m_list;
50 QString m_htmlBegin;
51 QString m_htmlEnd;
52 int m_prevUnit;
54 private slots:
55 void sliderValueChanged( int temp );
57 /**
58 * in this slot the elements will be compared with
59 * the temperature @p newtemp. The content of the HTML
60 * will be generated
62 void setNewTemp( int newtemp );
64 signals:
65 /**
66 * Emitted when the chosen temperature is changed.
67 * The temperature @p newtemp is expressed always in Kelvin.
69 void temperatureChanged( int newtemp );
71 #endif // SOMWIDGET_IMPL_H