QSint Library  0.2.2
Public Types | Public Member Functions | Protected Member Functions | List of all members
QSint::BarChartPlotter Class Reference

Class representing a barchart plotting widget. More...

#include <barchartplotter.h>

Inheritance diagram for QSint::BarChartPlotter:
QSint::PlotterBase

Public Types

enum  BarChartType { Stacked, Columns, Trend }
 Defines type of the chart. More...
 

Public Member Functions

void setBarType (BarChartType type)
 Sets the plotter type to type.
 
BarChartType barType () const
 Retrieves type of the plotter.
 
void setBarSize (int min, int max=INT_MAX)
 
int barSizeMin () const
 Retrieves minimum bar size. More...
 
int barSizeMax () const
 Retrieves maximum bar size. More...
 
void setBarScale (double scale)
 
double barScale () const
 Retrieves bar scale coefficient. More...
 
void setBarOpacity (double value)
 Sets opacity of a single bar to value (should be in ranges between 0.1 and 1.0, 1.0 is the default).
 
double barOpacity () const
 Retrieves bar opacity. More...
 
void setZeroLinePen (const QPen &pen)
 Sets pen of zero line of the plotter to pen.
 
const QPen & zeroLinePen () const
 Retrieves zero line pen. More...
 
- Public Member Functions inherited from QSint::PlotterBase
void setBorderPen (const QPen &pen)
 Sets pen of the plotter's border to pen.
 
const QPen & borderPen () const
 Retrieves plotter's border pen.
 
void setBackground (const QBrush &brush)
 Sets plotter's background to brush.
 
const QBrush & background () const
 Retrieves plotter background.
 
void setFont (const QFont &font)
 Sets font of the data item to font.
 
const QFont & font () const
 Retrieves data item font.
 
void setItemPen (const QPen &pen)
 Sets pen of the data item to pen.
 
void setHighlightTextColor (const QColor &color)
 Sets color of the highlighted data item text to color.
 
const QColor & highlightTextColor () const
 Retrieves highlighted data item text color.
 
void setHighlightPen (const QPen &pen)
 Sets pen of the highlighted data item to pen.
 
const QPen & highlightPen () const
 Retrieves highlighted data item pen.
 
void setHighlightBrush (const QBrush &brush)
 Sets brush of the highlighted data item to brush.
 
const QBrush & highlightBrush () const
 Retrieves highlighted data item brush.
 
void setHighlightAlpha (double alpha)
 
double highlightAlpha () const
 Retrieves highlighted data item opacity.
 
void setAntiAliasing (bool set)
 Enables (set=true, the default) or disables (set=false) painter's antialiasing.
 
AxisBase * axisX () const
 Retrieves X axis object.
 
AxisBase * axisY () const
 Retrieves Y axis object.
 
void setModel (QAbstractItemModel *model)
 Sets data model to model.
 
QAbstractItemModel * model () const
 Retrieves active data model or NULL if not set.
 
QRect dataRect () const
 Retrieves data rectangle (excluding margins and axes).
 
const QPoint & mousePos () const
 Retrieves current mouse cursor position in local coordinates.
 
QPoint globalMousePos () const
 Retrieves current mouse cursor position in global coordinates.
 
const QModelIndex & highlightedIndex () const
 Retrieves highlighted data model index, or invalid QModelIndex if nothing highlighted.
 

Protected Member Functions

virtual void drawContent (QPainter &p)
 Draws content of the plotter.
 
- Protected Member Functions inherited from QSint::PlotterBase
virtual void drawBackground (QPainter &p)
 Draws default background of the plotter.
 
virtual void drawForeground (QPainter &p)
 Draws default foreground of the plotter.
 
virtual void drawAxes (QPainter &p)
 Draws axes of the plotter.
 

Additional Inherited Members

- Signals inherited from QSint::PlotterBase
void entered (const QModelIndex &index)
 
void pressed (const QModelIndex &index)
 Emitted when the mouse button has been pressed over the data item at index.
 
void clicked (const QModelIndex &index)
 Emitted when the mouse button has been clicked over the data item at index.
 
void doubleClicked (const QModelIndex &index)
 Emitted when the mouse button has been double clicked over the data item at index.
 

Detailed Description

Class representing a barchart plotting widget.

Since
0.2.1
StackedChart.png
An example of BarChartPlotter with Stacked type
ColumnChart.png
An example of BarChartPlotter with Columns type
TrendChart.png
An example of BarChartPlotter with Trend type

BarChartPlotter provides following types of the charts (see BarChartType enum):

Member Enumeration Documentation

Defines type of the chart.

Enumerator
Stacked 

bar represents single model column

Columns 

bar represents single model value

Trend 

trend-like plot

Member Function Documentation

double QSint::BarChartPlotter::barOpacity ( ) const
inline

Retrieves bar opacity.

See Also
setBarOpacity()
double QSint::BarChartPlotter::barScale ( ) const
inline

Retrieves bar scale coefficient.

See Also
setBarScale()
int QSint::BarChartPlotter::barSizeMax ( ) const
inline

Retrieves maximum bar size.

See Also
setBarSize()
int QSint::BarChartPlotter::barSizeMin ( ) const
inline

Retrieves minimum bar size.

See Also
setBarSize()
void QSint::BarChartPlotter::setBarScale ( double  scale)

Sets scale coefficient to scale. This value defines how many space a single model column representation could get. It should be in ranges between 0.1 and 1.0, 0.5 is the default. Valid for Stacked and Columns plotter types.

void QSint::BarChartPlotter::setBarSize ( int  min,
int  max = INT_MAX 
)

Sets minimum and maximum sizes of a single bar. Valid for Stacked and Columns plotter types.

const QPen& QSint::BarChartPlotter::zeroLinePen ( ) const
inline

Retrieves zero line pen.

See Also
setZeroLinePen()

The documentation for this class was generated from the following files:

© Sintegrial Technologies 2011-2014
http://www.sintegrial.com