1 #ifndef ELEMENTDATAVIEWER_H
2 #define ELEMENTDATAVIEWER_H
3 /***************************************************************************
5 elementdataviewer.h - description
7 copyright : (C) 2004 by Carsten Niehaus
8 email : cniehaus@kde.org
9 ***************************************************************************/
11 /***************************************************************************
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
18 ***************************************************************************/
20 #include <kdialogbase.h>
23 #include "plotwidget.h"
25 typedef QValueList
<double> DoubleList
;
27 class PlotSetupWidget
;
30 * @short the values of the y-Axis
31 * @author Carsten Niehaus
35 friend class ElementDataViewer
;
41 * sets the dataList to @p list
43 void setDataList( DoubleList list
){
48 * @return the value of the selected dataset of element @p element
50 double value( int element
){
52 DoubleList::iterator it
= dataList
.at( element
);
57 * This represents the nine possible datasets.
58 * @li WEIGHT: the weight of the element
59 * @li MELTINGPOINT: the meanweight of the element
61 enum PAXISDATA
{ WEIGHT
=0, MEANWEIGHT
=1, DENSITY
=2, IE1
=3, IE2
=4, EN
=5, MELTINGPOINT
=6, BOILINGPOINT
=7, ATOMICRADIUS
=8 };
64 * @return the currently selected datatype
65 * @see AxisData::PAXISDATA
67 int currentDataType(){
68 return m_currentDataType
;
73 * the dataList contains the values off all elements
74 * but only of the currently selected datatyp. This
75 * means that it eg contains all boilingpoints
79 int m_currentDataType
;
83 * @short This widget shows the plot and the widget
84 * where you can setup the plot
85 * @author Carsten Niehaus
87 class ElementDataViewer
: public KDialogBase
92 ElementDataViewer( KalziumDataObject
*data
, QWidget
*parent
=0 , const char *name
=0 );
95 * the AxixData for the y-Axis
111 virtual void paintEvent(QPaintEvent
*);
112 virtual void keyPressEvent(QKeyEvent
*e
);
116 PlotWidget
*m_pPlotWidget
;
117 PlotSetupWidget
*m_pPlotSetupWidget
;
119 KalziumDataObject
*d
;
123 void setupAxisData();
125 void setLimits(int, int);
129 #endif // ELEMENTDATAVIEWER_H