|
|
A widget that displays a linechart with optional background throbber (Not implemented yet).
| std::list | Values |
[protected]
| std::list<QString> XValues | XValues |
[protected]
| std::list<QString> Labels | Labels |
[protected]
| std::list | Enabled |
[protected]
| bool Legend | Legend |
[protected]
| bool Last | Last |
[protected]
| int Grid | Grid |
[protected]
| bool AxisText | AxisText |
[protected]
| double MinValue | MinValue |
[protected]
| bool MinAuto | MinAuto |
[protected]
| double MaxValue | MaxValue |
[protected]
| bool MaxAuto | MaxAuto |
[protected]
| QString YPostfix | YPostfix |
[protected]
| int Samples | Samples |
[protected]
| QString Title | Title |
[protected]
| QRect Chart | Chart |
[protected]
| QPoint MousePoint[2] | MousePoint[2] |
[protected]
| int SkipSamples | SkipSamples |
[protected]
| int UseSamples | UseSamples |
[protected]
| int DisplaySamples | DisplaySamples |
[protected]
| bool Zooming | Zooming |
[protected]
| double zMinValue | zMinValue |
[protected]
| double zMaxValue | zMaxValue |
[protected]
| double round (double round,bool up)
| round |
[protected static]
| QRect fixRect (QPoint p1,QPoint p2)
| fixRect |
[protected]
| void mouseReleaseEvent (QMouseEvent *e)
| mouseReleaseEvent |
[protected virtual]
Reimplemented from QWidget.
| void mouseMoveEvent (QMouseEvent *e)
| mouseMoveEvent |
[protected virtual]
Reimplemented from QWidget.
| void mouseDoubleClickEvent (QMouseEvent *e)
| mouseDoubleClickEvent |
[protected virtual]
Reimplemented from QWidget.
| void mousePressEvent (QMouseEvent *e)
| mousePressEvent |
[protected virtual]
Reimplemented from QWidget.
| int countSamples (void)
| countSamples |
[protected]
| void clearZoom (void)
| clearZoom |
[protected]
| void paintLegend (QPainter *p,QRect &rect)
| paintLegend |
[protected virtual]
| void paintTitle (QPainter *p,QRect &rect)
| paintTitle |
[protected virtual]
| void paintAxis (QPainter *p,QRect &rect)
| paintAxis |
[protected virtual]
| void paintChart (QPainter *p,QRect &rect)
| paintChart |
[protected virtual]
| toLineChart (QWidget *parent=NULL,const char *name=NULL,WFlags f=0)
| toLineChart |
Create a new linechart.
Parameters:
| parent | Parent widget. |
| name | Name of widget. |
| f | Widget flags. |
| toLineChart (toLineChart *chart,QWidget *parent=NULL,const char *name=NULL,WFlags f=0)
| toLineChart |
Create a new chart by copying all the data from another chart.
Parameters:
| chart | Chart to copy data from. |
| parent | Parent widget. |
| name | Name of widget. |
| f | Widget flags. |
| ~toLineChart ()
| ~toLineChart |
Destroy chart
| void showLegend (bool on)
| showLegend |
Specify if legend should be displayed to the right of the graph, default is on.
Parameters:
| on | Whether to display legend or not. |
| bool legend (void)
| legend |
[const]
Check if legend is displayed or not.
Returns: If legend is displayed or not.
| void showLast (bool on)
| showLast |
Show most recent value on top of graph
Parameters:
| on | Whether to display or not. |
| bool last (void)
| last |
[const]
Check if last value is displayed or not.
Returns: If value is displayed or not.
| void setTitle (const QString &title=QString::null)
| setTitle |
Set title of the chart. Set to empty string to not display title.
Parameters:
| title | Title of chart. |
| const QString & title (void)
| title |
Get title of chart.
Returns: Title of chart.
| void showGrid (int div=0)
| showGrid |
Specify if a grid should be displayed in the graph, default is on.
Parameters:
| div | Number of parts to divide grid into. |
| int grid (void)
| grid |
[const]
Check if grid is displayed or not.
Returns: Number of parts to divide grid into.
| void showAxisLegend (bool on)
| showAxisLegend |
Specify if a y-axis legend should be displayed in the graph, default is on.
Parameters:
| on | Whether to display legend or not. |
| bool axisLegend (void)
| axisLegend |
[const]
Check if y-axis legend is displayed or not.
Returns: If legend is displayed or not.
| void setYPostfix (const QString &postfix)
| setYPostfix |
Set y postfix value. This will be appended to the values in the axis legend.
Parameters:
| postfix | The string to append. |
| void setMaxValueAuto (void)
| setMaxValueAuto |
Set max value on y-axis to auto.
| void setMinValueAuto (void)
| setMinValueAuto |
Set min value on y-axis to auto.
| void setMaxValue (double maxVal)
| setMaxValue |
Set max value on y-axis.
Parameters:
| val | Max value on y-axis. |
| void setMinValue (double minVal)
| setMinValue |
Set min value on y-axis.
Parameters:
| val | Min value on y-axis. |
| double minValue (void)
| minValue |
[const]
Get minimum value on y-axis. Will not return the automatically determinned minimum value.
Returns: Minimum value on y-axis.
| double maxValue (void)
| maxValue |
[const]
Get maximum value on y-axis. Will not return the automatically determinned maximum value.
Returns: Maximum value on y-axis.
| void setSamples (int samples=-1)
| setSamples |
Set the number of samples on the x-axis. Setting samples to -1 will keep all entries.
Parameters:
| samples | Number of samples. |
| int samples (void)
| samples |
[const]
Get the maximum number of samples on the x-axis.
Returns: Max number of samples.
| void setLabels (const std::list<QString> &labels)
| setLabels |
Set the labels on the chart lines.
Parameters:
| labels | Labels of the lines. Empty labels will not show up in the legend. |
| std::list<QString> & labels (void)
| labels |
Get the labels of the chart lines.
Returns: List of labels.
| void addValues (std::list | addValues |
[virtual]
Add a new value set to the chart.
Parameters:
| value | New values for charts (One for each line). |
| label | X-value on these values. |
| std::list<QString> & xValues (void)
| xValues |
Get list of labels
Returns: List of labels
| std::list | values |
Get list of values.
Returns: Values in piechart.
| void exportData (std::map<QString,QString> &data,const QString &prefix)
| exportData |
[virtual]
Export chart to a map.
Parameters:
| data | A map that can be used to recreate the data of a chart. |
| prefix | Prefix to add to the map. |
| void importData (std::map<QString,QString> &data,const QString &prefix)
| importData |
[virtual]
Import data
Parameters:
| data | Data to read from a map. |
| prefix | Prefix to read data from. |
| std::list | enabledCharts |
Get enabled datavalues. Values in this list with false are not drawn in the chart. Could be an empty list if everything is enabled.
| void setEnabledCharts (std::list | setEnabledCharts |
Set enabled datavalues. Values in this list with false are not drawn in the chart.
| toLineChart * openCopy (QWidget *parent)
| openCopy |
[virtual]
Open chart in new window.
| void valueAdded (std::list | valueAdded |
[virtual signal]
A new value set was added to the chart.
Parameters:
| value | New values for charts (One for each line). |
| label | X-value on these values. |
| void clear (void)
| clear |
[virtual slot]
Clear the values from the chart.
| void setup (void)
| setup |
[virtual slot]
Setup values of charts.
| void editPrint (void)
| editPrint |
[virtual slot]
Print the chart.
| void openCopy (void)
| openCopy |
[slot]
| void paintEvent (QPaintEvent *e)
| paintEvent |
[protected virtual]
Reimplemented for internal reasons.
Reimplemented from QWidget.
| void addMenues (QPopupMenu *)
| addMenues |
[protected virtual]
Reimplemented for internal reasons.